Commit 69bea29a by 宋祥

1.fixBug:物料清单已派工时不能删除

2.新增物料计划提交不生效问题修复
parent 8af6de4c
...@@ -38,4 +38,16 @@ public class CommonConstant { ...@@ -38,4 +38,16 @@ public class CommonConstant {
public static final String DAY = "DAY"; public static final String DAY = "DAY";
} }
/**
* 常用字段常量
*
* @author:songx
* @date:2024/2/22,15:33
*/
public static class Field {
// DETAIL
public static final String DETAIL = "detail";
}
} }
...@@ -72,5 +72,19 @@ public class HPConstant { ...@@ -72,5 +72,19 @@ public class HPConstant {
// 其他 // 其他
public static final String QT = "QT"; public static final String QT = "QT";
} }
/**
* 计划状态常量
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class planStatus {
// 计划中
public static final Integer S_0 = 0;
// 生产中
public static final Integer S_1 = 1;
}
} }
...@@ -217,6 +217,20 @@ public class HPSqlConstant { ...@@ -217,6 +217,20 @@ public class HPSqlConstant {
} }
/** /**
* HPSC003 SQL名称定义
*
* @author:songx
* @date:2024/2/5,10:16
*/
public class HPSC003 {
// 修改状态
public static final String UPDATE_STATUS = "HPSC003.updateStatus";
// 修改时间
public static final String UPDATE_DATE = "HPSC003.updateDate";
}
/**
* HPSC004 SQL名称定义 * HPSC004 SQL名称定义
* *
* @author:songx * @author:songx
...@@ -226,8 +240,14 @@ public class HPSqlConstant { ...@@ -226,8 +240,14 @@ public class HPSqlConstant {
// 锁 // 锁
public static final String LOCK = "HPSC004.lock"; public static final String LOCK = "HPSC004.lock";
// 更新时间完工情况 // 根据材料号删除
public static final String DELETE_BY_MAT = "HPSC004.deleteByMat";
// 更新计划完工情况
public static final String UPDATE_PLAN_DATE = "HPSC004.updatePlanDate";
// 更新实际完工情况
public static final String UPDATE_COMPLETE = "HPSC004.updateComplete"; public static final String UPDATE_COMPLETE = "HPSC004.updateComplete";
// 更新订单号
public static final String UPDATE_PROD_ORDER_NO = "HPSC004.updateProdOrderNo";
} }
/** /**
......
package com.baosight.hpjx.hp.sc.domain; package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* Project: <br> * Project: <br>
...@@ -17,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -17,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-01-17 10:33:53 create * @history 2024-02-22 10:25:57 create
*/ */
public class HPSC004 extends DaoEPBase { public class HPSC004 extends DaoEPBase {
...@@ -28,15 +28,22 @@ public class HPSC004 extends DaoEPBase { ...@@ -28,15 +28,22 @@ public class HPSC004 extends DaoEPBase {
public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/ public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PARENT_ID = "parentId"; /* 父节点-部件编码*/ public static final String FIELD_MAT_ID = "matId"; /* 材料ID*/
public static final String FIELD_PARENT_PRDT_NAME = "parentPrdtName"; /* 父节点-部件名称*/ public static final String FIELD_PARENT_ID = "parentId"; /* 父节点-产品编码*/
public static final String FIELD_PARENT_PRDT_NAME = "parentPrdtName"; /* 父节点-产品名称*/
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_PRODUTION_ORDER_NO = "produtionOrderNo"; /* 生产订单号*/
public static final String FIELD_TYPE = "type"; /* 类别*/ public static final String FIELD_TYPE = "type"; /* 类别*/
public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/ public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/
public static final String FIELD_SORT = "sort"; /* 排序字段*/ public static final String FIELD_SORT = "sort"; /* 排序字段*/
public static final String FIELD_ICON = "icon"; /* 图片地址*/ public static final String FIELD_ICON = "icon"; /* 图片地址*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 部件类型*/ public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 部件编码*/ public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 部件名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_NUM = "num"; /* 数量*/ public static final String FIELD_NUM = "num"; /* 数量*/
public static final String FIELD_UNIT_WT = "unitWt"; /* 单重*/ public static final String FIELD_UNIT_WT = "unitWt"; /* 单重*/
public static final String FIELD_TOTAL_WT = "totalWt"; /* 总重*/ public static final String FIELD_TOTAL_WT = "totalWt"; /* 总重*/
...@@ -50,31 +57,38 @@ public class HPSC004 extends DaoEPBase { ...@@ -50,31 +57,38 @@ public class HPSC004 extends DaoEPBase {
public static final String FIELD_ACTUAL_COMPLETION_DATE = "actualCompletionDate"; /* 实际完工日期*/ public static final String FIELD_ACTUAL_COMPLETION_DATE = "actualCompletionDate"; /* 实际完工日期*/
public static final String FIELD_ACTUAL_COMPLETION_NUM = "actualCompletionNum"; /* 实际完工数量*/ public static final String FIELD_ACTUAL_COMPLETION_NUM = "actualCompletionNum"; /* 实际完工数量*/
public static final String FIELD_ACTUAL_COMPLETION_UNIT_WT = "actualCompletionUnitWt"; /* 实际完工重量*/ public static final String FIELD_ACTUAL_COMPLETION_UNIT_WT = "actualCompletionUnitWt"; /* 实际完工重量*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 项目档案ID*/
public static final String FIELD_STATUS = "status"; /* 状态 0-未提交,1-已提交*/ public static final String FIELD_STATUS = "status"; /* 状态 0-未审核,1-已审核*/
public static final String FIELD_DEL_STATUS = "delStatus"; /* 状态 1未删除,0已删除*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/ public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_DEL_STATUS = "delStatus"; /* 状态:0未删除,1已删除*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/ public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目编码*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 父节点-部件编码*/ public static final String COL_MAT_ID = "MAT_ID"; /* 材料ID*/
public static final String COL_PARENT_PRDT_NAME = "PARENT_PRDT_NAME"; /* 父节点-部件名称*/ public static final String COL_PARENT_ID = "PARENT_ID"; /* 父节点-产品编码*/
public static final String COL_PARENT_PRDT_NAME = "PARENT_PRDT_NAME"; /* 父节点-产品名称*/
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_PRODUTION_ORDER_NO = "PRODUTION_ORDER_NO"; /* 生产订单号*/
public static final String COL_TYPE = "TYPE"; /* 类别*/ public static final String COL_TYPE = "TYPE"; /* 类别*/
public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/ public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/
public static final String COL_SORT = "SORT"; /* 排序字段*/ public static final String COL_SORT = "SORT"; /* 排序字段*/
public static final String COL_ICON = "ICON"; /* 图片地址*/ public static final String COL_ICON = "ICON"; /* 图片地址*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 部件类型*/ public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 部件编码*/ public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 部件名称*/ public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_NUM = "NUM"; /* 数量*/ public static final String COL_NUM = "NUM"; /* 数量*/
public static final String COL_UNIT_WT = "UNIT_WT"; /* 单重*/ public static final String COL_UNIT_WT = "UNIT_WT"; /* 单重*/
public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 总重*/ public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 总重*/
...@@ -88,15 +102,16 @@ public class HPSC004 extends DaoEPBase { ...@@ -88,15 +102,16 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_ACTUAL_COMPLETION_DATE = "ACTUAL_COMPLETION_DATE"; /* 实际完工日期*/ public static final String COL_ACTUAL_COMPLETION_DATE = "ACTUAL_COMPLETION_DATE"; /* 实际完工日期*/
public static final String COL_ACTUAL_COMPLETION_NUM = "ACTUAL_COMPLETION_NUM"; /* 实际完工数量*/ public static final String COL_ACTUAL_COMPLETION_NUM = "ACTUAL_COMPLETION_NUM"; /* 实际完工数量*/
public static final String COL_ACTUAL_COMPLETION_UNIT_WT = "ACTUAL_COMPLETION_UNIT_WT"; /* 实际完工重量*/ public static final String COL_ACTUAL_COMPLETION_UNIT_WT = "ACTUAL_COMPLETION_UNIT_WT"; /* 实际完工重量*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/ public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 项目档案ID*/
public static final String COL_STATUS = "STATUS"; /* 状态 0-未提交,1-已提交*/ public static final String COL_STATUS = "STATUS"; /* 状态 0-未审核,1-已审核*/
public static final String COL_DEL_STATUS = "DEL_STATUS"; /* 状态 1未删除,0已删除*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/ public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_DEL_STATUS = "DEL_STATUS"; /* 状态:0未删除,1已删除*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String QUERY = "HPSC004.query"; public static final String QUERY = "HPSC004.query";
public static final String COUNT = "HPSC004.count"; public static final String COUNT = "HPSC004.count";
...@@ -104,20 +119,27 @@ public class HPSC004 extends DaoEPBase { ...@@ -104,20 +119,27 @@ public class HPSC004 extends DaoEPBase {
public static final String UPDATE = "HPSC004.update"; public static final String UPDATE = "HPSC004.update";
public static final String DELETE = "HPSC004.delete"; public static final String DELETE = "HPSC004.delete";
private Long id = new Long(0); private Long id;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/ private String deptCode = " "; /* 部门编码 预留*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String parentId = " "; /* 父节点-部件编码*/ private Long matId; /* 材料ID*/
private String parentPrdtName = " "; /* 父节点-部件名称*/ private String parentId = " "; /* 父节点-产品编码*/
private String parentPrdtName = " "; /* 父节点-产品名称*/
private String prodOrderNo = " "; /* 生产订单号*/
private String produtionOrderNo = " "; /* 生产订单号*/
private String type = " "; /* 类别*/ private String type = " "; /* 类别*/
private String leaf = "1"; /* 是否有叶子节点*/ private String leaf = "1"; /* 是否有叶子节点*/
private String sort = " "; /* 排序字段*/ private String sort = " "; /* 排序字段*/
private String icon = " "; /* 图片地址*/ private String icon = " "; /* 图片地址*/
private Integer prdtType = 0; /*部件类型*/ private Integer prdtType; /* 产品类型*/
private String prdtCode = " "; /* 部件编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 部件名称*/ private String prdtName = " "; /* 产品名称*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private String spec = " "; /* 规格*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/ private BigDecimal num = new BigDecimal(0.000); /* 数量*/
private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/ private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/ private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/
...@@ -129,23 +151,18 @@ public class HPSC004 extends DaoEPBase { ...@@ -129,23 +151,18 @@ public class HPSC004 extends DaoEPBase {
private String planCommentDate = " "; /* 计划开始时间*/ private String planCommentDate = " "; /* 计划开始时间*/
private String planCompletionDate = " "; /* 计划结束时间*/ private String planCompletionDate = " "; /* 计划结束时间*/
private String actualCompletionDate = " "; /* 实际完工日期*/ private String actualCompletionDate = " "; /* 实际完工日期*/
private BigDecimal actualCompletionNum = new BigDecimal(0.000); /* 实际完工数量*/ private BigDecimal actualCompletionNum = new BigDecimal("0"); /* 实际完工数量*/
private BigDecimal actualCompletionUnitWt = new BigDecimal(0.000); /* 实际完工重量*/ private BigDecimal actualCompletionUnitWt = new BigDecimal("0"); /* 实际完工重量*/
private String productionOrderNo = " "; /* 生产订单号*/ private Long inventRecordId; /* 项目档案ID*/
private Integer status = new Integer(0); /* 状态 0-未提交,1-已提交*/ private Integer status; /* 状态 0-未审核,1-已审核*/
private Integer delStatus = new Integer(0); /* 状态 1未删除,0已删除*/ private String remark = " "; /* 备注*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdTime ; /* 创建时间*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedTime ; /* 更新时间*/ private String updatedName = " "; /* 修改人名称*/
private String remark = " "; /* 备注*/ private String updatedTime = " "; /* 更新时间*/
private Long inventRecordId = new Long(0); private Integer delStatus; /* 状态:0未删除,1已删除*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -174,12 +191,24 @@ public class HPSC004 extends DaoEPBase { ...@@ -174,12 +191,24 @@ public class HPSC004 extends DaoEPBase {
eiColumn.setDescName("项目名称"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("材料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID); eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("父节点-部件编码"); eiColumn.setDescName("父节点-产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_PRDT_NAME); eiColumn = new EiColumn(FIELD_PARENT_PRDT_NAME);
eiColumn.setDescName("父节点-部件名称"); eiColumn.setDescName("父节点-产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUTION_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TYPE); eiColumn = new EiColumn(FIELD_TYPE);
...@@ -199,18 +228,46 @@ public class HPSC004 extends DaoEPBase { ...@@ -199,18 +228,46 @@ public class HPSC004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE); eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("部件类型"); eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE); eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("部件编码"); eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME); eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("部件名称"); eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NUM); eiColumn = new EiColumn(FIELD_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("数量"); eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -261,6 +318,9 @@ public class HPSC004 extends DaoEPBase { ...@@ -261,6 +318,9 @@ public class HPSC004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_NUM); eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("实际完工数量"); eiColumn.setDescName("实际完工数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -271,22 +331,26 @@ public class HPSC004 extends DaoEPBase { ...@@ -271,22 +331,26 @@ public class HPSC004 extends DaoEPBase {
eiColumn.setDescName("实际完工重量"); eiColumn.setDescName("实际完工重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO); eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("生产订单号"); eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-未提交,1-已提交"); eiColumn.setDescName("状态 0-未审核,1-已审核");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEL_STATUS); eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("状态 1未删除,0已删除"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -295,42 +359,18 @@ public class HPSC004 extends DaoEPBase { ...@@ -295,42 +359,18 @@ public class HPSC004 extends DaoEPBase {
eiColumn.setDescName("更新人"); eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME); eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新时间"); eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec"); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("规格"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length"); eiColumn = new EiColumn(FIELD_DEL_STATUS);
eiColumn.setType("N"); eiColumn.setDescName("状态:0未删除,1已删除");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("width");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("thick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
} }
...@@ -422,7 +462,23 @@ public class HPSC004 extends DaoEPBase { ...@@ -422,7 +462,23 @@ public class HPSC004 extends DaoEPBase {
this.projName = projName; this.projName = projName;
} }
/** /**
* get the parentId - 父节点-部件编码. * get the matId - 材料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 材料ID.
*
* @param matId - 材料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the parentId - 父节点-产品编码.
* @return the parentId * @return the parentId
*/ */
public String getParentId() { public String getParentId() {
...@@ -430,15 +486,15 @@ public class HPSC004 extends DaoEPBase { ...@@ -430,15 +486,15 @@ public class HPSC004 extends DaoEPBase {
} }
/** /**
* set the parentId - 父节点-部件编码. * set the parentId - 父节点-产品编码.
* *
* @param parentId - 父节点-部件编码 * @param parentId - 父节点-产品编码
*/ */
public void setParentId(String parentId) { public void setParentId(String parentId) {
this.parentId = parentId; this.parentId = parentId;
} }
/** /**
* get the parentPrdtName - 父节点-部件名称. * get the parentPrdtName - 父节点-产品名称.
* @return the parentPrdtName * @return the parentPrdtName
*/ */
public String getParentPrdtName() { public String getParentPrdtName() {
...@@ -446,14 +502,46 @@ public class HPSC004 extends DaoEPBase { ...@@ -446,14 +502,46 @@ public class HPSC004 extends DaoEPBase {
} }
/** /**
* set the parentPrdtName - 父节点-部件名称. * set the parentPrdtName - 父节点-产品名称.
* *
* @param parentPrdtName - 父节点-部件名称 * @param parentPrdtName - 父节点-产品名称
*/ */
public void setParentPrdtName(String parentPrdtName) { public void setParentPrdtName(String parentPrdtName) {
this.parentPrdtName = parentPrdtName; this.parentPrdtName = parentPrdtName;
} }
/** /**
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public String getProdOrderNo() {
return this.prodOrderNo;
}
/**
* set the prodOrderNo - 生产订单号.
*
* @param prodOrderNo - 生产订单号
*/
public void setProdOrderNo(String prodOrderNo) {
this.prodOrderNo = prodOrderNo;
}
/**
* get the produtionOrderNo - 生产订单号.
* @return the produtionOrderNo
*/
public String getProdutionOrderNo() {
return this.produtionOrderNo;
}
/**
* set the produtionOrderNo - 生产订单号.
*
* @param produtionOrderNo - 生产订单号
*/
public void setProdutionOrderNo(String produtionOrderNo) {
this.produtionOrderNo = produtionOrderNo;
}
/**
* get the type - 类别. * get the type - 类别.
* @return the type * @return the type
*/ */
...@@ -518,23 +606,23 @@ public class HPSC004 extends DaoEPBase { ...@@ -518,23 +606,23 @@ public class HPSC004 extends DaoEPBase {
this.icon = icon; this.icon = icon;
} }
/** /**
* get the prdtCode - 部件编码. * get the prdtType - 产品类型.
* @return the prdtCode * @return the prdtType
*/ */
public Integer getPrdtType() { public Integer getPrdtType() {
return this.prdtType; return this.prdtType;
} }
/** /**
* set the prdtCode - 部件编码. * set the prdtType - 产品类型.
* *
* @param prdtCode - 部件编码 * @param prdtType - 产品类型
*/ */
public void setPrdtType(Integer prdtType) { public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType; this.prdtType = prdtType;
} }
/** /**
* get the prdtCode - 部件编码. * get the prdtCode - 产品编码.
* @return the prdtCode * @return the prdtCode
*/ */
public String getPrdtCode() { public String getPrdtCode() {
...@@ -542,15 +630,15 @@ public class HPSC004 extends DaoEPBase { ...@@ -542,15 +630,15 @@ public class HPSC004 extends DaoEPBase {
} }
/** /**
* set the prdtCode - 部件编码. * set the prdtCode - 产品编码.
* *
* @param prdtCode - 部件编码 * @param prdtCode - 产品编码
*/ */
public void setPrdtCode(String prdtCode) { public void setPrdtCode(String prdtCode) {
this.prdtCode = prdtCode; this.prdtCode = prdtCode;
} }
/** /**
* get the prdtName - 部件名称. * get the prdtName - 产品名称.
* @return the prdtName * @return the prdtName
*/ */
public String getPrdtName() { public String getPrdtName() {
...@@ -558,14 +646,78 @@ public class HPSC004 extends DaoEPBase { ...@@ -558,14 +646,78 @@ public class HPSC004 extends DaoEPBase {
} }
/** /**
* set the prdtName - 部件名称. * set the prdtName - 产品名称.
* *
* @param prdtName - 部件名称 * @param prdtName - 产品名称
*/ */
public void setPrdtName(String prdtName) { public void setPrdtName(String prdtName) {
this.prdtName = prdtName; this.prdtName = prdtName;
} }
/** /**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the num - 数量. * get the num - 数量.
* @return the num * @return the num
*/ */
...@@ -774,23 +926,23 @@ public class HPSC004 extends DaoEPBase { ...@@ -774,23 +926,23 @@ public class HPSC004 extends DaoEPBase {
this.actualCompletionUnitWt = actualCompletionUnitWt; this.actualCompletionUnitWt = actualCompletionUnitWt;
} }
/** /**
* get the productionOrderNo - 生产订单号. * get the inventRecordId - 项目档案ID.
* @return the productionOrderNo * @return the inventRecordId
*/ */
public String getProductionOrderNo() { public Long getInventRecordId() {
return this.productionOrderNo; return this.inventRecordId;
} }
/** /**
* set the productionOrderNo - 生产订单号. * set the inventRecordId - 项目档案ID.
* *
* @param productionOrderNo - 生产订单号 * @param inventRecordId - 项目档案ID
*/ */
public void setProductionOrderNo(String productionOrderNo) { public void setInventRecordId(Long inventRecordId) {
this.productionOrderNo = productionOrderNo; this.inventRecordId = inventRecordId;
} }
/** /**
* get the status - 状态 0-未提交,1-已提交. * get the status - 状态 0-未审核,1-已审核.
* @return the status * @return the status
*/ */
public Integer getStatus() { public Integer getStatus() {
...@@ -798,28 +950,28 @@ public class HPSC004 extends DaoEPBase { ...@@ -798,28 +950,28 @@ public class HPSC004 extends DaoEPBase {
} }
/** /**
* set the status - 状态 0-未提交,1-已提交. * set the status - 状态 0-未审核,1-已审核.
* *
* @param status - 状态 0-未提交,1-已提交 * @param status - 状态 0-未审核,1-已审核
*/ */
public void setStatus(Integer status) { public void setStatus(Integer status) {
this.status = status; this.status = status;
} }
/** /**
* get the delStatus - 状态 1未删除,0已删除. * get the remark - 备注.
* @return the delStatus * @return the remark
*/ */
public Integer getDelStatus() { public String getRemark() {
return this.delStatus; return this.remark;
} }
/** /**
* set the delStatus - 状态 1未删除,0已删除. * set the remark - 备注.
* *
* @param delStatus - 状态 1未删除,0已删除 * @param remark - 备注
*/ */
public void setDelStatus(Integer delStatus) { public void setRemark(String remark) {
this.delStatus = delStatus; this.remark = remark;
} }
/** /**
* get the createdBy - 创建人. * get the createdBy - 创建人.
...@@ -838,6 +990,22 @@ public class HPSC004 extends DaoEPBase { ...@@ -838,6 +990,22 @@ public class HPSC004 extends DaoEPBase {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
/** /**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间. * get the createdTime - 创建时间.
* @return the createdTime * @return the createdTime
*/ */
...@@ -870,114 +1038,52 @@ public class HPSC004 extends DaoEPBase { ...@@ -870,114 +1038,52 @@ public class HPSC004 extends DaoEPBase {
this.updatedBy = updatedBy; this.updatedBy = updatedBy;
} }
/** /**
* get the updatedTime - 更新时间. * get the updatedName - 修改人名称.
* @return the updatedTime * @return the updatedName
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the remark - 备注.
* @return the remark
*/ */
public String getRemark() { public String getUpdatedName() {
return this.remark; return this.updatedName;
} }
/** /**
* set the remark - 备注. * set the updatedName - 修改人名称.
* *
* @param remark - 备注 * @param updatedName - 修改人名称
*/ */
public void setRemark(String remark) { public void setUpdatedName(String updatedName) {
this.remark = remark; this.updatedName = updatedName;
} }
/** /**
* get the inventRecordId - 项目档案ID. * get the updatedTime - 更新时间.
* @return the inventRecordId * @return the updatedTime
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 项目档案ID.
*
* @param inventRecordId - 项目档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the sort - 规格
* @return the sort
*/
public String getSpec() {
return this.spec;
}
/**
* set the sort - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/ */
public BigDecimal getWidth() { public String getUpdatedTime() {
return this.width; return this.updatedTime;
} }
/** /**
* set the width - 宽. * set the updatedTime - 更新时间.
* *
* @param width - 宽 * @param updatedTime - 更新时间
*/ */
public void setWidth(BigDecimal width) { public void setUpdatedTime(String updatedTime) {
this.width = width; this.updatedTime = updatedTime;
} }
/** /**
* get the thick - 厚. * get the delStatus - 状态:0未删除,1已删除.
* @return the thick * @return the delStatus
*/ */
public BigDecimal getThick() { public Integer getDelStatus() {
return this.thick; return this.delStatus;
} }
/** /**
* set the thick - 厚. * set the delStatus - 状态:0未删除,1已删除.
* *
* @param thick - 厚 * @param delStatus - 状态:0未删除,1已删除
*/ */
public void setThick(BigDecimal thick) { public void setDelStatus(Integer delStatus) {
this.thick = thick; this.delStatus = delStatus;
} }
/** /**
* get the value from Map. * get the value from Map.
...@@ -992,8 +1098,11 @@ public class HPSC004 extends DaoEPBase { ...@@ -992,8 +1098,11 @@ public class HPSC004 extends DaoEPBase {
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode)); setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId)); setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_PRDT_NAME)), parentPrdtName)); setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARENT_PRDT_NAME)), parentPrdtName));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setProdutionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUTION_ORDER_NO)), produtionOrderNo));
setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TYPE)), type)); setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TYPE)), type));
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf)); setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf));
setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SORT)), sort)); setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SORT)), sort));
...@@ -1001,6 +1110,10 @@ public class HPSC004 extends DaoEPBase { ...@@ -1001,6 +1110,10 @@ public class HPSC004 extends DaoEPBase {
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType)); setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode)); setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num)); setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt)); setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt)); setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
...@@ -1014,19 +1127,16 @@ public class HPSC004 extends DaoEPBase { ...@@ -1014,19 +1127,16 @@ public class HPSC004 extends DaoEPBase {
setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate)); setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate));
setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum)); setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setActualCompletionUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_UNIT_WT)), actualCompletionUnitWt)); setActualCompletionUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_UNIT_WT)), actualCompletionUnitWt));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo)); setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setDelStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DEL_STATUS)), delStatus)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedTime(StringUtils.toString(map.get(FIELD_CREATED_TIME))); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedTime(StringUtils.toString(map.get(FIELD_UPDATED_TIME))); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setDelStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DEL_STATUS)), delStatus));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick));
} }
/** /**
...@@ -1041,8 +1151,11 @@ public class HPSC004 extends DaoEPBase { ...@@ -1041,8 +1151,11 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE))); map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID))); map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_PARENT_PRDT_NAME, StringUtils.toString(parentPrdtName, eiMetadata.getMeta(FIELD_PARENT_PRDT_NAME))); map.put(FIELD_PARENT_PRDT_NAME, StringUtils.toString(parentPrdtName, eiMetadata.getMeta(FIELD_PARENT_PRDT_NAME)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_PRODUTION_ORDER_NO, StringUtils.toString(produtionOrderNo, eiMetadata.getMeta(FIELD_PRODUTION_ORDER_NO)));
map.put(FIELD_TYPE, StringUtils.toString(type, eiMetadata.getMeta(FIELD_TYPE))); map.put(FIELD_TYPE, StringUtils.toString(type, eiMetadata.getMeta(FIELD_TYPE)));
map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF))); map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF)));
map.put(FIELD_SORT, StringUtils.toString(sort, eiMetadata.getMeta(FIELD_SORT))); map.put(FIELD_SORT, StringUtils.toString(sort, eiMetadata.getMeta(FIELD_SORT)));
...@@ -1050,6 +1163,10 @@ public class HPSC004 extends DaoEPBase { ...@@ -1050,6 +1163,10 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE))); map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE))); map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME))); map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM))); map.put(FIELD_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM)));
map.put(FIELD_UNIT_WT, StringUtils.toString(unitWt, eiMetadata.getMeta(FIELD_UNIT_WT))); map.put(FIELD_UNIT_WT, StringUtils.toString(unitWt, eiMetadata.getMeta(FIELD_UNIT_WT)));
map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT))); map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT)));
...@@ -1063,19 +1180,16 @@ public class HPSC004 extends DaoEPBase { ...@@ -1063,19 +1180,16 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_ACTUAL_COMPLETION_DATE, StringUtils.toString(actualCompletionDate, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_DATE))); map.put(FIELD_ACTUAL_COMPLETION_DATE, StringUtils.toString(actualCompletionDate, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_DATE)));
map.put(FIELD_ACTUAL_COMPLETION_NUM, StringUtils.toString(actualCompletionNum, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_NUM))); map.put(FIELD_ACTUAL_COMPLETION_NUM, StringUtils.toString(actualCompletionNum, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_NUM)));
map.put(FIELD_ACTUAL_COMPLETION_UNIT_WT, StringUtils.toString(actualCompletionUnitWt, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_UNIT_WT))); map.put(FIELD_ACTUAL_COMPLETION_UNIT_WT, StringUtils.toString(actualCompletionUnitWt, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_UNIT_WT)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO))); map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_DEL_STATUS, StringUtils.toString(delStatus, eiMetadata.getMeta(FIELD_DEL_STATUS))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME))); map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK))); map.put(FIELD_DEL_STATUS, StringUtils.toString(delStatus, eiMetadata.getMeta(FIELD_DEL_STATUS)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put("spec", StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width")));
map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick")));
return map; return map;
} }
......
package com.baosight.hpjx.hp.sc.domain; package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* Project: <br> * Project: <br>
...@@ -16,16 +17,16 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,16 +17,16 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-02-05 14:06:35 create * @history 2024-02-22 10:52:56 create
*/ */
public class HPSC005 extends DaoEPBase { public class HPSC005 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/ public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/ public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
...@@ -68,11 +69,11 @@ public class HPSC005 extends DaoEPBase { ...@@ -68,11 +69,11 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_FILE_PATH4 = "filePath4"; /* 文件地址4*/ public static final String FIELD_FILE_PATH4 = "filePath4"; /* 文件地址4*/
public static final String FIELD_FILE_PATH5 = "filePath5"; /* 文件地址5*/ public static final String FIELD_FILE_PATH5 = "filePath5"; /* 文件地址5*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/ public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/ public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/ public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
...@@ -115,17 +116,17 @@ public class HPSC005 extends DaoEPBase { ...@@ -115,17 +116,17 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_FILE_PATH4 = "FILE_PATH4"; /* 文件地址4*/ public static final String COL_FILE_PATH4 = "FILE_PATH4"; /* 文件地址4*/
public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/ public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/ public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String QUERY = "HPSC005.query"; public static final String QUERY = "HPSC005.query";
public static final String COUNT = "HPSC005.count"; public static final String COUNT = "HPSC005.count";
public static final String INSERT = "HPSC005.insert"; public static final String INSERT = "HPSC005.insert";
public static final String UPDATE = "HPSC005.update"; public static final String UPDATE = "HPSC005.update";
public static final String DELETE = "HPSC005.delete"; public static final String DELETE = "HPSC005.delete";
private Long id; private Long id;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String productionOrderNo = " "; /* 生产订单号*/ private String prodOrderNo = " "; /* 生产订单号*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private Integer prdtType; /* 产品类型*/ private Integer prdtType; /* 产品类型*/
...@@ -153,7 +154,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -153,7 +154,7 @@ public class HPSC005 extends DaoEPBase {
private String factoryName = " "; /* 厂区名称*/ private String factoryName = " "; /* 厂区名称*/
private String orgNo = " "; /* 生产组编码*/ private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/ private String orgName = " "; /* 生产组名称*/
private Boolean documentType; /* 单据类型 0-非子母单;1-子母单*/ private Integer documentType; /* 单据类型 0-非子母单;1-子母单*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private String remark1 = " "; /* 备注*/ private String remark1 = " "; /* 备注*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
...@@ -167,242 +168,242 @@ public class HPSC005 extends DaoEPBase { ...@@ -167,242 +168,242 @@ public class HPSC005 extends DaoEPBase {
private String filePath3 = " "; /* 文件地址3*/ private String filePath3 = " "; /* 文件地址3*/
private String filePath4 = " "; /* 文件地址4*/ private String filePath4 = " "; /* 文件地址4*/
private String filePath5 = " "; /* 文件地址5*/ private String filePath5 = " "; /* 文件地址5*/
private Long inventRecordId; /* 存货档案ID*/ private Long inventRecordId; /* 存货档案ID*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
public void initMetaData() { public void initMetaData() {
EiColumn eiColumn; EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID); eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true); eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE); eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO); eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号"); eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE); eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码"); eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME); eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE); eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("产品类型"); eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE); eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("产品编码"); eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME); eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("产品名称"); eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_LENGTH); eiColumn = new EiColumn(FIELD_PRDT_LENGTH);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-长"); eiColumn.setDescName("产品-长");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_WIDTH); eiColumn = new EiColumn(FIELD_PRDT_WIDTH);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-宽"); eiColumn.setDescName("产品-宽");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_THICK); eiColumn = new EiColumn(FIELD_PRDT_THICK);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-厚"); eiColumn.setDescName("产品-厚");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_SPEC); eiColumn = new EiColumn(FIELD_PRDT_SPEC);
eiColumn.setDescName("产品规格"); eiColumn.setDescName("产品规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_TYPE); eiColumn = new EiColumn(FIELD_PART_TYPE);
eiColumn.setDescName("零件类型"); eiColumn.setDescName("零件类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_CODE); eiColumn = new EiColumn(FIELD_PART_CODE);
eiColumn.setDescName("零件编码"); eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_NAME); eiColumn = new EiColumn(FIELD_PART_NAME);
eiColumn.setDescName("零件名称"); eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_LENGTH); eiColumn = new EiColumn(FIELD_PART_LENGTH);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-长"); eiColumn.setDescName("零件-长");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_WIDTH); eiColumn = new EiColumn(FIELD_PART_WIDTH);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-宽"); eiColumn.setDescName("零件-宽");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_THICK); eiColumn = new EiColumn(FIELD_PART_THICK);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12); eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-厚"); eiColumn.setDescName("零件-厚");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC); eiColumn = new EiColumn(FIELD_PART_SPEC);
eiColumn.setDescName("零件规格"); eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_COMPLETION_DATE); eiColumn = new EiColumn(FIELD_PLAN_COMPLETION_DATE);
eiColumn.setDescName("计划完成日期"); eiColumn.setDescName("计划完成日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NUM); eiColumn = new EiColumn(FIELD_NUM);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("计划数量"); eiColumn.setDescName("计划数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_WT); eiColumn = new EiColumn(FIELD_UNIT_WT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("计划单重"); eiColumn.setDescName("计划单重");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_WT); eiColumn = new EiColumn(FIELD_TOTAL_WT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("计划重量"); eiColumn.setDescName("计划重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ASSIGNED_NUM); eiColumn = new EiColumn(FIELD_ASSIGNED_NUM);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("已派工数量"); eiColumn.setDescName("已派工数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNASSIGNED_NUM); eiColumn = new EiColumn(FIELD_UNASSIGNED_NUM);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("待派工数量"); eiColumn.setDescName("待派工数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态:0.计划中,1.不分派工,2.全部派工"); eiColumn.setDescName("状态:0.计划中,1.不分派工,2.全部派工");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE); eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码"); eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME); eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称"); eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NO); eiColumn = new EiColumn(FIELD_ORG_NO);
eiColumn.setDescName("生产组编码"); eiColumn.setDescName("生产组编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NAME); eiColumn = new EiColumn(FIELD_ORG_NAME);
eiColumn.setDescName("生产组名称"); eiColumn.setDescName("生产组名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOCUMENT_TYPE); eiColumn = new EiColumn(FIELD_DOCUMENT_TYPE);
eiColumn.setDescName("单据类型 0-非子母单;1-子母单"); eiColumn.setDescName("单据类型 0-非子母单;1-子母单");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK); eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK1); eiColumn = new EiColumn(FIELD_REMARK1);
eiColumn.setDescName("备注"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME); eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称"); eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY); eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人"); eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME); eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称"); eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH1); eiColumn = new EiColumn(FIELD_FILE_PATH1);
eiColumn.setDescName("文件地址1"); eiColumn.setDescName("文件地址1");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH2); eiColumn = new EiColumn(FIELD_FILE_PATH2);
eiColumn.setDescName("文件地址2"); eiColumn.setDescName("文件地址2");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH3); eiColumn = new EiColumn(FIELD_FILE_PATH3);
eiColumn.setDescName("文件地址3"); eiColumn.setDescName("文件地址3");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH4); eiColumn = new EiColumn(FIELD_FILE_PATH4);
eiColumn.setDescName("文件地址4"); eiColumn.setDescName("文件地址4");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH5); eiColumn = new EiColumn(FIELD_FILE_PATH5);
eiColumn.setDescName("文件地址5"); eiColumn.setDescName("文件地址5");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID); eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案ID"); eiColumn.setDescName("存货档案ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor. * the constructor.
*/ */
public HPSC005() { public HPSC005() {
initMetaData(); initMetaData();
} }
/** /**
* get the id . * get the id .
* @return the id * @return the id
...@@ -410,7 +411,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -410,7 +411,7 @@ public class HPSC005 extends DaoEPBase {
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
/** /**
* set the id . * set the id .
* *
...@@ -426,7 +427,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -426,7 +427,7 @@ public class HPSC005 extends DaoEPBase {
public String getCompanyCode() { public String getCompanyCode() {
return this.companyCode; return this.companyCode;
} }
/** /**
* set the companyCode - 企业编码 预留. * set the companyCode - 企业编码 预留.
* *
...@@ -442,7 +443,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -442,7 +443,7 @@ public class HPSC005 extends DaoEPBase {
public String getDepCode() { public String getDepCode() {
return this.depCode; return this.depCode;
} }
/** /**
* set the depCode - 部门编码. * set the depCode - 部门编码.
* *
...@@ -452,20 +453,20 @@ public class HPSC005 extends DaoEPBase { ...@@ -452,20 +453,20 @@ public class HPSC005 extends DaoEPBase {
this.depCode = depCode; this.depCode = depCode;
} }
/** /**
* get the productionOrderNo - 生产订单号. * get the prodOrderNo - 生产订单号.
* @return the productionOrderNo * @return the prodOrderNo
*/ */
public String getProductionOrderNo() { public String getProdOrderNo() {
return this.productionOrderNo; return this.prodOrderNo;
} }
/** /**
* set the productionOrderNo - 生产订单号. * set the prodOrderNo - 生产订单号.
* *
* @param productionOrderNo - 生产订单号 * @param prodOrderNo - 生产订单号
*/ */
public void setProductionOrderNo(String productionOrderNo) { public void setProdOrderNo(String prodOrderNo) {
this.productionOrderNo = productionOrderNo; this.prodOrderNo = prodOrderNo;
} }
/** /**
* get the projCode - 项目编码. * get the projCode - 项目编码.
...@@ -474,7 +475,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -474,7 +475,7 @@ public class HPSC005 extends DaoEPBase {
public String getProjCode() { public String getProjCode() {
return this.projCode; return this.projCode;
} }
/** /**
* set the projCode - 项目编码. * set the projCode - 项目编码.
* *
...@@ -490,7 +491,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -490,7 +491,7 @@ public class HPSC005 extends DaoEPBase {
public String getProjName() { public String getProjName() {
return this.projName; return this.projName;
} }
/** /**
* set the projName - 项目名称. * set the projName - 项目名称.
* *
...@@ -506,7 +507,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -506,7 +507,7 @@ public class HPSC005 extends DaoEPBase {
public Integer getPrdtType() { public Integer getPrdtType() {
return this.prdtType; return this.prdtType;
} }
/** /**
* set the prdtType - 产品类型. * set the prdtType - 产品类型.
* *
...@@ -522,7 +523,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -522,7 +523,7 @@ public class HPSC005 extends DaoEPBase {
public String getPrdtCode() { public String getPrdtCode() {
return this.prdtCode; return this.prdtCode;
} }
/** /**
* set the prdtCode - 产品编码. * set the prdtCode - 产品编码.
* *
...@@ -538,7 +539,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -538,7 +539,7 @@ public class HPSC005 extends DaoEPBase {
public String getPrdtName() { public String getPrdtName() {
return this.prdtName; return this.prdtName;
} }
/** /**
* set the prdtName - 产品名称. * set the prdtName - 产品名称.
* *
...@@ -554,7 +555,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -554,7 +555,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getPrdtLength() { public BigDecimal getPrdtLength() {
return this.prdtLength; return this.prdtLength;
} }
/** /**
* set the prdtLength - 产品-长. * set the prdtLength - 产品-长.
* *
...@@ -570,7 +571,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -570,7 +571,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getPrdtWidth() { public BigDecimal getPrdtWidth() {
return this.prdtWidth; return this.prdtWidth;
} }
/** /**
* set the prdtWidth - 产品-宽. * set the prdtWidth - 产品-宽.
* *
...@@ -586,7 +587,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -586,7 +587,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getPrdtThick() { public BigDecimal getPrdtThick() {
return this.prdtThick; return this.prdtThick;
} }
/** /**
* set the prdtThick - 产品-厚. * set the prdtThick - 产品-厚.
* *
...@@ -602,7 +603,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -602,7 +603,7 @@ public class HPSC005 extends DaoEPBase {
public String getPrdtSpec() { public String getPrdtSpec() {
return this.prdtSpec; return this.prdtSpec;
} }
/** /**
* set the prdtSpec - 产品规格. * set the prdtSpec - 产品规格.
* *
...@@ -618,7 +619,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -618,7 +619,7 @@ public class HPSC005 extends DaoEPBase {
public Integer getPartType() { public Integer getPartType() {
return this.partType; return this.partType;
} }
/** /**
* set the partType - 零件类型. * set the partType - 零件类型.
* *
...@@ -634,7 +635,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -634,7 +635,7 @@ public class HPSC005 extends DaoEPBase {
public String getPartCode() { public String getPartCode() {
return this.partCode; return this.partCode;
} }
/** /**
* set the partCode - 零件编码. * set the partCode - 零件编码.
* *
...@@ -650,7 +651,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -650,7 +651,7 @@ public class HPSC005 extends DaoEPBase {
public String getPartName() { public String getPartName() {
return this.partName; return this.partName;
} }
/** /**
* set the partName - 零件名称. * set the partName - 零件名称.
* *
...@@ -666,7 +667,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -666,7 +667,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getPartLength() { public BigDecimal getPartLength() {
return this.partLength; return this.partLength;
} }
/** /**
* set the partLength - 零件-长. * set the partLength - 零件-长.
* *
...@@ -682,7 +683,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -682,7 +683,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getPartWidth() { public BigDecimal getPartWidth() {
return this.partWidth; return this.partWidth;
} }
/** /**
* set the partWidth - 零件-宽. * set the partWidth - 零件-宽.
* *
...@@ -698,7 +699,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -698,7 +699,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getPartThick() { public BigDecimal getPartThick() {
return this.partThick; return this.partThick;
} }
/** /**
* set the partThick - 零件-厚. * set the partThick - 零件-厚.
* *
...@@ -714,7 +715,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -714,7 +715,7 @@ public class HPSC005 extends DaoEPBase {
public String getPartSpec() { public String getPartSpec() {
return this.partSpec; return this.partSpec;
} }
/** /**
* set the partSpec - 零件规格. * set the partSpec - 零件规格.
* *
...@@ -730,7 +731,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -730,7 +731,7 @@ public class HPSC005 extends DaoEPBase {
public String getPlanCompletionDate() { public String getPlanCompletionDate() {
return this.planCompletionDate; return this.planCompletionDate;
} }
/** /**
* set the planCompletionDate - 计划完成日期. * set the planCompletionDate - 计划完成日期.
* *
...@@ -746,7 +747,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -746,7 +747,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getNum() { public BigDecimal getNum() {
return this.num; return this.num;
} }
/** /**
* set the num - 计划数量. * set the num - 计划数量.
* *
...@@ -762,7 +763,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -762,7 +763,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getUnitWt() { public BigDecimal getUnitWt() {
return this.unitWt; return this.unitWt;
} }
/** /**
* set the unitWt - 计划单重. * set the unitWt - 计划单重.
* *
...@@ -778,7 +779,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -778,7 +779,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getTotalWt() { public BigDecimal getTotalWt() {
return this.totalWt; return this.totalWt;
} }
/** /**
* set the totalWt - 计划重量. * set the totalWt - 计划重量.
* *
...@@ -794,7 +795,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -794,7 +795,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getAssignedNum() { public BigDecimal getAssignedNum() {
return this.assignedNum; return this.assignedNum;
} }
/** /**
* set the assignedNum - 已派工数量. * set the assignedNum - 已派工数量.
* *
...@@ -810,7 +811,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -810,7 +811,7 @@ public class HPSC005 extends DaoEPBase {
public BigDecimal getUnassignedNum() { public BigDecimal getUnassignedNum() {
return this.unassignedNum; return this.unassignedNum;
} }
/** /**
* set the unassignedNum - 待派工数量. * set the unassignedNum - 待派工数量.
* *
...@@ -826,7 +827,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -826,7 +827,7 @@ public class HPSC005 extends DaoEPBase {
public Integer getStatus() { public Integer getStatus() {
return this.status; return this.status;
} }
/** /**
* set the status - 状态:0.计划中,1.不分派工,2.全部派工. * set the status - 状态:0.计划中,1.不分派工,2.全部派工.
* *
...@@ -842,7 +843,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -842,7 +843,7 @@ public class HPSC005 extends DaoEPBase {
public String getFactoryCode() { public String getFactoryCode() {
return this.factoryCode; return this.factoryCode;
} }
/** /**
* set the factoryCode - 厂区编码. * set the factoryCode - 厂区编码.
* *
...@@ -858,7 +859,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -858,7 +859,7 @@ public class HPSC005 extends DaoEPBase {
public String getFactoryName() { public String getFactoryName() {
return this.factoryName; return this.factoryName;
} }
/** /**
* set the factoryName - 厂区名称. * set the factoryName - 厂区名称.
* *
...@@ -874,7 +875,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -874,7 +875,7 @@ public class HPSC005 extends DaoEPBase {
public String getOrgNo() { public String getOrgNo() {
return this.orgNo; return this.orgNo;
} }
/** /**
* set the orgNo - 生产组编码. * set the orgNo - 生产组编码.
* *
...@@ -890,7 +891,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -890,7 +891,7 @@ public class HPSC005 extends DaoEPBase {
public String getOrgName() { public String getOrgName() {
return this.orgName; return this.orgName;
} }
/** /**
* set the orgName - 生产组名称. * set the orgName - 生产组名称.
* *
...@@ -903,16 +904,16 @@ public class HPSC005 extends DaoEPBase { ...@@ -903,16 +904,16 @@ public class HPSC005 extends DaoEPBase {
* get the documentType - 单据类型 0-非子母单;1-子母单. * get the documentType - 单据类型 0-非子母单;1-子母单.
* @return the documentType * @return the documentType
*/ */
public Boolean getDocumentType() { public Integer getDocumentType() {
return this.documentType; return this.documentType;
} }
/** /**
* set the documentType - 单据类型 0-非子母单;1-子母单. * set the documentType - 单据类型 0-非子母单;1-子母单.
* *
* @param documentType - 单据类型 0-非子母单;1-子母单 * @param documentType - 单据类型 0-非子母单;1-子母单
*/ */
public void setDocumentType(Boolean documentType) { public void setDocumentType(Integer documentType) {
this.documentType = documentType; this.documentType = documentType;
} }
/** /**
...@@ -922,7 +923,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -922,7 +923,7 @@ public class HPSC005 extends DaoEPBase {
public String getRemark() { public String getRemark() {
return this.remark; return this.remark;
} }
/** /**
* set the remark - 备注. * set the remark - 备注.
* *
...@@ -938,7 +939,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -938,7 +939,7 @@ public class HPSC005 extends DaoEPBase {
public String getRemark1() { public String getRemark1() {
return this.remark1; return this.remark1;
} }
/** /**
* set the remark1 - 备注. * set the remark1 - 备注.
* *
...@@ -954,7 +955,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -954,7 +955,7 @@ public class HPSC005 extends DaoEPBase {
public String getCreatedBy() { public String getCreatedBy() {
return this.createdBy; return this.createdBy;
} }
/** /**
* set the createdBy - 创建人. * set the createdBy - 创建人.
* *
...@@ -970,7 +971,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -970,7 +971,7 @@ public class HPSC005 extends DaoEPBase {
public String getCreatedName() { public String getCreatedName() {
return this.createdName; return this.createdName;
} }
/** /**
* set the createdName - 创建人名称. * set the createdName - 创建人名称.
* *
...@@ -986,7 +987,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -986,7 +987,7 @@ public class HPSC005 extends DaoEPBase {
public String getCreatedTime() { public String getCreatedTime() {
return this.createdTime; return this.createdTime;
} }
/** /**
* set the createdTime - 创建时间. * set the createdTime - 创建时间.
* *
...@@ -1002,7 +1003,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1002,7 +1003,7 @@ public class HPSC005 extends DaoEPBase {
public String getUpdatedBy() { public String getUpdatedBy() {
return this.updatedBy; return this.updatedBy;
} }
/** /**
* set the updatedBy - 更新人. * set the updatedBy - 更新人.
* *
...@@ -1018,7 +1019,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1018,7 +1019,7 @@ public class HPSC005 extends DaoEPBase {
public String getUpdatedName() { public String getUpdatedName() {
return this.updatedName; return this.updatedName;
} }
/** /**
* set the updatedName - 更新人名称. * set the updatedName - 更新人名称.
* *
...@@ -1034,7 +1035,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1034,7 +1035,7 @@ public class HPSC005 extends DaoEPBase {
public String getUpdatedTime() { public String getUpdatedTime() {
return this.updatedTime; return this.updatedTime;
} }
/** /**
* set the updatedTime - 更新时间. * set the updatedTime - 更新时间.
* *
...@@ -1050,7 +1051,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1050,7 +1051,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath1() { public String getFilePath1() {
return this.filePath1; return this.filePath1;
} }
/** /**
* set the filePath1 - 文件地址1. * set the filePath1 - 文件地址1.
* *
...@@ -1066,7 +1067,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1066,7 +1067,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath2() { public String getFilePath2() {
return this.filePath2; return this.filePath2;
} }
/** /**
* set the filePath2 - 文件地址2. * set the filePath2 - 文件地址2.
* *
...@@ -1082,7 +1083,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1082,7 +1083,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath3() { public String getFilePath3() {
return this.filePath3; return this.filePath3;
} }
/** /**
* set the filePath3 - 文件地址3. * set the filePath3 - 文件地址3.
* *
...@@ -1098,7 +1099,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1098,7 +1099,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath4() { public String getFilePath4() {
return this.filePath4; return this.filePath4;
} }
/** /**
* set the filePath4 - 文件地址4. * set the filePath4 - 文件地址4.
* *
...@@ -1114,7 +1115,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1114,7 +1115,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath5() { public String getFilePath5() {
return this.filePath5; return this.filePath5;
} }
/** /**
* set the filePath5 - 文件地址5. * set the filePath5 - 文件地址5.
* *
...@@ -1130,7 +1131,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1130,7 +1131,7 @@ public class HPSC005 extends DaoEPBase {
public Long getInventRecordId() { public Long getInventRecordId() {
return this.inventRecordId; return this.inventRecordId;
} }
/** /**
* set the inventRecordId - 存货档案ID. * set the inventRecordId - 存货档案ID.
* *
...@@ -1146,11 +1147,11 @@ public class HPSC005 extends DaoEPBase { ...@@ -1146,11 +1147,11 @@ public class HPSC005 extends DaoEPBase {
*/ */
@Override @Override
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo)); setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType)); setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
...@@ -1178,7 +1179,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1178,7 +1179,7 @@ public class HPSC005 extends DaoEPBase {
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo)); setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName)); setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
setDocumentType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DOCUMENT_TYPE)), documentType)); setDocumentType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOCUMENT_TYPE)), documentType));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK1)), remark1)); setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK1)), remark1));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
...@@ -1194,18 +1195,18 @@ public class HPSC005 extends DaoEPBase { ...@@ -1194,18 +1195,18 @@ public class HPSC005 extends DaoEPBase {
setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH5)), filePath5)); setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH5)), filePath5));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId)); setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
} }
/** /**
* set the value to Map. * set the value to Map.
*/ */
@Override @Override
public Map toMap() { public Map toMap() {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO))); map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE))); map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
...@@ -1248,7 +1249,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1248,7 +1249,7 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_FILE_PATH4, StringUtils.toString(filePath4, eiMetadata.getMeta(FIELD_FILE_PATH4))); map.put(FIELD_FILE_PATH4, StringUtils.toString(filePath4, eiMetadata.getMeta(FIELD_FILE_PATH4)));
map.put(FIELD_FILE_PATH5, StringUtils.toString(filePath5, eiMetadata.getMeta(FIELD_FILE_PATH5))); map.put(FIELD_FILE_PATH5, StringUtils.toString(filePath5, eiMetadata.getMeta(FIELD_FILE_PATH5)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID))); map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
return map; return map;
} }
} }
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -27,58 +27,61 @@ import org.apache.commons.lang.StringUtils; ...@@ -27,58 +27,61 @@ import org.apache.commons.lang.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import cn.hutool.core.bean.BeanUtil;
/** /**
* *
*/ */
public class ServiceHPSC002 extends ServiceBase { public class ServiceHPSC002 extends ServiceBase {
/**
/** * 画面初始化
* 画面初始化. *
*/ * @param inInfo
public EiInfo initLoad(EiInfo inInfo) { * @return
try { */
Map<String, Object> map = new HashMap<>(); public EiInfo initLoad(EiInfo inInfo) {
map.put("itemCode","ITEM_CODE in ('2','3','4')"); try {
CommonMethod.initBlock(inInfo, Map<String, Object> map = new HashMap<>();
Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID,DdynamicEnum.CODESET_CODE_BLOCK_ID),map, map.put("itemCode", "ITEM_CODE in ('2','3','4')");
false); CommonMethod.initBlock(inInfo,
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002().eiMetadata); Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID, DdynamicEnum.CODESET_CODE_BLOCK_ID), map,
} catch (Exception e) { false);
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002().eiMetadata);
} } catch (Exception e) {
return inInfo; LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo;
}
/**
* 查询操作. /**
*/ * 查询操作.
@Override */
public EiInfo query(EiInfo inInfo) { @Override
/* 调用EI查询方法.*/ public EiInfo query(EiInfo inInfo) {
EiInfo outInfo = super.query(inInfo, "HPSC002.query", new HPSC002()); try {
//调用本地服务 inInfo = super.query(inInfo, "HPSC002.query", new HPSC002());
// EiInfo eiInfo_update = new EiInfo(); } catch (Exception e) {
// eiInfo_update.set(EiConstant.serviceName, "HPSC002"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
// eiInfo_update.set(EiConstant.methodName, "delete"); }
// EiBlock eiBlock_update = new EiBlock(EiConstant.resultBlock); return inInfo;
// EiInfo outInfo_update = XLocalManager.call(eiInfo_update); }
return outInfo;
/**
} * 新增操作.
*/
/** @Override
* 新增操作. public EiInfo insert(EiInfo inInfo) {
*/ try {
@Override HPSC002 hppz002 = new HPSC002();
public EiInfo insert(EiInfo inInfo) { EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
try { for (int i = 0; i < eiBlock.getRowCount(); i++) {
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); hppz002.fromMap(map);
hppz002.setLeaf("1"); hppz002.setLeaf("1");
...@@ -104,7 +107,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -104,7 +107,7 @@ public class ServiceHPSC002 extends ServiceBase {
DaoUtils.insert("HPSC002.insert", hppz002.toMap()); DaoUtils.insert("HPSC002.insert", hppz002.toMap());
if (!hppz002.getParentId().equals("root")) { if (!hppz002.getParentId().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentId())); this.checkTreeNodeLeaf(hppz002.getParentId());
} }
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -143,52 +146,67 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -143,52 +146,67 @@ public class ServiceHPSC002 extends ServiceBase {
DaoUtils.update("HPSC002.update", hppz002.toMap()); DaoUtils.update("HPSC002.update", hppz002.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
} catch (PlatException e) { } catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!"); inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage()); inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage()); logError("修改失败", e.getMessage());
return inInfo; return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map);
this.dao.delete("HPSC002.delete", hppz002.toMap());
this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
//TODO 删除时 修改树结构
this.checkTreeNodeLeaf(new Long(hppz002.getId()));
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); return query(inInfo);
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
/** /**
* 指定树节点 * 删除操作
* @param inInfo *
* @return * @param inInfo
*/ * @return
public EiInfo queryTreeRoot(EiInfo inInfo) { */
Long projId = NumberUtils.toLong(inInfo.get("projId")); public EiInfo delete(EiInfo inInfo) {
Map queryMap = new HashMap(); try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 删除之前数据校验
for (Map resultRow : resultRows) {
HPSC002 fSc002 = new HPSC002();
fSc002.fromMap(resultRow);
// 存在子节点不能删除
List<HPSC002> dbSc002s = HPSCTools.HpSc002.queryByParent(fSc002.getId().toString());
AssertUtils.isNotEmpty(dbSc002s, String.format("部件[%s]已存在子节点不能删除", fSc002.getPrdtName()));
// 计划生产中不能删除
HPSC004 dbSc004 = HPSCTools.HpSc004.queryByMat(fSc002.getId());
AssertUtils.isTrue(dbSc004 != null && StringUtils.isNotBlank(dbSc004.getProdOrderNo()),
String.format("部件[%s]已派工不能删除", fSc002.getPrdtName()));
}
// 删除数据
for (Map resultRow : resultRows) {
HPSC002 fSc002 = new HPSC002();
fSc002.fromMap(resultRow);
DaoUtils.update("HPSC002.delete", fSc002);
// 修改父级节点状态是叶子节点或非叶子节点
this.checkTreeNodeLeaf(fSc002.getParentId());
// 修改节点状态是叶子节点或非叶子节点
this.checkTreeNodeLeaf(fSc002.getId().toString());
// 同步删除生产计划
HPSCTools.HpSc004.deleteByMat(fSc002.getId());
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 指定树节点
*
* @param inInfo
* @return
*/
public EiInfo queryTreeRoot(EiInfo inInfo) {
Long projId = NumberUtils.toLong(inInfo.get("projId"));
Map queryMap = new HashMap();
String root = ""; String root = "";
if (projId != null) { if (projId != null) {
Map map = new HashMap(); Map map = new HashMap();
...@@ -219,44 +237,42 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -219,44 +237,42 @@ public class ServiceHPSC002 extends ServiceBase {
queryMap.put("projCode", projCode); queryMap.put("projCode", projCode);
} }
} }
//2 查询节点 //2 查询节点
List rows = dao.query("HPSC002.queryTree", queryMap); List rows = dao.query("HPSC002.queryTree", queryMap);
//3 增加节点block块 //3 增加节点block块
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
EiBlock outBlock = outInfo.addBlock(BeanUtil.isEmpty(pEname) ? "" : pEname); EiBlock outBlock = outInfo.addBlock(BeanUtil.isEmpty(pEname) ? "" : pEname);
outBlock.addRows(rows); outBlock.addRows(rows);
return outInfo; return outInfo;
} }
/** /**
* 修改父级节点的LEAF状态为1 * 修改节点状态,是叶子或非叶子节点
* *
* @param id * @param id
*/ */
public void checkTreeNodeLeaf(String id) {
public void checkTreeNodeLeaf(Long id) { //1 获取参数
EiInfo eiInfo = new EiInfo(); Map queryMap = new HashMap();
//1 获取参数 queryMap.put("id", id);
Map queryMap = new HashMap(); List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap);
queryMap.put("id", id); if (rows.size() > 0) {
List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap); queryMap.put("leaf", "0");
if(rows.size() > 0){ } else {
queryMap.put("leaf", "0"); queryMap.put("leaf", "1");
}else{ }
queryMap.put("leaf", "1"); DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
} }
DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
} /**
* 提交 撤回.
/** */
* 提交 撤回. public EiInfo check(EiInfo eiInfo) {
*/ HPSC002 hppz002 = new HPSC002();
public EiInfo check(EiInfo eiInfo) { EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
HPSC002 hppz002 = new HPSC002(); try {
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); for (int i = 0; i < eiBlock.getRowCount(); i++) {
try { Map<?, ?> map = eiBlock.getRow(i);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); hppz002.fromMap(map);
//限制一下,如果二级已经提交通过,这个时候不允许进行撤回 //限制一下,如果二级已经提交通过,这个时候不允许进行撤回
if(map.get("status").equals("0")) { if(map.get("status").equals("0")) {
...@@ -282,7 +298,6 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -282,7 +298,6 @@ public class ServiceHPSC002 extends ServiceBase {
if (num == 0) { if (num == 0) {
map2.put("status",1); map2.put("status",1);
map2.put("id",THPSC002.getParentId()); map2.put("id",THPSC002.getParentId());
// 自动生成生产计划 // 自动生成生产计划
this.autoPlanInfo(THPSC002.getParentId()); this.autoPlanInfo(THPSC002.getParentId());
} else { } else {
...@@ -327,110 +342,71 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -327,110 +342,71 @@ public class ServiceHPSC002 extends ServiceBase {
eiInfo.setMsg("提交成功!"); eiInfo.setMsg("提交成功!");
return eiInfo; return eiInfo;
} }
/** /**
* 绑定附件 * 绑定附件
*/ *
public EiInfo bindDocIdById(EiInfo eiInfo) { * @param inInfo
HPSC002 hppz002 = new HPSC002(); * @return
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); */
try { public EiInfo bindDocIdById(EiInfo inInfo) {
for (int i = 0; i < eiBlock.getRowCount(); i++) { EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
Map<?, ?> map = eiBlock.getRow(i); try {
hppz002.fromMap(map); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map sqlMap = new HashMap(); for (Map resultRow : resultRows) {
sqlMap.put("id",hppz002.getId()); HPSC002 fSc002 = new HPSC002();
sqlMap.put("filePath1",hppz002.getFilePath1()); fSc002.fromMap(resultRow);
sqlMap.put("bizType","WL"); Map sqlMap = new HashMap();
DaoUtils.update("HPSC002.bindDocIdById", hppz002.toMap()); sqlMap.put("id", fSc002.getId());
} sqlMap.put("filePath1", fSc002.getFilePath1());
} catch (PlatException e) { sqlMap.put("bizType", "WL");
eiInfo.setStatus(EiConstant.STATUS_FAILURE); DaoUtils.update("HPSC002.bindDocIdById", fSc002.toMap());
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); }
eiInfo.setDetailMsg(e.getMessage()); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
logError("删除失败!", e.getMessage()); inInfo.setMsg("操作成功!");
return eiInfo; } catch (Exception e) {
} LogUtils.setDetailMsg(inInfo, e, "操作失败");
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); }
eiInfo.setMsg("删除成功!"); return inInfo;
return eiInfo; }
}
/**
* 生成生产计划
/** *
* 生产生产计划 * @param id 生产ID
* @param id 生产ID */
*/ public void autoPlanInfo(String id) {
public void autoPlanInfo(String id) { String planNo;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); HPSC002 dbSc002 = HPSCTools.HpSc002.get(Long.parseLong(id));
HPSC002 dbSc002 = (HPSC002) dao.get("HPSC002.queryEntityByParentPrtdCode","id",id); // 生成生产计划t_hpsc003,如果已存在就不新增
String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO); HPSC003 dbSc003 = HPSCTools.HpSc003.queryByMat(dbSc002.getId());
// 生成生产计划t_hpsc003,如果已存在就不新增 if (dbSc003 == null) {
Map queryMap = new HashMap(); planNo = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
queryMap.put("matId", dbSc002.getId()); HPSC003 newSc003 = BeanUtils.copy(dbSc002, HPSC003.class);
List<HPSC003> dbSc003s = dao.query(HPSC003.QUERY, queryMap); newSc003.setPlanInfoNo(planNo);
if (CollectionUtils.isEmpty(dbSc003s)) { newSc003.setMatId(dbSc002.getId());
HPSC003 HPSC003 = new HPSC003(); newSc003.setStatus(HPConstant.planStatus.S_0);
HPSC003.setCompanyCode(""); DaoUtils.insert(HPSC003.INSERT, newSc003);
HPSC003.setProjType(null); } else {
HPSC003.setProjCode(dbSc002.getProjCode()); planNo = dbSc003.getPlanInfoNo();
HPSC003.setProjName(dbSc002.getProjName()); // 更新主计划状态为"计划中"
HPSC003.setPlanInfoNo(SCJHD); HPSCTools.HpSc003.updateStatus(dbSc003.getId(), HPConstant.planStatus.S_0);
HPSC003.setInventRecordId(dbSc002.getInventRecordId()); }
HPSC003.setPrdtType(dbSc002.getPrdtType());
HPSC003.setPrdtCode(dbSc002.getPrdtCode());
HPSC003.setPrdtName(dbSc002.getPrdtName());
HPSC003.setSpec(dbSc002.getSpec());
HPSC003.setLength(dbSc002.getLength());
HPSC003.setWidth(dbSc002.getWidth());
HPSC003.setThick(dbSc002.getThick());
HPSC003.setRemark(dbSc002.getRemark());
HPSC003.setPlanCompletionDate("");
HPSC003.setStatus(0);
HPSC003.setMatId(dbSc002.getId());
DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
}
// 生产计划详情 // 生产计划详情
queryMap = new HashMap(); List<HPSC002> dbSc002Children = HPSCTools.HpSc002.queryByParent(id);
queryMap.put("parentId", id); for (HPSC002 dbSc002Child : dbSc002Children) {
List<HPSC002> rows = this.dao.query("HPSC002.queryEntityByParentPrtdCode", queryMap); // 明细已存在就不在新增
for (int i = 0; i < rows.size(); i++) { HPSC004 dbSc004 = HPSCTools.HpSc004.queryByMat(dbSc002Child.getId());
HPSC002 dbSc002Child = rows.get(i); if (dbSc004 != null) {
// 明细已存在就不在新增 continue;
queryMap = new HashMap(); }
queryMap.put("filePath1", dbSc002Child.getId()); HPSC004 newSc004 = BeanUtils.copy(dbSc002Child, HPSC004.class);
List<HPSC004> dbSc004s = dao.query(HPSC004.QUERY, queryMap); newSc004.setParentId(planNo);
if (CollectionUtils.isNotEmpty(dbSc004s)) { newSc004.setMatId(dbSc002Child.getId());
continue; newSc004.setFilePath1(dbSc002Child.getId().toString());
} newSc004.setDelStatus(CommonConstant.YesNo.NO_0);
HPSC004 HPSC004 = new HPSC004(); DaoUtils.insert(HPSC004.INSERT, newSc004);
HPSC004.setCompanyCode(""); }
HPSC004.setDeptCode("");
HPSC004.setProjCode(dbSc002Child.getProjCode());
HPSC004.setProjName(dbSc002Child.getProjName());
HPSC004.setParentId(SCJHD);
HPSC004.setParentPrdtName(dbSc002Child.getParentPrdtName());
HPSC004.setInventRecordId(dbSc002Child.getInventRecordId());
HPSC004.setPrdtType(dbSc002Child.getPrdtType());
HPSC004.setPrdtCode(dbSc002Child.getPrdtCode());
HPSC004.setPrdtName(dbSc002Child.getPrdtName());
HPSC004.setSpec(dbSc002Child.getSpec());
HPSC004.setLength(dbSc002Child.getLength());
HPSC004.setWidth(dbSc002Child.getWidth());
HPSC004.setThick(dbSc002Child.getThick());
HPSC004.setRemark(dbSc002Child.getRemark());
HPSC004.setNum(dbSc002Child.getNum());
HPSC004.setUnitWt(dbSc002Child.getUnitWt());
HPSC004.setTotalWt(dbSc002Child.getTotalWt());
HPSC004.setFilePath1(dbSc002Child.getId().toString());
HPSC004.setPlanCommentDate("");
HPSC004.setPlanCompletionDate("");
HPSC004.setActualCompletionNum(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionUnitWt(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionDate("");
HPSC004.setDelStatus(0);
DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
}
} }
......
...@@ -2,13 +2,20 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -2,13 +2,20 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants; import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC003; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -52,8 +59,6 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -52,8 +59,6 @@ public class ServiceHPSC003 extends ServiceBase {
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
HPSC003 HPSC003 = new HPSC003();
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC003.query", new HPSC003()); EiInfo outInfo = super.query(inInfo, "HPSC003.query", new HPSC003());
EiBlock blcok = outInfo.addBlock(HPConstants.BLOCK_DETAIL); EiBlock blcok = outInfo.addBlock(HPConstants.BLOCK_DETAIL);
blcok.setBlockMeta(new HPSC004().eiMetadata); blcok.setBlockMeta(new HPSC004().eiMetadata);
...@@ -118,79 +123,39 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -118,79 +123,39 @@ public class ServiceHPSC003 extends ServiceBase {
} }
return query(inInfo); return query(inInfo);
} }
public EiInfo updateHPSC0004(EiInfo inInfo) { /**
try { * 修改计划明细
HPSC004 HPSC004 = new HPSC004(); *
EiBlock eiBlock = inInfo.getBlock("detail"); * @param inInfo
for (int i = 0; i < eiBlock.getRowCount(); i++) { * @return
Map<?, ?> map = eiBlock.getRow(i); */
HPSC004.fromMap(map); public EiInfo updatePlanDetail(EiInfo inInfo) {
DaoUtils.update("HPSC004.updateHPSC0004", HPSC004.toMap());
List list = this.dao.query("HPSC004.query", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getProjCode());
put("parentId",HPSC004.getParentId());
put("planCommentDate"," ");
put("planCompletionDate"," ");
}});
if (list.size() == 0) {
List<HPSC004> list1 = this.dao.query("HPSC004.queryDate", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getProjCode());
put("parentId",HPSC004.getParentId());
}});
HPSC003 HPSC003 = new HPSC003();
HPSC003.setCompanyCode(HPSC004.getCompanyCode());
HPSC003.setProjCode(HPSC004.getProjCode());
HPSC003.setPlanInfoNo(HPSC004.getParentId());
HPSC003.setPlanCompletionDate(list1.get(0).getPlanCompletionDate());
DaoUtils.update("HPSC003.updateDate", HPSC003.toMap());
}
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
inInfo.set("parentId", HPSC004.getParentId());
inInfo.set(EiConstant.serviceName, "HPSC004");
inInfo.set(EiConstant.methodName, "queryDetail");
EiInfo detailInfo = XLocalManager.call(inInfo);
inInfo.getBlock("detail").setRows(detailInfo.getBlock("detail").getRows());
inInfo.getBlock(EiConstant.resultBlock).setRows(query(inInfo).getBlock(EiConstant.resultBlock).getRows());
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPSC003 HPSC003 = new HPSC003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(CommonConstant.Field.DETAIL).getRows();
Map<?, ?> map = eiBlock.getRow(i); String parentId = null;
HPSC003.fromMap(map); for (Map resultRow : resultRows) {
this.dao.delete("HPSC003.delete", HPSC003.toMap()); HPSC004 fSc004 = new HPSC004();
fSc004.fromMap(resultRow);
} parentId = fSc004.getParentId();
} catch (PlatException e) { // 更新计划明细完工时间
eiInfo.setStatus(EiConstant.STATUS_FAILURE); fSc004.setPlanCommentDate(DateUtils.formatShort(fSc004.getPlanCommentDate()));
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); fSc004.setPlanCompletionDate(DateUtils.formatShort(fSc004.getPlanCompletionDate()));
eiInfo.setDetailMsg(e.getMessage()); DaoUtils.update(HPSqlConstant.HPSC004.UPDATE_PLAN_DATE, fSc004);
logError("删除失败!", e.getMessage()); }
return eiInfo; // 更新主计划完工时间
List<HPSC004> dbSc004s = HPSCTools.HpSc004.queryByParent(parentId);
String maxPlanCompletionDate = dbSc004s.stream().map(HPSC004::getPlanCompletionDate).max(String::compareTo)
.orElse("");
HPSCTools.HpSc003.updateDate(parentId, maxPlanCompletionDate);
// 刷新明细数据
inInfo.getBlock(CommonConstant.Field.DETAIL).setRows(dbSc004s);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
} }
return inInfo;
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
/**下· /**下·
...@@ -199,79 +164,80 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -199,79 +164,80 @@ public class ServiceHPSC003 extends ServiceBase {
* @return * @return
*/ */
public EiInfo getInfo(EiInfo eiInfo) { public EiInfo getInfo(EiInfo eiInfo) {
Map map = new HashMap(); Map map = new HashMap();
String id = eiInfo.get("id").toString(); String id = eiInfo.get("id").toString();
map.put("id", id); map.put("id", id);
HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query","id",id); HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query", "id", id);
eiInfo.set("model",HPSC003); eiInfo.set("model", HPSC003);
return eiInfo; return eiInfo;
}
/**
* 提交生产计划
* @param eiInfo
* @return
*/
public EiInfo checkHPSC0003(EiInfo eiInfo) {
try {
Map map = new HashMap();
String id = eiInfo.get("id").toString();
map.put("id", id);
HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query","id",id);
HPSC003.setStatus(1);
DaoUtils.update("HPSC003.update", HPSC003.toMap());
//生成生产订单
HashMap params = new HashMap();
params.put("parentId",HPSC003.getPlanInfoNo());
List list = dao.query("HPSC004.queryDetail",params,0,-999999);
for (int i = 0; i < list.size(); i ++) {
HPSC004 HPSC004 = (HPSC004) list.get(i);
HPSC005 HPSC005 = new HPSC005();
String SCDD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC005_PROD_NO);
HPSC005.setProjCode(HPSC003.getProjCode());
HPSC005.setProjName(HPSC003.getProjName());
HPSC005.setProductionOrderNo(SCDD);
HPSC005.setInventRecordId(HPSC004.getInventRecordId());
HPSC005.setPrdtType(HPSC003.getPrdtType());
HPSC005.setPrdtCode(HPSC003.getPrdtCode());
HPSC005.setPrdtName(HPSC003.getPrdtName());
HPSC005.setPrdtLength(HPSC003.getLength());
HPSC005.setPrdtWidth(HPSC003.getWidth());
HPSC005.setPrdtThick(HPSC003.getThick());
HPSC005.setPrdtSpec(HPSC003.getSpec());
HPSC005.setRemark(HPSC003.getRemark());
HPSC005.setPartType(HPSC004.getPrdtType());
HPSC005.setPartCode(HPSC004.getPrdtCode());
HPSC005.setPartName(HPSC004.getPrdtName());
HPSC005.setPartLength(HPSC004.getLength());
HPSC005.setPartWidth(HPSC004.getWidth());
HPSC005.setPartThick(HPSC004.getThick());
HPSC005.setPartSpec(HPSC004.getSpec());
HPSC005.setRemark1(HPSC004.getRemark());
HPSC005.setPlanCompletionDate(HPSC004.getPlanCompletionDate());
HPSC005.setNum(HPSC004.getNum());
HPSC005.setUnitWt(HPSC004.getUnitWt());
HPSC005.setTotalWt(HPSC004.getTotalWt());
HPSC005.setStatus(0);
HPSC005.setFilePath1(HPSC004.getFilePath1());
DaoUtils.insert("HPSC005.insert", HPSC005.toMap());
HPSC004.setProductionOrderNo(SCDD);
DaoUtils.update("HPSC004.update", HPSC004.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("提交失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("提交失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
return eiInfo;
} }
/** /**
* 提交生产计划
*
* @param inInfo
* @return
*/
public EiInfo submitPlan(EiInfo inInfo) {
try {
Long id = Long.parseLong(inInfo.getString("id"));
HPSC003 dbSc003 = HPSCTools.HpSc003.get(id);
// 查询计划子项
List<HPSC004> dbSc004s = HPSCTools.HpSc004.queryByParent(dbSc003.getPlanInfoNo());
for (HPSC004 dbSc004 : dbSc004s) {
// 已经生成订单的计划不在重复生成
if (StringUtils.isNotBlank(dbSc004.getProdOrderNo())) {
continue;
}
// 生成任务订单
HPSC005 newSc005 = this.addSc005(dbSc003, dbSc004);
// 回填订单号
dbSc004.setProdOrderNo(newSc005.getProdOrderNo());
DaoUtils.update(HPSqlConstant.HPSC004.UPDATE_PROD_ORDER_NO, dbSc004.toMap());
}
// 修改计划状态
HPSCTools.HpSc003.updateStatus(id, HPConstant.planStatus.S_1);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("提交成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "提交失败");
}
return inInfo;
}
/**
* 生成任务订单
*
* @param dbSc003
* @param dbSc004
*/
private HPSC005 addSc005(HPSC003 dbSc003, HPSC004 dbSc004) {
HPSC005 newSc005 = BeanUtils.copy(dbSc003, HPSC005.class);
newSc005.setProdOrderNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC005_PROD_NO));
newSc005.setPrdtLength(dbSc003.getLength());
newSc005.setPrdtWidth(dbSc003.getWidth());
newSc005.setPrdtThick(dbSc003.getThick());
newSc005.setPrdtSpec(dbSc003.getSpec());
newSc005.setInventRecordId(dbSc004.getInventRecordId());
newSc005.setPartType(dbSc004.getPrdtType());
newSc005.setPartCode(dbSc004.getPrdtCode());
newSc005.setPartName(dbSc004.getPrdtName());
newSc005.setPartLength(dbSc004.getLength());
newSc005.setPartWidth(dbSc004.getWidth());
newSc005.setPartThick(dbSc004.getThick());
newSc005.setPartSpec(dbSc004.getSpec());
newSc005.setRemark1(dbSc004.getRemark());
newSc005.setPlanCompletionDate(dbSc004.getPlanCompletionDate());
newSc005.setNum(dbSc004.getNum());
newSc005.setUnitWt(dbSc004.getUnitWt());
newSc005.setTotalWt(dbSc004.getTotalWt());
newSc005.setFilePath1(dbSc004.getFilePath1());
newSc005.setStatus(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPSC005.INSERT, newSc005);
return newSc005;
}
/**
* 部件下拉框 * 部件下拉框
* *
* @param inInfo * @param inInfo
......
...@@ -81,7 +81,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -81,7 +81,7 @@ public class ServiceHPSC005A extends ServiceBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail"); Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo"); String prodOrderNo = MapUtils.getString(detailMap, "prodOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 生产任务号 // 生产任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo"); List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
...@@ -121,7 +121,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -121,7 +121,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param fSc005a * @param fSc005a
*/ */
private void add(HPSC005 dbSc005, HPSC005A fSc005a) { private void add(HPSC005 dbSc005, HPSC005A fSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo(); String prodOrderNo = dbSc005.getProdOrderNo();
// 数据校验 // 数据校验
AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区"); AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区");
AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组"); AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组");
...@@ -145,7 +145,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -145,7 +145,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param mapSc005a * @param mapSc005a
*/ */
private void modify(HPSC005 dbSc005, HPSC005A fSc005a, Map<String, HPSC005A> mapSc005a) { private void modify(HPSC005 dbSc005, HPSC005A fSc005a, Map<String, HPSC005A> mapSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo(); String prodOrderNo = dbSc005.getProdOrderNo();
// 数据校验 // 数据校验
HPSC005A dbSc005a = mapSc005a.get(fSc005a.getProdTaskNo()); HPSC005A dbSc005a = mapSc005a.get(fSc005a.getProdTaskNo());
AssertUtils.isGt(dbSc005a.getCompleteNum(), fSc005a.getNum(), AssertUtils.isGt(dbSc005a.getCompleteNum(), fSc005a.getNum(),
...@@ -168,7 +168,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -168,7 +168,7 @@ public class ServiceHPSC005A extends ServiceBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail"); Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo"); String prodOrderNo = MapUtils.getString(detailMap, "prodOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A(); HPSC005A fSc005a = new HPSC005A();
...@@ -220,14 +220,15 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -220,14 +220,15 @@ public class ServiceHPSC005A extends ServiceBase {
// 校验主订单是否已分派 // 校验主订单是否已分派
HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId)); HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId));
AssertUtils.isTrue(!ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus()), AssertUtils.isTrue(!ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus()),
String.format("生产订单[%s]已分派,不能在进行批量分派,请检查!", dbSc005.getProductionOrderNo())); String.format("生产订单[%s]已分派,不能在进行批量分派,请检查!", dbSc005.getProdOrderNo()));
HPSC005A newSc005a = new HPSC005A();
// 更新订单主表数量 // 更新订单主表数量
HPSCTools.checkAssignedNum(dbSc005.getProductionOrderNo(), dbSc005.getNum()); HPSCTools.checkAssignedNum(dbSc005.getProdOrderNo(), dbSc005.getNum());
// 写入子表数据 // 写入子表数据
HPSC005A newSc005a = new HPSC005A();
newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO, newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO,
new String[]{dbSc005.getProductionOrderNo()})); new String[]{dbSc005.getProdOrderNo()}));
newSc005a.setProdOrderNo(dbSc005.getProductionOrderNo()); newSc005a.setProdOrderNo(dbSc005.getProdOrderNo());
newSc005a.setNum(dbSc005.getNum()); newSc005a.setNum(dbSc005.getNum());
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt())); newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
newSc005a.setOrgNo(dbPz011.getGroupCode()); newSc005a.setOrgNo(dbPz011.getGroupCode());
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-11 11:34:26
Version : 1.0
tableName :hpjx.t_hpsc002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
DEPT_CODE VARCHAR NOT NULL,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PARENT_ID VARCHAR,
PARENT_PRDT_NAME VARCHAR,
TYPE VARCHAR NOT NULL,
LEAF VARCHAR NOT NULL,
SORT VARCHAR NOT NULL,
ICON VARCHAR NOT NULL,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
NUM INTEGER NOT NULL,
UNIT_WT DECIMAL NOT NULL,
TOTAL_WT DECIMAL NOT NULL,
FILE_PATH1 VARCHAR,
FILE_PATH2 VARCHAR,
FILE_PATH3 VARCHAR,
FILE_PATH4 VARCHAR,
FILE_PATH5 VARCHAR,
STATUS TINYINT,
DEL_STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
REMARK VARCHAR
-->
<sqlMap namespace="HPSC002"> <sqlMap namespace="HPSC002">
<select id="query" parameterClass="java.util.HashMap" <sql id="column">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002"> ID as "id",
SELECT COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
ID as "id", DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PARENT_ID as "parentId", <!-- 父节点-部件编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 -->
PARENT_ID as "parentId", <!-- 父节点-部件编码 --> TYPE as "type", <!-- 类别 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 --> LEAF as "leaf", <!-- 是否有叶子节点 -->
TYPE as "type", <!-- 类别 --> SORT as "sort", <!-- 排序字段 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> ICON as "icon", <!-- 图片地址 -->
SORT as "sort", <!-- 排序字段 --> PRDT_TYPE as "prdtType",
ICON as "icon", <!-- 图片地址 --> PRDT_CODE as "prdtCode", <!-- 部件编码 -->
PRDT_TYPE as "prdtType", PRDT_NAME as "prdtName", <!-- 部件名称 -->
PRDT_CODE as "prdtCode", <!-- 部件编码 --> INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
PRDT_NAME as "prdtName", <!-- 部件名称 --> NUM as "num", <!-- 数量 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> UNIT_WT as "unitWt", <!-- 单重 -->
NUM as "num", <!-- 数量 --> TOTAL_WT as "totalWt", <!-- 总重 -->
UNIT_WT as "unitWt", <!-- 单重 --> FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
TOTAL_WT as "totalWt", <!-- 总重 --> FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 --> FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 --> FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 --> FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 --> STATUS as "status", <!-- 状态 0-未提交,1-已提交 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 --> DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
STATUS as "status", <!-- 状态 0-未提交,1-已提交 --> CREATED_BY as "createdBy", <!-- 创建人 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
CREATED_BY as "createdBy", <!-- 创建人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> REMARK as "remark", <!-- 备注 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> LV as "lv",
REMARK as "remark", <!-- 备注 --> SPEC as "spec",
LV as "lv", LENGTH as "length", <!-- 长 -->
SPEC as "spec", WIDTH as "width", <!-- 宽 -->
LENGTH as "length", <!-- 长 --> THICK as "thick" <!-- 厚 -->
WIDTH as "width", <!-- 宽 --> </sql>
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE 1=1 <sql id="condition">
AND PARENT_ID NOT IN ('root') <isNotEmpty prepend=" AND " property="id">
AND DEL_STATUS = 0 ID = #id#
<isNotEmpty prepend=" AND " property="id"> </isNotEmpty>
ID = #id# <isNotEmpty prepend=" AND " property="parentId">
</isNotEmpty> PARENT_ID = #parentId#
<isNotEmpty prepend=" AND " property="parentId"> </isNotEmpty>
PARENT_ID = #parentId# <isNotEmpty prepend=" AND " property="prdtType">
</isNotEmpty> PRDT_TYPE = #prdtType#
<isNotEmpty prepend=" AND " property="prdtType"> </isNotEmpty>
PRDT_TYPE = #prdtType# <isNotEmpty prepend=" AND " property="prdtCode">
</isNotEmpty> PRDT_CODE = #prdtCode#
<isNotEmpty prepend=" AND " property="prdtCode"> </isNotEmpty>
PRDT_CODE = #prdtCode# <isNotEmpty prepend=" AND " property="prdtName">
</isNotEmpty> PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
<isNotEmpty prepend=" AND " property="prdtName"> </isNotEmpty>
PRDT_NAME LIKE ('%$#prdtName#$%') <isNotEmpty prepend=" AND " property="inventRecordId">
</isNotEmpty> INVENT_RECORD_ID = #inventRecordId#
<isNotEmpty prepend=" AND " property="inventRecordId"> </isNotEmpty>
INVENT_RECORD_ID = #inventRecordId# <isNotEmpty prepend=" AND " property="projName">
</isNotEmpty> PROJ_NAME LIKE CONCAT('%', #projName#, '%')
<isNotEmpty prepend=" AND " property="projName"> </isNotEmpty>
PROJ_NAME LIKE ('%$projName$%') <isNotEmpty prepend=" AND " property="status">
</isNotEmpty> STATUS = #status#
<isNotEmpty prepend=" AND " property="status"> </isNotEmpty>
STATUS = #status# <isNotEmpty prepend=" AND " property="lv">
</isNotEmpty> LV = #lv#
<isNotEmpty prepend=" AND " property="lv"> </isNotEmpty>
LV = #lv# </sql>
</isNotEmpty>
ORDER BY ID DESC <sql id="order">
<!-- <dynamic prepend="ORDER BY">--> <dynamic prepend="ORDER BY">
<!-- <isEmpty property="orderBy">--> <isNotEmpty property="order">
<!-- CREATED_TIME DESC--> $order$
<!-- </isEmpty>--> </isNotEmpty>
<!-- </dynamic>--> <isEmpty property="order">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT
<include refid="column"/>
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<include refid="condition"/>
<include refid="order"/>
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1 SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="id"> <include refid="condition"/>
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="lv">
LV = #lv#
</isNotEmpty>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="type">
TYPE = #type#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaf">
LEAF = #leaf#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sort">
SORT = #sort#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="icon">
ICON = #icon#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWt">
UNIT_WT = #unitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus">
DEL_STATUS = #delStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_hpsc002 (ID, INSERT INTO hpjx.t_hpsc002 (ID,
...@@ -269,56 +134,56 @@ ...@@ -269,56 +134,56 @@
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK <!-- 厚 --> THICK <!-- 厚 -->
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#,
#unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#,
#delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#,
#length#, #width#, #thick#) #length#, #width#, #thick#)
</insert> </insert>
<!-- 删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpsc002 WHERE DELETE FROM hpjx.t_hpsc002 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_hpsc002 UPDATE hpjx.t_hpsc002
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#, <!-- 部门编码 预留 --> DEPT_CODE = #deptCode#, <!-- 部门编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PARENT_ID = #parentId#, <!-- 父节点-部件编码 --> PARENT_ID = #parentId#, <!-- 父节点-部件编码 -->
PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-部件名称 --> PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-部件名称 -->
TYPE = #type#, <!-- 类别 --> TYPE = #type#, <!-- 类别 -->
LEAF = #leaf#, <!-- 是否有叶子节点 --> LEAF = #leaf#, <!-- 是否有叶子节点 -->
SORT = #sort#, <!-- 排序字段 --> SORT = #sort#, <!-- 排序字段 -->
ICON = #icon#, <!-- 图片地址 --> ICON = #icon#, <!-- 图片地址 -->
PRDT_CODE = #prdtCode#, <!-- 部件编码 --> PRDT_CODE = #prdtCode#, <!-- 部件编码 -->
PRDT_TYPE = #prdtType#, PRDT_TYPE = #prdtType#,
PRDT_NAME = #prdtName#, <!-- 部件名称 --> PRDT_NAME = #prdtName#, <!-- 部件名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID --> INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
NUM = #num#, <!-- 数量 --> NUM = #num#, <!-- 数量 -->
UNIT_WT = #unitWt#, <!-- 单重 --> UNIT_WT = #unitWt#, <!-- 单重 -->
TOTAL_WT = #totalWt#, <!-- 总重 --> TOTAL_WT = #totalWt#, <!-- 总重 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 --> FILE_PATH1 = #filePath1#, <!-- 文件地址1 -->
FILE_PATH2 = #filePath2#, <!-- 文件地址2 --> FILE_PATH2 = #filePath2#, <!-- 文件地址2 -->
FILE_PATH3 = #filePath3#, <!-- 文件地址3 --> FILE_PATH3 = #filePath3#, <!-- 文件地址3 -->
FILE_PATH4 = #filePath4#, <!-- 文件地址4 --> FILE_PATH4 = #filePath4#, <!-- 文件地址4 -->
FILE_PATH5 = #filePath5#, <!-- 文件地址5 --> FILE_PATH5 = #filePath5#, <!-- 文件地址5 -->
STATUS = #status#, <!-- 状态 0-未提交,1-已提交 --> STATUS = #status#, <!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 --> DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
SPEC = #spec#, <!-- 规格 --> SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick# <!-- 厚 --> THICK = #thick# <!-- 厚 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
...@@ -354,100 +219,33 @@ ...@@ -354,100 +219,33 @@
ORDER BY CREATED_TIME DESC ORDER BY CREATED_TIME DESC
</select> </select>
<select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap"> <!-- 根据父级ID查询 -->
SELECT <select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap">
ID as "id", SELECT
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> <include refid="column"/>
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> FROM hpjx.t_hpsc002
PROJ_CODE as "projCode", <!-- 项目编码 --> WHERE 1 = 1
PROJ_NAME as "projName", <!-- 项目名称 --> <isNotEmpty prepend=" AND " property="id">
PARENT_ID as "parentId", <!-- 父节点-部件编码 --> PARENT_ID = #id#
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 --> </isNotEmpty>
TYPE as "type", <!-- 类别 --> <isNotEmpty prepend=" AND " property="projCode">
LEAF as "leaf", <!-- 是否有叶子节点 --> PROJ_CODE = #projCode#
SORT as "sort", <!-- 排序字段 --> </isNotEmpty>
ICON as "icon", <!-- 图片地址 --> </select>
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 部件编码 -->
PRDT_NAME as "prdtName", <!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
STATUS as "status", <!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
PARENT_ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="queryEntityByParentPrtdCode" parameterClass="java.util.HashMap" <!-- 根据父级ID查询 -->
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002"> <select id="queryEntityByParentPrtdCode" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT SELECT
ID as "id", <include refid="column"/>
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> FROM HPJX.T_HPSC002
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> WHERE 1 = 1
PROJ_CODE as "projCode", <!-- 项目编码 --> <isNotEmpty prepend=" AND " property="id">
PROJ_NAME as "projName", <!-- 项目名称 --> ID = #id#
PARENT_ID as "parentId", <!-- 父节点-部件编码 --> </isNotEmpty>
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 --> <isNotEmpty prepend=" AND " property="parentId">
TYPE as "type", <!-- 类别 --> PARENT_ID = #parentId#
LEAF as "leaf", <!-- 是否有叶子节点 --> </isNotEmpty>
SORT as "sort", <!-- 排序字段 --> </select>
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 部件编码 -->
PRDT_NAME as "prdtName", <!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
STATUS as "status", <!-- 状态 0-未提交,1-已提交 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</select>
<update id="updateTreeNodeLeaf"> <update id="updateTreeNodeLeaf">
UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE ID = #id# UPDATE hpjx.t_hpsc002 SET LEAF = #leaf# WHERE ID = #id#
...@@ -510,4 +308,4 @@ ...@@ -510,4 +308,4 @@
</isNotEmpty> </isNotEmpty>
</select> </select>
</sqlMap> </sqlMap>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC003"> <sqlMap namespace="HPSC003">
<sql id="condition"> <sql id="condition">
...@@ -59,6 +59,13 @@ ...@@ -59,6 +59,13 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003">
SELECT SELECT
...@@ -195,12 +202,17 @@ ...@@ -195,12 +202,17 @@
UPDATE hpjx.T_HPSC003 UPDATE hpjx.T_HPSC003
SET SET
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> <include refid="updateRevise"/>
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE PLAN_INFO_NO = #planInfoNo#
WHERE
COMPANY_CODE = #companyCode#
AND PROJ_CODE = #projCode#
AND PLAN_INFO_NO = #planInfoNo#
</update> </update>
<!-- 修改状态 -->
<update id="updateStatus">
UPDATE hpjx.T_HPSC003
SET
STATUS = #status#,
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
</sqlMap> </sqlMap>
...@@ -2,112 +2,182 @@ ...@@ -2,112 +2,182 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC004"> <sqlMap namespace="HPSC004">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
MAT_ID as "matId", <!-- 材料ID -->
PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
SPEC as "spec", <!-- 规格 -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PLAN_COMMENT_DATE as "planCommentDate", <!-- 计划开始时间 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT as "actualCompletionUnitWt", <!-- 实际完工重量 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 项目档案ID -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
REMARK as "remark", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEL_STATUS as "delStatus" <!-- 状态:0未删除,1已删除 -->
</sql>
<sql id="condition"> <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode"> <isNotEmpty prepend=" AND " property="deptCode">
DEPT_CODE = #deptCode# DEPT_CODE = #deptCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME = #projName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="matId">
PARENT_ID = #parentId# MAT_ID = #matId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_PRDT_NAME = #parentPrdtName# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="type"> <isNotEmpty prepend=" AND " property="parentPrdtName">
TYPE = #type# PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="leaf"> <isNotEmpty prepend=" AND " property="prodOrderNo">
LEAF = #leaf# PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="sort"> <isNotEmpty prepend=" AND " property="type">
SORT = #sort# TYPE = #type#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="icon"> <isNotEmpty prepend=" AND " property="leaf">
ICON = #icon# LEAF = #leaf#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="sort">
PRDT_TYPE = #prdtType# SORT = #sort#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode"> <isNotEmpty prepend=" AND " property="icon">
PRDT_CODE = #prdtCode# ICON = #icon#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_NAME = #prdtName# PRDT_TYPE = #prdtType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="num"> <isNotEmpty prepend=" AND " property="prdtCode">
NUM = #num# PRDT_CODE = #prdtCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWt"> <isNotEmpty prepend=" AND " property="prdtName">
UNIT_WT = #unitWt# PRDT_NAME = #prdtName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt"> <isNotEmpty prepend=" AND " property="length">
TOTAL_WT = #totalWt# LENGTH = #length#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1"> <isNotEmpty prepend=" AND " property="width">
FILE_PATH1 = #filePath1# WIDTH = #width#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2"> <isNotEmpty prepend=" AND " property="thick">
FILE_PATH2 = #filePath2# THICK = #thick#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3"> <isNotEmpty prepend=" AND " property="spec">
FILE_PATH3 = #filePath3# SPEC = #spec#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4"> <isNotEmpty prepend=" AND " property="num">
FILE_PATH4 = #filePath4# NUM = #num#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5"> <isNotEmpty prepend=" AND " property="unitWt">
FILE_PATH5 = #filePath5# UNIT_WT = #unitWt#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planCommentDate"> <isNotEmpty prepend=" AND " property="totalWt">
PLAN_COMMENT_DATE = #planCommentDate# TOTAL_WT = #totalWt#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate"> <isNotEmpty prepend=" AND " property="filePath1">
PLAN_COMPLETION_DATE = #planCompletionDate# FILE_PATH1 = #filePath1#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionDate"> <isNotEmpty prepend=" AND " property="filePath2">
ACTUAL_COMPLETION_DATE = #actualCompletionDate# FILE_PATH2 = #filePath2#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionNum"> <isNotEmpty prepend=" AND " property="filePath3">
ACTUAL_COMPLETION_NUM = #actualCompletionNum# FILE_PATH3 = #filePath3#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionUnitWt"> <isNotEmpty prepend=" AND " property="filePath4">
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt# FILE_PATH4 = #filePath4#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="filePath5">
PRODUCTION_ORDER_NO = #productionOrderNo# FILE_PATH5 = #filePath5#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="planCommentDate">
STATUS = #status# PLAN_COMMENT_DATE = #planCommentDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus"> <isNotEmpty prepend=" AND " property="planCompletionDate">
DEL_STATUS = #delStatus# PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="actualCompletionDate">
CREATED_BY = #createdBy# ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="actualCompletionNum">
CREATED_TIME = #createdTime# ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy"> <isNotEmpty prepend=" AND " property="actualCompletionUnitWt">
UPDATED_BY = #updatedBy# ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="inventRecordId">
UPDATED_TIME = #updatedTime# INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="remark"> <isNotEmpty prepend=" AND " property="status">
REMARK = #remark# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus">
DEL_STATUS = #delStatus#
</isNotEmpty>
</sql> </sql>
<!-- 公共修改字段 --> <!-- 公共修改字段 -->
...@@ -117,174 +187,139 @@ ...@@ -117,174 +187,139 @@
UPDATED_TIME = #updatedTime# <!-- 修改时间 --> UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <sql id="order">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> <dynamic prepend="ORDER BY">
SELECT <isNotEmpty property="order">
ID as "id", $order$
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> </isNotEmpty>
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> <isEmpty property="order">
PROJ_CODE as "projCode", <!-- 项目编码 --> ID asc
PROJ_NAME as "projName", <!-- 项目名称 --> </isEmpty>
PARENT_ID as "parentId", <!-- 父节点-产品编码 --> </dynamic>
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> </sql>
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PLAN_COMMENT_DATE as "planCommentDate", <!-- 计划开始时间 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT as "actualCompletionUnitWt", <!-- 实际完工重量 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.T_HPSC004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select> <select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT
<include refid="column"/>
FROM hpjx.T_HPSC004
WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1 SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.T_HPSC004 (ID, INSERT INTO hpjx.T_HPSC004 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 --> DEPT_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PARENT_ID, <!-- 父节点-产品编码 --> MAT_ID, <!-- 材料ID -->
PARENT_PRDT_NAME, <!-- 父节点-产品名称 --> PARENT_ID, <!-- 父节点-产品编码 -->
TYPE, <!-- 类别 --> PARENT_PRDT_NAME, <!-- 父节点-产品名称 -->
LEAF, <!-- 是否有叶子节点 --> PROD_ORDER_NO, <!-- 生产订单号 -->
SORT, <!-- 排序字段 --> TYPE, <!-- 类别 -->
ICON, <!-- 图片地址 --> LEAF, <!-- 是否有叶子节点 -->
INVENT_RECORD_ID, SORT, <!-- 排序字段 -->
SPEC, ICON, <!-- 图片地址 -->
LENGTH, <!-- 长 --> PRDT_TYPE, <!-- 产品类型 -->
WIDTH, <!-- 宽 --> PRDT_CODE, <!-- 产品编码 -->
THICK, <!-- 厚 --> PRDT_NAME, <!-- 产品名称 -->
PRDT_TYPE, LENGTH, <!-- 长 -->
PRDT_CODE, <!-- 产品编码 --> WIDTH, <!-- 宽 -->
PRDT_NAME, <!-- 产品名称 --> THICK, <!-- 厚 -->
NUM, <!-- 数量 --> SPEC, <!-- 规格 -->
UNIT_WT, <!-- 单重 --> NUM, <!-- 数量 -->
TOTAL_WT, <!-- 总重 --> UNIT_WT, <!-- 单重 -->
FILE_PATH1, <!-- 文件地址1 --> TOTAL_WT, <!-- 总重 -->
FILE_PATH2, <!-- 文件地址2 --> FILE_PATH1, <!-- 文件地址1 -->
FILE_PATH3, <!-- 文件地址3 --> FILE_PATH2, <!-- 文件地址2 -->
FILE_PATH4, <!-- 文件地址4 --> FILE_PATH3, <!-- 文件地址3 -->
FILE_PATH5, <!-- 文件地址5 --> FILE_PATH4, <!-- 文件地址4 -->
PLAN_COMMENT_DATE, <!-- 计划开始时间 --> FILE_PATH5, <!-- 文件地址5 -->
PLAN_COMPLETION_DATE, <!-- 计划结束时间 --> PLAN_COMMENT_DATE, <!-- 计划开始时间 -->
ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 --> PLAN_COMPLETION_DATE, <!-- 计划结束时间 -->
ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 --> ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_UNIT_WT, <!-- 实际完工重量 --> ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 -->
STATUS, <!-- 状态 0-未审核,1-已审核 --> ACTUAL_COMPLETION_UNIT_WT, <!-- 实际完工重量 -->
DEL_STATUS, <!-- 状态 1未删除,0已删除 --> INVENT_RECORD_ID, <!-- 项目档案ID -->
CREATED_BY, <!-- 创建人 --> STATUS, <!-- 状态 0-未审核,1-已审核 -->
CREATED_TIME, <!-- 创建时间 --> REMARK, <!-- 备注 -->
UPDATED_BY, <!-- 更新人 --> CREATED_BY, <!-- 创建人 -->
UPDATED_TIME, <!-- 更新时间 --> CREATED_NAME, <!-- 创建人名称 -->
REMARK <!-- 备注 --> CREATED_TIME, <!-- 创建时间 -->
) DEL_STATUS <!-- 状态:0未删除,1已删除 -->
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, ) VALUES (
#type#, #leaf#, #sort#, #icon#,#inventRecordId#,#spec#, #length#, #width#, #thick#,#prdtType#, #prdtCode#, #prdtName#, #companyCode#, #deptCode#, #projCode#, #projName#, #matId#, #parentId#, #parentPrdtName#,
#num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #prodOrderNo#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#,
#planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #prdtName#, #length#, #width#, #thick#, #spec#, #num#, #unitWt#, #totalWt#, #filePath1#,
#actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#,
#updatedTime#, #remark#) #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #inventRecordId#,
</insert> #status#, #remark#, #createdBy#, #createdName#, #createdTime#, #delStatus#
)
</insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.T_HPSC004 WHERE DELETE FROM hpjx.T_HPSC004 WHERE ID = #id#
ID = #id#
</delete> </delete>
<!-- 根据材料号删除 -->
<delete id="deleteByMat">
DELETE FROM hpjx.T_HPSC004 WHERE MAT_ID = #matId#
</delete>
<update id="update"> <update id="update">
UPDATE hpjx.T_HPSC004 UPDATE hpjx.T_HPSC004
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
DEPT_CODE = #deptCode#, <!-- 部门编码 预留 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PARENT_ID = #parentId#, <!-- 父节点-产品编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-产品名称 -->
PARENT_ID = #parentId#, <!-- 父节点-产品编码 --> TYPE = #type#, <!-- 类别 -->
PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-产品名称 --> LEAF = #leaf#, <!-- 是否有叶子节点 -->
TYPE = #type#, <!-- 类别 --> SORT = #sort#, <!-- 排序字段 -->
LEAF = #leaf#, <!-- 是否有叶子节点 --> ICON = #icon#, <!-- 图片地址 -->
SORT = #sort#, <!-- 排序字段 --> PRDT_TYPE = #prdtType#,
ICON = #icon#, <!-- 图片地址 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_TYPE = #prdtType#, PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 --> NUM = #num#, <!-- 数量 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> UNIT_WT = #unitWt#, <!-- 单重 -->
NUM = #num#, <!-- 数量 --> TOTAL_WT = #totalWt#, <!-- 总重 -->
UNIT_WT = #unitWt#, <!-- 单重 --> FILE_PATH1 = #filePath1#, <!-- 文件地址1 -->
TOTAL_WT = #totalWt#, <!-- 总重 --> FILE_PATH2 = #filePath2#, <!-- 文件地址2 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 --> FILE_PATH3 = #filePath3#, <!-- 文件地址3 -->
FILE_PATH2 = #filePath2#, <!-- 文件地址2 --> FILE_PATH4 = #filePath4#, <!-- 文件地址4 -->
FILE_PATH3 = #filePath3#, <!-- 文件地址3 --> FILE_PATH5 = #filePath5#, <!-- 文件地址5 -->
FILE_PATH4 = #filePath4#, <!-- 文件地址4 --> PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 -->
FILE_PATH5 = #filePath5#, <!-- 文件地址5 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 -->
PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 --> ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 --> ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 --> ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#, <!-- 实际完工重量 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 --> PROD_ORDER_NO = #prodOrderNo#, <!-- 生产订单号 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#, <!-- 实际完工重量 --> STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 --> DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> REMARK = #remark#, <!-- 备注 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> SPEC = #spec#, <!-- 规格 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> LENGTH = #length#, <!-- 长 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> WIDTH = #width#, <!-- 宽 -->
REMARK = #remark#, <!-- 备注 --> THICK = #thick# <!-- 厚 -->
SPEC = #spec#, <!-- 规格 --> WHERE ID = #id#
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick# <!-- 厚 -->
WHERE
ID = #id#
</update> </update>
<update id="updateHPSC0004"> <!-- 更新计划时间 -->
UPDATE hpjx.T_HPSC004 <update id="updatePlanDate">
SET UPDATE hpjx.T_HPSC004
PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 --> SET
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 --> PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> <include refid="updateRevise"/>
WHERE WHERE ID = #id#
ID = #id#
</update> </update>
<!-- 更新完成数量、重量、时间 --> <!-- 更新完成数量、重量、时间 -->
...@@ -298,52 +333,23 @@ ...@@ -298,52 +333,23 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<select id="queryDetail" parameterClass="java.util.HashMap" <!-- 更新订单号 -->
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> <update id="updateProdOrderNo">
SELECT UPDATE hpjx.T_HPSC004
ID as "id", SET
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> PROD_ORDER_NO = #prodOrderNo#,
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> <include refid="updateRevise"/>
PROJ_CODE as "projCode", <!-- 项目编码 --> WHERE ID = #id#
PROJ_NAME as "projName", <!-- 项目名称 --> </update>
PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 --> <select id="queryDetail" parameterClass="java.util.HashMap"
TYPE as "type", <!-- 类别 --> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
LEAF as "leaf", <!-- 是否有叶子节点 --> SELECT
SORT as "sort", <!-- 排序字段 --> <include refid="column"/>
ICON as "icon", <!-- 图片地址 --> FROM hpjx.T_HPSC004
INVENT_RECORD_ID as "inventRecordId", WHERE 1=1
PRDT_TYPE as "prdtType", <include refid="condition"/>
PRDT_CODE as "prdtCode", <!-- 产品编码 --> </select>
PRDT_NAME as "prdtName", <!-- 产品名称 -->
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PLAN_COMMENT_DATE as "planCommentDate", <!-- 计划开始时间 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划结束时间 -->
ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT as "actualCompletionUnitWt", <!-- 实际完工重量 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
PRODUCTION_ORDER_NO as productionOrderNo
FROM hpjx.T_HPSC004 WHERE 1=1
<include refid="condition" />
</select>
<select id="inspectDetail" resultClass="int"> <select id="inspectDetail" resultClass="int">
SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1 SELECT COUNT(*) FROM hpjx.T_HPSC004 WHERE 1=1
...@@ -351,17 +357,15 @@ ...@@ -351,17 +357,15 @@
OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL ) OR PLAN_COMPLETION_DATE = '' OR PLAN_COMPLETION_DATE IS NULL )
</select> </select>
<update id="updateRK"> <update id="updateRK">
UPDATE hpjx.T_HPSC004 UPDATE hpjx.T_HPSC004
SET SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#, <!-- 实际完工重量 --> ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#, <!-- 实际完工重量 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> <include refid="updateRevise"/>
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE ID = #id#
WHERE </update>
ID = #id#
</update>
<!-- 行锁 --> <!-- 行锁 -->
<update id="lock"> <update id="lock">
...@@ -369,10 +373,10 @@ ...@@ -369,10 +373,10 @@
SET CREATED_TIME = CREATED_TIME SET CREATED_TIME = CREATED_TIME
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="prodOrderNo"> <isNotEmpty prepend=" AND " property="prodOrderNo">
PRODUCTION_ORDER_NO = #prodOrderNo# PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNos"> <isNotEmpty prepend=" AND " property="prodOrderNos">
PRODUCTION_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate> PROD_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate>
</isNotEmpty> </isNotEmpty>
</update> </update>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC005"> <sqlMap namespace="HPSC005">
<sql id="column"> <sql id="column">
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
INVENT_RECORD_ID as "inventRecordId", PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 部件编码 --> PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 部件名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 --> PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
NUM as "num", <!-- 计划数量 --> PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
UNIT_WT as "unitWt", <!-- 单重 --> PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
TOTAL_WT as "totalWt", <!-- 计划重量 --> PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
STATUS as "status", <!-- 状态 0-未派工,1-已派工 --> PART_TYPE as "partType", <!-- 零件类型 -->
ORG_NO as "orgNo", <!-- 生产组编码 --> PART_CODE as "partCode", <!-- 零件编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 --> PART_NAME as "partName", <!-- 零件名称 -->
CREATED_BY as "createdBy", <!-- 创建人 --> PART_LENGTH as "partLength", <!-- 零件-长 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> PART_WIDTH as "partWidth", <!-- 零件-宽 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> PART_THICK as "partThick", <!-- 零件-厚 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> PART_SPEC as "partSpec", <!-- 零件规格 -->
DEP_CODE as "depCode", <!-- 部门编码 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
REMARK as "remark", <!-- 备注 --> NUM as "num", <!-- 计划数量 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 --> UNIT_WT as "unitWt", <!-- 计划单重 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 --> TOTAL_WT as "totalWt", <!-- 计划重量 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 --> ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 --> UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 --> STATUS as "status", <!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
PRDT_SPEC as "prdtSpec", FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
PART_TYPE as "partType", FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
PART_CODE as "partCode", ORG_NO as "orgNo", <!-- 生产组编码 -->
PART_NAME as "partName", ORG_NAME as "orgName", <!-- 生产组名称 -->
PART_SPEC as "partSpec", DOCUMENT_TYPE as "documentType", <!-- 单据类型 0-非子母单;1-子母单 -->
REMARK1 as "remark1", REMARK as "remark", <!-- 备注 -->
PRDT_LENGTH as "prdtLength", <!-- 长 --> REMARK1 as "remark1", <!-- 备注 -->
PRDT_WIDTH as "prdtWidth", <!-- 宽 --> CREATED_BY as "createdBy", <!-- 创建人 -->
PRDT_THICK as "prdtThick", <!-- 厚 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
PART_LENGTH as "partLength", <!-- 长 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
PART_WIDTH as "partWidth", <!-- 宽 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
PART_THICK as "partThick", <!-- 厚 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 --> FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 --> FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 --> FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
DOCUMENT_TYPE as "documentType" <!-- 单据类型 0-非子母单;1-子母单 --> FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
INVENT_RECORD_ID as "inventRecordId" <!-- 存货档案ID -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -54,79 +57,64 @@ ...@@ -54,79 +57,64 @@
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="depCode">
PROJ_CODE like CONCAT('%', #projCode#, '%') DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%', #projName#, '%') PROJ_NAME like CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="prodOrderNo">
PRODUCTION_ORDER_NO LIKE CONCAT('%', #productionOrderNo#, '%') PROD_ORDER_NO LIKE CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode"> <isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode# PRDT_CODE = #prdtCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="partName"> <isNotEmpty prepend=" AND " property="partName">
PART_NAME LIKE CONCAT('%', #partName#, '%') PART_NAME LIKE CONCAT('%', #partName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE CONCAT('%', #prdtName#, '%') PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate"> <isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate# PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="num"> <isNotEmpty prepend=" AND " property="num">
NUM = #num# NUM = #num#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt"> <isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt# TOTAL_WT = #totalWt#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo"> <isNotEmpty prepend=" AND " property="orgNo">
ORG_NO like CONCAT('%', #orgNo#, '%') ORG_NO like CONCAT('%', #orgNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName"> <isNotEmpty prepend=" AND " property="orgName">
ORG_NAME like CONCAT('%', #orgName#, '%') ORG_NAME like CONCAT('%', #orgName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy# CREATED_BY = #createdBy#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime# CREATED_TIME = #createdTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy"> <isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy# UPDATED_BY = #updatedBy#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime# UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1"> <isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1# FILE_PATH1 = #filePath1#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
</sql> </sql>
<!-- 公共修改字段 --> <!-- 公共修改字段 -->
...@@ -136,151 +124,168 @@ ...@@ -136,151 +124,168 @@
UPDATED_TIME = #updatedTime# <!-- 修改时间 --> UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <sql id="order">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005"> <dynamic prepend="ORDER BY">
SELECT <isNotEmpty property="order">
<include refid="column"/> $order$
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1 </isNotEmpty>
<include refid="condition" /> <isEmpty property="order">
<dynamic prepend="ORDER BY"> ID asc
<isNotEmpty property="orderBy"> </isEmpty>
$orderBy$ </dynamic>
</isNotEmpty> </sql>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select> <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC005
WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC005 (ID, INSERT INTO ${hpjxSchema}.T_HPSC005 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> DEP_CODE, <!-- 部门编码 -->
PROJ_NAME, <!-- 项目名称 --> PROD_ORDER_NO, <!-- 生产订单号 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 --> PROJ_CODE, <!-- 项目编码 -->
INVENT_RECORD_ID, PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 部件编码 --> PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 部件名称 --> PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PRDT_LENGTH, <!-- 产品-长 -->
NUM, <!-- 计划数量 --> PRDT_WIDTH, <!-- 产品-宽 -->
UNIT_WT, PRDT_THICK, <!-- 产品-厚 -->
TOTAL_WT, <!-- 计划重量 --> PRDT_SPEC, <!-- 产品规格 -->
STATUS, <!-- 状态 0-未派工,1-已派工 --> PART_TYPE, <!-- 零件类型 -->
ORG_NO, <!-- 生产组编码 --> PART_CODE, <!-- 零件编码 -->
ORG_NAME, <!-- 生产组名称 --> PART_NAME, <!-- 零件名称 -->
CREATED_BY, <!-- 创建人 --> PART_LENGTH, <!-- 零件-长 -->
CREATED_TIME, <!-- 创建时间 --> PART_WIDTH, <!-- 零件-宽 -->
UPDATED_BY, <!-- 更新人 --> PART_THICK, <!-- 零件-厚 -->
UPDATED_TIME, <!-- 更新时间 --> PART_SPEC, <!-- 零件规格 -->
DEP_CODE, <!-- 部门编码 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
REMARK, <!-- 备注 --> NUM, <!-- 计划数量 -->
FILE_PATH1, <!-- 文件地址1 --> UNIT_WT, <!-- 计划单重 -->
FILE_PATH2, <!-- 文件地址2 --> TOTAL_WT, <!-- 计划重量 -->
FILE_PATH3, <!-- 文件地址3 --> ASSIGNED_NUM, <!-- 已派工数量 -->
FILE_PATH4, <!-- 文件地址4 --> UNASSIGNED_NUM, <!-- 待派工数量 -->
FILE_PATH5, <!-- 文件地址5 --> STATUS, <!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
PRDT_SPEC, FACTORY_CODE, <!-- 厂区编码 -->
PART_TYPE, FACTORY_NAME, <!-- 厂区名称 -->
PART_CODE, ORG_NO, <!-- 生产组编码 -->
PART_NAME, ORG_NAME, <!-- 生产组名称 -->
PART_SPEC, DOCUMENT_TYPE, <!-- 单据类型 0-非子母单;1-子母单 -->
REMARK1, REMARK, <!-- 备注 -->
PRDT_LENGTH, <!-- 长 --> REMARK1, <!-- 备注 -->
PRDT_WIDTH, <!-- 宽 --> CREATED_BY, <!-- 创建人 -->
PRDT_THICK, <!-- 厚 --> CREATED_NAME, <!-- 创建人名称 -->
PART_LENGTH, <!-- 长 --> CREATED_TIME, <!-- 创建时间 -->
PART_WIDTH, <!-- 宽 --> FILE_PATH1, <!-- 文件地址1 -->
PART_THICK, <!-- 厚 --> FILE_PATH2, <!-- 文件地址2 -->
FACTORY_CODE, <!-- 厂区编码 --> FILE_PATH3, <!-- 文件地址3 -->
FACTORY_NAME, <!-- 厂区名称 --> FILE_PATH4, <!-- 文件地址4 -->
ASSIGNED_NUM,UNASSIGNED_NUM,DOCUMENT_TYPE) FILE_PATH5, <!-- 文件地址5 -->
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#, INVENT_RECORD_ID <!-- 存货档案ID -->
#prdtName#, #planCompletionDate#, #num#,#unitWt#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, ) VALUES (
#updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #companyCode#, #depCode#, #prodOrderNo#, #projCode#,
#prdtSpec#,#partType#,#partCode#,#partName#,#partSpec#,#remark1#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#,
#prdtLength#,#prdtWidth#,#prdtThick#,#partLength#,#partWidth#,#partThick#, #factoryCode#, #factoryName#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#,
0, #num#,0) #partWidth#, #partThick#, #partSpec#, #planCompletionDate#, #num#, #unitWt#,
</insert> #totalWt#, #assignedNum#, #unassignedNum#, #status#, #factoryCode#, #factoryName#,
#orgNo#, #orgName#, #documentType#, #remark#, #remark1#, #createdBy#, #createdName#,
#createdTime#, #filePath1#, #filePath2#,
#filePath3#, #filePath4#, #filePath5#, #inventRecordId#)
</insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC005 WHERE DELETE FROM ${hpjxSchema}.T_HPSC005 WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE ${hpjxSchema}.T_HPSC005 UPDATE ${hpjxSchema}.T_HPSC005
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 --> PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_TYPE = #prdtType#, PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_CODE = #prdtCode#, <!-- 部件编码 --> PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_NAME = #prdtName#, <!-- 部件名称 --> PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
NUM = #num#, <!-- 计划数量 --> PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
UNIT_WT = #unitWt#, <!-- 单重 --> PART_TYPE = #partType#, <!-- 零件类型 -->
TOTAL_WT = #totalWt#, <!-- 计划重量 --> PART_CODE = #partCode#, <!-- 零件编码 -->
STATUS = #status#, <!-- 状态 0-未派工,1-已派工 --> PART_NAME = #partName#, <!-- 零件名称 -->
ORG_NO = #orgNo#, <!-- 生产组编码 --> PART_LENGTH = #partLength#, <!-- 零件-长 -->
ORG_NAME = #orgName#, <!-- 生产组名称 --> PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> PART_THICK = #partThick#, <!-- 零件-厚 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> PART_SPEC = #partSpec#, <!-- 零件规格 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> NUM = #num#, <!-- 计划数量 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> UNIT_WT = #unitWt#, <!-- 计划单重 -->
REMARK = #remark#, <!-- 备注 --> TOTAL_WT = #totalWt#, <!-- 计划重量 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 --> ASSIGNED_NUM = #assignedNum#, <!-- 已派工数量 -->
FILE_PATH2 = #filePath2#, <!-- 文件地址2 --> UNASSIGNED_NUM = #unassignedNum#, <!-- 待派工数量 -->
FILE_PATH3 = #filePath3#, <!-- 文件地址3 --> STATUS = #status#, <!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FILE_PATH4 = #filePath4#, <!-- 文件地址4 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FILE_PATH5 = #filePath5#, <!-- 文件地址5 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> ORG_NO = #orgNo#, <!-- 生产组编码 -->
FACTORY_NAME = #factoryName# <!-- 厂区名称 --> ORG_NAME = #orgName#, <!-- 生产组名称 -->
WHERE DOCUMENT_TYPE = #documentType#, <!-- 单据类型 0-非子母单;1-子母单 -->
ID = #id# REMARK = #remark#, <!-- 备注 -->
REMARK1 = #remark1#, <!-- 备注 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 -->
FILE_PATH2 = #filePath2#, <!-- 文件地址2 -->
FILE_PATH3 = #filePath3#, <!-- 文件地址3 -->
FILE_PATH4 = #filePath4#, <!-- 文件地址4 -->
FILE_PATH5 = #filePath5#, <!-- 文件地址5 -->
INVENT_RECORD_ID = #inventRecordId# <!-- 存货档案ID -->
WHERE ID = #id#
</update> </update>
<update id="updateAssign"> <update id="updateAssign">
UPDATE ${hpjxSchema}.T_HPSC005 UPDATE ${hpjxSchema}.T_HPSC005
SET SET
STATUS = #status#, <!-- 状态 0-未派工,1-已派工 --> STATUS = #status#, <!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#, <!-- 生产组编码 --> ORG_NO = #orgNo#, <!-- 生产组编码 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> <include refid="updateRevise"/>
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE ID = #id#
WHERE
ID = #id#
</update> </update>
<update id="updateAssignNum"> <update id="updateAssignNum">
UPDATE ${hpjxSchema}.T_HPSC005 UPDATE ${hpjxSchema}.T_HPSC005
SET SET
STATUS = #status#, <!-- 状态 0-未派工,1-部分派工,2-全部派工 --> STATUS = #status#, <!-- 状态 0-未派工,1-部分派工,2-全部派工 -->
ASSIGNED_NUM = #assignedNum#, <!-- 已派工数量 --> ASSIGNED_NUM = #assignedNum#, <!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#, <!-- 待派工数量 --> UNASSIGNED_NUM = #unassignedNum#, <!-- 待派工数量 -->
DOCUMENT_TYPE = 1, DOCUMENT_TYPE = 1,
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<select id="getEntity" parameterClass="java.util.HashMap" <select id="getEntity" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1 FROM ${hpjxSchema}.T_HPSC005
<isNotEmpty prepend=" AND " property="productionOrderNo"> WHERE 1=1
PRODUCTION_ORDER_NO like CONCAT('%', #productionOrderNo#, '%') <isNotEmpty prepend=" AND " property="prodOrderNo">
</isNotEmpty> PROD_ORDER_NO like CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty>
</select> </select>
<!-- 行锁 --> <!-- 行锁 -->
...@@ -289,10 +294,10 @@ ...@@ -289,10 +294,10 @@
SET CREATED_TIME = CREATED_TIME SET CREATED_TIME = CREATED_TIME
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="prodOrderNo"> <isNotEmpty prepend=" AND " property="prodOrderNo">
PRODUCTION_ORDER_NO = #prodOrderNo# PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNos"> <isNotEmpty prepend=" AND " property="prodOrderNos">
PRODUCTION_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate> PROD_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate>
</isNotEmpty> </isNotEmpty>
</update> </update>
...@@ -321,7 +326,7 @@ ...@@ -321,7 +326,7 @@
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo", (CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName" (CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName"
FROM HPJX.T_HPSC005 A FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO LEFT JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode# A.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
A.ID as "id", A.ID as "id",
A.PROJ_CODE as "projCode", <!-- 项目编码 --> A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 --> A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> A.PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
A.PRDT_CODE as "prdtCode", <!-- 部件编码 --> A.PRDT_CODE as "prdtCode", <!-- 部件编码 -->
A.PRDT_NAME as "prdtName", <!-- 部件名称 --> A.PRDT_NAME as "prdtName", <!-- 部件名称 -->
A.PRDT_SPEC as "prdtSpec", A.PRDT_SPEC as "prdtSpec",
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
A.ID = #id# A.ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="prodOrderNo">
A.PRODUCTION_ORDER_NO LIKE CONCAT('%', #productionOrderNo#, '%') A.PROD_ORDER_NO LIKE CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE = #projCode# A.PROJ_CODE = #projCode#
......
...@@ -3,22 +3,21 @@ package com.baosight.hpjx.hp.sc.tools; ...@@ -3,22 +3,21 @@ package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.kc.domain.HPKC005; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtils; import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -131,7 +130,7 @@ public class HPSCTools { ...@@ -131,7 +130,7 @@ public class HPSCTools {
* @param prdtCode * @param prdtCode
* @return * @return
*/ */
public static HPSC002 get(String prdtCode) { public static HPSC002 getByPrdt(String prdtCode) {
AssertUtils.isEmpty(prdtCode, "部件编码不能为空"); AssertUtils.isEmpty(prdtCode, "部件编码不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode); queryMap.put("prdtCode", prdtCode);
...@@ -139,6 +138,35 @@ public class HPSCTools { ...@@ -139,6 +138,35 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
/**
* 查询节点
*
* @param id
* @return
*/
public static HPSC002 get(Long id) {
AssertUtils.isNull(id, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
AssertUtils.isNull(results, String.format("节点ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询叶子节点
*
* @param parentId
* @return
*/
public static List<HPSC002> queryByParent(String parentId) {
AssertUtils.isEmpty(parentId, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
}
} }
/** /**
...@@ -163,6 +191,48 @@ public class HPSCTools { ...@@ -163,6 +191,48 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id)); AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public static HPSC003 queryByMat(Long matId) {
AssertUtils.isNull(matId, "物料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("matId", matId);
List<HPSC003> results = DaoBase.getInstance().query(HPSC003.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 修改状态
*
* @param id
* @param status
*/
public static void updateStatus(Long id, Integer status) {
AssertUtils.isNull(id, "节点ID不能为空");
Map map = new HashMap();
map.put("id", id);
map.put("status", status);
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_STATUS, map);
}
/**
* 修改计划完成时间
*
* @param planInfoNo
* @param planCompletionDate
*/
public static void updateDate(String planInfoNo, String planCompletionDate) {
AssertUtils.isNull(planInfoNo, "计划号不能为空");
Map map = new HashMap();
map.put("planInfoNo", planInfoNo);
map.put("planCompletionDate", planCompletionDate);
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_DATE, map);
}
} }
/** /**
...@@ -204,6 +274,21 @@ public class HPSCTools { ...@@ -204,6 +274,21 @@ public class HPSCTools {
} }
/** /**
* 根据材料号删除
*
* @param matId
* @return
*/
public static void deleteByMat(Long matId) {
if (matId == null) {
return;
}
Map queryMap = new HashMap();
queryMap.put("matId", matId);
DaoBase.getInstance().update(HPSqlConstant.HPSC004.DELETE_BY_MAT, queryMap);
}
/**
* 查询 * 查询
* *
* @param prodOrderNo * @param prodOrderNo
...@@ -212,11 +297,38 @@ public class HPSCTools { ...@@ -212,11 +297,38 @@ public class HPSCTools {
public static HPSC004 get(String prodOrderNo) { public static HPSC004 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap); List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo)); AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public static HPSC004 queryByMat(Long matId) {
AssertUtils.isNull(matId, "物料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("matId", matId);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 根据父级ID查询
*
* @param parentId
* @return
*/
public static List<HPSC004> queryByParent(String parentId) {
AssertUtils.isNull(parentId, "计划ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
}
} }
/** /**
...@@ -327,7 +439,7 @@ public class HPSCTools { ...@@ -327,7 +439,7 @@ public class HPSCTools {
public static HPSC005 get(String prodOrderNo) { public static HPSC005 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo)); AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
...@@ -474,8 +586,6 @@ public class HPSCTools { ...@@ -474,8 +586,6 @@ public class HPSCTools {
/** /**
* 更新已完成数量 * 更新已完成数量
* *
* @param prodTaskNo
* @param completeNum
*/ */
public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt, public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt,
Integer status, String actualCompletionDate) { Integer status, String actualCompletionDate) {
......
...@@ -214,7 +214,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { ...@@ -214,7 +214,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
if (StringUtils.isBlank(dateTime)) { if (StringUtils.isBlank(dateTime)) {
return dateTime; return dateTime;
} }
return dateTime.replaceAll("-", "").replaceAll(":", "").replaceAll(" ", ""); return dateTime.replaceAll("-", "")
.replaceAll("/", "")
.replaceAll(":", "")
.replaceAll(" ", "");
} }
} }
...@@ -192,7 +192,7 @@ $(function () { ...@@ -192,7 +192,7 @@ $(function () {
*/ */
onDelete: function (e) { onDelete: function (e) {
// 不向后台保存 // 不向后台保存
console.log(e) console.log("DELETE -> ", e)
var tree = $("#materialTree").data("kendoTreeView"); var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo(); var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数 EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
...@@ -213,7 +213,6 @@ $(function () { ...@@ -213,7 +213,6 @@ $(function () {
field: "operator", field: "operator",
title: "操作", title: "操作",
template: function (item) { template: function (item) {
console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let lv = item.lv let lv = item.lv
let template = ''; let template = '';
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/> <EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/> <EF:EFColumn enable="false" ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称" hidden="true"/>
<%--<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true" <%--<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true"
columnTemplate="#=textField#" columnTemplate="#=textField#"
itemTemplate="#=textField#" itemTemplate="#=textField#"
...@@ -107,4 +107,4 @@ ...@@ -107,4 +107,4 @@
let ctx="${ctx}"; let ctx="${ctx}";
</script> </script>
<script src="${ctx}/HP/SC/HPSC002.js"></script> <script src="${ctx}/HP/SC/HPSC002.js"></script>
\ No newline at end of file
$(function () { $(function () {
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
query();
});
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result" : { "result": {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [ columns: [{
{ field: "operator",
field: "operator", template: function (item) {
template: function (item) { console.log(item)
console.log(item) let auditStatus = item.status;
let auditStatus = item.status; let template = '';
let template = ''; if (item.matId != null) {
if (item.matId != null){ template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>';
+ 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>'; }
} if (auditStatus == 0) {
if (auditStatus == 0) { template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + +
'onclick="check(' + item.id + ',1)" >提交</a>'; 'onclick="check(' + item.id + ',1)" >提交</a>';
} }
/*else { /*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>'; 'onclick="check(' + item.id + ',0)" >撤回</a>';
}*/ }*/
return template; return template;
} }
}, }, {
{ field: "planCompletionDate",
field: "planCompletionDate", template: function (item) {
template: function (item){ let auditStatus = item.status;
let auditStatus = item.status; let template = '';
let template = ''; if (auditStatus == 1) {
if (auditStatus == 1){ template += 'this.blur();';
template += 'this.blur();'; }
} return template;
return template; }
} }],
} onSuccess: function (e) {
], if (e.eiInfo.extAttr.methodName == 'update'
onSuccess: function (e) { || e.eiInfo.extAttr.methodName == 'insert') {
if(e.eiInfo.extAttr.methodName == 'update' query();
||e.eiInfo.extAttr.methodName == 'insert'){ }
query(); },
} onRowClick: function (e) {
}, var block = detailGrid.getEiBlock();
onRowClick : function(e) { if (block != null) {
var block = detailGrid.getEiBlock(); block.setRows([]);
if (block != null) { detailGrid.setEiBlock(block);
block.setRows([]); }
detailGrid.setEiBlock(block); var info = new EiInfo()
} var parentId = e.model['planInfoNo'];
var info = new EiInfo() info.set("parentId", parentId);
var parentId = e.model['planInfoNo']; EiCommunicator.send("HPSC004", "queryDetail", info, {
info.set("parentId",parentId); onSuccess: function (ei) {//返回结果集
EiCommunicator.send("HPSC004","queryDetail",info,{ detailGrid.setEiInfo(ei);
onSuccess:function(ei){//返回结果集 }, onFail: function (ei) {
detailGrid.setEiInfo(ei); }
},onFail:function(ei){} }, {async: false});
},{async:false}); },
}, },
},
"detail":{ "detail":{
toolbarConfig: { toolbarConfig: {
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮 // hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
...@@ -103,7 +98,7 @@ $(function () { ...@@ -103,7 +98,7 @@ $(function () {
var btnNode = $(this); var btnNode = $(this);
//禁用按钮 //禁用按钮
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPSC003"), "HPSC003", "updateHPSC0004", { IPLAT.submitNode($("#HPSC003"), "HPSC003", "updatePlanDetail", {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei["status"] == -1) { if (ei["status"] == -1) {
NotificationUtil(ei, "error"); NotificationUtil(ei, "error");
...@@ -126,7 +121,6 @@ $(function () { ...@@ -126,7 +121,6 @@ $(function () {
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
} }
}); });
}, },
afterEdit: function (e) { afterEdit: function (e) {
if (e.field === "planCompletionDate") { if (e.field === "planCompletionDate") {
...@@ -141,24 +135,20 @@ $(function () { ...@@ -141,24 +135,20 @@ $(function () {
} }
} }
}, },
columns: [ columns: [{
{ field: "operator",
field: "operator", title: "操作",
title: "操作", template: function (item) {
template: function (item) { let filePath1 = item.filePath1;
let filePath1 = item.filePath1; let template = '';
let template = ''; if (filePath1) {
if (filePath1) { template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>'; }
} return template
return template }
} }]
}
],
} }
} }
//部件类型下拉联动 //部件类型下拉联动
...@@ -223,7 +213,7 @@ function check(id, auditStatus) { ...@@ -223,7 +213,7 @@ function check(id, auditStatus) {
} }
else { else {
// 提交通过,生成 // 提交通过,生成
EiCommunicator.send('HPSC003', 'checkHPSC0003', inEiInfo, { EiCommunicator.send('HPSC003', 'submitPlan', inEiInfo, {
onSuccess(response) { onSuccess(response) {
NotificationUtil(response.msg); NotificationUtil(response.msg);
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
...@@ -272,8 +262,9 @@ function check(id, auditStatus) { ...@@ -272,8 +262,9 @@ function check(id, auditStatus) {
} }
let query = function () { let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
function check_time(model,rows){ function check_time(model,rows){
......
...@@ -4,21 +4,12 @@ ...@@ -4,21 +4,12 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件" align-item="center"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row" > <%-- blockId="inqu_status" --%> <EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件" align-item="center">
<div class="row" >
<EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" /> <EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" />
<EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" /> <EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" />
<%--<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect>--%>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="部件名称" filter="contains" required="false" colWidth="3" <EF:EFSelect ename="inqu_status-0-prdtCode" cname="部件名称" filter="contains" required="false" colWidth="3"
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择"> template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
...@@ -32,7 +23,6 @@ ...@@ -32,7 +23,6 @@
<EF:EFOption label="已提交" value="1"/> <EF:EFOption label="已提交" value="1"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="基本信息"> <EF:EFRegion id="result" title="基本信息">
...@@ -48,8 +38,8 @@ ...@@ -48,8 +38,8 @@
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" width="150" editType="date"
required='true'/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required='true'/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/> <EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态"> <EF:EFComboColumn enable="false" ename="status" cname="状态">
<EF:EFOption label="未提交" value="0"/> <EF:EFOption label="未提交" value="0"/>
...@@ -73,24 +63,18 @@ ...@@ -73,24 +63,18 @@
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零部件名称"/> <EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零部件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<%-- <EF:EFComboColumn enable="false" ename="delStatus" cname="状态">--%>
<%-- <EF:EFOption label="已删除" value="0"/>--%>
<%-- <EF:EFOption label="启用" value="1"/>--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="数量"/> <EF:EFColumn enable="false" ename="num" readonly="true" cname="数量"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="单重"/> <EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="单重"/>
<EF:EFColumn ename="totalWt" cname="总重" enable="false"/> <EF:EFColumn ename="totalWt" cname="总重" enable="false"/>
<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/> <EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" width="150" editType="date"
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" width="150" editType="date"
enable="false"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="完成总重" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="完成总重" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC003.js"></script>
...@@ -19,7 +19,7 @@ $(function () { ...@@ -19,7 +19,7 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let status = item.status; let status = item.status;
let prodOrderNo = item.productionOrderNo; let prodOrderNo = item.prodOrderNo;
let filePath1 = item.filePath1; let filePath1 = item.filePath1;
let template = ''; let template = '';
// 非全部派工时展示拆单派工按钮 // 非全部派工时展示拆单派工按钮
...@@ -49,7 +49,7 @@ function query() { ...@@ -49,7 +49,7 @@ function query() {
/** /**
* 拆单派工 * 拆单派工
* *
* @param productionOrderNo * @param prodOrderNo
*/ */
function tearAssign(prodOrderNo) { function tearAssign(prodOrderNo) {
JSColorbox.open({ JSColorbox.open({
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<EF:EFPage title="生产订单"> <EF:EFPage title="生产订单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="生产订单号" blockId="inqu_status" ename="productionOrderNo" row="0" colWidth="3"/> <EF:EFInput cname="生产订单号" blockId="inqu_status" ename="prodOrderNo" row="0" colWidth="3"/>
<EF:EFInput cname="项目号" blockId="inqu_status" ename="projCode" row="0" colWidth="3"/> <EF:EFInput cname="项目号" blockId="inqu_status" ename="projCode" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/> <EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/> <EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
...@@ -39,14 +39,15 @@ ...@@ -39,14 +39,15 @@
<EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/> <EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/> <EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"/> <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="部件备注" enable="false"/> <EF:EFColumn ename="remark" cname="部件备注" enable="false"/>
<EF:EFColumn ename="remark1" cname="零件备注" enable="false"/> <EF:EFColumn ename="remark1" cname="零件备注" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-prodOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment