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";
}
} }
...@@ -73,4 +73,18 @@ public class HPConstant { ...@@ -73,4 +73,18 @@ 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); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("项目档案ID"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("width"); 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("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() {
return this.remark;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the inventRecordId - 项目档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 项目档案ID.
*
* @param inventRecordId - 项目档案ID
*/ */
public void setInventRecordId(Long inventRecordId) { public String getUpdatedName() {
this.inventRecordId = inventRecordId; return this.updatedName;
}
/**
* get the sort - 规格
* @return the sort
*/
public String getSpec() {
return this.spec;
} }
/** /**
* set the sort - 规格 * set the updatedName - 修改人名称.
*/
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 - 长 * @param updatedName - 修改人名称
*/ */
public void setLength(BigDecimal length) { public void setUpdatedName(String updatedName) {
this.length = length; this.updatedName = updatedName;
} }
/** /**
* get the width - 宽. * get the updatedTime - 更新时间.
* @return the width * @return the updatedTime
*/ */
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,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,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-02-05 14:06:35 create * @history 2024-02-22 10:52:56 create
*/ */
public class HPSC005 extends DaoEPBase { public class HPSC005 extends DaoEPBase {
...@@ -25,7 +26,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -25,7 +26,7 @@ public class HPSC005 extends DaoEPBase {
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"; /* 产品类型*/
...@@ -72,7 +73,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -72,7 +73,7 @@ public class HPSC005 extends DaoEPBase {
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"; /* 产品类型*/
...@@ -125,7 +126,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -125,7 +126,7 @@ public class HPSC005 extends DaoEPBase {
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 = " "; /* 创建人*/
...@@ -188,7 +189,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -188,7 +189,7 @@ public class HPSC005 extends DaoEPBase {
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);
...@@ -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 - 项目编码.
...@@ -903,7 +904,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -903,7 +904,7 @@ 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;
} }
...@@ -912,7 +913,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -912,7 +913,7 @@ public class HPSC005 extends DaoEPBase {
* *
* @param documentType - 单据类型 0-非子母单;1-子母单 * @param documentType - 单据类型 0-非子母单;1-子母单
*/ */
public void setDocumentType(Boolean documentType) { public void setDocumentType(Integer documentType) {
this.documentType = documentType; this.documentType = documentType;
} }
/** /**
...@@ -1150,7 +1151,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1150,7 +1151,7 @@ public class HPSC005 extends DaoEPBase {
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));
...@@ -1205,7 +1206,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1205,7 +1206,7 @@ public class HPSC005 extends DaoEPBase {
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)));
......
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,23 +27,31 @@ import org.apache.commons.lang.StringUtils; ...@@ -27,23 +27,31 @@ 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
* @return
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("itemCode","ITEM_CODE in ('2','3','4')"); map.put("itemCode", "ITEM_CODE in ('2','3','4')");
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID,DdynamicEnum.CODESET_CODE_BLOCK_ID),map, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID, DdynamicEnum.CODESET_CODE_BLOCK_ID), map,
false); false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -52,22 +60,17 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -52,22 +60,17 @@ public class ServiceHPSC002 extends ServiceBase {
return inInfo; return inInfo;
} }
/** /**
* 查询操作. * 查询操作.
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ try {
EiInfo outInfo = super.query(inInfo, "HPSC002.query", new HPSC002()); inInfo = super.query(inInfo, "HPSC002.query", new HPSC002());
//调用本地服务 } catch (Exception e) {
// EiInfo eiInfo_update = new EiInfo(); LogUtils.setDetailMsg(inInfo, e, "查询失败");
// eiInfo_update.set(EiConstant.serviceName, "HPSC002"); }
// eiInfo_update.set(EiConstant.methodName, "delete"); return inInfo;
// EiBlock eiBlock_update = new EiBlock(EiConstant.resultBlock);
// EiInfo outInfo_update = XLocalManager.call(eiInfo_update);
return outInfo;
} }
/** /**
...@@ -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);
...@@ -155,34 +158,49 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -155,34 +158,49 @@ public class ServiceHPSC002 extends ServiceBase {
} }
/** /**
* 删除操作. * 删除操作
*
* @param inInfo
* @return
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo inInfo) {
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<?, ?> map = eiBlock.getRow(i); // 删除之前数据校验
hppz002.fromMap(map); for (Map resultRow : resultRows) {
this.dao.delete("HPSC002.delete", hppz002.toMap()); HPSC002 fSc002 = new HPSC002();
this.checkTreeNodeLeaf(new Long(hppz002.getParentId())); fSc002.fromMap(resultRow);
//TODO 删除时 修改树结构 // 存在子节点不能删除
this.checkTreeNodeLeaf(new Long(hppz002.getId())); List<HPSC002> dbSc002s = HPSCTools.HpSc002.queryByParent(fSc002.getId().toString());
} AssertUtils.isNotEmpty(dbSc002s, String.format("部件[%s]已存在子节点不能删除", fSc002.getPrdtName()));
} catch (PlatException e) { // 计划生产中不能删除
eiInfo.setStatus(EiConstant.STATUS_FAILURE); HPSC004 dbSc004 = HPSCTools.HpSc004.queryByMat(fSc002.getId());
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); AssertUtils.isTrue(dbSc004 != null && StringUtils.isNotBlank(dbSc004.getProdOrderNo()),
eiInfo.setDetailMsg(e.getMessage()); String.format("部件[%s]已派工不能删除", fSc002.getPrdtName()));
logError("删除失败!", e.getMessage()); }
return eiInfo; // 删除数据
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, "删除失败");
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); return inInfo;
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
/** /**
* 指定树节点 * 指定树节点
*
* @param inInfo * @param inInfo
* @return * @return
*/ */
...@@ -229,20 +247,18 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -229,20 +247,18 @@ public class ServiceHPSC002 extends ServiceBase {
} }
/** /**
* 修改父级节点的LEAF状态为1 * 修改节点状态,是叶子或非叶子节点
* *
* @param id * @param id
*/ */
public void checkTreeNodeLeaf(String id) {
public void checkTreeNodeLeaf(Long id) {
EiInfo eiInfo = new EiInfo();
//1 获取参数 //1 获取参数
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap); List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap);
if(rows.size() > 0){ if (rows.size() > 0) {
queryMap.put("leaf", "0"); queryMap.put("leaf", "0");
}else{ } else {
queryMap.put("leaf", "1"); queryMap.put("leaf", "1");
} }
DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap); DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
...@@ -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 {
...@@ -330,106 +345,67 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -330,106 +345,67 @@ public class ServiceHPSC002 extends ServiceBase {
/** /**
* 绑定附件 * 绑定附件
*
* @param inInfo
* @return
*/ */
public EiInfo bindDocIdById(EiInfo eiInfo) { public EiInfo bindDocIdById(EiInfo inInfo) {
HPSC002 hppz002 = new HPSC002(); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<?, ?> map = eiBlock.getRow(i); for (Map resultRow : resultRows) {
hppz002.fromMap(map); HPSC002 fSc002 = new HPSC002();
fSc002.fromMap(resultRow);
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("id",hppz002.getId()); sqlMap.put("id", fSc002.getId());
sqlMap.put("filePath1",hppz002.getFilePath1()); sqlMap.put("filePath1", fSc002.getFilePath1());
sqlMap.put("bizType","WL"); sqlMap.put("bizType", "WL");
DaoUtils.update("HPSC002.bindDocIdById", hppz002.toMap()); DaoUtils.update("HPSC002.bindDocIdById", fSc002.toMap());
} }
} catch (PlatException e) { inInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setStatus(EiConstant.STATUS_FAILURE); inInfo.setMsg("操作成功!");
eiInfo.setMsg("删除失败,原因参见详细错误描述!"); } catch (Exception e) {
eiInfo.setDetailMsg(e.getMessage()); LogUtils.setDetailMsg(inInfo, e, "操作失败");
logError("删除失败!", e.getMessage());
return eiInfo;
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); return inInfo;
eiInfo.setMsg("删除成功!");
return eiInfo;
} }
/** /**
* 生产生产计划 * 生成生产计划
*
* @param id 生产ID * @param id 生产ID
*/ */
public void autoPlanInfo(String id) { public void autoPlanInfo(String id) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String planNo;
HPSC002 dbSc002 = (HPSC002) dao.get("HPSC002.queryEntityByParentPrtdCode","id",id); HPSC002 dbSc002 = HPSCTools.HpSc002.get(Long.parseLong(id));
String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
// 生成生产计划t_hpsc003,如果已存在就不新增 // 生成生产计划t_hpsc003,如果已存在就不新增
Map queryMap = new HashMap(); HPSC003 dbSc003 = HPSCTools.HpSc003.queryByMat(dbSc002.getId());
queryMap.put("matId", dbSc002.getId()); if (dbSc003 == null) {
List<HPSC003> dbSc003s = dao.query(HPSC003.QUERY, queryMap); planNo = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
if (CollectionUtils.isEmpty(dbSc003s)) { HPSC003 newSc003 = BeanUtils.copy(dbSc002, HPSC003.class);
HPSC003 HPSC003 = new HPSC003(); newSc003.setPlanInfoNo(planNo);
HPSC003.setCompanyCode(""); newSc003.setMatId(dbSc002.getId());
HPSC003.setProjType(null); newSc003.setStatus(HPConstant.planStatus.S_0);
HPSC003.setProjCode(dbSc002.getProjCode()); DaoUtils.insert(HPSC003.INSERT, newSc003);
HPSC003.setProjName(dbSc002.getProjName()); } else {
HPSC003.setPlanInfoNo(SCJHD); planNo = dbSc003.getPlanInfoNo();
HPSC003.setInventRecordId(dbSc002.getInventRecordId()); // 更新主计划状态为"计划中"
HPSC003.setPrdtType(dbSc002.getPrdtType()); HPSCTools.HpSc003.updateStatus(dbSc003.getId(), HPConstant.planStatus.S_0);
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++) {
HPSC002 dbSc002Child = rows.get(i);
// 明细已存在就不在新增 // 明细已存在就不在新增
queryMap = new HashMap(); HPSC004 dbSc004 = HPSCTools.HpSc004.queryByMat(dbSc002Child.getId());
queryMap.put("filePath1", dbSc002Child.getId()); if (dbSc004 != null) {
List<HPSC004> dbSc004s = dao.query(HPSC004.QUERY, queryMap);
if (CollectionUtils.isNotEmpty(dbSc004s)) {
continue; continue;
} }
HPSC004 HPSC004 = new HPSC004(); HPSC004 newSc004 = BeanUtils.copy(dbSc002Child, HPSC004.class);
HPSC004.setCompanyCode(""); newSc004.setParentId(planNo);
HPSC004.setDeptCode(""); newSc004.setMatId(dbSc002Child.getId());
HPSC004.setProjCode(dbSc002Child.getProjCode()); newSc004.setFilePath1(dbSc002Child.getId().toString());
HPSC004.setProjName(dbSc002Child.getProjName()); newSc004.setDelStatus(CommonConstant.YesNo.NO_0);
HPSC004.setParentId(SCJHD); DaoUtils.insert(HPSC004.INSERT, newSc004);
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);
...@@ -119,78 +124,38 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -119,78 +124,38 @@ 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");
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map);
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;
}
/** /**
* 删除操作. * 修改计划明细
*
* @param inInfo
* @return
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo updatePlanDetail(EiInfo inInfo) {
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();
// 更新计划明细完工时间
fSc004.setPlanCommentDate(DateUtils.formatShort(fSc004.getPlanCommentDate()));
fSc004.setPlanCompletionDate(DateUtils.formatShort(fSc004.getPlanCompletionDate()));
DaoUtils.update(HPSqlConstant.HPSC004.UPDATE_PLAN_DATE, fSc004);
}
// 更新主计划完工时间
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, "新增失败");
} }
} catch (PlatException e) { return inInfo;
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;
} }
/**下· /**下·
...@@ -202,73 +167,74 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -202,73 +167,74 @@ public class ServiceHPSC003 extends ServiceBase {
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 *
* @param inInfo
* @return * @return
*/ */
public EiInfo checkHPSC0003(EiInfo eiInfo) { public EiInfo submitPlan(EiInfo inInfo) {
try { try {
Map map = new HashMap(); Long id = Long.parseLong(inInfo.getString("id"));
String id = eiInfo.get("id").toString(); HPSC003 dbSc003 = HPSCTools.HpSc003.get(id);
map.put("id", id); // 查询计划子项
HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query","id",id); List<HPSC004> dbSc004s = HPSCTools.HpSc004.queryByParent(dbSc003.getPlanInfoNo());
HPSC003.setStatus(1); for (HPSC004 dbSc004 : dbSc004s) {
DaoUtils.update("HPSC003.update", HPSC003.toMap()); // 已经生成订单的计划不在重复生成
//生成生产订单 if (StringUtils.isNotBlank(dbSc004.getProdOrderNo())) {
HashMap params = new HashMap(); continue;
params.put("parentId",HPSC003.getPlanInfoNo()); }
List list = dao.query("HPSC004.queryDetail",params,0,-999999); // 生成任务订单
for (int i = 0; i < list.size(); i ++) { HPSC005 newSc005 = this.addSc005(dbSc003, dbSc004);
HPSC004 HPSC004 = (HPSC004) list.get(i); // 回填订单号
HPSC005 HPSC005 = new HPSC005(); dbSc004.setProdOrderNo(newSc005.getProdOrderNo());
String SCDD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC005_PROD_NO); DaoUtils.update(HPSqlConstant.HPSC004.UPDATE_PROD_ORDER_NO, dbSc004.toMap());
HPSC005.setProjCode(HPSC003.getProjCode()); }
HPSC005.setProjName(HPSC003.getProjName()); // 修改计划状态
HPSC005.setProductionOrderNo(SCDD); HPSCTools.HpSc003.updateStatus(id, HPConstant.planStatus.S_1);
HPSC005.setInventRecordId(HPSC004.getInventRecordId()); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
HPSC005.setPrdtType(HPSC003.getPrdtType()); inInfo.setMsg("提交成功");
HPSC005.setPrdtCode(HPSC003.getPrdtCode()); } catch (Exception e) {
HPSC005.setPrdtName(HPSC003.getPrdtName()); LogUtils.setDetailMsg(inInfo, e, "提交失败");
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) { return inInfo;
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 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;
} }
/** /**
......
...@@ -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">
SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
...@@ -73,10 +38,9 @@ ...@@ -73,10 +38,9 @@
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 --> THICK as "thick" <!-- 厚 -->
</sql>
FROM hpjx.t_hpsc002 WHERE 1=1 <sql id="condition">
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -90,13 +54,13 @@ ...@@ -90,13 +54,13 @@
PRDT_CODE = #prdtCode# PRDT_CODE = #prdtCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%') PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId"> <isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId# INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%') PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
...@@ -104,135 +68,36 @@ ...@@ -104,135 +68,36 @@
<isNotEmpty prepend=" AND " property="lv"> <isNotEmpty prepend=" AND " property="lv">
LV = #lv# LV = #lv#
</isNotEmpty> </isNotEmpty>
ORDER BY ID DESC </sql>
<!-- <dynamic prepend="ORDER BY">-->
<!-- <isEmpty property="orderBy">--> <sql id="order">
<!-- CREATED_TIME DESC--> <dynamic prepend="ORDER BY">
<!-- </isEmpty>--> <isNotEmpty property="order">
<!-- </dynamic>--> $order$
</isNotEmpty>
<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,
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
...@@ -277,9 +142,9 @@ ...@@ -277,9 +142,9 @@
#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">
...@@ -354,43 +219,10 @@ ...@@ -354,43 +219,10 @@
ORDER BY CREATED_TIME DESC ORDER BY CREATED_TIME DESC
</select> </select>
<!-- 根据父级ID查询 -->
<select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap"> <select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap">
SELECT SELECT
ID as "id", <include refid="column"/>
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_ID as "parentId", <!-- 父节点-部件编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
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 FROM hpjx.t_hpsc002
WHERE 1 = 1 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
...@@ -401,46 +233,12 @@ ...@@ -401,46 +233,12 @@
</isNotEmpty> </isNotEmpty>
</select> </select>
<!-- 根据父级ID查询 -->
<select id="queryEntityByParentPrtdCode" parameterClass="java.util.HashMap" <select id="queryEntityByParentPrtdCode" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
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", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_ID as "parentId", <!-- 父节点-部件编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
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"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
<?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 </update>
COMPANY_CODE = #companyCode#
AND PROJ_CODE = #projCode# <!-- 修改状态 -->
AND PLAN_INFO_NO = #planInfoNo# <update id="updateStatus">
UPDATE hpjx.T_HPSC003
SET
STATUS = #status#,
<include refid="updateRevise"/>
WHERE ID = #id#
</update> </update>
</sqlMap> </sqlMap>
...@@ -2,6 +2,52 @@ ...@@ -2,6 +2,52 @@
<!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#
...@@ -18,12 +64,18 @@ ...@@ -18,12 +64,18 @@
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME = #projName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId# PARENT_ID = #parentId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName"> <isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName# PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="type"> <isNotEmpty prepend=" AND " property="type">
TYPE = #type# TYPE = #type#
</isNotEmpty> </isNotEmpty>
...@@ -45,6 +97,18 @@ ...@@ -45,6 +97,18 @@
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName# PRDT_NAME = #prdtName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num"> <isNotEmpty prepend=" AND " property="num">
NUM = #num# NUM = #num#
</isNotEmpty> </isNotEmpty>
...@@ -84,29 +148,35 @@ ...@@ -84,29 +148,35 @@
<isNotEmpty prepend=" AND " property="actualCompletionUnitWt"> <isNotEmpty prepend=" AND " property="actualCompletionUnitWt">
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt# ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="inventRecordId">
PRODUCTION_ORDER_NO = #productionOrderNo# INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus"> <isNotEmpty prepend=" AND " property="remark">
DEL_STATUS = #delStatus# REMARK = #remark#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy# CREATED_BY = #createdBy#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</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="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime# UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="remark"> <isNotEmpty prepend=" AND " property="delStatus">
REMARK = #remark# DEL_STATUS = #delStatus#
</isNotEmpty> </isNotEmpty>
</sql> </sql>
...@@ -117,86 +187,52 @@ ...@@ -117,86 +187,52 @@
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">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
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"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="order">
$orderBy$ $order$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="order">
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<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>
<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, <!-- 项目名称 -->
MAT_ID, <!-- 材料ID -->
PARENT_ID, <!-- 父节点-产品编码 --> PARENT_ID, <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME, <!-- 父节点-产品名称 --> PARENT_PRDT_NAME, <!-- 父节点-产品名称 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
TYPE, <!-- 类别 --> TYPE, <!-- 类别 -->
LEAF, <!-- 是否有叶子节点 --> LEAF, <!-- 是否有叶子节点 -->
SORT, <!-- 排序字段 --> SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 --> ICON, <!-- 图片地址 -->
INVENT_RECORD_ID, PRDT_TYPE, <!-- 产品类型 -->
SPEC, PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
PRDT_TYPE, SPEC, <!-- 规格 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
NUM, <!-- 数量 --> NUM, <!-- 数量 -->
UNIT_WT, <!-- 单重 --> UNIT_WT, <!-- 单重 -->
TOTAL_WT, <!-- 总重 --> TOTAL_WT, <!-- 总重 -->
...@@ -210,32 +246,35 @@ ...@@ -210,32 +246,35 @@
ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 --> ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 --> ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT, <!-- 实际完工重量 --> ACTUAL_COMPLETION_UNIT_WT, <!-- 实际完工重量 -->
INVENT_RECORD_ID, <!-- 项目档案ID -->
STATUS, <!-- 状态 0-未审核,1-已审核 --> STATUS, <!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS, <!-- 状态 1未删除,0已删除 --> REMARK, <!-- 备注 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 --> DEL_STATUS <!-- 状态:0未删除,1已删除 -->
UPDATED_TIME, <!-- 更新时间 --> ) VALUES (
REMARK <!-- 备注 --> #companyCode#, #deptCode#, #projCode#, #projName#, #matId#, #parentId#, #parentPrdtName#,
#prodOrderNo#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#,
#prdtName#, #length#, #width#, #thick#, #spec#, #num#, #unitWt#, #totalWt#, #filePath1#,
#filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#,
#actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #inventRecordId#,
#status#, #remark#, #createdBy#, #createdName#, #createdTime#, #delStatus#
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#,#inventRecordId#,#spec#, #length#, #width#, #thick#,#prdtType#, #prdtCode#, #prdtName#,
#num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#,
#actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#,
#updatedTime#, #remark#)
</insert> </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 id="deleteByMat">
DELETE FROM hpjx.T_HPSC004 WHERE MAT_ID = #matId#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.T_HPSC004 UPDATE hpjx.T_HPSC004
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#, <!-- 部门编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PARENT_ID = #parentId#, <!-- 父节点-产品编码 --> PARENT_ID = #parentId#, <!-- 父节点-产品编码 -->
...@@ -260,11 +299,9 @@ ...@@ -260,11 +299,9 @@
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#, <!-- 实际完工重量 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 --> PROD_ORDER_NO = #prodOrderNo#, <!-- 生产订单号 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 --> STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 --> DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
...@@ -272,19 +309,17 @@ ...@@ -272,19 +309,17 @@
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick# <!-- 厚 --> THICK = #thick# <!-- 厚 -->
WHERE WHERE ID = #id#
ID = #id#
</update> </update>
<update id="updateHPSC0004"> <!-- 更新计划时间 -->
<update id="updatePlanDate">
UPDATE hpjx.T_HPSC004 UPDATE hpjx.T_HPSC004
SET SET
PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 --> PLAN_COMMENT_DATE = #planCommentDate#, <!-- 计划开始时间 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划结束时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> <include refid="updateRevise"/>
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE ID = #id#
WHERE
ID = #id#
</update> </update>
<!-- 更新完成数量、重量、时间 --> <!-- 更新完成数量、重量、时间 -->
...@@ -298,51 +333,22 @@ ...@@ -298,51 +333,22 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<!-- 更新订单号 -->
<update id="updateProdOrderNo">
UPDATE hpjx.T_HPSC004
SET
PROD_ORDER_NO = #prodOrderNo#,
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
<select id="queryDetail" parameterClass="java.util.HashMap" <select id="queryDetail" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT SELECT
ID as "id", <include refid="column"/>
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> FROM hpjx.T_HPSC004
DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> WHERE 1=1
PROJ_CODE as "projCode", <!-- 项目编码 --> <include refid="condition"/>
PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_ID as "parentId", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
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>
<select id="inspectDetail" resultClass="int"> <select id="inspectDetail" resultClass="int">
...@@ -357,10 +363,8 @@ ...@@ -357,10 +363,8 @@
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
ID = #id#
</update> </update>
<!-- 行锁 --> <!-- 行锁 -->
...@@ -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", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> PRDT_TYPE as "prdtType", <!-- 产品类型 -->
INVENT_RECORD_ID as "inventRecordId", PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_TYPE as "prdtType", PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_CODE as "prdtCode", <!-- 部件编码 --> PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_NAME as "prdtName", <!-- 部件名称 --> PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
NUM as "num", <!-- 计划数量 --> NUM as "num", <!-- 计划数量 -->
UNIT_WT as "unitWt", <!-- 单重 --> UNIT_WT as "unitWt", <!-- 计划单重 -->
TOTAL_WT as "totalWt", <!-- 计划重量 --> TOTAL_WT as "totalWt", <!-- 计划重量 -->
STATUS as "status", <!-- 状态 0-未派工,1-已派工 --> ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
STATUS as "status", <!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
ORG_NO as "orgNo", <!-- 生产组编码 --> ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 --> ORG_NAME as "orgName", <!-- 生产组名称 -->
DOCUMENT_TYPE as "documentType", <!-- 单据类型 0-非子母单;1-子母单 -->
REMARK as "remark", <!-- 备注 -->
REMARK1 as "remark1", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 --> FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 --> FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 --> FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 --> FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 --> FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PRDT_SPEC as "prdtSpec", INVENT_RECORD_ID as "inventRecordId" <!-- 存货档案ID -->
PART_TYPE as "partType",
PART_CODE as "partCode",
PART_NAME as "partName",
PART_SPEC as "partSpec",
REMARK1 as "remark1",
PRDT_LENGTH as "prdtLength", <!-- 长 -->
PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
PRDT_THICK as "prdtThick", <!-- 厚 -->
PART_LENGTH as "partLength", <!-- 长 -->
PART_WIDTH as "partWidth", <!-- 宽 -->
PART_THICK as "partThick", <!-- 厚 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
DOCUMENT_TYPE as "documentType" <!-- 单据类型 0-非子母单;1-子母单 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -55,14 +58,17 @@ ...@@ -55,14 +58,17 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE like CONCAT('%', #projCode#, '%') PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty> </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#
...@@ -106,27 +112,9 @@ ...@@ -106,27 +112,9 @@
<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,116 +124,134 @@ ...@@ -136,116 +124,134 @@
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">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="order">
$orderBy$ $order$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="order">
ID asc ID asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<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>
<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, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 --> PRDT_TYPE, <!-- 产品类型 -->
INVENT_RECORD_ID, PRDT_CODE, <!-- 产品编码 -->
PRDT_TYPE, PRDT_NAME, <!-- 产品名称 -->
PRDT_CODE, <!-- 部件编码 --> PRDT_LENGTH, <!-- 产品-长 -->
PRDT_NAME, <!-- 部件名称 --> PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
NUM, <!-- 计划数量 --> NUM, <!-- 计划数量 -->
UNIT_WT, UNIT_WT, <!-- 计划单重 -->
TOTAL_WT, <!-- 计划重量 --> TOTAL_WT, <!-- 计划重量 -->
STATUS, <!-- 状态 0-未派工,1-已派工 --> ASSIGNED_NUM, <!-- 已派工数量 -->
UNASSIGNED_NUM, <!-- 待派工数量 -->
STATUS, <!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
ORG_NO, <!-- 生产组编码 --> ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 --> ORG_NAME, <!-- 生产组名称 -->
DOCUMENT_TYPE, <!-- 单据类型 0-非子母单;1-子母单 -->
REMARK, <!-- 备注 -->
REMARK1, <!-- 备注 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
REMARK, <!-- 备注 -->
FILE_PATH1, <!-- 文件地址1 --> FILE_PATH1, <!-- 文件地址1 -->
FILE_PATH2, <!-- 文件地址2 --> FILE_PATH2, <!-- 文件地址2 -->
FILE_PATH3, <!-- 文件地址3 --> FILE_PATH3, <!-- 文件地址3 -->
FILE_PATH4, <!-- 文件地址4 --> FILE_PATH4, <!-- 文件地址4 -->
FILE_PATH5, <!-- 文件地址5 --> FILE_PATH5, <!-- 文件地址5 -->
PRDT_SPEC, INVENT_RECORD_ID <!-- 存货档案ID -->
PART_TYPE, ) VALUES (
PART_CODE, #companyCode#, #depCode#, #prodOrderNo#, #projCode#,
PART_NAME, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#,
PART_SPEC, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#,
REMARK1, #partWidth#, #partThick#, #partSpec#, #planCompletionDate#, #num#, #unitWt#,
PRDT_LENGTH, <!-- 长 --> #totalWt#, #assignedNum#, #unassignedNum#, #status#, #factoryCode#, #factoryName#,
PRDT_WIDTH, <!-- 宽 --> #orgNo#, #orgName#, #documentType#, #remark#, #remark1#, #createdBy#, #createdName#,
PRDT_THICK, <!-- 厚 --> #createdTime#, #filePath1#, #filePath2#,
PART_LENGTH, <!-- 长 --> #filePath3#, #filePath4#, #filePath5#, #inventRecordId#)
PART_WIDTH, <!-- 宽 -->
PART_THICK, <!-- 厚 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
ASSIGNED_NUM,UNASSIGNED_NUM,DOCUMENT_TYPE)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#,
#prdtName#, #planCompletionDate#, #num#,#unitWt#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#,
#updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#prdtSpec#,#partType#,#partCode#,#partName#,#partSpec#,#remark1#,
#prdtLength#,#prdtWidth#,#prdtThick#,#partLength#,#partWidth#,#partThick#, #factoryCode#, #factoryName#,
0, #num#,0)
</insert> </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#, <!-- 项目名称 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 --> PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_TYPE = #prdtType#, PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_CODE = #prdtCode#, <!-- 部件编码 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_NAME = #prdtName#, <!-- 部件名称 --> PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 -->
PART_LENGTH = #partLength#, <!-- 零件-长 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
NUM = #num#, <!-- 计划数量 --> NUM = #num#, <!-- 计划数量 -->
UNIT_WT = #unitWt#, <!-- 单重 --> UNIT_WT = #unitWt#, <!-- 计划单重 -->
TOTAL_WT = #totalWt#, <!-- 计划重量 --> TOTAL_WT = #totalWt#, <!-- 计划重量 -->
STATUS = #status#, <!-- 状态 0-未派工,1-已派工 --> ASSIGNED_NUM = #assignedNum#, <!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#, <!-- 待派工数量 -->
STATUS = #status#, <!-- 状态:0.计划中,1.不分派工,2.全部派工 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
ORG_NO = #orgNo#, <!-- 生产组编码 --> ORG_NO = #orgNo#, <!-- 生产组编码 -->
ORG_NAME = #orgName#, <!-- 生产组名称 --> ORG_NAME = #orgName#, <!-- 生产组名称 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> DOCUMENT_TYPE = #documentType#, <!-- 单据类型 0-非子母单;1-子母单 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> REMARK = #remark#, <!-- 备注 -->
REMARK1 = #remark1#, <!-- 备注 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark#, <!-- 备注 -->
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 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 --> INVENT_RECORD_ID = #inventRecordId# <!-- 存货档案ID -->
FACTORY_NAME = #factoryName# <!-- 厂区名称 --> WHERE ID = #id#
WHERE
ID = #id#
</update> </update>
...@@ -256,10 +262,8 @@ ...@@ -256,10 +262,8 @@
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">
...@@ -277,9 +281,10 @@ ...@@ -277,9 +281,10 @@
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">
PROD_ORDER_NO like CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty> </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#"
......
$(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 {
...@@ -33,26 +29,24 @@ $(function () { ...@@ -33,26 +29,24 @@ $(function () {
}*/ }*/
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) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update' if (e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'){ || e.eiInfo.extAttr.methodName == 'insert') {
query(); query();
} }
}, },
onRowClick : function(e) { onRowClick: function (e) {
var block = detailGrid.getEiBlock(); var block = detailGrid.getEiBlock();
if (block != null) { if (block != null) {
block.setRows([]); block.setRows([]);
...@@ -60,12 +54,13 @@ $(function () { ...@@ -60,12 +54,13 @@ $(function () {
} }
var info = new EiInfo() var info = new EiInfo()
var parentId = e.model['planInfoNo']; var parentId = e.model['planInfoNo'];
info.set("parentId",parentId); info.set("parentId", parentId);
EiCommunicator.send("HPSC004","queryDetail",info,{ EiCommunicator.send("HPSC004", "queryDetail", info, {
onSuccess:function(ei){//返回结果集 onSuccess: function (ei) {//返回结果集
detailGrid.setEiInfo(ei); detailGrid.setEiInfo(ei);
},onFail:function(ei){} }, onFail: function (ei) {
},{async:false}); }
}, {async: false});
}, },
}, },
"detail":{ "detail":{
...@@ -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,8 +135,7 @@ $(function () { ...@@ -141,8 +135,7 @@ $(function () {
} }
} }
}, },
columns: [ columns: [{
{
field: "operator", field: "operator",
title: "操作", title: "操作",
template: function (item) { template: function (item) {
...@@ -154,11 +147,8 @@ $(function () { ...@@ -154,11 +147,8 @@ $(function () {
} }
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,6 +262,7 @@ function check(id, auditStatus) { ...@@ -272,6 +262,7 @@ function check(id, auditStatus) {
} }
let query = function () { let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
......
...@@ -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,15 +63,13 @@ ...@@ -73,15 +63,13 @@
<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="planCompletionDate" required='true' cname="计划结束时间" width="150" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/> enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/>
...@@ -90,7 +78,3 @@ ...@@ -90,7 +78,3 @@
</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