Commit f4f4e26c by 江和松

收发库存汇总页面提交

parent a8a4c433
......@@ -335,17 +335,6 @@ public class HGSqlConstant {
public static final String QUERY_SUM = "HGKC009A.querySum";
}
/**
* HGKC010 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HGKC010 {
// 锁
public static final String LOCK = "HGKC010.lock";
}
/**
* HGKC010A SQL 定义
......@@ -362,18 +351,6 @@ public class HGSqlConstant {
}
/**
* HGKC011 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HGKC011 {
// 锁
public static final String LOCK = "HGKC011.lock";
}
/**
* HGKC011A SQL 定义
*
* @author:songx
......
......@@ -38,6 +38,8 @@ public class HGKC004 extends DaoEPBase {
public static final String FIELD_SALE_OUT_CODE = "saleOutCode"; /* 销售出库单号*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_STATUS = "status"; /* 状态 0-停止 1-启用*/
public static final String COL_ID = "ID"; /* ID*/
......@@ -57,6 +59,8 @@ public class HGKC004 extends DaoEPBase {
public static final String COL_SALE_OUT_CODE = "SALE_OUT_CODE"; /* 销售出库单号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_STATUS = "STATUS"; /* 状态 0-停止 1-启用*/
public static final String QUERY = "HGKC004.query";
......@@ -84,6 +88,8 @@ public class HGKC004 extends DaoEPBase {
private String saleOutCode = " "; /* 销售出库单号*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private Integer status = 0; /* 状态 0-未提交 1-已提交*/
/**
......@@ -161,6 +167,14 @@ public class HGKC004 extends DaoEPBase {
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0-停止 1-启用");
eiMetadata.addMeta(eiColumn);
......@@ -463,6 +477,23 @@ public class HGKC004 extends DaoEPBase {
public void setStatus(Integer status) {
this.status = status;
}
public String getProjCode() {
return projCode;
}
public void setProjCode(String projCode) {
this.projCode = projCode;
}
public String getProjName() {
return projName;
}
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the value from Map.
*
......@@ -488,6 +519,8 @@ public class HGKC004 extends DaoEPBase {
setSaleOutCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SALE_OUT_CODE)), saleOutCode));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
......@@ -515,6 +548,8 @@ public class HGKC004 extends DaoEPBase {
map.put(FIELD_SALE_OUT_CODE, StringUtils.toString(saleOutCode, eiMetadata.getMeta(FIELD_SALE_OUT_CODE)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
......
......@@ -49,6 +49,11 @@ public class HGKC004A extends DaoEPBase {
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_WH_CODE = "whCode"; /* 仓库编码*/
public static final String FIELD_WH_NAME = "whName"; /* 仓库名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
......@@ -76,6 +81,12 @@ public class HGKC004A extends DaoEPBase {
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String QUERY = "HGKC004A.query";
public static final String COUNT = "HGKC004A.count";
public static final String INSERT = "HGKC004A.insert";
......@@ -110,6 +121,13 @@ public class HGKC004A extends DaoEPBase {
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
/**
* initialize the metadata.
*/
......@@ -246,6 +264,23 @@ public class HGKC004A extends DaoEPBase {
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_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -671,6 +706,39 @@ public class HGKC004A extends DaoEPBase {
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public String getWhCode() {
return whCode;
}
public void setWhCode(String whCode) {
this.whCode = whCode;
}
public String getWhName() {
return whName;
}
public void setWhName(String whName) {
this.whName = whName;
}
public String getProjCode() {
return projCode;
}
public void setProjCode(String projCode) {
this.projCode = projCode;
}
public String getProjName() {
return projName;
}
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the value from Map.
*
......@@ -705,6 +773,11 @@ public class HGKC004A extends DaoEPBase {
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
}
/**
......@@ -741,6 +814,11 @@ public class HGKC004A extends DaoEPBase {
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
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_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
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;
......@@ -18,16 +19,112 @@ import java.util.Map;
* @version 1.0
* @history 2024-05-13 15:39:23 create
*/
public class HGKC010A extends HGKC010 {
public class HGKC010A 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 FIELD_APPLY_QTY = "applyQty"; /* 申请数量*/
public static final String FIELD_APPLY_REMARK = "applyRemark"; /* 申请说明*/
public static final String FIELD_DATE_PROC = "dateProc"; /* 日期*/
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 COL_APPLY_QTY = "APPLY_QTY"; /* 申请数量*/
public static final String COL_APPLY_REMARK = "APPLY_REMARK"; /* 申请说明*/
public static final String COL_DATE_PROC = "DATE_PROC"; /* 日期*/
public static final String QUERY = "HGKC010A.query";
public static final String COUNT = "HGKC010A.count";
public static final String INSERT = "HGKC010A.insert";
public static final String UPDATE = "HGKC010A.update";
public static final String DELETE = "HGKC010A.delete";
public static final String DELETE_BY_TIME = "HGKC010A.deleteByTime";
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 = " "; /* 厂区名称*/
private BigDecimal applyQty = new BigDecimal(0.000); /* 申请数量*/
private String applyRemark = " "; /* 申请说明*/
private String dateProc = " "; /* 日期*/
......@@ -38,6 +135,141 @@ public class HGKC010A extends HGKC010 {
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);
eiColumn = new EiColumn(FIELD_APPLY_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
......@@ -60,7 +292,6 @@ public class HGKC010A extends HGKC010 {
* the constructor.
*/
public HGKC010A() {
super.initMetaData();
initMetaData();
}
......@@ -88,6 +319,238 @@ public class HGKC010A extends HGKC010 {
this.dateProc = dateProc;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getAccountCode() {
return accountCode;
}
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
public String getDepCode() {
return depCode;
}
public void setDepCode(String depCode) {
this.depCode = depCode;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedName() {
return createdName;
}
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
public String getCreatedTime() {
return createdTime;
}
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedName() {
return updatedName;
}
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
public String getUpdatedTime() {
return updatedTime;
}
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getWhCode() {
return whCode;
}
public void setWhCode(String whCode) {
this.whCode = whCode;
}
public String getWhName() {
return whName;
}
public void setWhName(String whName) {
this.whName = whName;
}
public String getInventType() {
return inventType;
}
public void setInventType(String inventType) {
this.inventType = inventType;
}
public String getInventCode() {
return inventCode;
}
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
public String getInventName() {
return inventName;
}
public void setInventName(String inventName) {
this.inventName = inventName;
}
public Long getSpecId() {
return specId;
}
public void setSpecId(Long specId) {
this.specId = specId;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
public BigDecimal getLength() {
return length;
}
public void setLength(BigDecimal length) {
this.length = length;
}
public BigDecimal getWidth() {
return width;
}
public void setWidth(BigDecimal width) {
this.width = width;
}
public BigDecimal getThick() {
return thick;
}
public void setThick(BigDecimal thick) {
this.thick = thick;
}
public BigDecimal getInvQty() {
return invQty;
}
public void setInvQty(BigDecimal invQty) {
this.invQty = invQty;
}
public BigDecimal getInvUnitWeight() {
return invUnitWeight;
}
public void setInvUnitWeight(BigDecimal invUnitWeight) {
this.invUnitWeight = invUnitWeight;
}
public BigDecimal getInvWeight() {
return invWeight;
}
public void setInvWeight(BigDecimal invWeight) {
this.invWeight = invWeight;
}
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryName() {
return factoryName;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the value from Map.
*
......@@ -95,7 +558,35 @@ public class HGKC010A extends HGKC010 {
*/
@Override
public void fromMap(Map map) {
super.fromMap(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));
setApplyQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_APPLY_QTY)), applyQty));
setApplyRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_APPLY_REMARK)), applyRemark));
setDateProc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DATE_PROC)), dateProc));
......@@ -107,7 +598,36 @@ public class HGKC010A extends HGKC010 {
@Override
public Map toMap() {
Map map = super.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)));
map.put(FIELD_APPLY_QTY, StringUtils.toString(applyQty, eiMetadata.getMeta(FIELD_APPLY_QTY)));
map.put(FIELD_APPLY_REMARK, StringUtils.toString(applyRemark, eiMetadata.getMeta(FIELD_APPLY_REMARK)));
map.put(FIELD_DATE_PROC, StringUtils.toString(dateProc, eiMetadata.getMeta(FIELD_DATE_PROC)));
......
......@@ -85,13 +85,13 @@ public class ServiceHGKC002A extends ServiceEPBase {
@OperationLogAnnotation(operModul = "库存查询", operType = "插入", operDesc = "生产领料单-库存查询-生成出库单")
public EiInfo select(EiInfo inInfo) {
try {
List<HGKC010A> hc010as = MapUtils.toDaoEPBase(inInfo, HGKC010A.class);
List<HGKC010A> hc010s = MapUtils.toDaoEPBase(inInfo, HGKC010A.class);
// 获取库存信息
Map<Long, HGKC010> dbKc010Map = HGKCUtils.HgKc010.lockGetDataEp(hc010as);
Map<Long, HGKC010A> dbKc010Map = HGKCUtils.HgKc010A.lockGetDataEp(hc010s);
// 状态校验
this.checkData(hc010as, dbKc010Map);
this.checkData(hc010s, dbKc010Map);
// 生成销售库单
this.saveData(hc010as, dbKc010Map);
this.saveData(hc010s, dbKc010Map);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成领料单失败");
}
......@@ -104,10 +104,10 @@ public class ServiceHGKC002A extends ServiceEPBase {
* @param fKc010as
* @param dbKc010Map
*/
private void checkData(List<HGKC010A> fKc010as, Map<Long, HGKC010> dbKc010Map) {
private void checkData(List<HGKC010A> fKc010as, Map<Long, HGKC010A> dbKc010Map) {
for (HGKC010A fKc010a : fKc010as) {
Long id = fKc010a.getId();
HGKC010 dbKc010 = dbKc010Map.get(id);
HGKC010A dbKc010 = dbKc010Map.get(id);
AssertUtils.isNull(dbKc010, String.format("库存号[%s]不存在!", id));
// 校验数量
AssertUtils.isGt(fKc010a.getApplyQty(), dbKc010.getInvQty(),
......@@ -121,11 +121,11 @@ public class ServiceHGKC002A extends ServiceEPBase {
* @param fKc010as
* @param dbKc010Map
*/
private void saveData(List<HGKC010A> fKc010as, Map<Long, HGKC010> dbKc010Map) {
private void saveData(List<HGKC010A> fKc010as, Map<Long, HGKC010A> dbKc010Map) {
for (HGKC010A fKc010a : fKc010as) {
BigDecimal applyQty = fKc010a.getApplyQty();
Long invId = fKc010a.getId();
HGKC010 dbKc010 = dbKc010Map.get(invId);
HGKC010A dbKc010 = dbKc010Map.get(invId);
HGKC002 newKc002 = BeanUtils.copy(dbKc010, HGKC002.class);
newKc002.setReqNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_REQ_NO));
newKc002.setReceiptDate(DateUtils.shortDate());
......
......@@ -47,9 +47,9 @@ public class ServiceHGKC009 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC009().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -162,7 +162,7 @@ public class ServiceHGKC009 extends ServiceBase {
*/
private List<HGKC009> statData(Map queryMap) {
// 1.1、期末库存
Map<String, HGKC010A> endKcs = this.listInvData(queryMap, HGKC010A.QUERY);
Map<String, HGKC010> endKcs = this.listInvData(queryMap, HGKC010.QUERY);
// 1.2、采购入库
Map<String, HGKC001> cgRkMap = this.listInvData(queryMap, HGSqlConstant.HGKC001.STAT_DATE);
// 1.4、其他入库
......@@ -174,7 +174,8 @@ public class ServiceHGKC009 extends ServiceBase {
// 1.7、其它出库
Map<String, HGKC007A> qtCkMap = this.listInvData(queryMap, HGSqlConstant.HGKC007A.STAT_DATE);
// 1.8、盘点差异数量
Map<String, HGKC005> pdDiffMap = this.listInvData(queryMap, HGSqlConstant.HGKC005.STAT_DATE);
// Map<String, HGKC005> pdDiffMap = this.listInvData(queryMap, HGSqlConstant.HGKC005.STAT_DATE);
Map<String, HGKC005> pdDiffMap = null;
// 1.9、期初库存
Map<String, HGKC009> initKcMap = this.listInvData(queryMap, HGKC009.QUERY);
// 2.0 销售出库
......@@ -198,15 +199,16 @@ public class ServiceHGKC009 extends ServiceBase {
* @param xsCkMap
* @return
*/
private List<HGKC009> buildKcBean(Map queryMap, Map<String, HGKC010A> endKcs, Map<String, HGKC001> cgRkMap,
private List<HGKC009> buildKcBean(Map queryMap, Map<String, HGKC010> endKcs, Map<String, HGKC001> cgRkMap,
Map<String, HGKC006A> qtRkMap, Map<String, HGKC008A> scCkMap, Map<String, HGKC007A> qtCkMap,
Map<String, HGKC005> pdDiffMap, Map<String, HGKC009> initKcMap, Map<String, HGKC003> scRkMap,
Map<String, HGKC004A> xsCkMap) {
List<HGKC009> newKc009s = new ArrayList<>();
for (Map.Entry<String, HGKC010A> entry : endKcs.entrySet()) {
for (Map.Entry<String, HGKC010> entry : endKcs.entrySet()) {
String key = entry.getKey();
HGKC010A endKc = entry.getValue();
HGKC010 endKc = entry.getValue();
HGKC009 kc009 = BeanUtils.copy(endKc, HGKC009.class);
kc009.setInventRecordId(endKc.getSpecId());
kc009.setDateType(queryMap.get("dateType").toString());
kc009.setDateProc(queryMap.get("yesterDate").toString());
// 1.1期末
......@@ -251,9 +253,9 @@ public class ServiceHGKC009 extends ServiceBase {
kc009.setOuterWeight(kc009.getScOuterWeight().add(kc009.getXsOuterWeight())
.add(kc009.getQtOuterWeight()));
// 1.8、盘点差异数量
HGKC005 pdDiff = pdDiffMap.get(key);
kc009.setPdDiffAmount(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffAmount());
kc009.setPdDiffWeight(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffWeight());
// HGKC005 pdDiff = pdDiffMap.get(key);
// kc009.setPdDiffAmount(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffAmount());
// kc009.setPdDiffWeight(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffWeight());
// 1.9、期初
HGKC009 initKc = initKcMap.get(key);
kc009.setInitAmount(initKc != null ? initKc.getEndAmount() : kc009.getEndAmount()
......
......@@ -215,7 +215,7 @@
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE,SPEC_ID
</select>
</sqlMap>
......@@ -22,6 +22,8 @@
SALE_OUT_CODE as "saleOutCode", <!-- 销售出库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
STATUS as "status" <!-- 状态 0-停止 1-启用 -->
</sql>
<sql id="condition">
......@@ -77,6 +79,12 @@
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
......@@ -132,11 +140,13 @@
SALE_OUT_CODE, <!-- 销售出库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
STATUS <!-- 状态 0-停止 1-启用 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#,
#whName#, #status#)
#whName#,#projCode#,#projName#, #status#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC004
</selectKey>
......@@ -176,6 +186,8 @@
SALE_OUT_CODE = #saleOutCode#, <!-- 销售出库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
STATUS = #status# <!-- 状态 0-停止 1-启用 -->
WHERE
ID = #id#
......@@ -253,6 +265,12 @@
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
......@@ -265,61 +283,5 @@
</isEmpty>
</dynamic>
</select>
<!--
<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="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="saleOutCode">
SALE_OUT_CODE = #saleOutCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
</sqlMap>
......@@ -216,7 +216,7 @@
</update>
<!-- 统计库存 -->
<select id="statDate" resultClass="HGKC004">
<select id="statDate" resultClass="com.baosight.hggp.hg.kc.domain.HGKC004A">
SELECT
a.ACCOUNT_CODE AS "accountCode",
a.COMPANY_CODE as "companyCode",
......
......@@ -80,7 +80,7 @@
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
INVENT_NAME like CONCAT('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
......@@ -99,7 +99,7 @@
</sql>
<!-- 查询 -->
<select id="query" resultClass="com.baosight.hpjx.hp.kc.domain.HGKC009">
<select id="query" resultClass="com.baosight.hggp.hg.kc.domain.HGKC009">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC009
......@@ -114,7 +114,7 @@
</select>
<!-- 查询统计 -->
<select id="querySum" resultClass="com.baosight.hpjx.hp.kc.domain.HGKC009">
<select id="querySum" resultClass="com.baosight.hggp.hg.kc.domain.HGKC009">
SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 -->
......
......@@ -613,6 +613,37 @@ public class HGKCTools {
}
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,14:33
*/
public static class HgKc010A {
/**
* 查询
*
* @param ids
* @return
*/
public static List<HGKC010A> list(List<Long> ids) {
AssertUtils.isEmpty(ids, "库存ID不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
return DaoBase.getInstance().query(HGKC010A.QUERY, paramMap);
}
/**
* 查询
*
* @param ids
* @return
*/
public static Map<Long, HGKC010A> map(List<Long> ids) {
List<HGKC010A> results = list(ids);
return results.stream().collect(Collectors.toMap(HGKC010A::getId, item -> item));
}
}
/**
* HGKC011 工具类
*
* @author:songx
......
......@@ -365,6 +365,36 @@ public class HGKCUtils {
}
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public static class HgKc010A {
/**
* 锁并且获取数据
*
* @param kc010s
* @return
*/
public static Map<Long, HGKC010A> lockGetDataEp(List<HGKC010A> kc010s) {
return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010A.FIELD_ID));
}
/**
* 锁并且获取数据
*
* @param ids
* @return
*/
public static Map<Long, HGKC010A> lockGetData(List<Long> ids) {
// 锁
HGKCTools.HgKc010.lock(ids);
// db数据
return HGKCTools.HgKc010A.map(ids);
}
}
/**
* HGKC011 工具类
*
* @author:songx
......
......@@ -28,6 +28,7 @@
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC004.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC004A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC011.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013A.xml"/>
......
$(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
}
// 查询
$("#QUERY").on("click", query);
//手动触发按天统计
$("#STARTDAY").on("click",function () {
JSUtils.confirm("确定手动触发按天统计自动任务? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC009", "statDay", true);
}
});
});
//手动触发按月统计
$("#STARTMONTH").on("click",function () {
JSUtils.confirm("确定手动触发按天统计自动任务? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC009", "statMonth", true);
}
});
});
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 删除
*/
let startDay = function () {
JSUtils.confirm("确定手动触发按天统计自动任务? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC009", "statDay", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="库存收发存">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-dateProc" colWidth="3"
role="date" format="yyyy-MM" readonly="true" start="year" depth="year" />
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-inventName" cname="存货名称" colWidth="3"/>
<%-- <EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains">--%>
<%-- <EF:EFOption label="全部" value=""/>--%>
<%-- <EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFSelect cname="规格" ename="inqu_status-0-inventRecordId" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="dateProc" cname="日期" enable="false" width="90" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="120" align="center"
blockName="invent_type_block_id" textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="100" align="center"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center"
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="initAmount" cname="期初数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="initWeight" cname="期初重量(T)" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterAmount" cname="采购入库数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量(T)" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="enterWeight" cname="入库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="qtOuterWeight" cname="其它出库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="outerWeight" cname="出库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="endWeight" cname="期末重量(T)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
</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