Commit fb2ddc9d by yukang

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/main/webapp/HP/SC/HPSC005.js
parents 8e2ab56f 1647b8b5
package com.baosight.hpjx.common;
/**
* @author:songx
* @date:2024/2/5,11:33
*/
public enum ProdOrderStatusEnum {
NOT_ASSIGN(0, "未分派"),
PART_ASSIGN(1, "部分分派"),
ALL_ASSIGN(1, "全部分派");
private Integer code;
private String value;
ProdOrderStatusEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
......@@ -54,7 +54,8 @@ public class HPConstant {
//生产订单
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO";
//生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO";
}
......
......@@ -44,6 +44,8 @@ public class HPSqlConstant {
// 统计
public static final String STAT_DATE = "HPKC003.statDate";
// 锁
public static final String LOCK = "HPKC003.lock";
}
/**
......@@ -79,6 +81,18 @@ public class HPSqlConstant {
}
/**
* HPKC005A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC005A {
// 锁
public static final String LOCK = "HPKC005A.lock";
}
/**
* HPKC006 SQL 定义
*
* @author:songx
......@@ -201,15 +215,32 @@ public class HPSqlConstant {
// 查询
public static final String GET = "HPPZ011.get";
}
/**
* @author:songx
* @date:2024/2/5,10:16
*/
public class HPSC005 {
// 锁
public static final String LOCK = "HPSC005.lock";
// 查询
public static final String UPDATE_ASSIGN_NUM = "HPSC005.updateAssignNum";
}
/**
* @author:songx
* @date:2024/2/5,10:16
*/
public class HPSC005A {
// 锁
public static final String LOCK = "HPSC005A.lock";
// 更新完成数量
public static final String UPDATE_COMPLETE_NUM = "HPSC005A.updateCompleteNum";
}
/**
* 质量巡检单
*
* @author:songx
......
......@@ -10,18 +10,18 @@ import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HPKC003.java <br>
* Title:THpkc003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-31 11:15:24 create
* @history 2024-02-05 16:16:31 create
*/
public class HPKC003 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
......@@ -29,10 +29,6 @@ public class HPKC003 extends DaoEPBase {
public static final String FIELD_PROD_NO = "prodNo"; /* 生产单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
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_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
......@@ -42,7 +38,8 @@ public class HPKC003 extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改人名称*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改时间*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_PROD_TASK_NO = "prodTaskNo"; /* 生产任务号*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0:否1.是*/
public static final String FIELD_PROD_NO_OLD = "prodNoOld"; /* 生产单号(旧)*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
......@@ -62,7 +59,7 @@ public class HPKC003 extends DaoEPBase {
public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/
public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/
public static final String FIELD_REMARK1 = "remark1"; /* 备注*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
......@@ -70,10 +67,6 @@ public class HPKC003 extends DaoEPBase {
public static final String COL_PROD_NO = "PROD_NO"; /* 生产单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
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_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
......@@ -83,7 +76,8 @@ public class HPKC003 extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改人名称*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改时间*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO"; /* 生产任务号*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0:否1.是*/
public static final String COL_PROD_NO_OLD = "PROD_NO_OLD"; /* 生产单号(旧)*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
......@@ -103,24 +97,20 @@ public class HPKC003 extends DaoEPBase {
public static final String COL_PART_THICK = "PART_THICK"; /* 零件-厚*/
public static final String COL_PART_SPEC = "PART_SPEC"; /* 零件规格*/
public static final String COL_REMARK1 = "REMARK1"; /* 备注*/
public static final String QUERY = "t_hpkc003.query";
public static final String COUNT = "t_hpkc003.count";
public static final String INSERT = "t_hpkc003.insert";
public static final String UPDATE = "t_hpkc003.update";
public static final String DELETE = "t_hpkc003.delete";
private Long id = new Long(0); /* ID*/
public static final String QUERY = "HPKC003.query";
public static final String COUNT = "HPKC003.count";
public static final String INSERT = "HPKC003.insert";
public static final String UPDATE = "HPKC003.update";
public static final String DELETE = "HPKC003.delete";
private Long id; /* ID*/
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private String documentDate = " "; /* 票据日期*/
private String prodNo = " "; /* 生产单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private Integer inventType; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private String remark = " "; /* 备注*/
......@@ -130,7 +120,8 @@ public class HPKC003 extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/
private String updatedTime = " "; /* 修改人名称*/
private String updatedName = " "; /* 修改时间*/
private String productionOrderNo = " "; /* 生产订单号*/
private String prodOrderNo = " "; /* 生产订单号*/
private String prodTaskNo = " "; /* 生产任务号*/
private Integer deleteFlag; /* 是否删除0:否1.是*/
private String prodNoOld = " "; /* 生产单号(旧)*/
private String projCode = " "; /* 项目编码*/
......@@ -150,208 +141,196 @@ public class HPKC003 extends DaoEPBase {
private BigDecimal partThick = new BigDecimal("0"); /* 零件-厚*/
private String partSpec = " "; /* 零件规格*/
private String remark1 = " "; /* 备注*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOCUMENT_DATE);
eiColumn.setDescName("票据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_NO);
eiColumn.setDescName("生产单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(12);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(12);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO);
eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_TASK_NO);
eiColumn.setDescName("生产任务号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0:否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_NO_OLD);
eiColumn.setDescName("生产单号(旧)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_SPEC);
eiColumn.setDescName("产品规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_TYPE);
eiColumn.setDescName("零件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_CODE);
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_NAME);
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC);
eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK1);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPKC003() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
......@@ -359,7 +338,7 @@ public class HPKC003 extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
......@@ -375,7 +354,7 @@ public class HPKC003 extends DaoEPBase {
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
......@@ -391,7 +370,7 @@ public class HPKC003 extends DaoEPBase {
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码 预留.
*
......@@ -407,7 +386,7 @@ public class HPKC003 extends DaoEPBase {
public String getDocumentDate() {
return this.documentDate;
}
/**
* set the documentDate - 票据日期.
*
......@@ -423,7 +402,7 @@ public class HPKC003 extends DaoEPBase {
public String getProdNo() {
return this.prodNo;
}
/**
* set the prodNo - 生产单号.
*
......@@ -439,7 +418,7 @@ public class HPKC003 extends DaoEPBase {
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
......@@ -455,7 +434,7 @@ public class HPKC003 extends DaoEPBase {
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
......@@ -465,77 +444,13 @@ public class HPKC003 extends DaoEPBase {
this.whName = whName;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public Integer getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(Integer inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventRecordId - 存货档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 存货档案ID.
*
* @param inventRecordId - 存货档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the amount - 数量.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 数量.
*
......@@ -551,7 +466,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量.
*
......@@ -567,7 +482,7 @@ public class HPKC003 extends DaoEPBase {
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注.
*
......@@ -583,7 +498,7 @@ public class HPKC003 extends DaoEPBase {
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
......@@ -599,7 +514,7 @@ public class HPKC003 extends DaoEPBase {
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
......@@ -615,7 +530,7 @@ public class HPKC003 extends DaoEPBase {
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
......@@ -631,7 +546,7 @@ public class HPKC003 extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
......@@ -647,7 +562,7 @@ public class HPKC003 extends DaoEPBase {
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 修改人名称.
*
......@@ -663,7 +578,7 @@ public class HPKC003 extends DaoEPBase {
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改时间.
*
......@@ -673,20 +588,36 @@ public class HPKC003 extends DaoEPBase {
this.updatedName = updatedName;
}
/**
* get the productionOrderNo - 生产订单号.
* @return the productionOrderNo
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public String getProductionOrderNo() {
return this.productionOrderNo;
public String getProdOrderNo() {
return this.prodOrderNo;
}
/**
* set the productionOrderNo - 生产订单号.
* set the prodOrderNo - 生产订单号.
*
* @param productionOrderNo - 生产订单号
* @param prodOrderNo - 生产订单号
*/
public void setProductionOrderNo(String productionOrderNo) {
this.productionOrderNo = productionOrderNo;
public void setProdOrderNo(String prodOrderNo) {
this.prodOrderNo = prodOrderNo;
}
/**
* get the prodTaskNo - 生产任务号.
* @return the prodTaskNo
*/
public String getProdTaskNo() {
return this.prodTaskNo;
}
/**
* set the prodTaskNo - 生产任务号.
*
* @param prodTaskNo - 生产任务号
*/
public void setProdTaskNo(String prodTaskNo) {
this.prodTaskNo = prodTaskNo;
}
/**
* get the deleteFlag - 是否删除0:否1.是.
......@@ -695,7 +626,7 @@ public class HPKC003 extends DaoEPBase {
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0:否1.是.
*
......@@ -711,7 +642,7 @@ public class HPKC003 extends DaoEPBase {
public String getProdNoOld() {
return this.prodNoOld;
}
/**
* set the prodNoOld - 生产单号(旧).
*
......@@ -727,7 +658,7 @@ public class HPKC003 extends DaoEPBase {
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
......@@ -743,7 +674,7 @@ public class HPKC003 extends DaoEPBase {
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
......@@ -759,7 +690,7 @@ public class HPKC003 extends DaoEPBase {
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtType - 产品类型.
*
......@@ -775,7 +706,7 @@ public class HPKC003 extends DaoEPBase {
public String getPrdtCode() {
return this.prdtCode;
}
/**
* set the prdtCode - 产品编码.
*
......@@ -791,7 +722,7 @@ public class HPKC003 extends DaoEPBase {
public String getPrdtName() {
return this.prdtName;
}
/**
* set the prdtName - 产品名称.
*
......@@ -807,7 +738,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getPrdtLength() {
return this.prdtLength;
}
/**
* set the prdtLength - 产品-长.
*
......@@ -823,7 +754,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getPrdtWidth() {
return this.prdtWidth;
}
/**
* set the prdtWidth - 产品-宽.
*
......@@ -839,7 +770,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getPrdtThick() {
return this.prdtThick;
}
/**
* set the prdtThick - 产品-厚.
*
......@@ -855,7 +786,7 @@ public class HPKC003 extends DaoEPBase {
public String getPrdtSpec() {
return this.prdtSpec;
}
/**
* set the prdtSpec - 产品规格.
*
......@@ -871,7 +802,7 @@ public class HPKC003 extends DaoEPBase {
public Integer getPartType() {
return this.partType;
}
/**
* set the partType - 零件类型.
*
......@@ -887,7 +818,7 @@ public class HPKC003 extends DaoEPBase {
public String getPartCode() {
return this.partCode;
}
/**
* set the partCode - 零件编码.
*
......@@ -903,7 +834,7 @@ public class HPKC003 extends DaoEPBase {
public String getPartName() {
return this.partName;
}
/**
* set the partName - 零件名称.
*
......@@ -919,7 +850,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getPartLength() {
return this.partLength;
}
/**
* set the partLength - 零件-长.
*
......@@ -935,7 +866,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getPartWidth() {
return this.partWidth;
}
/**
* set the partWidth - 零件-宽.
*
......@@ -951,7 +882,7 @@ public class HPKC003 extends DaoEPBase {
public BigDecimal getPartThick() {
return this.partThick;
}
/**
* set the partThick - 零件-厚.
*
......@@ -967,7 +898,7 @@ public class HPKC003 extends DaoEPBase {
public String getPartSpec() {
return this.partSpec;
}
/**
* set the partSpec - 零件规格.
*
......@@ -983,7 +914,7 @@ public class HPKC003 extends DaoEPBase {
public String getRemark1() {
return this.remark1;
}
/**
* set the remark1 - 备注.
*
......@@ -999,7 +930,7 @@ public class HPKC003 extends DaoEPBase {
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
......@@ -1007,10 +938,6 @@ public class HPKC003 extends DaoEPBase {
setProdNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_NO)), prodNo));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
......@@ -1020,7 +947,8 @@ public class HPKC003 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setProdNoOld(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_NO_OLD)), prodNoOld));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
......@@ -1041,13 +969,13 @@ public class HPKC003 extends DaoEPBase {
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec));
setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK1)), remark1));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
......@@ -1056,10 +984,6 @@ public class HPKC003 extends DaoEPBase {
map.put(FIELD_PROD_NO, StringUtils.toString(prodNo, eiMetadata.getMeta(FIELD_PROD_NO)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
......@@ -1069,7 +993,8 @@ public class HPKC003 extends DaoEPBase {
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_PROD_NO_OLD, StringUtils.toString(prodNoOld, eiMetadata.getMeta(FIELD_PROD_NO_OLD)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
......@@ -1089,7 +1014,7 @@ public class HPKC003 extends DaoEPBase {
map.put(FIELD_PART_THICK, StringUtils.toString(partThick, eiMetadata.getMeta(FIELD_PART_THICK)));
map.put(FIELD_PART_SPEC, StringUtils.toString(partSpec, eiMetadata.getMeta(FIELD_PART_SPEC)));
map.put(FIELD_REMARK1, StringUtils.toString(remark1, eiMetadata.getMeta(FIELD_REMARK1)));
return map;
}
}
......@@ -9,12 +9,15 @@ import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.hp.zl.tools.HPZLTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -43,7 +46,7 @@ public class ServiceHPKC003 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata);
} catch (Exception e) {
......@@ -73,115 +76,39 @@ public class ServiceHPKC003 extends ServiceBase {
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据校验
for (Map resultRow : resultRows) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRow);
// 校验是否存在巡检单
Map queryMap = new HashMap();
queryMap.put("prodNo", fKc003.getProductionOrderNo());
queryMap.put("status", CommonConstant.YesNo.NO_0);
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
AssertUtils.isNotEmpty(dbZl001s, String.format("入库失败,生产订单号[%s]有未处理的巡检单,请先处理巡检单",
fKc003.getProductionOrderNo()));
}
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 存货名称
// fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
// 生成入库单号
fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
// fKc003.setPrdtCode(HPPZTools.checkAndSavePZ04(fKc003.getPrdtType(),fKc003.getPrdtName()));
// fKc003.setPartCode(HPPZTools.checkAndSavePZ04(fKc003.getPartType(),fKc003.getPartName()));
DaoUtils.insert("HPKC003.insert", fKc003);
//同步生产计划
DaoUtils.update("HPSC004.update",this.synchronousPlan(fKc003));
//产品库存更新接口
HPKCTools.updateProdStock(fKc003.getWhCode(),fKc003.getProdNo(),fKc003.getAmount(),fKc003.getWeight());
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getPz007ByCode(fKc003.getWhCode()).getWhName());
// 存货名称
fKc003.setInventName(HPPZTools.getPz004ByCode(fKc003.getInventCode()).getInventName());
DaoUtils.update("HPKC003.update", fKc003);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param eiInfo
* @return
*/
public EiInfo delete(EiInfo eiInfo) {
HPKC003 hpkc003 = new HPKC003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc003.fromMap(map);
this.dao.delete("HPKC003.delete", hpkc003.toMap());
List<Map> resultRows = eiInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> prodNos = ObjectUtils.listKey(resultRows, "prodNo");
// 锁
HPKCTools.HpKc003.lock(prodNos);
// 查询数据
Map<String, HPKC003> dbKc003Map = HPKCTools.HpKc003.map(prodNos);
for (Map resultRow : resultRows) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRow);
DaoUtils.update(HPKC003.DELETE, fKc003);
//生产一条负数量和产量的红冲记录
hpkc003.setAmount(hpkc003.getAmount().multiply(new BigDecimal(-1.000)));
hpkc003.setWeight(hpkc003.getWeight().multiply(new BigDecimal(-1.000)));
hpkc003.setDeleteFlag(1);
hpkc003.setProdNoOld(hpkc003.getProdNo());
hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", hpkc003);
//同步生产计划
DaoUtils.update("HPSC004.update",this.synchronousPlan(hpkc003));
HPKC003 dbKc003 = dbKc003Map.get(fKc003.getProdNo());
HPKC003 newKc003 = BeanUtils.copy(dbKc003, HPKC003.class);
newKc003.setAmount(dbKc003.getAmount().negate());
newKc003.setWeight(dbKc003.getWeight().negate());
newKc003.setDeleteFlag(1);
newKc003.setProdNoOld(fKc003.getProdNo());
newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert(HPKC003.INSERT, newKc003);
// 同步生产计划
DaoUtils.update("HPSC004.update", this.synchronousPlan(newKc003));
// 更新生产任务已完成数量
HPSCTools.HpSc005a.updateCompleteNum(newKc003.getProdTaskNo(), newKc003.getAmount());
// 修改库存
HPKCTools.updateStock(hpkc003.getWhCode(), hpkc003.getInventRecordId(), hpkc003.getAmount().negate(),
hpkc003.getWeight().negate());
HPKCTools.updateProdStock(newKc003.getWhCode(), newKc003.getProdOrderNo(),
newKc003.getAmount(), newKc003.getWeight());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
......@@ -197,20 +124,19 @@ public class ServiceHPKC003 extends ServiceBase {
* @param hpkc003
*/
public HPSC004 synchronousPlan(HPKC003 hpkc003) {
HPSC004 hpsc004 = (HPSC004) this.dao.get("HPSC004.queryDetail","productionOrderNo",hpkc003.getProductionOrderNo());
if (hpsc004 != null) {
BigDecimal actualCompletionNum = hpkc003.getAmount().add(hpsc004.getActualCompletionNum());
BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(hpsc004.getActualCompletionUnitWt());
hpsc004.setActualCompletionNum(actualCompletionNum);
hpsc004.setActualCompletionUnitWt(actualCompletionUnitWt);
//计算是否生产完成
if (hpsc004.getNum().compareTo(actualCompletionNum) < 0
&& hpsc004.getUnitWt().compareTo(actualCompletionUnitWt) < 0) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
hpsc004.setActualCompletionDate(DateUtils.toDateStr(new Date(),DateUtils.DEFAULT_DATETIME_PATTERN));
} else {
hpsc004.setActualCompletionDate("");
}
HPSC004 hpsc004 = (HPSC004) this.dao.get("HPSC004.queryDetail", "productionOrderNo", hpkc003.getProdOrderNo());
AssertUtils.isNull(hpsc004, String.format("生产订单[%s]对应的任务计划不存在", hpkc003.getProdOrderNo()));
BigDecimal actualCompletionNum = hpkc003.getAmount().add(hpsc004.getActualCompletionNum());
BigDecimal actualCompletionUnitWt = hpkc003.getWeight().add(hpsc004.getActualCompletionUnitWt());
hpsc004.setActualCompletionNum(actualCompletionNum);
hpsc004.setActualCompletionUnitWt(actualCompletionUnitWt);
//计算是否生产完成
if (hpsc004.getNum().compareTo(actualCompletionNum) < 0
&& hpsc004.getUnitWt().compareTo(actualCompletionUnitWt) < 0) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
hpsc004.setActualCompletionDate(DateUtils.toDateStr(new Date(),DateUtils.DEFAULT_DATETIME_PATTERN));
} else {
hpsc004.setActualCompletionDate("");
}
return hpsc004;
}
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 选择生产任务
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPKC003A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 生成巡检单
*
* @param inInfo
* @return
*/
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 订单号
List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo");
// 任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
// 锁订单
HPSCTools.HpSc005.lock(prodOrderNos);
// 锁任务
HPSCTools.HpSc005a.lock(prodTaskNos);
// 查询任务信息
Map<String, HPSC005B> dbSc005bMap = HPSCTools.HpSc005b.map(prodTaskNos);
// 数据校验
for (Map row : resultRows) {
String whCode = MapUtils.getString(row, "whCode");
BigDecimal applyNum = MapUtils.getBigDecimal(row, "applyNum");
HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row);
AssertUtils.isEmpty(whCode, String.format("任务号[%s]的仓库不存在为空",
fSc005b.getProdTaskNo()));
HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
AssertUtils.isTrue(ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005b.getStatus()),
String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId()));
BigDecimal subNum = dbSc005b.getNum().subtract(dbSc005b.getCompleteNum());
AssertUtils.isGt(applyNum, subNum, String.format("任务号[%s]申请数量[%s]不能大于未入库的数量[%s]",
fSc005b.getProdTaskNo(), applyNum, subNum));
// 校验是否存在巡检单
Map queryMap = new HashMap();
queryMap.put("prodTaskNo", fSc005b.getProdTaskNo());
queryMap.put("status", CommonConstant.YesNo.NO_0);
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
AssertUtils.isNotEmpty(dbZl001s, String.format("任务号[%s]存在未处理的质量巡检单,请先处理质量巡检单",
fSc005b.getProdTaskNo()));
}
// 生成入库单
for (Map row : resultRows) {
String whCode = MapUtils.getString(row, "whCode");
BigDecimal applyNum = MapUtils.getBigDecimal(row, "applyNum");
HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row);
HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
HPKC003 newKc003 = BeanUtils.copy(dbSc005b, HPKC003.class);
newKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
newKc003.setDocumentDate(DateUtils.shortDate());
newKc003.setWhCode(whCode);
newKc003.setWhName(HPPZTools.getPz007ByCode(whCode).getWhName());
newKc003.setAmount(applyNum);
newKc003.setWeight(applyNum.multiply(dbSc005b.getUnitWt()));
newKc003.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPKC003.INSERT, newKc003);
// 更新生产任务已完成数量
HPSCTools.HpSc005a.updateCompleteNum(fSc005b.getProdTaskNo(), applyNum);
// 修改库存
HPKCTools.updateProdStock(newKc003.getWhCode(), newKc003.getProdOrderNo(),
newKc003.getAmount(), newKc003.getWeight());
}
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "生成入库单失败");
}
return inInfo;
}
}
......@@ -180,8 +180,8 @@ public class ServiceHPKC009 extends ServiceBase {
// 1.3、生产入库
List<HPKC003> scRks = dao.query(HPSqlConstant.HPKC003.STAT_DATE, queryMap);
Map<String, HPKC003> scRkMap = scRks.stream().collect(Collectors.toMap(item ->
buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventType(), item.getInventCode(),
item.getWhCode(), item.getInventRecordId()), item -> item));
buildKey(item.getCompanyCode(), item.getDepCode(), item.getPartType(), item.getPartCode(),
item.getWhCode(), null), item -> item));
// 1.4、其他入库
List<HPKC006> qtRks = dao.query(HPSqlConstant.HPKC006.STAT_DATE, queryMap);
Map<String, HPKC006> qtRkMap = qtRks.stream().collect(Collectors.toMap(item ->
......
......@@ -3,49 +3,52 @@
<sqlMap namespace="HPKC003">
<sql id="column">
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
DOCUMENT_DATE as "documentDate", <!-- 票据日期 -->
PROD_NO as "prodNo", <!-- 生产单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime", <!-- 修改人名称 -->
UPDATED_NAME as "updatedName", <!-- 修改时间 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
PROD_NO_OLD as "prodNoOld", <!-- 生产单号(旧) -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
REMARK1 as "remark1" <!-- 备注 -->
ID as "id", <!-- ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
DOCUMENT_DATE as "documentDate", <!-- 票据日期 -->
PROD_NO as "prodNo", <!-- 生产单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_TIME as "updatedTime", <!-- 修改人名称 -->
UPDATED_NAME as "updatedName", <!-- 修改时间 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
PROD_NO_OLD as "prodNoOld", <!-- 生产单号(旧) -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
REMARK1 as "remark1" <!-- 备注 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -55,8 +58,8 @@
<isNotEmpty prepend=" AND " property="prodNo">
PROD_NO LIKE ('%$prodNo$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO LIKE ('%$productionOrderNo$%')
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO LIKE ('%prodOrderNo%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
......@@ -64,21 +67,6 @@
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
......@@ -128,98 +116,65 @@
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPKC003 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
DOCUMENT_DATE, <!-- 票据日期 -->
PROD_NO, <!-- 生产单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_TIME, <!-- 修改人名称 -->
UPDATED_NAME, <!-- 修改时间 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
PROD_NO_OLD, <!-- 生产单号(旧) -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PRDT_LENGTH, <!-- 产品-长 -->
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
REMARK1 <!-- 备注 -->
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
DOCUMENT_DATE, <!-- 票据日期 -->
PROD_NO, <!-- 生产单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROD_TASK_NO, <!-- 生产任务号 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 -->
PROD_NO_OLD, <!-- 生产单号(旧) -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PRDT_LENGTH, <!-- 产品-长 -->
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
REMARK1 <!-- 备注 -->
) VALUES (
#companyCode#, #depCode#, #documentDate#, #prodNo#, #whCode#, #whName#, #amount#,
#weight#, #remark#, #createdBy#, #createdName#, #createdTime#, #prodOrderNo#,
#prodTaskNo#, #deleteFlag#, #prodNoOld#, #projCode#, #projName#, #prdtType#,
#prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#,
#partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#,
#partSpec#, #remark1#
)
VALUES (#companyCode#, #depCode#, #documentDate#, #prodNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#, #remark#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#, #productionOrderNo#, #deleteFlag#, #prodNoOld#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #remark1#)
</insert>
<!-- 逻辑删除 -->
<update id="delete">
UPDATE ${hpjxSchema}.T_HPKC003
SET DELETE_FLAG = 1 WHERE ID = #id#
UPDATE ${hpjxSchema}.T_HPKC003 SET DELETE_FLAG = 1 WHERE ID = #id#
</update>
<update id="update">
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPKC003
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 预留 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
DOCUMENT_DATE = #documentDate#, <!-- 票据日期 -->
PROD_NO = #prodNo#, <!-- 生产单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
REMARK = #remark#, <!-- 备注 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_TIME = #updatedTime#, <!-- 修改人名称 -->
UPDATED_NAME = #updatedName#, <!-- 修改时间 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
PROD_NO_OLD = #prodNoOld#, <!-- 生产单号(旧) -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 -->
PART_LENGTH = #partLength#, <!-- 零件-长 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
REMARK1 = #remark1# <!-- 备注 -->
WHERE
ID = #id#
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNos">
PROD_NO IN <iterate close=")" open="(" conjunction="," property="prodNos">#prodNos[]#</iterate>
</isNotEmpty>
</update>
<!-- 统计库存 -->
......
......@@ -129,6 +129,75 @@ public class HPKCTools {
}
/**
* HPKC003 公共方法定义
*
* @author:songx
* @date:2024/1/31,16:36
*/
public static class HpKc003 {
/**
* 锁
*
* @param prodNos
* @return
*/
public static void lock(List<String> prodNos) {
if (CollectionUtils.isEmpty(prodNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("prodNos", prodNos);
DaoBase.getInstance().update(HPSqlConstant.HPKC003.LOCK, queryMap);
}
/**
* 查询销售出库信息
*
* @param ids
* @return
*/
public static List<HPKC003> listById(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HPKC003.QUERY, queryMap);
}
/**
* 查询信息
*
* @param prodNos
* @return
*/
public static List<HPKC003> list(List<String> prodNos) {
if (CollectionUtils.isEmpty(prodNos)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("prodNos", prodNos);
return DaoBase.getInstance().query(HPKC003.QUERY, queryMap);
}
/**
* 查询信息
*
* @param prodNos
* @return
*/
public static Map<String, HPKC003> map(List<String> prodNos) {
List<HPKC003> results = list(prodNos);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPKC003::getProdNo, item -> item));
}
}
/**
* HPKC004 公共方法定义
*
......
......@@ -4,6 +4,7 @@ import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
......@@ -31,6 +32,30 @@ import java.util.stream.Collectors;
public class HPPZTools {
/**
* HPPZ011公共DAO方法定义
*
* @author:songx
* @date:2024/2/5,11:18
*/
public static class HpPz011 {
/**
* 查询其他入库信息
*
* @param id
* @return
*/
public static HPPZ011 get(Long id) {
AssertUtils.isNull(id, String.format("厂区生产组ID[%s]不能为空", id));
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPPZ011> results = DaoBase.getInstance().query(HPPZ011.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("厂区生产组ID[%s]不存在", id));
return results.get(0);
}
}
/**
* 查询存货
*
* @param inventCode
......
......@@ -16,659 +16,856 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-22 15:35:04 create
* @history 2024-02-05 14:06:35 create
*/
public class HPSC005 extends DaoEPBase {
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_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/
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_PRDT_TYPE = "prdtType"; /* 部件类型*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 部件编码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 部件名称*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品编码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_PRDT_LENGTH = "prdtLength"; /* 产品-长*/
public static final String FIELD_PRDT_WIDTH = "prdtWidth"; /* 产品-宽*/
public static final String FIELD_PRDT_THICK = "prdtThick"; /* 产品-厚*/
public static final String FIELD_PRDT_SPEC = "prdtSpec"; /* 产品规格*/
public static final String FIELD_PART_TYPE = "partType"; /* 零件类型*/
public static final String FIELD_PART_CODE = "partCode"; /* 零件编码*/
public static final String FIELD_PART_NAME = "partName"; /* 零件名称*/
public static final String FIELD_PART_LENGTH = "partLength"; /* 零件-长*/
public static final String FIELD_PART_WIDTH = "partWidth"; /* 零件-宽*/
public static final String FIELD_PART_THICK = "partThick"; /* 零件-厚*/
public static final String FIELD_PART_SPEC = "partSpec"; /* 零件规格*/
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_UNIT_WT = "unitWt"; /* 计划单重*/
public static final String FIELD_TOTAL_WT = "totalWt"; /* 计划重量*/
public static final String FIELD_STATUS = "status"; /* 状态 0-未派工,1-已派工*/
public static final String FIELD_ASSIGNED_NUM = "assignedNum"; /* 已派工数量*/
public static final String FIELD_UNASSIGNED_NUM = "unassignedNum"; /* 待派工数量*/
public static final String FIELD_STATUS = "status"; /* 状态:0.计划中,1.不分派工,2.全部派工*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/
public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/
public static final String FIELD_DOCUMENT_TYPE = "documentType"; /* 单据类型 0-非子母单;1-子母单*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_REMARK1 = "remark1"; /* 备注*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
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_FILE_PATH2 = "filePath2"; /* 文件地址2*/
public static final String FIELD_FILE_PATH3 = "filePath3"; /* 文件地址3*/
public static final String FIELD_FILE_PATH4 = "filePath4"; /* 文件地址4*/
public static final String FIELD_FILE_PATH5 = "filePath5"; /* 文件地址5*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId";
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
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_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/
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_PRDT_TYPE = "PRDT_TYPE"; /* 部件类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 部件编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 部件名称*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_PRDT_LENGTH = "PRDT_LENGTH"; /* 产品-长*/
public static final String COL_PRDT_WIDTH = "PRDT_WIDTH"; /* 产品-宽*/
public static final String COL_PRDT_THICK = "PRDT_THICK"; /* 产品-厚*/
public static final String COL_PRDT_SPEC = "PRDT_SPEC"; /* 产品规格*/
public static final String COL_PART_TYPE = "PART_TYPE"; /* 零件类型*/
public static final String COL_PART_CODE = "PART_CODE"; /* 零件编码*/
public static final String COL_PART_NAME = "PART_NAME"; /* 零件名称*/
public static final String COL_PART_LENGTH = "PART_LENGTH"; /* 零件-长*/
public static final String COL_PART_WIDTH = "PART_WIDTH"; /* 零件-宽*/
public static final String COL_PART_THICK = "PART_THICK"; /* 零件-厚*/
public static final String COL_PART_SPEC = "PART_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_UNIT_WT = "UNIT_WT"; /* 计划单重*/
public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 计划重量*/
public static final String COL_STATUS = "STATUS"; /* 状态 0-未派工,1-已派工*/
public static final String COL_ASSIGNED_NUM = "ASSIGNED_NUM"; /* 已派工数量*/
public static final String COL_UNASSIGNED_NUM = "UNASSIGNED_NUM"; /* 待派工数量*/
public static final String COL_STATUS = "STATUS"; /* 状态:0.计划中,1.不分派工,2.全部派工*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_ORG_NO = "ORG_NO"; /* 生产组编码*/
public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/
public static final String COL_DOCUMENT_TYPE = "DOCUMENT_TYPE"; /* 单据类型 0-非子母单;1-子母单*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_REMARK1 = "REMARK1"; /* 备注*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_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_FILE_PATH2 = "FILE_PATH2"; /* 文件地址2*/
public static final String COL_FILE_PATH3 = "FILE_PATH3"; /* 文件地址3*/
public static final String COL_FILE_PATH4 = "FILE_PATH4"; /* 文件地址4*/
public static final String COL_FILE_PATH5 = "FILE_PATH5"; /* 文件地址5*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID";
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String QUERY = "HPSC005.query";
public static final String COUNT = "HPSC005.count";
public static final String INSERT = "HPSC005.insert";
public static final String UPDATE = "HPSC005.update";
public static final String DELETE = "HPSC005.delete";
private Long id = new Long(0);
private Long id;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String productionOrderNo = " "; /* 生产订单号*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String productionOrderNo = " "; /* 生产订单号*/
private Integer prdtType = 0; /*部件类型*/
private String prdtCode = " "; /* 部件编码*/
private String prdtName = " "; /* 部件名称*/
private Integer prdtType; /* 产品类型*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private BigDecimal prdtLength = new BigDecimal("0"); /* 产品-长*/
private BigDecimal prdtWidth = new BigDecimal("0"); /* 产品-宽*/
private BigDecimal prdtThick = new BigDecimal("0"); /* 产品-厚*/
private String prdtSpec = " "; /* 产品规格*/
private Integer partType; /* 零件类型*/
private String partCode = " "; /* 零件编码*/
private String partName = " "; /* 零件名称*/
private BigDecimal partLength = new BigDecimal("0"); /* 零件-长*/
private BigDecimal partWidth = new BigDecimal("0"); /* 零件-宽*/
private BigDecimal partThick = new BigDecimal("0"); /* 零件-厚*/
private String partSpec = " "; /* 零件规格*/
private String planCompletionDate = " "; /* 计划完成日期*/
private BigDecimal num = new BigDecimal(0.000); /* 计划数量*/
private BigDecimal unitWt = new BigDecimal(0.000); /* 单重*/
private BigDecimal num = new BigDecimal(0.000); /* 计划数量*/
private BigDecimal unitWt = new BigDecimal("0"); /* 计划单重*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 计划重量*/
private Integer status = new Integer(0); /* 状态 0-未派工,1-已派工*/
private BigDecimal assignedNum = new BigDecimal("0"); /* 已派工数量*/
private BigDecimal unassignedNum = new BigDecimal("0"); /* 待派工数量*/
private Integer status; /* 状态:0.计划中,1.不分派工,2.全部派工*/
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/
private Boolean documentType; /* 单据类型 0-非子母单;1-子母单*/
private String remark = " "; /* 备注*/
private String remark1 = " "; /* 备注*/
private String createdBy = " "; /* 创建人*/
private String createdTime ; /* 创建时间*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedTime ; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private String filePath1 = " "; /* 文件地址1*/
private String filePath2 = " "; /* 文件地址2*/
private String filePath3 = " "; /* 文件地址3*/
private String filePath4 = " "; /* 文件地址4*/
private String filePath5 = " "; /* 文件地址5*/
private Long inventRecordId = new Long(0);
private String prdtSpec;
private BigDecimal prdtLength = new BigDecimal(0.00); /* 长*/
private BigDecimal prdtWidth = new BigDecimal(0.00); /* 宽*/
private BigDecimal prdtThick = new BigDecimal(0.00); /* 厚*/
private Integer partType = new Integer(0);
private String partCode;
private String partName;
private String partSpec;
private BigDecimal partLength = new BigDecimal(0.00); /* 长*/
private BigDecimal partWidth = new BigDecimal(0.00); /* 宽*/
private BigDecimal partThick = new BigDecimal(0.00); /* 厚*/
private String remark1;
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private BigDecimal assignedNum = new BigDecimal(0.00); /* 已派工数量*/
private BigDecimal unassignedNum = new BigDecimal(0.00); /* 待派工数量*/
private Integer documentType = new Integer(0); /* 单据类型 0-非子母单;1-子母单 */
private Long inventRecordId; /* 存货档案ID*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_TYPE);
eiColumn.setDescName("部件类型");
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_CODE);
eiColumn.setDescName("部件编码");
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_NAME);
eiColumn.setDescName("部件名称");
eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("产品-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRDT_SPEC);
eiColumn.setDescName("产品规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_TYPE);
eiColumn.setDescName("零件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_CODE);
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_NAME);
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("零件-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PART_SPEC);
eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_COMPLETION_DATE);
eiColumn.setDescName("计划完成日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("计划数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_WT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("计划单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_WT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("计划重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ASSIGNED_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("已派工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNASSIGNED_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("待派工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-未派工,1-已派工");
eiColumn.setDescName("状态:0.计划中,1.不分派工,2.全部派工");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NO);
eiColumn.setDescName("生产组编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NAME);
eiColumn.setDescName("生产组名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOCUMENT_TYPE);
eiColumn.setDescName("单据类型 0-非子母单;1-子母单");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK1);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("更新人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH1);
eiColumn.setDescName("文件地址1");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH2);
eiColumn.setDescName("文件地址2");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH3);
eiColumn.setDescName("文件地址3");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH4);
eiColumn.setDescName("文件地址4");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH5);
eiColumn.setDescName("文件地址5");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtSpec");
eiColumn.setDescName("产品规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partType");
eiColumn.setDescName("零件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partCode");
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partName");
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partSpec");
eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("remark1");
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partLength");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("零件-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partWidth");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("零件-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partThick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("零件-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtLength");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtWidth");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtThick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("assignedNum");
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("已派工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("unassignedNum");
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("待派工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("documentType");
eiColumn.setDescName("单据类型 0-非子母单;1-子母单");
eiColumn.setDescName("存货档案ID");
eiMetadata.addMeta(eiColumn);
}
/**
* get the documentType - 单据类型 0-非子母单;1-子母单.
* @return the documentType
* the constructor.
*/
public Integer getDocumentType() {
return this.documentType;
public HPSC005() {
initMetaData();
}
/**
* set the documentType - 单据类型 0-非子母单;1-子母单.
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param documentType - 单据类型 0-非子母单;1-子母单
* @param id
*/
public void setDocumentType(Integer documentType) {
this.documentType = documentType;
public void setId(Long id) {
this.id = id;
}
/**
* get the unassignedNum - 待派工数量.
* @return the unassignedNum
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public BigDecimal getUnassignedNum() {
return this.unassignedNum;
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the unassignedNum - 待派工数量.
* set the companyCode - 企业编码 预留.
*
* @param unassignedNum - 待派工数量
* @param companyCode - 企业编码 预留
*/
public void setUnassignedNum(BigDecimal unassignedNum) {
this.unassignedNum = unassignedNum;
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the assignedNum - 已派工数量.
* @return the assignedNum
* get the depCode - 部门编码.
* @return the depCode
*/
public BigDecimal getAssignedNum() {
return this.assignedNum;
public String getDepCode() {
return this.depCode;
}
/**
* set the assignedNum - 已派工数量.
* set the depCode - 部门编码.
*
* @param assignedNum - 已派工数量
* @param depCode - 部门编码
*/
public void setAssignedNum(BigDecimal assignedNum) {
this.assignedNum = assignedNum;
}
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the unitWt - 单重.
* @return the unitWt
* get the productionOrderNo - 生产订单号.
* @return the productionOrderNo
*/
public BigDecimal getUnitWt() {
return this.unitWt;
public String getProductionOrderNo() {
return this.productionOrderNo;
}
/**
* set the unitWt - 单重.
* set the productionOrderNo - 生产订单号.
*
* @param unitWt - 单重
* @param productionOrderNo - 生产订单号
*/
public void setUnitWt(BigDecimal unitWt) {
this.unitWt = unitWt;
public void setProductionOrderNo(String productionOrderNo) {
this.productionOrderNo = productionOrderNo;
}
public String getRemark1() {
return this.remark1;
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
public void setRemark1(String remark1) {
this.remark1 = remark1;
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
public String getPartSpec() {
return this.partSpec;
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
public void setPartSpec(String partSpec) {
this.partSpec = partSpec;
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
public String getPartName() {
return this.partName;
/**
* get the prdtType - 产品类型.
* @return the prdtType
*/
public Integer getPrdtType() {
return this.prdtType;
}
public void setPartName(String partName) {
this.partName = partName;
/**
* set the prdtType - 产品类型.
*
* @param prdtType - 产品类型
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
public String getPartCode() {
return this.partCode;
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public String getPrdtCode() {
return this.prdtCode;
}
public void setPartCode(String partCode) {
this.partCode = partCode;
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtCode(String prdtCode) {
this.prdtCode = prdtCode;
}
public Integer getPartType() {
return this.partType;
/**
* get the prdtName - 产品名称.
* @return the prdtName
*/
public String getPrdtName() {
return this.prdtName;
}
public void setPartType(Integer partType) {
this.partType = partType;
/**
* set the prdtName - 产品名称.
*
* @param prdtName - 产品名称
*/
public void setPrdtName(String prdtName) {
this.prdtName = prdtName;
}
/**
* get the prdtLength - 产品-长.
* @return the prdtLength
*/
public BigDecimal getPrdtLength() {
return this.prdtLength;
}
/**
* set the prdtLength - 产品-长.
*
* @param prdtLength - 产品-长
*/
public void setPrdtLength(BigDecimal prdtLength) {
this.prdtLength = prdtLength;
}
/**
* get the prdtWidth - 产品-宽.
* @return the prdtWidth
*/
public BigDecimal getPrdtWidth() {
return this.prdtWidth;
}
/**
* set the prdtWidth - 产品-宽.
*
* @param prdtWidth - 产品-宽
*/
public void setPrdtWidth(BigDecimal prdtWidth) {
this.prdtWidth = prdtWidth;
}
/**
* get the prdtThick - 产品-厚.
* @return the prdtThick
*/
public BigDecimal getPrdtThick() {
return this.prdtThick;
}
/**
* set the prdtThick - 产品-厚.
*
* @param prdtThick - 产品-厚
*/
public void setPrdtThick(BigDecimal prdtThick) {
this.prdtThick = prdtThick;
}
/**
* get the prdtSpec - 产品规格.
* @return the prdtSpec
*/
public String getPrdtSpec() {
return this.prdtSpec;
}
/**
* set the prdtSpec - 产品规格.
*
* @param prdtSpec - 产品规格
*/
public void setPrdtSpec(String prdtSpec) {
this.prdtSpec = prdtSpec;
}
public String getFactoryCode() {
return factoryCode;
/**
* get the partType - 零件类型.
* @return the partType
*/
public Integer getPartType() {
return this.partType;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
/**
* set the partType - 零件类型.
*
* @param partType - 零件类型
*/
public void setPartType(Integer partType) {
this.partType = partType;
}
public String getFactoryName() {
return factoryName;
/**
* get the partCode - 零件编码.
* @return the partCode
*/
public String getPartCode() {
return this.partCode;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
/**
* set the partCode - 零件编码.
*
* @param partCode - 零件编码
*/
public void setPartCode(String partCode) {
this.partCode = partCode;
}
/**
* the constructor.
* get the partName - 零件名称.
* @return the partName
*/
public HPSC005() {
initMetaData();
public String getPartName() {
return this.partName;
}
/**
* get the id .
* @return the id
* set the partName - 零件名称.
*
* @param partName - 零件名称
*/
public Long getId() {
return this.id;
public void setPartName(String partName) {
this.partName = partName;
}
/**
* set the id .
* get the partLength - 零件-长.
* @return the partLength
*/
public BigDecimal getPartLength() {
return this.partLength;
}
/**
* set the partLength - 零件-长.
*
* @param id
* @param partLength - 零件-长
*/
public void setId(Long id) {
this.id = id;
public void setPartLength(BigDecimal partLength) {
this.partLength = partLength;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
* get the partWidth - 零件-宽.
* @return the partWidth
*/
public String getCompanyCode() {
return this.companyCode;
public BigDecimal getPartWidth() {
return this.partWidth;
}
/**
* set the companyCode - 企业编码 预留.
* set the partWidth - 零件-宽.
*
* @param companyCode - 企业编码 预留
* @param partWidth - 零件-宽
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
public void setPartWidth(BigDecimal partWidth) {
this.partWidth = partWidth;
}
/**
* get the projCode - 项目编码.
* @return the projCode
* get the partThick - 零件-厚.
* @return the partThick
*/
public String getProjCode() {
return this.projCode;
public BigDecimal getPartThick() {
return this.partThick;
}
/**
* set the projCode - 项目编码.
* set the partThick - 零件-厚.
*
* @param projCode - 项目编码
* @param partThick - 零件-厚
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
public void setPartThick(BigDecimal partThick) {
this.partThick = partThick;
}
/**
* get the projName - 项目名称.
* @return the projName
* get the partSpec - 零件规格.
* @return the partSpec
*/
public String getProjName() {
return this.projName;
public String getPartSpec() {
return this.partSpec;
}
/**
* set the projName - 项目名称.
* set the partSpec - 零件规格.
*
* @param projName - 项目名称
* @param partSpec - 零件规格
*/
public void setProjName(String projName) {
this.projName = projName;
public void setPartSpec(String partSpec) {
this.partSpec = partSpec;
}
/**
* get the productionOrderNo - 生产订单号.
* @return the productionOrderNo
* get the planCompletionDate - 计划完成日期.
* @return the planCompletionDate
*/
public String getProductionOrderNo() {
return this.productionOrderNo;
public String getPlanCompletionDate() {
return this.planCompletionDate;
}
/**
* set the productionOrderNo - 生产订单号.
* set the planCompletionDate - 计划完成日期.
*
* @param productionOrderNo - 生产订单号
* @param planCompletionDate - 计划完成日期
*/
public void setProductionOrderNo(String productionOrderNo) {
this.productionOrderNo = productionOrderNo;
public void setPlanCompletionDate(String planCompletionDate) {
this.planCompletionDate = planCompletionDate;
}
/**
* get the prdtCode - 部件编码.
* @return the prdtCode
* get the num - 计划数量.
* @return the num
*/
public Integer getPrdtType() {
return this.prdtType;
public BigDecimal getNum() {
return this.num;
}
/**
* set the prdtCode - 部件编码.
* set the num - 计划数量.
*
* @param prdtCode - 部件编码
* @param num - 计划数量
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
public void setNum(BigDecimal num) {
this.num = num;
}
/**
* get the prdtCode - 部件编码.
* @return the prdtCode
* get the unitWt - 计划单重.
* @return the unitWt
*/
public String getPrdtCode() {
return this.prdtCode;
public BigDecimal getUnitWt() {
return this.unitWt;
}
/**
* set the prdtCode - 部件编码.
* set the unitWt - 计划单重.
*
* @param prdtCode - 部件编码
* @param unitWt - 计划单重
*/
public void setPrdtCode(String prdtCode) {
this.prdtCode = prdtCode;
public void setUnitWt(BigDecimal unitWt) {
this.unitWt = unitWt;
}
/**
* get the prdtName - 部件名称.
* @return the prdtName
* get the totalWt - 计划重量.
* @return the totalWt
*/
public String getPrdtName() {
return this.prdtName;
public BigDecimal getTotalWt() {
return this.totalWt;
}
/**
* set the totalWt - 计划重量.
*
* @param totalWt - 计划重量
*/
public void setTotalWt(BigDecimal totalWt) {
this.totalWt = totalWt;
}
/**
* get the assignedNum - 已派工数量.
* @return the assignedNum
*/
public BigDecimal getAssignedNum() {
return this.assignedNum;
}
/**
* set the prdtName - 部件名称.
* set the assignedNum - 已派工数量.
*
* @param prdtName - 部件名称
* @param assignedNum - 已派工数量
*/
public void setPrdtName(String prdtName) {
this.prdtName = prdtName;
public void setAssignedNum(BigDecimal assignedNum) {
this.assignedNum = assignedNum;
}
/**
* get the planCompletionDate - 计划完成日期.
* @return the planCompletionDate
* get the unassignedNum - 待派工数量.
* @return the unassignedNum
*/
public String getPlanCompletionDate() {
return this.planCompletionDate;
public BigDecimal getUnassignedNum() {
return this.unassignedNum;
}
/**
* set the planCompletionDate - 计划完成日期.
* set the unassignedNum - 待派工数量.
*
* @param planCompletionDate - 计划完成日期
* @param unassignedNum - 待派工数量
*/
public void setPlanCompletionDate(String planCompletionDate) {
this.planCompletionDate = planCompletionDate;
public void setUnassignedNum(BigDecimal unassignedNum) {
this.unassignedNum = unassignedNum;
}
/**
* get the num - 计划数量.
* @return the num
* get the status - 状态:0.计划中,1.不分派工,2.全部派工.
* @return the status
*/
public BigDecimal getNum() {
return this.num;
public Integer getStatus() {
return this.status;
}
/**
* set the num - 计划数量.
* set the status - 状态:0.计划中,1.不分派工,2.全部派工.
*
* @param num - 计划数量
* @param status - 状态:0.计划中,1.不分派工,2.全部派工
*/
public void setNum(BigDecimal num) {
this.num = num;
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the totalWt - 计划重量.
* @return the totalWt
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public BigDecimal getTotalWt() {
return this.totalWt;
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the totalWt - 计划重量.
* set the factoryCode - 厂区编码.
*
* @param totalWt - 计划重量
* @param factoryCode - 厂区编码
*/
public void setTotalWt(BigDecimal totalWt) {
this.totalWt = totalWt;
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the status - 状态 0-未派工,1-已派工.
* @return the status
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public Integer getStatus() {
return this.status;
public String getFactoryName() {
return this.factoryName;
}
/**
* set the status - 状态 0-未派工,1-已派工.
* set the factoryName - 厂区名称.
*
* @param status - 状态 0-未派工,1-已派工
* @param factoryName - 厂区名称
*/
public void setStatus(Integer status) {
this.status = status;
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the orgNo - 生产组编码.
......@@ -677,7 +874,7 @@ public class HPSC005 extends DaoEPBase {
public String getOrgNo() {
return this.orgNo;
}
/**
* set the orgNo - 生产组编码.
*
......@@ -693,7 +890,7 @@ public class HPSC005 extends DaoEPBase {
public String getOrgName() {
return this.orgName;
}
/**
* set the orgName - 生产组名称.
*
......@@ -703,13 +900,61 @@ public class HPSC005 extends DaoEPBase {
this.orgName = orgName;
}
/**
* get the documentType - 单据类型 0-非子母单;1-子母单.
* @return the documentType
*/
public Boolean getDocumentType() {
return this.documentType;
}
/**
* set the documentType - 单据类型 0-非子母单;1-子母单.
*
* @param documentType - 单据类型 0-非子母单;1-子母单
*/
public void setDocumentType(Boolean documentType) {
this.documentType = documentType;
}
/**
* get the remark - 备注.
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the remark1 - 备注.
* @return the remark1
*/
public String getRemark1() {
return this.remark1;
}
/**
* set the remark1 - 备注.
*
* @param remark1 - 备注
*/
public void setRemark1(String remark1) {
this.remark1 = remark1;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
......@@ -719,13 +964,29 @@ public class HPSC005 extends DaoEPBase {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
......@@ -741,7 +1002,7 @@ public class HPSC005 extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
......@@ -751,13 +1012,29 @@ public class HPSC005 extends DaoEPBase {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
......@@ -767,45 +1044,13 @@ public class HPSC005 extends DaoEPBase {
this.updatedTime = updatedTime;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the remark - 备注.
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the filePath1 - 文件地址1.
* @return the filePath1
*/
public String getFilePath1() {
return this.filePath1;
}
/**
* set the filePath1 - 文件地址1.
*
......@@ -821,7 +1066,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath2() {
return this.filePath2;
}
/**
* set the filePath2 - 文件地址2.
*
......@@ -837,7 +1082,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath3() {
return this.filePath3;
}
/**
* set the filePath3 - 文件地址3.
*
......@@ -853,7 +1098,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath4() {
return this.filePath4;
}
/**
* set the filePath4 - 文件地址4.
*
......@@ -869,7 +1114,7 @@ public class HPSC005 extends DaoEPBase {
public String getFilePath5() {
return this.filePath5;
}
/**
* set the filePath5 - 文件地址5.
*
......@@ -878,225 +1123,132 @@ public class HPSC005 extends DaoEPBase {
public void setFilePath5(String filePath5) {
this.filePath5 = filePath5;
}
/**
* get the inventRecordId - 项目档案ID.
* get the inventRecordId - 存货档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 项目档案ID.
* set the inventRecordId - 存货档案ID.
*
* @param inventRecordId - 项目档案ID
* @param inventRecordId - 存货档案ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getPrdtLength() {
return this.prdtLength;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setPrdtLength(BigDecimal prdtLength) {
this.prdtLength = prdtLength;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getPrdtWidth() {
return this.prdtWidth;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setPrdtWidth(BigDecimal prdtWidth) {
this.prdtWidth = prdtWidth;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getPrdtThick() {
return this.prdtThick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setPrdtThick(BigDecimal prdtThick) {
this.prdtThick = prdtThick;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getPartLength() {
return this.partLength;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setPartLength(BigDecimal partLength) {
this.partLength = partLength;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getPartWidth() {
return this.partWidth;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setPartWidth(BigDecimal partWidth) {
this.partWidth = partWidth;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getPartThick() {
return this.partThick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setPartThick(BigDecimal partThick) {
this.partThick = partThick;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setPrdtLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_LENGTH)), prdtLength));
setPrdtWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_WIDTH)), prdtWidth));
setPrdtThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_THICK)), prdtThick));
setPrdtSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_SPEC)), prdtSpec));
setPartType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PART_TYPE)), partType));
setPartCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_CODE)), partCode));
setPartName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_NAME)), partName));
setPartLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_LENGTH)), partLength));
setPartWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_WIDTH)), partWidth));
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_THICK)), partThick));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_SPEC)), partSpec));
setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setAssignedNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ASSIGNED_NUM)), assignedNum));
setUnassignedNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNASSIGNED_NUM)), unassignedNum));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
setDocumentType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DOCUMENT_TYPE)), documentType));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK1)), remark1));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedTime(StringUtils.toString(map.get(FIELD_CREATED_TIME)));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedTime(StringUtils.toString(map.get(FIELD_UPDATED_TIME)));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setFilePath1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH1)), filePath1));
setFilePath2(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH2)), filePath2));
setFilePath3(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH3)), filePath3));
setFilePath4(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH4)), filePath4));
setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH5)), filePath5));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setPrdtSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtSpec")), prdtSpec));
setPartType(NumberUtils.toInteger(StringUtils.toString(map.get("partType")), partType));
setPartCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("partCode")), partCode));
setPartName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("partName")), partName));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("partName")), partSpec));
setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark1")), remark1));
setPrdtLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("prdtLength")), prdtLength));
setPrdtWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("prdtWidth")), prdtWidth));
setPrdtThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("prdtThick")), prdtThick));
setPartLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partLength")), partLength));
setPartWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partWidth")), partWidth));
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partThick")), partThick));
setUnitWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WT)), unitWt));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setAssignedNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("assignedNum")), assignedNum));
setUnassignedNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("unassignedNum")), unassignedNum));
setDocumentType(NumberUtils.toInteger(StringUtils.toString(map.get("documentType")), documentType));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_PRDT_LENGTH, StringUtils.toString(prdtLength, eiMetadata.getMeta(FIELD_PRDT_LENGTH)));
map.put(FIELD_PRDT_WIDTH, StringUtils.toString(prdtWidth, eiMetadata.getMeta(FIELD_PRDT_WIDTH)));
map.put(FIELD_PRDT_THICK, StringUtils.toString(prdtThick, eiMetadata.getMeta(FIELD_PRDT_THICK)));
map.put(FIELD_PRDT_SPEC, StringUtils.toString(prdtSpec, eiMetadata.getMeta(FIELD_PRDT_SPEC)));
map.put(FIELD_PART_TYPE, StringUtils.toString(partType, eiMetadata.getMeta(FIELD_PART_TYPE)));
map.put(FIELD_PART_CODE, StringUtils.toString(partCode, eiMetadata.getMeta(FIELD_PART_CODE)));
map.put(FIELD_PART_NAME, StringUtils.toString(partName, eiMetadata.getMeta(FIELD_PART_NAME)));
map.put(FIELD_PART_LENGTH, StringUtils.toString(partLength, eiMetadata.getMeta(FIELD_PART_LENGTH)));
map.put(FIELD_PART_WIDTH, StringUtils.toString(partWidth, eiMetadata.getMeta(FIELD_PART_WIDTH)));
map.put(FIELD_PART_THICK, StringUtils.toString(partThick, eiMetadata.getMeta(FIELD_PART_THICK)));
map.put(FIELD_PART_SPEC, StringUtils.toString(partSpec, eiMetadata.getMeta(FIELD_PART_SPEC)));
map.put(FIELD_PLAN_COMPLETION_DATE, StringUtils.toString(planCompletionDate, eiMetadata.getMeta(FIELD_PLAN_COMPLETION_DATE)));
map.put(FIELD_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM)));
map.put(FIELD_UNIT_WT, StringUtils.toString(unitWt, eiMetadata.getMeta(FIELD_UNIT_WT)));
map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT)));
map.put(FIELD_ASSIGNED_NUM, StringUtils.toString(assignedNum, eiMetadata.getMeta(FIELD_ASSIGNED_NUM)));
map.put(FIELD_UNASSIGNED_NUM, StringUtils.toString(unassignedNum, eiMetadata.getMeta(FIELD_UNASSIGNED_NUM)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_ORG_NO, StringUtils.toString(orgNo, eiMetadata.getMeta(FIELD_ORG_NO)));
map.put(FIELD_ORG_NAME, StringUtils.toString(orgName, eiMetadata.getMeta(FIELD_ORG_NAME)));
map.put(FIELD_DOCUMENT_TYPE, StringUtils.toString(documentType, eiMetadata.getMeta(FIELD_DOCUMENT_TYPE)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_REMARK1, StringUtils.toString(remark1, eiMetadata.getMeta(FIELD_REMARK1)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_FILE_PATH1, StringUtils.toString(filePath1, eiMetadata.getMeta(FIELD_FILE_PATH1)));
map.put(FIELD_FILE_PATH2, StringUtils.toString(filePath2, eiMetadata.getMeta(FIELD_FILE_PATH2)));
map.put(FIELD_FILE_PATH3, StringUtils.toString(filePath3, eiMetadata.getMeta(FIELD_FILE_PATH3)));
map.put(FIELD_FILE_PATH4, StringUtils.toString(filePath4, eiMetadata.getMeta(FIELD_FILE_PATH4)));
map.put(FIELD_FILE_PATH5, StringUtils.toString(filePath5, eiMetadata.getMeta(FIELD_FILE_PATH5)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put("prdtSpec", StringUtils.toString(prdtSpec, eiMetadata.getMeta("prdtSpec")));
map.put("partType", StringUtils.toString(partType, eiMetadata.getMeta("partType")));
map.put("partCode", StringUtils.toString(partCode, eiMetadata.getMeta("partCode")));
map.put("partName", StringUtils.toString(partName, eiMetadata.getMeta("partName")));
map.put("partSpec", StringUtils.toString(partSpec, eiMetadata.getMeta("partSpec")));
map.put("remark1", StringUtils.toString(remark1, eiMetadata.getMeta("prdtSpec")));
map.put("prdtLength", StringUtils.toString(prdtLength, eiMetadata.getMeta("prdtLength")));
map.put("prdtWidth", StringUtils.toString(prdtWidth, eiMetadata.getMeta("prdtWidth")));
map.put("prdtThick", StringUtils.toString(prdtThick, eiMetadata.getMeta("prdtThick")));
map.put("partLength", StringUtils.toString(partLength, eiMetadata.getMeta("partLength")));
map.put("partWidth", StringUtils.toString(partWidth, eiMetadata.getMeta("partWidth")));
map.put("partThick", StringUtils.toString(partThick, eiMetadata.getMeta("partThick")));
map.put(FIELD_UNIT_WT, StringUtils.toString(unitWt, eiMetadata.getMeta(FIELD_UNIT_WT)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put("assignedNum", StringUtils.toString(assignedNum, eiMetadata.getMeta("assignedNum")));
map.put("unassignedNum", StringUtils.toString(unassignedNum, eiMetadata.getMeta("unassignedNum")));
map.put("documentType", StringUtils.toString(documentType, eiMetadata.getMeta("documentType")));
return map;
}
}
......@@ -16,128 +16,173 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-01 10:19:32 create
* @history 2024-02-05 9:47:55 create
*/
public class HPSC005A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_PROD_TASK_NO = "prodTaskNo"; /* 生产任务单号*/
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_NUM = "num"; /* 计划数量*/
public static final String FIELD_TOTAL_WT = "totalWt"; /* 计划重量*/
public static final String FIELD_COMPLETE_NUM = "completeNum"; /* 已完成数量*/
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_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String COL_ID = "ID";
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO"; /* 生产任务单号*/
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_NUM = "NUM"; /* 计划数量*/
public static final String COL_TOTAL_WT = "TOTAL_WT"; /* 计划重量*/
public static final String COL_COMPLETE_NUM = "COMPLETE_NUM"; /* 已完成数量*/
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_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String QUERY = "HPSC005A.query";
public static final String COUNT = "HPSC005A.count";
public static final String INSERT = "HPSC005A.insert";
public static final String UPDATE = "HPSC005A.update";
public static final String DELETE = "HPSC005A.delete";
private Long id = new Long(0);
private String productionOrderNo = " "; /* 生产订单号*/
private Long id;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码 预留*/
private String prodTaskNo = " "; /* 生产任务单号*/
private String prodOrderNo = " "; /* 生产订单号*/
private BigDecimal num = new BigDecimal(0.000); /* 计划数量*/
private BigDecimal totalWt = new BigDecimal(0.000); /* 计划重量*/
private BigDecimal completeNum = new BigDecimal(0.000); /* 已完成数量*/
private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_TASK_NO);
eiColumn.setDescName("生产任务单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("计划数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_WT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("计划重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("已完成数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NO);
eiColumn.setDescName("生产组编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NAME);
eiColumn.setDescName("生产组名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("更新人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPSC005A() {
initMetaData();
}
/**
* get the id .
* @return the id
......@@ -145,30 +190,78 @@ public class HPSC005A extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the productionOrderNo - 生产订单号.
* @return the productionOrderNo
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getProductionOrderNo() {
return this.productionOrderNo;
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the productionOrderNo - 生产订单号.
* set the depCode - 部门编码 预留.
*
* @param productionOrderNo - 生产订单号
* @param depCode - 部门编码 预留
*/
public void setProductionOrderNo(String productionOrderNo) {
this.productionOrderNo = productionOrderNo;
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the prodTaskNo - 生产任务单号.
* @return the prodTaskNo
*/
public String getProdTaskNo() {
return this.prodTaskNo;
}
/**
* set the prodTaskNo - 生产任务单号.
*
* @param prodTaskNo - 生产任务单号
*/
public void setProdTaskNo(String prodTaskNo) {
this.prodTaskNo = prodTaskNo;
}
/**
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public String getProdOrderNo() {
return this.prodOrderNo;
}
/**
* set the prodOrderNo - 生产订单号.
*
* @param prodOrderNo - 生产订单号
*/
public void setProdOrderNo(String prodOrderNo) {
this.prodOrderNo = prodOrderNo;
}
/**
* get the num - 计划数量.
......@@ -177,7 +270,7 @@ public class HPSC005A extends DaoEPBase {
public BigDecimal getNum() {
return this.num;
}
/**
* set the num - 计划数量.
*
......@@ -193,7 +286,7 @@ public class HPSC005A extends DaoEPBase {
public BigDecimal getTotalWt() {
return this.totalWt;
}
/**
* set the totalWt - 计划重量.
*
......@@ -203,13 +296,29 @@ public class HPSC005A extends DaoEPBase {
this.totalWt = totalWt;
}
/**
* get the completeNum - 已完成数量.
* @return the completeNum
*/
public BigDecimal getCompleteNum() {
return this.completeNum;
}
/**
* set the completeNum - 已完成数量.
*
* @param completeNum - 已完成数量
*/
public void setCompleteNum(BigDecimal completeNum) {
this.completeNum = completeNum;
}
/**
* get the orgNo - 生产组编码.
* @return the orgNo
*/
public String getOrgNo() {
return this.orgNo;
}
/**
* set the orgNo - 生产组编码.
*
......@@ -225,7 +334,7 @@ public class HPSC005A extends DaoEPBase {
public String getOrgName() {
return this.orgName;
}
/**
* set the orgName - 生产组名称.
*
......@@ -241,7 +350,7 @@ public class HPSC005A extends DaoEPBase {
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
......@@ -257,7 +366,7 @@ public class HPSC005A extends DaoEPBase {
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
......@@ -273,7 +382,7 @@ public class HPSC005A extends DaoEPBase {
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
......@@ -283,13 +392,29 @@ public class HPSC005A extends DaoEPBase {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
......@@ -305,7 +430,7 @@ public class HPSC005A extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
......@@ -315,13 +440,29 @@ public class HPSC005A extends DaoEPBase {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
......@@ -337,41 +478,53 @@ public class HPSC005A extends DaoEPBase {
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
setTotalWt(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_WT)), totalWt));
setCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPLETE_NUM)), completeNum));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM)));
map.put(FIELD_TOTAL_WT, StringUtils.toString(totalWt, eiMetadata.getMeta(FIELD_TOTAL_WT)));
map.put(FIELD_COMPLETE_NUM, StringUtils.toString(completeNum, eiMetadata.getMeta(FIELD_COMPLETE_NUM)));
map.put(FIELD_ORG_NO, StringUtils.toString(orgNo, eiMetadata.getMeta(FIELD_ORG_NO)));
map.put(FIELD_ORG_NAME, StringUtils.toString(orgName, eiMetadata.getMeta(FIELD_ORG_NAME)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
return map;
}
}
......@@ -24,8 +24,14 @@ public class HPSC005B extends HPSC005 {
private static final long serialVersionUID = 1L;
public static final String FIELD_CHILD_ID = "childId";
public static final String FIELD_PROD_TASK_NO = "prodTaskNo";
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo";
public static final String FIELD_COMPLETE_NUM = "completeNum"; /* 已完成数量*/
public static final String COL_CHILD_ID = "CHILD_ID";
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO";
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO";
public static final String COL_COMPLETE_NUM = "COMPLETE_NUM"; /* 已完成数量*/
public static final String QUERY = "HPSC005B.query";
public static final String COUNT = "HPSC005B.count";
......@@ -34,6 +40,9 @@ public class HPSC005B extends HPSC005 {
public static final String DELETE = "HPSC005B.delete";
private Long childId;
private String prodTaskNo = " ";
private String prodOrderNo = " ";
private BigDecimal completeNum = new BigDecimal(0.000); /* 已完成数量*/
/**
* the constructor.
......@@ -53,6 +62,20 @@ public class HPSC005B extends HPSC005 {
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_TASK_NO);
eiColumn.setDescName("生产任务号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPLETE_NUM);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("已完成数量");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -73,6 +96,38 @@ public class HPSC005B extends HPSC005 {
this.childId = childId;
}
public String getProdTaskNo() {
return prodTaskNo;
}
public void setProdTaskNo(String prodTaskNo) {
this.prodTaskNo = prodTaskNo;
}
public String getProdOrderNo() {
return prodOrderNo;
}
public void setProdOrderNo(String prodOrderNo) {
this.prodOrderNo = prodOrderNo;
}
/**
* get the completeNum - 已完成数量.
* @return the completeNum
*/
public BigDecimal getCompleteNum() {
return this.completeNum;
}
/**
* set the completeNum - 已完成数量.
*
* @param completeNum - 已完成数量
*/
public void setCompleteNum(BigDecimal completeNum) {
this.completeNum = completeNum;
}
/**
* get the value from Map.
*
......@@ -82,6 +137,9 @@ public class HPSC005B extends HPSC005 {
public void fromMap(Map map) {
super.fromMap(map);
setChildId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_CHILD_ID)), childId));
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setCompleteNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COMPLETE_NUM)), completeNum));
}
/**
......@@ -92,6 +150,9 @@ public class HPSC005B extends HPSC005 {
Map map = super.toMap();
map.put(FIELD_CHILD_ID, StringUtils.toString(childId, eiMetadata.getMeta(FIELD_CHILD_ID)));
map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_COMPLETE_NUM, StringUtils.toString(completeNum, eiMetadata.getMeta(FIELD_COMPLETE_NUM)));
return map;
}
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 生产任务
*
* @author:songx
* @date:2024/2/5,9:55
*/
public class ServiceHPSC005A extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
HPSC005A HPSC005A = new HPSC005A();
EiInfo outInfo = super.initLoad(inInfo, HPSC005A);
HPSC005 HPSC005 = (HPSC005) dao.get("HPSC005.getEntity","productionOrderNo",inInfo.get("inqu_status-0-productionOrderNo").toString());
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005A.eiMetadata);
EiBlock detail = new EiBlock(HPConstants.BLOCK_DETAIL);
detail.addRow(HPSC005);
inInfo.setBlock(detail);
return inInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC005A.query", new HPSC005A());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
HPSC005A HPSC005A = new HPSC005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
EiBlock detailBlock = inInfo.getBlock("detail");
Map detail = detailBlock.getRow(0);
String productionOrderNo = detail.get("productionOrderNo").toString();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005A.fromMap(map);
HPSC005A.setProductionOrderNo(productionOrderNo);
DaoUtils.insert("HPSC005A.insert", HPSC005A.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
HPSCTools.checkAssignedNum(productionOrderNo);
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
HPSC005A HPSC005A = new HPSC005A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
EiBlock detailBlock = inInfo.getBlock("detail");
Map detail = detailBlock.getRow(0);
String productionOrderNo = detail.get("productionOrderNo").toString();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005A.fromMap(map);
DaoUtils.update("HPSC005A.update", HPSC005A.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
HPSCTools.checkAssignedNum(productionOrderNo);
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPSC005A HPSC005A = new HPSC005A();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005A.fromMap(map);
this.dao.delete("HPPZ001.delete", HPSC005A.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
/**
* 分派
* @param eiInfo
* @return
*/
public EiInfo assign(EiInfo eiInfo) {
try {
String ids = eiInfo.get("ids").toString();
String orgId = eiInfo.get("id").toString();
//先找到分派的组织
HPPZ011 HPPZ011 =(HPPZ011) dao.get("HPPZ011.get","id", orgId);
String [] id = ids.split(",");
for (int i = 0; i < id.length; i++) {
// 更新HPSC005A的数据
HPSC005A HPSC005A = new HPSC005A();
HPSC005A.setId(NumberUtils.toLong(id[i]));
HPSC005A.setOrgNo(HPPZ011.getGroupCode());
HPSC005A.setFactoryCode(HPPZ011.getFactoryCode());
HPSC005A.setFactoryName(HPPZ011.getFactoryName());
DaoUtils.update("HPSC005A.updateAssign", HPSC005A.toMap());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("分派成功!");
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("分派失败!原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("分派失败", e.getMessage());
return eiInfo;
}
return query(eiInfo);
}
/**
* 画面初始化.
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo");
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC005A.QUERY, new HPSC005A());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作.
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 锁主单号
HPSCTools.HpSc005.lock(prodOrderNo);
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
for (Map resultRow : resultRows) {
HPSC005A newSc005a = new HPSC005A();
newSc005a.fromMap(resultRow);
// 更新订单主表数量
HPSCTools.checkAssignedNum(prodOrderNo, newSc005a.getNum());
// 写入子表数据
newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO));
newSc005a.setProdOrderNo(prodOrderNo);
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
DaoUtils.insert(HPSC005A.INSERT, newSc005a);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 生产任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
// 锁主单号
HPSCTools.HpSc005.lock(prodOrderNo);
// 锁子单
HPSCTools.HpSc005a.lock(prodTaskNos);
// 查询数据库记录
Map<String, HPSC005A> mapSc005a = HPSCTools.HpSc005a.map(prodTaskNos);
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
for (Map resultRow : resultRows) {
HPSC005A newSc005a = new HPSC005A();
newSc005a.fromMap(resultRow);
// 计算差异数量
HPSC005A dbSc005a = mapSc005a.get(newSc005a.getProdTaskNo());
BigDecimal diffNum = newSc005a.getNum().subtract(dbSc005a.getNum());
// 更新订单主表数量
HPSCTools.checkAssignedNum(prodOrderNo, diffNum);
// 更新子单
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
DaoUtils.update(HPSC005A.UPDATE, newSc005a);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作.
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A();
fSc005a.fromMap(resultRow);
HPSC005A dbSc005a = HPSCTools.HpSc005a.getById(fSc005a.getId());
AssertUtils.isGt(dbSc005a.getCompleteNum(), BigDecimal.ZERO,
String.format("任务[%s]已存在完工数量不能删除", fSc005a.getId()));
// 更新订单主表数量
HPSCTools.checkAssignedNum(fSc005a.getProdOrderNo(), fSc005a.getNum().negate());
// 删除子单
DaoUtils.update(HPSC005A.DELETE, fSc005a);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 分派
*
* @param inInfo
* @return
*/
public EiInfo assign(EiInfo inInfo) {
try {
List<String> orderIds = (List<String>) inInfo.get("ids");
Long orgId = Long.parseLong(inInfo.getString("id"));
// 先找到分派的组织
HPPZ011 dbPz011 = HPPZTools.HpPz011.get(orgId);
for (String orderId : orderIds) {
// 校验主订单是否已分派
HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId));
AssertUtils.isTrue(!ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus()),
String.format("生产订单[%s]已分派,不能在进行批量分派,请检查!", dbSc005.getProductionOrderNo()));
HPSC005A newSc005a = new HPSC005A();
// 更新订单主表数量
HPSCTools.checkAssignedNum(dbSc005.getProductionOrderNo(), dbSc005.getNum());
// 写入子表数据
newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO));
newSc005a.setProdOrderNo(dbSc005.getProductionOrderNo());
newSc005a.setNum(dbSc005.getNum());
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
newSc005a.setOrgNo(dbPz011.getGroupCode());
newSc005a.setOrgName(dbPz011.getGroupName());
newSc005a.setFactoryCode(dbPz011.getFactoryCode());
newSc005a.setFactoryName(dbPz011.getFactoryName());
DaoUtils.insert(HPSC005A.INSERT, newSc005a);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + orderIds.size() + "]条数据分派成功!");
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "分派失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
* 生产任务
*
* @author:songx
* @date:2024/2/5,9:55
*/
public class ServiceHPSC005B extends ServiceBase {
/**
* 画面初始化.
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -30,25 +30,31 @@ public class ServiceHPSC098 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("orgType", "dept");
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ011().eiMetadata);
Map queryMap = new HashMap();
queryMap.put("orgType", "dept");
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ011().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPPZ011.QUERY, new HPPZ011());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPPZ011.QUERY, new HPPZ011());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -126,6 +126,13 @@
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005">
SELECT
......@@ -148,66 +155,6 @@
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC005 (ID,
COMPANY_CODE, <!-- 企业编码 预留 -->
......@@ -315,14 +262,12 @@
<update id="updateAssignNum">
UPDATE ${hpjxSchema}.T_HPSC005
SET
STATUS = #status#, <!-- 状态 0-未派工,1-部分派工,2-全部派工 -->
ASSIGNED_NUM = #assignedNum#, <!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#, <!-- 待派工数量 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DOCUMENT_TYPE = 1
WHERE
ID = #id#
STATUS = #status#, <!-- 状态 0-未派工,1-部分派工,2-全部派工 -->
ASSIGNED_NUM = #assignedNum#, <!-- 已派工数量 -->
UNASSIGNED_NUM = #unassignedNum#, <!-- 待派工数量 -->
DOCUMENT_TYPE = 1,
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
<select id="getEntity" parameterClass="java.util.HashMap"
......@@ -335,6 +280,19 @@
</isNotEmpty>
</select>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPSC005
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="prodOrderNo">
PRODUCTION_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNos">
PRODUCTION_ORDER_NO IN <iterate close=")" open="(" conjunction="," property="prodOrderNos">#prodOrderNos[]#</iterate>
</isNotEmpty>
</update>
<!-- 项目下拉框 -->
<select id="queryProjComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-02-01 10:19:32
Version : 1.0
schema : hpjx
tableName : T_HPSC005A
ID BIGINT NOT NULL primarykey,
PRODUCTION_ORDER_NO VARCHAR,
NUM DECIMAL,
TOTAL_WT DECIMAL,
ORG_NO VARCHAR,
ORG_NAME VARCHAR,
FACTORY_CODE VARCHAR,
FACTORY_NAME VARCHAR,
CREATED_BY VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC005A">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务单号 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
NUM as "num", <!-- 计划数量 -->
TOTAL_WT as "totalWt", <!-- 计划重量 -->
COMPLETE_NUM as "completeNum", <!-- 已完成数量 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005A">
SELECT
ID as "id",
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
NUM as "num", <!-- 计划数量 -->
TOTAL_WT as "totalWt", <!-- 计划重量 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
FROM ${hpjxSchema}.T_HPSC005A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="prodTaskNos">
PROD_TASK_NO IN <iterate close=")" open="(" conjunction="," property="prodTaskNos">#prodTaskNos[]#</iterate>
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
</select>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005A WHERE 1=1
<include refid="condition" />
</select>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC005A
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
-->
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005A WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC005A (ID,
PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
NUM, <!-- 计划数量 -->
TOTAL_WT, <!-- 计划重量 -->
ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME <!-- 更新时间 -->
)
VALUES (#id#, #productionOrderNo#, #num#, #totalWt#, #orgNo#, #orgName#, #factoryCode#, #factoryName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#)
</insert>
INSERT INTO ${hpjxSchema}.T_HPSC005A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
PROD_TASK_NO, <!-- 生产任务单号 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
NUM, <!-- 计划数量 -->
TOTAL_WT, <!-- 计划重量 -->
COMPLETE_NUM, <!-- 已完成数量 -->
ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME, <!-- 厂区名称 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #prodTaskNo#, #prodOrderNo#, #num#, #totalWt#,
#completeNum#, #orgNo#, #orgName#, #factoryCode#, #factoryName#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC005A WHERE
ID = #id#
DELETE FROM ${hpjxSchema}.T_HPSC005A WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPSC005A
SET
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
NUM = #num#, <!-- 计划数量 -->
TOTAL_WT = #totalWt#, <!-- 计划重量 -->
ORG_NO = #orgNo#, <!-- 生产组编码 -->
ORG_NAME = #orgName#, <!-- 生产组名称 -->
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
ID = #id#
</update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPSC005A
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNos">
PROD_TASK_NO IN <iterate close=")" open="(" conjunction="," property="prodTaskNos">#prodTaskNos[]#</iterate>
</isNotEmpty>
</update>
<!-- 已完成数量 -->
<update id="updateCompleteNum">
UPDATE ${hpjxSchema}.T_HPSC005A
SET
COMPLETE_NUM = COMPLETE_NUM + #completeNum#,
<include refid="updateRevise"/>
WHERE PROD_TASK_NO = #prodTaskNo#
</update>
</sqlMap>
......@@ -4,7 +4,6 @@
<sql id="column">
A.ID as "id",
B.ID as "childId",
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
......@@ -20,13 +19,20 @@
A.PART_LENGTH as "partLength", <!-- 长 -->
A.PART_WIDTH as "partWidth", <!-- 宽 -->
A.PART_THICK as "partThick", <!-- 厚 -->
A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
A.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
A.UNIT_WT as "unitWt", <!-- 单重 -->
A.STATUS as "status", <!-- 状态 -->
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.NUM ELSE A.NUM END) AS "num",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.TOTAL_WT ELSE A.TOTAL_WT END) AS "totalWt",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NO ELSE A.ORG_NO END) AS "orgNo",
(CASE WHEN A.DOCUMENT_TYPE = 1 THEN B.ORG_NAME ELSE A.ORG_NAME END) AS "orgName"
A.PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
A.FILE_PATH1 as "filePath1",
B.ID as "childId",
B.PROD_TASK_NO as "prodTaskNo",
B.PROD_ORDER_NO as "prodOrderNo",
B.NUM as "num",
B.TOTAL_WT as "totalWt",
B.COMPLETE_NUM as "completeNum",
B.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
B.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
B.ORG_NO as "orgNo",
B.ORG_NAME as "orgName"
</sql>
<sql id="condition">
......@@ -36,9 +42,6 @@
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="childId">
B.ID = #childId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo">
A.PRODUCTION_ORDER_NO LIKE CONCAT('%', #productionOrderNo#, '%')
</isNotEmpty>
......@@ -60,23 +63,63 @@
<isNotEmpty prepend=" AND " property="partName">
A.PART_NAME LIKE CONCAT('%', #partName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="childId">
B.ID = #childId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
B.PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
B.PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
B.FACTORY_NAME LIKE CONCAT('%', #factoryName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
B.ORG_NAME LIKE CONCAT('%', #orgName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="ids">
A.ID IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNos">
B.PROD_TASK_NO IN <iterate close=")" open="(" conjunction="," property="prodTaskNos">#prodTaskNos[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="statuses">
A.STATUS IN <iterate close=")" open="(" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
ID ASC
</isEmpty>
</dynamic>
</sql>
<!-- 选择生产任务 -->
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005B">
SELECT
<include refid="column"/>
FROM HPJX.T_HPSC005 A
LEFT JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PRODUCTION_ORDER_NO
INNER JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<!-- 选择生产任务 -->
<select id="count" resultClass="int">
SELECT COUNT(*)
FROM HPJX.T_HPSC005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
......
......@@ -3,6 +3,7 @@ package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
......@@ -11,6 +12,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils;
......@@ -20,46 +22,48 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author:songx
* @date:2024/2/5,10:15
*/
public class HPSCTools {
/**
* 拆单数量校正
* @param productionOrderNo
*/
public static void checkAssignedNum(String productionOrderNo) {
//生产订单
HPSC005 HPSC005 = (HPSC005)DaoBase.getInstance().get("HPSC005.getEntity","productionOrderNo",productionOrderNo);
BigDecimal jhNum = HPSC005.getNum();
//子单
Map queryMap = new HashMap();
queryMap.put("productionOrderNo", productionOrderNo);
List<HPSC005A> hpsc005AList = DaoBase.getInstance().query(HPSC005A.QUERY,queryMap,0, -999999);
if (CollectionUtils.isNotEmpty(hpsc005AList)) {
BigDecimal num = new BigDecimal(0.000);
for(HPSC005A hpsc005A : hpsc005AList) {
num = num.add(hpsc005A.getNum());
}
int i = jhNum.compareTo(num);
Map map = new HashMap();
map.put("id",HPSC005.getId());
if (i < 0) {
//子单的数量大于母单
throw new PlatException("拆单的分派数量大于计划数量!");
} else if (i == 0) {
//子单数量跟母单数量一样
map.put("assignedNum",jhNum);
map.put("unassignedNum", new BigDecimal(0.000));
map.put("status","2");
} else {
//子单的数量小于母单
map.put("assignedNum", num);
map.put("unassignedNum", jhNum.subtract(num));
map.put("status", "1");
}
DaoBase.getInstance().update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, map);
}
}
/**
* 拆单数量校正
*
* @param prodOrderNo 生产订单号
* @param assignNum 分派数量
*/
public static void checkAssignedNum(String prodOrderNo, BigDecimal assignNum) {
// 生产订单
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
BigDecimal jhNum = dbSc005.getNum();
// 子单
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005A> dbSc005as = DaoBase.getInstance().query(HPSC005A.QUERY, queryMap, 0, -999999);
BigDecimal totalNum = assignNum;
if (CollectionUtils.isNotEmpty(dbSc005as)) {
for (HPSC005A dbSc005a : dbSc005as) {
totalNum = totalNum.add(dbSc005a.getNum());
}
}
// 判断重量是否超过订单重量
AssertUtils.isGt(totalNum, jhNum, "拆单的分派数量不能大于计划数量!");
Map updateMap = new HashMap();
updateMap.put("id", dbSc005.getId());
updateMap.put("assignedNum", totalNum);
updateMap.put("unassignedNum", jhNum.subtract(totalNum));
// 0.未派工,1.部分派工,2.全部派工
if (jhNum.compareTo(assignNum) == 0) {
updateMap.put("status", 2);
} else if (totalNum.compareTo(BigDecimal.ZERO) == 1) {
updateMap.put("status", 1);
} else {
updateMap.put("status", 0);
}
DaoBase.getInstance().update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, updateMap);
}
/**
* HPSC001公共DAO定义
......@@ -119,6 +123,36 @@ public class HPSCTools {
public static class HpSc005 {
/**
* 锁
*
* @param prodOrderNo
* @return
*/
public static void lock(String prodOrderNo) {
if (StringUtils.isBlank(prodOrderNo)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
DaoBase.getInstance().update(HPSqlConstant.HPSC005.LOCK, queryMap);
}
/**
* 锁
*
* @param prodOrderNos
* @return
*/
public static void lock(List<String> prodOrderNos) {
if (CollectionUtils.isEmpty(prodOrderNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("prodOrderNos", prodOrderNos);
DaoBase.getInstance().update(HPSqlConstant.HPSC005.LOCK, queryMap);
}
/**
* 查询
*
* @param id
......@@ -179,5 +213,142 @@ public class HPSCTools {
return results.stream().collect(Collectors.toMap(HPSC005::getId, item -> item));
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static HPSC005 get(String prodOrderNo) {
AssertUtils.isNull(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0);
}
}
/**
* HPSC005A公共DAO定义
*
* @author:songx
* @date:2024/2/5,10:53
*/
public static class HpSc005a {
/**
* 更新已完成数量
*
* @param prodTaskNo
* @param completeNum
*/
public static void updateCompleteNum(String prodTaskNo, BigDecimal completeNum) {
AssertUtils.isEmpty(prodTaskNo, "生产任务单号不能为空");
Map queryMap = new HashMap();
queryMap.put("prodTaskNo", prodTaskNo);
queryMap.put("completeNum", completeNum);
DaoBase.getInstance().update(HPSqlConstant.HPSC005A.UPDATE_COMPLETE_NUM, queryMap);
}
/**
* 锁
*
* @param prodTaskNos
* @return
*/
public static void lock(List<String> prodTaskNos) {
if (CollectionUtils.isEmpty(prodTaskNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("prodTaskNos", prodTaskNos);
DaoBase.getInstance().update(HPSqlConstant.HPSC005A.LOCK, queryMap);
}
/**
* 查询信息
*
* @param id
* @return
*/
public static HPSC005A getById(Long id) {
AssertUtils.isNull(id, "生产任务ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC005A> results = DaoBase.getInstance().query(HPSC005A.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("生产任务[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询信息
*
* @param prodTaskNos
* @return
*/
public static List<HPSC005A> list(List<String> prodTaskNos) {
if (CollectionUtils.isEmpty(prodTaskNos)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("prodTaskNos", prodTaskNos);
return DaoBase.getInstance().query(HPSC005A.QUERY, queryMap);
}
/**
* 查询盘点单信息
*
* @param prodTaskNos
* @return
*/
public static Map<String, HPSC005A> map(List<String> prodTaskNos) {
List<HPSC005A> results = list(prodTaskNos);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC005A::getProdTaskNo, item -> item));
}
}
/**
* HPSC005B公共DAO定义
*
* @author:songx
* @date:2024/2/5,10:53
*/
public static class HpSc005b {
/**
* 查询盘点单信息
*
* @param prodTaskNos
* @return
*/
public static List<HPSC005B> list(List<String> prodTaskNos) {
if (CollectionUtils.isEmpty(prodTaskNos)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("prodTaskNos", prodTaskNos);
return DaoBase.getInstance().query(HPSC005B.QUERY, queryMap);
}
/**
* 查询盘点单信息
*
* @param prodTaskNos
* @return
*/
public static Map<String, HPSC005B> map(List<String> prodTaskNos) {
List<HPSC005B> results = list(prodTaskNos);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC005B::getProdTaskNo, item -> item));
}
}
}
......@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-02-02 14:09:26 create
* @history 2024-02-05 16:53:35 create
*/
public class HPZL001 extends DaoEPBase {
......@@ -26,7 +26,8 @@ public class HPZL001 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_CHECK_NO = "checkNo"; /* 检查单号*/
public static final String FIELD_PROD_NO = "prodNo"; /* 生产任务号*/
public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_PROD_TASK_NO = "prodTaskNo"; /* 生产任务号*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目号*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
......@@ -46,14 +47,15 @@ public class HPZL001 extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除:1.是,0.否*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_CHECK_NO = "CHECK_NO"; /* 检查单号*/
public static final String COL_PROD_NO = "PROD_NO"; /* 生产任务号*/
public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_PROD_TASK_NO = "PROD_TASK_NO"; /* 生产任务号*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目号*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/
......@@ -73,7 +75,7 @@ public class HPZL001 extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除:1.是,0.否*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除*/
public static final String QUERY = "HPZL001.query";
public static final String COUNT = "HPZL001.count";
......@@ -86,7 +88,8 @@ public class HPZL001 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/
private String receiptDate = " "; /* 单据日期*/
private String checkNo = " "; /* 检查单号*/
private String prodNo = " "; /* 生产任务号*/
private String prodOrderNo = " "; /* 生产订单号*/
private String prodTaskNo = " "; /* 生产任务号*/
private String projCode = " "; /* 项目号*/
private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 部件编码*/
......@@ -106,7 +109,7 @@ public class HPZL001 extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag; /* 是否删除:1.是,0.否*/
private Integer deleteFlag; /* 是否删除*/
/**
* initialize the metadata.
......@@ -135,7 +138,11 @@ public class HPZL001 extends DaoEPBase {
eiColumn.setDescName("检查单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_NO);
eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROD_TASK_NO);
eiColumn.setDescName("生产任务号");
eiMetadata.addMeta(eiColumn);
......@@ -216,8 +223,10 @@ public class HPZL001 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除:1.是,0.否");
eiColumn.setDescName("是否删除");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -307,16 +316,39 @@ public class HPZL001 extends DaoEPBase {
public void setCheckNo(String checkNo) {
this.checkNo = checkNo;
}
public String getProdNo() {
return prodNo;
/**
* get the prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public String getProdOrderNo() {
return this.prodOrderNo;
}
public void setProdNo(String prodNo) {
this.prodNo = prodNo;
/**
* set the prodOrderNo - 生产订单号.
*
* @param prodOrderNo - 生产订单号
*/
public void setProdOrderNo(String prodOrderNo) {
this.prodOrderNo = prodOrderNo;
}
/**
* get the prodTaskNo - 生产任务号.
* @return the prodTaskNo
*/
public String getProdTaskNo() {
return this.prodTaskNo;
}
/**
* set the prodTaskNo - 生产任务号.
*
* @param prodTaskNo - 生产任务号
*/
public void setProdTaskNo(String prodTaskNo) {
this.prodTaskNo = prodTaskNo;
}
/**
* get the projCode - 项目号.
* @return the projCode
*/
......@@ -621,7 +653,7 @@ public class HPZL001 extends DaoEPBase {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 是否删除:1.是,0.否.
* get the deleteFlag - 是否删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
......@@ -629,9 +661,9 @@ public class HPZL001 extends DaoEPBase {
}
/**
* set the deleteFlag - 是否删除:1.是,0.否.
* set the deleteFlag - 是否删除.
*
* @param deleteFlag - 是否删除:1.是,0.否
* @param deleteFlag - 是否删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
......@@ -649,7 +681,8 @@ public class HPZL001 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setCheckNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHECK_NO)), checkNo));
setProdNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_NO)), prodNo));
setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
......@@ -684,7 +717,8 @@ public class HPZL001 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_CHECK_NO, StringUtils.toString(checkNo, eiMetadata.getMeta(FIELD_CHECK_NO)));
map.put(FIELD_PROD_NO, StringUtils.toString(prodNo, eiMetadata.getMeta(FIELD_PROD_NO)));
map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_PROD_TASK_NO, StringUtils.toString(prodTaskNo, eiMetadata.getMeta(FIELD_PROD_TASK_NO)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
......
package com.baosight.hpjx.hp.zl.service;
import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.kc.domain.HPKC011;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
......@@ -79,35 +81,49 @@ public class ServiceHPZL001B extends ServiceEPBase {
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String, HPSC005B> dbSc005bMap = new HashMap<>();
// 订单号
List<String> prodOrderNos = ObjectUtils.listKey(resultRows, "prodOrderNo");
// 任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
// 锁订单
HPSCTools.HpSc005.lock(prodOrderNos);
// 锁任务
HPSCTools.HpSc005a.lock(prodTaskNos);
// 查询任务信息
Map<String, HPSC005B> dbSc005bMap = HPSCTools.HpSc005b.map(prodTaskNos);
// 数据校验
for (Map row : resultRows) {
HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row);
HPSC005B dbSc005b = HPSCTools.HpSc005.getById(fSc005b.getId(), fSc005b.getChildId());
AssertUtils.isTrue(dbSc005b.getStatus() != 1 && dbSc005b.getStatus() != 2,
HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
AssertUtils.isTrue(ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005b.getStatus()),
String.format("生产任务ID[%s]状态不是已分派,不允许操作", fSc005b.getId()));
dbSc005bMap.put(dbSc005b.getId() + "@#@" + dbSc005b.getChildId(), dbSc005b);
}
// 生成巡检单
for (Map row : resultRows) {
Integer poorType = MapUtils.getInteger(row, "poorType");
String problemDesc = MapUtils.getString(row, "problemDesc");
HPSC005B fSc005b = new HPSC005B();
fSc005b.fromMap(row);
HPSC005 dbSc005 = dbSc005bMap.get(fSc005b.getId() + "@#@" + fSc005b.getChildId());
HPZL001 newZl001 = BeanUtils.copy(dbSc005, HPZL001.class);
// 生成新数据
HPSC005B dbSc005b = dbSc005bMap.get(fSc005b.getProdTaskNo());
HPZL001 newZl001 = BeanUtils.copy(dbSc005b, HPZL001.class);
newZl001.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPZL001_NUMBER));
newZl001.setReceiptDate(DateUtils.shortDate());
newZl001.setStatus(CommonConstant.YesNo.NO_0);
newZl001.setInventCode(dbSc005.getPrdtCode());
newZl001.setInventName(dbSc005.getPrdtName());
newZl001.setSubInventCode(dbSc005.getPartCode());
newZl001.setSubInventName(dbSc005.getPartName());
newZl001.setProdNo(dbSc005.getProductionOrderNo());
newZl001.setInventCode(dbSc005b.getPrdtCode());
newZl001.setInventName(dbSc005b.getPrdtName());
newZl001.setSubInventCode(dbSc005b.getPartCode());
newZl001.setSubInventName(dbSc005b.getPartName());
newZl001.setPoorType(poorType);
newZl001.setProblemDesc(problemDesc);
newZl001.setProdOrderNo(dbSc005b.getProdOrderNo());
newZl001.setProdTaskNo(dbSc005b.getProdTaskNo());
newZl001.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPZL001.INSERT, newZl001);
}
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "生成出库单失败");
LogUtils.setDetailMsg(inInfo, e, "生成巡检单失败");
}
return inInfo;
}
......
......@@ -8,7 +8,8 @@
DEP_CODE as "depCode", <!-- 部门编码 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
CHECK_NO as "checkNo", <!-- 检查单号 -->
PROD_NO as "prodNo", <!-- 生产任务号 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目号 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
......@@ -27,7 +28,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除 -->
</sql>
<sql id="condition">
......@@ -47,8 +49,11 @@
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo#
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
......@@ -125,7 +130,8 @@
DEP_CODE, <!-- 部门编码 -->
RECEIPT_DATE, <!-- 单据日期 -->
CHECK_NO, <!-- 检查单号 -->
PROD_NO, <!-- 生产任务号 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROD_TASK_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目号 -->
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
......@@ -136,19 +142,16 @@
ORG_NAME, <!-- 生产组名称 -->
POOR_TYPE, <!-- 不良品类 -->
PROBLEM_DESC, <!-- 质量问题描述 -->
CHECK_USER, <!-- 检查人 -->
CHECK_USER_NAME, <!-- 检查人名称 -->
STATUS, <!-- 单据状态 0未处理 1已处理 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG
DELETE_FLAG <!-- 是否删除 -->
) VALUES (
#companyCode#, #depCode#, #receiptDate#, #checkNo#, #prodNo#, #projCode#, #projName#,
#inventCode#, #inventName#, #subInventCode#, #subInventName#, #orgNo#, #orgName#,
#poorType#, #problemDesc#, #checkUser#, #checkUserName#, #status#, #createdBy#,
#createdName#, #createdTime#, #deleteFlag#
)
#companyCode#, #depCode#, #receiptDate#, #checkNo#, #prodOrderNo#, #prodTaskNo#,
#projCode#, #projName#, #inventCode#, #inventName#, #subInventCode#, #subInventName#,
#orgNo#, #orgName#, #poorType#, #problemDesc#, #status#,
#createdBy#, #createdName#, #createdTime#, #deleteFlag#)
</insert>
<!-- 逻辑删除-->
......
let inventNameGlobalData = [];
let whNameGlobalData = [];
$(function () {
// 查询
$("#QUERY").on("click", query);
// 选择生产任务
$("#GENERATE").on("click", generate);
IPLATUI.EFGrid.result = {
......@@ -12,29 +11,8 @@ $(function () {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [{
field: "whCode",
template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return whNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [3, 4]);
inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("serviceName", "HPPZ007");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "wh_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
columns: [],
loadComplete: function (grid) {
// 此grid对象
}
}
......@@ -44,25 +22,6 @@ $(function () {
* 页面加载时执行
*/
$(window).load(function () {
// 仓库名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [3, 4]);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 存货名称
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查
query();
});
......@@ -72,58 +31,26 @@ $(window).load(function () {
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 选择生产订单
* 选择生产任务
*/
let generate = function () {
JSColorbox.open({
href: "HPKC099?methodName=initLoad",
title: "<div style='text-align: center;'>生产订单查询</div>",
href: "HPKC003A?methodName=initLoad",
title: "<div style='text-align: center;'>生产任务查询</div>",
width: "80%",
height: "80%",
callbackName: productionOrderQueryCallback
callbackName: generateCallback
});
}
/**
* 生产订单回调方法
*
* @param rowDatas
* @param win
* 挑选库存回调
*/
let productionOrderQueryCallback = function (row) {
console.log(row)
var lists = [];// new Array();
// 增加一个元素
for (var i = 0; i < row.length; i++) {
resultGrid.dataSource.insert();
var rowsdata = resultGrid.getCheckedRows();
resultGrid.setCellValue(0, "productionOrderNo", row[i]["productionOrderNo"]);
resultGrid.setCellValue(0, "amount", row[i]["num"]);
resultGrid.setCellValue(0, "weight", row[i]["totalWt"]);
resultGrid.setCellValue(0, "projCode", row[i]["projCode"]);
resultGrid.setCellValue(0, "projName", row[i]["projName"]);
resultGrid.setCellValue(0, "prdtType", row[i]["prdtType"]);
resultGrid.setCellValue(0, "prdtCode", row[i]["prdtCode"]);
resultGrid.setCellValue(0, "prdtName", row[i]["prdtName"]);
resultGrid.setCellValue(0, "prdtSpec", row[i]["prdtSpec"]);
resultGrid.setCellValue(0, "prdtLength", row[i]["prdtLength"]);
resultGrid.setCellValue(0, "prdtWidth", row[i]["prdtWidth"]);
resultGrid.setCellValue(0, "prdtThick", row[i]["prdtThick"]);
resultGrid.setCellValue(0, "partType", row[i]["partType"]);
resultGrid.setCellValue(0, "partCode", row[i]["partCode"]);
resultGrid.setCellValue(0, "partName", row[i]["partName"]);
resultGrid.setCellValue(0, "partSpec", row[i]["partSpec"]);
resultGrid.setCellValue(0, "partLength", row[i]["partLength"]);
resultGrid.setCellValue(0, "partWidth", row[i]["partWidth"]);
resultGrid.setCellValue(0, "partThick", row[i]["partThick"]);
resultGrid.setCellValue(0, "remark", row[i]["remark"]);
resultGrid.setCellValue(0, "remark1", row[i]["remark1"]);
lists[i] = i;
}
resultGrid.setCheckedRows(lists);
let generateCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
......
......@@ -8,7 +8,6 @@
<EF:EFPage title="生产入库单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-productionOrderNo" cname="生产订单号" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-prodNo" cname="生产入库单号" colWidth="3"/>
<EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"
......@@ -42,41 +41,24 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" align="center"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" align="center"/>
<EF:EFColumn ename="prodNo" cname="生产入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}"
sumType="all" readonly="true"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}"
sumType="all" readonly="true"/>
<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="部件编码" align="center"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" align="center"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtSpec" cname="部件规格" align="center"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtLength" cname="部件-长"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtWidth" cname="部件-宽"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtThick" 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:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库编码" enable="false" width="120" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="partCode" cname="零件编码" align="center"/>
<EF:EFColumn enable="false" ename="partName" cname="零件名称" align="center"/>
<EF:EFColumn enable="false" ename="partSpec" cname="零件规格" align="center"/>
<EF:EFColumn hidden="true" enable="false" ename="partLength" cname="零件-长"/>
<EF:EFColumn hidden="true" enable="false" ename="partWidth" cname="零件-宽"/>
<EF:EFColumn hidden="true" enable="false" ename="partThick" cname="零件-厚"/>
<EF:EFColumn enable="false" ename="remark1" cname="零件备注"/>
<EF:EFColumn cname="原生产单号" ename="prodNoOld" enable="false" width="140" align="center" hidden="true"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零部件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 选择
$("#BTN_SELECT").on("click", select);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
};
/**
* 选择库存
*/
let select = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let applyNum = rows[i]['applyNum'];
let num = rows[i]['num'];
let completeNum = rows[i]['completeNum'];
if (isBlank(applyNum) || !isNumber(applyNum) || !(applyNum > 0)) {
message("第" + (i + 1) + "行申请数量必须大于0");
return;
}
if (parseFloat(applyNum) > parseFloat(num) - parseFloat(completeNum)) {
message("第" + (i + 1) + "行申请数量不能大于未入库的数量");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成入库单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPKC003A", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="生产任务查询">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row">
<div class="row">
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零部件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零部件规格" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" width="120" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="applyNum" cname="入库数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="任务重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
let ids = [];
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
// 查询
$("#QUERY").on("click", query);
// 拆单派工
$("#TEAR_ASSIGN").on("click", tearAssign);
// 批量分派
$("#ASSIGN").on("click", assign);
$("#TEAR_ASSIGN").on("click", function () {
//重置全局变量
let productionOrderNo;
let rows = resultGrid.getCheckedRows()
if (rows.length != 1) {
message("只能选择一条需要拆单分派的数据");
return;
}
productionOrderNo = rows[0].productionOrderNo
JSColorbox.open({
href: "HPSC005A?methodName=initLoad&inqu_status-0-productionOrderNo=" + productionOrderNo,
title: "<div style='text-align: center;'>拆单派工</div>",
width: "70%",
height: "80%",
callbackName: assignCallback
});
});
$("#ASSIGN").on("click", function () {
//重置全局变量
ids = [];
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message("请至少选择一条需要分派的数据");
return;
}
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let productionOrderNo = item.productionOrderNo;
let filePath1 = item.filePath1;
let template = '';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>&nbsp;';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showGroupDetail(\'' + productionOrderNo + '\')" >详情</a>';
return template
}
}]
}
});
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 {
//
// }
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 拆单派工
*/
function tearAssign() {
//重置全局变量
let rows = resultGrid.getCheckedRows()
if (rows.length != 1) {
message("只能选择一条需要拆单分派的数据");
return;
}
let productionOrderNo = rows[0].productionOrderNo
JSColorbox.open({
href: "HPSC005A?methodName=initLoad&inqu_status-0-prodOrderNo=" + productionOrderNo,
title: "<div style='text-align: center;'>拆单派工</div>",
width: "70%",
height: "80%",
callbackName: tearAssignCallback
});
}
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let filePath1 = item.filePath1;
let status = item.status;
let template = '';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ '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
}
}
],
}
});
/**
* 拆单分派回调
*/
function tearAssignCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function jump(productionOrderNo) {
var herf= ctx + "\\web\\"+ "HPSC006?inqu_status-0-productionOrderNo=" + productionOrderNo;
window.open(herf);
/**
* 批量分派
*/
function assign() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message("请至少选择一条需要分派的数据");
return;
}
JSColorbox.open({
href: "HPSC098?methodName=initLoad",
title: "<div style='text-align: center;'>选择组织</div>",
width: "70%",
height: "70%",
callbackName: function (id) {
let saleIds = [];
for (let i = 0; i < rows.length; i++) {
saleIds.push(rows[i]['id']);
}
var info = new EiInfo()
info.set("ids", saleIds);
info.set("id", id);
EiCommunicator.send("HPSC005A", "assign", info, {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: ei.msg
});
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}, onFail: function (ei) {
}
}, {async: false});
}
});
}
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-bizType=WL&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
let assignCallback = function (id) {
var info = new EiInfo()
info.set("ids",ids.join(','));
info.set("id",id);
EiCommunicator.send("HPSC005","assign",info,{
onSuccess:function(ei){//返回结果集
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: '修改成功'
});
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
},onFail:function(ei){}
},{async:false});
/**
* 生产组详情
*
* @param let
*/
function showGroupDetail(prodOrderNo) {
window.open("HPSC005B?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo)
}
......@@ -5,71 +5,55 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="生产任务">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" />
<EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFSelect>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<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="prdtSpec" 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:EFColumn enable="false" ename="factoryName" cname="厂区名称"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFPage title="生产订单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0" colWidth="3"/>
<EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" row="0" colWidth="3"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0" colWidth="3"/>
<EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" colWidth="3"
format="yyyy-MM-dd"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0" colWidth="3">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="110" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="90" align="center">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" enable="false" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>
<EF:EFComboColumn ename="partType" cname="零件类型" enable="false" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="remark1" cname="零件备注"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"/>
<EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC005.js"></script>
\ No newline at end of file
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "factoryName",
attributes: {
class: "i-input-readonly"
}
}],
}
}
],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'){
query();
}
},
$("#QUERY").on("click", query);
},
});
}
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
......@@ -4,57 +4,51 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="拆单派工">
<EF:EFRegion id="detail" title="订单详情">
<div class="row">
<EF:EFInput type="text" ename="detail-0-projCode" cname="项目号" readonly="true"/>
<EF:EFInput type="text" ename="detail-0-projName" cname="项目名称" readonly="true"/>
<EF:EFInput type="text" ename="detail-0-productionOrderNo" cname="生产订单号" readonly="true"/>
</div>
<div class="row">
<EF:EFInput type="text" ename="detail-0-prdtName" cname="部件名称" readonly="true"/>
<EF:EFInput type="text" ename="detail-0-partName" cname="零部件名称" readonly="true"/>
<EF:EFInput type="text" ename="detail-0-planCompletionDate" cname="计划完成日期" readonly="true"/>
</div>
<div class="row">
<EF:EFInput type="text" ename="detail-0-num" cname="计划数量" readonly="true"/>
<EF:EFInput type="text" ename="detail-0-totalWt" cname="计划重量" readonly="true"/>
<EF:EFInput type="text" ename="detail-0-assignedNum" cname="已派工数量" readonly="true"/>
</div>
<div class="row">
<EF:EFInput type="text" ename="detail-0-unassignedNum" cname="待派工数量" readonly="true"/>
<EF:EFSelect enable="false" align="center" ename="detail-0-status" cname="状态" readonly="true">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFPage title="拆单派工">
<EF:EFRegion id="inqu" title="订单详情">
<EF:EFInput ename="inqu_status-0-prodOrderNo" cname="项目号" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" readonly="true"/>
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零部件名称" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-num" cname="计划数量" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="计划重量" readonly="true"/>
<EF:EFInput ename="detail-0-assignedNum" cname="已派工数量" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unassignedNum" cname="待派工数量" readonly="true"/>
<EF:EFSelect ename="detail-0-status" cname="状态" readonly="true">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFPopupColumn ename="factoryName" cname="厂区" width="200" popupType="ServiceGrid"
popupTitle="厂区信息" serviceName="HPPZ011" methodName="queryComboBoxAll" resultId="factory_group_ecord_block_id"
columnEnames="textField,param2Field"
columnCnames="厂区,生产组"
backFillColumnIds="param2Field,param1Field,valueField,textField"
backFillFieldIds="orgName,orgNo,factoryCode,factoryName"
valueField="textField" textField="textField"/>
<EF:EFColumn enable="false" ename="factoryCode" cname="厂区编码" hidden="true"/>
<EF:EFColumn enable="false" ename="orgNo" readonly="true" cname="生产组代码" hidden="true"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
<EF:EFColumn ename="num" cname="分派数量" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="分派重量" format="{0:N3}"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="factoryCode" cname="厂区编码" hidden="true"/>
<EF:EFPopupColumn ename="factoryName" cname="厂区" width="200" popupType="ServiceGrid"
popupTitle="厂区信息" serviceName="HPPZ011" methodName="queryComboBoxAll"
resultId="factory_group_ecord_block_id"
columnEnames="textField,param2Field"
columnCnames="厂区,生产组"
backFillColumnIds="param2Field,param1Field,valueField,textField"
backFillFieldIds="orgName,orgNo,factoryCode,factoryName"
valueField="textField" textField="textField" required="true"/>
<EF:EFColumn ename="orgNo" cname="生产组代码" enable="false" hidden="true"/>
<EF:EFColumn ename="orgName" cname="生产组" enable="false" align="center"/>
<EF:EFColumn ename="num" cname="分派数量" format="{0:N3}" required="true"/>
<EF:EFColumn ename="totalWt" cname="分派重量" enable="false" format="{0:N3}"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC005A.js"></script>
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let filePath1 = item.filePath1;
let template = '';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>&nbsp;';
}
return template
}
}]
}
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="生产任务">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零部件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产组名称" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="childId" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="110" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="remark1" cname="零件备注"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"/>
<EF:EFColumn ename="completeNum" cname="已完成数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="任务重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -5,14 +5,11 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="组织机构">
<EF:EFPage title="组织机构">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="厂区名称:" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="生产组名称" ename="groupCode" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产组名称" ename="groupName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
......@@ -20,16 +17,9 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center"/>
<EF:EFPopupColumn ename="factoryName" cname="厂区名称" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="groupCode" cname="生产组名称" width="120" align="center"
blockName="org_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
required="true">
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="groupCode" cname="生产组编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="groupName" cname="生产组名称" enable="false" width="120" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC098.js"></script>
......@@ -31,7 +31,6 @@ $(function () {
}, {
field: "problemPhoto",
template: function (item) {
let status = item.status;
if (!isBlank(item.checkNo)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ', 1)" >附件清单</a>';
......@@ -42,7 +41,6 @@ $(function () {
}, {
field: "processPhoto",
template: function (item) {
let status = item.status;
if (!isBlank(item.checkNo)) {
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ', 2)" >附件清单</a>';
......
......@@ -27,13 +27,21 @@
<EF:EFOption label="0-未处理" value="0"></EF:EFOption>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" readonly="false"/>
<EF:EFColumn ename="checkNo" cname="检查单号" locked="true" enable="false" width="130" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="problemPhoto" cname="问题照片" locked="true" enable="false" width="100" align="center"
required="true"/>
<EF:EFColumn ename="processPhoto" cname="处理照片" locked="true" enable="false" width="100" align="center"
required="true"/>
<EF:EFColumn ename="checkNo" cname="检查单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center">
<EF:EFOption label="1-已处理" value="1"></EF:EFOption>
<EF:EFOption label="0-未处理" value="0"></EF:EFOption>
......@@ -44,18 +52,16 @@
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventName" cname="零部件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" width="100" align="center" required="true">
<EF:EFComboColumn ename="poorType" cname="不良品类" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="problemDesc" cname="质量问题描述" width="140" align="center" required="true"/>
<EF:EFColumn ename="problemPhoto" cname="问题照片" enable="false" width="100" align="center" required="true"/>
<EF:EFColumn ename="processPhoto" cname="处理照片" enable="false" width="100" align="center" required="true"/>
<EF:EFColumn ename="problemDesc" cname="质量问题描述" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="checkUser" cname="检查人" enable="false" width="120" align="center"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="prodNo" cname="生产单号" width="140" align="center" required="true"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零部件编码" enable="false" width="130" align="center"/>
......
......@@ -41,6 +41,18 @@ let select = function () {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let poorType = rows[i]['poorType'];
let problemDesc = rows[i]['problemDesc'];
if (isBlank(poorType)) {
message("第" + (i + 1) + "行不良品类不能为空");
return;
}
if (isBlank(problemDesc)) {
message("第" + (i + 1) + "行质量问题描述不能为空");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成巡检单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPZL001B", "select",
......
......@@ -9,14 +9,12 @@
<EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row">
<div class="row">
<EF:EFInput cname="项目号" ename="projCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件编码" ename="prdtCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="生产订单号" ename="productionOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件编码" ename="partCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零部件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</div>
......@@ -24,21 +22,29 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="生产任务ID" enable="false" width="90" align="center"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="id" cname="生产订单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零部件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组" enable="false" width="150" align="center"/>
<EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="problemDesc" cname="质量问题描述" width="140" required="true"/>
<EF:EFColumn ename="completeNum" cname="已入库数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="任务重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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