#开发环境搭建
###JDK
![](https://upload-images.jianshu.io/upload_images/24183515-37ee850fd2f83a57.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###开发配置
eclipse——Window——Preferences——UAP-studio
![](https://upload-images.jianshu.io/upload_images/24183515-3d8d810141b31cc3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
eclipse——Window——Preferences——String Substitution
![](https://upload-images.jianshu.io/upload_images/24183515-494857c52a9f15ea.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#设计数据库表
#根据方案
![](https://upload-images.jianshu.io/upload_images/24183515-053b10c7f2b9ab64.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###利用PowerDesigner画出表格
![](https://upload-images.jianshu.io/upload_images/24183515-bb30f346891d1b77.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###右击表格属性的Preview复制SQL语句,在数据库环境中,建立表格,子表也如此
![](https://upload-images.jianshu.io/upload_images/24183515-eb5d2b40532f2251.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###之后会有一个.pdm文件,登录U8C,“数据字典管理”导入创建的pdm文件(导入数据库),
![](https://upload-images.jianshu.io/upload_images/24183515-d25da6de1aa6dacf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/24183515-78a28093589c8185.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#导入数据字典创建VO
###点击“集成开发环境”——“工具和选项”——“根据数据源生成VO代码”
![](https://upload-images.jianshu.io/upload_images/24183515-11988e9304cbd69c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#创建单据模板
###首先加载的UI界面
![](https://upload-images.jianshu.io/upload_images/24183515-165b004b87ab4990.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###U8C中,“功能注册”,“权限分配”分配权限,否则看不到。
![](https://upload-images.jianshu.io/upload_images/24183515-b9e98fba13d2350c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###“单据模板初始化”把主子表拖入
![](https://upload-images.jianshu.io/upload_images/24183515-76b48ba0056c50df.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#功能节点默认模板设置
###“功能节点默认模板设置”,然后分配单据模板,查询模板,打印模板。
![](https://upload-images.jianshu.io/upload_images/24183515-38715273c1d1990b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
###打开eclipse开发环境,把之前生成好的VO拉入文件,实现增删改查
![](https://upload-images.jianshu.io/upload_images/24183515-96b34586b64df737.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/24183515-413897e3fb4e5491.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/24183515-56beef1ea01eb569.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#实现了之后,进行推单
1.“单据类型管理”节点设置单据类型
![](https://upload-images.jianshu.io/upload_images/24183515-faa89914688f9875.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/24183515-793e848a79a2c43e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
2.“VO对照管理“里面维护好主子表
![](https://upload-images.jianshu.io/upload_images/24183515-3c791de9f9ce53ae.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/24183515-e6ba12a32b819290.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.“单据项目管理”节点自动注册,此步骤不自动注册,在数据交换管理你面数据交换按钮看不见字段(此过程客户端(需要导入程序))
![](https://upload-images.jianshu.io/upload_images/24183515-f5803f6860faeda8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
4.“数据交换界面”进行字段映射(此过程需要服务端)
首先配置上下游关系
![](https://upload-images.jianshu.io/upload_images/24183515-77b6aba8cbb1160c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](https://upload-images.jianshu.io/upload_images/24183515-c53f179381cd0d32.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
#####YSJH TO PCD
![image.png](https://upload-images.jianshu.io/upload_images/24183515-32b0e32b5c86d23d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![image.png](https://upload-images.jianshu.io/upload_images/24183515-71b26d273d6240c1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
```
package nc.ui.pf.changedir;
import nc.vo.pf.change.UserDefineFunction;
import nc.bs.pf.change.ConversionPolicyEnum;
import nc.bs.logging.Logger;
/**
* 用于YSJHTOPCD的VO交换类。
*
* @author 流程平台自动产生的VO交换类 2020-10-27
* @since 5.5
*/
public class CHGYSJHTOPCD extends nc.ui.pf.change.VOConversionUI {
/**
* CHGYSJHTOPCD 默认构造
*/
public CHGYSJHTOPCD() {
super();
}
/**
* 获得交换后处理类 全名称
* @return java.lang.String
*/
public String getAfterClassName() {
return null;
}
/**
* 获得交换后处理类 全名称
* @return java.lang.String
*/
public String getOtherClassName() {
return null;
}
/**
* 返回交换类型枚举ConversionPolicyEnum,默认为单据项目-单据项目
* @return ConversionPolicyEnum
* @since 5.5
*/
public ConversionPolicyEnum getConversionPolicy() {
return ConversionPolicyEnum.BILLITEM_BILLITEM;
}
/**
* 获得映射类型的交换规则
* @return java.lang.String[]
*/
public String[] getField() {
return new String[] {
"H_approver->H_approver",
"H_customer->H_customer",
"H_def1->H_def1",
"H_def10->H_def10",
"H_def11->H_def11",
"H_def12->H_def12",
"H_def13->H_def13",
"H_def14->H_def14",
"H_def15->H_def15",
"H_def16->H_def16",
"H_def17->H_def17",
"H_def18->H_def18",
"H_def19->H_def19",
"H_def2->H_def2",
"H_def20->H_def20",
"H_def3->H_def3",
"H_def4->H_def4",
"H_def5->H_def5",
"H_def6->H_def6",
"H_def7->H_def7",
"H_def8->H_def8",
"H_def9->H_def9",
"H_memo->H_memo",
"H_operator->H_operator",
"H_pk_corp->H_pk_corp",
"H_ts->H_ts",
"B_hname->B_hname",
"B_memo->B_memo",
"B_ts->B_ts",
"B_vdef1->B_vdef1",
"B_vdef10->B_vdef10",
"B_vdef11->B_vdef11",
"B_vdef12->B_vdef12",
"B_vdef13->B_vdef13",
"B_vdef14->B_vdef14",
"B_vdef15->B_vdef15",
"B_vdef16->B_vdef16",
"B_vdef17->B_vdef17",
"B_vdef18->B_vdef18",
"B_vdef19->B_vdef19",
"B_vdef2->B_vdef2",
"B_vdef20->B_vdef20",
"B_vdef3->B_vdef3",
"B_vdef4->B_vdef4",
"B_vdef5->B_vdef5",
"B_vdef6->B_vdef6",
"B_vdef7->B_vdef7",
"B_vdef8->B_vdef8",
"B_vdef9->B_vdef9"
};
}
/**
* 获得赋值类型的交换规则
* @return java.lang.String[]
*/
public String[] getAssign() {
return null;
}
/**
* 获得公式类型的交换规则
* @return java.lang.String[]
*/
public String[] getFormulas() {
return null;
}
/**
* 返回用户自定义函数
*/
public UserDefineFunction[] getUserDefineFunction() {
return null;
}
}
```
##### error 数据库缺少“DR”字段,加入“DR”字段,数据库,数据字典,单据模板,代码VO,都需加入DR字段,类型一致。如果还有问题,数据交换中,DR一一映射的线删掉。
#补丁
右键选中(如运输计划),右键export,other——补丁包,起名字(202010291604_X_(提问题人)_(解决人)_运输计划代码补丁)