Commit 19022e84 by liuyang

2024-07-04 1、原材料成本核算

parent 3032d3e4
package com.baosight.hggp.common;
import com.baosight.iplat4j.core.ei.EiBlock;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/25
*/
public enum BizTypeEnum {
/**
* 采购入库单
*/
CGRK(1,"采购入库单"),
/**
* 其他入库单
*/
QTRK(2,"其他入库单"),
/**
* 生产领料单
*/
SCLL(3,"生产领料单"),
/**
* 其他出库单
*/
QTCK(4,"其他出库单");
private Integer code;
private String value;
BizTypeEnum(Integer code, String value) {
this.code = code;
this.value = value;
}
public static EiBlock generatorEiBlock() {
EiBlock block = new EiBlock("biz_type_block_id");
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>() {{
add(new HashMap<String, Object>() {{
put(HGConstants.TEXT_FIELD, CGRK.value);
put(HGConstants.VALUE_FIELD, CGRK.code);
}});
add(new HashMap<String, Object>() {{
put(HGConstants.TEXT_FIELD, QTRK.value);
put(HGConstants.VALUE_FIELD, QTRK.code);
}});
add(new HashMap<String, Object>() {{
put(HGConstants.TEXT_FIELD, SCLL.value);
put(HGConstants.VALUE_FIELD, SCLL.code);
}});
add(new HashMap<String, Object>() {{
put(HGConstants.TEXT_FIELD, QTCK.value);
put(HGConstants.VALUE_FIELD, QTCK.code);
}});
}};
block.setRows(rows);
return block;
}
public static BizTypeEnum getEnumByCode(Integer code){
for (BizTypeEnum en : BizTypeEnum.values()){
if(code.compareTo(en.code)==0){
return en;
}
}
return null;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
......@@ -9,10 +9,21 @@ import java.util.*;
* @version 1.0 2024/6/27
*/
public enum InventTypeDetailEnum {
/**
* 构件
*/
COMPONENT(1,"构件"),
/**
* 零件
*/
SEMI_FINISHED_PRODUCT(2,"零件"),
/**
* 原料
*/
RAW(3,"原料"),
/**
* 耗材
*/
CONSUMABLE(4,"耗材");
private Integer code;
......
package com.baosight.hggp.hg.cb.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgcb002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-25 11:30:34 create
*/
public class HGCB002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "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_ACCOUNT_YEAR = "accountYear"; /* 会计年度*/
public static final String FIELD_ACCOUNT_PERIOD = "accountPeriod"; /* 会计期*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_RECEIPT_CODE = "receiptCode"; /* 单据号*/
public static final String FIELD_RECEIVE_NO = "receiveNo"; /* 收货单号*/
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_UNIT = "unit"; /* 单位*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_IS_ESTIMATE = "isEstimate"; /* 是否暂估:0-否 1-是*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
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"; /* 部门编码*/
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_ACCOUNT_YEAR = "ACCOUNT_YEAR"; /* 会计年度*/
public static final String COL_ACCOUNT_PERIOD = "ACCOUNT_PERIOD"; /* 会计期*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_RECEIPT_CODE = "RECEIPT_CODE"; /* 单据号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_SPEC_ID = "SPEC_ID"; /* 规格ID*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_QUANTITY = "QUANTITY"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_IS_ESTIMATE = "IS_ESTIMATE"; /* 是否暂估:0-否 1-是*/
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String QUERY = "HGCB002.query";
public static final String QUERY_DETAIL = "HGCB002.queryDetail";
public static final String COUNT = "HGCB002.count";
public static final String INSERT = "HGCB002.insert";
public static final String UPDATE = "HGCB002.update";
public static final String DELETE = "HGCB002.delete";
private Long id = new Long(0); /* ID*/
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; /* 是否删除: 0-否 1-是*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String accountYear = " "; /* 会计年度*/
private String accountPeriod = " "; /* 会计期*/
private Integer bizType = 0; /* 业务类型 1 采购入库单,2 其他入库单,3 生产领料单*/
private String receiptDate = " "; /* 单据日期*/
private String receiptCode = " "; /* 单据号*/
private String receiveNo = " "; /* 收货单号*/
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 unit = " "; /* 单位*/
private BigDecimal quantity = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private Integer isEstimate = 0; /* 是否暂估:0-否 1-是*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_ACCOUNT_YEAR);
eiColumn.setDescName("会计年度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_PERIOD);
eiColumn.setDescName("会计期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_DATE);
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_CODE);
eiColumn.setDescName("单据号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_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_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_ESTIMATE);
eiColumn.setDescName("是否暂估:0-否 1-是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCB002() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the 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 accountYear - 会计年度.
* @return the accountYear
*/
public String getAccountYear() {
return this.accountYear;
}
/**
* set the accountYear - 会计年度.
*
* @param accountYear - 会计年度
*/
public void setAccountYear(String accountYear) {
this.accountYear = accountYear;
}
/**
* get the accountPeriod - 会计期.
* @return the accountPeriod
*/
public String getAccountPeriod() {
return this.accountPeriod;
}
/**
* set the accountPeriod - 会计期.
*
* @param accountPeriod - 会计期
*/
public void setAccountPeriod(String accountPeriod) {
this.accountPeriod = accountPeriod;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
public Integer getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(Integer bizType) {
this.bizType = bizType;
}
/**
* get the receiptDate - 单据日期.
* @return the receiptDate
*/
public String getReceiptDate() {
return this.receiptDate;
}
/**
* set the receiptDate - 单据日期.
*
* @param receiptDate - 单据日期
*/
public void setReceiptDate(String receiptDate) {
this.receiptDate = receiptDate;
}
/**
* get the receiptCode - 单据号.
* @return the receiptCode
*/
public String getReceiptCode() {
return this.receiptCode;
}
/**
* set the receiptCode - 单据号.
*
* @param receiptCode - 单据号
*/
public void setReceiptCode(String receiptCode) {
this.receiptCode = receiptCode;
}
/**
* get the receiveNo - 收货单号.
* @return the receiveNo
*/
public String getReceiveNo() {
return this.receiveNo;
}
/**
* set the receiveNo - 收货单号.
*
* @param receiveNo - 收货单号
*/
public void setReceiveNo(String receiveNo) {
this.receiveNo = receiveNo;
}
/**
* 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 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 quantity - 数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the weight - 重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量.
*
* @param weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the isEstimate - 是否暂估:0-否 1-是.
* @return the isEstimate
*/
public Integer getIsEstimate() {
return this.isEstimate;
}
/**
* set the isEstimate - 是否暂估:0-否 1-是.
*
* @param isEstimate - 是否暂估:0-否 1-是
*/
public void setIsEstimate(Integer isEstimate) {
this.isEstimate = isEstimate;
}
/**
* get the price - 单价.
* @return the price
*/
public BigDecimal getPrice() {
return this.price;
}
/**
* set the price - 单价.
*
* @param price - 单价
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* get the amount - 金额.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 金额.
*
* @param amount - 金额
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the 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));
setAccountYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_YEAR)), accountYear));
setAccountPeriod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_PERIOD)), accountPeriod));
setBizType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setReceiptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_CODE)), receiptCode));
setReceiveNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_NO)), receiveNo));
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));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setIsEstimate(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_ESTIMATE)), isEstimate));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
}
/**
* 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_ACCOUNT_YEAR, StringUtils.toString(accountYear, eiMetadata.getMeta(FIELD_ACCOUNT_YEAR)));
map.put(FIELD_ACCOUNT_PERIOD, StringUtils.toString(accountPeriod, eiMetadata.getMeta(FIELD_ACCOUNT_PERIOD)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_RECEIPT_CODE, StringUtils.toString(receiptCode, eiMetadata.getMeta(FIELD_RECEIPT_CODE)));
map.put(FIELD_RECEIVE_NO, StringUtils.toString(receiveNo, eiMetadata.getMeta(FIELD_RECEIVE_NO)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC_ID, StringUtils.toString(specId, eiMetadata.getMeta(FIELD_SPEC_ID)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_IS_ESTIMATE, StringUtils.toString(isEstimate, eiMetadata.getMeta(FIELD_IS_ESTIMATE)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
return map;
}
}
package com.baosight.hggp.hg.cb.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgcb003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-25 11:30:34 create
*/
public class HGCB003 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "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_ACCOUNT_YEAR = "accountYear"; /* 会计年度*/
public static final String FIELD_ACCOUNT_PERIOD = "accountPeriod"; /* 会计期*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
public static final String FIELD_RECEIPT_CODE = "receiptCode"; /* 单据号*/
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_UNIT = "unit"; /* 单位*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_IS_ESTIMATE = "isEstimate"; /* 是否暂估:0-否 1-是*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
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"; /* 部门编码*/
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_ACCOUNT_YEAR = "ACCOUNT_YEAR"; /* 会计年度*/
public static final String COL_ACCOUNT_PERIOD = "ACCOUNT_PERIOD"; /* 会计期*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
public static final String COL_RECEIPT_CODE = "RECEIPT_CODE"; /* 单据号*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_SPEC_ID = "SPEC_ID"; /* 规格ID*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_UNIT = "UNIT"; /* 单位*/
public static final String COL_QUANTITY = "QUANTITY"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_IS_ESTIMATE = "IS_ESTIMATE"; /* 是否暂估:0-否 1-是*/
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String COL_AMOUNT = "AMOUNT"; /* 金额*/
public static final String QUERY = "HGCB003.query";
public static final String QUERY_DETAIL = "HGCB003.queryDetail";
public static final String COUNT = "HGCB003.count";
public static final String INSERT = "HGCB003.insert";
public static final String UPDATE = "HGCB003.update";
public static final String DELETE = "HGCB003.delete";
private Long id = new Long(0); /* ID*/
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; /* 是否删除: 0-否 1-是*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String accountYear = " "; /* 会计年度*/
private String accountPeriod = " "; /* 会计期*/
private Integer bizType = 0; /* 业务类型 1 采购入库单,2 其他入库单,3 生产领料单*/
private String receiptDate = " "; /* 单据日期*/
private String receiptCode = " "; /* 单据号*/
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 unit = " "; /* 单位*/
private BigDecimal quantity = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private Integer isEstimate = 0; /* 是否暂估:0-否 1-是*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_ACCOUNT_YEAR);
eiColumn.setDescName("会计年度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_PERIOD);
eiColumn.setDescName("会计期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_DATE);
eiColumn.setDescName("单据日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIPT_CODE);
eiColumn.setDescName("单据号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_CODE);
eiColumn.setDescName("仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WH_NAME);
eiColumn.setDescName("仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
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_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_ESTIMATE);
eiColumn.setDescName("是否暂估:0-否 1-是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCB003() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the 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 accountYear - 会计年度.
* @return the accountYear
*/
public String getAccountYear() {
return this.accountYear;
}
/**
* set the accountYear - 会计年度.
*
* @param accountYear - 会计年度
*/
public void setAccountYear(String accountYear) {
this.accountYear = accountYear;
}
/**
* get the accountPeriod - 会计期.
* @return the accountPeriod
*/
public String getAccountPeriod() {
return this.accountPeriod;
}
/**
* set the accountPeriod - 会计期.
*
* @param accountPeriod - 会计期
*/
public void setAccountPeriod(String accountPeriod) {
this.accountPeriod = accountPeriod;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
public Integer getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(Integer bizType) {
this.bizType = bizType;
}
/**
* get the receiptDate - 单据日期.
* @return the receiptDate
*/
public String getReceiptDate() {
return this.receiptDate;
}
/**
* set the receiptDate - 单据日期.
*
* @param receiptDate - 单据日期
*/
public void setReceiptDate(String receiptDate) {
this.receiptDate = receiptDate;
}
/**
* get the receiptCode - 单据号.
* @return the receiptCode
*/
public String getReceiptCode() {
return this.receiptCode;
}
/**
* set the receiptCode - 单据号.
*
* @param receiptCode - 单据号
*/
public void setReceiptCode(String receiptCode) {
this.receiptCode = receiptCode;
}
/**
* 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 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 quantity - 数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 数量.
*
* @param quantity - 数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the weight - 重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 重量.
*
* @param weight - 重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the isEstimate - 是否暂估:0-否 1-是.
* @return the isEstimate
*/
public Integer getIsEstimate() {
return this.isEstimate;
}
/**
* set the isEstimate - 是否暂估:0-否 1-是.
*
* @param isEstimate - 是否暂估:0-否 1-是
*/
public void setIsEstimate(Integer isEstimate) {
this.isEstimate = isEstimate;
}
/**
* get the price - 单价.
* @return the price
*/
public BigDecimal getPrice() {
return this.price;
}
/**
* set the price - 单价.
*
* @param price - 单价
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* get the amount - 金额.
* @return the amount
*/
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 金额.
*
* @param amount - 金额
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the 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));
setAccountYear(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_YEAR)), accountYear));
setAccountPeriod(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_PERIOD)), accountPeriod));
setBizType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setReceiptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_CODE)), receiptCode));
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));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setIsEstimate(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_ESTIMATE)), isEstimate));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
}
/**
* 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_ACCOUNT_YEAR, StringUtils.toString(accountYear, eiMetadata.getMeta(FIELD_ACCOUNT_YEAR)));
map.put(FIELD_ACCOUNT_PERIOD, StringUtils.toString(accountPeriod, eiMetadata.getMeta(FIELD_ACCOUNT_PERIOD)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
map.put(FIELD_RECEIPT_DATE, StringUtils.toString(receiptDate, eiMetadata.getMeta(FIELD_RECEIPT_DATE)));
map.put(FIELD_RECEIPT_CODE, StringUtils.toString(receiptCode, eiMetadata.getMeta(FIELD_RECEIPT_CODE)));
map.put(FIELD_WH_CODE, StringUtils.toString(whCode, eiMetadata.getMeta(FIELD_WH_CODE)));
map.put(FIELD_WH_NAME, StringUtils.toString(whName, eiMetadata.getMeta(FIELD_WH_NAME)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
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_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_IS_ESTIMATE, StringUtils.toString(isEstimate, eiMetadata.getMeta(FIELD_IS_ESTIMATE)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
return map;
}
}
package com.baosight.hggp.hg.cb.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgcb004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-07-01 15:13:14 create
*/
public class HGCB004 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "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_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_DATE_TYPE = "dateType"; /* 日期类型:DAY:天,MONTH:月*/
public static final String FIELD_ACCOUNT_PERIOD = "accountPeriod"; /* 日期*/
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_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格ID*/
public static final String FIELD_INIT_QUANTITY = "initQuantity"; /* 期初数量*/
public static final String FIELD_INIT_WEIGHT = "initWeight"; /* 期初重量*/
public static final String FIELD_INIT_AMOUNT = "initAmount"; /* 期初金额*/
public static final String FIELD_CG_ENTER_QUANTITY = "cgEnterQuantity"; /* 采购入库数量*/
public static final String FIELD_CG_ENTER_WEIGHT = "cgEnterWeight"; /* 采购入库重量*/
public static final String FIELD_CG_ENTER_AMOUNT = "cgEnterAmount"; /* 采购入库金额*/
public static final String FIELD_SC_ENTER_QUANTITY = "scEnterQuantity"; /* 生产入库数量*/
public static final String FIELD_SC_ENTER_WEIGHT = "scEnterWeight"; /* 生产入库重量*/
public static final String FIELD_SC_ENTER_AMOUNT = "scEnterAmount"; /* 生产入库金额*/
public static final String FIELD_QT_ENTER_QUANTITY = "qtEnterQuantity"; /* 其它入库数量*/
public static final String FIELD_QT_ENTER_WEIGHT = "qtEnterWeight"; /* 其它入库重量*/
public static final String FIELD_QT_ENTER_AMOUNT = "qtEnterAmount"; /* 其它入库重量*/
public static final String FIELD_ENTER_QUANTITY = "enterQuantity"; /* 入库数量*/
public static final String FIELD_ENTER_WEIGHT = "enterWeight"; /* 入库重量*/
public static final String FIELD_ENTER_AMOUNT = "enterAmount"; /* 入库金额*/
public static final String FIELD_SC_OUTER_QUANTITY = "scOuterQuantity"; /* 生产领料数量*/
public static final String FIELD_SC_OUTER_WEIGHT = "scOuterWeight"; /* 生产领料重量*/
public static final String FIELD_SC_OUTER_AMOUNT = "scOuterAmount"; /* 生产领料金额*/
public static final String FIELD_XS_OUTER_QUANTITY = "xsOuterQuantity"; /* 销售出库数量*/
public static final String FIELD_XS_OUTER_WEIGHT = "xsOuterWeight"; /* 销售出库重量*/
public static final String FIELD_XS_OUTER_AMOUNT = "xsOuterAmount"; /* 销售出库金额*/
public static final String FIELD_QT_OUTER_QUANTITY = "qtOuterQuantity"; /* 其它出库数量*/
public static final String FIELD_QT_OUTER_WEIGHT = "qtOuterWeight"; /* 其它出库重量*/
public static final String FIELD_QT_OUTER_AMOUNT = "qtOuterAmount"; /* 其它出库数量*/
public static final String FIELD_OUTER_QUANTITY = "outerQuantity"; /* 出库数量*/
public static final String FIELD_OUTER_WEIGHT = "outerWeight"; /* 出库重量*/
public static final String FIELD_OUTER_AMOUNT = "outerAmount"; /* 出库金额*/
public static final String FIELD_PD_DIFF_QUANTITY = "pdDiffQuantity"; /* 盘点差异数量*/
public static final String FIELD_PD_DIFF_WEIGHT = "pdDiffWeight"; /* 盘点差异重量*/
public static final String FIELD_PD_DIFF_AMOUNT = "pdDiffAmount"; /* 盘点差异金额*/
public static final String FIELD_END_QUANTITY = "endQuantity"; /* 期末数量*/
public static final String FIELD_END_WEIGHT = "endWeight"; /* 期末重量*/
public static final String FIELD_END_AMOUNT = "endAmount"; /* 期末金额*/
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"; /* 部门编码*/
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_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_DATE_TYPE = "DATE_TYPE"; /* 日期类型:DAY:天,MONTH:月*/
public static final String COL_DATE_PROC = "DATE_PROC"; /* 日期*/
public static final String COL_WH_CODE = "WH_CODE"; /* 仓库编码*/
public static final String COL_WH_NAME = "WH_NAME"; /* 仓库名称*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 规格ID*/
public static final String COL_INIT_QUANTITY = "INIT_QUANTITY"; /* 期初数量*/
public static final String COL_INIT_WEIGHT = "INIT_WEIGHT"; /* 期初重量*/
public static final String COL_INIT_AMOUNT = "INIT_AMOUNT"; /* 期初金额*/
public static final String COL_CG_ENTER_QUANTITY = "CG_ENTER_QUANTITY"; /* 采购入库数量*/
public static final String COL_CG_ENTER_WEIGHT = "CG_ENTER_WEIGHT"; /* 采购入库重量*/
public static final String COL_CG_ENTER_AMOUNT = "CG_ENTER_AMOUNT"; /* 采购入库金额*/
public static final String COL_SC_ENTER_QUANTITY = "SC_ENTER_QUANTITY"; /* 生产入库数量*/
public static final String COL_SC_ENTER_WEIGHT = "SC_ENTER_WEIGHT"; /* 生产入库重量*/
public static final String COL_SC_ENTER_AMOUNT = "SC_ENTER_AMOUNT"; /* 生产入库金额*/
public static final String COL_QT_ENTER_QUANTITY = "QT_ENTER_QUANTITY"; /* 其它入库数量*/
public static final String COL_QT_ENTER_WEIGHT = "QT_ENTER_WEIGHT"; /* 其它入库重量*/
public static final String COL_QT_ENTER_AMOUNT = "QT_ENTER_AMOUNT"; /* 其它入库重量*/
public static final String COL_ENTER_QUANTITY = "ENTER_QUANTITY"; /* 入库数量*/
public static final String COL_ENTER_WEIGHT = "ENTER_WEIGHT"; /* 入库重量*/
public static final String COL_ENTER_AMOUNT = "ENTER_AMOUNT"; /* 入库金额*/
public static final String COL_SC_OUTER_QUANTITY = "SC_OUTER_QUANTITY"; /* 生产领料数量*/
public static final String COL_SC_OUTER_WEIGHT = "SC_OUTER_WEIGHT"; /* 生产领料重量*/
public static final String COL_SC_OUTER_AMOUNT = "SC_OUTER_AMOUNT"; /* 生产领料金额*/
public static final String COL_XS_OUTER_QUANTITY = "XS_OUTER_QUANTITY"; /* 销售出库数量*/
public static final String COL_XS_OUTER_WEIGHT = "XS_OUTER_WEIGHT"; /* 销售出库重量*/
public static final String COL_XS_OUTER_AMOUNT = "XS_OUTER_AMOUNT"; /* 销售出库金额*/
public static final String COL_QT_OUTER_QUANTITY = "QT_OUTER_QUANTITY"; /* 其它出库数量*/
public static final String COL_QT_OUTER_WEIGHT = "QT_OUTER_WEIGHT"; /* 其它出库重量*/
public static final String COL_QT_OUTER_AMOUNT = "QT_OUTER_AMOUNT"; /* 其它出库数量*/
public static final String COL_OUTER_QUANTITY = "OUTER_QUANTITY"; /* 出库数量*/
public static final String COL_OUTER_WEIGHT = "OUTER_WEIGHT"; /* 出库重量*/
public static final String COL_OUTER_AMOUNT = "OUTER_AMOUNT"; /* 出库金额*/
public static final String COL_PD_DIFF_QUANTITY = "PD_DIFF_QUANTITY"; /* 盘点差异数量*/
public static final String COL_PD_DIFF_WEIGHT = "PD_DIFF_WEIGHT"; /* 盘点差异重量*/
public static final String COL_PD_DIFF_AMOUNT = "PD_DIFF_AMOUNT"; /* 盘点差异金额*/
public static final String COL_END_QUANTITY = "END_QUANTITY"; /* 期末数量*/
public static final String COL_END_WEIGHT = "END_WEIGHT"; /* 期末重量*/
public static final String COL_END_AMOUNT = "END_AMOUNT"; /* 期末金额*/
public static final String QUERY = "HGCB004.query";
public static final String QUERY_SUM = "HGCB004.querySum"; /* 查询合计*/
public static final String QUERY_LIST = "HGCB004.queryList";
public static final String QUERY_LAST = "HGCB004.queryLast"; /* 查询上月*/
public static final String COUNT = "HGCB004.count";
public static final String INSERT = "HGCB004.insert";
public static final String UPDATE = "HGCB004.update";
public static final String DELETE = "HGCB004.delete";
public static final String DELETE_BY_TIME = "HGCB004.deleteByTime";
private Long id = new Long(0); /* ID*/
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 String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String dateType = " "; /* 日期类型:DAY:天,MONTH:月*/
private String accountPeriod = " "; /* 日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/
private Integer inventTypeDetail;
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 规格ID*/
private BigDecimal initQuantity = new BigDecimal(0); /* 期初数量*/
private BigDecimal initWeight = new BigDecimal(0.000); /* 期初重量*/
private BigDecimal initAmount = new BigDecimal(0.000); /* 期初金额*/
private BigDecimal cgEnterQuantity = new BigDecimal(0); /* 采购入库数量*/
private BigDecimal cgEnterWeight = new BigDecimal(0.000); /* 采购入库重量*/
private BigDecimal cgEnterAmount = new BigDecimal(0.000); /* 采购入库金额*/
private BigDecimal scEnterQuantity = new BigDecimal(0); /* 生产入库数量*/
private BigDecimal scEnterWeight = new BigDecimal(0.000); /* 生产入库重量*/
private BigDecimal scEnterAmount = new BigDecimal(0.000); /* 生产入库金额*/
private BigDecimal qtEnterQuantity = new BigDecimal(0); /* 其它入库数量*/
private BigDecimal qtEnterWeight = new BigDecimal(0.000); /* 其它入库重量*/
private BigDecimal qtEnterAmount = new BigDecimal(0.000); /* 其它入库重量*/
private BigDecimal enterQuantity = new BigDecimal(0); /* 入库数量*/
private BigDecimal enterWeight = new BigDecimal(0.000); /* 入库重量*/
private BigDecimal enterAmount = new BigDecimal(0.000); /* 入库金额*/
private BigDecimal scOuterQuantity = new BigDecimal(0); /* 生产领料数量*/
private BigDecimal scOuterWeight = new BigDecimal(0.000); /* 生产领料重量*/
private BigDecimal scOuterAmount = new BigDecimal(0.000); /* 生产领料金额*/
private BigDecimal xsOuterQuantity = new BigDecimal(0); /* 销售出库数量*/
private BigDecimal xsOuterWeight = new BigDecimal(0.000); /* 销售出库重量*/
private BigDecimal xsOuterAmount = new BigDecimal(0.000); /* 销售出库金额*/
private BigDecimal qtOuterQuantity = new BigDecimal(0); /* 其它出库数量*/
private BigDecimal qtOuterWeight = new BigDecimal(0.000); /* 其它出库重量*/
private BigDecimal qtOuterAmount = new BigDecimal(0.000); /* 其它出库数量*/
private BigDecimal outerQuantity = new BigDecimal(0); /* 出库数量*/
private BigDecimal outerWeight = new BigDecimal(0.000); /* 出库重量*/
private BigDecimal outerAmount = new BigDecimal(0.000); /* 出库金额*/
private BigDecimal pdDiffQuantity = new BigDecimal(0); /* 盘点差异数量*/
private BigDecimal pdDiffWeight = new BigDecimal(0.000); /* 盘点差异重量*/
private BigDecimal pdDiffAmount = new BigDecimal(0.000); /* 盘点差异金额*/
private BigDecimal endQuantity = new BigDecimal(0); /* 期末数量*/
private BigDecimal endWeight = new BigDecimal(0.000); /* 期末重量*/
private BigDecimal endAmount = new BigDecimal(0.000); /* 期末金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DATE_TYPE);
eiColumn.setDescName("日期类型:DAY:天,MONTH:月");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_PERIOD);
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_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INIT_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("期初数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("期初重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INIT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("期初金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CG_ENTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("采购入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CG_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("采购入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CG_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("采购入库金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_ENTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("生产入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("生产入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("生产入库金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_ENTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("其它入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("其它入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("其它入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ENTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ENTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("入库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ENTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("入库金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_OUTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("生产领料数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("生产领料重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SC_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("生产领料金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_XS_OUTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("销售出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_XS_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("销售出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_XS_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("销售出库金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_OUTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("其它出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("其它出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_QT_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("其它出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTER_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("出库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTER_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("出库重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTER_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("出库金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PD_DIFF_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("盘点差异数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PD_DIFF_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("盘点差异重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PD_DIFF_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("盘点差异金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(15);
eiColumn.setDescName("期末数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("期末重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_END_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("期末金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCB004() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the 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 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 dateType - 日期类型:DAY:天,MONTH:月.
* @return the dateType
*/
public String getDateType() {
return this.dateType;
}
/**
* set the dateType - 日期类型:DAY:天,MONTH:月.
*
* @param dateType - 日期类型:DAY:天,MONTH:月
*/
public void setDateType(String dateType) {
this.dateType = dateType;
}
/**
* get the accountPeriod - 日期.
* @return the accountPeriod
*/
public String getAccountPeriod() {
return this.accountPeriod;
}
/**
* set the accountPeriod - 日期.
*
* @param accountPeriod - 日期
*/
public void setAccountPeriod(String accountPeriod) {
this.accountPeriod = accountPeriod;
}
/**
* 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 inventTypeDetail - 存货类型明细.
* @return the inventTypeDetail
*/
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
/**
* set the inventTypeDetail - 存货类型明细.
*
* @param inventTypeDetail - 存货类型明细
*/
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the inventRecordId - 规格ID.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 规格ID.
*
* @param inventRecordId - 规格ID
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the initQuantity - 期初数量.
* @return the initQuantity
*/
public BigDecimal getInitQuantity() {
return this.initQuantity;
}
/**
* set the initQuantity - 期初数量.
*
* @param initQuantity - 期初数量
*/
public void setInitQuantity(BigDecimal initQuantity) {
this.initQuantity = initQuantity;
}
/**
* get the initWeight - 期初重量.
* @return the initWeight
*/
public BigDecimal getInitWeight() {
return this.initWeight;
}
/**
* set the initWeight - 期初重量.
*
* @param initWeight - 期初重量
*/
public void setInitWeight(BigDecimal initWeight) {
this.initWeight = initWeight;
}
/**
* get the initAmount - 期初金额.
* @return the initAmount
*/
public BigDecimal getInitAmount() {
return this.initAmount;
}
/**
* set the initAmount - 期初金额.
*
* @param initAmount - 期初金额
*/
public void setInitAmount(BigDecimal initAmount) {
this.initAmount = initAmount;
}
/**
* get the cgEnterQuantity - 采购入库数量.
* @return the cgEnterQuantity
*/
public BigDecimal getCgEnterQuantity() {
return this.cgEnterQuantity;
}
/**
* set the cgEnterQuantity - 采购入库数量.
*
* @param cgEnterQuantity - 采购入库数量
*/
public void setCgEnterQuantity(BigDecimal cgEnterQuantity) {
this.cgEnterQuantity = cgEnterQuantity;
}
/**
* get the cgEnterWeight - 采购入库重量.
* @return the cgEnterWeight
*/
public BigDecimal getCgEnterWeight() {
return this.cgEnterWeight;
}
/**
* set the cgEnterWeight - 采购入库重量.
*
* @param cgEnterWeight - 采购入库重量
*/
public void setCgEnterWeight(BigDecimal cgEnterWeight) {
this.cgEnterWeight = cgEnterWeight;
}
/**
* get the cgEnterAmount - 采购入库金额.
* @return the cgEnterAmount
*/
public BigDecimal getCgEnterAmount() {
return this.cgEnterAmount;
}
/**
* set the cgEnterAmount - 采购入库金额.
*
* @param cgEnterAmount - 采购入库金额
*/
public void setCgEnterAmount(BigDecimal cgEnterAmount) {
this.cgEnterAmount = cgEnterAmount;
}
/**
* get the scEnterQuantity - 生产入库数量.
* @return the scEnterQuantity
*/
public BigDecimal getScEnterQuantity() {
return this.scEnterQuantity;
}
/**
* set the scEnterQuantity - 生产入库数量.
*
* @param scEnterQuantity - 生产入库数量
*/
public void setScEnterQuantity(BigDecimal scEnterQuantity) {
this.scEnterQuantity = scEnterQuantity;
}
/**
* get the scEnterWeight - 生产入库重量.
* @return the scEnterWeight
*/
public BigDecimal getScEnterWeight() {
return this.scEnterWeight;
}
/**
* set the scEnterWeight - 生产入库重量.
*
* @param scEnterWeight - 生产入库重量
*/
public void setScEnterWeight(BigDecimal scEnterWeight) {
this.scEnterWeight = scEnterWeight;
}
/**
* get the scEnterAmount - 生产入库金额.
* @return the scEnterAmount
*/
public BigDecimal getScEnterAmount() {
return this.scEnterAmount;
}
/**
* set the scEnterAmount - 生产入库金额.
*
* @param scEnterAmount - 生产入库金额
*/
public void setScEnterAmount(BigDecimal scEnterAmount) {
this.scEnterAmount = scEnterAmount;
}
/**
* get the qtEnterQuantity - 其它入库数量.
* @return the qtEnterQuantity
*/
public BigDecimal getQtEnterQuantity() {
return this.qtEnterQuantity;
}
/**
* set the qtEnterQuantity - 其它入库数量.
*
* @param qtEnterQuantity - 其它入库数量
*/
public void setQtEnterQuantity(BigDecimal qtEnterQuantity) {
this.qtEnterQuantity = qtEnterQuantity;
}
/**
* get the qtEnterWeight - 其它入库重量.
* @return the qtEnterWeight
*/
public BigDecimal getQtEnterWeight() {
return this.qtEnterWeight;
}
/**
* set the qtEnterWeight - 其它入库重量.
*
* @param qtEnterWeight - 其它入库重量
*/
public void setQtEnterWeight(BigDecimal qtEnterWeight) {
this.qtEnterWeight = qtEnterWeight;
}
/**
* get the qtEnterAmount - 其它入库重量.
* @return the qtEnterAmount
*/
public BigDecimal getQtEnterAmount() {
return this.qtEnterAmount;
}
/**
* set the qtEnterAmount - 其它入库重量.
*
* @param qtEnterAmount - 其它入库重量
*/
public void setQtEnterAmount(BigDecimal qtEnterAmount) {
this.qtEnterAmount = qtEnterAmount;
}
/**
* get the enterQuantity - 入库数量.
* @return the enterQuantity
*/
public BigDecimal getEnterQuantity() {
return this.enterQuantity;
}
/**
* set the enterQuantity - 入库数量.
*
* @param enterQuantity - 入库数量
*/
public void setEnterQuantity(BigDecimal enterQuantity) {
this.enterQuantity = enterQuantity;
}
/**
* get the enterWeight - 入库重量.
* @return the enterWeight
*/
public BigDecimal getEnterWeight() {
return this.enterWeight;
}
/**
* set the enterWeight - 入库重量.
*
* @param enterWeight - 入库重量
*/
public void setEnterWeight(BigDecimal enterWeight) {
this.enterWeight = enterWeight;
}
/**
* get the enterAmount - 入库金额.
* @return the enterAmount
*/
public BigDecimal getEnterAmount() {
return this.enterAmount;
}
/**
* set the enterAmount - 入库金额.
*
* @param enterAmount - 入库金额
*/
public void setEnterAmount(BigDecimal enterAmount) {
this.enterAmount = enterAmount;
}
/**
* get the scOuterQuantity - 生产领料数量.
* @return the scOuterQuantity
*/
public BigDecimal getScOuterQuantity() {
return this.scOuterQuantity;
}
/**
* set the scOuterQuantity - 生产领料数量.
*
* @param scOuterQuantity - 生产领料数量
*/
public void setScOuterQuantity(BigDecimal scOuterQuantity) {
this.scOuterQuantity = scOuterQuantity;
}
/**
* get the scOuterWeight - 生产领料重量.
* @return the scOuterWeight
*/
public BigDecimal getScOuterWeight() {
return this.scOuterWeight;
}
/**
* set the scOuterWeight - 生产领料重量.
*
* @param scOuterWeight - 生产领料重量
*/
public void setScOuterWeight(BigDecimal scOuterWeight) {
this.scOuterWeight = scOuterWeight;
}
/**
* get the scOuterAmount - 生产领料金额.
* @return the scOuterAmount
*/
public BigDecimal getScOuterAmount() {
return this.scOuterAmount;
}
/**
* set the scOuterAmount - 生产领料金额.
*
* @param scOuterAmount - 生产领料金额
*/
public void setScOuterAmount(BigDecimal scOuterAmount) {
this.scOuterAmount = scOuterAmount;
}
/**
* get the xsOuterQuantity - 销售出库数量.
* @return the xsOuterQuantity
*/
public BigDecimal getXsOuterQuantity() {
return this.xsOuterQuantity;
}
/**
* set the xsOuterQuantity - 销售出库数量.
*
* @param xsOuterQuantity - 销售出库数量
*/
public void setXsOuterQuantity(BigDecimal xsOuterQuantity) {
this.xsOuterQuantity = xsOuterQuantity;
}
/**
* get the xsOuterWeight - 销售出库重量.
* @return the xsOuterWeight
*/
public BigDecimal getXsOuterWeight() {
return this.xsOuterWeight;
}
/**
* set the xsOuterWeight - 销售出库重量.
*
* @param xsOuterWeight - 销售出库重量
*/
public void setXsOuterWeight(BigDecimal xsOuterWeight) {
this.xsOuterWeight = xsOuterWeight;
}
/**
* get the xsOuterAmount - 销售出库金额.
* @return the xsOuterAmount
*/
public BigDecimal getXsOuterAmount() {
return this.xsOuterAmount;
}
/**
* set the xsOuterAmount - 销售出库金额.
*
* @param xsOuterAmount - 销售出库金额
*/
public void setXsOuterAmount(BigDecimal xsOuterAmount) {
this.xsOuterAmount = xsOuterAmount;
}
/**
* get the qtOuterQuantity - 其它出库数量.
* @return the qtOuterQuantity
*/
public BigDecimal getQtOuterQuantity() {
return this.qtOuterQuantity;
}
/**
* set the qtOuterQuantity - 其它出库数量.
*
* @param qtOuterQuantity - 其它出库数量
*/
public void setQtOuterQuantity(BigDecimal qtOuterQuantity) {
this.qtOuterQuantity = qtOuterQuantity;
}
/**
* get the qtOuterWeight - 其它出库重量.
* @return the qtOuterWeight
*/
public BigDecimal getQtOuterWeight() {
return this.qtOuterWeight;
}
/**
* set the qtOuterWeight - 其它出库重量.
*
* @param qtOuterWeight - 其它出库重量
*/
public void setQtOuterWeight(BigDecimal qtOuterWeight) {
this.qtOuterWeight = qtOuterWeight;
}
/**
* get the qtOuterAmount - 其它出库数量.
* @return the qtOuterAmount
*/
public BigDecimal getQtOuterAmount() {
return this.qtOuterAmount;
}
/**
* set the qtOuterAmount - 其它出库数量.
*
* @param qtOuterAmount - 其它出库数量
*/
public void setQtOuterAmount(BigDecimal qtOuterAmount) {
this.qtOuterAmount = qtOuterAmount;
}
/**
* get the outerQuantity - 出库数量.
* @return the outerQuantity
*/
public BigDecimal getOuterQuantity() {
return this.outerQuantity;
}
/**
* set the outerQuantity - 出库数量.
*
* @param outerQuantity - 出库数量
*/
public void setOuterQuantity(BigDecimal outerQuantity) {
this.outerQuantity = outerQuantity;
}
/**
* get the outerWeight - 出库重量.
* @return the outerWeight
*/
public BigDecimal getOuterWeight() {
return this.outerWeight;
}
/**
* set the outerWeight - 出库重量.
*
* @param outerWeight - 出库重量
*/
public void setOuterWeight(BigDecimal outerWeight) {
this.outerWeight = outerWeight;
}
/**
* get the outerAmount - 出库金额.
* @return the outerAmount
*/
public BigDecimal getOuterAmount() {
return this.outerAmount;
}
/**
* set the outerAmount - 出库金额.
*
* @param outerAmount - 出库金额
*/
public void setOuterAmount(BigDecimal outerAmount) {
this.outerAmount = outerAmount;
}
/**
* get the pdDiffQuantity - 盘点差异数量.
* @return the pdDiffQuantity
*/
public BigDecimal getPdDiffQuantity() {
return this.pdDiffQuantity;
}
/**
* set the pdDiffQuantity - 盘点差异数量.
*
* @param pdDiffQuantity - 盘点差异数量
*/
public void setPdDiffQuantity(BigDecimal pdDiffQuantity) {
this.pdDiffQuantity = pdDiffQuantity;
}
/**
* get the pdDiffWeight - 盘点差异重量.
* @return the pdDiffWeight
*/
public BigDecimal getPdDiffWeight() {
return this.pdDiffWeight;
}
/**
* set the pdDiffWeight - 盘点差异重量.
*
* @param pdDiffWeight - 盘点差异重量
*/
public void setPdDiffWeight(BigDecimal pdDiffWeight) {
this.pdDiffWeight = pdDiffWeight;
}
/**
* get the pdDiffAmount - 盘点差异金额.
* @return the pdDiffAmount
*/
public BigDecimal getPdDiffAmount() {
return this.pdDiffAmount;
}
/**
* set the pdDiffAmount - 盘点差异金额.
*
* @param pdDiffAmount - 盘点差异金额
*/
public void setPdDiffAmount(BigDecimal pdDiffAmount) {
this.pdDiffAmount = pdDiffAmount;
}
/**
* get the endQuantity - 期末数量.
* @return the endQuantity
*/
public BigDecimal getEndQuantity() {
return this.endQuantity;
}
/**
* set the endQuantity - 期末数量.
*
* @param endQuantity - 期末数量
*/
public void setEndQuantity(BigDecimal endQuantity) {
this.endQuantity = endQuantity;
}
/**
* get the endWeight - 期末重量.
* @return the endWeight
*/
public BigDecimal getEndWeight() {
return this.endWeight;
}
/**
* set the endWeight - 期末重量.
*
* @param endWeight - 期末重量
*/
public void setEndWeight(BigDecimal endWeight) {
this.endWeight = endWeight;
}
/**
* get the endAmount - 期末金额.
* @return the endAmount
*/
public BigDecimal getEndAmount() {
return this.endAmount;
}
/**
* set the endAmount - 期末金额.
*
* @param endAmount - 期末金额
*/
public void setEndAmount(BigDecimal endAmount) {
this.endAmount = endAmount;
}
/**
* 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));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setDateType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DATE_TYPE)), dateType));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_PERIOD)), accountPeriod));
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));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setInitQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_QUANTITY)), initQuantity));
setInitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_WEIGHT)), initWeight));
setInitAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_AMOUNT)), initAmount));
setCgEnterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CG_ENTER_QUANTITY)), cgEnterQuantity));
setCgEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CG_ENTER_WEIGHT)), cgEnterWeight));
setCgEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CG_ENTER_AMOUNT)), cgEnterAmount));
setScEnterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_ENTER_QUANTITY)), scEnterQuantity));
setScEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_ENTER_WEIGHT)), scEnterWeight));
setScEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_ENTER_AMOUNT)), scEnterAmount));
setQtEnterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_ENTER_QUANTITY)), qtEnterQuantity));
setQtEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_ENTER_WEIGHT)), qtEnterWeight));
setQtEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_ENTER_AMOUNT)), qtEnterAmount));
setEnterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTER_QUANTITY)), enterQuantity));
setEnterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTER_WEIGHT)), enterWeight));
setEnterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_ENTER_AMOUNT)), enterAmount));
setScOuterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_OUTER_QUANTITY)), scOuterQuantity));
setScOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_OUTER_WEIGHT)), scOuterWeight));
setScOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SC_OUTER_AMOUNT)), scOuterAmount));
setXsOuterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_XS_OUTER_QUANTITY)), xsOuterQuantity));
setXsOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_XS_OUTER_WEIGHT)), xsOuterWeight));
setXsOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_XS_OUTER_AMOUNT)), xsOuterAmount));
setQtOuterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_OUTER_QUANTITY)), qtOuterQuantity));
setQtOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_OUTER_WEIGHT)), qtOuterWeight));
setQtOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QT_OUTER_AMOUNT)), qtOuterAmount));
setOuterQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUTER_QUANTITY)), outerQuantity));
setOuterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUTER_WEIGHT)), outerWeight));
setOuterAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_OUTER_AMOUNT)), outerAmount));
setPdDiffQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PD_DIFF_QUANTITY)), pdDiffQuantity));
setPdDiffWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PD_DIFF_WEIGHT)), pdDiffWeight));
setPdDiffAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PD_DIFF_AMOUNT)), pdDiffAmount));
setEndQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_END_QUANTITY)), endQuantity));
setEndWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_END_WEIGHT)), endWeight));
setEndAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_END_AMOUNT)), endAmount));
}
/**
* 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_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_DATE_TYPE, StringUtils.toString(dateType, eiMetadata.getMeta(FIELD_DATE_TYPE)));
map.put(FIELD_ACCOUNT_PERIOD, StringUtils.toString(accountPeriod, eiMetadata.getMeta(FIELD_ACCOUNT_PERIOD)));
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_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_INIT_QUANTITY, StringUtils.toString(initQuantity, eiMetadata.getMeta(FIELD_INIT_QUANTITY)));
map.put(FIELD_INIT_WEIGHT, StringUtils.toString(initWeight, eiMetadata.getMeta(FIELD_INIT_WEIGHT)));
map.put(FIELD_INIT_AMOUNT, StringUtils.toString(initAmount, eiMetadata.getMeta(FIELD_INIT_AMOUNT)));
map.put(FIELD_CG_ENTER_QUANTITY, StringUtils.toString(cgEnterQuantity, eiMetadata.getMeta(FIELD_CG_ENTER_QUANTITY)));
map.put(FIELD_CG_ENTER_WEIGHT, StringUtils.toString(cgEnterWeight, eiMetadata.getMeta(FIELD_CG_ENTER_WEIGHT)));
map.put(FIELD_CG_ENTER_AMOUNT, StringUtils.toString(cgEnterAmount, eiMetadata.getMeta(FIELD_CG_ENTER_AMOUNT)));
map.put(FIELD_SC_ENTER_QUANTITY, StringUtils.toString(scEnterQuantity, eiMetadata.getMeta(FIELD_SC_ENTER_QUANTITY)));
map.put(FIELD_SC_ENTER_WEIGHT, StringUtils.toString(scEnterWeight, eiMetadata.getMeta(FIELD_SC_ENTER_WEIGHT)));
map.put(FIELD_SC_ENTER_AMOUNT, StringUtils.toString(scEnterAmount, eiMetadata.getMeta(FIELD_SC_ENTER_AMOUNT)));
map.put(FIELD_QT_ENTER_QUANTITY, StringUtils.toString(qtEnterQuantity, eiMetadata.getMeta(FIELD_QT_ENTER_QUANTITY)));
map.put(FIELD_QT_ENTER_WEIGHT, StringUtils.toString(qtEnterWeight, eiMetadata.getMeta(FIELD_QT_ENTER_WEIGHT)));
map.put(FIELD_QT_ENTER_AMOUNT, StringUtils.toString(qtEnterAmount, eiMetadata.getMeta(FIELD_QT_ENTER_AMOUNT)));
map.put(FIELD_ENTER_QUANTITY, StringUtils.toString(enterQuantity, eiMetadata.getMeta(FIELD_ENTER_QUANTITY)));
map.put(FIELD_ENTER_WEIGHT, StringUtils.toString(enterWeight, eiMetadata.getMeta(FIELD_ENTER_WEIGHT)));
map.put(FIELD_ENTER_AMOUNT, StringUtils.toString(enterAmount, eiMetadata.getMeta(FIELD_ENTER_AMOUNT)));
map.put(FIELD_SC_OUTER_QUANTITY, StringUtils.toString(scOuterQuantity, eiMetadata.getMeta(FIELD_SC_OUTER_QUANTITY)));
map.put(FIELD_SC_OUTER_WEIGHT, StringUtils.toString(scOuterWeight, eiMetadata.getMeta(FIELD_SC_OUTER_WEIGHT)));
map.put(FIELD_SC_OUTER_AMOUNT, StringUtils.toString(scOuterAmount, eiMetadata.getMeta(FIELD_SC_OUTER_AMOUNT)));
map.put(FIELD_XS_OUTER_QUANTITY, StringUtils.toString(xsOuterQuantity, eiMetadata.getMeta(FIELD_XS_OUTER_QUANTITY)));
map.put(FIELD_XS_OUTER_WEIGHT, StringUtils.toString(xsOuterWeight, eiMetadata.getMeta(FIELD_XS_OUTER_WEIGHT)));
map.put(FIELD_XS_OUTER_AMOUNT, StringUtils.toString(xsOuterAmount, eiMetadata.getMeta(FIELD_XS_OUTER_AMOUNT)));
map.put(FIELD_QT_OUTER_QUANTITY, StringUtils.toString(qtOuterQuantity, eiMetadata.getMeta(FIELD_QT_OUTER_QUANTITY)));
map.put(FIELD_QT_OUTER_WEIGHT, StringUtils.toString(qtOuterWeight, eiMetadata.getMeta(FIELD_QT_OUTER_WEIGHT)));
map.put(FIELD_QT_OUTER_AMOUNT, StringUtils.toString(qtOuterAmount, eiMetadata.getMeta(FIELD_QT_OUTER_AMOUNT)));
map.put(FIELD_OUTER_QUANTITY, StringUtils.toString(outerQuantity, eiMetadata.getMeta(FIELD_OUTER_QUANTITY)));
map.put(FIELD_OUTER_WEIGHT, StringUtils.toString(outerWeight, eiMetadata.getMeta(FIELD_OUTER_WEIGHT)));
map.put(FIELD_OUTER_AMOUNT, StringUtils.toString(outerAmount, eiMetadata.getMeta(FIELD_OUTER_AMOUNT)));
map.put(FIELD_PD_DIFF_QUANTITY, StringUtils.toString(pdDiffQuantity, eiMetadata.getMeta(FIELD_PD_DIFF_QUANTITY)));
map.put(FIELD_PD_DIFF_WEIGHT, StringUtils.toString(pdDiffWeight, eiMetadata.getMeta(FIELD_PD_DIFF_WEIGHT)));
map.put(FIELD_PD_DIFF_AMOUNT, StringUtils.toString(pdDiffAmount, eiMetadata.getMeta(FIELD_PD_DIFF_AMOUNT)));
map.put(FIELD_END_QUANTITY, StringUtils.toString(endQuantity, eiMetadata.getMeta(FIELD_END_QUANTITY)));
map.put(FIELD_END_WEIGHT, StringUtils.toString(endWeight, eiMetadata.getMeta(FIELD_END_WEIGHT)));
map.put(FIELD_END_AMOUNT, StringUtils.toString(endAmount, eiMetadata.getMeta(FIELD_END_AMOUNT)));
return map;
}
}
package com.baosight.hggp.hg.cb.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cb.domain.HGCB002;
import com.baosight.hggp.hg.cb.domain.HGCB004;
import com.baosight.hggp.hg.cb.tools.HGCBTools;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/25
*/
public class ServiceHGCB002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
//CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_CODE_BLOCK_ID), null);
inInfo = super.initLoad(inInfo, EiConstant.resultBlock, new HGCB002());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_RECORD_BLOCK_ID), null, false);
EiInfoUtils.addBlock(inInfo,"company_code_block_id", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String accountPeriod = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCB002.FIELD_ACCOUNT_PERIOD);
if(accountPeriod != null && ObjectUtils.isNotBlank(accountPeriod)){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCB002.FIELD_ACCOUNT_PERIOD, DateUtils.formatShort(accountPeriod));
}
return super.query(inInfo, HGCB002.QUERY, new HGCB002());
}
public EiInfo select(EiInfo inInfo) {
Map params= EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB002.FIELD_COMPANY_CODE).toString());
params.put(HGCW001.FIELD_ACCOUNT_CODE, hgcw001.getAccountCode());
params.put(HGCW001.FIELD_ACCOUNT_PERIOD, hgcw001.getAccountPeriod());
HGCBTools.HgCb002.select(params);
return inInfo;
}
}
package com.baosight.hggp.hg.cb.service;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* @author LiuYang
* @version 1.0 2024/6/27
*/
public class ServiceHGCB002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"查询角色所属公司失败!");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cb.service;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cb.domain.HGCB003;
import com.baosight.hggp.hg.cb.tools.HGCBTools;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/25
*/
public class ServiceHGCB003 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"company_code_block_id", UserSessionUtils.getRoleCompany(), Company.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String accountPeriod = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCB003.FIELD_ACCOUNT_PERIOD);
if(accountPeriod != null && ObjectUtils.isNotBlank(accountPeriod)){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCB003.FIELD_ACCOUNT_PERIOD, DateUtils.formatShort(accountPeriod));
}
return super.query(inInfo, HGCB003.QUERY, new HGCB003());
}
public EiInfo select(EiInfo inInfo) {
Map params= EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB003.FIELD_COMPANY_CODE).toString());
params.put(HGCW001.FIELD_ACCOUNT_CODE, hgcw001.getAccountCode());
params.put(HGCW001.FIELD_ACCOUNT_PERIOD, hgcw001.getAccountPeriod());
HGCBTools.HgCb003.select(params);
return inInfo;
}
}
package com.baosight.hggp.hg.cb.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cb.domain.HGCB001;
import com.baosight.hggp.hg.cb.domain.HGCB002;
import com.baosight.hggp.hg.cb.domain.HGCB004;
import com.baosight.hggp.hg.cb.tools.HGCBTools;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/6/25
*/
public class ServiceHGCB004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
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 HGCB004().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String receiptDate = MapUtils.getString(queryRow, HGCB004.FIELD_ACCOUNT_PERIOD);
queryRow.put(HGCB004.FIELD_ACCOUNT_PERIOD, StringUtil.removeSpecifiedCharacter(receiptDate, StringUtil.DEFAULT_CHARACTER_TO_BE_REMOVED));
queryRow.put(HGCB004.FIELD_DATE_TYPE, CommonConstant.DateType.MONTH);
inInfo = super.query(inInfo, HGCB004.QUERY, new HGCB004());
List sum = dao.query(HGCB004.QUERY_SUM, queryRow);
inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收发存汇总",operType = "同步数据",operDesc = "同步数据")
public EiInfo synchData(EiInfo inInfo) {
try {
Map<String, Object> queryRow = EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(queryRow.get(HGCB002.FIELD_COMPANY_CODE).toString());
queryRow.put(HGCB004.FIELD_ACCOUNT_CODE, hgcw001.getAccountCode());
queryRow.put(HGCB004.FIELD_ACCOUNT_PERIOD, hgcw001.getAccountPeriod());
List<HGCB004> cb004s =HGCBTools.HgCb004.synchData(queryRow);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + cb004s.size() + "]条数据同步成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "同步数据失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-25 11:30:34
Version : 1.0
schema : hggp
tableName : HGCB002
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
ACCOUNT_YEAR VARCHAR,
ACCOUNT_PERIOD VARCHAR,
BIZ_TYPE TINYINT,
RECEIPT_DATE VARCHAR,
RECEIPT_CODE VARCHAR,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC_ID BIGINT,
SPEC VARCHAR,
UNIT VARCHAR,
QUANTITY DECIMAL,
WEIGHT DECIMAL,
IS_ESTIMATE TINYINT,
PRICE DECIMAL,
AMOUNT DECIMAL
-->
<sqlMap namespace="HGCB002">
<typeAlias alias="HGCB002" type="com.baosight.hggp.hg.cb.domain.HGCB002"/>
<sql id="column">
ID as "id", <!-- 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", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
BIZ_TYPE as "bizType", <!-- 业务类型 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
RECEIPT_CODE as "receiptCode", <!-- 单据号 -->
RECEIVE_NO as "receiveNo", <!-- 收货单号 -->
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", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount" <!-- 金额 -->
</sql>
<sql id="columnLast">
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
BIZ_TYPE as "bizType", <!-- 业务类型 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
RECEIPT_CODE as "receiptCode", <!-- 单据号 -->
RECEIVE_NO as "receiveNo", <!-- 收货单号 -->
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", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
sum(QUANTITY) as "quantity", <!-- 数量 -->
sum(WEIGHT) as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
CASE WHEN IFNULL(SUM(QUANTITY), 0) = 0 THEN 0 ELSE SUM(AMOUNT)/SUM(QUANTITY) END as "price", <!-- 单价 -->
sum(AMOUNT) as "amount" <!-- 金额 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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="accountYear">
ACCOUNT_YEAR = #accountYear#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptCode">
RECEIPT_CODE = #receiptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isEstimate">
IS_ESTIMATE = #isEstimate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
RECEIPT_DATE desc, ID desc
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGCB002">
SELECT <include refid="column" />
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
</select>
<select id="queryDetail" parameterClass="java.util.HashMap" resultClass="HGCB002">
SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
SUM(QUANTITY) as "quantity", <!-- 数量 -->
SUM(WEIGHT) as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
SUM(AMOUNT) as "amount" <!-- 金额 -->
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE, SPEC_ID, SPEC, IS_ESTIMATE
</select>
<!--查询上月-->
<select id="queryLast" parameterClass="java.util.HashMap" resultClass="HGCB002">
SELECT <include refid="columnLast" />
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
group by ACCOUNT_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, BIZ_TYPE, RECEIPT_DATE, RECEIPT_CODE, RECEIVE_NO, WH_CODE, WH_NAME, INVENT_TYPE, INVENT_CODE, INVENT_NAME, SPEC_ID, SPEC, UNIT, IS_ESTIMATE
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ACCOUNT_PERIOD desc
</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="accountYear">
ACCOUNT_YEAR = #accountYear#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptCode">
RECEIPT_CODE = #receiptCode#
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isEstimate">
IS_ESTIMATE = #isEstimate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCB002 (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 是否删除: 0-否 1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
ACCOUNT_YEAR, <!-- 会计年度 -->
ACCOUNT_PERIOD, <!-- 会计期 -->
BIZ_TYPE, <!-- 业务类型 -->
RECEIPT_DATE, <!-- 单据日期 -->
RECEIPT_CODE, <!-- 单据号 -->
RECEIVE_NO, <!-- 收货单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
IS_ESTIMATE, <!-- 是否暂估:0-否 1-是 -->
PRICE, <!-- 单价 -->
AMOUNT <!-- 金额 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #accountYear#, #accountPeriod#, #bizType#,
#receiptDate#, #receiptCode#, #receiveNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCB002
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCB002 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCB002
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除: 0-否 1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
ACCOUNT_YEAR = #accountYear#, <!-- 会计年度 -->
ACCOUNT_PERIOD = #accountPeriod#, <!-- 会计期 -->
BIZ_TYPE = #bizType#, <!-- 业务类型 -->
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
RECEIPT_CODE = #receiptCode#, <!-- 单据号 -->
RECEIVE_NO = #receiveNo#,
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC_ID = #specId#, <!-- 规格ID -->
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
QUANTITY = #quantity#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
IS_ESTIMATE = #isEstimate#, <!-- 是否暂估:0-否 1-是 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount# <!-- 金额 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-25 11:30:34
Version : 1.0
schema : hggp
tableName : HGCB003
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
ACCOUNT_YEAR VARCHAR,
ACCOUNT_PERIOD VARCHAR,
BIZ_TYPE TINYINT,
RECEIPT_DATE VARCHAR,
RECEIPT_CODE VARCHAR,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC_ID BIGINT,
SPEC VARCHAR,
UNIT VARCHAR,
QUANTITY DECIMAL,
WEIGHT DECIMAL,
IS_ESTIMATE TINYINT,
PRICE DECIMAL,
AMOUNT DECIMAL
-->
<sqlMap namespace="HGCB003">
<typeAlias alias="HGCB003" type="com.baosight.hggp.hg.cb.domain.HGCB003"/>
<sql id="column">
ID as "id", <!-- 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", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
BIZ_TYPE as "bizType", <!-- 业务类型 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
RECEIPT_CODE as "receiptCode", <!-- 单据号 -->
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", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount" <!-- 金额 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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="accountYear">
ACCOUNT_YEAR = #accountYear#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptCode">
RECEIPT_CODE = #receiptCode#
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isEstimate">
IS_ESTIMATE = #isEstimate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
RECEIPT_CODE desc, ID desc
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGCB003">
SELECT <include refid="column"/>
FROM ${hggpSchema}.HGCB003 WHERE 1=1
<include refid="condition" />
<include refid="order" />
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCB003 WHERE 1=1
<include refid="condition" />
</select>
<select id="queryDetail" parameterClass="java.util.HashMap" resultClass="HGCB003">
SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
SPEC_ID as "specId", <!-- 规格ID -->
SUM(QUANTITY) as "quantity", <!-- 数量 -->
SUM(WEIGHT) as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
SUM(AMOUNT) as "amount" <!-- 金额 -->
FROM ${hggpSchema}.HGCB003 WHERE 1=1
<include refid="condition" />
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE, SPEC_ID, IS_ESTIMATE
</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="accountYear">
ACCOUNT_YEAR = #accountYear#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptCode">
RECEIPT_CODE = #receiptCode#
</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="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isEstimate">
IS_ESTIMATE = #isEstimate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCB003 (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 是否删除: 0-否 1-是 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
ACCOUNT_YEAR, <!-- 会计年度 -->
ACCOUNT_PERIOD, <!-- 会计期 -->
BIZ_TYPE, <!-- 业务类型 -->
RECEIPT_DATE, <!-- 单据日期 -->
RECEIPT_CODE, <!-- 单据号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
IS_ESTIMATE, <!-- 是否暂估:0-否 1-是 -->
PRICE, <!-- 单价 -->
AMOUNT <!-- 金额 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #accountYear#, #accountPeriod#, #bizType#,
#receiptDate#, #receiptCode#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCB003 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCB003
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除: 0-否 1-是 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
ACCOUNT_YEAR = #accountYear#, <!-- 会计年度 -->
ACCOUNT_PERIOD = #accountPeriod#, <!-- 会计期 -->
BIZ_TYPE = #bizType#, <!-- 业务类型 -->
RECEIPT_DATE = #receiptDate#, <!-- 单据日期 -->
RECEIPT_CODE = #receiptCode#, <!-- 单据号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC_ID = #specId#, <!-- 规格ID -->
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
QUANTITY = #quantity#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
IS_ESTIMATE = #isEstimate#, <!-- 是否暂估:0-否 1-是 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount# <!-- 金额 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-07-01 15:13:14
Version : 1.0
schema : hggp
tableName : HGCB004
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR NOT NULL,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
COMPANY_CODE VARCHAR NOT NULL,
COMPANY_NAME VARCHAR NOT NULL,
DATE_TYPE VARCHAR,
DATE_PROC VARCHAR NOT NULL,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
INIT_QUANTITY DECIMAL,
INIT_WEIGHT DECIMAL,
INIT_AMOUNT DECIMAL,
CG_ENTER_QUANTITY DECIMAL,
CG_ENTER_WEIGHT DECIMAL,
CG_ENTER_AMOUNT DECIMAL,
SC_ENTER_QUANTITY DECIMAL,
SC_ENTER_WEIGHT DECIMAL,
SC_ENTER_AMOUNT DECIMAL,
QT_ENTER_QUANTITY DECIMAL,
QT_ENTER_WEIGHT DECIMAL,
QT_ENTER_AMOUNT DECIMAL,
ENTER_QUANTITY DECIMAL,
ENTER_WEIGHT DECIMAL,
ENTER_AMOUNT DECIMAL,
SC_OUTER_QUANTITY DECIMAL,
SC_OUTER_WEIGHT DECIMAL,
SC_OUTER_AMOUNT DECIMAL,
XS_OUTER_QUANTITY DECIMAL,
XS_OUTER_WEIGHT DECIMAL,
XS_OUTER_AMOUNT DECIMAL,
QT_OUTER_QUANTITY DECIMAL,
QT_OUTER_WEIGHT DECIMAL,
QT_OUTER_AMOUNT DECIMAL,
OUTER_QUANTITY DECIMAL,
OUTER_WEIGHT DECIMAL,
OUTER_AMOUNT DECIMAL,
PD_DIFF_QUANTITY DECIMAL,
PD_DIFF_WEIGHT DECIMAL,
PD_DIFF_AMOUNT DECIMAL,
END_QUANTITY DECIMAL,
END_WEIGHT DECIMAL,
END_AMOUNT DECIMAL
-->
<sqlMap namespace="HGCB004">
<typeAlias alias="HGCB004" type="com.baosight.hggp.hg.cb.domain.HGCB004"/>
<sql id="column">
ID as "id", <!-- 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", <!-- 更新时间 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
INIT_QUANTITY as "initQuantity", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
INIT_AMOUNT as "initAmount", <!-- 期初金额 -->
CG_ENTER_QUANTITY as "cgEnterQuantity", <!-- 采购入库数量 -->
CG_ENTER_WEIGHT as "cgEnterWeight", <!-- 采购入库重量 -->
CG_ENTER_AMOUNT as "cgEnterAmount", <!-- 采购入库金额 -->
SC_ENTER_QUANTITY as "scEnterQuantity", <!-- 生产入库数量 -->
SC_ENTER_WEIGHT as "scEnterWeight", <!-- 生产入库重量 -->
SC_ENTER_AMOUNT as "scEnterAmount", <!-- 生产入库金额 -->
QT_ENTER_QUANTITY as "qtEnterQuantity", <!-- 其它入库数量 -->
QT_ENTER_WEIGHT as "qtEnterWeight", <!-- 其它入库重量 -->
QT_ENTER_AMOUNT as "qtEnterAmount", <!-- 其它入库重量 -->
ENTER_QUANTITY as "enterQuantity", <!-- 入库数量 -->
ENTER_WEIGHT as "enterWeight", <!-- 入库重量 -->
ENTER_AMOUNT as "enterAmount", <!-- 入库金额 -->
SC_OUTER_QUANTITY as "scOuterQuantity", <!-- 生产领料数量 -->
SC_OUTER_WEIGHT as "scOuterWeight", <!-- 生产领料重量 -->
SC_OUTER_AMOUNT as "scOuterAmount", <!-- 生产领料金额 -->
XS_OUTER_QUANTITY as "xsOuterQuantity", <!-- 销售出库数量 -->
XS_OUTER_WEIGHT as "xsOuterWeight", <!-- 销售出库重量 -->
XS_OUTER_AMOUNT as "xsOuterAmount", <!-- 销售出库金额 -->
QT_OUTER_QUANTITY as "qtOuterQuantity", <!-- 其它出库数量 -->
QT_OUTER_WEIGHT as "qtOuterWeight", <!-- 其它出库重量 -->
QT_OUTER_AMOUNT as "qtOuterAmount", <!-- 其它出库数量 -->
OUTER_QUANTITY as "outerQuantity", <!-- 出库数量 -->
OUTER_WEIGHT as "outerWeight", <!-- 出库重量 -->
OUTER_AMOUNT as "outerAmount", <!-- 出库金额 -->
PD_DIFF_QUANTITY as "pdDiffQuantity", <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT as "pdDiffWeight", <!-- 盘点差异重量 -->
PD_DIFF_AMOUNT as "pdDiffAmount", <!-- 盘点差异金额 -->
END_QUANTITY as "endQuantity", <!-- 期末数量 -->
END_WEIGHT as "endWeight", <!-- 期末重量 -->
END_AMOUNT as "endAmount" <!-- 期末金额 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initQuantity">
INIT_QUANTITY = #initQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initWeight">
INIT_WEIGHT = #initWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initAmount">
INIT_AMOUNT = #initAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cgEnterQuantity">
CG_ENTER_QUANTITY = #cgEnterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cgEnterWeight">
CG_ENTER_WEIGHT = #cgEnterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cgEnterAmount">
CG_ENTER_AMOUNT = #cgEnterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scEnterQuantity">
SC_ENTER_QUANTITY = #scEnterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scEnterWeight">
SC_ENTER_WEIGHT = #scEnterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scEnterAmount">
SC_ENTER_AMOUNT = #scEnterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtEnterQuantity">
QT_ENTER_QUANTITY = #qtEnterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtEnterWeight">
QT_ENTER_WEIGHT = #qtEnterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtEnterAmount">
QT_ENTER_AMOUNT = #qtEnterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="enterQuantity">
ENTER_QUANTITY = #enterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="enterWeight">
ENTER_WEIGHT = #enterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="enterAmount">
ENTER_AMOUNT = #enterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scOuterQuantity">
SC_OUTER_QUANTITY = #scOuterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scOuterWeight">
SC_OUTER_WEIGHT = #scOuterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scOuterAmount">
SC_OUTER_AMOUNT = #scOuterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="xsOuterQuantity">
XS_OUTER_QUANTITY = #xsOuterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="xsOuterWeight">
XS_OUTER_WEIGHT = #xsOuterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="xsOuterAmount">
XS_OUTER_AMOUNT = #xsOuterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtOuterQuantity">
QT_OUTER_QUANTITY = #qtOuterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtOuterWeight">
QT_OUTER_WEIGHT = #qtOuterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtOuterAmount">
QT_OUTER_AMOUNT = #qtOuterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outerQuantity">
OUTER_QUANTITY = #outerQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outerWeight">
OUTER_WEIGHT = #outerWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outerAmount">
OUTER_AMOUNT = #outerAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pdDiffQuantity">
PD_DIFF_QUANTITY = #pdDiffQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pdDiffWeight">
PD_DIFF_WEIGHT = #pdDiffWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pdDiffAmount">
PD_DIFF_AMOUNT = #pdDiffAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endQuantity">
END_QUANTITY = #endQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endWeight">
END_WEIGHT = #endWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endAmount">
END_AMOUNT = #endAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGCB004">
SELECT <include refid="column" />
FROM ${hggpSchema}.HGCB004 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ACCOUNT_PERIOD desc, ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCB004 WHERE 1=1
<include refid="condition" />
</select>
<!-- 查询统计 -->
<select id="querySum" resultClass="HGCB004">
SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 -->
COALESCE(SUM(INIT_AMOUNT), 0) as "initAmount", <!-- 期初金额 -->
COALESCE(SUM(CG_ENTER_AMOUNT), 0) AS "cgEnterAmount", <!-- 采购入库数量 -->
COALESCE(SUM(CG_ENTER_WEIGHT), 0) AS "cgEnterWeight", <!-- 采购入库重量 -->
COALESCE(SUM(CG_ENTER_AMOUNT), 0) as "cgEnterAmount", <!-- 采购入库金额 -->
COALESCE(SUM(SC_ENTER_AMOUNT), 0) AS "scEnterAmount", <!-- 生产入库数量 -->
COALESCE(SUM(SC_ENTER_WEIGHT), 0) AS "scEnterWeight", <!-- 生产入库重量 -->
COALESCE(SUM(SC_ENTER_AMOUNT), 0) as "scEnterAmount", <!-- 生产入库金额 -->
COALESCE(SUM(QT_ENTER_AMOUNT), 0) AS "qtEnterAmount", <!-- 其它入库数量 -->
COALESCE(SUM(QT_ENTER_WEIGHT), 0) AS "qtEnterWeight", <!-- 其它入库重量 -->
COALESCE(SUM(QT_ENTER_AMOUNT), 0) as "qtEnterAmount", <!-- 其它入库重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 -->
COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) as "enterAmount", <!-- 入库金额 -->
COALESCE(SUM(SC_OUTER_AMOUNT), 0) AS "scOuterAmount", <!-- 生产领料数量 -->
COALESCE(SUM(SC_OUTER_WEIGHT), 0) AS "scOuterWeight", <!-- 生产领料重量 -->
COALESCE(SUM(SC_OUTER_AMOUNT), 0) as "scOuterAmount", <!-- 生产领料金额 -->
COALESCE(SUM(XS_OUTER_AMOUNT), 0) AS "xsOuterAmount", <!-- 销售出库数量 -->
COALESCE(SUM(XS_OUTER_WEIGHT), 0) AS "xsOuterWeight", <!-- 销售出库重量 -->
COALESCE(SUM(XS_OUTER_AMOUNT), 0) as "xsOuterAmount", <!-- 销售出库金额 -->
COALESCE(SUM(QT_OUTER_AMOUNT), 0) AS "qtOuterAmount", <!-- 其它出库数量 -->
COALESCE(SUM(QT_OUTER_WEIGHT), 0) AS "qtOuterWeight", <!-- 其它出库重量 -->
COALESCE(SUM(QT_OUTER_AMOUNT), 0) as "qtOuterAmount", <!-- 其它出库数量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 出库数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 出库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) as "outerAmount", <!-- 出库金额 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) AS "pdDiffAmount", <!-- 盘点差异数量 -->
COALESCE(SUM(PD_DIFF_WEIGHT), 0) AS "pdDiffWeight", <!-- 盘点差异重量 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) as "pdDiffAmount", <!-- 盘点差异金额 -->
COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 -->
COALESCE(SUM(END_WEIGHT), 0) AS "endWeight", <!-- 期末重量 -->
COALESCE(SUM(END_AMOUNT), 0) as "endAmount" <!-- 期末金额 -->
FROM ${hggpSchema}.HGCB004
WHERE 1=1
<include refid="condition"/>
</select>
<select id="queryList" parameterClass="java.util.HashMap" resultClass="HGCB004">
SELECT <include refid="column" />
FROM ${hggpSchema}.HGCB004 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ACCOUNT_PERIOD desc, ID desc
</isEmpty>
</dynamic>
</select>
<!--查询上月-->
<select id="queryLast" parameterClass="java.util.HashMap" resultClass="HGCB004">
SELECT <include refid="column" />
FROM ${hggpSchema}.HGCB004 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</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="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
</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="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateProc">
DATE_PROC = #dateProc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initQuantity">
INIT_QUANTITY = #initQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initWeight">
INIT_WEIGHT = #initWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initAmount">
INIT_AMOUNT = #initAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cgEnterQuantity">
CG_ENTER_QUANTITY = #cgEnterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cgEnterWeight">
CG_ENTER_WEIGHT = #cgEnterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cgEnterAmount">
CG_ENTER_AMOUNT = #cgEnterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scEnterQuantity">
SC_ENTER_QUANTITY = #scEnterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scEnterWeight">
SC_ENTER_WEIGHT = #scEnterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scEnterAmount">
SC_ENTER_AMOUNT = #scEnterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtEnterQuantity">
QT_ENTER_QUANTITY = #qtEnterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtEnterWeight">
QT_ENTER_WEIGHT = #qtEnterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtEnterAmount">
QT_ENTER_AMOUNT = #qtEnterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="enterQuantity">
ENTER_QUANTITY = #enterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="enterWeight">
ENTER_WEIGHT = #enterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="enterAmount">
ENTER_AMOUNT = #enterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scOuterQuantity">
SC_OUTER_QUANTITY = #scOuterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scOuterWeight">
SC_OUTER_WEIGHT = #scOuterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="scOuterAmount">
SC_OUTER_AMOUNT = #scOuterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="xsOuterQuantity">
XS_OUTER_QUANTITY = #xsOuterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="xsOuterWeight">
XS_OUTER_WEIGHT = #xsOuterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="xsOuterAmount">
XS_OUTER_AMOUNT = #xsOuterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtOuterQuantity">
QT_OUTER_QUANTITY = #qtOuterQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtOuterWeight">
QT_OUTER_WEIGHT = #qtOuterWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="qtOuterAmount">
QT_OUTER_AMOUNT = #qtOuterAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outerQuantity">
OUTER_QUANTITY = #outerQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outerWeight">
OUTER_WEIGHT = #outerWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="outerAmount">
OUTER_AMOUNT = #outerAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pdDiffQuantity">
PD_DIFF_QUANTITY = #pdDiffQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pdDiffWeight">
PD_DIFF_WEIGHT = #pdDiffWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pdDiffAmount">
PD_DIFF_AMOUNT = #pdDiffAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endQuantity">
END_QUANTITY = #endQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endWeight">
END_WEIGHT = #endWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endAmount">
END_AMOUNT = #endAmount#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCB004 (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 -->
ACCOUNT_PERIOD, <!-- 日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_TYPE_DETAIL,
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 规格ID -->
INIT_QUANTITY, <!-- 期初数量 -->
INIT_WEIGHT, <!-- 期初重量 -->
INIT_AMOUNT, <!-- 期初金额 -->
CG_ENTER_QUANTITY, <!-- 采购入库数量 -->
CG_ENTER_WEIGHT, <!-- 采购入库重量 -->
CG_ENTER_AMOUNT, <!-- 采购入库金额 -->
SC_ENTER_QUANTITY, <!-- 生产入库数量 -->
SC_ENTER_WEIGHT, <!-- 生产入库重量 -->
SC_ENTER_AMOUNT, <!-- 生产入库金额 -->
QT_ENTER_QUANTITY, <!-- 其它入库数量 -->
QT_ENTER_WEIGHT, <!-- 其它入库重量 -->
QT_ENTER_AMOUNT, <!-- 其它入库重量 -->
ENTER_QUANTITY, <!-- 入库数量 -->
ENTER_WEIGHT, <!-- 入库重量 -->
ENTER_AMOUNT, <!-- 入库金额 -->
SC_OUTER_QUANTITY, <!-- 生产领料数量 -->
SC_OUTER_WEIGHT, <!-- 生产领料重量 -->
SC_OUTER_AMOUNT, <!-- 生产领料金额 -->
XS_OUTER_QUANTITY, <!-- 销售出库数量 -->
XS_OUTER_WEIGHT, <!-- 销售出库重量 -->
XS_OUTER_AMOUNT, <!-- 销售出库金额 -->
QT_OUTER_QUANTITY, <!-- 其它出库数量 -->
QT_OUTER_WEIGHT, <!-- 其它出库重量 -->
QT_OUTER_AMOUNT, <!-- 其它出库数量 -->
OUTER_QUANTITY, <!-- 出库数量 -->
OUTER_WEIGHT, <!-- 出库重量 -->
OUTER_AMOUNT, <!-- 出库金额 -->
PD_DIFF_QUANTITY, <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT, <!-- 盘点差异重量 -->
PD_DIFF_AMOUNT, <!-- 盘点差异金额 -->
END_QUANTITY, <!-- 期末数量 -->
END_WEIGHT, <!-- 期末重量 -->
END_AMOUNT <!-- 期末金额 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #companyCode#, #companyName#, #dateType#, #accountPeriod#, #whCode#, #whName#, #inventType#,#inventTypeDetail#,
#inventCode#, #inventName#, #inventRecordId#, #initQuantity#, #initWeight#, #initAmount#, #cgEnterQuantity#,
#cgEnterWeight#, #cgEnterAmount#, #scEnterQuantity#, #scEnterWeight#, #scEnterAmount#, #qtEnterQuantity#,
#qtEnterWeight#, #qtEnterAmount#, #enterQuantity#, #enterWeight#, #enterAmount#, #scOuterQuantity#,
#scOuterWeight#, #scOuterAmount#, #xsOuterQuantity#, #xsOuterWeight#, #xsOuterAmount#, #qtOuterQuantity#,
#qtOuterWeight#, #qtOuterAmount#, #outerQuantity#, #outerWeight#, #outerAmount#, #pdDiffQuantity#,
#pdDiffWeight#, #pdDiffAmount#, #endQuantity#, #endWeight#, #endAmount#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCB004 WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete id="deleteByTime">
DELETE FROM ${hggpSchema}.HGCB004 WHERE ACCOUNT_CODE = #accountCode# and COMPANY_CODE = #companyCode# and ACCOUNT_PERIOD = #accountPeriod#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCB004
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
DATE_TYPE = #dateType#, <!-- 日期类型:DAY:天,MONTH:月 -->
ACCOUNT_PERIOD = #accountPeriod#, <!-- 日期 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#,
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 规格ID -->
INIT_QUANTITY = #initQuantity#, <!-- 期初数量 -->
INIT_WEIGHT = #initWeight#, <!-- 期初重量 -->
INIT_AMOUNT = #initAmount#, <!-- 期初金额 -->
CG_ENTER_QUANTITY = #cgEnterQuantity#, <!-- 采购入库数量 -->
CG_ENTER_WEIGHT = #cgEnterWeight#, <!-- 采购入库重量 -->
CG_ENTER_AMOUNT = #cgEnterAmount#, <!-- 采购入库金额 -->
SC_ENTER_QUANTITY = #scEnterQuantity#, <!-- 生产入库数量 -->
SC_ENTER_WEIGHT = #scEnterWeight#, <!-- 生产入库重量 -->
SC_ENTER_AMOUNT = #scEnterAmount#, <!-- 生产入库金额 -->
QT_ENTER_QUANTITY = #qtEnterQuantity#, <!-- 其它入库数量 -->
QT_ENTER_WEIGHT = #qtEnterWeight#, <!-- 其它入库重量 -->
QT_ENTER_AMOUNT = #qtEnterAmount#, <!-- 其它入库重量 -->
ENTER_QUANTITY = #enterQuantity#, <!-- 入库数量 -->
ENTER_WEIGHT = #enterWeight#, <!-- 入库重量 -->
ENTER_AMOUNT = #enterAmount#, <!-- 入库金额 -->
SC_OUTER_QUANTITY = #scOuterQuantity#, <!-- 生产领料数量 -->
SC_OUTER_WEIGHT = #scOuterWeight#, <!-- 生产领料重量 -->
SC_OUTER_AMOUNT = #scOuterAmount#, <!-- 生产领料金额 -->
XS_OUTER_QUANTITY = #xsOuterQuantity#, <!-- 销售出库数量 -->
XS_OUTER_WEIGHT = #xsOuterWeight#, <!-- 销售出库重量 -->
XS_OUTER_AMOUNT = #xsOuterAmount#, <!-- 销售出库金额 -->
QT_OUTER_QUANTITY = #qtOuterQuantity#, <!-- 其它出库数量 -->
QT_OUTER_WEIGHT = #qtOuterWeight#, <!-- 其它出库重量 -->
QT_OUTER_AMOUNT = #qtOuterAmount#, <!-- 其它出库数量 -->
OUTER_QUANTITY = #outerQuantity#, <!-- 出库数量 -->
OUTER_WEIGHT = #outerWeight#, <!-- 出库重量 -->
OUTER_AMOUNT = #outerAmount#, <!-- 出库金额 -->
PD_DIFF_QUANTITY = #pdDiffQuantity#, <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT = #pdDiffWeight#, <!-- 盘点差异重量 -->
PD_DIFF_AMOUNT = #pdDiffAmount#, <!-- 盘点差异金额 -->
END_QUANTITY = #endQuantity#, <!-- 期末数量 -->
END_WEIGHT = #endWeight#, <!-- 期末重量 -->
END_AMOUNT = #endAmount# <!-- 期末金额 -->
WHERE
ID = #id#
</update>
</sqlMap>
package com.baosight.hggp.hg.cb.tools;
import cn.hutool.core.bean.BeanUtil;
import com.baosight.hggp.common.BizTypeEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cb.domain.HGCB002;
import com.baosight.hggp.hg.cb.domain.HGCB003;
import com.baosight.hggp.hg.cb.domain.HGCB004;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW012A;
import com.baosight.hggp.hg.cw.domain.HGCW013;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/6/25
*/
public class HGCBTools {
public static void setBaseInfo(List<HGCB004> cb004s) {
// 仓库名称
List<String> whCodes = cb004s.stream().map(HGCB004::getWhCode).collect(Collectors.toList());
Map<String, HGPZ007> mapPz007 = HGPZTools.HgPz007.map(whCodes);
// 存货名称
List<Long> recordIds = cb004s.stream().map(HGCB004::getInventRecordId).collect(Collectors.toList());
Map<Long, HGPZ005> mapPz005 = HGPZTools.HgPz005.maps(recordIds);
for (HGCB004 hgcb004 : cb004s) {
// 仓库名称
String whCode = hgcb004.getWhCode();
HGPZ007 pz007 = mapPz007 == null ? null : mapPz007.get(whCode);
hgcb004.setWhName(pz007 == null ? "" : pz007.getWhName());
// 存货名称
Long recordId = hgcb004.getInventRecordId();
HGPZ005 pz005 = mapPz005 == null ? null : mapPz005.get(recordId);
hgcb004.setInventName(pz005 == null ? "" : pz005.getInventName());
// 创建时间
hgcb004.setCreatedBy(UserSession.getLoginName());
hgcb004.setCreatedName(UserSession.getLoginCName());
hgcb004.setCreatedTime(DateUtils.shortDateTime());
}
}
/**
* HGCB002 工具类
*/
public static class HgCb002 {
public static void select(Map<String, String> params) {
AssertUtils.isEmpty(params.get(HGCB002.FIELD_COMPANY_CODE), "公司不能为空!");
//HGCW001 hgcb001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB002.FIELD_COMPANY_CODE));
//params.put(HGCB002.FIELD_ACCOUNT_PERIOD, hgcb001.getAccountPeriod());
params.put(HGKC001.FIELD_SUBMIT_STATUS, String.valueOf(1));
params.put(HGKC001.FIELD_INVENT_TYPE_DETAIL, InventTypeDetailEnum.RAW.getCode().toString());
saveHgkc001s(params); //保存采购入库单
saveHgkc006s(params); //保存其他入库单
}
// 保存采购入库单
public static void saveHgkc001s(Map<String, String> params){
List<HGKC001> hgkc001List = DaoBase.getInstance().query(HGKC001.QUERY_LIST, params); //查询采购入库单
//获取上月原材料入库成本核算单
Map<String, List<HGCB002>> hgcb002Map = HGCBTools.HgCb002.synchList(
new HashMap<String, Object>(){{
put(HGCB002.FIELD_COMPANY_CODE, params.get(HGCB002.FIELD_COMPANY_CODE));
put(HGCB002.FIELD_ACCOUNT_PERIOD, params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
put(HGCB002.FIELD_BIZ_TYPE, BizTypeEnum.CGRK.getCode());
put(HGCB002.FIELD_IS_ESTIMATE, 1); //是否是暂估价 1是暂估,0不是暂估
}});
AssertUtils.isEmpty(hgkc001List, "当前会计期采购入库单为空!");
for (HGKC001 hgkc001: hgkc001List) {
/*初始化原材料*/
HGCB002 hgcb002 = addHgcb002(hgkc001,params);
//获取采购开票
Map mapList = HGCWTools.HgCw012.getReceiveNo(hgkc001.getReceiveNo());
if (mapList != null){ //有采购开票,获取开票金额
BigDecimal amount = new BigDecimal(mapList.get(HGCW013.FIELD_THIS_SETTLEMENT_AMOUNT).toString());
BigDecimal price = amount.multiply(hgcb002.getQuantity());
hgcb002.setAmount(amount);
hgcb002.setPrice(price);
hgcb002.setIsEstimate(0); //有采购开票,不是暂估
List<HGCB002> hgcb0021 = hgcb002Map.get(hgkc001.getDepositNo()) == null ? null : hgcb002Map.get(hgkc001.getReceiveNo());
if (hgcb0021 != null){
//宏冲金额
addInvoic(hgcb0021, hgcb002);
}
}
DaoUtils.insert(HGCB002.INSERT, hgcb002);
}
}
//保存其他出库单
public static void saveHgkc006s(Map<String, String> params) {
Map<String, HGCB002> hgcb002List = HgCb004.listInvData(params,"HGCB002.queryLast"); //查询当月原材料成本核算
Map<String, HGCB004> hgcb004List = HgCb004.listInvData(params, "HGCB004.queryLast"); //查询上月期末
params.put(HGKC006.FIELD_OTHER_ENTER_DATE, params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
Map<String, HGKC006A> hgKC006AList = HgCb004.listInvData(params,"HGKC006A.queryList"); //查询其他出库单
for (Map.Entry<String, HGKC006A> entry : hgKC006AList.entrySet()) {
String key = entry.getKey();
HGKC006A endKc = entry.getValue();
// 1.1、其他出库
HGCB002 cb002 = addHgcb002(endKc, params);
// 1.2、原材料成本核算
HGCB002 hgcb002 = hgcb002List.get(key);
BigDecimal quantity = hgcb002 == null ? BigDecimal.ZERO : hgcb002.getQuantity();
BigDecimal amount = hgcb002 == null ? BigDecimal.ZERO : hgcb002.getAmount();
// 1.2、上月收发存汇总
HGCB004 hgcb004 = hgcb004List.get(key);
BigDecimal endQuantity = hgcb002 == null ? BigDecimal.ZERO : hgcb004.getEndQuantity();
BigDecimal endAmount = hgcb002 == null ? BigDecimal.ZERO : hgcb004.getEndAmount();
quantity = quantity.add(endQuantity);
amount = amount.add(endAmount);
BigDecimal price = amount.divide(quantity, 3, RoundingMode.HALF_UP);
cb002.setPrice(price);
cb002.setAmount(cb002.getQuantity().multiply(price));
cb002.setIsEstimate(0);
cb002.setBizType(BizTypeEnum.QTRK.getCode());
DaoUtils.insert(HGCB002.INSERT, cb002);
}
}
/**
* 添加HGCB002
* @param hgkc001 采购入库单
* @param params 账期维护
* @return 原材料成本核算
*/
public static HGCB002 addHgcb002(HGKC001 hgkc001, Map<String, String> params) {
HGCB002 hgcb002 = new HGCB002();
//BeanUtil.copyProperties(hgkc001, hgcb002);
hgcb002.setCompanyCode(params.get(HGCB002.FIELD_COMPANY_CODE));
hgcb002.setCompanyName(params.get(HGCB002.FIELD_COMPANY_NAME));
hgcb002.setAccountYear(params.get(HGCB002.FIELD_ACCOUNT_PERIOD).substring(0, 4));
hgcb002.setAccountPeriod(params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
hgcb002.setBizType(BizTypeEnum.CGRK.getCode());
hgcb002.setReceiptCode(hgkc001.getDepositNo());
hgcb002.setReceiptDate(hgkc001.getDepositDate());
hgcb002.setReceiveNo(hgkc001.getReceiveNo());
hgcb002.setWhCode(hgkc001.getWhCode());
hgcb002.setWhName(hgkc001.getWhName());
hgcb002.setInventType(hgkc001.getInventType());
hgcb002.setInventCode(hgkc001.getInventCode());
hgcb002.setInventName(hgkc001.getInventName());
hgcb002.setSpecId(hgkc001.getSpecId());
hgcb002.setSpec(hgkc001.getSpec());
hgcb002.setUnit(hgkc001.getUnit());
hgcb002.setIsEstimate(1); //默认是暂估1
hgcb002.setQuantity(hgkc001.getDepositQty());
hgcb002.setWeight(hgkc001.getDepositWeight());
hgcb002.setPrice(hgkc001.getPrice());
hgcb002.setAmount(hgkc001.getAmount());
return hgcb002;
}
/**
* 添加HGCB002
* @param hgkc006A 其他出库单
* @param params 账期维护
* @return 原材料成本核算
*/
public static HGCB002 addHgcb002(HGKC006A hgkc006A, Map<String, String> params) {
HGCB002 hgcb002 = new HGCB002();
hgcb002.setCompanyCode(params.get(HGCB002.FIELD_COMPANY_CODE));
hgcb002.setCompanyName(hgkc006A.getCompanyName());
hgcb002.setAccountYear(params.get(HGCB002.FIELD_ACCOUNT_PERIOD).substring(0, 4));
hgcb002.setAccountPeriod(params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
hgcb002.setBizType(BizTypeEnum.QTRK.getCode());
hgcb002.setReceiptCode(hgkc006A.getOtherEnterNo());
hgcb002.setReceiptDate(hgkc006A.getOtherEnterDate());
hgcb002.setWhCode(hgkc006A.getWhCode());
hgcb002.setWhName(hgkc006A.getWhName());
hgcb002.setInventType(hgkc006A.getInventType());
hgcb002.setInventCode(hgkc006A.getInventCode());
hgcb002.setInventName(hgkc006A.getInventName());
hgcb002.setSpecId(hgkc006A.getInventRecordId());
hgcb002.setSpec(hgkc006A.getPartSpec());
hgcb002.setIsEstimate(0);
hgcb002.setQuantity(hgkc006A.getInvQty());
hgcb002.setWeight(hgkc006A.getInvWeight());
hgcb002.setPrice(hgkc006A.getPrice());
hgcb002.setAmount(hgkc006A.getAmount());
return hgcb002;
}
/**
* 获取上月成本核算
* @param queryMap
*/
public static Map<String, List<HGCB002>> synchList(Map<String,Object> queryMap) {
queryMap.put(HGCB002.FIELD_ACCOUNT_PERIOD, "DATE_FORMAT(DATE_SUB(concat("+queryMap.get(HGCB002.FIELD_ACCOUNT_PERIOD)+",'01'), INTERVAL 1 MONTH), '%Y%m')");
List<HGCB002> list = DaoBase.getInstance().query("HGCB002.queryLast", queryMap);
return list.stream().collect(Collectors.groupingBy(HGCB002::getReceiptCode));
}
/**
* 宏冲成本核算
* @param hgcb0021
* @param hgcb002
*/
public static void addInvoic(List<HGCB002> hgcb0021, HGCB002 hgcb002){
for (HGCB002 cb002: hgcb0021) {
cb002.setAccountPeriod(hgcb002.getAccountPeriod());
cb002.setQuantity(cb002.getQuantity().multiply(new BigDecimal(-1)));
cb002.setAmount(cb002.getAmount().multiply(new BigDecimal(-1)));
DaoUtils.insert(HGCB002.INSERT, hgcb0021);
}
}
}
public static class HgCb003 {
public static void select(Map<String, String> params) {
AssertUtils.isEmpty(params.get(HGCB003.FIELD_COMPANY_CODE), "公司不能为空!");
params.put(HGKC001.FIELD_SUBMIT_STATUS, String.valueOf(1));
params.put(HGKC001.FIELD_INVENT_TYPE_DETAIL, InventTypeDetailEnum.RAW.getCode().toString());
saveHgkc008s(params); //保存生产领料单
saveHgkc007s(params); //保存其他出库单
}
// 保存生产领料单
public static void saveHgkc008s(Map<String, String> params){
Map<String, HGCB002> hgcb002List = HgCb004.listInvData(params,"HGCB002.queryLast"); //查询当月原材料入库成本
Map<String, HGCB004> hgcb004List = HgCb004.listInvData(params, "HGCB004.queryLast"); //查询上月收发存汇总期末
params.put(HGKC008.FIELD_RECEIPT_DATE, params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
Map<String, HGKC008B> hgKC008BList = HgCb004.listInvData(params,"HGKC008A.queryList"); //查询其他出库单
for (Map.Entry<String, HGKC008B> entry : hgKC008BList.entrySet()) {
String key = entry.getKey();
HGKC008B endKc = entry.getValue();
// 1.1、生产领料单
HGCB003 cb003 = addHgcb003(endKc, params);
// 1.2、原材料入库成本核算
HGCB002 hgcb002 = hgcb002List.get(key);
BigDecimal quantity = hgcb002 == null ? BigDecimal.ZERO : hgcb002.getQuantity();
BigDecimal amount = hgcb002 == null ? BigDecimal.ZERO : hgcb002.getAmount();
// 1.2、上月收发存汇总
HGCB004 hgcb004 = hgcb004List.get(key);
BigDecimal endQuantity = hgcb004 == null ? BigDecimal.ZERO : hgcb004.getEndQuantity();
BigDecimal endAmount = hgcb004 == null ? BigDecimal.ZERO : hgcb004.getEndAmount();
quantity = quantity.add(endQuantity);
amount = amount.add(endAmount);
BigDecimal price = amount.divide(quantity, 3, RoundingMode.HALF_UP);
cb003.setPrice(price);
cb003.setAmount(cb003.getQuantity().multiply(price));
cb003.setIsEstimate(0);
DaoUtils.insert(HGCB003.INSERT, cb003);
}
}
//保存其他出库单
public static void saveHgkc007s(Map<String, String> params){
Map<String, HGCB002> hgcb002List = HgCb004.listInvData(params,"HGCB002.queryLast"); //查询当月原材料成本核算
Map<String, HGCB004> hgcb004List = HgCb004.listInvData(params, "HGCB004.queryLast"); //查询上月期末
params.put(HGKC007.FIELD_OTHER_OUT_DATE, params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
Map<String, HGKC007B> hgkc007BList = HgCb004.listInvData(params,"HGKC007A.queryList"); //查询其他出库单
for (Map.Entry<String, HGKC007B> entry : hgkc007BList.entrySet()) {
String key = entry.getKey();
HGKC007B endKc = entry.getValue();
// 1.1、其他出库
HGCB003 cb003 = addHgcb003(endKc, params);
// 1.2、原材料成本核算
HGCB002 hgcb002 = hgcb002List.get(key);
BigDecimal quantity = hgcb002 == null ? BigDecimal.ZERO : hgcb002.getQuantity();
BigDecimal amount = hgcb002 == null ? BigDecimal.ZERO : hgcb002.getAmount();
// 1.2、上月收发存汇总
HGCB004 hgcb004 = hgcb004List.get(key);
BigDecimal endQuantity = hgcb004 == null ? BigDecimal.ZERO : hgcb004.getEndQuantity();
BigDecimal endAmount = hgcb004 == null ? BigDecimal.ZERO : hgcb004.getEndAmount();
quantity = quantity.add(endQuantity);
amount = amount.add(endAmount);
BigDecimal price = amount.divide(quantity, 3, RoundingMode.HALF_UP);
cb003.setPrice(price);
cb003.setAmount(cb003.getQuantity().multiply(price));
cb003.setIsEstimate(0);
DaoUtils.insert(HGCB003.INSERT, cb003);
}
}
/**
* 保存生产领料单
* @param hgkc008b 生产领料单
* @param params 参数
* @return 原材料出库成本核算
*/
public static HGCB003 addHgcb003(HGKC008B hgkc008b, Map<String, String> params) {
HGCB003 hgcb003 = new HGCB003();
hgcb003.setCompanyCode(params.get(HGCB002.FIELD_COMPANY_CODE));
hgcb003.setCompanyName(params.get(HGCB002.FIELD_COMPANY_NAME));
hgcb003.setAccountYear(params.get(HGCB002.FIELD_ACCOUNT_PERIOD).substring(0, 4));
hgcb003.setAccountPeriod(params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
hgcb003.setBizType(BizTypeEnum.SCLL.getCode());
hgcb003.setReceiptCode(hgkc008b.getApplyCode());
hgcb003.setReceiptDate(hgkc008b.getReceiptDate());
hgcb003.setWhCode(hgkc008b.getWhCode());
hgcb003.setWhName(hgkc008b.getWhName());
hgcb003.setInventType(hgkc008b.getInventType());
hgcb003.setInventCode(hgkc008b.getInventCode());
hgcb003.setInventName(hgkc008b.getInventName());
hgcb003.setSpecId(hgkc008b.getInvSpecId());
hgcb003.setSpec(hgkc008b.getInvSpec());
hgcb003.setIsEstimate(0); //默认是暂估0
hgcb003.setQuantity(hgkc008b.getInvQty());
hgcb003.setWeight(hgkc008b.getInvWeight());
hgcb003.setPrice(hgkc008b.getPrice());
hgcb003.setAmount(hgkc008b.getAmount());
return hgcb003;
}
/**
* 保存其他出库单
* @param hgkc007b 其他出库明细
* @param params 参数
* @return 原材料出库成本核算
*/
public static HGCB003 addHgcb003(HGKC007B hgkc007b, Map<String, String> params) {
HGCB003 hgcb003 = new HGCB003();
hgcb003.setCompanyCode(params.get(HGCB002.FIELD_COMPANY_CODE));
hgcb003.setCompanyName(hgkc007b.getCompanyName());
hgcb003.setAccountYear(params.get(HGCB002.FIELD_ACCOUNT_PERIOD).substring(0, 4));
hgcb003.setAccountPeriod(params.get(HGCB002.FIELD_ACCOUNT_PERIOD));
hgcb003.setBizType(BizTypeEnum.QTCK.getCode());
hgcb003.setReceiptCode(hgkc007b.getOtherOutNo());
hgcb003.setReceiptDate(hgkc007b.getOtherOutDate());
hgcb003.setWhCode(hgkc007b.getWhCode());
hgcb003.setWhName(hgkc007b.getWhName());
hgcb003.setInventType(hgkc007b.getInventType());
hgcb003.setInventCode(hgkc007b.getInventCode());
hgcb003.setInventName(hgkc007b.getInventName());
hgcb003.setSpecId(hgkc007b.getInventRecordId());
hgcb003.setSpec(hgkc007b.getPartSpec());
hgcb003.setIsEstimate(0);
hgcb003.setQuantity(hgkc007b.getInvQty());
hgcb003.setWeight(hgkc007b.getInvWeight());
hgcb003.setPrice(hgkc007b.getPrice());
hgcb003.setAmount(hgkc007b.getAmount());
return hgcb003;
}
}
public static class HgCb004 {
/**
* 同步数据
* @param queryMap
* @return
*/
public static List<HGCB004> synchData(Map<String,Object> queryMap) {
queryMap.put(HGCB004.FIELD_DATE_TYPE, CommonConstant.DateType.MONTH);
queryMap.put(HGCB004.FIELD_INVENT_TYPE_DETAIL,InventTypeDetailEnum.RAW.getCode());
//删除当月同时数据
DaoBase.getInstance().delete(HGCB004.DELETE_BY_TIME, queryMap);
// 1、统计收发存
List<HGCB004> results = statData(queryMap);
// 4、设置基础信息
setBaseInfo(results);
// 5、写入数据库
DaoBase.getInstance().insertBatch(HGCB004.INSERT, results);
return results;
}
/**
* 统计库存收发存
* @param queryMap
* @return
*/
public static List<HGCB004> statData(Map queryMap) {
// 1.1、期初库存
queryMap.put(HGCB004.FIELD_INVENT_TYPE_DETAIL, InventTypeDetailEnum.RAW.getCode());
Map<String, HGCB004> initCb4Map = listInvData(queryMap, HGCB004.QUERY_LAST);
// 1.2、原材料入库成本核算库存
Map<String, HGCB002> initCb2Map = listInvData(queryMap, HGCB002.QUERY_DETAIL);
// 1.2、原材料出库成本核算库存
Map<String, HGCB003> initCb3Map = listInvData(queryMap, HGCB003.QUERY_DETAIL);
// 1.2、采购入库单
queryMap.put(HGCB002.FIELD_BIZ_TYPE, BizTypeEnum.CGRK.getCode());
Map<String, HGCB002> cgRkMap = listInvData(queryMap, HGCB002.QUERY);
// 1.4、其他入库单
queryMap.put(HGCB002.FIELD_BIZ_TYPE, BizTypeEnum.QTRK.getCode());
Map<String, HGCB002> qtRkMap = listInvData(queryMap, HGCB002.QUERY);
// 1.5、生产领料单
queryMap.put(HGCB002.FIELD_BIZ_TYPE, BizTypeEnum.SCLL.getCode());
Map<String, HGCB003> scCkMap = listInvData(queryMap, HGCB003.QUERY);
// 1.7、其它出库
queryMap.put(HGCB002.FIELD_BIZ_TYPE, BizTypeEnum.QTCK.getCode());
Map<String, HGCB003> qtCkMap = listInvData(queryMap, HGCB003.QUERY);
// 1.6、生产入库
Map<String, HGKC003> scRkMap = listInvData(queryMap, HGKC003.QUERY_DETAIL);
// 2.0 销售出库
Map<String, HGKC004A> xsCkMap = listInvData(queryMap, HGKC004A.QUERY_DETAIL);
// 根据期末库存生成收发存对象
return buildKcBean(queryMap, initCb4Map, initCb2Map, initCb3Map, cgRkMap, qtRkMap, scCkMap, qtCkMap, scRkMap, xsCkMap);
}
public static List<HGCB004> buildKcBean( Map queryMap,
Map<String, HGCB004> initCb4Map, Map<String, HGCB002> initCb2Map, Map<String, HGCB003> initCb3Map,
Map<String, HGCB002> cgRkMap, Map<String, HGCB002> qtRkMap, Map<String, HGCB003> scCkMap,
Map<String, HGCB003> qtCkMap, Map<String, HGKC003> scRkMap, Map<String, HGKC004A> xsCkMap
) {
List<HGCB004> newcB004s = new ArrayList<>();
Set<String> keyList = initCb4Map.keySet();
keyList.addAll(initCb2Map.keySet());
for (String key: keyList) {
HGCB004 hgcb004 = initCb4Map.get(key);
if (hgcb004 == null) {
setHgcb004(hgcb004, initCb2Map.get(key));
}
HGCB004 cb004 = BeanUtils.copy(hgcb004, HGCB004.class);
cb004.setDateType(queryMap.get(HGCB004.FIELD_DATE_TYPE).toString());
cb004.setAccountPeriod(queryMap.get(HGCB004.FIELD_ACCOUNT_PERIOD).toString());
// 1.1期初库存
cb004.setInitQuantity(hgcb004.getEndQuantity());
cb004.setInitWeight(hgcb004.getEndWeight());
cb004.setInitAmount(hgcb004.getEndAmount());
// 1.2、采购入库
HGCB002 cgRk = cgRkMap.get(key);
cb004.setCgEnterQuantity(cgRk == null ? BigDecimal.ZERO : cgRk.getQuantity());
cb004.setCgEnterWeight(cgRk == null ? BigDecimal.ZERO : cgRk.getWeight());
cb004.setCgEnterAmount(cgRk == null ? BigDecimal.ZERO : cgRk.getAmount());
// 1.3、其他入库
HGCB002 qtRk = qtRkMap.get(key);
cb004.setQtEnterQuantity(qtRk == null ? BigDecimal.ZERO : qtRk.getQuantity());
cb004.setQtEnterWeight(qtRk == null ? BigDecimal.ZERO : qtRk.getWeight());
cb004.setQtEnterAmount(qtRk == null ? BigDecimal.ZERO : qtRk.getAmount());
//1.4 入库
HGCB002 cb002 = initCb2Map.get(key);
cb004.setEnterQuantity(cb002 == null ? BigDecimal.ZERO : cb002.getQuantity());
cb004.setEnterWeight(cb002 == null ? BigDecimal.ZERO : cb002.getWeight());
cb004.setEnterAmount(cb002 == null ? BigDecimal.ZERO : cb002.getAmount());
// 1.5、生产领料
HGCB003 scCk = scCkMap.get(key);
cb004.setScOuterQuantity(scCk == null ? BigDecimal.ZERO : scCk.getQuantity());
cb004.setScOuterWeight(scCk == null ? BigDecimal.ZERO : scCk.getWeight());
cb004.setScOuterAmount(scCk == null ? BigDecimal.ZERO : scCk.getAmount());
// 1.6、生产入库
HGKC003 scRk = scRkMap.get(key);
cb004.setScEnterQuantity(scRk == null ? BigDecimal.ZERO : scRk.getInvQty());
cb004.setScEnterWeight(scRk == null ? BigDecimal.ZERO : scRk.getInvWeight());
cb004.setScEnterAmount(BigDecimal.ZERO);
// 1.7、其他出库单
HGCB003 qtCk = qtCkMap.get(key);
cb004.setQtOuterQuantity(qtCk == null ? BigDecimal.ZERO : qtCk.getQuantity());
cb004.setQtOuterWeight(qtCk == null ? BigDecimal.ZERO : qtCk.getWeight());
cb004.setQtOuterAmount(qtCk == null ? BigDecimal.ZERO : qtCk.getAmount());
// 1.8、出库
HGCB003 cb003 = initCb3Map.get(key);
cb004.setOuterQuantity(cb003 == null ? BigDecimal.ZERO : cb003.getQuantity());
cb004.setOuterWeight(cb003 == null ? BigDecimal.ZERO : cb003.getWeight());
cb004.setOuterAmount(cb003 == null ? BigDecimal.ZERO : cb003.getAmount());
// 2.0、销售出库
HGKC004A xsCk = xsCkMap.get(key);
cb004.setXsOuterQuantity(xsCk == null ? BigDecimal.ZERO : xsCk.getQuantity());
cb004.setXsOuterWeight(xsCk == null ? BigDecimal.ZERO : xsCk.getWeight());
cb004.setXsOuterAmount(xsCk == null ? BigDecimal.ZERO : xsCk.getAmount());
// 1.9、期末库存
cb004.setEndQuantity(cb004.getInitQuantity().add(cb004.getEnterQuantity()).subtract(cb004.getOuterQuantity()));
cb004.setEndWeight(cb004.getInitWeight().add(cb004.getEnterWeight()).subtract(cb004.getOuterWeight()));
cb004.setEndAmount(cb004.getInitAmount().add(cb004.getEnterAmount()).subtract(cb004.getOuterAmount()));
newcB004s.add(cb004);
}
return newcB004s;
}
public static <T extends DaoEPBase> Map<String, T> listInvData(Map DataMap, String sqlId) {
List<T> results = DaoBase.getInstance().query(sqlId, DataMap);
if (CollectionUtils.isEmpty(results)) {
return new HashMap<>();
}
return results.stream().collect(Collectors.toMap(item -> buildKey(item.toMap()), item -> item));
}
/**
* 构建KEY
*
* @param dataMap
* @return
*/
public static String buildKey(Map dataMap) {
return buildKey(dataMap.get(HGCB004.FIELD_COMPANY_CODE), dataMap.get(HGCB004.FIELD_DEP_CODE), dataMap.get(HGCB004.FIELD_INVENT_RECORD_ID),
dataMap.get(HGCB004.FIELD_INVENT_CODE), dataMap.get(HGCB004.FIELD_WH_CODE), dataMap.get(HGCB004.FIELD_INVENT_RECORD_ID));
}
/**
* 构建KEY
*
* @param companyCode
* @param depCode
* @param inventType
* @param inventCode
* @param whCode
* @param inventRecordId
* @return
*/
public static String buildKey(Object companyCode, Object depCode, Object inventType, Object inventCode,
Object whCode, Object inventRecordId) {
return ObjectUtils.trimToEmpty(companyCode) + "#"
+ ObjectUtils.trimToEmpty(depCode) + "#"
+ ObjectUtils.trimToEmpty(inventType) + "#"
+ ObjectUtils.trimToEmpty(inventCode) + "#"
+ ObjectUtils.trimToEmpty(whCode) + "#"
+ ObjectUtils.trimToEmpty(inventRecordId);
}
public static void setHgcb004(HGCB004 hgcb004,HGCB002 hgcb002){
if (hgcb004 == null){
hgcb004 = new HGCB004();
}
hgcb004.fromMap(hgcb002.toMap());
}
}
}
......@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
......@@ -93,6 +94,7 @@ public class ServiceHGCW010 extends ServiceBase {
HGCW010.setSigningDate(DateUtils.formatShort(HGCW010.getSigningDate()));
// 获取项目名称
HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(HGCW010.getProjCode());
AssertUtils.isNull(HGSC001, "项目编码[" + HGCW010.getProjCode() + "]不存在");
HGCW010.setProjName(HGSC001.getProjName());
if (HGCW010.getId() == null || HGCW010.getId() == 0) {
this.add(HGCW010);
......
......@@ -269,14 +269,14 @@
</select>
<select id="getMaxAccountPeriod" resultClass="java.util.HashMap">
<select id="getMaxAccountPeriod" resultClass="com.baosight.hggp.hg.cw.domain.HGCW001">
select
ACCOUNT_CODE as "accountCode",
COMPANY_CODE as "companyCode",
ACCOUNT_YEAR as "accountYear",
MAX(ACCOUNT_PERIOD) as "accountPeriod"
from ${hggpSchema}.HGCW001
where ACCOUNT_PERIOD_STATUS = '0'
where 1=1
<include refid="condition" />
group by
ACCOUNT_CODE, COMPANY_CODE, ACCOUNT_YEAR
......
......@@ -102,6 +102,7 @@ public class HGKC001 extends DaoEPBase {
public static final String QUERY = "HGKC001.query";
public static final String QUERY_LIST = "HGKC001.queryList";
public static final String COUNT = "HGKC001.count";
public static final String INSERT = "HGKC001.insert";
public static final String UPDATE = "HGKC001.update";
......@@ -860,43 +861,83 @@ public class HGKC001 extends DaoEPBase {
public void setSubmitStatus(Integer submitStatus) {
this.submitStatus = submitStatus;
}
/**
* get the storageType - 存储类型.
* @return the storageType
*/
public Integer getStorageType() {
return storageType;
}
/**
* set the storageType - 存储类型.
*
* @param storageType - 存储类型
*/
public void setStorageType(Integer storageType) {
this.storageType = storageType;
}
/**
* get the isReturn - 是否退货.
* @return the isReturn
*/
public Integer getIsReturn() {
return isReturn;
}
/**
* set the isReturn - 是否退货.
*
* @param isReturn - 是否退货
*/
public void setIsReturn(Integer isReturn) {
this.isReturn = isReturn;
}
/**
* get the price - 单价.
* @return the price
*/
public BigDecimal getPrice() {
return price;
}
/**
* set the price - 单价.
*
* @param price - 单价
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* get the amount - 金额.
* @return the amount
*/
public BigDecimal getAmount() {
return amount;
}
/**
* set the amount - 金额.
*
* @param amount - 金额
*/
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
/**
* get the inventTypeDetail - 存货类型明细.
* @return the inventTypeDetail
*/
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
/**
* set the inventTypeDetail - 存货类型明细.
*
* @param inventTypeDetail - 存货类型明细
*/
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
......
......@@ -116,6 +116,7 @@ public class HGKC003 extends DaoEPBase {
public static final String COL_IS_RETURN = "IS_RETURN"; /* 是否退回*/
public static final String QUERY = "HGKC003.query";
public static final String QUERY_DETAIL = "HGKC003.queryDetail";
public static final String COUNT = "HGKC003.count";
public static final String INSERT = "HGKC003.insert";
public static final String UPDATE = "HGKC003.update";
......
......@@ -53,6 +53,7 @@ public class HGKC004A extends DaoEPBase {
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_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -88,6 +89,7 @@ public class HGKC004A extends DaoEPBase {
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String QUERY = "HGKC004A.query";
public static final String QUERY_DETAIL = "HGKC004A.queryDetail";
public static final String COUNT = "HGKC004A.count";
public static final String INSERT = "HGKC004A.insert";
public static final String UPDATE = "HGKC004A.update";
......@@ -125,6 +127,7 @@ public class HGKC004A extends DaoEPBase {
private String whName = " "; /* 仓库名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String inventTypeDetail;
......@@ -280,7 +283,9 @@ public class HGKC004A extends DaoEPBase {
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -739,6 +744,13 @@ public class HGKC004A extends DaoEPBase {
this.projName = projName;
}
public String getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(String inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -778,6 +790,7 @@ public class HGKC004A extends DaoEPBase {
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));
setInventTypeDetail(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -818,6 +831,7 @@ public class HGKC004A extends DaoEPBase {
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_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
......
......@@ -291,6 +291,9 @@
<isNotEmpty prepend=" AND " property="accountPeriod">
LEFT(DEPOSIT_DATE,6) = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<include refid="orderBy"/>
</select>
......
......@@ -376,7 +376,7 @@
COALESCE(SUM(INV_QTY), 0) AS "invQty",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC003
WHERE 1=1
WHERE DELETE_FLAG = '0'
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
......@@ -454,4 +454,39 @@
</select>
<select id="queryDetail" parameterClass="java.util.HashMap" resultClass="com.baosight.hggp.hg.kc.domain.HGKC003">
SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
SUM(INV_QTY) as "invQty", <!-- 数量 -->
SUM(INV_WEIGHT) as "invWeight", <!-- 重量 -->
SUM(AMOUNT) as "amount" <!-- 金额 -->
FROM ${hggpSchema}.HGKC003
WHERE 1=1 AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
LEFT(DEPOSIT_DATE,6) = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = 1
</isEmpty>
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, WH_CODE
</select>
</sqlMap>
......@@ -30,7 +30,8 @@
WEIGHT as "weight", <!-- 重量 -->
PARENT_ID as "parentId", <!-- 销售出库单ID -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount" <!-- 金额 -->
AMOUNT as "amount", <!-- 金额 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
</sql>
<sql id="condition">
......@@ -113,6 +114,9 @@
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
</sql>
<select id="query" parameterClass="HashMap" resultClass="HGKC004A">
......@@ -162,9 +166,10 @@
WEIGHT, <!-- 重量 -->
PARENT_ID, <!-- 销售出库单ID -->
PRICE, <!-- 单价 -->
AMOUNT <!-- 金额 -->
AMOUNT, <!-- 金额 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #quantity#, #unitWeight#, #weight#, #parentId#, #price#, #amount#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #quantity#, #unitWeight#, #weight#, #parentId#, #price#, #amount#,#inventTypeDetail#)
</insert>
<delete id="delete">
......@@ -210,7 +215,8 @@
WEIGHT = #weight#, <!-- 重量 -->
PARENT_ID = #parentId#, <!-- 销售出库单ID -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount# <!-- 金额 -->
AMOUNT = #amount#, <!-- 金额 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
</update>
......@@ -235,4 +241,42 @@
GROUP BY a.ACCOUNT_CODE,a.COMPANY_CODE,a.COMPANY_NAME, a.DEP_CODE, b.WH_CODE, b.PROJ_CODE, a.INVENT_CODE
</select>
<select id="queryDetail" resultClass="com.baosight.hggp.hg.kc.domain.HGKC004A">
SELECT
a.ACCOUNT_CODE AS "accountCode",
a.DEP_CODE AS "depCode",
a.COMPANY_CODE as "companyCode",
b.WH_CODE AS "whCode",
a.INVENT_RECORD_ID as "inventRecordId",
a.INVENT_TYPE as "inventType",
a.INVENT_CODE AS "inventCode",
COALESCE(SUM(a.QUANTITY), 0) AS "quantity",
COALESCE(SUM(a.WEIGHT), 0) AS "weight",
COALESCE(SUM(a.AMOUNT)) as "amount"
FROM ${hggpSchema}.HGKC004A a LEFT JOIN ${hggpSchema}.HGKC004 b on a.PARENT_ID = b.ID
WHERE 1=1 and a.DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
b.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty property=" AND " prepend="accountPeriod">
LEFT(b.RECEIPT_DATE,6) = #accountPeriod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
a.INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
b.STATUS = #submitStatus#
</isNotEmpty>
<isEmpty prepend=" AND " property="submitStatus">
b.STATUS = 1
</isEmpty>
GROUP BY a.ACCOUNT_CODE, a.DEP_CODE, a.COMPANY_CODE, b.WH_CODE, a.INVENT_RECORD_ID, a.INVENT_TYPE, a.INVENT_CODE
</select>
</sqlMap>
......@@ -370,4 +370,81 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
<select id="queryList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC006A">
SELECT
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
B.FIELD_OTHER_ENTER_DATE as "otherEnterDate", <!-- 其他入库日期 -->
A.OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
A.WH_CODE as "whCode", <!-- 仓库编码 -->
A.WH_NAME as "whName", <!-- 仓库名称 -->
A.INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
A.INVENT_TYPE as "inventType", <!-- 存货类型 -->
A.INVENT_CODE as "inventCode", <!-- 存货编码 -->
A.INVENT_NAME as "inventName", <!-- 存货名称 -->
A.INV_QTY as "invQty", <!-- 数量 -->
A.INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
A.INV_WEIGHT as "invWeight", <!-- 重量 -->
A.OTHER_ENTER_NO_OLD as "otherEnterNoOld", <!-- 其他入库单号(旧) -->
A.REMARK as "remark", <!-- 备注 -->
A.FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
A.PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
A.PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRDT_TYPE as "prdtType", <!-- 产品类型 -->
A.PRDT_CODE as "prdtCode", <!-- 产品编码 -->
A.PRDT_NAME as "prdtName", <!-- 产品名称 -->
A.PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
A.PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
A.PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
A.PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
A.PART_TYPE as "partType", <!-- 零件类型 -->
A.PART_CODE as "partCode", <!-- 零件编码 -->
A.PART_NAME as "partName", <!-- 零件名称 -->
A.PART_LENGTH as "partLength", <!-- 零件-长 -->
A.PART_WIDTH as "partWidth", <!-- 零件-宽 -->
A.PART_THICK as "partThick", <!-- 零件-厚 -->
A.PART_COEFFICIENT as "partCoefficient", <!-- 零件-系数 -->
A.PART_SPEC as "partSpec", <!-- 零件规格 -->
A.PART_SPEC_ID as "partSpecId", <!-- 零件规格id -->
A.PRIMARY_ID as "primaryId", <!-- 主表id -->
A.PRICE as "price", <!-- 单价 -->
A.AMOUNT as "amount", <!-- 金额 -->
A.SOURCE as "source", <!-- 数据来源 -->
A.INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC006A A
LEFT JOIN ${hggpSchema}.HGKC006 B ON A.PRIMARY_ID = B.ID WHERE 1=1 and A.DELETE_FLAG = 0 AND B.SUBMIT_STATUS = 1
<isNotEmpty prepend=" AND " property="accountCode">
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterDate">
LEFT(B.OTHER_ENTER_DATE,6) = #otherEnterDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNo">
A.OTHER_ENTER_NO = #otherEnterNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
A.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
A.INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
A.OTHER_ENTER_DATE desc
</isEmpty>
</dynamic>
</select>
</sqlMap>
......@@ -231,57 +231,63 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC007A (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
OTHER_OUT_DATE, <!-- 其他出库日期 -->
OTHER_OUT_NO, <!-- 其他出库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INV_QTY, <!-- 数量 -->
INV_UNIT_WEIGHT, <!-- 单重 -->
INV_WEIGHT, <!-- 重量 -->
OTHER_OUT_NO_OLD, <!-- 其他出库单号(旧) -->
REMARK, <!-- 备注 -->
FACTORY_CODE, <!-- 工厂代码 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROD_TASK_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PRDT_LENGTH, <!-- 产品-长 -->
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
PART_SPEC_ID, <!-- 零件规格id -->
PRIMARY_ID, <!-- 主表id -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
SOURCE, <!-- 数据来源 -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
OTHER_OUT_DATE, <!-- 其他出库日期 -->
OTHER_OUT_NO, <!-- 其他出库单号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INV_QTY, <!-- 数量 -->
INV_UNIT_WEIGHT, <!-- 单重 -->
INV_WEIGHT, <!-- 重量 -->
OTHER_OUT_NO_OLD, <!-- 其他出库单号(旧) -->
REMARK, <!-- 备注 -->
FACTORY_CODE, <!-- 工厂代码 -->
PROD_ORDER_NO, <!-- 生产订单号 -->
PROD_TASK_NO, <!-- 生产任务号 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
PRDT_TYPE, <!-- 产品类型 -->
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
PRDT_LENGTH, <!-- 产品-长 -->
PRDT_WIDTH, <!-- 产品-宽 -->
PRDT_THICK, <!-- 产品-厚 -->
PRDT_SPEC, <!-- 产品规格 -->
PART_TYPE, <!-- 零件类型 -->
PART_CODE, <!-- 零件编码 -->
PART_NAME, <!-- 零件名称 -->
PART_LENGTH, <!-- 零件-长 -->
PART_WIDTH, <!-- 零件-宽 -->
PART_THICK, <!-- 零件-厚 -->
PART_SPEC, <!-- 零件规格 -->
PART_SPEC_ID, <!-- 零件规格id -->
PRIMARY_ID, <!-- 主表id -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
SOURCE, <!-- 数据来源 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherOutDate#, #otherOutNo#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#, #otherOutNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #partSpecId#,#primaryId#, #price#, #amount#, #source#,#inventTypeDetail#)
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherOutDate#, #otherOutNo#, #whCode#, #whName#,
#inventRecordId#, #inventType#, #inventCode#, #inventName#, #invQty#, #invUnitWeight#, #invWeight#,
#otherOutNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#,
#prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#,
#partLength#, #partWidth#, #partThick#, #partSpec#, #partSpecId#,#primaryId#, #price#, #amount#,
#source#,#inventTypeDetail#)
</insert>
<delete id="delete">
......@@ -291,57 +297,57 @@
<update id="update">
UPDATE ${hggpSchema}.HGKC007A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
OTHER_OUT_DATE = #otherOutDate#, <!-- 其他出库日期 -->
OTHER_OUT_NO = #otherOutNo#, <!-- 其他出库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INV_QTY = #invQty#, <!-- 数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 单重 -->
INV_WEIGHT = #invWeight#, <!-- 重量 -->
OTHER_OUT_NO_OLD = #otherOutNoOld#, <!-- 其他出库单号(旧) -->
REMARK = #remark#, <!-- 备注 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂代码 -->
PROD_ORDER_NO = #prodOrderNo#, <!-- 生产订单号 -->
PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 -->
PART_LENGTH = #partLength#, <!-- 零件-长 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PART_SPEC_ID = #partSpecId#, <!-- 零件规格id -->
PRIMARY_ID = #primaryId#, <!-- 主表id -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
SOURCE = #source#, <!-- 数据来源 -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
OTHER_OUT_DATE = #otherOutDate#, <!-- 其他出库日期 -->
OTHER_OUT_NO = #otherOutNo#, <!-- 其他出库单号 -->
WH_CODE = #whCode#, <!-- 仓库编码 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INV_QTY = #invQty#, <!-- 数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 单重 -->
INV_WEIGHT = #invWeight#, <!-- 重量 -->
OTHER_OUT_NO_OLD = #otherOutNoOld#, <!-- 其他出库单号(旧) -->
REMARK = #remark#, <!-- 备注 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂代码 -->
PROD_ORDER_NO = #prodOrderNo#, <!-- 生产订单号 -->
PROD_TASK_NO = #prodTaskNo#, <!-- 生产任务号 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PRDT_TYPE = #prdtType#, <!-- 产品类型 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PRDT_LENGTH = #prdtLength#, <!-- 产品-长 -->
PRDT_WIDTH = #prdtWidth#, <!-- 产品-宽 -->
PRDT_THICK = #prdtThick#, <!-- 产品-厚 -->
PRDT_SPEC = #prdtSpec#, <!-- 产品规格 -->
PART_TYPE = #partType#, <!-- 零件类型 -->
PART_CODE = #partCode#, <!-- 零件编码 -->
PART_NAME = #partName#, <!-- 零件名称 -->
PART_LENGTH = #partLength#, <!-- 零件-长 -->
PART_WIDTH = #partWidth#, <!-- 零件-宽 -->
PART_THICK = #partThick#, <!-- 零件-厚 -->
PART_SPEC = #partSpec#, <!-- 零件规格 -->
PART_SPEC_ID = #partSpecId#, <!-- 零件规格id -->
PRIMARY_ID = #primaryId#, <!-- 主表id -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
SOURCE = #source#, <!-- 数据来源 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
WHERE
ID = #id#
</update>
......@@ -364,4 +370,82 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
<select id="queryList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007A">
SELECT
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
B.OTHER_OUT_DATE as "otherOutDate", <!-- 其他出库日期 -->
B.OTHER_OUT_NO as "otherOutNo", <!-- 其他出库单号 -->
A.WH_CODE as "whCode", <!-- 仓库编码 -->
A.WH_NAME as "whName", <!-- 仓库名称 -->
A.INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
A.INVENT_TYPE as "inventType", <!-- 存货类型 -->
A.INVENT_CODE as "inventCode", <!-- 存货编码 -->
A.INVENT_NAME as "inventName", <!-- 存货名称 -->
SUM(A.INV_QTY) as "invQty", <!-- 数量 -->
SUM(A.INV_WEIGHT) as "invWeight", <!-- 重量 -->
A.FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
A.PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
A.PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRDT_TYPE as "prdtType", <!-- 产品类型 -->
A.PRDT_CODE as "prdtCode", <!-- 产品编码 -->
A.PRDT_NAME as "prdtName", <!-- 产品名称 -->
A.PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
A.PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
A.PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
A.PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
A.PART_TYPE as "partType", <!-- 零件类型 -->
A.PART_CODE as "partCode", <!-- 零件编码 -->
A.PART_NAME as "partName", <!-- 零件名称 -->
A.PART_LENGTH as "partLength", <!-- 零件-长 -->
A.PART_WIDTH as "partWidth", <!-- 零件-宽 -->
A.PART_THICK as "partThick", <!-- 零件-厚 -->
A.PART_SPEC as "partSpec", <!-- 零件规格 -->
A.PART_SPEC_ID as "partSpecId", <!-- 零件规格id -->
A.PRIMARY_ID as "primaryId", <!-- 主表id -->
CASE WHEN IFNULL(SUM(A.INV_QTY), 0) = 0 THEN 0 ELSE SUM(A.AMOUNT) / IFNULL(SUM(A.INV_QTY), 0) END as "price", <!-- 单价 -->
SUM(A.AMOUNT) as "amount" <!-- 金额 -->
FROM ${hggpSchema}.HGKC007A A
inner join ${hggpSchema}.HGKC007 B on A.PRIMARY_ID = B.ID
WHERE 1=1 and A.DELETE_FLAG = 0 AND B.SUBMIT_STATUS = 1
<isNotEmpty prepend=" AND " property="accountCode">
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
B.OTHER_OUT_DATE = #otherOutDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
B.OTHER_OUT_NO = #otherOutNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
A.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
A.INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
A.INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
GROUP BY A.ACCOUNT_CODE, A.DEP_CODE, A.COMPANY_CODE, A.COMPANY_NAME, B.OTHER_OUT_DATE, B.OTHER_OUT_NO, A.WH_CODE, A.WH_NAME, A.INVENT_RECORD_ID, A.INVENT_TYPE, A.INVENT_CODE, A.INVENT_NAME, A.FACTORY_CODE,
A.PROD_ORDER_NO, A.PROD_TASK_NO, A.PROJ_CODE, A.PROJ_NAME, A.PRDT_TYPE, A.PRDT_CODE, A.PRDT_NAME, A.PRDT_LENGTH, A.PRDT_WIDTH, A.PRDT_THICK, A.PRDT_SPEC, A.PART_TYPE, A.PART_CODE, A.PART_NAME,
A.PART_LENGTH, A.PART_WIDTH, A.PART_THICK, A.PART_SPEC, A.PART_SPEC_ID, A.PRIMARY_ID
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
B.OTHER_OUT_DATE desc
</isEmpty>
</dynamic>
</select>
</sqlMap>
......@@ -157,42 +157,44 @@
<include refid="condition" />
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC008A (ID, <!-- 主键id -->
ACCOUNT_CODE, <!-- 账套 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
RECEIVE_ID, <!-- 领料单id -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE, <!-- 仓库编号 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INV_SPEC_ID, <!-- 规格id -->
INV_SPEC, <!-- 规格 -->
INV_LENGTH, <!-- 长度(MM) -->
INV_WIDTH, <!-- 宽度(MM) -->
INV_THICK, <!-- 厚度(MM) -->
INV_QTY, <!-- 数量 -->
INV_UNIT_WEIGHT, <!-- 单重 -->
INV_WEIGHT, <!-- 重量 -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
ACCOUNT_CODE, <!-- 账套 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
DELETE_FLAG, <!-- 是否删除 0-否1-是 -->
RECEIVE_ID, <!-- 领料单id -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE, <!-- 仓库编号 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INV_SPEC_ID, <!-- 规格id -->
INV_SPEC, <!-- 规格 -->
INV_LENGTH, <!-- 长度(MM) -->
INV_WIDTH, <!-- 宽度(MM) -->
INV_THICK, <!-- 厚度(MM) -->
INV_QTY, <!-- 数量 -->
INV_UNIT_WEIGHT, <!-- 单重 -->
INV_WEIGHT, <!-- 重量 -->
PRICE, <!-- 单价 -->
AMOUNT, <!-- 金额 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#,#projCode#, #projName#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #receiveId#, #companyCode#, #companyName#, #whCode#, #whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invSpecId#,#invSpec#, #invLength#, #invWidth#, #invThick#, #invQty#, #invUnitWeight#, #invWeight#, #price#, #amount#, #inventTypeDetail#)
)
VALUES (#id#, #accountCode#,#projCode#, #projName#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #receiveId#, #companyCode#, #companyName#, #whCode#,
#whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invSpecId#,#invSpec#, #invLength#,
#invWidth#, #invThick#, #invQty#, #invUnitWeight#, #invWeight#, #price#, #amount#, #inventTypeDetail#)
</insert>
<delete id="delete">
......@@ -202,41 +204,40 @@
<update id="update">
UPDATE ${hggpSchema}.HGKC008A
SET
ACCOUNT_CODE = #accountCode#, <!-- 账套 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
RECEIVE_ID = #receiveId#, <!-- 领料单id -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
WH_CODE = #whCode#, <!-- 仓库编号 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INV_SPEC_ID = #invSpecId#, <!-- 规格id -->
INV_SPEC = #invSpec#, <!-- 规格 -->
INV_LENGTH = #invLength#, <!-- 长度(MM) -->
INV_WIDTH = #invWidth#, <!-- 宽度(MM) -->
INV_THICK = #invThick#, <!-- 厚度(MM) -->
INV_QTY = #invQty#, <!-- 数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 单重 -->
INV_WEIGHT = #invWeight#, <!-- 重量 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
ACCOUNT_CODE = #accountCode#, <!-- 账套 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除 0-否1-是 -->
RECEIVE_ID = #receiveId#, <!-- 领料单id -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
WH_CODE = #whCode#, <!-- 仓库编号 -->
WH_NAME = #whName#, <!-- 仓库名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INV_SPEC_ID = #invSpecId#, <!-- 规格id -->
INV_SPEC = #invSpec#, <!-- 规格 -->
INV_LENGTH = #invLength#, <!-- 长度(MM) -->
INV_WIDTH = #invWidth#, <!-- 宽度(MM) -->
INV_THICK = #invThick#, <!-- 厚度(MM) -->
INV_QTY = #invQty#, <!-- 数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 单重 -->
INV_WEIGHT = #invWeight#, <!-- 重量 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount#, <!-- 金额 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE ID = #id#
WHERE ID = #id#
</update>
<delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGKC008A WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
......@@ -261,4 +262,58 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
<select id="queryList" resultClass="com.baosight.hggp.hg.kc.domain.HGKC008B">
SELECT
A.ACCOUNT_CODE as "accountCode", <!-- 账套 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.RECEIVE_ID as "receiveId", <!-- 领料单id -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
B.RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
B.APPLY_CODE as "applyCode", <!-- 申请单号 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.WH_CODE as "whCode", <!-- 仓库编号 -->
A.WH_NAME as "whName", <!-- 仓库名称 -->
A.INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
A.INVENT_TYPE as "inventType", <!-- 存货类型 -->
A.INVENT_CODE as "inventCode", <!-- 存货编码 -->
A.INVENT_NAME as "inventName", <!-- 存货名称 -->
A.INV_SPEC_ID as "invSpecId", <!-- 规格Id -->
A.INV_SPEC as "invSpec", <!-- 规格 -->
A.INV_LENGTH as "invLength", <!-- 长度(MM) -->
A.INV_WIDTH as "invWidth", <!-- 宽度(MM) -->
A.INV_THICK as "invThick", <!-- 厚度(MM) -->
SUM(A.INV_QTY) as "invQty", <!-- 数量 -->
SUM(A.INV_WEIGHT) as "invWeight", <!-- 重量 -->
CASE WHEN IFNULL(SUM(A.INV_QTY),0)=0 THEN 0 ELSE SUM(A.AMOUNT) / SUM(A.INV_QTY) END as "price", <!-- 单价 -->
SUM(A.AMOUNT) as "amount", <!-- 金额 -->
A.INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC008A A
INNER JOIN ${hggpSchema}.HGKC008 B ON A.RECEIVE_ID = B.ID
WHERE 1=1 AND A.DELETE_FLAG = 0 AND B.STATUS = 1
<isNotEmpty prepend=" AND " property="accountCode">
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveId">
A.RECEIVE_ID = #receiveId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
A.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
B.RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyCode">
B.APPLY_CODE = #applyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
A.INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
GROUP BY A.ACCOUNT_CODE, A.DEP_CODE, A.RECEIVE_ID, A.COMPANY_CODE, A.COMPANY_NAME, B.RECEIPT_DATE, B.APPLY_CODE, A.PROJ_CODE, A.PROJ_NAME, A.WH_CODE, A.WH_NAME, A.INVENT_RECORD_ID, A.INVENT_TYPE, A.INVENT_CODE, A.INVENT_NAME, A.INV_SPEC_ID, A.INV_SPEC, A.INV_LENGTH, A.INV_WIDTH, A.INV_THICK, A.INVENT_TYPE_DETAIL
</select>
</sqlMap>
......@@ -295,6 +295,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
hgkc004A.setUnitWeight(hgyx001A.getUnitWeight());
hgkc004A.setWeight(hgyx001A.getWeight());
hgkc004A.setParentId(hgkc004.getId());
hgkc004A.setInventTypeDetail(hgyx001A.getInventTypeDetail());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
......
......@@ -241,6 +241,7 @@ public class ServiceHGYX002 extends ServiceEPBase {
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(hgkc004.getId());
hgkc004A.setInventTypeDetail(hgyx002A.getInventTypeDetail());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
......
......@@ -13,9 +13,9 @@
<sqlMap resource="com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"/>
<!--成本-->
<!--<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB003.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB004.xml"/>-->
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB004.xml"/>
<!-- 采购 -->
<sqlMap resource="com/baosight/hggp/hg/cg/sql/HGCG001.xml"/>
......
$(function (){
var companyCodeBox = __eiInfo.getBlock("company_code_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", function (e) {
query();
})
$("#SYNC").on("click", function () {
showDetail();
});
IPLATUI.EFGrid= {
"result": {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 100],
},
columns: [
/*{
field: "operator",
title: "操作",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >台账详情</a>';
}
return template;
}
},*/
{
field: "receiptDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}
],
exportGrid: {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "原材料入库成本核算_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "price") {
let items = e.items[0];
for (let i = 0; i < items.length; i++) {
let amount = items[i].price * items[i].quantity;
resultGrid.setCellValue(e.items[i],"amount",amount);
}
}
});
},
afterEdit:function (e) {
/*if (e.field === "groupCode" && e.model["companyCode"].length === 0) {
for (let i = 0; i < groupCodeBox.length; i++) {
if (e.model[e.field] === groupCodeBox[i]["valueField"]) {
e.model["companyCode"] = groupCodeBox[i]["param3Field"]
break;
}
}
}*/
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {
}
}
}
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let price= item.get("price");
let amount= item.get("amount");
if(isBlank(price)){
message("选中的第"+(index+1)+"行\"单价\",不能为空!");
flag = false;
return false;
}
if(isBlank(amount)){
message("选中的第"+(index+1)+"行\"金额\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCB002", "save", true);
btnNode.attr("disabled", false);
}
});
}
};
/**
* 显示详情
*/
function showDetail(id) {
JSColorbox.open({
href: "HGCB002A?methodName=initLoad",
title: "<div style='text-align: center;'>选择公司</div>",
width: "60%",
height: "60%",
callbackName: windowCallback
});
}
function windowCallback(companyCode) {
synchData(companyCode);
// 关闭弹窗
JSColorbox.close();
// 刷新列表
query();
}
/**
* 确认
*/
let synchData = function (companyCode) {
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
EiCommunicator.send("HGCB002", "select", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/25
Time: 10:22
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<EF:EFPage title="原材料入库成本核算">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" enable="true" readonly="true" align="center" required="true"/>
<%--<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>--%>
<EF:EFColumn ename="unit" cname="单位" width="100" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="computeType" cname="是否暂估" width="100" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="amount" cname="金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
$(".row").children().attr("class", "col-md-3");
$("#CONFIRM").on("click", function () {
confirm();
});
});
/**
* 确认
*/
let confirm = function () {
let companyCode = $("#inqu_status-0-companyCode").val();
if (companyCode.length < 1) {
message("请选择公司");
return;
}
parent.JSColorbox.setValueCallback(companyCode);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/25
Time: 17:45
To change this template use File | Settings | File Templates.
--%>
<!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="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions blockId="roleCompany" valueField="companyCode" textField="companyName"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
</EF:EFPage>
$(function (){
var companyCodeBox = __eiInfo.getBlock("company_code_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_code_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
IPLATUI.EFGrid= {
"result": {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 100],
},
columns: [
/*{
field: "operator",
title: "操作",
template: function (item) {
let template = '';
if (item.id) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >台账详情</a>';
}
return template;
}
},*/
{
field: "receiptDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}
],
exportGrid: {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "原材料入库成本核算_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "price") {
let items = e.items[0];
for (let i = 0; i < items.length; i++) {
let amount = items[i].price * items[i].quantity;
resultGrid.setCellValue(e.items[i],"amount",amount);
}
}
});
},
afterEdit:function (e) {
/*if (e.field === "groupCode" && e.model["companyCode"].length === 0) {
for (let i = 0; i < groupCodeBox.length; i++) {
if (e.model[e.field] === groupCodeBox[i]["valueField"]) {
e.model["companyCode"] = groupCodeBox[i]["param3Field"]
break;
}
}
}*/
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {
}
}
}
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function (btnNode) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let price= item.get("price");
let amount= item.get("amount");
if(isBlank(price)){
message("选中的第"+(index+1)+"行\"单价\",不能为空!");
flag = false;
return false;
}
if(isBlank(amount)){
message("选中的第"+(index+1)+"行\"金额\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCB002", "save", true);
btnNode.attr("disabled", false);
}
});
}
};
/**
* 显示详情
*/
function showDetail(id) {
JSColorbox.open({
href: "HGCB002A?methodName=initLoad",
title: "<div style='text-align: center;'>选择公司</div>",
width: "60%",
height: "60%",
callbackName: windowCallback
});
}
function windowCallback(companyCode) {
synchData(companyCode);
// 关闭弹窗
JSColorbox.close();
// 刷新列表
query();
}
/**
* 确认
*/
let synchData = function (companyCode) {
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
EiCommunicator.send("HGCB004", "synchData", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/25
Time: 10:22
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<EF:EFPage title="原材料出库成本核算">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="weight" cname="重量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="computeType" cname="是否暂估" width="80" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="100" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="amount" cname="金额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function (){
$(".row").children().attr("class", "col-md-3");
IPLATUI.EFGrid= {
"result": {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 100],
},
columns: [
],
exportGrid: {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "收发存汇总_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
},
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
/*grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "price") {
let items = e.items[0];
for (let i = 0; i < items.length; i++) {
let amount = items[i].price * items[i].quantity;
resultGrid.setCellValue(e.items[i],"amount",amount);
}
}
});*/
},
afterEdit:function (e) {
/*if (e.field === "groupCode" && e.model["companyCode"].length === 0) {
for (let i = 0; i < groupCodeBox.length; i++) {
if (e.model[e.field] === groupCodeBox[i]["valueField"]) {
e.model["companyCode"] = groupCodeBox[i]["param3Field"]
break;
}
}
}*/
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
//save(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
onRowClick: function (e) {
}
}
}
$("#SYNC").on("click", function () {
showDetail();
});
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 显示详情
*/
function showDetail() {
JSColorbox.open({
href: "HGCB002A?methodName=initLoad",
title: "<div style='text-align: center;'>选择公司</div>",
width: "30%",
height: "45%",
callbackName: windowCallback
});
}
function windowCallback(companyCode) {
synchData(companyCode);
JSColorbox.close();
}
/**
* 确认
*/
let synchData = function (companyCode) {
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
EiCommunicator.send("HGCB004", "synchData", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/25
Time: 10:23
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<EF:EFPage title="收发存汇总">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="物料编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="物料名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="80" enable="true" readonly="false" type="hidden" align="center"/>
<EF:EFColumn ename="initQuantity" cname="期初数量" width="100" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="initAmount" cname="期初金额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="enterQuantity" cname="入库数量" width="100" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="enterAmount" cname="入库金额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="outerQuantity" cname="出库数量" width="100" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="outerAmount" cname="出库重量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="endQuantity" cname="期末数量" width="100" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="endAmount" cname="期末金额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</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