Commit 38d7ecbe by yukang

生产下料

parent 832fb1fb
/**
* Generate time : 2024-01-10 16:44:48
* Version : 1.0
*/
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;
/** /**
* THpsc002 * Project: <br>
* Title:HPSC006.java <br>
* Description: <br>
* *
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-05 9:36:07 create
*/ */
public class HPSC006 extends DaoEPBase { public class HPSC006 extends DaoEPBase {
private Long id = 0L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 物料类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 物料编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 物料名称*/
public static final String FIELD_INVENT_LENGTH = "inventLength"; /* 物料-长*/
public static final String FIELD_INVENT_WIDTH = "inventWidth"; /* 物料-宽*/
public static final String FIELD_INVENT_THICK = "inventThick"; /* 物料-厚*/
public static final String FIELD_INVENT_SPEC = "inventSpec"; /* 物料规格*/
public static final String FIELD_PLAN_COMPLETION_DATE = "planCompletionDate"; /* 计划完成日期*/
public static final String FIELD_NUM = "num"; /* 计划数量*/
public static final String FIELD_UNIT_WT = "unitWt"; /* 计划单重*/
public static final String FIELD_TOTAL_WT = "totalWt"; /* 计划重量*/
public static final String FIELD_ACTUAL_COMPLETION_DATE = "actualCompletionDate"; /* 实际完工日期*/
public static final String FIELD_ACTUAL_COMPLETION_NUM = "actualCompletionNum"; /* 实际完工数量*/
public static final String FIELD_STATUS = "status"; /* 状态 0-计划中,1-生产中,2-已完成*/
public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/
public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_FILE_PATH1 = "filePath1"; /* 文件地址1*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 物料类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 物料编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 物料名称*/
public static final String COL_INVENT_LENGTH = "INVENT_LENGTH"; /* 物料-长*/
public static final String COL_INVENT_WIDTH = "INVENT_WIDTH"; /* 物料-宽*/
public static final String COL_INVENT_THICK = "INVENT_THICK"; /* 物料-厚*/
public static final String COL_INVENT_SPEC = "INVENT_SPEC"; /* 物料规格*/
public static final String COL_PLAN_COMPLETION_DATE = "PLAN_COMPLETION_DATE"; /* 计划完成日期*/
public static final String COL_NUM = "NUM"; /* 计划数量*/
public static final String COL_UNIT_WT = "UNIT_WT"; /* 计划单重*/
public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 计划重量*/
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_STATUS = "STATUS"; /* 状态 0-计划中,1-生产中,2-已完成*/
public static final String COL_ORG_NO = "ORG_NO"; /* 生产组编码*/
public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_FILE_PATH1 = "FILE_PATH1"; /* 文件地址1*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String QUERY = "t_hpsc006.query";
public static final String COUNT = "t_hpsc006.count";
public static final String INSERT = "t_hpsc006.insert";
public static final String UPDATE = "t_hpsc006.update";
public static final String DELETE = "t_hpsc006.delete";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String parentId = ""; /* 父节点-部件编码*/ private String productionOrderNo = " "; /* 生产订单号*/
private String parentPrdtName = " "; /* 父节点-部件名称*/ private Integer inventType; /* 物料类型*/
private String type = " "; /* 类别*/ private String inventCode = " "; /* 物料编码*/
private String leaf = "1"; /* 是否有叶子节点*/ private String inventName = " "; /* 物料名称*/
private String sort = " "; /* 排序字段*/ private BigDecimal inventLength = new BigDecimal("0"); /* 物料-长*/
private String icon = " "; /* 图片地址*/ private BigDecimal inventWidth = new BigDecimal("0"); /* 物料-宽*/
private Integer prdtType = 0; /*部件类型*/ private BigDecimal inventThick = new BigDecimal("0"); /* 物料-厚*/
private String prdtCode = " "; /* 部件编码*/ private String inventSpec = " "; /* 物料规格*/
private String prdtName = " "; /* 部件名称*/ private String planCompletionDate = " "; /* 计划完成日期*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/ private BigDecimal num = new BigDecimal(0.000); /* 计划数量*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/ private BigDecimal unitWt = new BigDecimal("0"); /* 计划单重*/
private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/ private BigDecimal totalWt = new BigDecimal(0.000); /* 计划重量*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 总重*/ private String actualCompletionDate = " "; /* 实际完工日期*/
private String filePath1 = " "; /* 文件地址1*/ private BigDecimal actualCompletionNum = new BigDecimal("0"); /* 实际完工数量*/
private String filePath2 = " "; /* 文件地址2*/ private Integer status = new Integer(0); /* 状态 0-计划中,1-生产中,2-已完成*/
private String filePath3 = " "; /* 文件地址3*/ private String orgNo = " "; /* 生产组编码*/
private String filePath4 = " "; /* 文件地址4*/ private String orgName = " "; /* 生产组名称*/
private String filePath5 = " "; /* 文件地址5*/ private String factoryCode = " "; /* 厂区编码*/
private Integer status = 0; /* 状态 0-未提交,1-已提交*/ private String factoryName = " "; /* 厂区名称*/
private Integer delStatus = 0; /* 状态 1未删除,0已删除*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdTime; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedTime; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Integer lv = 0; /*层级*/ private String filePath1 = " "; /* 文件地址1*/
private Integer inventRecordId = new Integer(0); /* 存货档案ID*/
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.
*/ */
public void initMetaData() { public void initMetaData() {
EiColumn eiColumn; EiColumn eiColumn;
eiColumn = new EiColumn("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("companyCode"); eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("deptCode"); eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projCode");
eiColumn.setDescName("项目编码"); eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("projName"); eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("parentId"); eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO);
eiColumn.setDescName("父节点-部件编码"); eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("parentPrdtName");
eiColumn.setDescName("父节点-部件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("type"); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("类别"); eiColumn.setDescName("物料类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("leaf"); eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("是否有叶子节点"); eiColumn.setDescName("物料编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("sort"); eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("排序字段"); eiColumn.setDescName("物料名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("icon"); eiColumn = new EiColumn(FIELD_INVENT_LENGTH);
eiColumn.setDescName("图片地址"); eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("物料-长");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtType"); eiColumn = new EiColumn(FIELD_INVENT_WIDTH);
eiColumn.setDescName("部件类型"); eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("物料-宽");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtCode"); eiColumn = new EiColumn(FIELD_INVENT_THICK);
eiColumn.setDescName("部件编码"); eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("物料-厚");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtName"); eiColumn = new EiColumn(FIELD_INVENT_SPEC);
eiColumn.setDescName("部件名称"); eiColumn.setDescName("物料规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("inventRecordId"); eiColumn = new EiColumn(FIELD_PLAN_COMPLETION_DATE);
eiColumn.setDescName("存货档案ID"); eiColumn.setDescName("计划完成日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("num"); eiColumn = new EiColumn(FIELD_NUM);
eiColumn.setDescName("数量"); eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("计划数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("unitWt"); eiColumn = new EiColumn(FIELD_UNIT_WT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("单重"); eiColumn.setDescName("计划单重");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("totalWt"); eiColumn = new EiColumn(FIELD_TOTAL_WT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("总重"); eiColumn.setDescName("计划重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("filePath1"); eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_DATE);
eiColumn.setDescName("文件地址1"); eiColumn.setDescName("实际完工日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("filePath2"); eiColumn = new EiColumn(FIELD_ACTUAL_COMPLETION_NUM);
eiColumn.setDescName("文件地址2"); eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("实际完工数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("filePath3"); eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("文件地址3"); eiColumn.setDescName("状态 0-计划中,1-生产中,2-已完成");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("filePath4"); eiColumn = new EiColumn(FIELD_ORG_NO);
eiColumn.setDescName("文件地址4"); eiColumn.setDescName("生产组编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("filePath5"); eiColumn = new EiColumn(FIELD_ORG_NAME);
eiColumn.setDescName("文件地址5"); eiColumn.setDescName("生产组名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("status"); eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("状态 0-未提交,1-已提交"); eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("delStatus"); eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("状态 1未删除,0已删除"); eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdBy"); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("createdTime"); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedBy"); eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人"); eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("updatedTime"); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("remark"); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("备注"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("lv"); eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("层级"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH1);
eiColumn = new EiColumn("spec"); eiColumn.setDescName("文件地址1");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length"); eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setType("N"); eiColumn.setDescName("存货档案ID");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("width");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("thick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor * the constructor.
*/ */
public HPSC006() { public HPSC006() {
initMetaData(); initMetaData();
} }
/** /**
* get the id * get the id .
* @return the id * @return the id
*/ */
public Long getId() { public Long getId() {
...@@ -238,14 +295,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -238,14 +295,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the id * set the id .
*
* @param id
*/ */
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/** /**
* get the companyCode - 企业编码 预留 * get the companyCode - 企业编码 预留.
* @return the companyCode * @return the companyCode
*/ */
public String getCompanyCode() { public String getCompanyCode() {
...@@ -253,29 +311,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -253,29 +311,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the companyCode - 企业编码 预留 * set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/ */
public void setCompanyCode(String companyCode) { public void setCompanyCode(String companyCode) {
this.companyCode = companyCode; this.companyCode = companyCode;
} }
/** /**
* get the deptCode - 部门编码 预留 * get the projCode - 项目编码.
* @return the deptCode
*/
public String getDeptCode() {
return this.deptCode;
}
/**
* set the deptCode - 部门编码 预留
*/
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
/**
* get the projCode - 项目编码
* @return the projCode * @return the projCode
*/ */
public String getProjCode() { public String getProjCode() {
...@@ -283,14 +327,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -283,14 +327,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the projCode - 项目编码 * set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/ */
public void setProjCode(String projCode) { public void setProjCode(String projCode) {
this.projCode = projCode; this.projCode = projCode;
} }
/** /**
* get the projName - 项目名称 * get the projName - 项目名称.
* @return the projName * @return the projName
*/ */
public String getProjName() { public String getProjName() {
...@@ -298,164 +343,159 @@ public class HPSC006 extends DaoEPBase { ...@@ -298,164 +343,159 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the projName - 项目名称 * set the projName - 项目名称.
*
* @param projName - 项目名称
*/ */
public void setProjName(String projName) { public void setProjName(String projName) {
this.projName = projName; this.projName = projName;
} }
/**
* get the parentId - 父节点-部件编码
* @return the parentId
*/
public String getParentId() {
return this.parentId;
}
/**
* set the parentId - 父节点-部件编码
*/
public void setParentId(String parentId) {
this.parentId = parentId;
}
/** /**
* get the parentPrdtName - 父节点-部件名称 * get the productionOrderNo - 生产订单号.
* @return the parentPrdtName * @return the productionOrderNo
*/ */
public String getParentPrdtName() { public String getProductionOrderNo() {
return this.parentPrdtName; return this.productionOrderNo;
} }
/** /**
* set the parentPrdtName - 父节点-部件名称 * set the productionOrderNo - 生产订单号.
*
* @param productionOrderNo - 生产订单号
*/ */
public void setParentPrdtName(String parentPrdtName) { public void setProductionOrderNo(String productionOrderNo) {
this.parentPrdtName = parentPrdtName; this.productionOrderNo = productionOrderNo;
} }
/** /**
* get the type - 类别 * get the inventType - 物料类型.
* @return the type * @return the inventType
*/ */
public String getType() { public Integer getInventType() {
return this.type; return this.inventType;
} }
/** /**
* set the type - 类别 * set the inventType - 物料类型.
*
* @param inventType - 物料类型
*/ */
public void setType(String type) { public void setInventType(Integer inventType) {
this.type = type; this.inventType = inventType;
} }
/** /**
* get the leaf - 是否有叶子节点 * get the inventCode - 物料编码.
* @return the leaf * @return the inventCode
*/ */
public String getLeaf() { public String getInventCode() {
return this.leaf; return this.inventCode;
} }
/** /**
* set the leaf - 是否有叶子节点 * set the inventCode - 物料编码.
*
* @param inventCode - 物料编码
*/ */
public void setLeaf(String leaf) { public void setInventCode(String inventCode) {
this.leaf = leaf; this.inventCode = inventCode;
} }
/** /**
* get the sort - 排序字段 * get the inventName - 物料名称.
* @return the sort * @return the inventName
*/ */
public String getSort() { public String getInventName() {
return this.sort; return this.inventName;
} }
/** /**
* set the sort - 排序字段 * set the inventName - 物料名称.
*
* @param inventName - 物料名称
*/ */
public void setSort(String sort) { public void setInventName(String inventName) {
this.sort = sort; this.inventName = inventName;
} }
/** /**
* get the icon - 图片地址 * get the inventLength - 物料-长.
* @return the icon * @return the inventLength
*/ */
public String getIcon() { public BigDecimal getInventLength() {
return this.icon; return this.inventLength;
} }
/** /**
* set the icon - 图片地址 * set the inventLength - 物料-长.
*
* @param inventLength - 物料-长
*/ */
public void setIcon(String icon) { public void setInventLength(BigDecimal inventLength) {
this.icon = icon; this.inventLength = inventLength;
} }
/** /**
* get the prdtType - 部件类型 * get the inventWidth - 物料-宽.
* @return the prdtType * @return the inventWidth
*/ */
public Integer getPrdtType() { public BigDecimal getInventWidth() {
return this.prdtType; return this.inventWidth;
} }
/** /**
* set the prdtType - 部件类型 * set the inventWidth - 物料-宽.
*
* @param inventWidth - 物料-宽
*/ */
public void setPrdtType(Integer prdtType) { public void setInventWidth(BigDecimal inventWidth) {
this.prdtType = prdtType; this.inventWidth = inventWidth;
} }
/** /**
* get the prdtCode - 部件编码 * get the inventThick - 物料-厚.
* @return the prdtCode * @return the inventThick
*/ */
public String getPrdtCode() { public BigDecimal getInventThick() {
return this.prdtCode; return this.inventThick;
} }
/** /**
* set the prdtCode - 部件编码 * set the inventThick - 物料-厚.
*
* @param inventThick - 物料-厚
*/ */
public void setPrdtCode(String prdtCode) { public void setInventThick(BigDecimal inventThick) {
this.prdtCode = prdtCode; this.inventThick = inventThick;
} }
/** /**
* get the prdtName - 部件名称 * get the inventSpec - 物料规格.
* @return the prdtName * @return the inventSpec
*/ */
public String getPrdtName() { public String getInventSpec() {
return this.prdtName; return this.inventSpec;
} }
/** /**
* set the prdtName - 部件名称 * set the inventSpec - 物料规格.
*
* @param inventSpec - 物料规格
*/ */
public void setPrdtName(String prdtName) { public void setInventSpec(String inventSpec) {
this.prdtName = prdtName; this.inventSpec = inventSpec;
} }
/** /**
* get the inventRecordId - 存货档案ID. * get the planCompletionDate - 计划完成日期.
* @return the inventRecordId * @return the planCompletionDate
*/ */
public Long getInventRecordId() { public String getPlanCompletionDate() {
return this.inventRecordId; return this.planCompletionDate;
} }
/** /**
* set the inventRecordId - 存货档案ID. * set the planCompletionDate - 计划完成日期.
* *
* @param inventRecordId - 存货档案ID * @param planCompletionDate - 计划完成日期
*/ */
public void setInventRecordId(Long inventRecordId) { public void setPlanCompletionDate(String planCompletionDate) {
this.inventRecordId = inventRecordId; this.planCompletionDate = planCompletionDate;
} }
/** /**
* get the num - 数量 * get the num - 计划数量.
* @return the num * @return the num
*/ */
public BigDecimal getNum() { public BigDecimal getNum() {
...@@ -463,14 +503,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -463,14 +503,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the num - 数量 * set the num - 计划数量.
*
* @param num - 计划数量
*/ */
public void setNum(BigDecimal num) { public void setNum(BigDecimal num) {
this.num = num; this.num = num;
} }
/** /**
* get the unitWt - 单重 * get the unitWt - 计划单重.
* @return the unitWt * @return the unitWt
*/ */
public BigDecimal getUnitWt() { public BigDecimal getUnitWt() {
...@@ -478,14 +519,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -478,14 +519,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the unitWt - 单重 * set the unitWt - 计划单重.
*
* @param unitWt - 计划单重
*/ */
public void setUnitWt(BigDecimal unitWt) { public void setUnitWt(BigDecimal unitWt) {
this.unitWt = unitWt; this.unitWt = unitWt;
} }
/** /**
* get the totalWt - 总重 * get the totalWt - 计划重量.
* @return the totalWt * @return the totalWt
*/ */
public BigDecimal getTotalWt() { public BigDecimal getTotalWt() {
...@@ -493,119 +535,127 @@ public class HPSC006 extends DaoEPBase { ...@@ -493,119 +535,127 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the totalWt - 总重 * set the totalWt - 计划重量.
*
* @param totalWt - 计划重量
*/ */
public void setTotalWt(BigDecimal totalWt) { public void setTotalWt(BigDecimal totalWt) {
this.totalWt = totalWt; this.totalWt = totalWt;
} }
/** /**
* get the filePath1 - 文件地址1 * get the actualCompletionDate - 实际完工日期.
* @return the filePath1 * @return the actualCompletionDate
*/ */
public String getFilePath1() { public String getActualCompletionDate() {
return this.filePath1; return this.actualCompletionDate;
} }
/** /**
* set the filePath1 - 文件地址1 * set the actualCompletionDate - 实际完工日期.
*
* @param actualCompletionDate - 实际完工日期
*/ */
public void setFilePath1(String filePath1) { public void setActualCompletionDate(String actualCompletionDate) {
this.filePath1 = filePath1; this.actualCompletionDate = actualCompletionDate;
} }
/** /**
* get the filePath2 - 文件地址2 * get the actualCompletionNum - 实际完工数量.
* @return the filePath2 * @return the actualCompletionNum
*/ */
public String getFilePath2() { public BigDecimal getActualCompletionNum() {
return this.filePath2; return this.actualCompletionNum;
} }
/** /**
* set the filePath2 - 文件地址2 * set the actualCompletionNum - 实际完工数量.
*
* @param actualCompletionNum - 实际完工数量
*/ */
public void setFilePath2(String filePath2) { public void setActualCompletionNum(BigDecimal actualCompletionNum) {
this.filePath2 = filePath2; this.actualCompletionNum = actualCompletionNum;
} }
/** /**
* get the filePath3 - 文件地址3 * get the status - 状态 0-计划中,1-生产中,2-已完成.
* @return the filePath3 * @return the status
*/ */
public String getFilePath3() { public Integer getStatus() {
return this.filePath3; return this.status;
} }
/** /**
* set the filePath3 - 文件地址3 * set the status - 状态 0-计划中,1-生产中,2-已完成.
*
* @param status - 状态 0-计划中,1-生产中,2-已完成
*/ */
public void setFilePath3(String filePath3) { public void setStatus(Integer status) {
this.filePath3 = filePath3; this.status = status;
} }
/** /**
* get the filePath4 - 文件地址4 * get the orgNo - 生产组编码.
* @return the filePath4 * @return the orgNo
*/ */
public String getFilePath4() { public String getOrgNo() {
return this.filePath4; return this.orgNo;
} }
/** /**
* set the filePath4 - 文件地址4 * set the orgNo - 生产组编码.
*
* @param orgNo - 生产组编码
*/ */
public void setFilePath4(String filePath4) { public void setOrgNo(String orgNo) {
this.filePath4 = filePath4; this.orgNo = orgNo;
} }
/** /**
* get the filePath5 - 文件地址5 * get the orgName - 生产组名称.
* @return the filePath5 * @return the orgName
*/ */
public String getFilePath5() { public String getOrgName() {
return this.filePath5; return this.orgName;
} }
/** /**
* set the filePath5 - 文件地址5 * set the orgName - 生产组名称.
*
* @param orgName - 生产组名称
*/ */
public void setFilePath5(String filePath5) { public void setOrgName(String orgName) {
this.filePath5 = filePath5; this.orgName = orgName;
} }
/** /**
* get the status - 状态 0-未提交,1-已提交 * get the factoryCode - 厂区编码.
* @return the status * @return the factoryCode
*/ */
public Integer getStatus() { public String getFactoryCode() {
return this.status; return this.factoryCode;
} }
/** /**
* set the status - 状态 0-未提交,1-已提交 * set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/ */
public void setStatus(Integer status) { public void setFactoryCode(String factoryCode) {
this.status = status; this.factoryCode = factoryCode;
} }
/** /**
* get the delStatus - 状态 1未删除,0已删除 * get the factoryName - 厂区名称.
* @return the delStatus * @return the factoryName
*/ */
public Integer getDelStatus() { public String getFactoryName() {
return this.delStatus; return this.factoryName;
} }
/** /**
* set the delStatus - 状态 1未删除,0已删除 * set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/ */
public void setDelStatus(Integer delStatus) { public void setFactoryName(String factoryName) {
this.delStatus = delStatus; this.factoryName = factoryName;
} }
/** /**
* get the createdBy - 创建人 * get the createdBy - 创建人.
* @return the createdBy * @return the createdBy
*/ */
public String getCreatedBy() { public String getCreatedBy() {
...@@ -613,14 +663,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -613,14 +663,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the createdBy - 创建人 * set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/ */
public void setCreatedBy(String createdBy) { public void setCreatedBy(String createdBy) {
this.createdBy = createdBy; this.createdBy = createdBy;
} }
/** /**
* get the createdTime - 创建时间 * get the createdTime - 创建时间.
* @return the createdTime * @return the createdTime
*/ */
public String getCreatedTime() { public String getCreatedTime() {
...@@ -628,14 +679,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -628,14 +679,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the createdTime - 创建时间 * set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/ */
public void setCreatedTime(String createdTime) { public void setCreatedTime(String createdTime) {
this.createdTime = createdTime; this.createdTime = createdTime;
} }
/** /**
* get the updatedBy - 更新人 * get the updatedBy - 更新人.
* @return the updatedBy * @return the updatedBy
*/ */
public String getUpdatedBy() { public String getUpdatedBy() {
...@@ -643,14 +695,15 @@ public class HPSC006 extends DaoEPBase { ...@@ -643,14 +695,15 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the updatedBy - 更新人 * set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/ */
public void setUpdatedBy(String updatedBy) { public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy; this.updatedBy = updatedBy;
} }
/** /**
* get the updatedTime - 更新时间 * get the updatedTime - 更新时间.
* @return the updatedTime * @return the updatedTime
*/ */
public String getUpdatedTime() { public String getUpdatedTime() {
...@@ -658,183 +711,157 @@ public class HPSC006 extends DaoEPBase { ...@@ -658,183 +711,157 @@ public class HPSC006 extends DaoEPBase {
} }
/** /**
* set the updatedTime - 更新时间 * set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/ */
public void setUpdatedTime(String updatedTime) { public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
/** /**
* get the remark - 备注 * get the depCode - 部门编码.
* @return the remark * @return the depCode
*/ */
public String getRemark() { public String getDepCode() {
return this.remark; return this.depCode;
} }
/** /**
* set the remark - 备注 * set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/ */
public void setRemark(String remark) { public void setDepCode(String depCode) {
this.remark = remark; this.depCode = depCode;
} }
public Integer getLv() {
return lv;
}
public void setLv(Integer lv) {
this.lv = lv;
}
/** /**
* get the sort - 规格 * get the remark - 备注.
* @return the sort * @return the remark
*/ */
public String getSpec() { public String getRemark() {
return this.spec; return this.remark;
} }
/** /**
* set the sort - 规格 * set the remark - 备注.
*/
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 remark - 备注
*/ */
public void setLength(BigDecimal length) { public void setRemark(String remark) {
this.length = length; this.remark = remark;
} }
/** /**
* get the width - 宽. * get the filePath1 - 文件地址1.
* @return the width * @return the filePath1
*/ */
public BigDecimal getWidth() { public String getFilePath1() {
return this.width; return this.filePath1;
} }
/** /**
* set the width - 宽. * set the filePath1 - 文件地址1.
* *
* @param width - 宽 * @param filePath1 - 文件地址1
*/ */
public void setWidth(BigDecimal width) { public void setFilePath1(String filePath1) {
this.width = width; this.filePath1 = filePath1;
} }
/** /**
* get the thick - 厚. * get the inventRecordId - 存货档案ID.
* @return the thick * @return the inventRecordId
*/ */
public BigDecimal getThick() { public Integer getInventRecordId() {
return this.thick; return this.inventRecordId;
} }
/** /**
* set the thick - 厚. * set the inventRecordId - 存货档案ID.
* *
* @param thick - 厚 * @param inventRecordId - 存货档案ID
*/ */
public void setThick(BigDecimal thick) { public void setInventRecordId(Integer inventRecordId) {
this.thick = thick; this.inventRecordId = inventRecordId;
} }
/** /**
* get the value from Map * get the value from Map.
*
* @param map - source data map
*/ */
@Override
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get("id")), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("companyCode")), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("deptCode")), deptCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projCode")), projCode)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("projName")), projName)); setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setParentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("parentId")), parentId)); setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setParentPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("parentPrdtName")), parentPrdtName)); setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("type")), type)); setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("leaf")), leaf)); setInventLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVENT_LENGTH)), inventLength));
setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("sort")), sort)); setInventWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVENT_WIDTH)), inventWidth));
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("icon")), icon)); setInventThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVENT_THICK)), inventThick));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get("prdtType")), prdtType)); setInventSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_SPEC)), inventSpec));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode)); setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName)); setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get("inventRecordId")), inventRecordId)); setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num)); setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("unitWt")), unitWt)); setActualCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_DATE)), actualCompletionDate));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get("totalWt")), totalWt)); setActualCompletionNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ACTUAL_COMPLETION_NUM)), actualCompletionNum));
setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("filePath1")), filePath1)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setFilePath2(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("filePath2")), filePath2)); setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setFilePath3(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("filePath3")), filePath3)); setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
setFilePath4(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("filePath4")), filePath4)); setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("filePath5")), filePath5)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get("status")), status)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setDelStatus(NumberUtils.toInteger(StringUtils.toString(map.get("delStatus")), delStatus)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdBy")), createdBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("createdTime")),createdTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedBy")), updatedBy)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark)); setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1));
setLv(NumberUtils.toInteger(StringUtils.toString(map.get("lv")), lv)); setInventRecordId(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
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)); * set the value to Map.
*/
} @Override
/**
* set the value to Map
*/
public Map toMap() { public Map toMap() {
Map map = new HashMap(); Map map = new HashMap();
map.put("id", StringUtils.toString(id, eiMetadata.getMeta("id"))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put("companyCode", StringUtils.toString(companyCode, eiMetadata.getMeta("companyCode"))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put("deptCode", StringUtils.toString(deptCode, eiMetadata.getMeta("deptCode"))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put("projCode", StringUtils.toString(projCode, eiMetadata.getMeta("projCode"))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put("projName", StringUtils.toString(projName, eiMetadata.getMeta("projName"))); map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO)));
map.put("parentId", StringUtils.toString(parentId, eiMetadata.getMeta("parentId"))); map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put("parentPrdtName", StringUtils.toString(parentPrdtName, eiMetadata.getMeta("parentPrdtName"))); map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put("type", StringUtils.toString(type, eiMetadata.getMeta("type"))); map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put("leaf", StringUtils.toString(leaf, eiMetadata.getMeta("leaf"))); map.put(FIELD_INVENT_LENGTH, StringUtils.toString(inventLength, eiMetadata.getMeta(FIELD_INVENT_LENGTH)));
map.put("sort", StringUtils.toString(sort, eiMetadata.getMeta("sort"))); map.put(FIELD_INVENT_WIDTH, StringUtils.toString(inventWidth, eiMetadata.getMeta(FIELD_INVENT_WIDTH)));
map.put("icon", StringUtils.toString(icon, eiMetadata.getMeta("icon"))); map.put(FIELD_INVENT_THICK, StringUtils.toString(inventThick, eiMetadata.getMeta(FIELD_INVENT_THICK)));
map.put("prdtType", StringUtils.toString(prdtType, eiMetadata.getMeta("prdtType"))); map.put(FIELD_INVENT_SPEC, StringUtils.toString(inventSpec, eiMetadata.getMeta(FIELD_INVENT_SPEC)));
map.put("prdtCode", StringUtils.toString(prdtCode, eiMetadata.getMeta("prdtCode"))); map.put(FIELD_PLAN_COMPLETION_DATE, StringUtils.toString(planCompletionDate, eiMetadata.getMeta(FIELD_PLAN_COMPLETION_DATE)));
map.put("prdtName", StringUtils.toString(prdtName, eiMetadata.getMeta("prdtName"))); map.put(FIELD_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM)));
map.put("inventRecordId", StringUtils.toString(inventRecordId, eiMetadata.getMeta("inventRecordId"))); map.put(FIELD_UNIT_WT, StringUtils.toString(unitWt, eiMetadata.getMeta(FIELD_UNIT_WT)));
map.put("num", StringUtils.toString(num, eiMetadata.getMeta("num"))); map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT)));
map.put("unitWt", StringUtils.toString(unitWt, eiMetadata.getMeta("unitWt"))); map.put(FIELD_ACTUAL_COMPLETION_DATE, StringUtils.toString(actualCompletionDate, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_DATE)));
map.put("totalWt", StringUtils.toString(totalWt, eiMetadata.getMeta("totalWt"))); map.put(FIELD_ACTUAL_COMPLETION_NUM, StringUtils.toString(actualCompletionNum, eiMetadata.getMeta(FIELD_ACTUAL_COMPLETION_NUM)));
map.put("filePath1", StringUtils.toString(filePath1, eiMetadata.getMeta("filePath1"))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put("filePath2", StringUtils.toString(filePath2, eiMetadata.getMeta("filePath2"))); map.put(FIELD_ORG_NO, StringUtils.toString(orgNo, eiMetadata.getMeta(FIELD_ORG_NO)));
map.put("filePath3", StringUtils.toString(filePath3, eiMetadata.getMeta("filePath3"))); map.put(FIELD_ORG_NAME, StringUtils.toString(orgName, eiMetadata.getMeta(FIELD_ORG_NAME)));
map.put("filePath4", StringUtils.toString(filePath4, eiMetadata.getMeta("filePath4"))); map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put("filePath5", StringUtils.toString(filePath5, eiMetadata.getMeta("filePath5"))); map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put("status", StringUtils.toString(status, eiMetadata.getMeta("status"))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put("delStatus", StringUtils.toString(delStatus, eiMetadata.getMeta("delStatus"))); map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put("createdBy", StringUtils.toString(createdBy, eiMetadata.getMeta("createdBy"))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put("createdTime", StringUtils.toString(createdTime, eiMetadata.getMeta("createdTime"))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put("updatedBy", StringUtils.toString(updatedBy, eiMetadata.getMeta("updatedBy"))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put("updatedTime", StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime"))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put("remark", StringUtils.toString(remark, eiMetadata.getMeta("remark"))); map.put(FIELD_FILE_PATH1, StringUtils.toString(filePath1, eiMetadata.getMeta(FIELD_FILE_PATH1)));
map.put("lv", StringUtils.toString(lv, eiMetadata.getMeta("lv"))); 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;
} }
} }
...@@ -85,14 +85,13 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -85,14 +85,13 @@ public class ServiceHPSC001 extends ServiceBase {
* 修改操作. * 修改操作.
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC001 hpsc001 = new HPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map); hpsc001.fromMap(map);
DaoUtils.update("HPSC001.insert",hpsc001); DaoUtils.update("HPSC001.update",hpsc001);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
......
...@@ -2,14 +2,12 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -2,14 +2,12 @@ package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
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.HPSC001; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
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;
...@@ -40,8 +38,9 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -40,8 +38,9 @@ public class ServiceHPSC006 extends ServiceBase {
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null); HPSC005 HPSC005 = new HPSC005();
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC006().eiMetadata); EiInfo outInfo = super.initLoad(inInfo, HPSC005);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005.eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -54,53 +53,51 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -54,53 +53,51 @@ public class ServiceHPSC006 extends ServiceBase {
*/ */
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
HPSC005 HPSC005 = new HPSC005();
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC006.query", new HPSC006()); EiInfo outInfo = super.query(inInfo, "HPSC005.query", new HPSC005());
//调用本地服务 EiBlock blcok = outInfo.addBlock(HPConstants.BLOCK_DETAIL);
// EiInfo eiInfo_update = new EiInfo(); blcok.setBlockMeta(new HPSC006().eiMetadata);
// eiInfo_update.set(EiConstant.serviceName, "HPSC006");
// eiInfo_update.set(EiConstant.methodName, "delete");
// EiBlock eiBlock_update = new EiBlock(EiConstant.resultBlock);
// EiInfo outInfo_update = XLocalManager.call(eiInfo_update);
return outInfo; return outInfo;
} }
public EiInfo queryDetail(EiInfo inInfo){
HPSC006 HPSC006 = new HPSC006();
EiInfo outInfo = new EiInfo();
//添加返回到前台的块,块名和前台的对应
EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap();
params.put("productionOrderNo",inInfo.get("productionOrderNo"));
List list = dao.query("HPSC006.queryDetail",params,0,-999999);
outInfo.addBlock("detail").addBlockMeta(HPSC006.eiMetadata);
outInfo.addBlock("detail").addRows(list);
outInfo.getBlock("detail").set("limit", list.size());
return outInfo;
}
/** /**
* 新增操作. * 新增操作.
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
HPSC006 hppz002 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); String productionOrderNo = inInfo.getString("productionOrderNo");
String projCode = inInfo.getString("projCode");
String projName = inInfo.getString("projName");
EiBlock eiBlock = inInfo.getBlock(HPConstants.BLOCK_DETAIL);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); HPSC006.fromMap(map);
hppz002.setLeaf("1"); BigDecimal num = HPSC006.getNum();
// 计算总重 BigDecimal unitWt = HPSC006.getUnitWt();
BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); HPSC006.setStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); HPSC006.setTotalWt(totalWt);
HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName()));
// if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) { DaoUtils.insert("HPSC006.insert",HPSC006);
// hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
// }
hppz002.setSpec(HPPZTools.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick()));
if(hppz002.getParentId().equals("root")){
hppz002.setLv(new Integer(1));
}else{
hppz002.setPrdtCode(HPPZTools.checkAndSavePZ04(hppz002.getPrdtType(),hppz002.getPrdtName()));
Integer lv = (Integer) this.dao.get("HPSC006.queryLv","id",hppz002.getParentId());
hppz002.setLv(lv.intValue()+1);
}
DaoUtils.insert("HPSC006.insert", hppz002.toMap());
if (!hppz002.getParentId().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
}
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
...@@ -121,21 +118,18 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -121,21 +118,18 @@ public class ServiceHPSC006 extends ServiceBase {
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
HPSC006 hppz002 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); HPSC006.fromMap(map);
BigDecimal num = hppz002.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = hppz002.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); HPSC006.setTotalWt(totalWt);
hppz002.setTotalWt(totalWt); HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName()));
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) { DaoUtils.update("HPSC006.update",HPSC006);
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
DaoUtils.update("HPSC006.update", hppz002.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
...@@ -153,16 +147,14 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -153,16 +147,14 @@ public class ServiceHPSC006 extends ServiceBase {
* 删除操作. * 删除操作.
*/ */
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPSC006 hppz002 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); HPSC006.fromMap(map);
this.dao.delete("HPSC006.delete", hppz002.toMap()); this.dao.delete("HPSC006.delete", HPSC006.toMap());
this.checkTreeNodeLeaf(new Long(hppz002.getParentId()));
//TODO 删除时 修改树结构
this.checkTreeNodeLeaf(new Long(hppz002.getId()));
} }
} catch (PlatException e) { } catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE); eiInfo.setStatus(EiConstant.STATUS_FAILURE);
...@@ -171,173 +163,27 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -171,173 +163,27 @@ public class ServiceHPSC006 extends ServiceBase {
logError("删除失败!", e.getMessage()); logError("删除失败!", e.getMessage());
return eiInfo; return eiInfo;
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!"); eiInfo.setMsg("删除成功!");
return eiInfo; return eiInfo;
} }
/**
* 指定树节点
* @param inInfo
* @return
*/
public EiInfo queryTreeRoot(EiInfo inInfo) {
Long projId = NumberUtils.toLong(inInfo.get("projId"));
Map queryMap = new HashMap();
String root = "";
if (projId != null) {
Map map = new HashMap();
map.put("id", projId);
HPSC001 HPSC001 = (com.baosight.hpjx.hp.sc.domain.HPSC001) dao.get("HPSC001.queryDomainById", "id",projId);
root = HPSC001.getProjCode() + ":" + HPSC001.getProjName();
}
inInfo.set("root",root);
return inInfo;
}
//树查询服务
public EiInfo queryTreeNode(EiInfo inInfo) {
//1 获取参数
String pEname = inInfo.getCellStr(EiConstant.queryBlock, 0, "node");
if(StringUtils.equals("$",pEname)){
pEname = "root";
}
Long projId = NumberUtils.toLong(inInfo.get("projId"));
Map queryMap = new HashMap();
queryMap.put("pEname", pEname);
if (projId != null) {
Map map = new HashMap();
map.put("id", projId);
List list = dao.query("HPSC001.queryDomainById", map);
if (list.size() > 0) {
String projCode = ((HPSC001)list.get(0)).getProjCode();
queryMap.put("projCode", projCode);
}
}
//2 查询节点
List rows = dao.query("HPSC006.queryTree", queryMap);
//3 增加节点block块
EiInfo outInfo = new EiInfo();
EiBlock outBlock = outInfo.addBlock(BeanUtil.isEmpty(pEname) ? "" : pEname);
outBlock.addRows(rows);
return outInfo;
}
/**
* 修改父级节点的LEAF状态为1
*
* @param id
*/
public void checkTreeNodeLeaf(Long id) {
EiInfo eiInfo = new EiInfo();
//1 获取参数
Map queryMap = new HashMap();
queryMap.put("id", id);
List rows = this.dao.query("HPSC006.queryTreeNodeByParentPrtdCode", queryMap);
if(rows.size() > 0){
queryMap.put("leaf", "0");
}else{
queryMap.put("leaf", "1");
}
DaoUtils.update("HPSC006.updateTreeNodeLeaf", queryMap);
}
/**
* 提交 撤回.
*/
public EiInfo check(EiInfo eiInfo) {
HPSC006 hppz002 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map);
//限制一下,如果二级已经提交通过,这个时候不允许进行撤回
if(map.get("status").equals("0")) {
//找到二级是否已经提交
HPSC006 THPSC006 = (HPSC006) dao.get("HPSC006.query","id",hppz002.getId());
if (THPSC006.getStatus() == 1) {
// 二级如果已经提交了则需要去看看计划是否已经更新
}
}
DaoUtils.update("HPSC006.check", hppz002.toMap());
}
// 处理三级提交之后判断是否都提交完成,如果都提交完成则二级直接提交通过
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map);
HPSC006 THPSC006 = (HPSC006) dao.get("HPSC006.query","id",hppz002.getId());
Map map1 = new HashMap();
map1.put("parentId",THPSC006.getParentId());
List list = dao.query("HPSC006.checkExamineNum", map1);
int num = NumberUtils.toint(list.get(0));
Map map2 = new HashMap();
if (num == 0) {
map2.put("status",1);
map2.put("id",THPSC006.getParentId());
// 自动生成生产计划
this.autoPlanInfo(THPSC006.getParentId());
} else {
map2.put("status",0);
map2.put("id",THPSC006.getParentId());
}
DaoUtils.update("HPSC006.check",map2);
//处理项目管理中物料状态
Map map3 = new HashMap();
map3.put("projCode",THPSC006.getProjCode());
List list1 = dao.query("HPSC006.checkExamineNum1", map3);
List list2 = dao.query("HPSC006.checkExamineNum1Count", map3);
//未提交数量
int num1 = NumberUtils.toint(list1.get(0));
//总量
int num2 = NumberUtils.toint(list2.get(0));
if (num1 == 0) {
//都已经提交
Map map4 = new HashMap();
map4.put("projCode",THPSC006.getProjCode());
map4.put("materialStatus",2);
DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分提交
Map map4 = new HashMap();
map4.put("projCode",THPSC006.getProjCode());
map4.put("materialStatus",1);
DaoUtils.update("HPSC001.checkByProjCode",map4);
}
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("提交失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("提交失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("提交成功!");
return eiInfo;
}
/** /**
* 绑定附件 * 绑定附件
*/ */
public EiInfo bindDocIdById(EiInfo eiInfo) { public EiInfo bindDocIdById(EiInfo eiInfo) {
HPSC006 hppz002 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map); HPSC006.fromMap(map);
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("id",hppz002.getId()); sqlMap.put("id",HPSC006.getId());
sqlMap.put("filePath1",hppz002.getFilePath1()); sqlMap.put("filePath1",HPSC006.getFilePath1());
DaoUtils.update("HPSC006.bindDocIdById", hppz002.toMap()); DaoUtils.update("HPSC006.bindDocIdById", HPSC006.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE); eiInfo.setStatus(EiConstant.STATUS_FAILURE);
...@@ -351,69 +197,4 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -351,69 +197,4 @@ public class ServiceHPSC006 extends ServiceBase {
return eiInfo; return eiInfo;
} }
/**
* 生产生产计划
* @param id
*/
public void autoPlanInfo(String id) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
HPSC006 THPSC006 = (HPSC006) dao.get("HPSC006.queryEntityByParentPrtdCode","id",id);
String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
//生成生产计划t_hpsc003
HPSC003 HPSC003 = new HPSC003();
HPSC003.setCompanyCode("");
HPSC003.setProjType(null);
HPSC003.setProjCode(THPSC006.getProjCode());
HPSC003.setProjName(THPSC006.getProjName());
HPSC003.setPlanInfoNo(SCJHD);
HPSC003.setInventRecordId(THPSC006.getInventRecordId());
HPSC003.setPrdtType(THPSC006.getPrdtType());
HPSC003.setPrdtCode(THPSC006.getPrdtCode());
HPSC003.setPrdtName(THPSC006.getPrdtName());
HPSC003.setSpec(THPSC006.getSpec());
HPSC003.setLength(THPSC006.getLength());
HPSC003.setWidth(THPSC006.getWidth());
HPSC003.setThick(THPSC006.getThick());
HPSC003.setRemark(THPSC006.getRemark());
HPSC003.setPlanCompletionDate("");
HPSC003.setStatus(0);
DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
//生产计划详情
Map queryMap = new HashMap();
queryMap.put("parentId", id);
List<HPSC006> rows = this.dao.query("HPSC006.queryEntityByParentPrtdCode", queryMap);
for (int i = 0; i < rows.size(); i++) {
HPSC006 HPSC006 = rows.get(i);
HPSC004 HPSC004 = new HPSC004();
HPSC004.setCompanyCode("");
HPSC004.setDeptCode("");
HPSC004.setProjCode(HPSC006.getProjCode());
HPSC004.setProjName(HPSC006.getProjName());
HPSC004.setParentId(SCJHD);
HPSC004.setParentPrdtName(HPSC006.getParentPrdtName());
HPSC004.setInventRecordId(HPSC006.getInventRecordId());
HPSC004.setPrdtType(HPSC006.getPrdtType());
HPSC004.setPrdtCode(HPSC006.getPrdtCode());
HPSC004.setPrdtName(HPSC006.getPrdtName());
HPSC004.setSpec(HPSC006.getSpec());
HPSC004.setLength(HPSC006.getLength());
HPSC004.setWidth(HPSC006.getWidth());
HPSC004.setThick(HPSC006.getThick());
HPSC004.setRemark(HPSC006.getRemark());
HPSC004.setNum(HPSC006.getNum());
HPSC004.setUnitWt(HPSC006.getUnitWt());
HPSC004.setTotalWt(HPSC006.getTotalWt());
HPSC004.setFilePath1(HPSC006.getId().toString());
HPSC004.setPlanCommentDate("");
HPSC004.setPlanCompletionDate("");
HPSC004.setActualCompletionNum(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionUnitWt(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionDate("");
HPSC004.setDelStatus(1);
DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
}
}
} }
<?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.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
<!-- table information Generate time : 2024-02-05 9:36:07
Generate time : 2024-01-11 11:34:26
Version : 1.0 Version : 1.0
tableName :hpjx.t_HPSC006 schema : hpjx
tableName : T_HPSC006
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL, COMPANY_CODE VARCHAR,
DEPT_CODE VARCHAR NOT NULL,
PROJ_CODE VARCHAR, PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR, PROJ_NAME VARCHAR,
PARENT_ID VARCHAR, PRODUCTION_ORDER_NO VARCHAR,
PARENT_PRDT_NAME VARCHAR, INVENT_TYPE TINYINT,
TYPE VARCHAR NOT NULL, INVENT_CODE VARCHAR,
LEAF VARCHAR NOT NULL, INVENT_NAME VARCHAR,
SORT VARCHAR NOT NULL, INVENT_LENGTH DECIMAL,
ICON VARCHAR NOT NULL, INVENT_WIDTH DECIMAL,
PRDT_CODE VARCHAR, INVENT_THICK DECIMAL,
PRDT_NAME VARCHAR, INVENT_SPEC VARCHAR,
NUM INTEGER NOT NULL, PLAN_COMPLETION_DATE VARCHAR,
UNIT_WT DECIMAL NOT NULL, NUM DECIMAL,
TOTAL_WT DECIMAL NOT NULL, UNIT_WT DECIMAL,
FILE_PATH1 VARCHAR, TOTAL_WT DECIMAL,
FILE_PATH2 VARCHAR, ACTUAL_COMPLETION_DATE VARCHAR,
FILE_PATH3 VARCHAR, ACTUAL_COMPLETION_NUM DECIMAL,
FILE_PATH4 VARCHAR,
FILE_PATH5 VARCHAR,
STATUS TINYINT, STATUS TINYINT,
DEL_STATUS TINYINT, ORG_NO VARCHAR,
ORG_NAME VARCHAR,
FACTORY_CODE VARCHAR,
FACTORY_NAME VARCHAR,
CREATED_BY VARCHAR, CREATED_BY VARCHAR,
CREATED_TIME DATETIME, CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR, UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME, UPDATED_TIME VARCHAR,
REMARK VARCHAR DEP_CODE VARCHAR,
REMARK VARCHAR,
FILE_PATH1 VARCHAR,
INVENT_RECORD_ID INTEGER
--> -->
<sqlMap namespace="HPSC006"> <sqlMap namespace="HPSC006">
<sql id="column">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 --> PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_ID as "parentId", <!-- 父节点-部件编码 --> PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-部件名称 --> INVENT_TYPE as "inventType", <!-- 物料类型 -->
TYPE as "type", <!-- 类别 --> INVENT_CODE as "inventCode", <!-- 物料编码 -->
LEAF as "leaf", <!-- 是否有叶子节点 --> INVENT_NAME as "inventName", <!-- 物料名称 -->
SORT as "sort", <!-- 排序字段 --> INVENT_LENGTH as "inventLength", <!-- 物料-长 -->
ICON as "icon", <!-- 图片地址 --> INVENT_WIDTH as "inventWidth", <!-- 物料-宽 -->
PRDT_TYPE as "prdtType", INVENT_THICK as "inventThick", <!-- 物料-厚 -->
PRDT_CODE as "prdtCode", <!-- 部件编码 --> INVENT_SPEC as "inventSpec", <!-- 物料规格 -->
PRDT_NAME as "prdtName", <!-- 部件名称 --> PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID --> NUM as "num", <!-- 计划数量 -->
NUM as "num", <!-- 数量 --> UNIT_WT as "unitWt", <!-- 计划单重 -->
UNIT_WT as "unitWt", <!-- 单重 --> TOTAL_WT as "totalWt", <!-- 计划重量 -->
TOTAL_WT as "totalWt", <!-- 总重 --> ACTUAL_COMPLETION_DATE as "actualCompletionDate", <!-- 实际完工日期 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 --> ACTUAL_COMPLETION_NUM as "actualCompletionNum", <!-- 实际完工数量 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 --> STATUS as "status", <!-- 状态 0-计划中,1-生产中,2-已完成 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 --> ORG_NO as "orgNo", <!-- 生产组编码 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 --> ORG_NAME as "orgName", <!-- 生产组名称 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 --> FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
STATUS as "status", <!-- 状态 0-未提交,1-已提交 --> FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
LV as "lv", FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
SPEC as "spec", INVENT_RECORD_ID as "inventRecordId" <!-- 存货档案ID -->
LENGTH as "length", <!-- 长 --> </sql>
WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_HPSC006 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="id">
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="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="lv">
LV = #lv#
</isNotEmpty>
ORDER BY ID DESC
<!-- <dynamic prepend="ORDER BY">-->
<!-- <isEmpty property="orderBy">-->
<!-- CREATED_TIME DESC-->
<!-- </isEmpty>-->
<!-- </dynamic>-->
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_HPSC006 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="id">
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>
<!-- <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME = #projName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="productionOrderNo">
PARENT_ID = #parentId# PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName"> <isNotEmpty prepend=" AND " property="inventType">
PARENT_PRDT_NAME = #parentPrdtName# INVENT_TYPE = #inventType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="type"> <isNotEmpty prepend=" AND " property="inventCode">
TYPE = #type# INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="leaf"> <isNotEmpty prepend=" AND " property="inventName">
LEAF = #leaf# INVENT_NAME = #inventName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="sort"> <isNotEmpty prepend=" AND " property="inventLength">
SORT = #sort# INVENT_LENGTH = #inventLength#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="icon"> <isNotEmpty prepend=" AND " property="inventWidth">
ICON = #icon# INVENT_WIDTH = #inventWidth#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode"> <isNotEmpty prepend=" AND " property="inventThick">
PRDT_CODE = #prdtCode# INVENT_THICK = #inventThick#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="inventSpec">
PRDT_NAME = #prdtName# INVENT_SPEC = #inventSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="num"> <isNotEmpty prepend=" AND " property="num">
NUM = #num# NUM = #num#
...@@ -195,26 +120,26 @@ ...@@ -195,26 +120,26 @@
<isNotEmpty prepend=" AND " property="totalWt"> <isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt# TOTAL_WT = #totalWt#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1"> <isNotEmpty prepend=" AND " property="actualCompletionDate">
FILE_PATH1 = #filePath1# ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2"> <isNotEmpty prepend=" AND " property="actualCompletionNum">
FILE_PATH2 = #filePath2# ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3"> <isNotEmpty prepend=" AND " property="status">
FILE_PATH3 = #filePath3# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4"> <isNotEmpty prepend=" AND " property="orgNo">
FILE_PATH4 = #filePath4# ORG_NO = #orgNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5"> <isNotEmpty prepend=" AND " property="orgName">
FILE_PATH5 = #filePath5# ORG_NAME = #orgName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="factoryCode">
STATUS = #status# FACTORY_CODE = #factoryCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus"> <isNotEmpty prepend=" AND " property="factoryName">
DEL_STATUS = #delStatus# FACTORY_NAME = #factoryName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy# CREATED_BY = #createdBy#
...@@ -228,270 +153,130 @@ ...@@ -228,270 +153,130 @@
<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"> <isNotEmpty prepend=" AND " property="remark">
REMARK = #remark# REMARK = #remark#
</isNotEmpty> </isNotEmpty>
--> <isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" />
<include refid="order" />
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" />
</select>
<select id="queryDetail" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC006 WHERE 1=1
<include refid="condition" />
<include refid="order" />
</select>
<insert id="insert"> <insert id="insert">
INSERT INTO hpjx.t_HPSC006 (ID, INSERT INTO ${hpjxSchema}.T_HPSC006 (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
PARENT_ID, <!-- 父节点-部件编码 --> PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
PARENT_PRDT_NAME, <!-- 父节点-部件名称 --> INVENT_TYPE, <!-- 物料类型 -->
TYPE, <!-- 类别 --> INVENT_CODE, <!-- 物料编码 -->
LEAF, <!-- 是否有叶子节点 --> INVENT_NAME, <!-- 物料名称 -->
SORT, <!-- 排序字段 --> INVENT_LENGTH, <!-- 物料-长 -->
ICON, <!-- 图片地址 --> INVENT_WIDTH, <!-- 物料-宽 -->
PRDT_TYPE, INVENT_THICK, <!-- 物料-厚 -->
PRDT_CODE, <!-- 部件编码 --> INVENT_SPEC, <!-- 物料规格 -->
PRDT_NAME, <!-- 部件名称 --> PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
INVENT_RECORD_ID, <!-- 存货档案ID --> NUM, <!-- 计划数量 -->
NUM, <!-- 数量 --> UNIT_WT, <!-- 计划单重 -->
UNIT_WT, <!-- 单重 --> TOTAL_WT, <!-- 计划重量 -->
TOTAL_WT, <!-- 总重 --> ACTUAL_COMPLETION_DATE, <!-- 实际完工日期 -->
FILE_PATH1, <!-- 文件地址1 --> ACTUAL_COMPLETION_NUM, <!-- 实际完工数量 -->
FILE_PATH2, <!-- 文件地址2 --> STATUS, <!-- 状态 0-计划中,1-生产中,2-已完成 -->
FILE_PATH3, <!-- 文件地址3 --> ORG_NO, <!-- 生产组编码 -->
FILE_PATH4, <!-- 文件地址4 --> ORG_NAME, <!-- 生产组名称 -->
FILE_PATH5, <!-- 文件地址5 --> FACTORY_CODE, <!-- 厂区编码 -->
STATUS, <!-- 状态 0-未提交,1-已提交 --> FACTORY_NAME, <!-- 厂区名称 -->
DEL_STATUS, <!-- 状态 1未删除,0已删除 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 --> UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE, <!-- 部门编码 -->
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
LV, FILE_PATH1, <!-- 文件地址1 -->
SPEC, INVENT_RECORD_ID <!-- 存货档案ID -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK <!-- 厚 -->
) )
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, VALUES (#companyCode#, #projCode#, #projName#, #productionOrderNo#, #inventType#, #inventCode#, #inventName#, #inventLength#, #inventWidth#, #inventThick#, #inventSpec#, #planCompletionDate#, #num#, #unitWt#, #totalWt#, #actualCompletionDate#, #actualCompletionNum#, #status#, #orgNo#, #orgName#, #factoryCode#, #factoryName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #inventRecordId#)
#type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#,
#unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#,
#delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#,
#length#, #width#, #thick#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_HPSC006 WHERE DELETE FROM ${hpjxSchema}.T_HPSC006 WHERE
ID = #id# ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE hpjx.t_HPSC006 UPDATE ${hpjxSchema}.T_HPSC006
SET SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 --> COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEPT_CODE = #deptCode#, <!-- 部门编码 预留 -->
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PARENT_ID = #parentId#, <!-- 父节点-部件编码 --> PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
PARENT_PRDT_NAME = #parentPrdtName#, <!-- 父节点-部件名称 --> INVENT_TYPE = #inventType#, <!-- 物料类型 -->
TYPE = #type#, <!-- 类别 --> INVENT_CODE = #inventCode#, <!-- 物料编码 -->
LEAF = #leaf#, <!-- 是否有叶子节点 --> INVENT_NAME = #inventName#, <!-- 物料名称 -->
SORT = #sort#, <!-- 排序字段 --> INVENT_LENGTH = #inventLength#, <!-- 物料-长 -->
ICON = #icon#, <!-- 图片地址 --> INVENT_WIDTH = #inventWidth#, <!-- 物料-宽 -->
PRDT_CODE = #prdtCode#, <!-- 部件编码 --> INVENT_THICK = #inventThick#, <!-- 物料-厚 -->
PRDT_TYPE = #prdtType#, INVENT_SPEC = #inventSpec#, <!-- 物料规格 -->
PRDT_NAME = #prdtName#, <!-- 部件名称 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID --> NUM = #num#, <!-- 计划数量 -->
NUM = #num#, <!-- 数量 --> UNIT_WT = #unitWt#, <!-- 计划单重 -->
UNIT_WT = #unitWt#, <!-- 单重 --> TOTAL_WT = #totalWt#, <!-- 计划重量 -->
TOTAL_WT = #totalWt#, <!-- 总重 --> ACTUAL_COMPLETION_DATE = #actualCompletionDate#, <!-- 实际完工日期 -->
FILE_PATH1 = #filePath1#, <!-- 文件地址1 --> ACTUAL_COMPLETION_NUM = #actualCompletionNum#, <!-- 实际完工数量 -->
FILE_PATH2 = #filePath2#, <!-- 文件地址2 --> STATUS = #status#, <!-- 状态 0-计划中,1-生产中,2-已完成 -->
FILE_PATH3 = #filePath3#, <!-- 文件地址3 --> ORG_NO = #orgNo#, <!-- 生产组编码 -->
FILE_PATH4 = #filePath4#, <!-- 文件地址4 --> ORG_NAME = #orgName#, <!-- 生产组名称 -->
FILE_PATH5 = #filePath5#, <!-- 文件地址5 --> FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
STATUS = #status#, <!-- 状态 0-未提交,1-已提交 --> FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
DEL_STATUS = #delStatus#, <!-- 状态 1未删除,0已删除 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 --> CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
SPEC = #spec#, <!-- 规格 --> FILE_PATH1 = #filePath1#, <!-- 文件地址1 -->
LENGTH = #length#, <!-- 长 --> INVENT_RECORD_ID = #inventRecordId# <!-- 存货档案ID -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick# <!-- 厚 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<select id="queryTree" resultClass="java.util.HashMap">
SELECT
ID as "nodeId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 项目编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PRDT_name as "prdtName", <!-- 项目编码 -->
PROJ_NAME as "projName",<!-- 项目名称 -->
ID as "label", <!-- 名部件编码-->
PRDT_NAME as "text", <!-- 部件名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
PARENT_ID as "pId", <!-- 父节点编码 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
LV as "lv",
SPEC as "spec"
FROM
hpjx.t_HPSC006
WHERE
1=1
<isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<select id="queryTreeNodeByParentPrtdCode" resultClass="java.util.HashMap">
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", <!-- 图片地址 -->
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_HPSC006
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
PARENT_ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="queryEntityByParentPrtdCode" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC006">
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", <!-- 图片地址 -->
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_HPSC006 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</select>
<update id="updateTreeNodeLeaf">
UPDATE hpjx.t_HPSC006 SET LEAF = #leaf# WHERE ID = #id#
</update>
<update id="check">
UPDATE hpjx.t_HPSC006 SET status = #status# WHERE ID = #id#
</update>
<update id="bindDocIdById">
UPDATE hpjx.t_HPSC006 SET FILE_PATH1 = #filePath1# WHERE ID = #id#
</update>
<select id="checkExamineNum1" resultClass="int">
SELECT COUNT(1) from hpjx.t_HPSC006
WHERE 1 = 1
AND PARENT_ID != 'root'
AND `STATUS` = 0
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="queryLv" resultClass="int">
SELECT LV from hpjx.t_HPSC006
WHERE ID = #id#
</select>
<select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_HPSC006
WHERE 1 = 1
AND PARENT_ID != 'root'
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="checkExamineNum" resultClass="int">
SELECT COUNT(1) FROM hpjx.t_HPSC006
WHERE LEAF = '1'
AND STATUS = 0 AND DEL_STATUS = 0
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
</select>
</sqlMap> </sqlMap>
...@@ -69,17 +69,27 @@ $(function () { ...@@ -69,17 +69,27 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let filePath1 = item.filePath1; let filePath1 = item.filePath1;
let status = item.status;
let template = ''; let template = '';
if (filePath1) { if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
} }
if (status != 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump(\'' + item.productionOrderNo + '\')" >下料清单</a>';
}
return template return template
} }
} }
], ],
} }
}); });
function jump(productionOrderNo) {
var herf= ctx + "\\web\\"+ "HPSC006?inqu_status-0-productionOrderNo=" + productionOrderNo;
window.open(herf);
}
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id, href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/> <EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="prdtSpec" cname="部件规格"/> <%-- <EF:EFColumn enable="false" ename="prdtSpec" cname="部件规格"/>--%>
<EF:EFColumn enable="false" ename="remark" cname="部件备注"/> <EF:EFColumn enable="false" ename="remark" cname="部件备注"/>
<EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false"> <EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" /> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
......
var inventNameGlobalData = []; ids = [];
// 传递参数 将附件ID与当前记录ID进行绑定
// let rowId = '';
let parentId = '';
let projCode = '';
var strs;
var url = location.search; //获取url中"?"符后的字串
if (url.indexOf("?") != -1) { //判断是否有参数
var str = url.substr(1); //从第一个字符开始 因为第0个是?号 获取所有除问号的所有符串
strs = str.split("="); //用等号进行分隔 (因为知道只有一个参数 所以直接用等号进分隔 如果有多个参数 要用&号分隔 再用等号进行分隔)
// console.log('strs=' + strs) //直接弹出第一个参数 (如果有多个参数 还要进行循环的)
}
$(function () { $(function () {
IPLATUI.EFTree = {
"materialTree": {
ROOT: "root:项目列表",
/**
* 树加载完成后的回调函数
* @param options: 树的配置项
*/
query: function (postEiInfo, model) {
postEiInfo.set("projId",strs?strs[1] : null);
return postEiInfo;
},
loadComplete: function (options) {
// 保持结点展开状态
var expanded = Cookies.get('expanded');
if (expanded) {
Cookies.remove('expanded');
expanded = JSON.parse(expanded);
$("#menu").data("kendoTreeView").expandPath(_.keys(expanded));
}
},
/**
* 选中树结点时触发的事件,注意点击树 折叠/展开 的图标不会触发此事件
*
* @param e
* e.sender kendoTree对象, tree01Tree(EFTree的id + "Tree")
* e.node 点击的节点DOM元素
*/
select: function (e) {
var nodeData = this.dataItem(e.node);
let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
var dataSource;
EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
IPLATUI.EFTree.materialTree.selectTreeNode.nodeId = nodeData.nodeId;
IPLATUI.EFTree.materialTree.selectTreeNode.prdtCode = nodeData.prdtCode;
IPLATUI.EFTree.materialTree.selectTreeNode.projCode = nodeData.projCode;
IPLATUI.EFTree.materialTree.selectTreeNode.prdtName = nodeData.prdtName;
IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName;
// 重新查询EFGrid
parentId = nodeData.nodeId;
query();
},
selectTreeNode: {}
}
};
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
query(); query();
}); });
IPLATUI.EFGrid = { $("#ASSIGN").on("click", function () {
result: { //重置全局变量
pageable: { ids = [];
pageSize: 10, let rows = resultGrid.getCheckedRows()
pageSizes: [10, 20, 50, 100,200], if (rows.length < 1) {
}, message("请至少选择一条需要分派的数据");
loadComplete: function (grid) { // 在Grid加载完成后,才能给Grid上的按钮绑定事件 return;
$("#SC02").on("click", function () {
if (grid.getCheckedBlockData().rows.length === 0) {
IPLAT.alert({
message: '<b>请勾选一项</b>',
okFn: function (e) {
},
title: '提示'
});
} else {
console.log(grid.getCheckedBlockData().rows[0][10]);
} }
JSColorbox.open({
href: "HPSC098?methodName=initLoad",
title: "<div style='text-align: center;'>选择组织</div>",
width: "40%",
height: "70%",
callbackName: assignCallback
}); });
//分派可修改,不做判断
let num = 0;
rows.forEach(function(element) {
if (element.status == 1) {
num++;
}
ids.push(element.id)
});
// if (num > 0) {
// message("勾选的数据中有已经分派的数据!");
// return;
// } else {
//
// }
});
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
}, },
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();
} }
}, },
query: function () { onRowClick : function(e) {
var ei = new EiInfo(); var block = detailGrid.getEiBlock();
ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val()); if (block != null) {
ei.set("inqu_status-0-prdtCode",$("#inqu_status-0-prdtCode").val()); block.setRows([]);
ei.set("inqu_status-0-status",$("#inqu_status-0-status").val()); detailGrid.setEiBlock(block);
ei.set("inqu_status-0-parentId",parentId? parentId : strs[1]);
// ei.set("inqu_status-0-parentId",-1);
return ei;
},
/**
* 点击行首checkbox,勾选行时触发的事件
* @param e kendo的Event对象
* e.sender kendoGrid对象,resultGrid
* e.fake 用于区分是手动点击的事件还是模拟的事件
* e.checked 用于区分是勾选还是取消勾选
* e.model 勾选或取消勾选的行数据,kendo.data.Model
* e.row 当前行的行号
* e.tr 行的tr,包括固定列和数据列 jquery对象
*/
onCheckRow: function (e) {
if (e.checked) {
console.log('选中');
} }
var info = new EiInfo()
var productionOrderNo = e.model['productionOrderNo'];
var projCode = e.model['projCode'];
var projName = e.model['projName'];
info.set("productionOrderNo",productionOrderNo);
EiCommunicator.send("HPSC006","queryDetail",info,{
onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei);
$('#productionOrderNo').val(productionOrderNo)
$('#projCode').val(projCode)
$('#projName').val(projName)
},onFail:function(ei){}
},{async:false});
}, },
/** columns: [
* EFGrid新增行之前触发的事件,可以根据业务逻辑控制是否进行新增 {
* @param e 事件对象 field: "operator",
* e.sender Grid对象 template: function (item) {
* e.preventDefault 阻止事件发生 let filePath1 = item.filePath1;
*/ let status = item.status;
beforeAdd: function (e) { let template = '';
var logic = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId ? false : true; if (filePath1) {
if (logic) { // 通过业务逻辑判断, 控制是否进行新增 template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
IPLAT.alert({ + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
message: '<b>请选择项目列表</b>',
okFn: function (e) {
},
title: '提示'
});
e.preventDefault();
} }
}, return template
/**
* EFGrid新增行时触发的事件,此时数据行tr元素还未渲染
* @param e 事件对象
* e.sender Grid对象
* e.preventDefault 不会触发dataBound,不渲染tr
* e.index 插入的行号
* e.items 将要插入的数据行数组([Model,Model, ...])
*/
onAdd: function (e) {
// 动态设置默认邮箱
let selectTreeNode = IPLATUI.EFTree.materialTree.selectTreeNode;
$.each(e.items, function (index, item) {
item['projCode'] = selectTreeNode.projCode;
item['projName'] = selectTreeNode.projName;
item['parentId'] = selectTreeNode.nodeId;
item['parentPrdtName'] = selectTreeNode.prdtName;
});
},
/**
* 点击Grid保存按钮时触发的事件
* @param e 事件对象
* e.sender Grid对象
*/
onSave: function (e) {
// 不向后台保存
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC006", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
} }
});
},
/**
* 点击Grid删除按钮时触发的事件
* @param e 事件对象
* e.sender Grid对象
*/
onDelete: function (e) {
// 不向后台保存
console.log(e)
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC006", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
} }
}); ],
}, },
"detail":{
toolbarConfig: { toolbarConfig: {
hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
// add: false, // 不显示新增按钮
// cancel: false, // 不显示取消按钮
// save: false, // 不显示保存按钮
delete: true, // 显示删除按钮
}, },
columns: [ columns: [
{ {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
console.log(item) let filePath1 = item.filePath1;
let auditStatus = item.status;
let lv = item.lv
let template = ''; let template = '';
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' if (filePath1) {
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
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.id + ')" >附件清单</a>'; + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
if (lv === '3') {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
} else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
} }
return template
} }
return template;
} }
},{
field: "prdtName",
query: function (container, options) {
let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
return eiInfo;
}
}, {
field: "parentPrdtName",
template: function (dataItem) {
if(dataItem.lv > 2){
return dataItem['parentPrdtName'];
}
return "";
}
}
// {
// field: "inventRecordId",
// template: function (dataItem) {
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
// return inventNameGlobalData[i]['textField']+'-'+inventNameGlobalData[i]['param1Field'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// var grid = container.closest(".k-grid").data("kendoGrid");
// var cellIndex = grid.cellIndex(container);
// var input = $('<input />');
// input.attr("name", options.field);
// input.attr("id", options.field);
// input.appendTo(container);
// let eiInfo = new EiInfo();
// eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
// eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
// var dataSource;
// EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
// onSuccess: function (ei) {
// dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
// inventNameGlobalData = dataSource;
// },
// onFail: function (ei) {
// }
// }, {async: false});
// input.kendoDropDownList({
// valuePrimitive: true,
// dataTextField: "textField",
// dataParam1Field: "param1Field",
// dataValueField: "valueField",
// dataSource: dataSource,
// template: "#=textField#-#=param1Field#"
// });
// }
// }
], ],
loadComplete: function (grid) {
// 此grid对象
// grid.dataSource.bind("change", function(e) {
// if (e.field == "inventRecordId") {
// var tr,index;
// // 获取此model元素信息
// var item = e.items[0];
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === item.inventRecordId) {
// resultGrid.setCellValue(item, 'prdtCode', inventNameGlobalData[i]['textField'])
// }
// }
// }
// });
}
},
};
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo();
// inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-filePath1", uploadFile);
EiCommunicator.send('HPSC006', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
},
} }
};
//部件类型下拉联动
$('input[name="inqu_status-0-prdtType"]').change(function () {
var inInfo=new EiInfo();
var prdtType=$("#inqu_status-0-prdtType").val();
inInfo.set("inventType",prdtType);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-prdtCode");
dataEdition=ei.getBlock("invent_name_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataEdition,
template: "#=textField#"
});
}, onFail: function (ei) {
}
}, {async: false});
});
});
$(window).load(function () {
// 存货名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [3, 4]);
EiCommunicator.send("HPPZ006", "queryPrdtComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
},
onFail: function (ei) {
} }
}, {async: false});
// 查
query();
}); });
query = function () {
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
function openUploadFile(id) {
uploadFileWindow.open().center();
// rowId = id;
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC006A?methodName=initLoad&inqu_status-0-id=" + id, href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>", title: "<div style='text-align: center;'>附件清单</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
}); });
} }
assignCallback = function (id) {
function check(id, auditStatus) { var info = new EiInfo()
const inEiInfo = new EiInfo(); info.set("ids",ids.join(','));
inEiInfo.set("result-0-id", id); info.set("id",id);
inEiInfo.set("result-0-status", auditStatus); EiCommunicator.send("HPSC005","assign",info,{
EiCommunicator.send('HPSC006', 'check', inEiInfo, { onSuccess:function(ei){//返回结果集
onSuccess(response) { if (ei["status"] == -1) {
NotificationUtil(response.msg); NotificationUtil(ei, "error");
query(); } else {
}, NotificationUtil({
onFail(errorMessage, status, e) { msg: '修改成功'
NotificationUtil("执行失败!", "error"); });
} // 刷新列表
}, resultGrid.dataSource.page(1);
{ // 关闭弹窗
async: false JSColorbox.close();
} }
);
},onFail:function(ei){}
},{async:false});
} }
...@@ -4,86 +4,96 @@ ...@@ -4,86 +4,96 @@
<%@ 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}"/>
<script>
var ctx = "${ctx}";
</script>
<head> <head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%> <%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head> </head>
<EF:EFPage title="下料清单"> <EF:EFPage title="生产下料">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#"> <div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFOption label="全部" value=""/> <EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" row="0"/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
</EF:EFSelect> <EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/>
<EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" filter="contains" defultValue=""> <EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" />
<EF:EFOption label="全部" value=""/> <EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline">
<div id="left-pane" class="i-fit-height" style="width: 20%;float:left;">
<EF:EFRegion id="projTree" title="BOM结构图" fitHeight="true">
<EF:EFTree id="materialTree"
valueField="label"
textField="text"
hasChildren="leaf"
serviceName="HPSC006"
methodName="queryTreeNode">
</EF:EFTree>
</EF:EFRegion>
</div>
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right"> <EF:EFRegion id="result" title="生产任务集">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="no" checkMode="single"> <EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/> <EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true"> <EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="remark" cname="部件备注"/>
<EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="partCode" cname="零件编码"/>
<EF:EFColumn enable="false" ename="partName" cname="零件名称"/>
<EF:EFColumn enable="false" ename="partSpec" cname="零件规格"/>
<EF:EFColumn enable="false" ename="remark1" cname="零件备注"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="物料清单">
<EF:EFInput ename="projCode" type="hidden"/>
<EF:EFInput ename="projName" type="hidden"/>
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn cname="材料类型" ename="inventType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFPopupColumn ename="prdtName" cname="部件名称" width="200" popupType="ServiceGrid" <EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid"
popupTitle="部件信息" serviceName="HPPZ006" methodName="queryPrdtComboBox" resultId="invent_prdt_name_block_id" popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_prdt_name_block_id"
columnEnames="param1Field,textField" columnEnames="inventName,inventCode"
columnCnames="部件名称,部件编码" columnCnames="材料名称,材料编码"
backFillColumnIds="param1Field,textField" backFillColumnIds="inventName,inventCode"
backFillFieldIds="prdtName,prdtCode" backFillFieldIds="inventName,inventCode"
valueField="param1Field" textField="param1Field"/> valueField="inventName" textField="inventName"/>
<EF:EFColumn ename="prdtCode" cname="部件编码"/> <EF:EFColumn ename="inventCode" cname="材料编码"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}"/> <EF:EFColumn ename="length" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}"/> <EF:EFColumn ename="width" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚" format="{0:N3}"/> <EF:EFColumn ename="thick" cname="厚" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" /> <EF:EFColumn ename="remark" cname="备注" />
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/> <EF:EFColumn ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级部件名称"/> <EF:EFColumn ename="unitWt" format="{0:N3}" cname="计划单重"/>
<EF:EFColumn ename="num" required="true" cname="数量"/> <EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="计划总重"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/> <EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/> <EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
<EF:EFComboColumn enable="false" ename="status" align="center" enable="false"/>
columnTemplate="#=textField#" optionLabel=" " <EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/>
itemTemplate="#=textField#" textField="textField" <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
valueField="valueField" cname="提交状态">
<EF:EFOption label="未提交" value="0"></EF:EFOption>
<EF:EFOption label="已提交" value="1"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</div>
</div>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage> </EF:EFPage>
<script> <script>
let ctx="${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/SC/HPSC006.js"></script> <script src="${ctx}/HP/SC/HPSC006.js"></script>
\ No newline at end of file
...@@ -17,6 +17,7 @@ $(function () { ...@@ -17,6 +17,7 @@ $(function () {
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump(' + item.id + ')" >物料清单</a>'; 'onclick="jump(' + item.id + ')" >物料清单</a>';
return template; return template;
} }
} }
...@@ -29,7 +30,4 @@ function jump(id) { ...@@ -29,7 +30,4 @@ function jump(id) {
window.open(herf); window.open(herf);
} }
function jump2(id) {
var herf= ctx + "\\web\\"+ "HPSC006?inqu_status-0-projId=" + id;
window.open(herf);
}
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