Commit 591b0662 by 江和松

材料计划生成采购计划重复校验添加

parent e8f1be20
...@@ -19,9 +19,9 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -19,9 +19,9 @@ import com.baosight.iplat4j.core.util.StringUtils;
* @history 2024-05-11 17:25:48 create * @history 2024-05-11 17:25:48 create
*/ */
public class HGCG001 extends DaoEPBase { public class HGCG001 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/ public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
...@@ -57,7 +57,10 @@ public class HGCG001 extends DaoEPBase { ...@@ -57,7 +57,10 @@ public class HGCG001 extends DaoEPBase {
public static final String FIELD_AUDIT_USER_ID = "auditUserId"; /* 审核人ID*/ public static final String FIELD_AUDIT_USER_ID = "auditUserId"; /* 审核人ID*/
public static final String FIELD_AUDIT_USER_NAME = "auditUserName"; /* 审核人名称*/ public static final String FIELD_AUDIT_USER_NAME = "auditUserName"; /* 审核人名称*/
public static final String FIELD_AUDIT_REASON = "auditReason"; /* 审核原因*/ public static final String FIELD_AUDIT_REASON = "auditReason"; /* 审核原因*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_MATERIAL_PLAN_ID = "materialPlanId"; /*材料计划id*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
...@@ -93,13 +96,13 @@ public class HGCG001 extends DaoEPBase { ...@@ -93,13 +96,13 @@ public class HGCG001 extends DaoEPBase {
public static final String COL_AUDIT_USER_ID = "AUDIT_USER_ID"; /* 审核人ID*/ public static final String COL_AUDIT_USER_ID = "AUDIT_USER_ID"; /* 审核人ID*/
public static final String COL_AUDIT_USER_NAME = "AUDIT_USER_NAME"; /* 审核人名称*/ public static final String COL_AUDIT_USER_NAME = "AUDIT_USER_NAME"; /* 审核人名称*/
public static final String COL_AUDIT_REASON = "AUDIT_REASON"; /* 审核原因*/ public static final String COL_AUDIT_REASON = "AUDIT_REASON"; /* 审核原因*/
public static final String QUERY = "HGCG001.query"; public static final String QUERY = "HGCG001.query";
public static final String COUNT = "HGCG001.count"; public static final String COUNT = "HGCG001.count";
public static final String INSERT = "HGCG001.insert"; public static final String INSERT = "HGCG001.insert";
public static final String UPDATE = "HGCG001.update"; public static final String UPDATE = "HGCG001.update";
public static final String DELETE = "HGCG001.delete"; public static final String DELETE = "HGCG001.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
...@@ -135,191 +138,199 @@ public class HGCG001 extends DaoEPBase { ...@@ -135,191 +138,199 @@ public class HGCG001 extends DaoEPBase {
private String auditUserId = " "; /* 审核人ID*/ private String auditUserId = " "; /* 审核人ID*/
private String auditUserName = " "; /* 审核人名称*/ private String auditUserName = " "; /* 审核人名称*/
private String auditReason = " "; /* 审核原因*/ private String auditReason = " "; /* 审核原因*/
private Integer inventTypeDetail; /*存货类型明细 1:构建 2:零件*/
private Long materialPlanId = new Long(0); /*材料计划id*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
public void initMetaData() { public void initMetaData() {
EiColumn eiColumn; EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID); eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true); eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE); eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码"); eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者"); eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME); eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建名称"); eiColumn.setDescName("记录创建名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间"); eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY); eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者"); eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME); eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改名称"); eiColumn.setDescName("记录修改名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间"); eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG); eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除"); eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE); eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码"); eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME); eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称"); eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_DATE); eiColumn = new EiColumn(FIELD_PLAN_DATE);
eiColumn.setDescName("计划日期"); eiColumn.setDescName("计划日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_NO); eiColumn = new EiColumn(FIELD_PLAN_NO);
eiColumn.setDescName("计划单号"); eiColumn.setDescName("计划单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE); eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码"); eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME); eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称"); eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC_ID); eiColumn = new EiColumn(FIELD_SPEC_ID);
eiColumn.setDescName("规格ID"); eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC); eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格"); eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL); eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质"); eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT); eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位"); eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH); eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("长度"); eiColumn.setDescName("长度");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH); eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("宽度"); eiColumn.setDescName("宽度");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK); eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("厚度"); eiColumn.setDescName("厚度");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_QTY); eiColumn = new EiColumn(FIELD_PLAN_QTY);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("计划数量"); eiColumn.setDescName("计划数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_UNIT_WEIGHT); eiColumn = new EiColumn(FIELD_PLAN_UNIT_WEIGHT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("计划单重"); eiColumn.setDescName("计划单重");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_WEIGHT); eiColumn = new EiColumn(FIELD_PLAN_WEIGHT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("计划重量"); eiColumn.setDescName("计划重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_QTY); eiColumn = new EiColumn(FIELD_PUR_QTY);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("采购数量"); eiColumn.setDescName("采购数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_UNIT_WEIGHT); eiColumn = new EiColumn(FIELD_PUR_UNIT_WEIGHT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("采购单重"); eiColumn.setDescName("采购单重");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_WEIGHT); eiColumn = new EiColumn(FIELD_PUR_WEIGHT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("采购重量"); eiColumn.setDescName("采购重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态:0-未审批,1-审核通过,2-审核未通过"); eiColumn.setDescName("状态:0-未审批,1-审核通过,2-审核未通过");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AUDIT_TIME); eiColumn = new EiColumn(FIELD_AUDIT_TIME);
eiColumn.setDescName("审核时间"); eiColumn.setDescName("审核时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AUDIT_USER_ID); eiColumn = new EiColumn(FIELD_AUDIT_USER_ID);
eiColumn.setDescName("审核人ID"); eiColumn.setDescName("审核人ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AUDIT_USER_NAME); eiColumn = new EiColumn(FIELD_AUDIT_USER_NAME);
eiColumn.setDescName("审核人名称"); eiColumn.setDescName("审核人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AUDIT_REASON); eiColumn = new EiColumn(FIELD_AUDIT_REASON);
eiColumn.setDescName("审核原因"); eiColumn.setDescName("审核原因");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL_PLAN_ID);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor. * the constructor.
*/ */
public HGCG001() { public HGCG001() {
initMetaData(); initMetaData();
} }
/** /**
* get the id . * get the id .
* @return the id * @return the id
...@@ -327,7 +338,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -327,7 +338,7 @@ public class HGCG001 extends DaoEPBase {
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
/** /**
* set the id . * set the id .
* *
...@@ -343,7 +354,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -343,7 +354,7 @@ public class HGCG001 extends DaoEPBase {
public String getAccountCode() { public String getAccountCode() {
return this.accountCode; return this.accountCode;
} }
/** /**
* set the accountCode - 企业编码. * set the accountCode - 企业编码.
* *
...@@ -359,7 +370,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -359,7 +370,7 @@ public class HGCG001 extends DaoEPBase {
public String getDepCode() { public String getDepCode() {
return this.depCode; return this.depCode;
} }
/** /**
* set the depCode - 部门编码. * set the depCode - 部门编码.
* *
...@@ -375,7 +386,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -375,7 +386,7 @@ public class HGCG001 extends DaoEPBase {
public String getCreatedBy() { public String getCreatedBy() {
return this.createdBy; return this.createdBy;
} }
/** /**
* set the createdBy - 记录创建者. * set the createdBy - 记录创建者.
* *
...@@ -391,7 +402,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -391,7 +402,7 @@ public class HGCG001 extends DaoEPBase {
public String getCreatedName() { public String getCreatedName() {
return this.createdName; return this.createdName;
} }
/** /**
* set the createdName - 记录创建名称. * set the createdName - 记录创建名称.
* *
...@@ -407,7 +418,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -407,7 +418,7 @@ public class HGCG001 extends DaoEPBase {
public String getCreatedTime() { public String getCreatedTime() {
return this.createdTime; return this.createdTime;
} }
/** /**
* set the createdTime - 记录创建时间. * set the createdTime - 记录创建时间.
* *
...@@ -423,7 +434,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -423,7 +434,7 @@ public class HGCG001 extends DaoEPBase {
public String getUpdatedBy() { public String getUpdatedBy() {
return this.updatedBy; return this.updatedBy;
} }
/** /**
* set the updatedBy - 记录修改者. * set the updatedBy - 记录修改者.
* *
...@@ -439,7 +450,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -439,7 +450,7 @@ public class HGCG001 extends DaoEPBase {
public String getUpdatedName() { public String getUpdatedName() {
return this.updatedName; return this.updatedName;
} }
/** /**
* set the updatedName - 记录修改名称. * set the updatedName - 记录修改名称.
* *
...@@ -455,7 +466,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -455,7 +466,7 @@ public class HGCG001 extends DaoEPBase {
public String getUpdatedTime() { public String getUpdatedTime() {
return this.updatedTime; return this.updatedTime;
} }
/** /**
* set the updatedTime - 记录修改时间. * set the updatedTime - 记录修改时间.
* *
...@@ -471,7 +482,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -471,7 +482,7 @@ public class HGCG001 extends DaoEPBase {
public Integer getDeleteFlag() { public Integer getDeleteFlag() {
return this.deleteFlag; return this.deleteFlag;
} }
/** /**
* set the deleteFlag - 0-未删除,1-已删除. * set the deleteFlag - 0-未删除,1-已删除.
* *
...@@ -487,7 +498,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -487,7 +498,7 @@ public class HGCG001 extends DaoEPBase {
public String getCompanyCode() { public String getCompanyCode() {
return this.companyCode; return this.companyCode;
} }
/** /**
* set the companyCode - 公司编码. * set the companyCode - 公司编码.
* *
...@@ -503,7 +514,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -503,7 +514,7 @@ public class HGCG001 extends DaoEPBase {
public String getCompanyName() { public String getCompanyName() {
return this.companyName; return this.companyName;
} }
/** /**
* set the companyName - 公司名称. * set the companyName - 公司名称.
* *
...@@ -519,7 +530,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -519,7 +530,7 @@ public class HGCG001 extends DaoEPBase {
public String getPlanDate() { public String getPlanDate() {
return this.planDate; return this.planDate;
} }
/** /**
* set the planDate - 计划日期. * set the planDate - 计划日期.
* *
...@@ -535,7 +546,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -535,7 +546,7 @@ public class HGCG001 extends DaoEPBase {
public String getPlanNo() { public String getPlanNo() {
return this.planNo; return this.planNo;
} }
/** /**
* set the planNo - 计划单号. * set the planNo - 计划单号.
* *
...@@ -551,7 +562,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -551,7 +562,7 @@ public class HGCG001 extends DaoEPBase {
public String getInventType() { public String getInventType() {
return this.inventType; return this.inventType;
} }
/** /**
* set the inventType - 存货类型. * set the inventType - 存货类型.
* *
...@@ -567,7 +578,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -567,7 +578,7 @@ public class HGCG001 extends DaoEPBase {
public String getInventCode() { public String getInventCode() {
return this.inventCode; return this.inventCode;
} }
/** /**
* set the inventCode - 存货编码. * set the inventCode - 存货编码.
* *
...@@ -583,7 +594,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -583,7 +594,7 @@ public class HGCG001 extends DaoEPBase {
public String getInventName() { public String getInventName() {
return this.inventName; return this.inventName;
} }
/** /**
* set the inventName - 存货名称. * set the inventName - 存货名称.
* *
...@@ -599,7 +610,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -599,7 +610,7 @@ public class HGCG001 extends DaoEPBase {
public Long getSpecId() { public Long getSpecId() {
return this.specId; return this.specId;
} }
/** /**
* set the specId - 规格ID. * set the specId - 规格ID.
* *
...@@ -615,7 +626,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -615,7 +626,7 @@ public class HGCG001 extends DaoEPBase {
public String getSpec() { public String getSpec() {
return this.spec; return this.spec;
} }
/** /**
* set the spec - 规格. * set the spec - 规格.
* *
...@@ -631,7 +642,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -631,7 +642,7 @@ public class HGCG001 extends DaoEPBase {
public String getMaterial() { public String getMaterial() {
return this.material; return this.material;
} }
/** /**
* set the material - 材质. * set the material - 材质.
* *
...@@ -647,7 +658,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -647,7 +658,7 @@ public class HGCG001 extends DaoEPBase {
public String getUnit() { public String getUnit() {
return this.unit; return this.unit;
} }
/** /**
* set the unit - 单位. * set the unit - 单位.
* *
...@@ -663,7 +674,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -663,7 +674,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getLength() { public BigDecimal getLength() {
return this.length; return this.length;
} }
/** /**
* set the length - 长度. * set the length - 长度.
* *
...@@ -679,7 +690,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -679,7 +690,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getWidth() { public BigDecimal getWidth() {
return this.width; return this.width;
} }
/** /**
* set the width - 宽度. * set the width - 宽度.
* *
...@@ -695,7 +706,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -695,7 +706,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getThick() { public BigDecimal getThick() {
return this.thick; return this.thick;
} }
/** /**
* set the thick - 厚度. * set the thick - 厚度.
* *
...@@ -711,7 +722,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -711,7 +722,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getPlanQty() { public BigDecimal getPlanQty() {
return this.planQty; return this.planQty;
} }
/** /**
* set the planQty - 计划数量. * set the planQty - 计划数量.
* *
...@@ -727,7 +738,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -727,7 +738,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getPlanUnitWeight() { public BigDecimal getPlanUnitWeight() {
return this.planUnitWeight; return this.planUnitWeight;
} }
/** /**
* set the planUnitWeight - 计划单重. * set the planUnitWeight - 计划单重.
* *
...@@ -743,7 +754,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -743,7 +754,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getPlanWeight() { public BigDecimal getPlanWeight() {
return this.planWeight; return this.planWeight;
} }
/** /**
* set the planWeight - 计划重量. * set the planWeight - 计划重量.
* *
...@@ -759,7 +770,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -759,7 +770,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getPurQty() { public BigDecimal getPurQty() {
return this.purQty; return this.purQty;
} }
/** /**
* set the purQty - 采购数量. * set the purQty - 采购数量.
* *
...@@ -775,7 +786,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -775,7 +786,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getPurUnitWeight() { public BigDecimal getPurUnitWeight() {
return this.purUnitWeight; return this.purUnitWeight;
} }
/** /**
* set the purUnitWeight - 采购单重. * set the purUnitWeight - 采购单重.
* *
...@@ -791,7 +802,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -791,7 +802,7 @@ public class HGCG001 extends DaoEPBase {
public BigDecimal getPurWeight() { public BigDecimal getPurWeight() {
return this.purWeight; return this.purWeight;
} }
/** /**
* set the purWeight - 采购重量. * set the purWeight - 采购重量.
* *
...@@ -807,7 +818,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -807,7 +818,7 @@ public class HGCG001 extends DaoEPBase {
public Integer getStatus() { public Integer getStatus() {
return this.status; return this.status;
} }
/** /**
* set the status - 状态:0-未审批,1-审核通过,2-审核未通过. * set the status - 状态:0-未审批,1-审核通过,2-审核未通过.
* *
...@@ -823,7 +834,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -823,7 +834,7 @@ public class HGCG001 extends DaoEPBase {
public String getAuditTime() { public String getAuditTime() {
return this.auditTime; return this.auditTime;
} }
/** /**
* set the auditTime - 审核时间. * set the auditTime - 审核时间.
* *
...@@ -839,7 +850,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -839,7 +850,7 @@ public class HGCG001 extends DaoEPBase {
public String getAuditUserId() { public String getAuditUserId() {
return this.auditUserId; return this.auditUserId;
} }
/** /**
* set the auditUserId - 审核人ID. * set the auditUserId - 审核人ID.
* *
...@@ -855,7 +866,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -855,7 +866,7 @@ public class HGCG001 extends DaoEPBase {
public String getAuditUserName() { public String getAuditUserName() {
return this.auditUserName; return this.auditUserName;
} }
/** /**
* set the auditUserName - 审核人名称. * set the auditUserName - 审核人名称.
* *
...@@ -871,7 +882,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -871,7 +882,7 @@ public class HGCG001 extends DaoEPBase {
public String getAuditReason() { public String getAuditReason() {
return this.auditReason; return this.auditReason;
} }
/** /**
* set the auditReason - 审核原因. * set the auditReason - 审核原因.
* *
...@@ -880,6 +891,23 @@ public class HGCG001 extends DaoEPBase { ...@@ -880,6 +891,23 @@ public class HGCG001 extends DaoEPBase {
public void setAuditReason(String auditReason) { public void setAuditReason(String auditReason) {
this.auditReason = auditReason; this.auditReason = auditReason;
} }
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
public Long getMaterialPlanId() {
return materialPlanId;
}
public void setMaterialPlanId(Long materialPlanId) {
this.materialPlanId = materialPlanId;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -887,7 +915,7 @@ public class HGCG001 extends DaoEPBase { ...@@ -887,7 +915,7 @@ public class HGCG001 extends DaoEPBase {
*/ */
@Override @Override
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode)); setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
...@@ -923,14 +951,16 @@ public class HGCG001 extends DaoEPBase { ...@@ -923,14 +951,16 @@ public class HGCG001 extends DaoEPBase {
setAuditUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_USER_ID)), auditUserId)); setAuditUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_USER_ID)), auditUserId));
setAuditUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_USER_NAME)), auditUserName)); setAuditUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_USER_NAME)), auditUserName));
setAuditReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_REASON)), auditReason)); setAuditReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_REASON)), auditReason));
setMaterialPlanId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MATERIAL_PLAN_ID)), materialPlanId));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
} }
/** /**
* set the value to Map. * set the value to Map.
*/ */
@Override @Override
public Map toMap() { public Map toMap() {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE))); map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
...@@ -967,7 +997,8 @@ public class HGCG001 extends DaoEPBase { ...@@ -967,7 +997,8 @@ public class HGCG001 extends DaoEPBase {
map.put(FIELD_AUDIT_USER_ID, StringUtils.toString(auditUserId, eiMetadata.getMeta(FIELD_AUDIT_USER_ID))); map.put(FIELD_AUDIT_USER_ID, StringUtils.toString(auditUserId, eiMetadata.getMeta(FIELD_AUDIT_USER_ID)));
map.put(FIELD_AUDIT_USER_NAME, StringUtils.toString(auditUserName, eiMetadata.getMeta(FIELD_AUDIT_USER_NAME))); map.put(FIELD_AUDIT_USER_NAME, StringUtils.toString(auditUserName, eiMetadata.getMeta(FIELD_AUDIT_USER_NAME)));
map.put(FIELD_AUDIT_REASON, StringUtils.toString(auditReason, eiMetadata.getMeta(FIELD_AUDIT_REASON))); map.put(FIELD_AUDIT_REASON, StringUtils.toString(auditReason, eiMetadata.getMeta(FIELD_AUDIT_REASON)));
map.put(FIELD_MATERIAL_PLAN_ID,StringUtils.toString(materialPlanId, eiMetadata.getMeta(FIELD_MATERIAL_PLAN_ID)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map; return map;
} }
} }
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
AUDIT_TIME as "auditTime", <!-- 审核时间 --> AUDIT_TIME as "auditTime", <!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId", <!-- 审核人ID --> AUDIT_USER_ID as "auditUserId", <!-- 审核人ID -->
AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 --> AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 -->
AUDIT_REASON as "auditReason" <!-- 审核原因 --> AUDIT_REASON as "auditReason", <!-- 审核原因 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 -->
MATERIAL_PLAN_ID as "materialPlanId" <!-- 材料计划id -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -78,6 +80,12 @@ ...@@ -78,6 +80,12 @@
<isNotEmpty prepend=" AND " property="auditUserName"> <isNotEmpty prepend=" AND " property="auditUserName">
AUDIT_USER_NAME = #auditUserName# AUDIT_USER_NAME = #auditUserName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialPlanId">
MATERIAL_PLAN_ID = #materialPlanId#
</isNotEmpty>
</sql> </sql>
<sql id="idCondition"> <sql id="idCondition">
...@@ -90,6 +98,9 @@ ...@@ -90,6 +98,9 @@
<isNotEmpty prepend=" AND " property="planNos"> <isNotEmpty prepend=" AND " property="planNos">
PLAN_NO IN <iterate open="(" close=")" conjunction="," property="planNos">#planNos[]#</iterate> PLAN_NO IN <iterate open="(" close=")" conjunction="," property="planNos">#planNos[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="materialPlanIds">
MATERIAL_PLAN_ID IN <iterate open="(" close=")" conjunction="," property="materialPlanIds">#materialPlanIds[]#</iterate>
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -152,12 +163,14 @@ ...@@ -152,12 +163,14 @@
PLAN_QTY, <!-- 计划数量 --> PLAN_QTY, <!-- 计划数量 -->
PLAN_UNIT_WEIGHT, <!-- 计划单重 --> PLAN_UNIT_WEIGHT, <!-- 计划单重 -->
PLAN_WEIGHT, <!-- 计划重量 --> PLAN_WEIGHT, <!-- 计划重量 -->
STATUS <!-- 状态:0-未审批,1-审核通过,2-审核未通过 --> STATUS, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
INVENT_TYPE_DETAIL, <!-- 存货类型明细 -->
MATERIAL_PLAN_ID <!-- 材料计划id -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#, #companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#planQty#, #planUnitWeight#, #planWeight#, #status# #planQty#, #planUnitWeight#, #planWeight#, #status#, #inventTypeDetail#, #materialPlanId#
) )
</insert> </insert>
......
...@@ -23,7 +23,7 @@ import java.util.stream.Collectors; ...@@ -23,7 +23,7 @@ import java.util.stream.Collectors;
* @date:2024/5/9,14:33 * @date:2024/5/9,14:33
*/ */
public class HGCGTools { public class HGCGTools {
/** /**
* HGCG001 工具类 * HGCG001 工具类
* *
...@@ -31,7 +31,7 @@ public class HGCGTools { ...@@ -31,7 +31,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33 * @date:2024/5/9,14:33
*/ */
public static class HgCg001 { public static class HgCg001 {
/** /**
* 锁 * 锁
* *
...@@ -46,7 +46,7 @@ public class HGCGTools { ...@@ -46,7 +46,7 @@ public class HGCGTools {
paramMap.put("planNos", planNos); paramMap.put("planNos", planNos);
DaoBase.getInstance().update(HGSqlConstant.HgCg001.LOCK, paramMap); DaoBase.getInstance().update(HGSqlConstant.HgCg001.LOCK, paramMap);
} }
/** /**
* 查询 * 查询
* *
...@@ -69,7 +69,20 @@ public class HGCGTools { ...@@ -69,7 +69,20 @@ public class HGCGTools {
Map<String, Object> paramMap = new HashMap(); Map<String, Object> paramMap = new HashMap();
return DaoBase.getInstance().query(HGCG001.QUERY, paramMap); return DaoBase.getInstance().query(HGCG001.QUERY, paramMap);
} }
/**
* 查询
*
* @param materialPlanIds
* @return
*/
public static List<HGCG001> listByMaterialPlanIds(List<Long> materialPlanIds) {
AssertUtils.isEmpty(materialPlanIds, "材料计划id不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("materialPlanIds", materialPlanIds);
return DaoBase.getInstance().query(HGCG001.QUERY, paramMap);
}
/** /**
* 查询 * 查询
* *
...@@ -80,7 +93,7 @@ public class HGCGTools { ...@@ -80,7 +93,7 @@ public class HGCGTools {
List<HGCG001> results = list(planNos); List<HGCG001> results = list(planNos);
return results.stream().collect(Collectors.toMap(HGCG001::getPlanNo, item -> item)); return results.stream().collect(Collectors.toMap(HGCG001::getPlanNo, item -> item));
} }
/** /**
* 修改状态 * 修改状态
* *
...@@ -95,9 +108,9 @@ public class HGCGTools { ...@@ -95,9 +108,9 @@ public class HGCGTools {
paramMap.put("status", status); paramMap.put("status", status);
DaoUtils.update(HGSqlConstant.HgCg001.UPDATE_STATUS, paramMap); DaoUtils.update(HGSqlConstant.HgCg001.UPDATE_STATUS, paramMap);
} }
} }
/** /**
* HGCG002 工具类 * HGCG002 工具类
* *
...@@ -105,7 +118,7 @@ public class HGCGTools { ...@@ -105,7 +118,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33 * @date:2024/5/9,14:33
*/ */
public static class HgCg002 { public static class HgCg002 {
/** /**
* 锁 * 锁
* *
...@@ -120,7 +133,7 @@ public class HGCGTools { ...@@ -120,7 +133,7 @@ public class HGCGTools {
paramMap.put("contractNos", contractNos); paramMap.put("contractNos", contractNos);
DaoBase.getInstance().update(HGSqlConstant.HgCg002.LOCK, paramMap); DaoBase.getInstance().update(HGSqlConstant.HgCg002.LOCK, paramMap);
} }
/** /**
* 修改状态 * 修改状态
* *
...@@ -135,7 +148,7 @@ public class HGCGTools { ...@@ -135,7 +148,7 @@ public class HGCGTools {
paramMap.put("status", status); paramMap.put("status", status);
DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_STATUS, paramMap); DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_STATUS, paramMap);
} }
/** /**
* 修改状态 * 修改状态
* *
...@@ -156,7 +169,7 @@ public class HGCGTools { ...@@ -156,7 +169,7 @@ public class HGCGTools {
paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveQty.multiply(dbCg002.getPurUnitWeight())); paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveQty.multiply(dbCg002.getPurUnitWeight()));
DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_RECEIVE, paramMap); DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_RECEIVE, paramMap);
} }
/** /**
* 查询 * 查询
* *
...@@ -169,7 +182,7 @@ public class HGCGTools { ...@@ -169,7 +182,7 @@ public class HGCGTools {
paramMap.put("contractNos", contractNos); paramMap.put("contractNos", contractNos);
return DaoBase.getInstance().query(HGCG002.QUERY, paramMap); return DaoBase.getInstance().query(HGCG002.QUERY, paramMap);
} }
/** /**
* 查询 * 查询
* *
...@@ -180,9 +193,9 @@ public class HGCGTools { ...@@ -180,9 +193,9 @@ public class HGCGTools {
List<HGCG002A> results = list(contractNos); List<HGCG002A> results = list(contractNos);
return results.stream().collect(Collectors.toMap(HGCG002A::getContractNo, item -> item)); return results.stream().collect(Collectors.toMap(HGCG002A::getContractNo, item -> item));
} }
} }
/** /**
* HGCG003 工具类 * HGCG003 工具类
* *
...@@ -190,7 +203,7 @@ public class HGCGTools { ...@@ -190,7 +203,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33 * @date:2024/5/9,14:33
*/ */
public static class HgCg003 { public static class HgCg003 {
/** /**
* 锁 * 锁
* *
...@@ -205,7 +218,7 @@ public class HGCGTools { ...@@ -205,7 +218,7 @@ public class HGCGTools {
paramMap.put("receiveNos", receiveNos); paramMap.put("receiveNos", receiveNos);
DaoBase.getInstance().update(HGSqlConstant.HgCg003.LOCK, paramMap); DaoBase.getInstance().update(HGSqlConstant.HgCg003.LOCK, paramMap);
} }
/** /**
* 查询 * 查询
* *
...@@ -218,7 +231,7 @@ public class HGCGTools { ...@@ -218,7 +231,7 @@ public class HGCGTools {
paramMap.put("receiveNos", receiveNos); paramMap.put("receiveNos", receiveNos);
return DaoBase.getInstance().query(HGCG003.QUERY, paramMap); return DaoBase.getInstance().query(HGCG003.QUERY, paramMap);
} }
/** /**
* 查询 * 查询
* *
...@@ -229,7 +242,7 @@ public class HGCGTools { ...@@ -229,7 +242,7 @@ public class HGCGTools {
List<HGCG003> results = list(receiveNos); List<HGCG003> results = list(receiveNos);
return results.stream().collect(Collectors.toMap(HGCG003::getReceiveNo, item -> item)); return results.stream().collect(Collectors.toMap(HGCG003::getReceiveNo, item -> item));
} }
/** /**
* 修改状态 * 修改状态
* *
...@@ -244,7 +257,7 @@ public class HGCGTools { ...@@ -244,7 +257,7 @@ public class HGCGTools {
paramMap.put("status", status); paramMap.put("status", status);
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_STATUS, paramMap); DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_STATUS, paramMap);
} }
/** /**
* 修改状态 * 修改状态
* *
...@@ -258,8 +271,8 @@ public class HGCGTools { ...@@ -258,8 +271,8 @@ public class HGCGTools {
paramMap.put(HGCG003.FIELD_DEPOSIT_QTY, zl001.getQualifyQty()); paramMap.put(HGCG003.FIELD_DEPOSIT_QTY, zl001.getQualifyQty());
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_CONFIRM, paramMap); DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_CONFIRM, paramMap);
} }
} }
} }
...@@ -5,6 +5,7 @@ import com.baosight.hggp.common.AssignStatusEnum; ...@@ -5,6 +5,7 @@ import com.baosight.hggp.common.AssignStatusEnum;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cg.domain.HGCG001; import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
...@@ -31,7 +32,7 @@ import java.util.stream.Collectors; ...@@ -31,7 +32,7 @@ import java.util.stream.Collectors;
* @date:2024/1/15,11:20 * @date:2024/1/15,11:20
*/ */
public class ServiceHGSC009A extends ServiceBase { public class ServiceHGSC009A extends ServiceBase {
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -50,7 +51,7 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -50,7 +51,7 @@ public class ServiceHGSC009A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 查询数据列表 * 查询数据列表
* *
...@@ -67,7 +68,7 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -67,7 +68,7 @@ public class ServiceHGSC009A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 保存操作. * 保存操作.
* *
...@@ -107,7 +108,7 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -107,7 +108,7 @@ public class ServiceHGSC009A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 校验保存的数据 * 校验保存的数据
* *
...@@ -121,7 +122,7 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -121,7 +122,7 @@ public class ServiceHGSC009A extends ServiceBase {
//AssertUtils.isNull(hgsc009A.s(), "是否启用不能为空"); //AssertUtils.isNull(hgsc009A.s(), "是否启用不能为空");
} }
} }
/** /**
* 新增 * 新增
* *
...@@ -133,7 +134,7 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -133,7 +134,7 @@ public class ServiceHGSC009A extends ServiceBase {
DaoUtils.insert(HGSC009A.INSERT, hgsc009A); DaoUtils.insert(HGSC009A.INSERT, hgsc009A);
} }
/** /**
* 修改数据 * 修改数据
* *
...@@ -142,9 +143,9 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -142,9 +143,9 @@ public class ServiceHGSC009A extends ServiceBase {
private void modify(HGSC009A hgsc009A) { private void modify(HGSC009A hgsc009A) {
DaoUtils.update(HGSC009A.UPDATE, hgsc009A); DaoUtils.update(HGSC009A.UPDATE, hgsc009A);
} }
/** /**
* 修改操作 * 修改操作
* *
...@@ -170,7 +171,7 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -170,7 +171,7 @@ public class ServiceHGSC009A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/** /**
* 删除操作 * 删除操作
* *
...@@ -219,11 +220,14 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -219,11 +220,14 @@ public class ServiceHGSC009A extends ServiceBase {
inventUnitMap = hgpz005List.stream().collect(Collectors.toMap(HGPZ005::getInventCode,HGPZ005::getUnit,(v1,v2)->v1)); inventUnitMap = hgpz005List.stream().collect(Collectors.toMap(HGPZ005::getInventCode,HGPZ005::getUnit,(v1,v2)->v1));
} }
} }
// 数据校验
this.checkInsertcgData(hgsc009AList);
for (HGSC009A hgsc009 : hgsc009AList) { for (HGSC009A hgsc009 : hgsc009AList) {
// 写入子表数据 // 写入子表数据
HGCG001 hgcg001 = new HGCG001(); HGCG001 hgcg001 = new HGCG001();
BeanUtils.copyProperties(hgsc009,hgcg001); BeanUtils.copyProperties(hgsc009,hgcg001);
hgcg001.setMaterialPlanId(hgsc009.getId());
hgcg001.setCompanyCode(hgsc009.getCompanyCode()); hgcg001.setCompanyCode(hgsc009.getCompanyCode());
hgcg001.setCompanyName(hgsc009.getCompanyName()); hgcg001.setCompanyName(hgsc009.getCompanyName());
hgcg001.setInventCode(hgsc009.getInventCode()); hgcg001.setInventCode(hgsc009.getInventCode());
...@@ -250,5 +254,14 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -250,5 +254,14 @@ public class ServiceHGSC009A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
private void checkInsertcgData(List<HGSC009A> hgsc009AList) {
List<Long> materialPlanIds = hgsc009AList.stream().map(HGSC009A::getId).collect(Collectors.toList());
List<HGCG001> hgcg001List = HGCGTools.HgCg001.listByMaterialPlanIds(materialPlanIds);
hgsc009AList.forEach(o->{
HGCG001 hgcg001 = hgcg001List.stream().filter(c -> c.getMaterialPlanId().intValue() == o.getId()).findAny().orElse(null);
AssertUtils.isTrue(Objects.nonNull(hgcg001), String.format("材料计划[%s]已生成采购计划", o.getPlanMaterialCode()));
});
}
} }
...@@ -107,7 +107,6 @@ $(function () { ...@@ -107,7 +107,6 @@ $(function () {
resultGrid.setCellValue(e.items[0],"companyName",companyCodeBox[i]['companyName']); resultGrid.setCellValue(e.items[0],"companyName",companyCodeBox[i]['companyName']);
} }
} }
loadChange(grid, e, "projCode");
} }
// 判断父级节点是否发生变化 // 判断父级节点是否发生变化
if (e.field == "projCode") { if (e.field == "projCode") {
...@@ -136,9 +135,6 @@ $(function () { ...@@ -136,9 +135,6 @@ $(function () {
} }
let query = function () {
resultGrid.dataSource.page(1);
}
let save = function (btnNode) { let save = function (btnNode) {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length < 1) { if (rows.length < 1) {
...@@ -174,6 +170,9 @@ $(function () { ...@@ -174,6 +170,9 @@ $(function () {
}); });
let query = function () {
resultGrid.dataSource.page(1);
}
/** /**
* 显示附件详情 * 显示附件详情
* *
...@@ -237,8 +236,12 @@ function INSERTCG() { ...@@ -237,8 +236,12 @@ function INSERTCG() {
ok: function () { ok: function () {
EiCommunicator.send('HGSC009A', 'insertcg', inEiInfo, { EiCommunicator.send('HGSC009A', 'insertcg', inEiInfo, {
onSuccess(response) { onSuccess(response) {
NotificationUtil(response.msg); if (response.status == 1){
query(); NotificationUtil(response.msg);
query();
}else {
NotificationUtil(response.msg, "error");
}
}, },
onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error"); NotificationUtil("执行失败!", "error");
......
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=companyName#" itemTemplate="#=companyName#"
textField="textField" valueField="valueField" textField="companyName" valueField="companyCode"
maxLength="16" readonly="false" width="200" required="true" maxLength="16" readonly="false" width="100" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center" hidden="true" /> <EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center"/>
<%-- <EF:EFComboColumn ename="projCode" cname="项目编码"--%> <%-- <EF:EFComboColumn ename="projCode" cname="项目编码"--%>
<%-- columnTemplate="#=textField#" itemTemplate="#=textField#"--%> <%-- columnTemplate="#=textField#" itemTemplate="#=textField#"--%>
<%-- textField="textField" valueField="valueField"--%> <%-- textField="textField" valueField="valueField"--%>
......
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