Commit e94ef759 by 宋祥

1.采购入库,综合库存管理

parent 381f81ae
......@@ -16,7 +16,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-11 16:45:56 create
* @history 2024-05-11 17:25:48 create
*/
public class HGCG001 extends DaoEPBase {
......@@ -47,8 +47,10 @@ public class HGCG001 extends DaoEPBase {
public static final String FIELD_WIDTH = "width"; /* 宽度*/
public static final String FIELD_THICK = "thick"; /* 厚度*/
public static final String FIELD_PLAN_QTY = "planQty"; /* 计划数量*/
public static final String FIELD_PLAN_UNIT_WEIGHT = "planUnitWeight"; /* 计划单重*/
public static final String FIELD_PLAN_WEIGHT = "planWeight"; /* 计划重量*/
public static final String FIELD_PUR_QTY = "purQty"; /* 采购数量*/
public static final String FIELD_PUR_UNIT_WEIGHT = "purUnitWeight"; /* 采购单重*/
public static final String FIELD_PUR_WEIGHT = "purWeight"; /* 采购重量*/
public static final String FIELD_STATUS = "status"; /* 状态:0-未审批,1-审核通过,2-审核未通过*/
public static final String FIELD_AUDIT_TIME = "auditTime"; /* 审核时间*/
......@@ -81,8 +83,10 @@ public class HGCG001 extends DaoEPBase {
public static final String COL_WIDTH = "WIDTH"; /* 宽度*/
public static final String COL_THICK = "THICK"; /* 厚度*/
public static final String COL_PLAN_QTY = "PLAN_QTY"; /* 计划数量*/
public static final String COL_PLAN_UNIT_WEIGHT = "PLAN_UNIT_WEIGHT"; /* 计划单重*/
public static final String COL_PLAN_WEIGHT = "PLAN_WEIGHT"; /* 计划重量*/
public static final String COL_PUR_QTY = "PUR_QTY"; /* 采购数量*/
public static final String COL_PUR_UNIT_WEIGHT = "PUR_UNIT_WEIGHT"; /* 采购单重*/
public static final String COL_PUR_WEIGHT = "PUR_WEIGHT"; /* 采购重量*/
public static final String COL_STATUS = "STATUS"; /* 状态:0-未审批,1-审核通过,2-审核未通过*/
public static final String COL_AUDIT_TIME = "AUDIT_TIME"; /* 审核时间*/
......@@ -121,8 +125,10 @@ public class HGCG001 extends DaoEPBase {
private BigDecimal width = new BigDecimal(0.000); /* 宽度*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚度*/
private BigDecimal planQty = new BigDecimal(0.000); /* 计划数量*/
private BigDecimal planUnitWeight = new BigDecimal(0.000); /* 计划单重*/
private BigDecimal planWeight = new BigDecimal(0.000); /* 计划重量*/
private BigDecimal purQty = new BigDecimal(0.000); /* 采购数量*/
private BigDecimal purUnitWeight = new BigDecimal(0.000); /* 采购单重*/
private BigDecimal purWeight = new BigDecimal(0.000); /* 采购重量*/
private Integer status; /* 状态:0-未审批,1-审核通过,2-审核未通过*/
private String auditTime = " "; /* 审核时间*/
......@@ -249,6 +255,13 @@ public class HGCG001 extends DaoEPBase {
eiColumn.setDescName("计划数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("计划单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
......@@ -263,6 +276,13 @@ public class HGCG001 extends DaoEPBase {
eiColumn.setDescName("采购数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("采购单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
......@@ -701,6 +721,22 @@ public class HGCG001 extends DaoEPBase {
this.planQty = planQty;
}
/**
* get the planUnitWeight - 计划单重.
* @return the planUnitWeight
*/
public BigDecimal getPlanUnitWeight() {
return this.planUnitWeight;
}
/**
* set the planUnitWeight - 计划单重.
*
* @param planUnitWeight - 计划单重
*/
public void setPlanUnitWeight(BigDecimal planUnitWeight) {
this.planUnitWeight = planUnitWeight;
}
/**
* get the planWeight - 计划重量.
* @return the planWeight
*/
......@@ -733,6 +769,22 @@ public class HGCG001 extends DaoEPBase {
this.purQty = purQty;
}
/**
* get the purUnitWeight - 采购单重.
* @return the purUnitWeight
*/
public BigDecimal getPurUnitWeight() {
return this.purUnitWeight;
}
/**
* set the purUnitWeight - 采购单重.
*
* @param purUnitWeight - 采购单重
*/
public void setPurUnitWeight(BigDecimal purUnitWeight) {
this.purUnitWeight = purUnitWeight;
}
/**
* get the purWeight - 采购重量.
* @return the purWeight
*/
......@@ -861,8 +913,10 @@ public class HGCG001 extends DaoEPBase {
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setPlanQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_QTY)), planQty));
setPlanUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_UNIT_WEIGHT)), planUnitWeight));
setPlanWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PLAN_WEIGHT)), planWeight));
setPurQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PUR_QTY)), purQty));
setPurUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PUR_UNIT_WEIGHT)), purUnitWeight));
setPurWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PUR_WEIGHT)), purWeight));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setAuditTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_TIME)), auditTime));
......@@ -903,8 +957,10 @@ public class HGCG001 extends DaoEPBase {
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_PLAN_QTY, StringUtils.toString(planQty, eiMetadata.getMeta(FIELD_PLAN_QTY)));
map.put(FIELD_PLAN_UNIT_WEIGHT, StringUtils.toString(planUnitWeight, eiMetadata.getMeta(FIELD_PLAN_UNIT_WEIGHT)));
map.put(FIELD_PLAN_WEIGHT, StringUtils.toString(planWeight, eiMetadata.getMeta(FIELD_PLAN_WEIGHT)));
map.put(FIELD_PUR_QTY, StringUtils.toString(purQty, eiMetadata.getMeta(FIELD_PUR_QTY)));
map.put(FIELD_PUR_UNIT_WEIGHT, StringUtils.toString(purUnitWeight, eiMetadata.getMeta(FIELD_PUR_UNIT_WEIGHT)));
map.put(FIELD_PUR_WEIGHT, StringUtils.toString(purWeight, eiMetadata.getMeta(FIELD_PUR_WEIGHT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_AUDIT_TIME, StringUtils.toString(auditTime, eiMetadata.getMeta(FIELD_AUDIT_TIME)));
......
......@@ -16,7 +16,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-11 16:32:20 create
* @history 2024-05-11 17:26:09 create
*/
public class HGCG002 extends DaoEPBase {
......@@ -52,8 +52,10 @@ public class HGCG002 extends DaoEPBase {
public static final String FIELD_WIDTH = "width"; /* 宽度*/
public static final String FIELD_THICK = "thick"; /* 厚度*/
public static final String FIELD_PUR_QTY = "purQty"; /* 采购数量*/
public static final String FIELD_PUR_UNIT_WEIGHT = "purUnitWeight"; /* 采购单重*/
public static final String FIELD_PUR_WEIGHT = "purWeight"; /* 采购重量*/
public static final String FIELD_RECEIVE_QTY = "receiveQty"; /* 收货数量*/
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/
public static final String FIELD_STATUS = "status"; /* 状态:0-未审批,1-审核通过,2-审核未通过*/
public static final String FIELD_AUDIT_TIME = "auditTime"; /* 审核时间*/
public static final String FIELD_AUDIT_USER_ID = "auditUserId"; /* 审核人ID*/
......@@ -90,8 +92,10 @@ public class HGCG002 extends DaoEPBase {
public static final String COL_WIDTH = "WIDTH"; /* 宽度*/
public static final String COL_THICK = "THICK"; /* 厚度*/
public static final String COL_PUR_QTY = "PUR_QTY"; /* 采购数量*/
public static final String COL_PUR_UNIT_WEIGHT = "PUR_UNIT_WEIGHT"; /* 采购单重*/
public static final String COL_PUR_WEIGHT = "PUR_WEIGHT"; /* 采购重量*/
public static final String COL_RECEIVE_QTY = "RECEIVE_QTY"; /* 收货数量*/
public static final String COL_RECEIVE_WEIGHT = "RECEIVE_WEIGHT"; /* 收货重量*/
public static final String COL_STATUS = "STATUS"; /* 状态:0-未审批,1-审核通过,2-审核未通过*/
public static final String COL_AUDIT_TIME = "AUDIT_TIME"; /* 审核时间*/
public static final String COL_AUDIT_USER_ID = "AUDIT_USER_ID"; /* 审核人ID*/
......@@ -134,8 +138,10 @@ public class HGCG002 extends DaoEPBase {
private BigDecimal width = new BigDecimal(0.000); /* 宽度*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚度*/
private BigDecimal purQty = new BigDecimal(0.000); /* 采购数量*/
private BigDecimal purUnitWeight = new BigDecimal(0.000); /* 采购单重*/
private BigDecimal purWeight = new BigDecimal(0.000); /* 采购重量*/
private BigDecimal receiveQty = new BigDecimal(0.000); /* 收货数量*/
private BigDecimal receiveWeight = new BigDecimal(0.000); /* 收货重量*/
private Integer status; /* 状态:0-未审批,1-审核通过,2-审核未通过*/
private String auditTime = " "; /* 审核时间*/
private String auditUserId = " "; /* 审核人ID*/
......@@ -281,6 +287,13 @@ public class HGCG002 extends DaoEPBase {
eiColumn.setDescName("采购数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("采购单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PUR_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
......@@ -295,6 +308,13 @@ public class HGCG002 extends DaoEPBase {
eiColumn.setDescName("收货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态:0-未审批,1-审核通过,2-审核未通过");
eiMetadata.addMeta(eiColumn);
......@@ -806,6 +826,22 @@ public class HGCG002 extends DaoEPBase {
this.purQty = purQty;
}
/**
* get the purUnitWeight - 采购单重.
* @return the purUnitWeight
*/
public BigDecimal getPurUnitWeight() {
return this.purUnitWeight;
}
/**
* set the purUnitWeight - 采购单重.
*
* @param purUnitWeight - 采购单重
*/
public void setPurUnitWeight(BigDecimal purUnitWeight) {
this.purUnitWeight = purUnitWeight;
}
/**
* get the purWeight - 采购重量.
* @return the purWeight
*/
......@@ -838,6 +874,22 @@ public class HGCG002 extends DaoEPBase {
this.receiveQty = receiveQty;
}
/**
* get the receiveWeight - 收货重量.
* @return the receiveWeight
*/
public BigDecimal getReceiveWeight() {
return this.receiveWeight;
}
/**
* set the receiveWeight - 收货重量.
*
* @param receiveWeight - 收货重量
*/
public void setReceiveWeight(BigDecimal receiveWeight) {
this.receiveWeight = receiveWeight;
}
/**
* get the status - 状态:0-未审批,1-审核通过,2-审核未通过.
* @return the status
*/
......@@ -955,8 +1007,10 @@ public class HGCG002 extends DaoEPBase {
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setPurQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PUR_QTY)), purQty));
setPurUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PUR_UNIT_WEIGHT)), purUnitWeight));
setPurWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PUR_WEIGHT)), purWeight));
setReceiveQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_QTY)), receiveQty));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setAuditTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_TIME)), auditTime));
setAuditUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_AUDIT_USER_ID)), auditUserId));
......@@ -1001,8 +1055,10 @@ public class HGCG002 extends DaoEPBase {
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_PUR_QTY, StringUtils.toString(purQty, eiMetadata.getMeta(FIELD_PUR_QTY)));
map.put(FIELD_PUR_UNIT_WEIGHT, StringUtils.toString(purUnitWeight, eiMetadata.getMeta(FIELD_PUR_UNIT_WEIGHT)));
map.put(FIELD_PUR_WEIGHT, StringUtils.toString(purWeight, eiMetadata.getMeta(FIELD_PUR_WEIGHT)));
map.put(FIELD_RECEIVE_QTY, StringUtils.toString(receiveQty, eiMetadata.getMeta(FIELD_RECEIVE_QTY)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_AUDIT_TIME, StringUtils.toString(auditTime, eiMetadata.getMeta(FIELD_AUDIT_TIME)));
map.put(FIELD_AUDIT_USER_ID, StringUtils.toString(auditUserId, eiMetadata.getMeta(FIELD_AUDIT_USER_ID)));
......
......@@ -16,7 +16,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-11 16:32:26 create
* @history 2024-05-11 17:26:18 create
*/
public class HGCG003 extends DaoEPBase {
......@@ -55,6 +55,7 @@ public class HGCG003 extends DaoEPBase {
public static final String FIELD_RECEIVE_QTY = "receiveQty"; /* 收货数量*/
public static final String FIELD_DELIVER_QTY = "deliverQty"; /* 退货数量*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_RECEIVE_UNIT_WEIGHT = "receiveUnitWeight"; /* 收货单重*/
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/
public static final String FIELD_STATUS = "status"; /* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
......@@ -91,6 +92,7 @@ public class HGCG003 extends DaoEPBase {
public static final String COL_RECEIVE_QTY = "RECEIVE_QTY"; /* 收货数量*/
public static final String COL_DELIVER_QTY = "DELIVER_QTY"; /* 退货数量*/
public static final String COL_DEPOSIT_QTY = "DEPOSIT_QTY"; /* 入库数量*/
public static final String COL_RECEIVE_UNIT_WEIGHT = "RECEIVE_UNIT_WEIGHT"; /* 收货单重*/
public static final String COL_RECEIVE_WEIGHT = "RECEIVE_WEIGHT"; /* 收货重量*/
public static final String COL_STATUS = "STATUS"; /* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
......@@ -133,6 +135,7 @@ public class HGCG003 extends DaoEPBase {
private BigDecimal receiveQty = new BigDecimal(0.000); /* 收货数量*/
private BigDecimal deliverQty = new BigDecimal(0.000); /* 退货数量*/
private BigDecimal depositQty = new BigDecimal(0.000); /* 入库数量*/
private BigDecimal receiveUnitWeight = new BigDecimal(0.000); /* 收货单重*/
private BigDecimal receiveWeight = new BigDecimal(0.000); /* 收货重量*/
private Integer status; /* 状态:0-已收货,1-已入库,2-部分入库,3-退货*/
......@@ -293,6 +296,13 @@ public class HGCG003 extends DaoEPBase {
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
......@@ -843,6 +853,22 @@ public class HGCG003 extends DaoEPBase {
this.depositQty = depositQty;
}
/**
* get the receiveUnitWeight - 收货单重.
* @return the receiveUnitWeight
*/
public BigDecimal getReceiveUnitWeight() {
return this.receiveUnitWeight;
}
/**
* set the receiveUnitWeight - 收货单重.
*
* @param receiveUnitWeight - 收货单重
*/
public void setReceiveUnitWeight(BigDecimal receiveUnitWeight) {
this.receiveUnitWeight = receiveUnitWeight;
}
/**
* get the receiveWeight - 收货重量.
* @return the receiveWeight
*/
......@@ -915,6 +941,7 @@ public class HGCG003 extends DaoEPBase {
setReceiveQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_QTY)), receiveQty));
setDeliverQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DELIVER_QTY)), deliverQty));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setReceiveUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_UNIT_WEIGHT)), receiveUnitWeight));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
......@@ -959,6 +986,7 @@ public class HGCG003 extends DaoEPBase {
map.put(FIELD_RECEIVE_QTY, StringUtils.toString(receiveQty, eiMetadata.getMeta(FIELD_RECEIVE_QTY)));
map.put(FIELD_DELIVER_QTY, StringUtils.toString(deliverQty, eiMetadata.getMeta(FIELD_DELIVER_QTY)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_RECEIVE_UNIT_WEIGHT, StringUtils.toString(receiveUnitWeight, eiMetadata.getMeta(FIELD_RECEIVE_UNIT_WEIGHT)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
......
package com.baosight.hggp.hg.cg.domain;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.Map;
/**
* Project: <br>
* Title:Hgcg003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-11 17:26:18 create
*/
public class HGCG003A extends HGCG003 {
private static final long serialVersionUID = 1L;
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCG003A() {
super.initMetaData();
initMetaData();
}
/**
* 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 value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
super.fromMap(map);
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = super.toMap();
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)));
return map;
}
}
......@@ -7,7 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HgCgUtils;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.util.AssertUtils;
......@@ -23,6 +23,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -64,7 +65,7 @@ public class ServiceHGCG001 extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg001.setCondition(queryRow);
HGCGUtils.HgCg001.setCondition(queryRow);
inInfo = super.query(inInfo, HGCG001.QUERY, new HGCG001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -122,6 +123,7 @@ public class ServiceHGCG001 extends ServiceBase {
*/
private void saveData(List<HGCG001> fCg001s) {
for (HGCG001 fCg001 : fCg001s) {
fCg001.setPurUnitWeight(fCg001.getPurWeight().divide(fCg001.getPurQty(), 3, RoundingMode.HALF_UP));
DaoUtils.update(HGSqlConstant.HgCg001.UPDATE_PUR, fCg001);
}
}
......
......@@ -8,7 +8,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HgCgUtils;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.util.AssertUtils;
......@@ -64,7 +64,7 @@ public class ServiceHGCG002 extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg002.setCondition(queryRow);
HGCGUtils.HgCg002.setCondition(queryRow);
inInfo = super.query(inInfo, HGCG002.QUERY, new HGCG002());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -83,7 +83,7 @@ public class ServiceHGCG002 extends ServiceBase {
try {
List<HGCG002> fCg002s = MapUtils.toDaoEPBase(inInfo, HGCG002.class);
// db数据
Map<String, HGCG002A> dbCg002AMap = HgCgUtils.HgCg002.lockGetDataEp(fCg002s);
Map<String, HGCG002A> dbCg002AMap = HGCGUtils.HgCg002.lockGetDataEp(fCg002s);
// 数据校验
this.checkSaveData(fCg002s, dbCg002AMap);
// 保存数据
......@@ -135,7 +135,7 @@ public class ServiceHGCG002 extends ServiceBase {
try {
List<HGCG002> fCg002s = MapUtils.toDaoEPBase(inInfo, HGCG002.class);
// db数据
Map<String, HGCG002A> dbCg002AMap = HgCgUtils.HgCg002.lockGetDataEp(fCg002s);
Map<String, HGCG002A> dbCg002AMap = HGCGUtils.HgCg002.lockGetDataEp(fCg002s);
// 数据校验
this.checkRemoveData(fCg002s, dbCg002AMap);
// 保存数据
......@@ -193,7 +193,7 @@ public class ServiceHGCG002 extends ServiceBase {
try {
List<HGCG002> fCg002s = MapUtils.toDaoEPBase(inInfo, HGCG002.class);
// db数据
Map<String, HGCG002A> dbCg002AMap = HgCgUtils.HgCg002.lockGetDataEp(fCg002s);
Map<String, HGCG002A> dbCg002AMap = HGCGUtils.HgCg002.lockGetDataEp(fCg002s);
// 数据校验
this.checkSubmitData(fCg002s, dbCg002AMap);
// 提交数据
......
......@@ -7,7 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HgCgUtils;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
......@@ -65,7 +65,7 @@ public class ServiceHGCG002A extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg001.setCondition(queryRow);
HGCGUtils.HgCg001.setCondition(queryRow);
// 仅审核通过
queryRow.put(HGCG001.FIELD_STATUS, HGConstant.CgPlanStatus.S_2);
inInfo = super.query(inInfo, HGCG001.QUERY, new HGCG001());
......
......@@ -7,7 +7,7 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HgCgUtils;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.util.AssertUtils;
......@@ -64,7 +64,7 @@ public class ServiceHGCG003 extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg003.setCondition(queryRow);
HGCGUtils.HgCg003.setCondition(queryRow);
inInfo = super.query(inInfo, HGCG003.QUERY, new HGCG003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -83,9 +83,9 @@ public class ServiceHGCG003 extends ServiceBase {
try {
List<HGCG003> fCg003s = MapUtils.toDaoEPBase(inInfo, HGCG003.class);
// 采购收货DB数据
Map<String, HGCG003> dbCg003Map = HgCgUtils.HgCg003.lockGetDataEp(fCg003s);
Map<String, HGCG003> dbCg003Map = HGCGUtils.HgCg003.lockGetDataEp(fCg003s);
// 采购合同DB数据
Map<String, HGCG002A> dbCg002AMap = HgCgUtils.HgCg002.lockGetData(
Map<String, HGCG002A> dbCg002AMap = HGCGUtils.HgCg002.lockGetData(
ObjectUtils.listEpKey(fCg003s, HGCG003.FIELD_CONTRACT_NO));
// 数据校验
this.checkSaveData(fCg003s, dbCg003Map);
......@@ -140,6 +140,8 @@ public class ServiceHGCG003 extends ServiceBase {
for (HGCG003 fCg003 : fCg003s) {
String receiveNo = fCg003.getReceiveNo();
String contractNo = fCg003.getContractNo();
// 计算重量
fCg003.setReceiveWeight(fCg003.getReceiveQty().multiply(fCg003.getReceiveUnitWeight()));
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_QTY, fCg003);
// 计算差异数量,更新合同状态
HGCG003 dbCg003 = dbCg003Map.get(receiveNo);
......@@ -159,9 +161,9 @@ public class ServiceHGCG003 extends ServiceBase {
try {
List<HGCG003> fCg003s = MapUtils.toDaoEPBase(inInfo, HGCG003.class);
// 采购收货DB数据
Map<String, HGCG003> dbCg003Map = HgCgUtils.HgCg003.lockGetDataEp(fCg003s);
Map<String, HGCG003> dbCg003Map = HGCGUtils.HgCg003.lockGetDataEp(fCg003s);
// 采购合同DB数据
Map<String, HGCG002A> dbCg002AMap = HgCgUtils.HgCg002.lockGetData(
Map<String, HGCG002A> dbCg002AMap = HGCGUtils.HgCg002.lockGetData(
ObjectUtils.listEpKey(fCg003s, HGCG003.FIELD_CONTRACT_NO));
// 数据校验
this.checkRemoveData(fCg003s, dbCg003Map);
......@@ -222,16 +224,16 @@ public class ServiceHGCG003 extends ServiceBase {
try {
List<HGCG003> fCg003s = MapUtils.toDaoEPBase(inInfo, HGCG003.class);
// db数据
Map<String, HGCG003> dbCg003Map = HgCgUtils.HgCg003.lockGetDataEp(fCg003s);
Map<String, HGCG003> dbCg003Map = HGCGUtils.HgCg003.lockGetDataEp(fCg003s);
// 数据校验
this.checkConfirmData(fCg003s, dbCg003Map);
// 提交数据
this.confirmData(fCg003s);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fCg003s.size() + "]条数据审核成功!");
inInfo.setMsg("操作成功!本次对[" + fCg003s.size() + "]条数据收货成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "审核失败");
LogUtils.setDetailMsg(inInfo, e, "收货失败");
}
return inInfo;
}
......@@ -247,8 +249,13 @@ public class ServiceHGCG003 extends ServiceBase {
String receiveNo = fCg003.getReceiveNo();
HGCG003 dbCg003 = dbCg003Map.get(receiveNo);
AssertUtils.isNull(dbCg003, String.format("收货单[%s]不存在", receiveNo));
AssertUtils.isNotEquals(HGConstant.CgReceiveStatus.S_0, dbCg003.getStatus(),
String.format("收货单[%s]状态不是\"待确认\",不允许操作", receiveNo));
AssertUtils.isNotEquals(HGConstant.CgReceiveStatus.S_4, dbCg003.getStatus(),
String.format("收货单【%s】状态不是\"质检完成\",不允许操作", receiveNo));
// 计算退货数量和入库数量
BigDecimal totalQty = fCg003.getDeliverQty().add(fCg003.getDepositQty());
AssertUtils.isNotEquals(totalQty, dbCg003.getReceiveQty(),
String.format("收货单【%s】的\"退货数量(%s)\"加\"入库数量(%s)\"不等于\"收货数量(%s)\",请检查", receiveNo,
fCg003.getDeliverQty(), fCg003.getDepositQty(), dbCg003.getReceiveQty()));
}
}
......@@ -260,7 +267,7 @@ public class ServiceHGCG003 extends ServiceBase {
private void confirmData(List<HGCG003> fCg003s) {
for (HGCG003 fCg003 : fCg003s) {
fCg003.setStatus(HGConstant.CgReceiveStatus.S_2);
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_STATUS, fCg003);
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_CONFIRM, fCg003);
}
}
......
......@@ -8,7 +8,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HgCgUtils;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
......@@ -17,7 +17,6 @@ import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -66,7 +65,7 @@ public class ServiceHGCG003A extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg001.setCondition(queryRow);
HGCGUtils.HgCg001.setCondition(queryRow);
// 仅审核通过和收货中
queryRow.put("statuses", new Integer[]{HGConstant.CgContractStatus.S_2, HGConstant.CgContractStatus.S_4});
inInfo = super.query(inInfo, HGCG002.QUERY, new HGCG002A());
......@@ -85,10 +84,9 @@ public class ServiceHGCG003A extends ServiceBase {
@OperationLogAnnotation(operModul = "采购合同", operType = "修改", operDesc = "确认")
public EiInfo confirm(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<HGCG002A> fCg002As = MapUtils.toDaoEPBase(inInfo, HGCG002A.class);
// db数据
Map<String, HGCG002A> dbCg002AMap = this.lockGetData(fCg002As);
Map<String, HGCG002A> dbCg002AMap = HGCGUtils.HgCg002.lockGetDataEp(fCg002As);
// 数据校验
this.checkConfirmData(fCg002As, dbCg002AMap);
// 保存数据
......@@ -136,7 +134,8 @@ public class ServiceHGCG003A extends ServiceBase {
newCg003.setReceiveDate(DateUtils.shortDate());
newCg003.setReceiveNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CG_RECEIVE_NO));
newCg003.setReceiveQty(fCg002A.getBcReceiveQty());
newCg003.setReceiveWeight(fCg002A.getPurWeight());
newCg003.setReceiveUnitWeight(fCg002A.getPurUnitWeight());
newCg003.setReceiveWeight(fCg002A.getBcReceiveQty().multiply(fCg002A.getPurUnitWeight()));
newCg003.setStatus(HGConstant.CgReceiveStatus.S_0);
newCg003.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGCG003.INSERT, newCg003);
......@@ -145,19 +144,4 @@ public class ServiceHGCG003A extends ServiceBase {
}
}
/**
* 锁并且获取数据
*
* @param fCg002As
* @return
*/
private Map<String, HGCG002A> lockGetData(List<HGCG002A> fCg002As) {
// 合同号
List<String> contractNos = ObjectUtils.listEpKey(fCg002As, HGCG002.FIELD_CONTRACT_NO);
// 锁
HGCGTools.HgCg002.lock(contractNos);
// db数据
return HGCGTools.HgCg002.map(contractNos);
}
}
......@@ -28,8 +28,10 @@
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PLAN_QTY as "planQty", <!-- 计划数量 -->
PLAN_UNIT_WEIGHT as "planUnitWeight", <!-- 计划单重 -->
PLAN_WEIGHT as "planWeight", <!-- 计划重量 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
STATUS as "status", <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
AUDIT_TIME as "auditTime", <!-- 审核时间 -->
......@@ -145,13 +147,14 @@
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
PLAN_QTY, <!-- 计划数量 -->
PLAN_UNIT_WEIGHT, <!-- 计划单重 -->
PLAN_WEIGHT, <!-- 计划重量 -->
STATUS <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#planQty#, #planWeight#, #status#
#planQty#, #planUnitWeight#, #planWeight#, #status#
)
</insert>
......@@ -176,6 +179,7 @@
UPDATE ${hggpSchema}.HGCG001
SET
PUR_QTY = #purQty#, <!-- 采购数量 -->
PUR_UNIT_WEIGHT = #purUnitWeight#, <!-- 采购单重 -->
PUR_WEIGHT = #purWeight#, <!-- 采购重量 -->
<include refid="updateRevise"/>
WHERE PLAN_NO = #planNo#
......
......@@ -33,8 +33,10 @@
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight", <!-- 采购单重 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
STATUS as "status", <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
AUDIT_TIME as "auditTime", <!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId", <!-- 审核人ID -->
......@@ -169,23 +171,29 @@
CONTRACT_DATE, <!-- 合同日期 -->
CONTRACT_NO, <!-- 合同号 -->
PLAN_NO, <!-- 计划单号 -->
SUP_CODE, <!-- 供应商编码 -->
SUP_NAME, <!-- 供应商名称 -->
PUR_USER_ID, <!-- 采购员 -->
PUR_USER_NAME, <!-- 采购员名称 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
PUR_QTY, <!-- 采购数量 -->
PUR_UNIT_WEIGHT, <!-- 采购单重 -->
PUR_WEIGHT, <!-- 采购重量 -->
STATUS <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #contractDate#, #contractNo#, #planNo#,
#inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#purQty#, #purWeight#, #status#
#supCode#, #supName#, #purUserId#, #purUserName#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#purQty#, #purUnitWeight#, #purWeight#, #status#
)
</insert>
......@@ -245,6 +253,7 @@
SET
STATUS = #status#,
RECEIVE_QTY = #receiveQty#,
RECEIVE_WEIGHT = #receiveWeight#,
<include refid="updateRevise"/>
WHERE CONTRACT_NO = #contractNo#
</update>
......
......@@ -36,6 +36,7 @@
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
DELIVER_QTY as "deliverQty", <!-- 退货数量 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
RECEIVE_UNIT_WEIGHT as "receiveUnitWeight", <!-- 收货单重 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
STATUS as "status" <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
</sql>
......@@ -172,14 +173,16 @@
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
RECEIVE_QTY, <!-- 收货数量 -->
RECEIVE_UNIT_WEIGHT, <!-- 收货单重 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
STATUS <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#,
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveWeight#, #status#
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#,
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveUnitWeight#,
#receiveWeight#, #status#
)
</insert>
......@@ -213,6 +216,18 @@
UPDATE ${hggpSchema}.HGCG003
SET
RECEIVE_QTY = #receiveQty#, <!-- 收货数量 -->
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
<include refid="updateRevise"/>
WHERE RECEIVE_NO = #receiveNo#
</update>
<!-- 修改确认 -->
<update id="updateConfirm">
UPDATE ${hggpSchema}.HGCG003
SET
STATUS = #status#,
DELIVER_QTY = #deliverQty#, <!-- 退货数量 -->
DEPOSIT_QTY = #depositQty#, <!-- 退货数量 -->
<include refid="updateRevise"/>
WHERE RECEIVE_NO = #receiveNo#
</update>
......
......@@ -6,6 +6,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.domain.HGCG002A;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.util.AssertUtils;
......@@ -134,13 +135,15 @@ public class HGCGTools {
public static void updateReceive(HGCG002 dbCg002, BigDecimal receiveQty) {
AssertUtils.isNull(dbCg002, "合同号不能为空!");
AssertUtils.isNull(receiveQty, "收货数量不能为空!");
BigDecimal diffQty = dbCg002.getPurQty().subtract(receiveQty.add(dbCg002.getReceiveQty()));
BigDecimal newReceiveQty = receiveQty.add(dbCg002.getReceiveQty());
BigDecimal diffQty = dbCg002.getPurQty().subtract(newReceiveQty);
Integer status = diffQty.compareTo(BigDecimal.ZERO) == 0 ? HGConstant.CgContractStatus.S_5
: HGConstant.CgContractStatus.S_4;
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HGCG002.FIELD_CONTRACT_NO, dbCg002.getContractNo());
paramMap.put(HGCG002.FIELD_STATUS, status);
paramMap.put(HGCG002.FIELD_RECEIVE_QTY, receiveQty.add(dbCg002.getReceiveQty()));
paramMap.put(HGCG002.FIELD_RECEIVE_QTY, newReceiveQty);
paramMap.put(HGCG002.FIELD_RECEIVE_WEIGHT, newReceiveQty.multiply(dbCg002.getPurUnitWeight()));
DaoUtils.update(HGSqlConstant.HgCg002.UPDATE_RECEIVE, paramMap);
}
......@@ -217,6 +220,20 @@ public class HGCGTools {
return results.stream().collect(Collectors.toMap(HGCG003::getReceiveNo, item -> item));
}
/**
* 修改状态
*
* @param receiveNo
* @param status
*/
public static void updateStatus(String receiveNo, Integer status) {
AssertUtils.isEmpty(receiveNo, "收货单号不能为空!");
AssertUtils.isNull(status, "状态不能为空!");
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("receiveNo", receiveNo);
paramMap.put("status", status);
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_STATUS, paramMap);
}
}
}
......@@ -17,7 +17,7 @@ import java.util.Map;
* @author:songx
* @date:2024/5/9,13:50
*/
public class HgCgUtils {
public class HGCGUtils {
/**
* 设置查询条件
......@@ -51,7 +51,7 @@ public class HgCgUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HgCgUtils.setCondition(queryRow);
HGCGUtils.setCondition(queryRow);
// 计划日期
String planDate = MapUtils.getString(queryRow, HGCG001.FIELD_PLAN_DATE);
if (StringUtils.isNotBlank(planDate)) {
......@@ -76,7 +76,7 @@ public class HgCgUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HgCgUtils.setCondition(queryRow);
HGCGUtils.setCondition(queryRow);
// 合同日期
String contractDate = MapUtils.getString(queryRow, HGCG002.FIELD_CONTRACT_DATE);
if (StringUtils.isNotBlank(contractDate)) {
......@@ -90,7 +90,7 @@ public class HgCgUtils {
* @param fCg002s
* @return
*/
public static Map<String, HGCG002A> lockGetDataEp(List<HGCG002> fCg002s) {
public static Map<String, HGCG002A> lockGetDataEp(List<? extends HGCG002> fCg002s) {
return lockGetData(ObjectUtils.listEpKey(fCg002s, HGCG002.FIELD_CONTRACT_NO));
}
......@@ -124,7 +124,7 @@ public class HgCgUtils {
* @return
*/
public static void setCondition(Map queryRow) {
HgCgUtils.setCondition(queryRow);
HGCGUtils.setCondition(queryRow);
// 收货日期
String receiveDate = MapUtils.getString(queryRow, HGCG003.FIELD_RECEIVE_DATE);
if (StringUtils.isNotBlank(receiveDate)) {
......@@ -138,7 +138,7 @@ public class HgCgUtils {
* @param fCg003s
* @return
*/
public static Map<String, HGCG003> lockGetDataEp(List<HGCG003> fCg003s) {
public static Map<String, HGCG003> lockGetDataEp(List<? extends HGCG003> fCg003s) {
return lockGetData(ObjectUtils.listEpKey(fCg003s, HGCG003.FIELD_RECEIVE_NO));
}
......
......@@ -95,6 +95,8 @@ public class HGConstant {
public static final String CG_CONTRACT_NO = "CG_CONTRACT_NO";
// 采购收货号
public static final String CG_RECEIVE_NO = "CG_RECEIVE_NO";
// 采购入库号
public static final String CG_DEPOSIT_NO = "CG_DEPOSIT_NO";
}
/**
......
......@@ -64,6 +64,38 @@ public class HGSqlConstant {
public static final String UPDATE_STATUS = MODULE_NAME + "updateStatus";
// 修改数量
public static final String UPDATE_QTY = MODULE_NAME + "updateQty";
// 修改数量
public static final String UPDATE_CONFIRM = MODULE_NAME + "updateConfirm";
}
/**
* HGKC001 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HgKc001 {
// 模块名称
private static final String MODULE_NAME = "HGKC001.";
// 锁
public static final String LOCK = MODULE_NAME + "lock";
}
/**
* HGKC001 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HgKc010 {
// 模块名称
private static final String MODULE_NAME = "HGKC010.";
// 锁
public static final String LOCK = MODULE_NAME + "lock";
// 锁
public static final String UPDATE_INV = MODULE_NAME + "updateInv";
}
/**
......
package com.baosight.hggp.hg.cg.domain;
package com.baosight.hggp.hg.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>
......@@ -17,12 +16,12 @@ import java.util.Map;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-11 16:16:46 create
* @history 2024-05-11 17:26:35 create
*/
public class HGCG004 extends DaoEPBase {
public class HGKC001 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
......@@ -53,8 +52,9 @@ public class HGCG004 extends DaoEPBase {
public static final String FIELD_WIDTH = "width"; /* 宽度*/
public static final String FIELD_THICK = "thick"; /* 厚度*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_DEPOSIT_UNIT_WEIGHT = "depositUnitWeight"; /* 入库单重*/
public static final String FIELD_DEPOSIT_WEIGHT = "depositWeight"; /* 入库重量*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
......@@ -85,14 +85,15 @@ public class HGCG004 extends DaoEPBase {
public static final String COL_WIDTH = "WIDTH"; /* 宽度*/
public static final String COL_THICK = "THICK"; /* 厚度*/
public static final String COL_DEPOSIT_QTY = "DEPOSIT_QTY"; /* 入库数量*/
public static final String COL_DEPOSIT_UNIT_WEIGHT = "DEPOSIT_UNIT_WEIGHT"; /* 入库单重*/
public static final String COL_DEPOSIT_WEIGHT = "DEPOSIT_WEIGHT"; /* 入库重量*/
public static final String QUERY = "HGCG004.query";
public static final String COUNT = "HGCG004.count";
public static final String INSERT = "HGCG004.insert";
public static final String UPDATE = "HGCG004.update";
public static final String DELETE = "HGCG004.delete";
public static final String QUERY = "HGKC001.query";
public static final String COUNT = "HGKC001.count";
public static final String INSERT = "HGKC001.insert";
public static final String UPDATE = "HGKC001.update";
public static final String DELETE = "HGKC001.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
......@@ -123,164 +124,172 @@ public class HGCG004 extends DaoEPBase {
private BigDecimal width = new BigDecimal(0.000); /* 宽度*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚度*/
private BigDecimal depositQty = new BigDecimal(0.000); /* 入库数量*/
private BigDecimal depositUnitWeight = new BigDecimal(0.000); /* 入库单重*/
private BigDecimal depositWeight = new BigDecimal(0.000); /* 入库重量*/
/**
* 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_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_DATE);
eiColumn.setDescName("入库日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_NO);
eiColumn.setDescName("入库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_NO);
eiColumn.setDescName("收货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_NO);
eiColumn.setDescName("计划单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("长度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("宽度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("厚度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库重量");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCG004() {
public HGKC001() {
initMetaData();
}
/**
* get the id .
* @return the id
......@@ -288,7 +297,7 @@ public class HGCG004 extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id .
*
......@@ -304,7 +313,7 @@ public class HGCG004 extends DaoEPBase {
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
......@@ -320,7 +329,7 @@ public class HGCG004 extends DaoEPBase {
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
......@@ -336,7 +345,7 @@ public class HGCG004 extends DaoEPBase {
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
......@@ -352,7 +361,7 @@ public class HGCG004 extends DaoEPBase {
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
......@@ -368,7 +377,7 @@ public class HGCG004 extends DaoEPBase {
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
......@@ -384,7 +393,7 @@ public class HGCG004 extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
......@@ -400,7 +409,7 @@ public class HGCG004 extends DaoEPBase {
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
......@@ -416,7 +425,7 @@ public class HGCG004 extends DaoEPBase {
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
......@@ -432,7 +441,7 @@ public class HGCG004 extends DaoEPBase {
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
......@@ -448,7 +457,7 @@ public class HGCG004 extends DaoEPBase {
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
......@@ -464,7 +473,7 @@ public class HGCG004 extends DaoEPBase {
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
......@@ -480,7 +489,7 @@ public class HGCG004 extends DaoEPBase {
public String getDepositDate() {
return this.depositDate;
}
/**
* set the depositDate - 入库日期.
*
......@@ -496,7 +505,7 @@ public class HGCG004 extends DaoEPBase {
public String getDepositNo() {
return this.depositNo;
}
/**
* set the depositNo - 入库单号.
*
......@@ -512,7 +521,7 @@ public class HGCG004 extends DaoEPBase {
public String getReceiveNo() {
return this.receiveNo;
}
/**
* set the receiveNo - 收货单号.
*
......@@ -528,7 +537,7 @@ public class HGCG004 extends DaoEPBase {
public String getPlanNo() {
return this.planNo;
}
/**
* set the planNo - 计划单号.
*
......@@ -544,7 +553,7 @@ public class HGCG004 extends DaoEPBase {
public String getContractNo() {
return this.contractNo;
}
/**
* set the contractNo - 合同号.
*
......@@ -560,7 +569,7 @@ public class HGCG004 extends DaoEPBase {
public String getWhCode() {
return this.whCode;
}
/**
* set the whCode - 仓库编码.
*
......@@ -576,7 +585,7 @@ public class HGCG004 extends DaoEPBase {
public String getWhName() {
return this.whName;
}
/**
* set the whName - 仓库名称.
*
......@@ -592,7 +601,7 @@ public class HGCG004 extends DaoEPBase {
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
......@@ -608,7 +617,7 @@ public class HGCG004 extends DaoEPBase {
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
......@@ -624,7 +633,7 @@ public class HGCG004 extends DaoEPBase {
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
......@@ -640,7 +649,7 @@ public class HGCG004 extends DaoEPBase {
public Long getSpecId() {
return this.specId;
}
/**
* set the specId - 规格ID.
*
......@@ -656,7 +665,7 @@ public class HGCG004 extends DaoEPBase {
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
......@@ -672,7 +681,7 @@ public class HGCG004 extends DaoEPBase {
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
......@@ -688,7 +697,7 @@ public class HGCG004 extends DaoEPBase {
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
......@@ -704,7 +713,7 @@ public class HGCG004 extends DaoEPBase {
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长度.
*
......@@ -720,7 +729,7 @@ public class HGCG004 extends DaoEPBase {
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽度.
*
......@@ -736,7 +745,7 @@ public class HGCG004 extends DaoEPBase {
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚度.
*
......@@ -752,7 +761,7 @@ public class HGCG004 extends DaoEPBase {
public BigDecimal getDepositQty() {
return this.depositQty;
}
/**
* set the depositQty - 入库数量.
*
......@@ -762,13 +771,29 @@ public class HGCG004 extends DaoEPBase {
this.depositQty = depositQty;
}
/**
* get the depositUnitWeight - 入库单重.
* @return the depositUnitWeight
*/
public BigDecimal getDepositUnitWeight() {
return this.depositUnitWeight;
}
/**
* set the depositUnitWeight - 入库单重.
*
* @param depositUnitWeight - 入库单重
*/
public void setDepositUnitWeight(BigDecimal depositUnitWeight) {
this.depositUnitWeight = depositUnitWeight;
}
/**
* get the depositWeight - 入库重量.
* @return the depositWeight
*/
public BigDecimal getDepositWeight() {
return this.depositWeight;
}
/**
* set the depositWeight - 入库重量.
*
......@@ -784,7 +809,7 @@ public class HGCG004 extends DaoEPBase {
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
......@@ -815,15 +840,16 @@ public class HGCG004 extends DaoEPBase {
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setDepositUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_UNIT_WEIGHT)), depositUnitWeight));
setDepositWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_WEIGHT)), depositWeight));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
......@@ -855,8 +881,9 @@ public class HGCG004 extends DaoEPBase {
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_DEPOSIT_UNIT_WEIGHT, StringUtils.toString(depositUnitWeight, eiMetadata.getMeta(FIELD_DEPOSIT_UNIT_WEIGHT)));
map.put(FIELD_DEPOSIT_WEIGHT, StringUtils.toString(depositWeight, eiMetadata.getMeta(FIELD_DEPOSIT_WEIGHT)));
return map;
}
}
package com.baosight.hggp.hg.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 java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:Hgkc010.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-13 15:39:23 create
*/
public class HGKC010 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
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_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
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_SPEC_ID = "specId"; /* 规格ID*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_LENGTH = "length"; /* 长度*/
public static final String FIELD_WIDTH = "width"; /* 宽度*/
public static final String FIELD_THICK = "thick"; /* 厚度*/
public static final String FIELD_INV_QTY = "invQty"; /* 库存数量*/
public static final String FIELD_INV_UNIT_WEIGHT = "invUnitWeight"; /* 库存单重*/
public static final String FIELD_INV_WEIGHT = "invWeight"; /* 库存重量*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 厂区编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 厂区名称*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
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_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
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_SPEC_ID = "SPEC_ID"; /* 规格ID*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_MATERIAL = "MATERIAL"; /* 材质*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_LENGTH = "LENGTH"; /* 长度*/
public static final String COL_WIDTH = "WIDTH"; /* 宽度*/
public static final String COL_THICK = "THICK"; /* 厚度*/
public static final String COL_INV_QTY = "INV_QTY"; /* 库存数量*/
public static final String COL_INV_UNIT_WEIGHT = "INV_UNIT_WEIGHT"; /* 库存单重*/
public static final String COL_INV_WEIGHT = "INV_WEIGHT"; /* 库存重量*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 厂区名称*/
public static final String QUERY = "HGKC010.query";
public static final String COUNT = "HGKC010.count";
public static final String INSERT = "HGKC010.insert";
public static final String UPDATE = "HGKC010.update";
public static final String DELETE = "HGKC010.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long specId = new Long(0); /* 规格ID*/
private String spec = " "; /* 规格*/
private String material = " "; /* 材质*/
private String unit = " "; /* 单位*/
private BigDecimal length = new BigDecimal(0.000); /* 长度*/
private BigDecimal width = new BigDecimal(0.000); /* 宽度*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚度*/
private BigDecimal invQty = new BigDecimal(0); /* 库存数量*/
private BigDecimal invUnitWeight = new BigDecimal(0.000); /* 库存单重*/
private BigDecimal invWeight = new BigDecimal(0.000); /* 库存重量*/
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
/**
* 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_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
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_SPEC_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("长度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("宽度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("厚度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INV_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INV_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INV_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("库存重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGKC010() {
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 accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* 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 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 deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* 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 companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* 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 specId - 规格ID.
* @return the specId
*/
public Long getSpecId() {
return this.specId;
}
/**
* set the specId - 规格ID.
*
* @param specId - 规格ID
*/
public void setSpecId(Long specId) {
this.specId = specId;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the length - 长度.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长度.
*
* @param length - 长度
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽度.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽度.
*
* @param width - 宽度
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚度.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚度.
*
* @param thick - 厚度
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the invQty - 库存数量.
* @return the invQty
*/
public BigDecimal getInvQty() {
return this.invQty;
}
/**
* set the invQty - 库存数量.
*
* @param invQty - 库存数量
*/
public void setInvQty(BigDecimal invQty) {
this.invQty = invQty;
}
/**
* get the invUnitWeight - 库存单重.
* @return the invUnitWeight
*/
public BigDecimal getInvUnitWeight() {
return this.invUnitWeight;
}
/**
* set the invUnitWeight - 库存单重.
*
* @param invUnitWeight - 库存单重
*/
public void setInvUnitWeight(BigDecimal invUnitWeight) {
this.invUnitWeight = invUnitWeight;
}
/**
* get the invWeight - 库存重量.
* @return the invWeight
*/
public BigDecimal getInvWeight() {
return this.invWeight;
}
/**
* set the invWeight - 库存重量.
*
* @param invWeight - 库存重量
*/
public void setInvWeight(BigDecimal invWeight) {
this.invWeight = invWeight;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
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));
setSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setInvQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_QTY)), invQty));
setInvUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_UNIT_WEIGHT)), invUnitWeight));
setInvWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INV_WEIGHT)), invWeight));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
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_SPEC_ID, StringUtils.toString(specId, eiMetadata.getMeta(FIELD_SPEC_ID)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_INV_QTY, StringUtils.toString(invQty, eiMetadata.getMeta(FIELD_INV_QTY)));
map.put(FIELD_INV_UNIT_WEIGHT, StringUtils.toString(invUnitWeight, eiMetadata.getMeta(FIELD_INV_UNIT_WEIGHT)));
map.put(FIELD_INV_WEIGHT, StringUtils.toString(invWeight, eiMetadata.getMeta(FIELD_INV_WEIGHT)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
return map;
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
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 java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/9,11:04
*/
public class ServiceHGKC001 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "采购入库", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "采购入库", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HGKCUtils.HgKc001.setCondition(queryRow);
inInfo = super.query(inInfo, HGKC001.QUERY, new HGKC001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购入库", operType = "修改", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<HGKC001> fCg004s = MapUtils.toDaoEPBase(inInfo, HGKC001.class);
// 采购收货DB数据
Map<String, HGKC001> dbCg004Map = HGKCUtils.HgKc001.lockGetDataEp(fCg004s);
// 数据校验
this.checkSaveData(fCg004s, dbCg004Map);
// 保存数据
this.saveData(fCg004s, dbCg004Map);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fCg004s.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fCg004s
* @param dbCg004Map
*/
private void checkSaveData(List<HGKC001> fCg004s, Map<String, HGKC001> dbCg004Map) {
for (HGKC001 fCg004 : fCg004s) {
String depositNo = fCg004.getDepositNo();
HGKC001 dbCg004 = dbCg004Map.get(depositNo);
AssertUtils.isNull(dbCg004, String.format("入库单[%s]不存在", depositNo));
}
}
/**
* 数据保存
*
* @param fCg004s
* @param dbCg004Map
*/
private void saveData(List<HGKC001> fCg004s, Map<String, HGKC001> dbCg004Map) {
for (HGKC001 fCg004 : fCg004s) {
String depositNo = fCg004.getDepositNo();
}
}
/**
* 删除操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购入库", operType = "修改", operDesc = "删除")
public EiInfo remove(EiInfo inInfo) {
try {
List<HGKC001> fKc001s = MapUtils.toDaoEPBase(inInfo, HGKC001.class);
// 采购收货DB数据
Map<String, HGKC001> dbCg004Map = HGKCUtils.HgKc001.lockGetDataEp(fKc001s);
// 数据校验
this.checkRemoveData(fKc001s, dbCg004Map);
// 保存数据
this.removeData(fKc001s, dbCg004Map);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fKc001s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fKc001s
* @param dbKc001Map
*/
private void checkRemoveData(List<HGKC001> fKc001s, Map<String, HGKC001> dbKc001Map) {
for (HGKC001 fKc001 : fKc001s) {
String depositNo = fKc001.getDepositNo();
HGKC001 dbCg004 = dbKc001Map.get(depositNo);
AssertUtils.isNull(dbCg004, String.format("入库单[%s]不存在", depositNo));
}
}
/**
* 数据保存
*
* @param fKc001s
* @param dbKc001Map
*/
private void removeData(List<HGKC001> fKc001s, Map<String, HGKC001> dbKc001Map) {
for (HGKC001 fKc001 : fKc001s) {
String depositNo = fKc001.getDepositNo();
HGKC001 dbKc001 = dbKc001Map.get(depositNo);
dbKc001.setDeleteFlag(DeleteFlagEnum.REMOVE.getCode());
DaoUtils.update(HGKC001.DELETE, dbKc001);
// 扣减库存
HGKCUtils.HgKc010.updateInv(dbKc001.getCompanyCode(), dbKc001.getWhCode(), dbKc001.getSpecId(),
dbKc001.getDepositQty().negate(), dbKc001.getDepositWeight().negate());
// 更新收货单状态
HGCGTools.HgCg003.updateStatus(dbKc001.getReceiveNo(), HGConstant.CgReceiveStatus.S_2);
}
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.domain.HGCG003A;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
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.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/9,11:04
*/
public class ServiceHGKC001A extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "采购收货", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG003A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "采购合同", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HGCGUtils.HgCg003.setCondition(queryRow);
// 仅已收货
queryRow.put(HGCG003.FIELD_STATUS, HGConstant.CgReceiveStatus.S_2);
inInfo = super.query(inInfo, HGCG003.QUERY, new HGCG003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 确认操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购收货", operType = "修改", operDesc = "确认")
public EiInfo confirm(EiInfo inInfo) {
try {
List<HGCG003A> fCg003As = MapUtils.toDaoEPBase(inInfo, HGCG003A.class);
// db数据
Map<String, HGCG003> dbCg003Map = HGCGUtils.HgCg003.lockGetDataEp(fCg003As);
// 数据校验
this.checkConfirmData(fCg003As, dbCg003Map);
// 保存数据
this.confirmData(fCg003As, dbCg003Map);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fCg003As.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fCg003As
* @param dbCg003Map
*/
private void checkConfirmData(List<HGCG003A> fCg003As, Map<String, HGCG003> dbCg003Map) {
for (HGCG003A fCg003A : fCg003As) {
String receiveNo = fCg003A.getReceiveNo();
HGCG003 dbCg003 = dbCg003Map.get(receiveNo);
AssertUtils.isNull(dbCg003, String.format("收货单号[%s]不存在", receiveNo));
AssertUtils.isNotEquals(HGConstant.CgReceiveStatus.S_2, dbCg003.getStatus(),
String.format("收货单号[%s]状态不是\"已收货\",不允许操作", receiveNo));
AssertUtils.isEmpty(fCg003A.getWhCode(), String.format("收货单号[%s]的仓库名称不能为空", dbCg003.getReceiveNo()));
}
}
/**
* 数据保存
*
* @param fCg003As
* @param dbCg003Map
*/
private void confirmData(List<HGCG003A> fCg003As, Map<String, HGCG003> dbCg003Map) {
for (HGCG003A fCg003A : fCg003As) {
String receiveNo = fCg003A.getReceiveNo();
HGCG003 dbCg003 = dbCg003Map.get(receiveNo);
HGKC001 newKc001 = BeanUtils.copy(dbCg003, HGKC001.class);
newKc001.setWhCode(fCg003A.getWhCode());
newKc001.setWhName(fCg003A.getWhName());
newKc001.setDepositDate(DateUtils.shortDate());
newKc001.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CG_DEPOSIT_NO));
newKc001.setDepositQty(dbCg003.getDepositQty());
newKc001.setDepositUnitWeight(dbCg003.getReceiveUnitWeight());
newKc001.setDepositWeight(dbCg003.getDepositQty().multiply(dbCg003.getReceiveUnitWeight()));
newKc001.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGKC001.INSERT, newKc001);
// 更新库存数量
HGKCUtils.HgKc010.updateInv(newKc001.getCompanyCode(), newKc001.getWhCode(), newKc001.getSpecId(),
newKc001.getDepositQty(), newKc001.getDepositUnitWeight(), newKc001.getDepositWeight());
// 更新收货单状态
HGCGTools.HgCg003.updateStatus(receiveNo, HGConstant.CgReceiveStatus.S_5);
}
}
}
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.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 java.util.Arrays;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/9,11:04
*/
public class ServiceHGKC010 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "综合库存", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC010().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "综合库存", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HGKC010.QUERY, new HGKC010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
<?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="HGCG004">
<sqlMap namespace="HGKC001">
<sql id="column">
ID as "id",
......@@ -33,6 +33,7 @@
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT as "depositUnitWeight", <!-- 入库单重 -->
DEPOSIT_WEIGHT as "depositWeight" <!-- 入库重量 -->
</sql>
......@@ -124,27 +125,27 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.cg.domain.HGCG004">
<select id="query" resultClass="com.baosight.hggp.hg.kc.domain.HGKC001">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGCG004
FROM ${hggpSchema}.HGKC001
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCG004 WHERE 1=1
SELECT COUNT(*) FROM ${hggpSchema}.HGKC001 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCG004 (
INSERT INTO ${hggpSchema}.HGKC001 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
......@@ -171,22 +172,31 @@
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
DEPOSIT_QTY, <!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT, <!-- 入库单重 -->
DEPOSIT_WEIGHT <!-- 入库重量 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#,
#receiveNo#, #planNo#, #contractNo#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #depositQty#, #depositWeight#
#unit#, #length#, #width#, #thick#, #depositQty#, #depositUnitWeight#, #depositWeight#
)
</insert>
<delete id="delete">
UPDATE ${hggpSchema}.HGCG004
UPDATE ${hggpSchema}.HGKC001
SET
DELETE_FLAG = #deleteFlag#,
<include refid="updateRevise"/>
WHERE DEPOSIT_NO = #depositNo#
</delete>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGKC001
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
</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="HGKC010">
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
INV_QTY as "invQty", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "invWeight", <!-- 库存重量 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 厂区名称 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</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="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invUnitWeight">
INV_UNIT_WEIGHT = #invUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="invWeight">
INV_WEIGHT = #invWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC010 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC010 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
INV_QTY, <!-- 库存数量 -->
INV_UNIT_WEIGHT, <!-- 库存单重 -->
INV_WEIGHT, <!-- 库存重量 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME <!-- 厂区名称 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#,
#companyName#, #whCode#, #whName#, #inventType#, #inventCode#,
#inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#,
#thick#, #invQty#, #invUnitWeight#, #invWeight#, #factoryCode#, #factoryName#
)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGKC010 WHERE ID = #id#
</delete>
<!-- 锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGKC010
SET CREATED_TIME = #createdTime#
WHERE 1=1
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND WH_CODE = #whCode#
AND INVENT_CODE = #inventCode#
AND SPEC_ID = #specId#
</update>
<!-- 更新库存 -->
<update id="updateInv">
UPDATE ${hggpSchema}.HGKC010
SET
INV_QTY = #invQty#, <!-- 库存数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 库存单重 -->
INV_WEIGHT = #invWeight# <!-- 库存重量 -->
WHERE ID = #id#
</update>
</sqlMap>
package com.baosight.hggp.hg.kc.tools;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author:songx
* @date:2024/5/13,14:56
*/
public class HGKCTools {
/**
* HGKC001 工具类
*
* @author:songx
* @date:2024/5/9,14:33
*/
public static class HgKc001 {
/**
* 锁
*
* @param depositNos
* @return
*/
public static void lock(List<String> depositNos) {
if (CollectionUtils.isEmpty(depositNos)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("depositNos", depositNos);
DaoBase.getInstance().update(HGSqlConstant.HgKc001.LOCK, paramMap);
}
/**
* 查询
*
* @param depositNos
* @return
*/
public static List<HGKC001> list(List<String> depositNos) {
AssertUtils.isEmpty(depositNos, "入库号不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("depositNos", depositNos);
return DaoBase.getInstance().query(HGKC001.QUERY, paramMap);
}
/**
* 查询
*
* @param depositNos
* @return
*/
public static Map<String, HGKC001> map(List<String> depositNos) {
List<HGKC001> results = list(depositNos);
return results.stream().collect(Collectors.toMap(HGKC001::getDepositNo, item -> item));
}
}
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,14:33
*/
public static class HgKc010 {
/**
* 锁
*
* @param companyCode
* @param whCode
* @param specId
* @return
*/
public static void lock(String companyCode, String whCode, Long specId) {
if (StringUtils.isBlank(companyCode) || StringUtils.isBlank(whCode) || specId == null) {
return;
}
Map paramMap = new HashMap();
paramMap.put("companyCode", companyCode);
paramMap.put("whCode", whCode);
paramMap.put("specId", specId);
DaoBase.getInstance().update(HGSqlConstant.HgKc010.LOCK, paramMap);
}
/**
* @param companyCode
* @param whCode
* @param specId
*/
public static HGKC010 get(String companyCode, String whCode, Long specId) {
AssertUtils.isEmpty(companyCode, "公司编码不能为空");
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
AssertUtils.isTrue(specId == null || specId == 0, "规格ID不能为空");
Map paramMap = new HashMap();
paramMap.put("companyCode", companyCode);
paramMap.put("whCode", whCode);
paramMap.put("specId", specId);
List<HGKC010> results = DaoBase.getInstance().query(HGKC010.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
}
package com.baosight.hggp.hg.kc.utils;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/13,14:57
*/
public class HGKCUtils {
/**
* HGKC001 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public static class HgKc001 {
/**
* 设置查询条件
*
* @param queryRow 集合
* @return
*/
public static void setCondition(Map queryRow) {
HGCGUtils.setCondition(queryRow);
// 入库日期
String depositDate = MapUtils.getString(queryRow, HGKC001.FIELD_DEPOSIT_DATE);
if (StringUtils.isNotBlank(depositDate)) {
queryRow.put(HGKC001.FIELD_DEPOSIT_DATE, DateUtils.formatShort(depositDate));
}
}
/**
* 锁并且获取数据
*
* @param kc001s
* @return
*/
public static Map<String, HGKC001> lockGetDataEp(List<? extends HGKC001> kc001s) {
return lockGetData(ObjectUtils.listEpKey(kc001s, HGKC001.FIELD_DEPOSIT_NO));
}
/**
* 锁并且获取数据
*
* @param depositNos
* @return
*/
public static Map<String, HGKC001> lockGetData(List<String> depositNos) {
// 锁
HGKCTools.HgKc001.lock(depositNos);
// db数据
return HGKCTools.HgKc001.map(depositNos);
}
}
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public static class HgKc010 {
/**
* 更新库存
*
* @param companyCode
* @param whCode
* @param specId
* @param qty
* @param weight
*/
public static void updateInv(String companyCode, String whCode, Long specId, BigDecimal qty,
BigDecimal weight) {
updateInv(companyCode, whCode, specId, qty, null, weight);
}
/**
* 更新库存
*
* @param companyCode
* @param whCode
* @param specId
* @param qty
* @param unitWeight
* @param weight
*/
public static void updateInv(String companyCode, String whCode, Long specId, BigDecimal qty,
BigDecimal unitWeight, BigDecimal weight) {
HGKC010 newKc010 = buildBean(companyCode, whCode, specId, qty, unitWeight, weight);
// 参数校验
checkUpdateInv(companyCode, whCode, specId, qty, weight);
// 锁库存
HGKCTools.HgKc010.lock(companyCode, whCode, specId);
// 获取DB数据
HGKC010 dbKc010 = HGKCTools.HgKc010.get(companyCode, whCode, specId);
if (dbKc010 == null) {
addInvData(newKc010);
} else {
updateInvData(newKc010, dbKc010);
}
}
/**
* 构建对象
*
* @param companyCode
* @param whCode
* @param specId
* @param qty
* @param unitWeight
* @param weight
* @return
*/
private static HGKC010 buildBean(String companyCode, String whCode, Long specId, BigDecimal qty,
BigDecimal unitWeight, BigDecimal weight) {
HGKC010 newKc010 = new HGKC010();
newKc010.setCompanyCode(companyCode);
newKc010.setWhCode(whCode);
newKc010.setSpecId(specId);
newKc010.setInvQty(qty);
newKc010.setInvUnitWeight(unitWeight);
newKc010.setInvWeight(weight);
return newKc010;
}
/**
* 参数校验
*
* @param companyCode
* @param whCode
* @param specId
* @param qty
* @param weight
*/
private static void checkUpdateInv(String companyCode, String whCode, Long specId, BigDecimal qty,
BigDecimal weight) {
AssertUtils.isEmpty(companyCode, "公司编码不能为空");
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
AssertUtils.isTrue(specId == null || specId == 0, "规格ID不能为空");
AssertUtils.isNull(qty, "库存变更数量不能为空");
AssertUtils.isNull(weight, "库存变更重量不能为空");
AssertUtils.isTrue(qty.compareTo(BigDecimal.ZERO) == 0
&& weight.compareTo(BigDecimal.ZERO) == 0, "库存变更数量和重量不能为空");
}
/**
* 新增库存
*
* @param newKc010
*/
private static void addInvData(HGKC010 newKc010) {
// 公司
newKc010.setCompanyName(HGXSTools.XsOrg.get(newKc010.getCompanyCode()).getOrgCname());
// 仓库
newKc010.setWhName(HGPZTools.HgPz007.get(newKc010.getWhCode()).getWhName());
// 规格
HGPZ005 dbPz005 = HGPZTools.HgPz005.get(newKc010.getSpecId());
newKc010.setInventType(dbPz005.getInventType());
newKc010.setInventCode(dbPz005.getInventCode());
newKc010.setInventName(dbPz005.getInventName());
newKc010.setSpec(dbPz005.getSpec());
newKc010.setLength(dbPz005.getLength());
newKc010.setWidth(dbPz005.getWidth());
newKc010.setThick(dbPz005.getThick());
newKc010.setMaterial(dbPz005.getMaterial());
newKc010.setUnit(dbPz005.getUnit());
newKc010.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGKC010.INSERT, newKc010);
}
/**
* 修改库存
*
* @param newKc010
* @param dbKc010
*/
private static void updateInvData(HGKC010 newKc010, HGKC010 dbKc010) {
BigDecimal newQty = newKc010.getInvQty().add(dbKc010.getInvQty());
AssertUtils.isGt(BigDecimal.ZERO, newQty, String.format("更新后的库存数量小于0(%s),请检查", newQty));
BigDecimal newWeight = newKc010.getInvWeight().add(dbKc010.getInvWeight());
BigDecimal newUnitWeight = newQty.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO
: newWeight.divide(newQty, 3, RoundingMode.HALF_UP);
dbKc010.setInvQty(newQty);
dbKc010.setInvWeight(newWeight);
dbKc010.setInvUnitWeight(newUnitWeight);
DaoUtils.update(HGSqlConstant.HgKc010.UPDATE_INV, dbKc010);
}
}
}
......@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.ValidFlagEnum;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
......@@ -33,6 +34,30 @@ import lombok.extern.slf4j.Slf4j;
public class HGPZTools {
/**
* 仓库管理
* HPPZ007 公共DAO定义
*
* @author:songx
* @date:2024/2/6,13:37
*/
public static class HgPz007 {
/**
* 查询
*
* @param whCode
* @return
*/
public static HGPZ007 get(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap();
queryMap.put("whCode", whCode);
List<HGPZ007> results = DaoBase.getInstance().query(HGPZ007.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
}
/**
* HPPZ009 公共DAO定义
*
* @author:songx
......@@ -71,6 +96,7 @@ public class HGPZTools {
}
/**
* 存货管理
* HGPZ005 公共DAO定义
*
* @author:songx
......
......@@ -169,7 +169,7 @@ public class AssertUtils {
* @param b
* @param message
*/
public static void isNotEqual(BigDecimal a, BigDecimal b, String message) {
public static void isNotEquals(BigDecimal a, BigDecimal b, String message) {
if (a.compareTo(b) != 0) {
throw new PlatException(message);
}
......
......@@ -17,4 +17,8 @@
<sqlMap resource="com/baosight/hggp/hg/cg/sql/HGCG002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cg/sql/HGCG003.xml"/>
<!-- 库存 -->
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/>
</sqlMapConfig>
......@@ -102,7 +102,7 @@ let submit = function () {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"审核\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG001", "submit", true);
}
......
......@@ -47,11 +47,11 @@
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hgcg.planStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="planWeight" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
......
......@@ -10,7 +10,11 @@ $(function () {
columns: [],
loadComplete: function (grid) {
// 提交
$(document.body).on("click", "#SUBMIT", submit);
$("#SUBMIT").on("click", submit);
// change事件
grid.dataSource.bind("change", function (e) {
supCodeChange(e);
});
},
onSave: function (e) {
// 阻止后台请求,使用自定义
......@@ -50,6 +54,26 @@ let query = function () {
}
/**
* 供应商变更
*/
let supCodeChange = function (e) {
if (e.field != "supCode") {
return;
}
let item = e.items[0];
let supRecordRows = __eiInfo.blocks.sup_record_block_id.rows;
for (let k = 0; k < resultGrid.getCheckedRowsIndex() + 1; k++) {
for (let i = 0; i < supRecordRows.length; i++) {
if (supRecordRows[i][1] === item.supCode) {
let supName = supRecordRows[i][0];
resultGrid.setCellValue(item, 'supName', supName == null ? "" : supName);
return;
}
}
}
}
/**
* 保存
*/
let save = function () {
......@@ -100,7 +124,7 @@ let submit = function () {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"审核\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG002", "submit", true);
}
......
......@@ -59,14 +59,15 @@
filter="contains" required="true">
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="100" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
......
......@@ -46,11 +46,11 @@
</EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="100" align="center" maxLength="100" required="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="sepcId" cname="规格ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="purQty" cname="采购数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="purQty" cname="采购数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="purWeight" cname="采购重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
......
......@@ -96,7 +96,7 @@ let confirm = function () {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"确认\"操作? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"收货\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG003", "confirm", true);
}
......
......@@ -58,13 +58,13 @@
<EF:EFColumn ename="supCode" cname="供应商编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="deliverQty" cname="退货数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="depositQty" cname="入库数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
......@@ -76,5 +76,9 @@
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion title="提示">
<span style="color: red">1."待确认"状态时,仅能修改收货数量。</span><br/>
<span style="color: red">2."质检完成"状态时,可修改"退货数量"和"入库数量",同时可进行收货确认。</span>
</EF:EFRegion>
</EF:EFPage>
......@@ -54,16 +54,16 @@
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hgcg.contractStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventRecordId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="bcReceiveQty" cname="本次</br>收货数量" width="100" align="right" format="{0:N3}"
<EF:EFColumn ename="bcReceiveQty" cname="本次</br>收货数量" width="100" align="right" format="{0:N0}"
required="true"/>
<EF:EFColumn ename="bcMaxReceiveQty" cname="本次最大</br>收货数量" enable="false" width="100" align="right"
format="{0:N3}"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="purQty" cname="采购数量" enable="false" width="100" align="right" format="{0:N3}"/>
format="{0:N0}"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="purQty" cname="采购数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="purWeight" cname="采购重量" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn ename="supCode" cname="供应商名称" enable="false" width="120" align="left" defaultValue=""
filter="contains">
......
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
},
columns: [],
loadComplete: function (grid) {
// 确认
$("#CONFIRM").on("click", confirm);
// change事件
grid.dataSource.bind("change", function (e) {
supCodeChange(e);
});
},
onSave: function (e) {
// 阻止后台请求,使用自定义
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台请求,使用自定义
e.preventDefault();
remove();
}
}
}
// 查询
$("#QUERY").on("click", query);
// 选择收货
$("#SELECT_RECEIVE").on("click", selectReceive);
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 仓库变更
*/
let supCodeChange = function (e) {
if (e.field != "whCode") {
return;
}
let item = e.items[0];
let whRecordRows = __eiInfo.blocks.wh_record_block_id.rows;
for (let k = 0; k < resultGrid.getCheckedRowsIndex() + 1; k++) {
for (let i = 0; i < whRecordRows.length; i++) {
if (whRecordRows[i][1] === item.whCode) {
let whName = whRecordRows[i][0];
resultGrid.setCellValue(item, 'whName', whName == null ? "" : whName);
return;
}
}
}
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
if (isBlank(rows[i]['whCode'])) {
message("勾选的第" + (i + 1) + "行仓库不能为空");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC001", "save", true);
}
});
}
/**
* 删除
*/
let remove = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC001", "remove", true);
}
});
}
/**
* 选择
*/
let selectReceive = function () {
JSColorbox.open({
href: "HGKC001A?methodName=initLoad",
title: "<div style='text-align: center;'>收货查询</div>",
width: "80%",
height: "80%",
callbackName: selectReceiveCallback
});
}
/**
* 选择回调
*/
let selectReceiveCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="采购入库">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="入库日期" blockId="inqu_status" ename="receiveDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="入库单号" blockId="inqu_status" ename="depositNo" row="0" colWidth="3"/>
<EF:EFInput cname="收货单号" blockId="inqu_status" ename="receiveNo" row="0" colWidth="3"/>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部"
defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.receiveStatus"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" optionLabel="全部"
defultValue="">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFDateSpan startCname="创建时间(从)" endCname="至" blockId="inqu_status"
startName="createdTimeFrom" endName="createdTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" 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" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="depositDate" cname="入库日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="depositNo" cname="入库单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="left" defaultValue=""
filter="contains" required="true">
<EF:EFOptions blockId="wh_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whName" cname="仓库名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="depositWeight" cname="入库重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<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>
<EF:EFRegion title="提示">
<span style="color: red">说明:入库数据仅支持删除,不能修改。</span>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
},
columns: [],
loadComplete: function (grid) {
// change事件
grid.dataSource.bind("change", function (e) {
supCodeChange(e);
});
}
}
}
// 查询
$("#QUERY").on("click", query);
// 确认
$("#CONFIRM").on("click", confirm);
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 仓库变更
*/
let supCodeChange = function (e) {
if (e.field != "whCode") {
return;
}
let item = e.items[0];
let whRecordRows = __eiInfo.blocks.wh_record_block_id.rows;
for (let k = 0; k < resultGrid.getCheckedRowsIndex() + 1; k++) {
for (let i = 0; i < whRecordRows.length; i++) {
if (whRecordRows[i][1] === item.whCode) {
let whName = whRecordRows[i][0];
resultGrid.setCellValue(item, 'whName', whName == null ? "" : whName);
return;
}
}
}
}
/**
* 选择
*/
let confirm = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let whCode = rows[i]['whCode'];
if (isBlank(whCode)) {
message("勾选的第" + (i + 1) + "行仓库名称不能为空");
return;
}
}
JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据生成\"采购入库\"吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC001A", "confirm",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="收货查询">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="收货日期" blockId="inqu_status" ename="receiveDate" row="0" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="收货单号" blockId="inqu_status" ename="receiveNo" row="0" colWidth="3"/>
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="供应商名称" blockId="inqu_status" ename="supCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" optionLabel="全部"
defultValue="">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="创建时间(从)" endCname="至" blockId="inqu_status"
startName="createdTimeFrom" endName="createdTimeTo" row="0" role="datetime"
format="yyyy-MM-dd HH:mm:ss" 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" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiveDate" cname="收货日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hgcg.receiveStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="supCode" cname="供应商编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" width="120" align="left" defaultValue=""
filter="contains" required="true">
<EF:EFOptions blockId="wh_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whName" cname="仓库名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="contractNo" cname="合同号" enable="false" width="120" 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>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
exportGrid: false, // 隐藏右侧自定义导出按钮
"result": {
columns: []
},
};
// 查询
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="综合库存管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3"
optionLabel="全部" filter="contains" defultValue="">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货类型" blockId="inqu_status" ename="incentType" row="0" colWidth="3" optionLabel="全部"
filter="contains" defultValue="">
<%-- 1.原料,2.耗材,5废料 --%>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="incentCode" row="0" colWidth="3" optionLabel="全部"
filter="contains" defultValue="">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3" optionLabel="全部"
filter="contains" defultValue="">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" 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:EFColumn ename="updatedName" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment