Commit 18a227f3 by wancheng

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

parents 884ede8d c4082276
......@@ -79,6 +79,7 @@ public enum DdynamicEnum {
WH_RECORD_BLOCK_ID("wh_record_block_id","whCode","whName","HPPZ007.queryComboBox"),
/**
* (废弃)
* 模块:存货类型
* 用途:存货类型下拉框
* 编写:yk
......
......@@ -44,6 +44,14 @@ public class HPConstant {
public static final String OTHER_ENTER_NO = "OTHER_ENTER_NO";
// 其他出库单号
public static final String OTHER_OUTER_NO = "OTHER_OUTER_NO";
//生产计划单
public static final String HPSC003_PROD_NO = "HPSC003_PROD_NO";
//生产订单
public static final String HPSC005_PROD_NO = "HPSC005_PROD_NO";
}
/**
......
......@@ -68,6 +68,8 @@ public class HPSqlConstant {
public static final String QUERY_SUM = "HPKC005.querySum";
// 锁
public static final String LOCK = "HPKC005.lock";
// 统计
public static final String STAT_DATE = "HPKC005.statDate";
}
/**
......@@ -114,6 +116,8 @@ public class HPSqlConstant {
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime";
// 查询
public static final String QUERY = "HPKC009.query";
// 查询统计
public static final String QUERY_SUM = "HPKC009.querySum";
}
/**
......@@ -129,6 +133,20 @@ public class HPSqlConstant {
}
/**
* HPKC010A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC010A {
// 按日期删除
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime";
// 备份数量
public static final String BACKUP = "HPKC010A.backup";
}
/**
* HPPZ010 SQL 定义
*
* @author:songx
......
......@@ -16,16 +16,15 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-25 8:45:22 create
* @history 2024-01-25 17:48:25 create
*/
public class HPKC009 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_KC_TYPE = "kcType"; /* 库存类型:CG:采购,SC:生产,QT:其他*/
public static final String FIELD_DATE_TYPE = "dateType"; /* 日期类型:DAY:天,MONTH:月*/
public static final String FIELD_DATE_PROC = "dateProc"; /* 日期*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
......@@ -36,10 +35,24 @@ public class HPKC009 extends DaoEPBase {
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格ID*/
public static final String FIELD_INIT_AMOUNT = "initAmount"; /* 期初数量*/
public static final String FIELD_INIT_WEIGHT = "initWeight"; /* 期初重量*/
public static final String FIELD_CG_ENTER_AMOUNT = "cgEnterAmount"; /* 采购入库数量*/
public static final String FIELD_CG_ENTER_WEIGHT = "cgEnterWeight"; /* 采购入库重量*/
public static final String FIELD_SC_ENTER_AMOUNT = "scEnterAmount"; /* 生产入库数量*/
public static final String FIELD_SC_ENTER_WEIGHT = "scEnterWeight"; /* 生产入库重量*/
public static final String FIELD_QT_ENTER_AMOUNT = "qtEnterAmount"; /* 其它入库数量*/
public static final String FIELD_QT_ENTER_WEIGHT = "qtEnterWeight"; /* 其它入库重量*/
public static final String FIELD_ENTER_AMOUNT = "enterAmount"; /* 入库数量*/
public static final String FIELD_ENTER_WEIGHT = "enterWeight"; /* 入库重量*/
public static final String FIELD_SC_OUTER_AMOUNT = "scOuterAmount"; /* 生产领料数量*/
public static final String FIELD_SC_OUTER_WEIGHT = "scOuterWeight"; /* 生产领料重量*/
public static final String FIELD_XS_OUTER_AMOUNT = "xsOuterAmount"; /* 销售出库数量*/
public static final String FIELD_XS_OUTER_WEIGHT = "xsOuterWeight"; /* 销售出库重量*/
public static final String FIELD_QT_OUTER_AMOUNT = "qtOuterAmount"; /* 其它出库数量*/
public static final String FIELD_QT_OUTER_WEIGHT = "qtOuterWeight"; /* 其它出库重量*/
public static final String FIELD_OUTER_AMOUNT = "outerAmount"; /* 出库数量*/
public static final String FIELD_OUTER_WEIGHT = "outerWeight"; /* 出库重量*/
public static final String FIELD_PD_DIFF_AMOUNT = "pdDiffAmount"; /* 盘点差异数量*/
public static final String FIELD_PD_DIFF_WEIGHT = "pdDiffWeight"; /* 盘点差异重量*/
public static final String FIELD_END_AMOUNT = "endAmount"; /* 期末数量*/
public static final String FIELD_END_WEIGHT = "endWeight"; /* 期末重量*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
......@@ -48,11 +61,10 @@ public class HPKC009 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 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_KC_TYPE = "KC_TYPE"; /* 库存类型:CG:采购,SC:生产,QT:其他*/
public static final String COL_DATE_TYPE = "DATE_TYPE"; /* 日期类型:DAY:天,MONTH:月*/
public static final String COL_DATE_PROC = "DATE_PROC"; /* 日期*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
......@@ -63,10 +75,24 @@ public class HPKC009 extends DaoEPBase {
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 规格ID*/
public static final String COL_INIT_AMOUNT = "INIT_AMOUNT"; /* 期初数量*/
public static final String COL_INIT_WEIGHT = "INIT_WEIGHT"; /* 期初重量*/
public static final String COL_CG_ENTER_AMOUNT = "CG_ENTER_AMOUNT"; /* 采购入库数量*/
public static final String COL_CG_ENTER_WEIGHT = "CG_ENTER_WEIGHT"; /* 采购入库重量*/
public static final String COL_SC_ENTER_AMOUNT = "SC_ENTER_AMOUNT"; /* 生产入库数量*/
public static final String COL_SC_ENTER_WEIGHT = "SC_ENTER_WEIGHT"; /* 生产入库重量*/
public static final String COL_QT_ENTER_AMOUNT = "QT_ENTER_AMOUNT"; /* 其它入库数量*/
public static final String COL_QT_ENTER_WEIGHT = "QT_ENTER_WEIGHT"; /* 其它入库重量*/
public static final String COL_ENTER_AMOUNT = "ENTER_AMOUNT"; /* 入库数量*/
public static final String COL_ENTER_WEIGHT = "ENTER_WEIGHT"; /* 入库重量*/
public static final String COL_SC_OUTER_AMOUNT = "SC_OUTER_AMOUNT"; /* 生产领料数量*/
public static final String COL_SC_OUTER_WEIGHT = "SC_OUTER_WEIGHT"; /* 生产领料重量*/
public static final String COL_XS_OUTER_AMOUNT = "XS_OUTER_AMOUNT"; /* 销售出库数量*/
public static final String COL_XS_OUTER_WEIGHT = "XS_OUTER_WEIGHT"; /* 销售出库重量*/
public static final String COL_QT_OUTER_AMOUNT = "QT_OUTER_AMOUNT"; /* 其它出库数量*/
public static final String COL_QT_OUTER_WEIGHT = "QT_OUTER_WEIGHT"; /* 其它出库重量*/
public static final String COL_OUTER_AMOUNT = "OUTER_AMOUNT"; /* 出库数量*/
public static final String COL_OUTER_WEIGHT = "OUTER_WEIGHT"; /* 出库重量*/
public static final String COL_PD_DIFF_AMOUNT = "PD_DIFF_AMOUNT"; /* 盘点差异数量*/
public static final String COL_PD_DIFF_WEIGHT = "PD_DIFF_WEIGHT"; /* 盘点差异重量*/
public static final String COL_END_AMOUNT = "END_AMOUNT"; /* 期末数量*/
public static final String COL_END_WEIGHT = "END_WEIGHT"; /* 期末重量*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
......@@ -75,17 +101,16 @@ public class HPKC009 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 QUERY = "HPKC009.query";
public static final String COUNT = "HPKC009.count";
public static final String INSERT = "HPKC009.insert";
public static final String UPDATE = "HPKC009.update";
public static final String DELETE = "HPKC009.delete";
private Long id = null;
private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/
private String kcType = " "; /* 库存类型:CG:采购,SC:生产,QT:其他*/
private String dateType = " "; /* 日期类型:DAY:天,MONTH:月*/
private String dateProc = " "; /* 日期*/
private String whCode = " "; /* 仓库编码*/
......@@ -96,10 +121,24 @@ public class HPKC009 extends DaoEPBase {
private Long inventRecordId = null; /* 规格ID*/
private BigDecimal initAmount = new BigDecimal(0.00); /* 期初数量*/
private BigDecimal initWeight = new BigDecimal(0.00); /* 期初重量*/
private BigDecimal cgEnterAmount = new BigDecimal(0.00); /* 采购入库数量*/
private BigDecimal cgEnterWeight = new BigDecimal(0.00); /* 采购入库重量*/
private BigDecimal scEnterAmount = new BigDecimal(0.00); /* 生产入库数量*/
private BigDecimal scEnterWeight = new BigDecimal(0.00); /* 生产入库重量*/
private BigDecimal qtEnterAmount = new BigDecimal(0.00); /* 其它入库数量*/
private BigDecimal qtEnterWeight = new BigDecimal(0.00); /* 其它入库重量*/
private BigDecimal enterAmount = new BigDecimal(0.00); /* 入库数量*/
private BigDecimal enterWeight = new BigDecimal(0.00); /* 入库重量*/
private BigDecimal scOuterAmount = new BigDecimal(0.00); /* 生产领料数量*/
private BigDecimal scOuterWeight = new BigDecimal(0.00); /* 生产领料重量*/
private BigDecimal xsOuterAmount = new BigDecimal(0.00); /* 销售出库数量*/
private BigDecimal xsOuterWeight = new BigDecimal(0.00); /* 销售出库重量*/
private BigDecimal qtOuterAmount = new BigDecimal(0.00); /* 其它出库数量*/
private BigDecimal qtOuterWeight = new BigDecimal(0.00); /* 其它出库重量*/
private BigDecimal outerAmount = new BigDecimal(0.00); /* 出库数量*/
private BigDecimal outerWeight = new BigDecimal(0.00); /* 出库重量*/
private BigDecimal pdDiffAmount = new BigDecimal(0.00); /* 盘点差异数量*/
private BigDecimal pdDiffWeight = new BigDecimal(0.00); /* 盘点差异重量*/
private BigDecimal endAmount = new BigDecimal(0.00); /* 期末数量*/
private BigDecimal endWeight = new BigDecimal(0.00); /* 期末重量*/
private String createdBy = " "; /* 创建人*/
......@@ -108,152 +147,246 @@ public class HPKC009 extends DaoEPBase {
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_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_KC_TYPE);
eiColumn.setDescName("库存类型:CG:采购,SC:生产,QT:其他");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DATE_TYPE);
eiColumn.setDescName("日期类型:DAY:天,MONTH:月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DATE_PROC);
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_INIT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("期初数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("期初重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CG_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("采购入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CG_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("采购入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("生产入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("生产入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("其它入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("其它入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("生产领料数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("生产领料重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_XS_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("销售出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_XS_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("销售出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("其它出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("其它出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PD_DIFF_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("盘点差异数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PD_DIFF_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("盘点差异重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("期末数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
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 HPKC009() {
initMetaData();
}
/**
* get the id .
* @return the id
......@@ -261,7 +394,7 @@ public class HPKC009 extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id .
*
......@@ -277,7 +410,7 @@ public class HPKC009 extends DaoEPBase {
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
......@@ -293,7 +426,7 @@ public class HPKC009 extends DaoEPBase {
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
......@@ -303,29 +436,13 @@ public class HPKC009 extends DaoEPBase {
this.depCode = depCode;
}
/**
* get the kcType - 库存类型:CG:采购,SC:生产,QT:其他.
* @return the kcType
*/
public String getKcType() {
return this.kcType;
}
/**
* set the kcType - 库存类型:CG:采购,SC:生产,QT:其他.
*
* @param kcType - 库存类型:CG:采购,SC:生产,QT:其他
*/
public void setKcType(String kcType) {
this.kcType = kcType;
}
/**
* get the dateType - 日期类型:DAY:天,MONTH:月.
* @return the dateType
*/
public String getDateType() {
return this.dateType;
}
/**
* set the dateType - 日期类型:DAY:天,MONTH:月.
*
......@@ -341,7 +458,7 @@ public class HPKC009 extends DaoEPBase {
public String getDateProc() {
return this.dateProc;
}
/**
* set the dateProc - 日期.
*
......@@ -357,7 +474,7 @@ public class HPKC009 extends DaoEPBase {
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
......@@ -373,7 +490,7 @@ public class HPKC009 extends DaoEPBase {
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
......@@ -389,7 +506,7 @@ public class HPKC009 extends DaoEPBase {
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
......@@ -405,7 +522,7 @@ public class HPKC009 extends DaoEPBase {
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
......@@ -421,7 +538,7 @@ public class HPKC009 extends DaoEPBase {
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
......@@ -437,7 +554,7 @@ public class HPKC009 extends DaoEPBase {
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 规格ID.
*
......@@ -453,7 +570,7 @@ public class HPKC009 extends DaoEPBase {
public BigDecimal getInitAmount() {
return this.initAmount;
}
/**
* set the initAmount - 期初数量.
*
......@@ -469,7 +586,7 @@ public class HPKC009 extends DaoEPBase {
public BigDecimal getInitWeight() {
return this.initWeight;
}
/**
* set the initWeight - 期初重量.
*
......@@ -479,13 +596,109 @@ public class HPKC009 extends DaoEPBase {
this.initWeight = initWeight;
}
/**
* get the cgEnterAmount - 采购入库数量.
* @return the cgEnterAmount
*/
public BigDecimal getCgEnterAmount() {
return this.cgEnterAmount;
}
/**
* set the cgEnterAmount - 采购入库数量.
*
* @param cgEnterAmount - 采购入库数量
*/
public void setCgEnterAmount(BigDecimal cgEnterAmount) {
this.cgEnterAmount = cgEnterAmount;
}
/**
* get the cgEnterWeight - 采购入库重量.
* @return the cgEnterWeight
*/
public BigDecimal getCgEnterWeight() {
return this.cgEnterWeight;
}
/**
* set the cgEnterWeight - 采购入库重量.
*
* @param cgEnterWeight - 采购入库重量
*/
public void setCgEnterWeight(BigDecimal cgEnterWeight) {
this.cgEnterWeight = cgEnterWeight;
}
/**
* get the scEnterAmount - 生产入库数量.
* @return the scEnterAmount
*/
public BigDecimal getScEnterAmount() {
return this.scEnterAmount;
}
/**
* set the scEnterAmount - 生产入库数量.
*
* @param scEnterAmount - 生产入库数量
*/
public void setScEnterAmount(BigDecimal scEnterAmount) {
this.scEnterAmount = scEnterAmount;
}
/**
* get the scEnterWeight - 生产入库重量.
* @return the scEnterWeight
*/
public BigDecimal getScEnterWeight() {
return this.scEnterWeight;
}
/**
* set the scEnterWeight - 生产入库重量.
*
* @param scEnterWeight - 生产入库重量
*/
public void setScEnterWeight(BigDecimal scEnterWeight) {
this.scEnterWeight = scEnterWeight;
}
/**
* get the qtEnterAmount - 其它入库数量.
* @return the qtEnterAmount
*/
public BigDecimal getQtEnterAmount() {
return this.qtEnterAmount;
}
/**
* set the qtEnterAmount - 其它入库数量.
*
* @param qtEnterAmount - 其它入库数量
*/
public void setQtEnterAmount(BigDecimal qtEnterAmount) {
this.qtEnterAmount = qtEnterAmount;
}
/**
* get the qtEnterWeight - 其它入库重量.
* @return the qtEnterWeight
*/
public BigDecimal getQtEnterWeight() {
return this.qtEnterWeight;
}
/**
* set the qtEnterWeight - 其它入库重量.
*
* @param qtEnterWeight - 其它入库重量
*/
public void setQtEnterWeight(BigDecimal qtEnterWeight) {
this.qtEnterWeight = qtEnterWeight;
}
/**
* get the enterAmount - 入库数量.
* @return the enterAmount
*/
public BigDecimal getEnterAmount() {
return this.enterAmount;
}
/**
* set the enterAmount - 入库数量.
*
......@@ -501,7 +714,7 @@ public class HPKC009 extends DaoEPBase {
public BigDecimal getEnterWeight() {
return this.enterWeight;
}
/**
* set the enterWeight - 入库重量.
*
......@@ -511,13 +724,109 @@ public class HPKC009 extends DaoEPBase {
this.enterWeight = enterWeight;
}
/**
* get the scOuterAmount - 生产领料数量.
* @return the scOuterAmount
*/
public BigDecimal getScOuterAmount() {
return this.scOuterAmount;
}
/**
* set the scOuterAmount - 生产领料数量.
*
* @param scOuterAmount - 生产领料数量
*/
public void setScOuterAmount(BigDecimal scOuterAmount) {
this.scOuterAmount = scOuterAmount;
}
/**
* get the scOuterWeight - 生产领料重量.
* @return the scOuterWeight
*/
public BigDecimal getScOuterWeight() {
return this.scOuterWeight;
}
/**
* set the scOuterWeight - 生产领料重量.
*
* @param scOuterWeight - 生产领料重量
*/
public void setScOuterWeight(BigDecimal scOuterWeight) {
this.scOuterWeight = scOuterWeight;
}
/**
* get the xsOuterAmount - 销售出库数量.
* @return the xsOuterAmount
*/
public BigDecimal getXsOuterAmount() {
return this.xsOuterAmount;
}
/**
* set the xsOuterAmount - 销售出库数量.
*
* @param xsOuterAmount - 销售出库数量
*/
public void setXsOuterAmount(BigDecimal xsOuterAmount) {
this.xsOuterAmount = xsOuterAmount;
}
/**
* get the xsOuterWeight - 销售出库重量.
* @return the xsOuterWeight
*/
public BigDecimal getXsOuterWeight() {
return this.xsOuterWeight;
}
/**
* set the xsOuterWeight - 销售出库重量.
*
* @param xsOuterWeight - 销售出库重量
*/
public void setXsOuterWeight(BigDecimal xsOuterWeight) {
this.xsOuterWeight = xsOuterWeight;
}
/**
* get the qtOuterAmount - 其它出库数量.
* @return the qtOuterAmount
*/
public BigDecimal getQtOuterAmount() {
return this.qtOuterAmount;
}
/**
* set the qtOuterAmount - 其它出库数量.
*
* @param qtOuterAmount - 其它出库数量
*/
public void setQtOuterAmount(BigDecimal qtOuterAmount) {
this.qtOuterAmount = qtOuterAmount;
}
/**
* get the qtOuterWeight - 其它出库重量.
* @return the qtOuterWeight
*/
public BigDecimal getQtOuterWeight() {
return this.qtOuterWeight;
}
/**
* set the qtOuterWeight - 其它出库重量.
*
* @param qtOuterWeight - 其它出库重量
*/
public void setQtOuterWeight(BigDecimal qtOuterWeight) {
this.qtOuterWeight = qtOuterWeight;
}
/**
* get the outerAmount - 出库数量.
* @return the outerAmount
*/
public BigDecimal getOuterAmount() {
return this.outerAmount;
}
/**
* set the outerAmount - 出库数量.
*
......@@ -533,7 +842,7 @@ public class HPKC009 extends DaoEPBase {
public BigDecimal getOuterWeight() {
return this.outerWeight;
}
/**
* set the outerWeight - 出库重量.
*
......@@ -543,13 +852,45 @@ public class HPKC009 extends DaoEPBase {
this.outerWeight = outerWeight;
}
/**
* get the pdDiffAmount - 盘点差异数量.
* @return the pdDiffAmount
*/
public BigDecimal getPdDiffAmount() {
return this.pdDiffAmount;
}
/**
* set the pdDiffAmount - 盘点差异数量.
*
* @param pdDiffAmount - 盘点差异数量
*/
public void setPdDiffAmount(BigDecimal pdDiffAmount) {
this.pdDiffAmount = pdDiffAmount;
}
/**
* get the pdDiffWeight - 盘点差异重量.
* @return the pdDiffWeight
*/
public BigDecimal getPdDiffWeight() {
return this.pdDiffWeight;
}
/**
* set the pdDiffWeight - 盘点差异重量.
*
* @param pdDiffWeight - 盘点差异重量
*/
public void setPdDiffWeight(BigDecimal pdDiffWeight) {
this.pdDiffWeight = pdDiffWeight;
}
/**
* get the endAmount - 期末数量.
* @return the endAmount
*/
public BigDecimal getEndAmount() {
return this.endAmount;
}
/**
* set the endAmount - 期末数量.
*
......@@ -565,7 +906,7 @@ public class HPKC009 extends DaoEPBase {
public BigDecimal getEndWeight() {
return this.endWeight;
}
/**
* set the endWeight - 期末重量.
*
......@@ -581,7 +922,7 @@ public class HPKC009 extends DaoEPBase {
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
......@@ -597,7 +938,7 @@ public class HPKC009 extends DaoEPBase {
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
......@@ -613,7 +954,7 @@ public class HPKC009 extends DaoEPBase {
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
......@@ -629,7 +970,7 @@ public class HPKC009 extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
......@@ -645,7 +986,7 @@ public class HPKC009 extends DaoEPBase {
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
......@@ -661,7 +1002,7 @@ public class HPKC009 extends DaoEPBase {
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
......@@ -677,11 +1018,10 @@ public class HPKC009 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));
setKcType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_KC_TYPE)), kcType));
setDateType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DATE_TYPE)), dateType));
setDateProc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DATE_PROC)), dateProc));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
......@@ -692,10 +1032,24 @@ public class HPKC009 extends DaoEPBase {
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setInitAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_AMOUNT)), initAmount));
setInitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_WEIGHT)), initWeight));
setCgEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CG_ENTER_AMOUNT)), cgEnterAmount));
setCgEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CG_ENTER_WEIGHT)), cgEnterWeight));
setScEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_ENTER_AMOUNT)), scEnterAmount));
setScEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_ENTER_WEIGHT)), scEnterWeight));
setQtEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_ENTER_AMOUNT)), qtEnterAmount));
setQtEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_ENTER_WEIGHT)), qtEnterWeight));
setEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTER_AMOUNT)), enterAmount));
setEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTER_WEIGHT)), enterWeight));
setScOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_OUTER_AMOUNT)), scOuterAmount));
setScOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_OUTER_WEIGHT)), scOuterWeight));
setXsOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_XS_OUTER_AMOUNT)), xsOuterAmount));
setXsOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_XS_OUTER_WEIGHT)), xsOuterWeight));
setQtOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_OUTER_AMOUNT)), qtOuterAmount));
setQtOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_OUTER_WEIGHT)), qtOuterWeight));
setOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUTER_AMOUNT)), outerAmount));
setOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUTER_WEIGHT)), outerWeight));
setPdDiffAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PD_DIFF_AMOUNT)), pdDiffAmount));
setPdDiffWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PD_DIFF_WEIGHT)), pdDiffWeight));
setEndAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_END_AMOUNT)), endAmount));
setEndWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_END_WEIGHT)), endWeight));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
......@@ -705,18 +1059,17 @@ public class HPKC009 extends DaoEPBase {
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_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_KC_TYPE, StringUtils.toString(kcType, eiMetadata.getMeta(FIELD_KC_TYPE)));
map.put(FIELD_DATE_TYPE, StringUtils.toString(dateType, eiMetadata.getMeta(FIELD_DATE_TYPE)));
map.put(FIELD_DATE_PROC, StringUtils.toString(dateProc, eiMetadata.getMeta(FIELD_DATE_PROC)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
......@@ -727,10 +1080,24 @@ public class HPKC009 extends DaoEPBase {
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_INIT_AMOUNT, StringUtils.toString(initAmount, eiMetadata.getMeta(FIELD_INIT_AMOUNT)));
map.put(FIELD_INIT_WEIGHT, StringUtils.toString(initWeight, eiMetadata.getMeta(FIELD_INIT_WEIGHT)));
map.put(FIELD_CG_ENTER_AMOUNT, StringUtils.toString(cgEnterAmount, eiMetadata.getMeta(FIELD_CG_ENTER_AMOUNT)));
map.put(FIELD_CG_ENTER_WEIGHT, StringUtils.toString(cgEnterWeight, eiMetadata.getMeta(FIELD_CG_ENTER_WEIGHT)));
map.put(FIELD_SC_ENTER_AMOUNT, StringUtils.toString(scEnterAmount, eiMetadata.getMeta(FIELD_SC_ENTER_AMOUNT)));
map.put(FIELD_SC_ENTER_WEIGHT, StringUtils.toString(scEnterWeight, eiMetadata.getMeta(FIELD_SC_ENTER_WEIGHT)));
map.put(FIELD_QT_ENTER_AMOUNT, StringUtils.toString(qtEnterAmount, eiMetadata.getMeta(FIELD_QT_ENTER_AMOUNT)));
map.put(FIELD_QT_ENTER_WEIGHT, StringUtils.toString(qtEnterWeight, eiMetadata.getMeta(FIELD_QT_ENTER_WEIGHT)));
map.put(FIELD_ENTER_AMOUNT, StringUtils.toString(enterAmount, eiMetadata.getMeta(FIELD_ENTER_AMOUNT)));
map.put(FIELD_ENTER_WEIGHT, StringUtils.toString(enterWeight, eiMetadata.getMeta(FIELD_ENTER_WEIGHT)));
map.put(FIELD_SC_OUTER_AMOUNT, StringUtils.toString(scOuterAmount, eiMetadata.getMeta(FIELD_SC_OUTER_AMOUNT)));
map.put(FIELD_SC_OUTER_WEIGHT, StringUtils.toString(scOuterWeight, eiMetadata.getMeta(FIELD_SC_OUTER_WEIGHT)));
map.put(FIELD_XS_OUTER_AMOUNT, StringUtils.toString(xsOuterAmount, eiMetadata.getMeta(FIELD_XS_OUTER_AMOUNT)));
map.put(FIELD_XS_OUTER_WEIGHT, StringUtils.toString(xsOuterWeight, eiMetadata.getMeta(FIELD_XS_OUTER_WEIGHT)));
map.put(FIELD_QT_OUTER_AMOUNT, StringUtils.toString(qtOuterAmount, eiMetadata.getMeta(FIELD_QT_OUTER_AMOUNT)));
map.put(FIELD_QT_OUTER_WEIGHT, StringUtils.toString(qtOuterWeight, eiMetadata.getMeta(FIELD_QT_OUTER_WEIGHT)));
map.put(FIELD_OUTER_AMOUNT, StringUtils.toString(outerAmount, eiMetadata.getMeta(FIELD_OUTER_AMOUNT)));
map.put(FIELD_OUTER_WEIGHT, StringUtils.toString(outerWeight, eiMetadata.getMeta(FIELD_OUTER_WEIGHT)));
map.put(FIELD_PD_DIFF_AMOUNT, StringUtils.toString(pdDiffAmount, eiMetadata.getMeta(FIELD_PD_DIFF_AMOUNT)));
map.put(FIELD_PD_DIFF_WEIGHT, StringUtils.toString(pdDiffWeight, eiMetadata.getMeta(FIELD_PD_DIFF_WEIGHT)));
map.put(FIELD_END_AMOUNT, StringUtils.toString(endAmount, eiMetadata.getMeta(FIELD_END_AMOUNT)));
map.put(FIELD_END_WEIGHT, StringUtils.toString(endWeight, eiMetadata.getMeta(FIELD_END_WEIGHT)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
......@@ -739,7 +1106,7 @@ public class HPKC009 extends DaoEPBase {
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;
}
}
package com.baosight.hpjx.hp.kc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THPK010.java <br>
* Title:THpkc010.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-11 15:32:44 create
* @history 2024-01-25 17:57:24 create
*/
public class HPKC010 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_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
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_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_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
......@@ -40,140 +40,146 @@ public class HPKC010 extends DaoEPBase {
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_VERSION = "version"; /* 版本号*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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 = "inventRecordId"; /* 存货档案ID*/
public static final String COL_AMOUNT = "amount"; /* 数量*/
public static final String COL_WEIGHT = "weight"; /* 重量*/
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_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_VERSION = "VERSION"; /* 部门编码*/
public static final String COL_VERSION = "VERSION"; /* 版本号*/
public static final String QUERY = "HPKC010.query";
public static final String COUNT = "HPKC010.count";
public static final String INSERT = "HPKC010.insert";
public static final String UPDATE = "HPKC010.update";
public static final String DELETE = "HPKC010.delete";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码 预留*/
private Long id = null;
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
private String inventType = " "; /* 物料类型*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private Long inventRecordId = null; /* 存货档案ID*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Long version = new Long(0); /* 版本号*/
private Integer version = null; /* 版本号*/
/**
* 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("企业编码 预留");
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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("存货类型");
eiColumn.setDescName("物料类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiColumn.setDescName("物料编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
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(2);
eiColumn.setFieldLength(10);
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(12);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(12);
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_VERSION);
eiColumn.setDescName("版本号");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPKC010() {
initMetaData();
}
/**
* get the id .
* @return the id
......@@ -181,7 +187,7 @@ public class HPKC010 extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id .
*
......@@ -191,22 +197,37 @@ public class HPKC010 extends DaoEPBase {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
* set the companyCode - 企业编码.
*
* @param 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 depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the whCode - 仓库编码.
* @return the whCode
......@@ -214,7 +235,7 @@ public class HPKC010 extends DaoEPBase {
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
......@@ -230,7 +251,7 @@ public class HPKC010 extends DaoEPBase {
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
......@@ -240,78 +261,109 @@ public class HPKC010 extends DaoEPBase {
this.whName = whName;
}
/**
* get the matType - 存货类型.
* @return the matType
* get the inventType - 物料类型.
* @return the inventType
*/
public String getInventType() {
return this.inventType;
}
/**
* set the matType - 存货类型.
* set the inventType - 物料类型.
*
* @param inventType - 存货类型
* @param inventType - 物料类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the matCode - 存货编码.
* @return the matCode
* get the inventCode - 物料编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the matCode - 存货编码.
* set the inventCode - 物料编码.
*
* @param inventCode - 存货编码
* @param inventCode - 物料编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the matName - 存货名称.
* @return the matName
* get the inventName - 物料名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the matName - 存货名称.
* set the inventName - 物料名称.
*
* @param inventName - 存货名称
* @param inventName - 物料名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventRecordId - 存货档案ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return inventRecordId;
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 amount;
return this.amount;
}
/**
* set the amount - 数量.
*
* @param amount - 数量
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the weight - 重量.
* @return the weight
*/
public BigDecimal getWeight() {
return weight;
return this.weight;
}
/**
* set the weight - 重量.
*
* @param weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
......@@ -321,17 +373,17 @@ public class HPKC010 extends DaoEPBase {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建名称.
* get the createdName - 创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建名称.
* set the createdName - 创建名称.
*
* @param createdName - 创建名称
* @param createdName - 创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
......@@ -343,7 +395,7 @@ public class HPKC010 extends DaoEPBase {
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
......@@ -359,7 +411,7 @@ public class HPKC010 extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
......@@ -375,7 +427,7 @@ public class HPKC010 extends DaoEPBase {
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 更新人名称.
*
......@@ -391,7 +443,7 @@ public class HPKC010 extends DaoEPBase {
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 更新时间.
*
......@@ -400,15 +452,22 @@ public class HPKC010 extends DaoEPBase {
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
public Long getVersion() {
return version;
/**
* get the version - 版本号.
* @return the version
*/
public Integer getVersion() {
return this.version;
}
public void setVersion(Long version) {
/**
* set the version - 版本号.
*
* @param version - 版本号
*/
public void setVersion(Integer version) {
this.version = version;
}
/**
* get the value from Map.
*
......@@ -416,15 +475,16 @@ public class HPKC010 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));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(StringUtils.defaultIfEmpty(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)), id));
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));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
......@@ -433,18 +493,19 @@ public class HPKC010 extends DaoEPBase {
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));
setVersion(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_VERSION)), version));
setVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_VERSION)), version));
}
/**
* 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_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)));
......@@ -460,7 +521,7 @@ public class HPKC010 extends DaoEPBase {
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_VERSION, StringUtils.toString(version, eiMetadata.getMeta(FIELD_VERSION)));
return map;
}
}
package com.baosight.hpjx.hp.kc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpkc010a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-25 18:41:22 create
*/
public class HPKC010A 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_DATE_PROC = "dateProc"; /* 日期*/
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_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_VERSION = "version"; /* 版本号*/
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_DATE_PROC = "DATE_PROC"; /* 日期*/
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_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_VERSION = "VERSION"; /* 版本号*/
public static final String QUERY = "HPKC010A.query";
public static final String COUNT = "HPKC010A.count";
public static final String INSERT = "HPKC010A.insert";
public static final String UPDATE = "HPKC010A.update";
public static final String DELETE = "HPKC010A.delete";
private Long id = null;
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String dateProc = " "; /* 日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 物料类型*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private Long inventRecordId = null; /* 存货档案ID*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer version = null; /* 版本号*/
/**
* 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_DATE_PROC);
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_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_VERSION);
eiColumn.setDescName("版本号");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPKC010A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
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 depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the dateProc - 日期.
* @return the dateProc
*/
public String getDateProc() {
return this.dateProc;
}
/**
* set the dateProc - 日期.
*
* @param dateProc - 日期
*/
public void setDateProc(String dateProc) {
this.dateProc = dateProc;
}
/**
* get the whCode - 仓库编码.
* @return the whCode
*/
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
* @param whCode - 仓库编码
*/
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/**
* get the whName - 仓库名称.
* @return the whName
*/
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
* @param whName - 仓库名称
*/
public void setWhName(String whName) {
this.whName = whName;
}
/**
* get the inventType - 物料类型.
* @return the inventType
*/
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 物料类型.
*
* @param inventType - 物料类型
*/
public void setInventType(String 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 - 数量.
*
* @param amount - 数量
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the weight - 重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量.
*
* @param weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public void setUpdatedBy(String updatedBy) {
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 - 更新时间.
*
* @param updatedTime - 更新时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the version - 版本号.
* @return the version
*/
public Integer getVersion() {
return this.version;
}
/**
* set the version - 版本号.
*
* @param version - 版本号
*/
public void setVersion(Integer version) {
this.version = version;
}
/**
* 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));
setDateProc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DATE_PROC)), dateProc));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(StringUtils.defaultIfEmpty(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));
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));
setVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_VERSION)), version));
}
/**
* 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_DATE_PROC, StringUtils.toString(dateProc, eiMetadata.getMeta(FIELD_DATE_PROC)));
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_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_VERSION, StringUtils.toString(version, eiMetadata.getMeta(FIELD_VERSION)));
return map;
}
}
......@@ -150,7 +150,7 @@ public class ServiceHPKC003 extends ServiceBase {
//生产一条负数量和产量的红冲记录
hpkc003.setAmount(hpkc003.getAmount().multiply(new BigDecimal(-1.000)));
hpkc003.setWeight(hpkc003.getWeight().multiply(new BigDecimal(-1.000)));
hpkc003.setDeleteFlag(0);
hpkc003.setDeleteFlag(1);
hpkc003.setProdNoOld(hpkc003.getProdNo());
hpkc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", hpkc003);
......
......@@ -9,9 +9,12 @@ import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC002;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC004;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.domain.HPKC009;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.kc.domain.HPKC010A;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
......@@ -26,6 +29,7 @@ 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.web.threadlocal.UserSession;
import org.apache.commons.collections.MapUtils;
......@@ -81,7 +85,7 @@ public class ServiceHPKC009 extends ServiceBase {
StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
queryRow.put("dateType", CommonConstant.DateType.MONTH);
inInfo = super.query(inInfo, HPKC009.QUERY, new HPKC009());
List sum = dao.query("HPKC009.querySum", queryRow);
List sum = dao.query(HPSqlConstant.HPKC009.QUERY_SUM, queryRow);
inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -97,10 +101,9 @@ public class ServiceHPKC009 extends ServiceBase {
*/
public EiInfo statDay(EiInfo inInfo) {
try {
List<HPKC009> results = new ArrayList<>();
// 取昨天的日期
Map queryMap = new HashMap();
LocalDate nowDate = LocalDate.now();
LocalDate nowDate = LocalDate.now();
String yesterDay = LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE);
queryMap.put("yesterFrom", yesterDay);
queryMap.put("yesterTo", yesterDay);
......@@ -110,17 +113,13 @@ public class ServiceHPKC009 extends ServiceBase {
// 0.清除数据
queryMap.put("dateProc", queryMap.get("yesterDate"));
dao.delete(HPSqlConstant.HPKC009.DELETE_BY_TIME, queryMap);
// 1、统计采购库存
results.addAll(this.statCg(queryMap));
// 2、统计生产库存
results.addAll(this.statSc(queryMap));
// 3、统计其他库存
results.addAll(this.statQt(queryMap));
// 1、统计收发存
List<HPKC009> results = this.statData(queryMap);
// 4、设置基础信息
this.setBaseInfo(results);
// 5、写入数据库
DaoUtils.insert("HPKC009.insert", results);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
dao.insertBatch(HPKC009.INSERT, results);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("按天统计成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "按天统计失败");
......@@ -136,7 +135,6 @@ public class ServiceHPKC009 extends ServiceBase {
*/
public EiInfo statMonth(EiInfo inInfo) {
try {
List<HPKC009> results = new ArrayList<>();
// 上个月的日期
Map queryMap = new HashMap();
LocalDate nowDate = LocalDate.now();
......@@ -151,17 +149,13 @@ public class ServiceHPKC009 extends ServiceBase {
// 0.清除数据
queryMap.put("dateProc", queryMap.get("yesterDate"));
dao.delete(HPSqlConstant.HPKC009.DELETE_BY_TIME, queryMap);
// 1、统计采购库存
results.addAll(this.statCg(queryMap));
// 2、统计生产库存
results.addAll(this.statSc(queryMap));
// 3、统计其他库存
results.addAll(this.statQt(queryMap));
// 1、统计收发存
List<HPKC009> results = this.statData(queryMap);
// 4、设置基础信息
this.setBaseInfo(results);
// 5、写入数据库
DaoUtils.insert("HPKC009.insert", results);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
dao.insertBatch(HPKC009.INSERT, results);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("按月统计成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "按月统计失败");
......@@ -170,6 +164,130 @@ public class ServiceHPKC009 extends ServiceBase {
}
/**
* 统计库存收发存
*
* @return
*/
private List<HPKC009> statData(Map queryMap) {
List<HPKC009> newKc009s = new ArrayList<>();
// 1.1、期末库存
queryMap.put("dateProc", queryMap.get("yesterTo"));
List<HPKC010> endKcs = dao.query(HPKC010A.QUERY, queryMap);
// 1.2、采购入库
queryMap.put("createdTimeFrom", queryMap.get("yesterFrom") + "000000");
queryMap.put("createdTimeTo", queryMap.get("yesterTo") + "235959");
List<HPKC001> cgRks = dao.query(HPSqlConstant.HPKC001.STAT_DATE, queryMap);
Map<String, HPKC001> cgRkMap = cgRks.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.3、生产入库
List<HPKC003> scRks = dao.query(HPSqlConstant.HPKC003.STAT_DATE, queryMap);
Map<String, HPKC003> scRkMap = scRks.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode(), item -> item));
// 1.4、其他入库
List<HPKC006> qtRks = dao.query(HPSqlConstant.HPKC006.STAT_DATE, queryMap);
Map<String, HPKC006> qtRkMap = qtRks.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.5、生产领料
List<HPKC002> scCks = dao.query(HPSqlConstant.HPKC002.STAT_DATE, queryMap);
Map<String, HPKC002> scCkMap = scCks.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.6、销售出库
List<HPKC004> xsCks = dao.query(HPSqlConstant.HPKC004.STAT_DATE, queryMap);
Map<String, HPKC004> xsCkMap = xsCks.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode(), item -> item));
// 1.7、其它出库
List<HPKC007> qtCks = dao.query(HPSqlConstant.HPKC007.STAT_DATE, queryMap);
Map<String, HPKC007> qtCkMap = qtCks.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.8、盘点差异数量
List<HPKC005> pdDiffs = dao.query(HPSqlConstant.HPKC005.STAT_DATE, queryMap);
Map<String, HPKC005> pdDiffMap = pdDiffs.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.9、期初库存
queryMap.put("dateProc", queryMap.get("beforeDate"));
List<HPKC009> initKcs = dao.query(HPKC009.QUERY, new HashMap<>());
Map<String, HPKC009> initKcMap = initKcs.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 根据期末库存生成收发存对象
for (HPKC010 endKc : endKcs) {
String key = endKc.getCompanyCode() + "#" + endKc.getDepCode() + "#"
+ endKc.getWhCode() + "#" + endKc.getInventType() + "#"
+ endKc.getInventCode() + "#" + endKc.getInventRecordId();
HPKC009 kc009 = BeanUtils.copy(endKc, HPKC009.class);
kc009.setDateType(queryMap.get("dateType").toString());
kc009.setDateProc(queryMap.get("yesterDate").toString());
// 1.1期末
kc009.setEndAmount(endKc.getAmount());
kc009.setEndWeight(endKc.getWeight());
// 1.2、采购入库
HPKC001 cgRk = cgRkMap.get(key);
kc009.setCgEnterAmount(cgRk == null ? BigDecimal.ZERO : cgRk.getAmount());
kc009.setCgEnterWeight(cgRk == null ? BigDecimal.ZERO : cgRk.getWeight());
// 1.3、生产入库
HPKC003 scRk = scRkMap.get(key);
kc009.setScEnterAmount(scRk == null ? BigDecimal.ZERO : scRk.getAmount());
kc009.setScEnterWeight(scRk == null ? BigDecimal.ZERO : scRk.getWeight());
// 1.3、其他入库
HPKC006 qtRk = qtRkMap.get(key);
kc009.setQtEnterAmount(qtRk == null ? BigDecimal.ZERO : qtRk.getAmount());
kc009.setQtEnterWeight(qtRk == null ? BigDecimal.ZERO : qtRk.getWeight());
// 1.4、入库
kc009.setEnterAmount(kc009.getCgEnterAmount().add(kc009.getScEnterAmount())
.add(kc009.getQtEnterAmount()));
kc009.setEnterWeight(kc009.getCgEnterWeight().add(kc009.getScEnterWeight())
.add(kc009.getQtEnterWeight()));
// 1.5、生产领料
HPKC002 scCk = scCkMap.get(key);
kc009.setScOuterAmount(scCk == null ? BigDecimal.ZERO : scCk.getAmount());
kc009.setScOuterWeight(scCk == null ? BigDecimal.ZERO : scCk.getWeight());
// 1.6、销售出库
HPKC004 xsCk = xsCkMap.get(key);
kc009.setXsOuterAmount(xsCk == null ? BigDecimal.ZERO : xsCk.getAmount());
kc009.setXsOuterWeight(xsCk == null ? BigDecimal.ZERO : xsCk.getWeight());
// 1.7、其他出库
HPKC007 qtCk = qtCkMap.get(key);
kc009.setQtOuterAmount(qtCk == null ? BigDecimal.ZERO : qtCk.getAmount());
kc009.setQtOuterWeight(qtCk == null ? BigDecimal.ZERO : qtCk.getWeight());
// 1.8、出库
kc009.setOuterAmount(kc009.getScOuterAmount().add(kc009.getXsOuterAmount())
.add(kc009.getQtOuterAmount()));
kc009.setOuterWeight(kc009.getScOuterWeight().add(kc009.getXsOuterWeight())
.add(kc009.getQtOuterWeight()));
// 1.8、盘点差异数量
HPKC005 pdDiff = pdDiffMap.get(key);
kc009.setPdDiffAmount(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffAmount());
kc009.setPdDiffWeight(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffWeight());
// 1.9、期初
HPKC009 initKc = initKcMap.get(key);
if (initKc != null) {
kc009.setInitAmount(initKc.getEndAmount());
kc009.setInitWeight(initKc.getEndWeight());
} else {
kc009.setInitAmount(kc009.getEndAmount().subtract(kc009.getPdDiffAmount())
.add(kc009.getOuterAmount()).subtract(kc009.getEnterAmount()));
kc009.setInitWeight(kc009.getEndWeight().subtract(kc009.getPdDiffWeight())
.add(kc009.getOuterWeight()).subtract(kc009.getEnterWeight()));
}
newKc009s.add(kc009);
}
return newKc009s;
}
/**
* 按天统计采购库存
*
* @return
......@@ -208,7 +326,6 @@ public class ServiceHPKC009 extends ServiceBase {
HPKC009 kc009 = BeanUtils.copy(aItem, HPKC009.class);
kc009.setInventType(aItem.getInventType());
kc009.setInventCode(aItem.getInventCode());
kc009.setKcType(HPConstant.KcType.CG);
kc009.setDateType(queryMap.get("dateType").toString());
kc009.setDateProc(queryMap.get("yesterDate").toString());
// 期末
......@@ -276,7 +393,6 @@ public class ServiceHPKC009 extends ServiceBase {
kc009.setWhCode(aItem.getWhCode());
kc009.setInventType(aItem.getInventType() + "");
kc009.setInventCode(aItem.getInventCode());
kc009.setKcType(HPConstant.KcType.SC);
kc009.setDateType(queryMap.get("dateType").toString());
kc009.setDateProc(queryMap.get("yesterDate").toString());
// 期末
......@@ -322,27 +438,30 @@ public class ServiceHPKC009 extends ServiceBase {
List<HPKC006> bItems = dao.query(HPSqlConstant.HPKC006.STAT_DATE, queryMap);
Map<String, HPKC006> bItemMap = bItems.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode(), item -> item));
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.3、发出
List<HPKC007> cItems = dao.query(HPSqlConstant.HPKC007.STAT_DATE, queryMap);
Map<String, HPKC007> cItemMap = cItems.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode(), item -> item));
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 1.4、期初库存
queryMap.put("dateProc", queryMap.get("beforeDate"));
queryMap.put("kcType", HPConstant.KcType.QT);
List<HPKC009> dItems = dao.query(HPKC009.QUERY, new HashMap<>());
Map<String, HPKC009> dItemMap = dItems.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode(), item -> item));
+ item.getInventType() + "#" + item.getInventCode() + "#"
+ item.getInventRecordId(), item -> item));
// 根据期末库存生成收发存对象
for (HPKC006 aItem : aItems) {
String key = aItem.getCompanyCode() + "#" + aItem.getDepCode() + "#"
+ aItem.getWhCode() + "#" + aItem.getInventType() + "#" + aItem.getInventCode();
+ aItem.getWhCode() + "#" + aItem.getInventType() + "#" + aItem.getInventCode() + "#"
+ aItem.getInventRecordId();
HPKC009 kc009 = BeanUtils.copy(aItem, HPKC009.class);
kc009.setInventType(aItem.getInventType());
kc009.setInventCode(aItem.getInventCode());
kc009.setKcType(HPConstant.KcType.QT);
kc009.setDateType(queryMap.get("dateType").toString());
kc009.setDateProc(queryMap.get("yesterDate").toString());
// 期末
......@@ -385,13 +504,18 @@ public class ServiceHPKC009 extends ServiceBase {
List<String> inventCodes = kc009s.stream().map(HPKC009::getInventCode).collect(Collectors.toList());
Map<String, HPPZ004> mapPz004 = HPPZTools.mapPz004(inventCodes);
for (HPKC009 kc009 : kc009s) {
String whCode = kc009.getWhCode();
// 仓库名称
String whCode = kc009.getWhCode();
HPPZ007 pz007 = mapPz007 == null ? null : mapPz007.get(whCode);
kc009.setWhName(pz007 == null ? "" : pz007.getWhName());
// 存货名称
HPPZ004 pz004 = mapPz004 == null ? null : mapPz004.get(whCode);
String inventCode = kc009.getInventCode();
HPPZ004 pz004 = mapPz004 == null ? null : mapPz004.get(inventCode);
kc009.setInventName(pz004 == null ? "" : pz004.getInventName());
// 创建时间
kc009.setCreatedBy(UserSession.getLoginName());
kc009.setCreatedName(UserSession.getLoginCName());
kc009.setCreatedTime(DateUtils.shortDateTime());
}
}
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.time.LocalDate;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,18:49
*/
public class ServiceHPKC010A extends ServiceBase {
/**
* 备份数据
*
* @param inInfo
* @return
*/
public EiInfo backup(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("dateProc", LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE));
// 清除数据
dao.delete(HPSqlConstant.HPKC010A.DELETE_BY_TIME, queryMap);
// 备份数据
dao.insert(HPSqlConstant.HPKC010A.BACKUP, queryMap);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("备份数据成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
}
......@@ -34,7 +34,6 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -83,6 +82,9 @@
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<sql id="customCondition">
......@@ -97,6 +99,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
......@@ -216,4 +224,23 @@
</isNotEmpty>
</update>
<!-- 统计库存 -->
<select id="statDate" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC005">
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(DIFF_AMOUNT), 0) AS "diffAmount",
COALESCE(SUM(DIFF_WEIGHT), 0) AS "diffWeight"
FROM ${hpjxSchema}.T_HPKC005
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
......@@ -28,7 +28,6 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -62,6 +61,9 @@
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<sql id="customCondition">
......@@ -79,6 +81,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
......@@ -191,6 +199,7 @@
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC006
......@@ -198,7 +207,7 @@
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
......@@ -29,7 +29,6 @@
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -63,6 +62,9 @@
<isNotEmpty prepend=" AND " property="oldOuterNo">
OLD_OUTER_NO = #oldOuterNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<sql id="customCondition">
......@@ -77,6 +79,12 @@
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
......@@ -185,14 +193,15 @@
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC004
FROM ${hpjxSchema}.T_HPKC007
WHERE 1=1
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
......@@ -6,7 +6,6 @@
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
KC_TYPE as "kcType", <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
......@@ -17,10 +16,24 @@
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
INIT_AMOUNT as "initAmount", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
CG_ENTER_AMOUNT as "cgEnterAmount", <!-- 采购入库数量 -->
CG_ENTER_WEIGHT as "cgEnterWeight", <!-- 采购入库重量 -->
SC_ENTER_AMOUNT as "scEnterAmount", <!-- 生产入库数量 -->
SC_ENTER_WEIGHT as "scEnterWeight", <!-- 生产入库重量 -->
QT_ENTER_AMOUNT as "qtEnterAmount", <!-- 其它入库数量 -->
QT_ENTER_WEIGHT as "qtEnterWeight", <!-- 其它入库重量 -->
ENTER_AMOUNT as "enterAmount", <!-- 入库数量 -->
ENTER_WEIGHT as "enterWeight", <!-- 入库重量 -->
SC_OUTER_AMOUNT as "scOuterAmount", <!-- 生产领料数量 -->
SC_OUTER_WEIGHT as "scOuterWeight", <!-- 生产领料重量 -->
XS_OUTER_AMOUNT as "xsOuterAmount", <!-- 销售出库数量 -->
XS_OUTER_WEIGHT as "xsOuterWeight", <!-- 销售出库重量 -->
QT_OUTER_AMOUNT as "qtOuterAmount", <!-- 其它出库数量 -->
QT_OUTER_WEIGHT as "qtOuterWeight", <!-- 其它出库重量 -->
OUTER_AMOUNT as "outerAmount", <!-- 出库数量 -->
OUTER_WEIGHT as "outerWeight", <!-- 出库重量 -->
PD_DIFF_AMOUNT as "pdDiffAmount", <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT as "pdDiffWeight", <!-- 盘点差异重量 -->
END_AMOUNT as "endAmount", <!-- 期末数量 -->
END_WEIGHT as "endWeight", <!-- 期末重量 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
......@@ -41,9 +54,6 @@
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="kcType">
KC_TYPE = #kcType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
......@@ -76,7 +86,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
ID DESC
</isEmpty>
</dynamic>
</sql>
......@@ -101,10 +111,24 @@
SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 -->
COALESCE(SUM(CG_ENTER_AMOUNT), 0) AS "cgEnterAmount", <!-- 采购入库数量 -->
COALESCE(SUM(CG_ENTER_WEIGHT), 0) AS "cgEnterWeight", <!-- 采购入库重量 -->
COALESCE(SUM(SC_ENTER_AMOUNT), 0) AS "scEnterAmount", <!-- 生产入库数量 -->
COALESCE(SUM(SC_ENTER_WEIGHT), 0) AS "scEnterWeight", <!-- 生产入库重量 -->
COALESCE(SUM(QT_ENTER_AMOUNT), 0) AS "qtEnterAmount", <!-- 其它入库数量 -->
COALESCE(SUM(QT_ENTER_WEIGHT), 0) AS "qtEnterWeight", <!-- 其它入库重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 -->
COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 差异数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 差异重量 -->
COALESCE(SUM(SC_OUTER_AMOUNT), 0) AS "scOuterAmount", <!-- 生产领料数量 -->
COALESCE(SUM(SC_OUTER_WEIGHT), 0) AS "scOuterWeight", <!-- 生产领料重量 -->
COALESCE(SUM(XS_OUTER_AMOUNT), 0) AS "xsOuterAmount", <!-- 销售出库数量 -->
COALESCE(SUM(XS_OUTER_WEIGHT), 0) AS "xsOuterWeight", <!-- 销售出库重量 -->
COALESCE(SUM(QT_OUTER_AMOUNT), 0) AS "qtOuterAmount", <!-- 其它出库数量 -->
COALESCE(SUM(QT_OUTER_WEIGHT), 0) AS "qtOuterWeight", <!-- 其它出库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 出库数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 出库重量 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) AS "pdDiffAmount", <!-- 盘点差异数量 -->
COALESCE(SUM(PD_DIFF_WEIGHT), 0) AS "pdDiffWeight", <!-- 盘点差异重量 -->
COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 -->
COALESCE(SUM(END_WEIGHT), 0) AS "endWeight" <!-- 期末重量 -->
FROM ${hpjxSchema}.T_HPKC009
......@@ -116,7 +140,6 @@
INSERT INTO ${hpjxSchema}.T_HPKC009 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
KC_TYPE, <!-- 库存类型:CG:采购,SC:生产,QT:其他 -->
DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC, <!-- 日期 -->
WH_CODE, <!-- 仓库编码 -->
......@@ -127,21 +150,37 @@
INVENT_RECORD_ID, <!-- 规格ID -->
INIT_AMOUNT, <!-- 期初数量 -->
INIT_WEIGHT, <!-- 期初重量 -->
CG_ENTER_AMOUNT, <!-- 采购入库数量 -->
CG_ENTER_WEIGHT, <!-- 采购入库重量 -->
SC_ENTER_AMOUNT, <!-- 生产入库数量 -->
SC_ENTER_WEIGHT, <!-- 生产入库重量 -->
QT_ENTER_AMOUNT, <!-- 其它入库数量 -->
QT_ENTER_WEIGHT, <!-- 其它入库重量 -->
ENTER_AMOUNT, <!-- 入库数量 -->
ENTER_WEIGHT, <!-- 入库重量 -->
SC_OUTER_AMOUNT, <!-- 生产领料数量 -->
SC_OUTER_WEIGHT, <!-- 生产领料重量 -->
XS_OUTER_AMOUNT, <!-- 销售出库数量 -->
XS_OUTER_WEIGHT, <!-- 销售出库重量 -->
QT_OUTER_AMOUNT, <!-- 其它出库数量 -->
QT_OUTER_WEIGHT, <!-- 其它出库重量 -->
OUTER_AMOUNT, <!-- 出库数量 -->
OUTER_WEIGHT, <!-- 出库重量 -->
PD_DIFF_AMOUNT, <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT, <!-- 盘点差异重量 -->
END_AMOUNT, <!-- 期末数量 -->
END_WEIGHT, <!-- 期末重量 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #kcType#, #dateType#, #dateProc#, #whCode#,
#whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#,
#initAmount#, #initWeight#, #enterAmount#, #enterWeight#, #outerAmount#,
#outerWeight#, #endAmount#, #endWeight#, #createdBy#, #createdName#,
#createdTime#
#companyCode#, #depCode#, #dateType#, #dateProc#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #inventRecordId#, #initAmount#,
#initWeight#, #cgEnterAmount#, #cgEnterWeight#, #scEnterAmount#, #scEnterWeight#,
#qtEnterAmount#, #qtEnterWeight#, #enterAmount#, #enterWeight#, #scOuterAmount#,
#scOuterWeight#, #xsOuterAmount#, #xsOuterWeight#, #qtOuterAmount#, #qtOuterWeight#,
#outerAmount#, #outerWeight#, #pdDiffAmount#, #pdDiffWeight#, #endAmount#,
#endWeight#, #createdBy#, #createdName#, #createdTime#
)
</insert>
......
......@@ -4,20 +4,23 @@
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_TYPE as "inventType", <!-- 物料类型 -->
INVENT_CODE as "inventCode", <!-- 物料编码 -->
INVENT_NAME as "inventName", <!-- 物料名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version"
VERSION as "version" <!-- 版本号 -->
</sql>
<sql id="condition">
......@@ -114,6 +117,7 @@
<insert id="insert">
INSERT INTO hpjx.T_HPKC010 (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
......@@ -128,7 +132,7 @@
UPDATED_TIME, <!-- 更新时间 -->
VERSION
) VALUES (
#companyCode#, #whCode#, #whName#, #inventType#,
#companyCode#, #depCode#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#createdBy#, #createdTime#, #updatedBy#,
#updatedTime#, #version#
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPKC010A">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
DATE_PROC as "dateProc", <!-- 日期 -->
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", <!-- 重量 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version" <!-- 版本号 -->
</sql>
<sql id="condition">
<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="dateProc">
DATE_PROC = #dateProc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<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="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="version">
VERSION = #version#
</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.kc.domain.HPKC010A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPKC010A
WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC010A WHERE 1=1
<include refid="condition"/>
</select>
<!-- 按时间删除数据 -->
<delete id="deleteByTime">
DELETE FROM ${hpjxSchema}.T_HPKC010A WHERE DATE_PROC = #dateProc#
</delete>
<!-- 备份数据 -->
<insert id="backup">
INSERT INTO ${hpjxSchema}.T_HPKC010A (
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
)
SELECT
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME, INVENT_TYPE,
INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, AMOUNT, WEIGHT,
CREATED_BY, CREATED_NAME, CREATED_TIME, UPDATED_BY, UPDATED_NAME,
UPDATED_TIME, VERSION
FROM ${hpjxSchema}.T_HPKC010
</insert>
</sqlMap>
......@@ -61,7 +61,7 @@ public class HPPZTools {
}
Map queryMap = new HashMap();
queryMap.put("inventCodes", inventCodes);
return DaoBase.getInstance().query("HPPZ004.query", queryMap);
return DaoBase.getInstance().query(HPPZ004.QUERY, queryMap);
}
/**
......
......@@ -8,7 +8,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
public class THPSC001 extends DaoEPBase {
public class HPSC001 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
......@@ -26,6 +26,8 @@ public class THPSC001 extends DaoEPBase {
private String updatedTime ; /* 更新时间*/
private String depCode = " "; /* 部门编码*/
private String remark = " "; /* 备注*/
private Integer materialStatus = 0; /* 物料审核状态0-未审核,1部分审核,2全部审核*/
/**
* initialize the metadata
*/
......@@ -97,12 +99,14 @@ public class THPSC001 extends DaoEPBase {
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("materialStatus");
eiColumn.setDescName("物料审核状态0-未审核,1部分审核,2全部审核");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public THPSC001() {
public HPSC001() {
initMetaData();
}
......@@ -321,6 +325,19 @@ public class THPSC001 extends DaoEPBase {
this.remark = remark;
}
/**
* set the materialStatus - 物料审核状态0-未审核,1部分审核,2全部审核
*/
public void setMaterialStatus(Integer materialStatus) {
this.materialStatus = materialStatus;
}
/**
* get the materialStatus - 物料审核状态0-未审核,1部分审核,2全部审核
* @return the materialStatus
*/
public Integer getMaterialStatus() {
return this.materialStatus;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
......@@ -341,6 +358,8 @@ public class THPSC001 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("depCode")), depCode));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
setMaterialStatus(NumberUtils.toInteger(StringUtils.toString(map.get("materialStatus")), materialStatus));
}
/**
......@@ -365,6 +384,7 @@ public class THPSC001 extends DaoEPBase {
map.put("updatedTime",StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("depCode",StringUtils.toString(depCode, eiMetadata.getMeta("depCode")));
map.put("remark",StringUtils.toString(remark, eiMetadata.getMeta("remark")));
map.put("materialStatus",StringUtils.toString(materialStatus, eiMetadata.getMeta("materialStatus")));
return map;
......
......@@ -8,10 +8,6 @@ import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.util.DateUtils;
import java.sql.Timestamp;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
......@@ -24,7 +20,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* THpsc002
*
*/
public class THPSC002 extends DaoEPBase {
public class HPSC002 extends DaoEPBase {
private Long id = 0L;
private String companyCode = " "; /* 企业编码 预留*/
......@@ -37,6 +33,7 @@ public class THPSC002 extends DaoEPBase {
private String leaf = "1"; /* 是否有叶子节点*/
private String sort = " "; /* 排序字段*/
private String icon = " "; /* 图片地址*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/
......@@ -106,6 +103,10 @@ public class THPSC002 extends DaoEPBase {
eiColumn.setDescName("图片地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtType");
eiColumn.setDescName("产品类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtCode");
eiColumn.setDescName("产品编码");
eiMetadata.addMeta(eiColumn);
......@@ -186,7 +187,7 @@ public class THPSC002 extends DaoEPBase {
/**
* the constructor
*/
public THPSC002() {
public HPSC002() {
initMetaData();
}
......@@ -356,6 +357,21 @@ public class THPSC002 extends DaoEPBase {
}
/**
* get the prdtType - 产品类型
* @return the prdtType
*/
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtType - 产品类型
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码
* @return the prdtCode
*/
......@@ -626,6 +642,7 @@ public class THPSC002 extends DaoEPBase {
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("leaf")), leaf));
setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("sort")), sort));
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("icon")), icon));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get("prdtType")), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtCode")), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtName")), prdtName));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get("num")), num));
......@@ -662,6 +679,7 @@ public class THPSC002 extends DaoEPBase {
map.put("leaf", StringUtils.toString(leaf, eiMetadata.getMeta("leaf")));
map.put("sort", StringUtils.toString(sort, eiMetadata.getMeta("sort")));
map.put("icon", StringUtils.toString(icon, eiMetadata.getMeta("icon")));
map.put("prdtType", StringUtils.toString(prdtType, eiMetadata.getMeta("prdtType")));
map.put("prdtCode", StringUtils.toString(prdtCode, eiMetadata.getMeta("prdtCode")));
map.put("prdtName", StringUtils.toString(prdtName, eiMetadata.getMeta("prdtName")));
map.put("num", StringUtils.toString(num, eiMetadata.getMeta("num")));
......
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:THpsc002a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-25 16:47:50 create
*/
public class HPSC002A 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_DEPT_CODE = "deptCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
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"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_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 = "HPSC002A.query";
public static final String COUNT = "HPSC002A.count";
public static final String INSERT = "HPSC002A.insert";
public static final String UPDATE = "HPSC002A.update";
public static final String DELETE = "HPSC002A.delete";
private Long id = null; /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/
private Long matId = null; /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/
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("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPT_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_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 HPSC002A() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the deptCode - 部门编码 预留.
* @return the deptCode
*/
public String getDeptCode() {
return this.deptCode;
}
/**
* set the deptCode - 部门编码 预留.
*
* @param deptCode - 部门编码 预留
*/
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 修改人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
* @param updatedBy - 修改人
*/
public void setUpdatedBy(String updatedBy) {
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 - 修改时间.
*
* @param updatedTime - 修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* 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));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_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;
}
}
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:THPSC002B.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-01-25 16:47:50 create
*/
public class HPSC002B 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_DEPT_CODE = "deptCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
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"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_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 = "HPSC002B.query";
public static final String COUNT = "HPSC002B.count";
public static final String INSERT = "HPSC002B.insert";
public static final String UPDATE = "HPSC002B.update";
public static final String DELETE = "HPSC002B.delete";
private Long id = null; /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/
private Long matId = null; /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/
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("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPT_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_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 HPSC002B() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the deptCode - 部门编码 预留.
* @return the deptCode
*/
public String getDeptCode() {
return this.deptCode;
}
/**
* set the deptCode - 部门编码 预留.
*
* @param deptCode - 部门编码 预留
*/
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
/**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 修改人.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
* @param updatedBy - 修改人
*/
public void setUpdatedBy(String updatedBy) {
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 - 修改时间.
*
* @param updatedTime - 修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* 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));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
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_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_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;
}
}
......@@ -27,6 +27,7 @@ public class HPSC003 extends DaoEPBase {
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PLAN_INFO_NO = "planInfoNo"; /* 生产计划单号*/
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_PLAN_COMPLETION_DATE = "planCompletionDate"; /* 计划完成日期*/
......@@ -45,6 +46,7 @@ public class HPSC003 extends DaoEPBase {
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目编码*/
public static final String COL_PLAN_INFO_NO = "PLAN_INFO_NO"; /* 生产计划单号*/
public static final String COL_PRDT_TYPE = "PROJ_TYPE"; /* 项目类型*/
public static final String COL_PRDT_CODE = "PRDT_CODE"; /* 产品编码*/
public static final String COL_PRDT_NAME = "PRDT_NAME"; /* 产品名称*/
public static final String COL_PLAN_COMPLETION_DATE = "PLAN_COMPLETION_DATE"; /* 计划完成日期*/
......@@ -68,6 +70,7 @@ public class HPSC003 extends DaoEPBase {
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String planInfoNo = " "; /* 生产计划单号*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private String planCompletionDate = " "; /* 计划完成日期*/
......@@ -112,6 +115,10 @@ public class HPSC003 extends DaoEPBase {
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);
......@@ -259,6 +266,18 @@ public class HPSC003 extends DaoEPBase {
public void setPlanInfoNo(String planInfoNo) {
this.planInfoNo = planInfoNo;
}
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
......@@ -433,6 +452,7 @@ public class HPSC003 extends DaoEPBase {
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPlanInfoNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_INFO_NO)), planInfoNo));
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));
setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
......@@ -461,6 +481,7 @@ public class HPSC003 extends DaoEPBase {
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PLAN_INFO_NO, StringUtils.toString(planInfoNo, eiMetadata.getMeta(FIELD_PLAN_INFO_NO)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_PLAN_COMPLETION_DATE, StringUtils.toString(planCompletionDate, eiMetadata.getMeta(FIELD_PLAN_COMPLETION_DATE)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
......
......@@ -34,6 +34,7 @@ public class HPSC004 extends DaoEPBase {
public static final String FIELD_LEAF = "leaf"; /* 是否有叶子节点*/
public static final String FIELD_SORT = "sort"; /* 排序字段*/
public static final String FIELD_ICON = "icon"; /* 图片地址*/
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_NUM = "num"; /* 数量*/
......@@ -61,6 +62,7 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
public static final String COL_PROJ_TYPE = "PROJ_TYPE"; /* 项目编码*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PARENT_PRDT_CODE = "PARENT_PRDT_CODE"; /* 父节点-产品编码*/
......@@ -69,6 +71,7 @@ public class HPSC004 extends DaoEPBase {
public static final String COL_LEAF = "LEAF"; /* 是否有叶子节点*/
public static final String COL_SORT = "SORT"; /* 排序字段*/
public static final String COL_ICON = "ICON"; /* 图片地址*/
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_NUM = "NUM"; /* 数量*/
......@@ -110,6 +113,7 @@ public class HPSC004 extends DaoEPBase {
private String leaf = "1"; /* 是否有叶子节点*/
private String sort = " "; /* 排序字段*/
private String icon = " "; /* 图片地址*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private BigDecimal num = new BigDecimal(0.000); /* 数量*/
......@@ -185,6 +189,10 @@ public class HPSC004 extends DaoEPBase {
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);
......@@ -476,6 +484,22 @@ public class HPSC004 extends DaoEPBase {
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public String getPrdtCode() {
return this.prdtCode;
}
......@@ -859,6 +883,7 @@ public class HPSC004 extends DaoEPBase {
setLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEAF)), leaf));
setSort(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SORT)), sort));
setIcon(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ICON)), icon));
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));
setNum(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_NUM)), num));
......@@ -902,6 +927,7 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_LEAF, StringUtils.toString(leaf, eiMetadata.getMeta(FIELD_LEAF)));
map.put(FIELD_SORT, StringUtils.toString(sort, eiMetadata.getMeta(FIELD_SORT)));
map.put(FIELD_ICON, StringUtils.toString(icon, eiMetadata.getMeta(FIELD_ICON)));
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_NUM, StringUtils.toString(num, eiMetadata.getMeta(FIELD_NUM)));
......
......@@ -27,6 +27,7 @@ public class HPSC005 extends DaoEPBase {
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_PLAN_COMPLETION_DATE = "planCompletionDate"; /* 计划完成日期*/
......@@ -51,6 +52,7 @@ public class HPSC005 extends DaoEPBase {
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_PLAN_COMPLETION_DATE = "PLAN_COMPLETION_DATE"; /* 计划完成日期*/
......@@ -82,6 +84,7 @@ public class HPSC005 extends DaoEPBase {
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String productionOrderNo = " "; /* 生产订单号*/
private Integer prdtType = 0; /*产品类型*/
private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/
private String planCompletionDate = " "; /* 计划完成日期*/
......@@ -128,6 +131,10 @@ public class HPSC005 extends DaoEPBase {
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);
......@@ -299,6 +306,22 @@ public class HPSC005 extends DaoEPBase {
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public Integer getPrdtType() {
return this.prdtType;
}
/**
* set the prdtCode - 产品编码.
*
* @param prdtCode - 产品编码
*/
public void setPrdtType(Integer prdtType) {
this.prdtType = prdtType;
}
/**
* get the prdtCode - 产品编码.
* @return the prdtCode
*/
public String getPrdtCode() {
return this.prdtCode;
}
......@@ -613,6 +636,7 @@ public class HPSC005 extends DaoEPBase {
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));
setPlanCompletionDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_COMPLETION_DATE)), planCompletionDate));
......@@ -646,6 +670,7 @@ public class HPSC005 extends DaoEPBase {
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_PLAN_COMPLETION_DATE, StringUtils.toString(planCompletionDate, eiMetadata.getMeta(FIELD_PLAN_COMPLETION_DATE)));
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.THPSC002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat;
......@@ -27,9 +27,13 @@ public class ServiceHPSC001 extends ServiceBase {
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THPSC001 hpsc001 = new THPSC001();
EiInfo outInfo = super.initLoad(inInfo, hpsc001);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpsc001.eiMetadata);
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
......@@ -40,7 +44,7 @@ public class ServiceHPSC001 extends ServiceBase {
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new THPSC001());
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
return outInfo;
}
......@@ -51,7 +55,7 @@ public class ServiceHPSC001 extends ServiceBase {
@Override
public EiInfo insert(EiInfo inInfo) {
try {
THPSC001 hpsc001 = new THPSC001();
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
......@@ -79,7 +83,7 @@ public class ServiceHPSC001 extends ServiceBase {
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THPSC001 hpsc001 = new THPSC001();
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
......@@ -102,7 +106,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001();
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
......@@ -129,7 +133,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 审核 反审.
*/
public EiInfo check(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001();
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
......@@ -158,7 +162,7 @@ public class ServiceHPSC001 extends ServiceBase {
public void buildHPSC002(EiInfo eiInfo) {
THPSC001 hpsc001 = new THPSC001();
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
List rows = new ArrayList();
for (int i = 0; i < eiBlock.getRowCount(); i++) {
......
package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.hpjx.hp.sc.domain.THPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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.service.soa.XLocalManager;
import com.baosight.iplat4j.core.util.DateUtil;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.text.DecimalFormat;
......@@ -31,9 +37,12 @@ public class ServiceHPSC002 extends ServiceBase {
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THPSC002 hppz002 = new THPSC002();
EiInfo outInfo = super.initLoad(inInfo, hppz002);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hppz002.eiMetadata);
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
......@@ -44,7 +53,7 @@ public class ServiceHPSC002 extends ServiceBase {
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC002.query", new THPSC002());
EiInfo outInfo = super.query(inInfo, "HPSC002.query", new HPSC002());
//调用本地服务
// EiInfo eiInfo_update = new EiInfo();
// eiInfo_update.set(EiConstant.serviceName, "HPSC002");
......@@ -62,7 +71,7 @@ public class ServiceHPSC002 extends ServiceBase {
public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THPSC002 hppz002 = new THPSC002();
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
......@@ -79,6 +88,9 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002.setCreatedTime(sdf.format(new Date()));
hppz002.setUpdatedBy(null);
hppz002.setUpdatedTime(null);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentPrdtCode().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
this.dao.insert("HPSC002.insert", hppz002.toMap());
if (!hppz002.getParentPrdtCode().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentPrdtCode()));
......@@ -104,7 +116,7 @@ public class ServiceHPSC002 extends ServiceBase {
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
THPSC002 hppz002 = new THPSC002();
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
......@@ -129,7 +141,7 @@ public class ServiceHPSC002 extends ServiceBase {
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
THPSC002 hppz002 = new THPSC002();
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
......@@ -152,6 +164,25 @@ public class ServiceHPSC002 extends ServiceBase {
return eiInfo;
}
/**
* 指定树节点
* @param inInfo
* @return
*/
public EiInfo queryTreeRoot(EiInfo inInfo) {
Long projId = NumberUtils.toLong(inInfo.get("projId"));
Map queryMap = new HashMap();
String root = "";
if (projId != null) {
Map map = new HashMap();
map.put("id", projId);
HPSC001 HPSC001 = (com.baosight.hpjx.hp.sc.domain.HPSC001) dao.get("HPSC001.queryDomainById", "id",projId);
root = HPSC001.getProjCode() + ":" + HPSC001.getProjName();
}
inInfo.set("root",root);
return inInfo;
}
//树查询服务
public EiInfo queryTreeNode(EiInfo inInfo) {
//1 获取参数
......@@ -164,7 +195,7 @@ public class ServiceHPSC002 extends ServiceBase {
map.put("id", projId);
List list = dao.query("HPSC001.queryDomainById", map);
if (list.size() > 0) {
String projCode = ((THPSC001)list.get(0)).getProjCode();
String projCode = ((HPSC001)list.get(0)).getProjCode();
queryMap.put("projCode", projCode);
}
}
......@@ -202,7 +233,7 @@ public class ServiceHPSC002 extends ServiceBase {
* 审核 反审.
*/
public EiInfo check(EiInfo eiInfo) {
THPSC002 hppz002 = new THPSC002();
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
......@@ -211,7 +242,7 @@ public class ServiceHPSC002 extends ServiceBase {
//限制一下,如果二级已经审核通过,这个时候不允许进行反审
if(map.get("status").equals("0")) {
//找到二级是否已经审核
THPSC002 THPSC002 = (THPSC002) dao.get("HPSC002.query","id",hppz002.getId());
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.query","id",hppz002.getId());
if (THPSC002.getStatus() == 1) {
// 二级如果已经审核了则需要去看看计划是否已经更新
}
......@@ -223,7 +254,7 @@ public class ServiceHPSC002 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hppz002.fromMap(map);
THPSC002 THPSC002 = (THPSC002) dao.get("HPSC002.query","id",hppz002.getId());
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.query","id",hppz002.getId());
Map map1 = new HashMap();
map1.put("parentPrdtCode",THPSC002.getParentPrdtCode());
List list = dao.query("HPSC002.checkExamineNum", map1);
......@@ -240,6 +271,31 @@ public class ServiceHPSC002 extends ServiceBase {
map2.put("id",THPSC002.getParentPrdtCode());
}
this.dao.update("HPSC002.check",map2);
//处理项目管理中物料状态
Map map3 = new HashMap();
map3.put("projCode",THPSC002.getProjCode());
List list1 = dao.query("HPSC002.checkExamineNum1", map3);
List list2 = dao.query("HPSC002.checkExamineNum1Count", map3);
//未审核数量
int num1 = NumberUtils.toint(list1.get(0));
//总量
int num2 = NumberUtils.toint(list2.get(0));
if (num1 == 0) {
//都已经审核
Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",2);
this.dao.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分审批
Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",1);
this.dao.update("HPSC001.checkByProjCode",map4);
}
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
......@@ -253,12 +309,11 @@ public class ServiceHPSC002 extends ServiceBase {
return eiInfo;
}
/**
* 审核 反审.
* 绑定附件
*/
public EiInfo bindDocIdById(EiInfo eiInfo) {
THPSC002 hppz002 = new THPSC002();
HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
......@@ -288,8 +343,8 @@ public class ServiceHPSC002 extends ServiceBase {
*/
public void autoPlanInfo(String id) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
THPSC002 THPSC002 = (THPSC002) dao.get("HPSC002.query","id",id);
String SCJHD = "SCJH" + DateUtil.getDateTime("yyyMMddHHmmss",new Date());
HPSC002 THPSC002 = (HPSC002) dao.get("HPSC002.query","id",id);
String SCJHD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
//生成生产计划t_hpsc003
HPSC003 HPSC003 = new HPSC003();
HPSC003.setCompanyCode("");
......@@ -297,6 +352,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003.setProjCode(THPSC002.getProjCode());
HPSC003.setProjName(THPSC002.getProjName());
HPSC003.setPlanInfoNo(SCJHD);
HPSC003.setPrdtType(THPSC002.getPrdtType());
HPSC003.setPrdtCode(THPSC002.getPrdtCode());
HPSC003.setPrdtName(THPSC002.getPrdtName());
HPSC003.setPlanCompletionDate("");
......@@ -312,26 +368,23 @@ public class ServiceHPSC002 extends ServiceBase {
//生产计划详情
Map queryMap = new HashMap();
queryMap.put("id", id);
List rows = this.dao.query("HPSC002.queryTreeNodeByParentPrtdCode", queryMap);
List<HPSC002> rows = this.dao.query("HPSC002.queryEntityByParentPrtdCode", queryMap);
for (int i = 0; i < rows.size(); i++) {
Map domain = (Map)rows.get(i);
HPSC002 HPSC002 = rows.get(i);
HPSC004 HPSC004 = new HPSC004();
HPSC004.setCompanyCode("");
HPSC004.setDeptCode("");
HPSC004.setProjCode(StringUtils.toString(domain.get("projCode")));
HPSC004.setProjName(StringUtils.toString(domain.get("projName")));
HPSC004.setProjCode(HPSC002.getProjCode());
HPSC004.setProjName(HPSC002.getProjName());
HPSC004.setParentPrdtCode(StringUtils.toString(ent.getId()));
HPSC004.setParentPrdtName(StringUtils.toString(domain.get("parentPrdtName")));
HPSC004.setPrdtCode(StringUtils.toString(domain.get("prdtCode")));
HPSC004.setPrdtName(StringUtils.toString(domain.get("prdtName")));
HPSC004.setNum(NumberUtils.toBigDecimal(domain.get("num")));
HPSC004.setUnitWt(NumberUtils.toBigDecimal(domain.get("unitWt")));
HPSC004.setFilePath1(StringUtils.toString(domain.get("filePath1")));
HPSC004.setFilePath2(StringUtils.toString(domain.get("filePath2")));
HPSC004.setFilePath3(StringUtils.toString(domain.get("filePath3")));
HPSC004.setFilePath4(StringUtils.toString(domain.get("filePath4")));
HPSC004.setFilePath5(StringUtils.toString(domain.get("filePath5")));
HPSC004.setParentPrdtName(HPSC002.getParentPrdtName());
HPSC004.setPrdtType(HPSC002.getPrdtType());
HPSC004.setPrdtCode(HPSC002.getPrdtCode());
HPSC004.setPrdtName(HPSC002.getPrdtName());
HPSC004.setNum(HPSC002.getNum());
HPSC004.setUnitWt(HPSC002.getUnitWt());
HPSC004.setFilePath1(HPSC002.getId().toString());
HPSC004.setPlanCommentDate("");
HPSC004.setPlanCompletionDate("");
HPSC004.setActualCompletionNum(NumberUtils.toBigDecimal(0.00));
......
package com.baosight.hpjx.hp.sc.service;
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.HPKC002;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
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.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.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPSC002A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
// 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC002A.QUERY, new HPSC002A());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPSC002A fSc002A = new HPSC002A();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.insert(HPSC002A.INSERT, fSc002A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPSC002A fSc002A = new HPSC002A();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.update(HPSC002A.DELETE, fSc002A);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002B;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
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.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public class ServiceHPSC002B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
// 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002B().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC002B.QUERY, new HPSC002B());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPSC002B fSc002A = new HPSC002B();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.insert(HPSC002B.INSERT, fSc002A);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPSC002B fSc002A = new HPSC002B();
fSc002A.fromMap(resultRows.get(i));
DaoUtils.update(HPSC002B.DELETE, fSc002A);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
......@@ -11,6 +12,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.DateUtil;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -195,10 +197,11 @@ public class ServiceHPSC003 extends ServiceBase {
for (int i = 0; i < list.size(); i ++) {
HPSC004 HPSC004 = (HPSC004) list.get(i);
HPSC005 HPSC005 = new HPSC005();
String SCDD = "SCDD" + DateUtil.getDateTime("yyyMMddHHmmss",new Date()) + generateFixedLengthRandomNumber(4);
String SCDD = SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPSC003_PROD_NO);
HPSC005.setProjCode(HPSC003.getProjCode());
HPSC005.setProjName(HPSC003.getProjName());
HPSC005.setProductionOrderNo(SCDD);
HPSC005.setPrdtType(HPSC004.getPrdtType());
HPSC005.setPrdtCode(HPSC004.getPrdtCode());
HPSC005.setPrdtName(HPSC004.getPrdtName());
HPSC005.setPlanCompletionDate(HPSC004.getPlanCompletionDate());
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import java.text.SimpleDateFormat;
import java.util.*;
/**
......@@ -22,9 +21,13 @@ public class ServiceHPSC011 extends ServiceBase {
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
THPSC001 hpsc001 = new THPSC001();
EiInfo outInfo = super.initLoad(inInfo, hpsc001);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(hpsc001.eiMetadata);
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
......@@ -36,7 +39,7 @@ public class ServiceHPSC011 extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new THPSC001());
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
return outInfo;
}
......
......@@ -21,7 +21,7 @@
<sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......@@ -35,7 +35,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......@@ -43,12 +44,24 @@
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME desc
......@@ -63,6 +76,27 @@
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
</select>
<!--
......@@ -116,13 +150,14 @@
PRINC1, <!-- 本公司项目负责人 -->
PRINC2, <!-- 客户项目负责人 -->
STATUS, <!-- 状态 0-未审核,1-已审核 -->
MATERIAL_STATUS,
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
......@@ -139,7 +174,8 @@
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRINC1 = #princ1#, <!-- 本公司项目负责人 -->
PRINC2 = #princ2#, <!-- 客户项目负责人 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
STATUS = #status#, <!-- 状态 0-未审核,1-已审核 -->
MATERIAL_STATUS = #materialStatus#,
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
......@@ -168,9 +204,13 @@
UPDATE hpjx.t_hpsc001 SET status = #status# WHERE ID = #id#
</update>
<update id="checkByProjCode">
UPDATE hpjx.t_hpsc001 SET MATERIAL_STATUS = #materialStatus# WHERE PROJ_CODE = #projCode#
</update>
<select id="queryDomainById" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......
......@@ -36,7 +36,7 @@
<sqlMap namespace="HPSC002">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC002">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
......@@ -49,6 +49,7 @@
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
......@@ -68,12 +69,19 @@
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_PRDT_CODE NOT IN ('root')
AND DEL_STATUS = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode">
PARENT_PRDT_CODE = #parentPrdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
......@@ -93,12 +101,29 @@
<select id="count" resultClass="int">
SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_PRDT_CODE NOT IN ('root')
AND DEL_STATUS = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtCode">
PARENT_PRDT_CODE = #parentPrdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$#prdtName#$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</select>
<!--
......@@ -200,6 +225,7 @@
LEAF, <!-- 是否有叶子节点 -->
SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
NUM, <!-- 数量 -->
......@@ -218,7 +244,7 @@
UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
</insert>
<delete id="delete">
......@@ -239,7 +265,8 @@
LEAF = #leaf#, <!-- 是否有叶子节点 -->
SORT = #sort#, <!-- 排序字段 -->
ICON = #icon#, <!-- 图片地址 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_TYPE = #prdtType#,
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
NUM = #num#, <!-- 数量 -->
UNIT_WT = #unitWt#, <!-- 单重 -->
......@@ -264,6 +291,7 @@
<select id="queryTree" resultClass="java.util.HashMap">
SELECT
ID as "nodeId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 项目编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PRDT_name as "prdtName", <!-- 项目编码 -->
......@@ -301,6 +329,43 @@
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
DEL_STATUS as "delStatus", <!-- 状态 1未删除,0已删除 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE PARENT_PRDT_CODE = #id#
</select>
<select id="queryEntityByParentPrtdCode" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PARENT_PRDT_CODE as "parentPrdtCode", <!-- 父节点-产品编码 -->
PARENT_PRDT_NAME as "parentPrdtName", <!-- 父节点-产品名称 -->
TYPE as "type", <!-- 类别 -->
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
......@@ -334,6 +399,25 @@
</update>
<select id="checkExamineNum1" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1
AND PARENT_PRDT_CODE != 'root'
AND `STATUS` = 0
<isNotEmpty prepend=" AND " property="parentPrdtCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="checkExamineNum1Count" resultClass="int">
SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1
AND PARENT_PRDT_CODE != 'root'
<isNotEmpty prepend=" AND " property="parentPrdtCode">
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select id="checkExamineNum" resultClass="int">
SELECT COUNT(1) FROM hpjx.t_hpsc002
WHERE LEAF = '1'
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC002A">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
A.DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC002A WHERE ID = #id#
</delete>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC002B">
<sql id="column">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 修改时间 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
A.DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
A.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
A.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
A.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
A.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
A.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
A.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#depositDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#depositDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$orderBy$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002B">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPSC002B A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002B A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002B (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPSC002B WHERE ID = #id#
</delete>
</sqlMap>
......@@ -42,6 +42,9 @@
<isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
......@@ -83,6 +86,7 @@
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PLAN_INFO_NO as "planInfoNo", <!-- 生产计划单号 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
......@@ -174,6 +178,7 @@
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PLAN_INFO_NO, <!-- 生产计划单号 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
......@@ -185,7 +190,7 @@
DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert>
<delete id="delete">
......@@ -201,6 +206,7 @@
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目编码 -->
PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
......
......@@ -74,6 +74,9 @@
<isNotEmpty prepend=" AND " property="icon">
ICON = #icon#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
......@@ -159,6 +162,7 @@
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
NUM as "num", <!-- 数量 -->
......@@ -313,6 +317,7 @@
LEAF, <!-- 是否有叶子节点 -->
SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
NUM, <!-- 数量 -->
......@@ -336,7 +341,7 @@
UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentPrdtCode#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
</insert>
<delete id="delete">
......@@ -357,6 +362,7 @@
LEAF = #leaf#, <!-- 是否有叶子节点 -->
SORT = #sort#, <!-- 排序字段 -->
ICON = #icon#, <!-- 图片地址 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
NUM = #num#, <!-- 数量 -->
......
......@@ -47,6 +47,9 @@
<isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO like CONCAT('%', #productionOrderNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
......@@ -114,6 +117,7 @@
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
......@@ -217,6 +221,7 @@
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRODUCTION_ORDER_NO, <!-- 生产订单号 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PLAN_COMPLETION_DATE, <!-- 计划完成日期 -->
......@@ -237,7 +242,7 @@
FILE_PATH4, <!-- 文件地址4 -->
FILE_PATH5 <!-- 文件地址5 -->
)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#)
</insert>
<delete id="delete">
......@@ -252,6 +257,7 @@
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRODUCTION_ORDER_NO = #productionOrderNo#, <!-- 生产订单号 -->
PRDT_TYPE = #prdtType#,
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
......
......@@ -21,21 +21,22 @@
<sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.THPSC001">
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC001">
SELECT
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRINC1 as "princ1", <!-- 本公司项目负责人 -->
PRINC2 as "princ2", <!-- 客户项目负责人 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_TYPE as "projType", <!-- 项目类型 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRINC1 as "princ1", <!-- 本公司项目负责人 -->
PRINC2 as "princ2", <!-- 客户项目负责人 -->
STATUS as "status", <!-- 状态 0-未审核,1-已审核 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......@@ -43,12 +44,24 @@
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME desc
......@@ -63,6 +76,27 @@
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ1">
PRINC1 = #princ1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="princ2">
PRINC2 = #princ2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus#
</isNotEmpty>
</select>
<!--
......
......@@ -4,13 +4,12 @@ import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC008;
import com.baosight.hpjx.hp.sc.domain.THPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.zl.domain.HPZL001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
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.service.impl.ServiceBase;
......@@ -73,7 +72,7 @@ public class ServiceHPZL001 extends ServiceBase {
// 项目名称
Map params1 = new HashMap<>();
params1.put("itemCode", fZl001.getItemCode());
List<THPSC001> query1 = dao.query("HPSC001.query", params1);
List<HPSC001> query1 = dao.query("HPSC001.query", params1);
fZl001.setItemName(query1.get(0).getProjName());
// 生成单据号
fZl001.setChkBillno(SequenceGenerator.getNextSequence(
......@@ -106,7 +105,7 @@ public class ServiceHPZL001 extends ServiceBase {
// 项目名称
Map params1 = new HashMap<>();
params1.put("itemCode", fZl001.getItemCode());
List<THPSC001> query1 = dao.query("HPSC001.query", params1);
List<HPSC001> query1 = dao.query("HPSC001.query", params1);
fZl001.setItemName(query1.get(0).getProjName());
DaoUtils.update("HPZL001.update", fZl001);
}
......
......@@ -25,7 +25,7 @@ public class LogUtils {
* @param title 标题
* @return
*/
public static void setDetailMsg(EiInfo inInfo, Exception e, String title) {
public static void setDetailMsg(EiInfo inInfo, Throwable e, String title) {
title = StringUtils.isEmpty(title) ? "服务异常" : title;
// 打印日志
print(e, title);
......@@ -58,7 +58,7 @@ public class LogUtils {
* @param title 标题
* @return
*/
public static void setMsg(EiInfo inInfo, Exception e, String title) {
public static void setMsg(EiInfo inInfo, Throwable e, String title) {
title = StringUtils.isEmpty(title) ? "服务异常" : title;
// 打印日志
print(e, title);
......@@ -86,7 +86,7 @@ public class LogUtils {
* @param e 异常堆栈
* @param title 标题
*/
private static void print(Exception e, String title) {
private static void print(Throwable e, String title) {
if (e != null) {
logger.error(title.concat(":{}"), e.getMessage(), e);
}
......
......@@ -103,8 +103,11 @@ let productionOrderQueryCallback = function (row) {
var rowsdata = resultGrid.getCheckedRows();
resultGrid.setCellValue(0, "productionOrderNo", row[i]["productionOrderNo"]);
resultGrid.setCellValue(0, "amount", row[i]["numRK"]);
resultGrid.setCellValue(0, "weight", row[i]["totalWtRK"]);
resultGrid.setCellValue(0, "amount", row[i]["num"]);
resultGrid.setCellValue(0, "weight", row[i]["totalWt"]);
resultGrid.setCellValue(0, "inventType", row[i]["prdtType"]);
resultGrid.setCellValue(0, "inventCode", row[i]["prdtCode"]);
resultGrid.setCellValue(0, "inventName", row[i]["prdtName"]);
lists[i] = i;
}
resultGrid.setCheckedRows(lists);
......
......@@ -27,22 +27,23 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<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"
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField" readonly="true"
align="center" filter="contains" width="100">
</EF:EFComboColumn>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="存货名称" ename="inventCode" width="120" align="center"/>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}" enable="false"
sumType="all"/>
sumType="all" readonly="true"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}" enable="false"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea"/>
sumType="all" readonly="true"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="存货代码" ename="inventCode" width="120" align="center" enable="false"/>
<EF:EFColumn cname="存货名称" ename="inventName" width="120" align="center" enable="false"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea" readonly="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']"/>
......
......@@ -29,6 +29,14 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
......@@ -58,7 +66,7 @@
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
<EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
<p class="text-info"><span style='color: red;'>注:差异数量=实物数量-账面数量;差异重量=实物重量-账面重量 </span></p>
......
......@@ -8,8 +8,6 @@
<EF:EFPage title="库存查询">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
......@@ -22,8 +20,6 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
......
......@@ -29,6 +29,16 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
......@@ -50,8 +60,8 @@
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="100" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -29,6 +29,16 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
......@@ -59,7 +69,7 @@
align="right" sumType="all" required="true"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
<EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -8,8 +8,6 @@
<EF:EFPage title="库存查询">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
......@@ -22,8 +20,6 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
......
......@@ -34,37 +34,65 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn cname="库存类型" ename="kcType" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.kcType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="日期" ename="dateProc" enable="false" width="90" align="center"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" enable="false" width="90" align="center">
<EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="仓库名称" ename="whCode" enable="false" width="100" align="center"
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn cname="存货名称" ename="inventCode" enable="false" width="100" align="center"
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="100" align="center"
blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn cname="规格" ename="spec" enable="false" width="120"/>
<EF:EFColumn cname="期初数量" ename="initAmount" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center"
blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="initAmount" cname="期初数量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="initWeight" cname="期初重量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterAmount" cname="采购入库数量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scEnterAmount" cname="生产入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scEnterWeight" cname="生产入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterWeight" cname="入库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="xsOuterAmount" cname="销售出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="xsOuterWeight" cname="销售出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="期初重量" ename="initWeight" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="qtOuterWeight" cname="其它出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="入库数量" ename="stockinAmount" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="入库重量" ename="stockinWeight" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="outerWeight" cname="出库重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="出库数量" ename="stockoutAmount" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="出库重量" ename="stockoutWeight" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="期末数量" ename="endAmount" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="期末重量" ename="endWeight" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="endWeight" cname="期末重量" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -36,11 +36,10 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<EF:EFColumn enable="false" ename="prdtType" cname="部件类型"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn ename="numRK" cname="入库数量" format="{0:N3}"/>
<EF:EFColumn ename="totalWtRK" cname="入库重量" format="{0:N3}"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/>
......
......@@ -20,10 +20,11 @@ $(function () {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >审核</a>';
} else {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >反审</a>';
}
// else if (auditStatus == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
// 'onclick="check(' + item.id + ',0)" >反审</a>';
// }
return template;
}
}
......
......@@ -17,11 +17,20 @@
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFSelect cname="单据状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="单据状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFSelect>
<EF:EFSelect cname="项目负责人" ename="inqu_status-0-princ1" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="客户负责人" ename="inqu_status-0-princ2" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
......@@ -30,18 +39,26 @@
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#">
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" enable="false" cname="项目编码"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称"/>
<EF:EFColumn required="true" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn required="true" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn required="true" align="center" ename="status" cname="状态" defaultValue="0">
<EF:EFColumn ename="projCode" enable="false" cname="项目编码" readonly="true"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态" readonly="true">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注"/>
<EF:EFColumn ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
let inventNameGlobalData = [];
// 传递参数 将附件ID与当前记录ID进行绑定
let rowId = '';
let parentPrdtCode = '';
......@@ -45,15 +46,14 @@ $(function () {
IPLATUI.EFTree.materialTree.selectTreeNode.projName = nodeData.projName;
// 重新查询EFGrid
parentPrdtCode = nodeData.nodeId;
resultGrid.dataSource.page(1);
query();
},
selectTreeNode: {}
}
};
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
query();
});
......@@ -80,10 +80,11 @@ $(function () {
},
query: function () {
var ei = new EiInfo();
ei.set("inqu_status-0-projName",$("#inqu_status-0-projName").val());
ei.set("inqu_status-0-prdtName",$("#inqu_status-0-prdtName").val());
ei.set("inqu_status-0-prdtType",$("#inqu_status-0-prdtType").val());
ei.set("inqu_status-0-prdtCode",$("#inqu_status-0-prdtCode").val());
ei.set("inqu_status-0-status",$("#inqu_status-0-status").val());
ei.set("inqu_status-0-parentPrdtCode",parentPrdtCode);
ei.set("inqu_status-0-parentPrdtCode",parentPrdtCode? parentPrdtCode : strs[1]);
return ei;
},
/**
......@@ -108,7 +109,7 @@ $(function () {
* e.preventDefault 阻止事件发生
*/
beforeAdd: function (e) {
var logic = Object.keys(IPLATUI.EFTree.materialTree.selectTreeNode).length === 0;
var logic = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId ? false : true;
if (logic) { // 通过业务逻辑判断, 控制是否进行新增
IPLAT.alert({
message: '<b>请选择项目列表</b>',
......@@ -181,18 +182,14 @@ $(function () {
template: function (item) {
console.log(item)
let auditStatus = item.status;
let filePath1 = item.filePath1;
let leaf = item.leaf
let template = '';
if (filePath1 === ' ') {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
} else {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'href="'+ctx+'/EU/DM/EUDM06.jsp?docId=' + filePath1 + '" >下载</a>';
}
if (leaf === '1') {
if (auditStatus == 0) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
if (leaf === '1') {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="check(' + item.id + ',1)" >审核</a>';
} else {
......@@ -202,6 +199,42 @@ $(function () {
}
return template;
}
},{
field: "prdtCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['prdtCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["prdtType"]);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
}
}
],
},
......@@ -214,12 +247,15 @@ $(function () {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
if (isBlank(uploadFile)) {
return;
}
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-filePath1", uploadFile);
EiCommunicator.send('HPSC002', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
......@@ -232,13 +268,68 @@ $(function () {
},
}
};
//产品类型下拉联动
$('input[name="inqu_status-0-prdtType"]').change(function () {
var inInfo=new EiInfo();
var prdtType=$("#inqu_status-0-prdtType").val();
inInfo.set("inventType",prdtType);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-prdtCode");
dataEdition=ei.getBlock("invent_name_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataEdition,
template: "#=textField#"
});
}, onFail: function (ei) {
}
}, {async: false});
});
});
$(window).load(function () {
// 存货名称
let inInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function openUploadFile(id) {
uploadFileWindow.open().center();
rowId = id;
}
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
function check(id, auditStatus) {
const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
......@@ -246,7 +337,7 @@ function check(id, auditStatus) {
EiCommunicator.send('HPSC002', 'check', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
resultGrid.dataSource.page(1);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
......@@ -256,4 +347,4 @@ function check(id, auditStatus) {
async: false
}
);
}
\ No newline at end of file
}
......@@ -10,14 +10,21 @@
<EF:EFPage title="物料清单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="projName" cname="项目名称" blockId="inqu_status" row="0"/>
<EF:EFInput ename="prdtName" cname="产品名称" blockId="inqu_status" row="0"/>
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFSelect ename="inqu_status-0-prdtType" cname="产品类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="产品名称" filter="contains" required="false"
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
</EF:EFSelect>
</div>
<EF:EFInput ename="parentPrdtCode" blockId="inqu_status" hidden="true"/>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline">
......@@ -39,8 +46,11 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn ename="prdtCode" required="true" cname="产品编码"/>
<EF:EFColumn ename="prdtName" required="true" cname="产品名称"/>
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" required="true" cname="产品名称"/>
<%-- <EF:EFColumn ename="prdtName" required="true" cname="产品名称"/>--%>
<EF:EFColumn enable="false" ename="parentPrdtCode" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/>
......@@ -53,13 +63,6 @@
<EF:EFOption label="未审核" value="0"></EF:EFOption>
<EF:EFOption label="已审核" value="1"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFComboColumn enable="false" ename="delStatus" align="center"
columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField"
valueField="valueField" cname="删除标识">
<EF:EFOption label="未删除" value="1"></EF:EFOption>
<EF:EFOption label="删除" value="0"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.docId
+ '" >附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 查询
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "70%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", docId);
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC002A", "delete", true);
}
})
}
<!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">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="产品名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.filePath
+ '" >附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", uploadFile);
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 查询
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
*/
function uploadFile() {
uploadFileWindow.open().center();
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC002A", "delete", true);
}
})
}
<!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">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="产品名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</EF:EFPage>
......@@ -30,6 +30,9 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" 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="产品编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
......@@ -47,6 +50,9 @@
<EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" required='true' cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="部件名称"/>
<EF:EFComboColumn enable="false" ename="delStatus" cname="状态">
......
......@@ -25,6 +25,6 @@ $(function () {
});
function jump(id) {
var herf= ctx + "\\web\\"+ "HPSC002?id=" + id;
var herf= ctx + "\\web\\"+ "HPSC002?inqu_status-0-parentPrdtCode=" + id;
window.open(herf);
}
......@@ -21,7 +21,21 @@
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="物料审核状态" optionLabel="全部" ename="inqu_status-0-materialStatus" colWidth="3">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="部分审核" value="1"/>
<EF:EFOption label="全部审核" value="2"/>
</EF:EFSelect>
<EF:EFSelect cname="项目负责人" ename="inqu_status-0-princ1" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="客户负责人" ename="inqu_status-0-princ2" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
......@@ -37,10 +51,12 @@
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="princ1" cname="本公司项目负责人"/>
<EF:EFColumn enable="false" ename="princ2" cname="客户项目负责人"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态">
<EF:EFComboColumn required="true" align="center" ename="materialStatus" cname="物料审核状态" defaultValue="0">
<EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/>
<EF:EFOption label="部分审核" value="1"/>
<EF:EFOption label="全部审核" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
......
......@@ -7,7 +7,11 @@ $(function () {
$("#fileDocId").val(e.response.docId);
NotificationUtil("附件上传成功");
console.log($("#fileDocId").val())
try {
parent.JSColorbox.setValueCallback(e.response.docId);
} catch (e){
}
},
}
};
});
\ No newline at end of file
});
let rowId;
$(function() {
// 查询
......@@ -43,30 +42,6 @@ $(function() {
}]
}
};
// 关闭事件
IPLATUI.EFWindow = {
"uploadFile": {
close: function (e) {
let $iframe = uploadFileWindow.element.children("iframe");
let iframejQuery = $iframe[0].contentWindow.$; // 子窗口中的jQuery对象
let uploadFile = iframejQuery("#fileDocId").val();
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", rowId);
inEiInfo.set("result-0-affix", uploadFile);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
},
}
};
});
/**
......@@ -75,8 +50,29 @@ $(function() {
* @param id
*/
function openUploadFile(id) {
uploadFileWindow.open().center();
rowId = id;
JSColorbox.open({
href: "HPSC099?methodName=initLoad",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "70%",
callbackName: function (docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-affix", docId);
EiCommunicator.send('HPZL001', 'bindDocIdById', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
});
}
/**
......
......@@ -60,7 +60,4 @@
hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
</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