Commit 5fcc8dd6 by liuyang

2024-08-22 生产任务任务状态逻辑修复

parent 5a0118d9
package com.baosight.hpjx.common;
/**
* @author LiuYang
* @version 1.0 2024/8/23
* @description 核销状态
*/
public enum CancelStatusEnum {
/**
* 0:未审核
*/
UNCANCEL(0, "未核销"),
/**
* 1:已审核
*/
CANCEL(1, "已核销"),
;
private Integer code;
private String desc;
CancelStatusEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public static String getDesc(Integer code) {
for (CancelStatusEnum cancelStatusEnum : CancelStatusEnum.values()) {
if (cancelStatusEnum.getCode().equals(code)) {
return cancelStatusEnum.getDesc();
}
}
return null;
}
public static Integer getCode(String desc) {
for (CancelStatusEnum cancelStatusEnum : CancelStatusEnum.values()) {
if (cancelStatusEnum.getDesc().equals(desc)) {
return cancelStatusEnum.getCode();
}
}
return null;
}
}
...@@ -169,7 +169,7 @@ public enum DdynamicEnum { ...@@ -169,7 +169,7 @@ public enum DdynamicEnum {
* 用途:项目档案下拉框 * 用途:项目档案下拉框
* 编写:wwl * 编写:wwl
*/ */
PROJ_RECORD_BLOCK_ID("proj_record_block_id","projCode","projName","HPSC001.queryComboBox"), PROJ_RECORD_BLOCK_ID("proj_record_block_id","projCode","projName","princ2","HPSC001.queryComboBox"),
/** /**
* 模块:部件档案 * 模块:部件档案
...@@ -394,6 +394,20 @@ public enum DdynamicEnum { ...@@ -394,6 +394,20 @@ public enum DdynamicEnum {
DEVICE_CODE_BLOCK_ID("deviceCode_block_id","deviceCode","deviceName","HPSB003.queryDeviceCode"), DEVICE_CODE_BLOCK_ID("deviceCode_block_id","deviceCode","deviceName","HPSB003.queryDeviceCode"),
DEVICE_CODE_BOX_BLOCK_ID("deviceCodeBox_block_id","deviceCode","deviceName", "deviceType", "companyCode", "factoryCode", "groupCode","deviceStatus","HPSB003.queryDeviceCodeBox"), DEVICE_CODE_BOX_BLOCK_ID("deviceCodeBox_block_id","deviceCode","deviceName", "deviceType", "companyCode", "factoryCode", "groupCode","deviceStatus","HPSB003.queryDeviceCodeBox"),
/**
* 模块:生产入库
* 用途:销售开票项目下拉框
* 编写:ly
*/
PROJ_CODE_BOX_BLOCK_ID("projCodeBox_block_id","projCode","projName","factoryCode","HPKC003.queryProjCodeBox"),
/**
* 模块:销售管理
* 用途:客户档案下拉框
* 编写:ly
*/
CUST_CODE_BLOCK_ID("custCode_block_id","custCode","custName","HPSC001.queryCustCodeBox"),
; ;
......
package com.baosight.hpjx.common;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description
*/
public enum ReviewStatusEnum {
/**
* 0:未审核
*/
UNREVIEWED(0, "未审核"),
/**
* 1:已审核
*/
REVIEWED(1, "已审核"),
/**
* 2:未提交
*/
UNSUBMITTED(2, "未提交"),
/**
* 3:已提交
*/
SUBMITTED(3, "已提交"),
;
private Integer code;
private String desc;
ReviewStatusEnum(Integer code, String desc) {
this.code = code;
this.desc = desc;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public static String getDesc(Integer code) {
for (ReviewStatusEnum reviewStatusEnum : ReviewStatusEnum.values()) {
if (reviewStatusEnum.getCode().equals(code)) {
return reviewStatusEnum.getDesc();
}
}
return null;
}
public static Integer getCode(String desc) {
for (ReviewStatusEnum reviewStatusEnum : ReviewStatusEnum.values()) {
if (reviewStatusEnum.getDesc().equals(desc)) {
return reviewStatusEnum.getCode();
}
}
return null;
}
}
...@@ -87,8 +87,14 @@ public class HPConstant { ...@@ -87,8 +87,14 @@ public class HPConstant {
// 整改通知单号 // 整改通知单号
public static final String RECTIFY_ID = "RECTIFY_ID"; public static final String RECTIFY_ID = "RECTIFY_ID";
//收款单 //收款单
public static final String CW_COLLECTION_NO = "CW_COLLECTION_NO"; public static final String CW_COLLECTION_NO = "CW_COLLECTION_NO";
//付款单号
public static final String CW_INCOME_NUMBER = "CW_INCOME_NUMBER";
//开票单号
public static final String HPCW001_BILL_NUMBER = "HPCW001_BILL_NUMBER";
//发票单号
public static final String HPCW002_BILL_NUMBER = "HPCW002_BILL_NUMBER";
} }
/** /**
......
package com.baosight.hpjx.hp.cw.domain;
import com.baosight.hpjx.util.DateUtils;
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:Hpcw001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-16 14:55:29 create
*/
public class HPCW001 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_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_FACTORY_CODE = "factoryCode"; /* 工厂编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂名称*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String FIELD_SETTLEMENT_NUMBER = "settlementNumber"; /* 来源单号*/
public static final String FIELD_BILL_TYBE = "billTybe"; /* 票据类型*/
public static final String FIELD_BILL_NUMBER = "billNumber"; /* 发票号*/
public static final String FIELD_BILL_STATE = "billState"; /* 开票状态*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 开票日期*/
public static final String FIELD_PARTY_A = "partyA"; /* 客户名称*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审批状态*/
public static final String FIELD_THIS_SETTLEMENT_TAX = "thisSettlementTax"; /* 税额*/
public static final String FIELD_THIS_SETTLEMENT_AMOUNT = "thisSettlementAmount"; /* 不含税金额*/
public static final String FIELD_TAX_POINTS = "taxPoints"; /* 税率*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 开票总额*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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_FACTORY_CODE = "FACTORY_CODE"; /* 工厂编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂名称*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编号*/
public static final String COL_SETTLEMENT_NUMBER = "SETTLEMENT_NUMBER"; /* 来源单号*/
public static final String COL_BILL_TYBE = "BILL_TYBE"; /* 票据类型*/
public static final String COL_BILL_NUMBER = "BILL_NUMBER"; /* 发票号*/
public static final String COL_BILL_STATE = "BILL_STATE"; /* 开票状态*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 开票日期*/
public static final String COL_PARTY_A = "PARTY_A"; /* 客户名称*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审批状态*/
public static final String COL_THIS_SETTLEMENT_TAX = "THIS_SETTLEMENT_TAX"; /* 税额*/
public static final String COL_THIS_SETTLEMENT_AMOUNT = "THIS_SETTLEMENT_AMOUNT"; /* 不含税金额*/
public static final String COL_TAX_POINTS = "TAX_POINTS"; /* 税率*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 开票总额*/
public static final String QUERY = "HPCW001.query";
public static final String COUNT = "HPCW001.count";
public static final String INSERT = "HPCW001.insert";
public static final String UPDATE = "HPCW001.update";
public static final String DELETE = "HPCW001.delete";
public static final String UPDATE_AMOUNT = "HPCW001.updateDeductionAmount";
public static final String SUBMIT = "HPCW001.submit";
public static final String BILLING = "HPCW001.billing";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String factoryCode = " "; /* 工厂编码*/
private String factoryName = " "; /* 工厂名称*/
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
private String settlementNumber = " "; /* 来源单号*/
private Integer billTybe = 0; /* 票据类型*/
private String billNumber = " "; /* 发票号*/
private Integer billState = 0; /* 开票状态*/
private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 客户名称*/
private Integer reviewStatus = 0; /* 审批状态*/
private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/
private Integer taxPoints = new Integer(0); /* 税率*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 开票总额*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_FACTORY_CODE);
eiColumn.setDescName("工厂编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BILL_TYBE);
eiColumn.setDescName("票据类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BILL_NUMBER);
eiColumn.setDescName("发票号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BILL_STATE);
eiColumn.setDescName("开票状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE);
eiColumn.setDescName("开票日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX);
eiColumn.setDescName("税额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT);
eiColumn.setDescName("不含税金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("开票总额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW001() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the 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 factoryCode - 工厂编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编码.
*
* @param factoryCode - 工厂编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the projCode - 项目编号.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编号.
*
* @param projCode - 项目编号
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the settlementNumber - 来源单号.
* @return the settlementNumber
*/
public String getSettlementNumber() {
return this.settlementNumber;
}
/**
* set the settlementNumber - 来源单号.
*
* @param settlementNumber - 来源单号
*/
public void setSettlementNumber(String settlementNumber) {
this.settlementNumber = settlementNumber;
}
/**
* get the billTybe - 票据类型.
* @return the billTybe
*/
public Integer getBillTybe() {
return this.billTybe;
}
/**
* set the billTybe - 票据类型.
*
* @param billTybe - 票据类型
*/
public void setBillTybe(Integer billTybe) {
this.billTybe = billTybe;
}
/**
* get the billNumber - 发票号.
* @return the billNumber
*/
public String getBillNumber() {
return this.billNumber;
}
/**
* set the billNumber - 发票号.
*
* @param billNumber - 发票号
*/
public void setBillNumber(String billNumber) {
this.billNumber = billNumber;
}
/**
* get the billState - 开票状态.
* @return the billState
*/
public Integer getBillState() {
return this.billState;
}
/**
* set the billState - 开票状态.
*
* @param billState - 开票状态
*/
public void setBillState(Integer billState) {
this.billState = billState;
}
/**
* get the signingDate - 开票日期.
* @return the signingDate
*/
public String getSigningDate() {
return this.signingDate;
}
/**
* set the signingDate - 开票日期.
*
* @param signingDate - 开票日期
*/
public void setSigningDate(String signingDate) {
this.signingDate = signingDate;
}
/**
* get the partyA - 客户名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 客户名称.
*
* @param partyA - 客户名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
return this.reviewStatus;
}
/**
* set the reviewStatus - 审批状态.
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
* get the thisSettlementTax - 税额.
* @return the thisSettlementTax
*/
public String getThisSettlementTax() {
return this.thisSettlementTax;
}
/**
* set the thisSettlementTax - 税额.
*
* @param thisSettlementTax - 税额
*/
public void setThisSettlementTax(String thisSettlementTax) {
this.thisSettlementTax = thisSettlementTax;
}
/**
* get the thisSettlementAmount - 不含税金额.
* @return the thisSettlementAmount
*/
public String getThisSettlementAmount() {
return this.thisSettlementAmount;
}
/**
* set the thisSettlementAmount - 不含税金额.
*
* @param thisSettlementAmount - 不含税金额
*/
public void setThisSettlementAmount(String thisSettlementAmount) {
this.thisSettlementAmount = thisSettlementAmount;
}
/**
* get the taxPoints - 税率.
* @return the taxPoints
*/
public Integer getTaxPoints() {
return this.taxPoints;
}
/**
* set the taxPoints - 税率.
*
* @param taxPoints - 税率
*/
public void setTaxPoints(Integer taxPoints) {
this.taxPoints = taxPoints;
}
/**
* get the totalContractPriceIncluding - 开票总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 开票总额.
*
* @param totalContractPriceIncluding - 开票总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
public BigDecimal getRemainingAmount() {
return remainingAmount;
}
public void setRemainingAmount(BigDecimal remainingAmount) {
this.remainingAmount = remainingAmount;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setBillTybe(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_TYBE)), billTybe));
setBillNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_NUMBER)), billNumber));
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_SIGNING_DATE))), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
map.put(FIELD_BILL_TYBE, StringUtils.toString(billTybe, eiMetadata.getMeta(FIELD_BILL_TYBE)));
map.put(FIELD_BILL_NUMBER, StringUtils.toString(billNumber, eiMetadata.getMeta(FIELD_BILL_NUMBER)));
map.put(FIELD_BILL_STATE, StringUtils.toString(billState, eiMetadata.getMeta(FIELD_BILL_STATE)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
map.put(FIELD_THIS_SETTLEMENT_TAX, StringUtils.toString(thisSettlementTax, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_TAX)));
map.put(FIELD_THIS_SETTLEMENT_AMOUNT, StringUtils.toString(thisSettlementAmount, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_AMOUNT)));
map.put(FIELD_TAX_POINTS, StringUtils.toString(taxPoints, eiMetadata.getMeta(FIELD_TAX_POINTS)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
return map;
}
}
package com.baosight.hpjx.hp.cw.domain;
import com.baosight.hpjx.util.DateUtils;
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:Hpcw002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-16 14:55:29 create
*/
public class HPCW002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_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_FACTORY_CODE = "factoryCode"; /* 工厂编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_SETTLEMENT_NUMBER = "settlementNumber"; /* 来源单号*/
public static final String FIELD_BILL_TYBE = "billTybe"; /* 票据类型*/
public static final String FIELD_BILL_NUMBER = "billNumber"; /* 发票号*/
public static final String FIELD_BILL_STATE = "billState"; /* 开票状态*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 开票日期*/
public static final String FIELD_PARTY_A = "partyA"; /* 供应商名称*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审批状态*/
public static final String FIELD_TAX_POINTS = "taxPoints"; /* 税率*/
public static final String FIELD_THIS_SETTLEMENT_TAX = "thisSettlementTax"; /* 税额*/
public static final String FIELD_THIS_SETTLEMENT_AMOUNT = "thisSettlementAmount"; /* 不含税金额*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 发票总额*/
public static final String FIELD_RECEIVE_DATE = "receiveDate"; /* 收票日期*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_SETTLEMENT_NUMBER = "SETTLEMENT_NUMBER"; /* 来源单号*/
public static final String COL_BILL_TYBE = "BILL_TYBE"; /* 票据类型*/
public static final String COL_BILL_NUMBER = "BILL_NUMBER"; /* 发票号*/
public static final String COL_BILL_STATE = "BILL_STATE"; /* 开票状态*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 开票日期*/
public static final String COL_PARTY_A = "PARTY_A"; /* 供应商名称*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审批状态*/
public static final String COL_TAX_POINTS = "TAX_POINTS"; /* 税率*/
public static final String COL_THIS_SETTLEMENT_TAX = "THIS_SETTLEMENT_TAX"; /* 税额*/
public static final String COL_THIS_SETTLEMENT_AMOUNT = "THIS_SETTLEMENT_AMOUNT"; /* 不含税金额*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 发票总额*/
public static final String COL_RECEIVE_DATE = "RECEIVE_DATE"; /* 收票日期*/
public static final String COL_DEPOSIT_QTY = "DEPOSIT_QTY"; /* 入库数量*/
public static final String COL_RECEIVE_WEIGHT = "RECEIVE_WEIGHT"; /* 收货重量*/
public static final String COL_PRICE = "PRICE"; /* 单价*/
public static final String QUERY = "HPCW002.query";
public static final String COUNT = "HPCW002.count";
public static final String INSERT = "HPCW002.insert";
public static final String UPDATE = "HPCW002.update";
public static final String DELETE = "HPCW002.delete";
public static final String SUBMIT = "HPCW002.submit";
public static final String BILLING = "HPCW001.billing";
public static final String UPDATE_AMOUNT = "HPCW002.updateDeductionAmount";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String factoryCode = " "; /* 工厂编码*/
private String factoryName = " "; /* 工厂名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String settlementNumber = " "; /* 来源单号*/
private Integer billTybe = new Integer(0); /* 票据类型*/
private String billNumber = " "; /* 发票号*/
private Integer billState = new Integer(0); /* 开票状态*/
private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 供应商名称*/
private Integer reviewStatus = 0; /* 审批状态*/
private Integer taxPoints = new Integer(0); /* 税率*/
private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 发票总额*/
private String receiveDate = " "; /* 收票日期*/
private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/
private BigDecimal receiveWeight = new BigDecimal("0"); /* 收货重量*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_FACTORY_CODE);
eiColumn.setDescName("工厂编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BILL_TYBE);
eiColumn.setDescName("票据类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BILL_NUMBER);
eiColumn.setDescName("发票号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BILL_STATE);
eiColumn.setDescName("开票状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE);
eiColumn.setDescName("开票日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX);
eiColumn.setDescName("税额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT);
eiColumn.setDescName("不含税金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("发票总额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_DATE);
eiColumn.setDescName("收票日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW002() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the 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 factoryCode - 工厂编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编码.
*
* @param factoryCode - 工厂编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the settlementNumber - 来源单号.
* @return the settlementNumber
*/
public String getSettlementNumber() {
return this.settlementNumber;
}
/**
* set the settlementNumber - 来源单号.
*
* @param settlementNumber - 来源单号
*/
public void setSettlementNumber(String settlementNumber) {
this.settlementNumber = settlementNumber;
}
/**
* get the billTybe - 票据类型.
* @return the billTybe
*/
public Integer getBillTybe() {
return this.billTybe;
}
/**
* set the billTybe - 票据类型.
*
* @param billTybe - 票据类型
*/
public void setBillTybe(Integer billTybe) {
this.billTybe = billTybe;
}
/**
* get the billNumber - 发票号.
* @return the billNumber
*/
public String getBillNumber() {
return this.billNumber;
}
/**
* set the billNumber - 发票号.
*
* @param billNumber - 发票号
*/
public void setBillNumber(String billNumber) {
this.billNumber = billNumber;
}
/**
* get the billState - 开票状态.
* @return the billState
*/
public Integer getBillState() {
return this.billState;
}
/**
* set the billState - 开票状态.
*
* @param billState - 开票状态
*/
public void setBillState(Integer billState) {
this.billState = billState;
}
/**
* get the signingDate - 开票日期.
* @return the signingDate
*/
public String getSigningDate() {
return this.signingDate;
}
/**
* set the signingDate - 开票日期.
*
* @param signingDate - 开票日期
*/
public void setSigningDate(String signingDate) {
this.signingDate = signingDate;
}
/**
* get the partyA - 供应商名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 供应商名称.
*
* @param partyA - 供应商名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
return this.reviewStatus;
}
/**
* set the reviewStatus - 审批状态.
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
* get the taxPoints - 税率.
* @return the taxPoints
*/
public Integer getTaxPoints() {
return this.taxPoints;
}
/**
* set the taxPoints - 税率.
*
* @param taxPoints - 税率
*/
public void setTaxPoints(Integer taxPoints) {
this.taxPoints = taxPoints;
}
/**
* get the thisSettlementTax - 税额.
* @return the thisSettlementTax
*/
public String getThisSettlementTax() {
return this.thisSettlementTax;
}
/**
* set the thisSettlementTax - 税额.
*
* @param thisSettlementTax - 税额
*/
public void setThisSettlementTax(String thisSettlementTax) {
this.thisSettlementTax = thisSettlementTax;
}
/**
* get the thisSettlementAmount - 不含税金额.
* @return the thisSettlementAmount
*/
public String getThisSettlementAmount() {
return this.thisSettlementAmount;
}
/**
* set the thisSettlementAmount - 不含税金额.
*
* @param thisSettlementAmount - 不含税金额
*/
public void setThisSettlementAmount(String thisSettlementAmount) {
this.thisSettlementAmount = thisSettlementAmount;
}
/**
* get the totalContractPriceIncluding - 发票总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 发票总额.
*
* @param totalContractPriceIncluding - 发票总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* get the receiveDate - 收票日期.
* @return the receiveDate
*/
public String getReceiveDate() {
return this.receiveDate;
}
/**
* set the receiveDate - 收票日期.
*
* @param receiveDate - 收票日期
*/
public void setReceiveDate(String receiveDate) {
this.receiveDate = receiveDate;
}
/**
* get the depositQty - 入库数量.
* @return the depositQty
*/
public BigDecimal getDepositQty() {
return this.depositQty;
}
/**
* set the depositQty - 入库数量.
*
* @param depositQty - 入库数量
*/
public void setDepositQty(BigDecimal depositQty) {
this.depositQty = depositQty;
}
/**
* get the receiveWeight - 收货重量.
* @return the receiveWeight
*/
public BigDecimal getReceiveWeight() {
return this.receiveWeight;
}
/**
* set the receiveWeight - 收货重量.
*
* @param receiveWeight - 收货重量
*/
public void setReceiveWeight(BigDecimal receiveWeight) {
this.receiveWeight = receiveWeight;
}
/**
* get the price - 单价.
* @return the price
*/
public BigDecimal getPrice() {
return this.price;
}
/**
* set the price - 单价.
*
* @param price - 单价
*/
public void setPrice(BigDecimal price) {
this.price = price;
}
public BigDecimal getRemainingAmount() {
return remainingAmount;
}
public void setRemainingAmount(BigDecimal remainingAmount) {
this.remainingAmount = remainingAmount;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setBillTybe(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_TYBE)), billTybe));
setBillNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_NUMBER)), billNumber));
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_SIGNING_DATE))), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setReceiveDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_DATE)), receiveDate));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_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_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
map.put(FIELD_BILL_TYBE, StringUtils.toString(billTybe, eiMetadata.getMeta(FIELD_BILL_TYBE)));
map.put(FIELD_BILL_NUMBER, StringUtils.toString(billNumber, eiMetadata.getMeta(FIELD_BILL_NUMBER)));
map.put(FIELD_BILL_STATE, StringUtils.toString(billState, eiMetadata.getMeta(FIELD_BILL_STATE)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
map.put(FIELD_TAX_POINTS, StringUtils.toString(taxPoints, eiMetadata.getMeta(FIELD_TAX_POINTS)));
map.put(FIELD_THIS_SETTLEMENT_TAX, StringUtils.toString(thisSettlementTax, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_TAX)));
map.put(FIELD_THIS_SETTLEMENT_AMOUNT, StringUtils.toString(thisSettlementAmount, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_AMOUNT)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
map.put(FIELD_RECEIVE_DATE, StringUtils.toString(receiveDate, eiMetadata.getMeta(FIELD_RECEIVE_DATE)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
return map;
}
}
package com.baosight.hpjx.hp.cw.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:Hpcw003.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-16 14:55:29 create
*/
public class HPCW003 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_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_FACTORY_CODE = "factoryCode"; /* 工厂编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂名称*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/
public static final String FIELD_INCOME_NUMBER = "incomeNumber"; /* 收款单号*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 收款日期*/
public static final String FIELD_PARTY_A = "partyA"; /* 客户名称*/
public static final String FIELD_CANCEL_STATUS = "cancelStatus"; /* 核销状态*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审批状态*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 收款总额*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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_FACTORY_CODE = "FACTORY_CODE"; /* 工厂编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂名称*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编号*/
public static final String COL_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/
public static final String COL_INCOME_NUMBER = "INCOME_NUMBER"; /* 收款单号*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 收款日期*/
public static final String COL_PARTY_A = "PARTY_A"; /* 客户名称*/
public static final String COL_CANCEL_STATUS = "CANCEL_STATUS"; /* 核销状态*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审批状态*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 收款总额*/
public static final String QUERY = "HPCW003.query";
public static final String COUNT = "HPCW003.count";
public static final String INSERT = "HPCW003.insert";
public static final String UPDATE = "HPCW003.update";
public static final String DELETE = "HPCW003.delete";
public static final String SUBMIT = "HPCW003.submit";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String factoryCode = " "; /* 工厂编码*/
private String factoryName = " "; /* 工厂名称*/
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
private String contractNumber = " "; /* 来源单号*/
private String incomeNumber = " "; /* 收款单号*/
private String signingDate = " "; /* 收款日期*/
private String partyA = " "; /* 客户名称*/
private Integer cancelStatus = 0; /* 核销状态*/
private Integer reviewStatus = 0; /* 审批状态*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 收款总额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_FACTORY_CODE);
eiColumn.setDescName("工厂编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INCOME_NUMBER);
eiColumn.setDescName("收款单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE);
eiColumn.setDescName("收款日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CANCEL_STATUS);
eiColumn.setDescName("核销状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("收款总额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW003() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the 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 factoryCode - 工厂编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编码.
*
* @param factoryCode - 工厂编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the projCode - 项目编号.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编号.
*
* @param projCode - 项目编号
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the contractNumber - 来源单号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 来源单号.
*
* @param contractNumber - 来源单号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the incomeNumber - 收款单号.
* @return the incomeNumber
*/
public String getIncomeNumber() {
return this.incomeNumber;
}
/**
* set the incomeNumber - 收款单号.
*
* @param incomeNumber - 收款单号
*/
public void setIncomeNumber(String incomeNumber) {
this.incomeNumber = incomeNumber;
}
/**
* get the signingDate - 收款日期.
* @return the signingDate
*/
public String getSigningDate() {
return this.signingDate;
}
/**
* set the signingDate - 收款日期.
*
* @param signingDate - 收款日期
*/
public void setSigningDate(String signingDate) {
this.signingDate = signingDate;
}
/**
* get the partyA - 客户名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 客户名称.
*
* @param partyA - 客户名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the cancelStatus - 核销状态.
* @return the cancelStatus
*/
public Integer getCancelStatus() {
return this.cancelStatus;
}
/**
* set the cancelStatus - 核销状态.
*
* @param cancelStatus - 核销状态
*/
public void setCancelStatus(Integer cancelStatus) {
this.cancelStatus = cancelStatus;
}
/**
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
return this.reviewStatus;
}
/**
* set the reviewStatus - 审批状态.
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
* get the totalContractPriceIncluding - 收款总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 收款总额.
*
* @param totalContractPriceIncluding - 收款总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setIncomeNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INCOME_NUMBER)), incomeNumber));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setCancelStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CANCEL_STATUS)), cancelStatus));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_INCOME_NUMBER, StringUtils.toString(incomeNumber, eiMetadata.getMeta(FIELD_INCOME_NUMBER)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_CANCEL_STATUS, StringUtils.toString(cancelStatus, eiMetadata.getMeta(FIELD_CANCEL_STATUS)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
return map;
}
}
package com.baosight.hpjx.hp.cw.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:Hpcw003a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-16 14:55:29 create
*/
public class HPCW003A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_PARENT_ID = "parentId"; /* 上级ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
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_FACTORY_CODE = "factoryCode"; /* 工厂编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂名称*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/
public static final String FIELD_PARTY_A = "partyA"; /* 客户名称*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 收款总额*/
public static final String COL_ID = "ID";
public static final String COL_PARENT_ID = "PARENT_ID"; /* 上级ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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_FACTORY_CODE = "FACTORY_CODE"; /* 工厂编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂名称*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编号*/
public static final String COL_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/
public static final String COL_PARTY_A = "PARTY_A"; /* 客户名称*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 收款总额*/
public static final String QUERY = "HPCW003A.query";
public static final String COUNT = "HPCW003A.count";
public static final String INSERT = "HPCW003A.insert";
public static final String UPDATE = "HPCW003A.update";
public static final String DELETE = "HPCW003A.delete";
private Long id = new Long(0);
private Long parentId = new Long(0); /* 上级ID*/
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String factoryCode = " "; /* 工厂编码*/
private String factoryName = " "; /* 工厂名称*/
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
private String contractNumber = " "; /* 来源单号*/
private String partyA = " "; /* 客户名称*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 收款总额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("上级ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_FACTORY_CODE);
eiColumn.setDescName("工厂编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("收款总额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW003A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the parentId - 上级ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 上级ID.
*
* @param parentId - 上级ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the 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 factoryCode - 工厂编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编码.
*
* @param factoryCode - 工厂编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the projCode - 项目编号.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编号.
*
* @param projCode - 项目编号
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the contractNumber - 来源单号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 来源单号.
*
* @param contractNumber - 来源单号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the partyA - 客户名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 客户名称.
*
* @param partyA - 客户名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the totalContractPriceIncluding - 收款总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 收款总额.
*
* @param totalContractPriceIncluding - 收款总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* 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));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
}
/**
* 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_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
return map;
}
}
package com.baosight.hpjx.hp.cw.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:Hpcw004.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-16 14:55:29 create
*/
public class HPCW004 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_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_FACTORY_CODE = "factoryCode"; /* 工厂编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/
public static final String FIELD_INCOME_NUMBER = "incomeNumber"; /* 单号*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 付款日期*/
public static final String FIELD_PARTY_A = "partyA"; /* 供应商名称*/
public static final String FIELD_CANCEL_STATUS = "cancelStatus"; /* 核销状态*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审批状态*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 付款总额*/
public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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_FACTORY_CODE = "FACTORY_CODE"; /* 工厂编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂名称*/
public static final String COL_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/
public static final String COL_INCOME_NUMBER = "INCOME_NUMBER"; /* 单号*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 付款日期*/
public static final String COL_PARTY_A = "PARTY_A"; /* 供应商名称*/
public static final String COL_CANCEL_STATUS = "CANCEL_STATUS"; /* 核销状态*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审批状态*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 付款总额*/
public static final String QUERY = "HPCW004.query";
public static final String COUNT = "HPCW004.count";
public static final String INSERT = "HPCW004.insert";
public static final String UPDATE = "HPCW004.update";
public static final String DELETE = "HPCW004.delete";
public static final String SUBMIT = "HPCW004.submit";
private Long id = new Long(0);
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String factoryCode = " "; /* 工厂编码*/
private String factoryName = " "; /* 工厂名称*/
private String contractNumber = " "; /* 来源单号*/
private String incomeNumber = " "; /* 单号*/
private String signingDate = " "; /* 付款日期*/
private String partyA = " "; /* 供应商名称*/
private Integer cancelStatus = 0; /* 核销状态*/
private Integer reviewStatus = 0; /* 审批状态*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 付款总额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_FACTORY_CODE);
eiColumn.setDescName("工厂编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INCOME_NUMBER);
eiColumn.setDescName("单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE);
eiColumn.setDescName("付款日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CANCEL_STATUS);
eiColumn.setDescName("核销状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("付款总额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW004() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the 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 factoryCode - 工厂编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编码.
*
* @param factoryCode - 工厂编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the contractNumber - 来源单号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 来源单号.
*
* @param contractNumber - 来源单号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the incomeNumber - 单号.
* @return the incomeNumber
*/
public String getIncomeNumber() {
return this.incomeNumber;
}
/**
* set the incomeNumber - 单号.
*
* @param incomeNumber - 单号
*/
public void setIncomeNumber(String incomeNumber) {
this.incomeNumber = incomeNumber;
}
/**
* get the signingDate - 付款日期.
* @return the signingDate
*/
public String getSigningDate() {
return this.signingDate;
}
/**
* set the signingDate - 付款日期.
*
* @param signingDate - 付款日期
*/
public void setSigningDate(String signingDate) {
this.signingDate = signingDate;
}
/**
* get the partyA - 供应商名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 供应商名称.
*
* @param partyA - 供应商名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the cancelStatus - 核销状态.
* @return the cancelStatus
*/
public Integer getCancelStatus() {
return this.cancelStatus;
}
/**
* set the cancelStatus - 核销状态.
*
* @param cancelStatus - 核销状态
*/
public void setCancelStatus(Integer cancelStatus) {
this.cancelStatus = cancelStatus;
}
/**
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
return this.reviewStatus;
}
/**
* set the reviewStatus - 审批状态.
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
* get the totalContractPriceIncluding - 付款总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 付款总额.
*
* @param totalContractPriceIncluding - 付款总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setIncomeNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INCOME_NUMBER)), incomeNumber));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setCancelStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CANCEL_STATUS)), cancelStatus));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_INCOME_NUMBER, StringUtils.toString(incomeNumber, eiMetadata.getMeta(FIELD_INCOME_NUMBER)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_CANCEL_STATUS, StringUtils.toString(cancelStatus, eiMetadata.getMeta(FIELD_CANCEL_STATUS)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
return map;
}
}
package com.baosight.hpjx.hp.cw.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:Hpcw004a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-16 14:55:29 create
*/
public class HPCW004A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_PARENT_ID = "parentId"; /* 主表ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
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_FACTORY_CODE = "factoryCode"; /* 工厂编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 工厂名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/
public static final String FIELD_PARTY_A = "partyA"; /* 供应商名称*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 收款总额*/
public static final String COL_ID = "ID";
public static final String COL_PARENT_ID = "PARENT_ID"; /* 主表ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_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_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/
public static final String COL_PARTY_A = "PARTY_A"; /* 供应商名称*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 收款总额*/
public static final String QUERY = "HPCW004A.query";
public static final String COUNT = "HPCW004A.count";
public static final String INSERT = "HPCW004A.insert";
public static final String UPDATE = "HPCW004A.update";
public static final String DELETE = "HPCW004A.delete";
private Long id = new Long(0);
private Long parentId = new Long(0); /* 主表ID*/
private String companyCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String factoryCode = " "; /* 工厂编码*/
private String factoryName = " "; /* 工厂名称*/
private String contractNumber = " "; /* 来源单号*/
private String partyA = " "; /* 供应商名称*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 收款总额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("主表ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_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_FACTORY_CODE);
eiColumn.setDescName("工厂编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("工厂名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("收款总额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW004A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the parentId - 主表ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 主表ID.
*
* @param parentId - 主表ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the 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 factoryCode - 工厂编码.
* @return the factoryCode
*/
public String getFactoryCode() {
return this.factoryCode;
}
/**
* set the factoryCode - 工厂编码.
*
* @param factoryCode - 工厂编码
*/
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/**
* get the factoryName - 工厂名称.
* @return the factoryName
*/
public String getFactoryName() {
return this.factoryName;
}
/**
* set the factoryName - 工厂名称.
*
* @param factoryName - 工厂名称
*/
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the contractNumber - 来源单号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 来源单号.
*
* @param contractNumber - 来源单号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the partyA - 供应商名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 供应商名称.
*
* @param partyA - 供应商名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the totalContractPriceIncluding - 收款总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 收款总额.
*
* @param totalContractPriceIncluding - 收款总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* 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));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
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));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
}
/**
* 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_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_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_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
return map;
}
}
package com.baosight.hpjx.hp.cw.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/19
* @description 附件清单
*/
public class HPCW099 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码*/
public static final String FIELD_FACTORY_CODE = "factoryCode"; /* 公司编码*/
public static final String FIELD_FACTORY_NAME = "factoryName"; /* 公司名称*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
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_DOC_NAME = "docName"; /* 文件ID*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 公司编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 公司名称*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件ID*/
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_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String QUERY = "HPCW099.query";
public static final String COUNT = "HPCW099.count";
public static final String INSERT = "HPCW099.insert";
public static final String UPDATE = "HPCW099.update";
public static final String DELETE = "HPCW099.delete";
private Long id = new Long(0); /* 主键ID*/
private String companyCode = " "; /* 企业编码*/
private String factoryCode = " "; /* 公司编码*/
private String factoryName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编码 预留*/
private Long matId = new Long(0); /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件ID*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FACTORY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPCW099() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the companyCode - 企业编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码.
*
* @param companyCode - 企业编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryName() {
return factoryName;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
/**
* get the 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 matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the 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 bizType - 业务类型.
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_CODE)), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_FACTORY_CODE, StringUtils.toString(factoryCode, eiMetadata.getMeta(FIELD_FACTORY_CODE)));
map.put(FIELD_FACTORY_NAME, StringUtils.toString(factoryName, eiMetadata.getMeta(FIELD_FACTORY_NAME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
return map;
}
public String getDocName() {
return docName;
}
public void setDocName(String docName) {
this.docName = docName;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.cw.domain.HPCW001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description 销售开票
*/
public class ServiceHPCW001 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUST_CODE_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_CODE_BOX_BLOCK_ID,
DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCW001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCW001.QUERY, new HPCW001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPCW001 hpcw001 = new HPCW001();
hpcw001.fromMap(resultRow);
if (hpcw001.getReviewStatus().equals(ReviewStatusEnum.REVIEWED.getCode())){
throw new PlatException("该数据已审核,不能保存!");
}
hpcw001.setRemainingAmount(hpcw001.getTotalContractPriceIncluding());
if (hpcw001.getId() == null || hpcw001.getId() == 0) {
this.add(hpcw001);
} else {
this.modify(hpcw001);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hpcw001
* @return
*/
public void add(HPCW001 hpcw001) {
hpcw001.setSettlementNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPCW001_BILL_NUMBER));
DaoUtils.insert(HPCW001.INSERT, hpcw001);
}
/**
* 修改操作
*
* @param hpcw001
* @return
*/
public void modify(HPCW001 hpcw001) {
DaoUtils.update(HPCW001.UPDATE, hpcw001);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票",operType = "删除",operDesc = "删除")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPCW001 hpcw001 = new HPCW001();
hpcw001.fromMap(resultRows.get(i));
if (hpcw001.getReviewStatus().equals(ReviewStatusEnum.REVIEWED.getCode())) {
throw new PlatException("该数据已审核,不能删除!");
}
DaoUtils.update(HPCW001.DELETE, hpcw001);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 审核操作
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票",operType = "修改",operDesc = "修改审核状态")
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW001 hpcw001 = new HPCW001();
hpcw001.fromMap(resultRow);
hpcw001.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode()); //0未审核 1已审核
DaoUtils.update(HPCW001.SUBMIT, hpcw001);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售开票",operType = "修改",operDesc = "修改开票状态")
public EiInfo billing(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW001 hpcw001 = new HPCW001();
hpcw001.fromMap(resultRow);
hpcw001.setBillState(2); //1未开票2已开票
DaoUtils.update(HPCW001.BILLING, hpcw001);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.cw.domain.HPCW002;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description 采购开票
*/
public class ServiceHPCW002 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "采购收票",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_CODE_BOX_BLOCK_ID,
DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购收票",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCW002.QUERY, new HPCW002());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购收票",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPCW002 hpcw002 = new HPCW002();
hpcw002.fromMap(resultRow);
if (hpcw002.getReviewStatus().equals(ReviewStatusEnum.REVIEWED.getCode())){
throw new PlatException("该数据已审核,不能保存!");
}
hpcw002.setRemainingAmount(hpcw002.getTotalContractPriceIncluding());
if (hpcw002.getId() == null || hpcw002.getId() == 0) {
this.add(hpcw002);
} else {
this.modify(hpcw002);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hpcw002
* @return
*/
public void add(HPCW002 hpcw002) {
hpcw002.setSettlementNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPCW002_BILL_NUMBER));
DaoUtils.insert(HPCW002.INSERT, hpcw002);
}
/**
* 修改操作
*
* @param hpcw002
* @return
*/
public void modify(HPCW002 hpcw002) {
DaoUtils.update(HPCW002.UPDATE, hpcw002);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购收票",operType = "删除",operDesc = "删除")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW002 hpcw002 = new HPCW002();
hpcw002.fromMap(resultRow);
if (hpcw002.getReviewStatus().equals(ReviewStatusEnum.REVIEWED.getCode())) {
throw new PlatException("该数据已审核,不能删除!");
}
DaoUtils.update(HPCW002.DELETE, hpcw002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 提交操作
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "采购收票",operType = "删除",operDesc = "修改审核状态")
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW002 hpcw002 = new HPCW002();
hpcw002.fromMap(resultRow);
/*if (hpcw002.getReviewStatus() == 0) {
throw new PlatException("数据未审批,请先审批!");
}*/
hpcw002.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode());
DaoUtils.update(HPCW002.SUBMIT, hpcw002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "审核失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.CancelStatusEnum;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.cw.domain.HPCW001;
import com.baosight.hpjx.hp.cw.domain.HPCW003;
import com.baosight.hpjx.hp.cw.domain.HPCW003A;
import com.baosight.hpjx.hp.cw.tools.HPCWTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description 收款单
*/
public class ServiceHPCW003 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_CODE_BOX_BLOCK_ID,
DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCW003.QUERY, new HPCW003());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPCW003 hpcw003 = new HPCW003();
hpcw003.fromMap(resultRows.get(i));
hpcw003.setCancelStatus(CancelStatusEnum.UNCANCEL.getCode());
hpcw003.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
hpcw003.setSigningDate(DateUtils.formatShort(hpcw003.getSigningDate()));
if (hpcw003.getId() == null || hpcw003.getId() == 0) {
hpcw003.setIncomeNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CW_COLLECTION_NO));
this.add(hpcw003);
} else {
this.modify(hpcw003);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hpcw003
* @return
*/
public void add(HPCW003 hpcw003) {
DaoUtils.insert(HPCW003.INSERT, hpcw003);
}
/**
* 修改操作
*
* @param hpcw003
* @return
*/
public void modify(HPCW003 hpcw003) {
DaoUtils.update(HPCW003.UPDATE, hpcw003);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "删除",operDesc = "删除")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW003 hpcw003 = new HPCW003();
hpcw003.fromMap(resultRow);
List<HPCW003A> hpcw003AList = HPCWTools.HpCw003a.getMainId(hpcw003.getId());
if (CollectionUtils.isNotEmpty(hpcw003AList)) {
for (HPCW003A hpcw003A : hpcw003AList) {
HPCWTools.Hpcw001.cutAmount(hpcw003A.getContractNumber(),
hpcw003A.getTotalContractPriceIncluding().multiply(new BigDecimal(-1)));
DaoUtils.update(HPCW003A.DELETE, hpcw003A);
}
}
DaoUtils.update(HPCW003.DELETE, hpcw003);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "收款单",operType = "插入",operDesc = "生成收款单")
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) {
mainId = queryRows.get(0).get("mainId").toString();
}
//获取相应的数据
List<HPCW003A> hpcw003AList = HPCWTools.HpCw003a.mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hpcw003AList)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HPCW003 hpcw003 = new HPCW003();
hpcw003.setIncomeNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CW_COLLECTION_NO));
hpcw003.setSigningDate(DateUtils.shortDate());
/*Map<String, BigDecimal> rowMap = hpcw003AList.stream().collect(
Collectors.toMap(HPCW003A::getContractNumber, HPCW003A::getTotalContractPriceIncluding)
);*/
StringBuffer contractNumber = new StringBuffer();
hpcw003AList.forEach(hpcw003A -> {
contractNumber.append(hpcw003A.getContractNumber()).append(",");
});
/*for (HPCW003A hpcw003A : hpcw003AList) {
contractNumber.append(hpcw003A.getContractNumber()).append(",");
}
for (Map m : resultRows) {
String c = m.get(HPCW001.FIELD_BILL_NUMBER).toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
//totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}*/
BigDecimal totalContractPriceIncluding = hpcw003AList.stream().map(HPCW003A::getTotalContractPriceIncluding).reduce(BigDecimal.ZERO,BigDecimal::add);
hpcw003.setTotalContractPriceIncluding(totalContractPriceIncluding);
hpcw003.setFactoryCode(hpcw003AList.get(0).getFactoryCode());
hpcw003.setPartyA(hpcw003AList.get(0).getPartyA());
hpcw003.setProjCode(hpcw003AList.get(0).getProjCode());
hpcw003.setProjName(hpcw003AList.get(0).getProjName());
hpcw003.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.add(hpcw003);
//生成明细表
for (HPCW003A hpcw003A : hpcw003AList) {
hpcw003A.setParentId(hpcw003.getId());
// 反写金额
HPCWTools.Hpcw001.cutAmount(hpcw003A.getContractNumber(),hpcw003A.getTotalContractPriceIncluding());
DaoUtils.insert(HPCW003A.INSERT, hpcw003A);
}
}else {
HPCW003 hpcw003 = HPCWTools.Hpcw003.getId(mainId);
//Map<String, BigDecimal> rowMap = hpcw003AList.stream().collect(Collectors.toMap(HPCW003A::getContractNumber, HPCW003A::getTotalContractPriceIncluding));
/*for (Map m : resultRows) {
String c = m.get(HPCW001.FIELD_BILL_NUMBER).toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
}*/
// 生成明细表
for (HPCW003A hpcw003A : hpcw003AList) {
hpcw003A.setParentId(hpcw003.getId());
// 反写金额
HPCWTools.Hpcw001.cutAmount(hpcw003A.getContractNumber(), hpcw003A.getTotalContractPriceIncluding());
DaoUtils.insert(HPCW003A.INSERT, hpcw003A);
}
List<HPCW003A> hpcw003s = HPCWTools.HpCw003a.getMainId(hpcw003.getId());
if (CollectionUtils.isNotEmpty(hpcw003s)) {
// 更新主表
BigDecimal totalContractPriceIncluding = hpcw003AList.stream().map(HPCW003A::getTotalContractPriceIncluding).reduce(BigDecimal.ZERO,BigDecimal::add);
StringBuffer contractNumber = new StringBuffer();
hpcw003s.forEach(hpcw003A -> {
contractNumber.append(hpcw003A.getContractNumber()).append(",");
});
/*for (HPCW003A hpcw003A : hpcw003s) {
//totalContractPriceIncluding = totalContractPriceIncluding.add(hpcw003A.getTotalContractPriceIncluding());
contractNumber.append(hpcw003A.getContractNumber()).append(",");
}*/
hpcw003.setTotalContractPriceIncluding(totalContractPriceIncluding);
hpcw003.setFactoryCode(hpcw003s.get(0).getFactoryCode());
hpcw003.setPartyA(hpcw003s.get(0).getPartyA());
hpcw003.setProjCode(hpcw003s.get(0).getProjCode());
hpcw003.setProjName(hpcw003s.get(0).getProjName());
hpcw003.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.modify(hpcw003);
}
}
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败");
}
return inInfo;
}
/**
* 提交操作
* @param inInfo
* @return
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPCW003 hpcw003 = new HPCW003();
hpcw003.fromMap(resultRows.get(i));
hpcw003.setReviewStatus(1);
DaoUtils.update(HPCW003.SUBMIT, hpcw003);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo writeoff(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPCW003 hpcw003 = new HPCW003();
hpcw003.fromMap(resultRows.get(i));
hpcw003.setCancelStatus(2);
DaoUtils.update("HPCW003.writeoff", hpcw003);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.cw.domain.HPCW001;
import com.baosight.hpjx.hp.cw.domain.HPCW003A;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description 收款单详情
*/
public class ServiceHPCW003A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_CODE_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCW003A().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCW003A.QUERY, new HPCW003A());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.cw.domain.HPCW001;
import com.baosight.hpjx.hp.cw.domain.HPCW003A;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/8/18
* @description 收款单
*/
public class ServiceHPCW003B extends ServiceEPBase {
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_CODE_BOX_BLOCK_ID,
DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "isAmount", "0");
inInfo = super.query(inInfo, HPCW001.QUERY, new HPCW001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.CancelStatusEnum;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.cw.domain.HPCW002;
import com.baosight.hpjx.hp.cw.domain.HPCW004;
import com.baosight.hpjx.hp.cw.domain.HPCW004A;
import com.baosight.hpjx.hp.cw.tools.HPCWTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description 付款单
*/
public class ServiceHPCW004 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCW004().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCW004.QUERY, new HPCW004());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (Map resultRow : resultRows) {
HPCW004 hpcw004 = new HPCW004();
hpcw004.fromMap(resultRow);
hpcw004.setSigningDate(DateUtils.formatShort(hpcw004.getSigningDate()));
if (hpcw004.getId() == null || hpcw004.getId() == 0) {
this.add(hpcw004);
} else {
this.modify(hpcw004);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param hpcw004
* @return
*/
public void add(HPCW004 hpcw004) {
hpcw004.setCancelStatus(CancelStatusEnum.UNCANCEL.getCode());
hpcw004.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
hpcw004.setIncomeNumber(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CW_INCOME_NUMBER));
DaoUtils.insert(HPCW004.INSERT, hpcw004);
}
/**
* 修改操作
*
* @param hpcw004
* @return
*/
public void modify(HPCW004 hpcw004) {
DaoUtils.update(HPCW004.UPDATE, hpcw004);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "删除",operDesc = "删除")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW004 hgcw016 = new HPCW004();
hgcw016.fromMap(resultRow);
List<HPCW004A> hpcw004AList = HPCWTools.Hpcw004a.getMainId(hgcw016.getId());
if (CollectionUtils.isNotEmpty(hpcw004AList)) {
for (HPCW004A hpcw004A : hpcw004AList) {
HPCWTools.Hpcw002.cutAmount(hpcw004A.getContractNumber(),
hpcw004A.getTotalContractPriceIncluding().multiply(new BigDecimal(-1)));
DaoUtils.update(HPCW004A.DELETE, hpcw004A);
}
}
DaoUtils.update(HPCW004.DELETE, hgcw016);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "付款单",operType = "插入",operDesc = "生成付款单")
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) {
mainId = queryRows.get(0).get("mainId").toString();
}
//获取相应的数据
List<HPCW004A> hpcw004AList = HPCWTools.Hpcw004a.mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hpcw004AList)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HPCW004 hpcw004 = new HPCW004();
hpcw004.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = hpcw004AList.stream().map(HPCW004A::getTotalContractPriceIncluding).reduce(BigDecimal.ZERO,BigDecimal::add);
StringBuffer contractNumber = new StringBuffer();
hpcw004AList.forEach(hpcw004A -> {
contractNumber.append(hpcw004A.getContractNumber()).append(",");
});
/*for (Map m : resultRows) {
String c = m.get(HPCW002.FIELD_BILL_NUMBER).toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}*/
hpcw004.setTotalContractPriceIncluding(totalContractPriceIncluding);
hpcw004.setFactoryCode(hpcw004AList.get(0).getFactoryCode());
hpcw004.setPartyA(hpcw004AList.get(0).getPartyA());
hpcw004.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.add(hpcw004);
//生成明细表
for (HPCW004A hpcw004A : hpcw004AList) {
hpcw004A.setParentId(hpcw004.getId());
// 反写金额
HPCWTools.Hpcw002.cutAmount(hpcw004A.getContractNumber(), hpcw004A.getTotalContractPriceIncluding());
hpcw004A.setDepCode(null);
DaoUtils.insert(HPCW004A.INSERT, hpcw004A);
}
}else {
HPCW004 hpcw004 = HPCWTools.Hpcw004.getId(mainId);
Map<String, BigDecimal> rowMap = new HashMap<>();
/*for (Map m : resultRows) {
String c = m.get(HPCW002.FIELD_BILL_NUMBER).toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
}*/
// 生成明细表
for (HPCW004A hpcw004A : hpcw004AList) {
hpcw004A.setParentId(hpcw004.getId());
// 反写金额
HPCWTools.Hpcw002.cutAmount(hpcw004A.getContractNumber(),hpcw004A.getTotalContractPriceIncluding());
DaoUtils.insert(HPCW004A.INSERT, hpcw004A);
//this.addHGCW017(hgcw017);
}
List<HPCW004A> hpcw004AS = HPCWTools.Hpcw004a.getMainId(hpcw004.getId());
if (CollectionUtils.isNotEmpty(hpcw004AS)) {
// 更新主表
BigDecimal totalContractPriceIncluding = hpcw004AS.stream().map(HPCW004A::getTotalContractPriceIncluding).reduce(BigDecimal.ZERO,BigDecimal::add);
StringBuffer contractNumber = new StringBuffer();
hpcw004AS.forEach(hpcw004A -> {
contractNumber.append(hpcw004A.getContractNumber()).append(",");
});
/*for (HGCW017 hgcw017 : hgcw017s) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw017.getTotalContractPriceIncluding());
contractNumber.append(hgcw017.getContractNumber()).append(",");
}*/
hpcw004.setTotalContractPriceIncluding(totalContractPriceIncluding);
hpcw004.setPartyA(hpcw004AS.get(0).getPartyA());
hpcw004.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.modify(hpcw004);
}
}
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成付款单失败");
}
return inInfo;
}
/**
* 审核操作
* @param inInfo
* @return
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW004 hpcw004 = new HPCW004();
hpcw004.fromMap(resultRow);
hpcw004.setReviewStatus(1);
DaoUtils.update(HPCW004.SUBMIT, hpcw004);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo writeoff(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPCW004 hpcw004 = new HPCW004();
hpcw004.fromMap(resultRow);
hpcw004.setCancelStatus(2);
if (hpcw004.getReviewStatus() == 0) {
throw new PlatException("请先审核!");
}
DaoUtils.update("HPCW004.writeoff", hpcw004);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据核销成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ReviewStatusEnum;
import com.baosight.hpjx.hp.cw.domain.HPCW002;
import com.baosight.hpjx.hp.cw.domain.HPCW004;
import com.baosight.hpjx.hp.cw.domain.HPCW004A;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.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;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description 付款单详情
*/
public class ServiceHPCW004A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCW004A().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化付款单失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPCW004A.QUERY, new HPCW004A());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.cw.domain.HPCW002;
import com.baosight.hpjx.hp.cw.domain.HPCW004A;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/8/18
* @description 付款单
*/
public class ServiceHPCW004B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(
DdynamicEnum.SUPPLIER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_CODE_BOX_BLOCK_ID,
DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCW002().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "付款单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "isAmount", "0");
inInfo = super.query(inInfo, HPCW002.QUERY, new HPCW002());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.constant.S3Constant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.utils.Iplat4jUtils;
import com.baosight.hpjx.hp.cw.domain.HPCW099;
import com.baosight.hpjx.hp.cw.tools.HPCWTools;
import com.baosight.hpjx.hp.dm.domain.HPDM099;
import com.baosight.hpjx.hp.ds.domain.HPDS002;
import com.baosight.hpjx.util.FileUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ProjectInfo;
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.service.soa.XServiceManager;
import org.apache.commons.collections.CollectionUtils;
import javax.xml.ws.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/19
* @description 附件清单
*/
public class ServiceHPCW099 extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPCW099().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "物料清单-附件清单A-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
// 项目环境
//String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
inInfo = super.query(inInfo, "HPCW099.queryRun", new HPCW099());
} else {
inInfo = super.query(inInfo, "HPCW099.queryDev", new HPCW099());
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo queryDoc(EiInfo inInfo) {
try {
String docId = inInfo.getString("docId");
HPCW099 HPCW099 = new HPCW099();
List<HPCW099> list = new ArrayList<>();
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
// 项目环境
//String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
list = this.dao.query("HPCW099.queryRun",map);
} else {
list = this.dao.query("HPCW099.queryDev",map);
}
if (CollectionUtils.isNotEmpty(list)) {
HPCW099 = list.get(0);
inInfo.set("data",HPCW099);
}
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public void add(HPCW099 HPCW099) {
DaoUtils.insert("HPCW099.insert", HPCW099);
}
public void deleteEntity(HPCW099 hpcw099) {
DaoUtils.update(HPCW099.DELETE, hpcw099);
if (!hpcw099.getDocId().isEmpty()) {
Iplat4jUtils.deleteFileByDocId(hpcw099.getDocId());
}
//List<HPDM099> fDm099s = MapUtils.toDaoEPBases(inInfo, HPDM099.class);
//List<HPCW099> hpcw099List = HPCWTools.HpCw099.queryByBiz(hpcw099.getMatId(), "HJ");
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "物料清单-附件清单A-新增操作")
@Override
public EiInfo insert(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
Long matId = null;
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPCW099 fSc002A = new HPCW099();
fSc002A.fromMap(resultRows.get(i));
matId = fSc002A.getMatId();
this.add(fSc002A);
}
/*List<HPCW099> hgcw999List = HPCWTools.HpCw099.queryByBiz(matId,"HT");
eiInfo.addBlock("detail2").addRows(hgcw999List);*/
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(eiInfo, e, "新增失败");
}
return eiInfo;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "物料清单-附件清单A-删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
Long matId = null;
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPCW099 fSc002A = new HPCW099();
fSc002A.fromMap(resultRows.get(i));
matId = fSc002A.getMatId();
this.deleteEntity(fSc002A);
}
/*List<HPCW099> hgcw999List = HPCWTools.HpCw099.queryByBiz(matId,"HT");
inInfo.addBlock(EiConstant.resultBlock).addRows(hgcw999List);*/
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除附件文件")
public void delectDoc(String docId){
Map<String,Object> map = new HashMap<>();
map.put("docId",docId);
List<HPDS002> list = this.dao.query(HPDS002.QUERY,map);
if (list.size() > 0) {
String realPath = list.get(0).getRealPath();
// 项目环境
String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.ProjectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HPCW099.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo();
eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口
EiInfo outInfo = XServiceManager.call(eiInfo);
if(outInfo.getStatus() == EiConstant.STATUS_FAILURE){
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败");
}
}
}else {
FileUtils.deleteFile(realPath);
}
this.dao.delete(HPDS002.DELETE,map);
}
}
}
package com.baosight.hpjx.hp.cw.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* @author LiuYang
* @version 1.0 2024/8/19
* @description 附件上传
*/
public class ServiceHPCW099A extends ServiceEPBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
return inInfo;
}
/**
* 附件上传.
*/
@OperationLogAnnotation(operModul = "附件上传",operType = "上传",operDesc = "附件上传")
public EiInfo form(EiInfo inInfo) {
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-08-16 14:55:29
Version : 1.0
schema : hpjx
tableName : HPCW001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
PROJ_NAME VARCHAR,
PROJ_CODE VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
BILL_TYBE TINYINT,
BILL_NUMBER VARCHAR,
BILL_STATE TINYINT,
SIGNING_DATE VARCHAR,
PARTY_A VARCHAR,
REVIEW_STATUS TINYINT,
THIS_SETTLEMENT_TAX VARCHAR,
THIS_SETTLEMENT_AMOUNT VARCHAR,
TAX_POINTS INTEGER,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL
-->
<sqlMap namespace="HPCW001">
<typeAlias alias="HPCW001" type="com.baosight.hpjx.hp.cw.domain.HPCW001"/>
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
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", <!-- 记录修改时间 -->
FACTORY_CODE as "factoryCode", <!-- 工厂编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂名称 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_CODE as "projCode", <!-- 项目编号 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_TYBE as "billTybe", <!-- 票据类型 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
BILL_STATE as "billState", <!-- 开票状态 -->
SIGNING_DATE as "signingDate", <!-- 开票日期 -->
PARTY_A as "partyA", <!-- 客户名称 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 开票总额 -->
REMAINING_AMOUNT as "remainingAmount" <!-- 剩余开票/收票金额 -->
</sql>
<sql id="condition">
<include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billTybe">
BILL_TYBE = #billTybe#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER LIKE CONCAT('%',#billNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billState">
BILL_STATE = #billState#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isAmount">
REMAINING_AMOUNT &gt; #isAmount#
</isNotEmpty>
</sql>
<sql id="rangeCondition">
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= replace(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= replace(#signingDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HPCW001">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW001 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW001 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billTybe">
BILL_TYBE = #billTybe#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER = #billNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billState">
BILL_STATE = #billState#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW001 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
FACTORY_CODE, <!-- 工厂编码 -->
FACTORY_NAME, <!-- 工厂名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_TYBE, <!-- 票据类型 -->
BILL_NUMBER, <!-- 发票号 -->
BILL_STATE, <!-- 开票状态 -->
SIGNING_DATE, <!-- 开票日期 -->
PARTY_A, <!-- 客户名称 -->
REVIEW_STATUS, <!-- 审批状态 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TAX_POINTS, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
REMAINING_AMOUNT <!-- 剩余开票/收票金额 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #factoryCode#, #factoryName#, #projName#, #projCode#, #settlementNumber#, #billTybe#,
#billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #thisSettlementTax#, #thisSettlementAmount#,
#taxPoints#, #totalContractPriceIncluding#, #remainingAmount#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW001 WHERE ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW001
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂名称 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PROJ_CODE = #projCode#, <!-- 项目编号 -->
SETTLEMENT_NUMBER = #settlementNumber#, <!-- 来源单号 -->
BILL_TYBE = #billTybe#, <!-- 票据类型 -->
BILL_NUMBER = #billNumber#, <!-- 发票号 -->
BILL_STATE = #billState#, <!-- 开票状态 -->
SIGNING_DATE = #signingDate#, <!-- 开票日期 -->
PARTY_A = #partyA#, <!-- 客户名称 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 不含税金额 -->
TAX_POINTS = #taxPoints#, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 开票总额 -->
REMAINING_AMOUNT = #remainingAmount# <!-- 剩余开票/收票金额 -->
WHERE
ID = #id#
</update>
<!--修改剩余金额-->
<update id="updateDeductionAmount">
UPDATE ${hpjxSchema}.T_HPCW001
SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<!--修改审核-->
<update id="submit">
UPDATE ${hpjxSchema}.T_HPCW001
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<!--修改开票状态-->
<update id="billing">
UPDATE ${hpjxSchema}.T_HPCW001
SET
BILL_STATE = #billState#, <!-- 开票状态 -->
<include refid="SqlBase.updateRevise"/>
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-08-16 14:55:29
Version : 1.0
schema : hpjx
tableName : HPCW002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
BILL_TYBE TINYINT,
BILL_NUMBER VARCHAR,
BILL_STATE TINYINT,
SIGNING_DATE VARCHAR,
PARTY_A VARCHAR,
REVIEW_STATUS TINYINT,
TAX_POINTS INTEGER,
THIS_SETTLEMENT_TAX VARCHAR,
THIS_SETTLEMENT_AMOUNT VARCHAR,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL,
RECEIVE_DATE VARCHAR,
DEPOSIT_QTY DECIMAL,
RECEIVE_WEIGHT DECIMAL,
PRICE DECIMAL
-->
<sqlMap namespace="HPCW002">
<typeAlias alias="HPCW002" type="com.baosight.hpjx.hp.cw.domain.HPCW002"/>
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
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", <!-- 记录修改时间 -->
FACTORY_CODE as "factoryCode", <!-- 工厂编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_TYBE as "billTybe", <!-- 票据类型 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
BILL_STATE as "billState", <!-- 开票状态 -->
SIGNING_DATE as "signingDate", <!-- 开票日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 发票总额 -->
RECEIVE_DATE as "receiveDate", <!-- 收票日期 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
PRICE as "price", <!-- 单价 -->
REMAINING_AMOUNT as "remainingAmount"
</sql>
<sql id="condition">
<include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billTybe">
BILL_TYBE = #billTybe#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER like concat('%',#billNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billState">
BILL_STATE = #billState#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveDate">
RECEIVE_DATE = #receiveDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="isAmount">
REMAINING_AMOUNT &gt; #isAmount#
</isNotEmpty>
</sql>
<sql id="rangeCondition">
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= replace(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= replace(#signingDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HPCW002">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW002 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW002 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billTybe">
BILL_TYBE = #billTybe#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER = #billNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billState">
BILL_STATE = #billState#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveDate">
RECEIVE_DATE = #receiveDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="price">
PRICE = #price#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW002 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
FACTORY_CODE, <!-- 工厂编码 -->
FACTORY_NAME, <!-- 工厂名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_TYBE, <!-- 票据类型 -->
BILL_NUMBER, <!-- 发票号 -->
BILL_STATE, <!-- 开票状态 -->
SIGNING_DATE, <!-- 开票日期 -->
PARTY_A, <!-- 供应商名称 -->
REVIEW_STATUS, <!-- 审批状态 -->
TAX_POINTS, <!-- 税率 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 发票总额 -->
RECEIVE_DATE, <!-- 收票日期 -->
DEPOSIT_QTY, <!-- 入库数量 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
PRICE, <!-- 单价 -->
REMAINING_AMOUNT
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #factoryCode#, #factoryName#,#projCode#, #projName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#,
#partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#,
#totalContractPriceIncluding#, #receiveDate#, #depositQty#, #receiveWeight#, #price#, #remainingAmount#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW002 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW002
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
SETTLEMENT_NUMBER = #settlementNumber#, <!-- 来源单号 -->
BILL_TYBE = #billTybe#, <!-- 票据类型 -->
BILL_NUMBER = #billNumber#, <!-- 发票号 -->
BILL_STATE = #billState#, <!-- 开票状态 -->
SIGNING_DATE = #signingDate#, <!-- 开票日期 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
TAX_POINTS = #taxPoints#, <!-- 税率 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 发票总额 -->
RECEIVE_DATE = #receiveDate#, <!-- 收票日期 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
PRICE = #price#, <!-- 单价 -->
REMAINING_AMOUNT = #remainingAmount# <!-- 剩余开票/收票金额 -->
WHERE
ID = #id#
</update>
<update id="updateDeductionAmount">
UPDATE ${hpjxSchema}.T_HPCW002
SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票/收票金额 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hpjxSchema}.T_HPCW002
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<update id="writeoff">
UPDATE ${hpjxSchema}.T_HPCW002
SET
CANCEL_STATUS = #cancelStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<select id="queryInvoicing" parameterClass="java.util.HashMap" resultClass="HPCW002">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW002 WHERE REVIEW_STATUS = '1'
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="queryCheckList" parameterClass="java.util.HashMap" resultClass="HPCW002">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW002 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriodDateStart">
<![CDATA[ SIGNING_DATE >= #accountPeriodDateStart# ]]>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriodDateEnd">
<![CDATA[ SIGNING_DATE <= #accountPeriodDateEnd# ]]>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billDate">
LEFT(SIGNING_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
REVIEW_STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
</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-08-16 14:55:29
Version : 1.0
schema : hpjx
tableName : HPCW003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
PROJ_NAME VARCHAR,
PROJ_CODE VARCHAR,
CONTRACT_NUMBER VARCHAR,
INCOME_NUMBER VARCHAR,
SIGNING_DATE VARCHAR,
PARTY_A VARCHAR,
CANCEL_STATUS TINYINT,
REVIEW_STATUS TINYINT,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL
-->
<sqlMap namespace="HPCW003">
<typeAlias alias="HPCW003" type="com.baosight.hpjx.hp.cw.domain.HPCW003"/>
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
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", <!-- 记录修改时间 -->
FACTORY_CODE as "factoryCode", <!-- 工厂编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂名称 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_CODE as "projCode", <!-- 项目编号 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
INCOME_NUMBER as "incomeNumber", <!-- 收款单号 -->
SIGNING_DATE as "signingDate", <!-- 收款日期 -->
PARTY_A as "partyA", <!-- 客户名称 -->
CANCEL_STATUS as "cancelStatus", <!-- 核销状态 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding" <!-- 收款总额 -->
</sql>
<sql id="condition">
<include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
</sql>
<sql id="rangeCondition">
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= replace(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= replace(#signingDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HPCW003">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW003 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW003 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW003 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
FACTORY_CODE, <!-- 工厂编码 -->
FACTORY_NAME, <!-- 工厂名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
INCOME_NUMBER, <!-- 收款单号 -->
SIGNING_DATE, <!-- 收款日期 -->
PARTY_A, <!-- 客户名称 -->
CANCEL_STATUS, <!-- 核销状态 -->
REVIEW_STATUS, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING <!-- 收款总额 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #factoryCode#, #factoryName#, #projName#, #projCode#, #contractNumber#, #incomeNumber#, #signingDate#, #partyA#, #cancelStatus#, #reviewStatus#, #totalContractPriceIncluding#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hpjxSchema}.T_HPCW003
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW003 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW003
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂名称 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PROJ_CODE = #projCode#, <!-- 项目编号 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
INCOME_NUMBER = #incomeNumber#, <!-- 收款单号 -->
SIGNING_DATE = #signingDate#, <!-- 收款日期 -->
PARTY_A = #partyA#, <!-- 客户名称 -->
CANCEL_STATUS = #cancelStatus#, <!-- 核销状态 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding# <!-- 收款总额 -->
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hpjxSchema}.T_HPCW003
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<update id="writeoff">
UPDATE ${hpjxSchema}.T_HPCW003
SET
CANCEL_STATUS = #cancelStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
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-08-16 14:55:29
Version : 1.0
schema : hpjx
tableName : HPCW003A
ID BIGINT NOT NULL primarykey,
PARENT_ID BIGINT NOT NULL,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_NAME VARCHAR,
PROJ_CODE VARCHAR,
CONTRACT_NUMBER VARCHAR,
PARTY_A VARCHAR,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL
-->
<sqlMap namespace="HPCW003A">
<typeAlias alias="HPCW003A" type="com.baosight.hpjx.hp.cw.domain.HPCW003A"/>
<sql id="column">
ID as "id",
PARENT_ID as "parentId", <!-- 上级ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
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", <!-- 记录修改时间 -->
FACTORY_CODE as "factoryCode", <!-- 工厂编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂名称 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROJ_CODE as "projCode", <!-- 项目编号 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 客户名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding" <!-- 收款总额 -->
</sql>
<sql id="condition">
<include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HPCW003A">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW003A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW003A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW003A (ID,
PARENT_ID, <!-- 上级ID -->
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
FACTORY_CODE, <!-- 工厂编码 -->
FACTORY_NAME, <!-- 工厂名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
PARTY_A, <!-- 客户名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING <!-- 收款总额 -->
)
VALUES (#id#, #parentId#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #factoryCode#, #factoryName#, #projName#, #projCode#, #contractNumber#, #partyA#, #totalContractPriceIncluding#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW003A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW003A
SET
PARENT_ID = #parentId#, <!-- 上级ID -->
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂名称 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
PROJ_CODE = #projCode#, <!-- 项目编号 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
PARTY_A = #partyA#, <!-- 客户名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding# <!-- 收款总额 -->
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-08-16 14:55:29
Version : 1.0
schema : hpjx
tableName : HPCW004
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
CONTRACT_NUMBER VARCHAR,
INCOME_NUMBER VARCHAR,
SIGNING_DATE VARCHAR,
PARTY_A VARCHAR,
CANCEL_STATUS TINYINT,
REVIEW_STATUS TINYINT,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL
-->
<sqlMap namespace="HPCW004">
<typeAlias alias="HPCW004" type="com.baosight.hpjx.hp.cw.domain.HPCW004"/>
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
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", <!-- 记录修改时间 -->
FACTORY_CODE as "factoryCode", <!-- 工厂编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
INCOME_NUMBER as "incomeNumber", <!-- 单号 -->
SIGNING_DATE as "signingDate", <!-- 付款日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
CANCEL_STATUS as "cancelStatus", <!-- 核销状态 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding" <!-- 付款总额 -->
</sql>
<sql id="condition">
<include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
</sql>
<sql id="rangeCondition">
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= replace(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= replace(#signingDateTo#, '-', '')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HPCW004">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW004 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW004 WHERE 1=1
<include refid="condition" />
<include refid="rangeCondition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW004 (ID,
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
FACTORY_CODE, <!-- 工厂编码 -->
FACTORY_NAME, <!-- 工厂名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
INCOME_NUMBER, <!-- 单号 -->
SIGNING_DATE, <!-- 付款日期 -->
PARTY_A, <!-- 供应商名称 -->
CANCEL_STATUS, <!-- 核销状态 -->
REVIEW_STATUS, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING <!-- 付款总额 -->
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #factoryCode#, #factoryName#, #contractNumber#, #incomeNumber#, #signingDate#, #partyA#, #cancelStatus#, #reviewStatus#, #totalContractPriceIncluding#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hpjxSchema}.T_HPCW003
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW004 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW004
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
INCOME_NUMBER = #incomeNumber#, <!-- 单号 -->
SIGNING_DATE = #signingDate#, <!-- 付款日期 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
CANCEL_STATUS = #cancelStatus#, <!-- 核销状态 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding# <!-- 付款总额 -->
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hpjxSchema}.T_HPCW004
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE
ID = #id#
</update>
<update id="writeoff">
UPDATE ${hpjxSchema}.T_HPCW004
SET
CANCEL_STATUS = #cancelStatus#, <!-- 审核状态 -->
<include refid="SqlBase.updateRevise"/>
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-08-16 14:55:29
Version : 1.0
schema : hpjx
tableName : HPCW004A
ID BIGINT NOT NULL primarykey,
PARENT_ID BIGINT NOT NULL,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
CONTRACT_NUMBER VARCHAR,
PARTY_A VARCHAR,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL
-->
<sqlMap namespace="HPCW004A">
<typeAlias alias="HPCW004A" type="com.baosight.hpjx.hp.cw.domain.HPCW004A"/>
<sql id="column">
ID as "id",
PARENT_ID as "parentId", <!-- 主表ID -->
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
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", <!-- 记录修改时间 -->
FACTORY_CODE as "factoryCode", <!-- 工厂编码 -->
FACTORY_NAME as "factoryName", <!-- 工厂名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding" <!-- 收款总额 -->
</sql>
<sql id="condition">
<include refid="SqlBase.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="HPCW004A">
SELECT
<include refid="column" />
FROM ${hpjxSchema}.T_HPCW004A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW004A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</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="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW004A (ID,
PARENT_ID, <!-- 主表ID -->
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
FACTORY_CODE, <!-- 工厂编码 -->
FACTORY_NAME, <!-- 工厂名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
PARTY_A, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING <!-- 收款总额 -->
)
VALUES (#id#, #parentId#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #factoryCode#, #factoryName#, #contractNumber#, #partyA#, #totalContractPriceIncluding#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW004A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW004A
SET
PARENT_ID = #parentId#, <!-- 主表ID -->
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
FACTORY_CODE = #factoryCode#, <!-- 工厂编码 -->
FACTORY_NAME = #factoryName#, <!-- 工厂名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding# <!-- 收款总额 -->
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">
<sqlMap namespace="HPCW099">
<typeAlias alias="HPCW099" type="com.baosight.hpjx.hp.cw.domain.HPCW099"/>
<sql id="column">
A.ID as "id", <!-- 主键ID -->
A.COMPANY_CODE as "companyCode", <!-- 企业编码 -->
A.FACTORY_CODE as "factoryCode", <!-- 公司编码 -->
A.FACTORY_NAME as "factoryName", <!-- 公司名称 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.BIZ_TYPE as "bizType" <!-- 业务类型 -->
</sql>
<sql id="columnDev">
<include refid="column"/>,
B.DOC_NAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="columnRun">
<include refid="column"/>,
B.RES_CNAME as "docName" <!-- 文件名称 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId#
</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="bizType">
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCodes">
FACTORY_CODE IN <iterate close=")" open="(" conjunction="," property="factoryCodes">#factoryCodes[]#</iterate>
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql id="conditionDev">
AND A.DOC_ID = B.DOC_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql id="conditionRun">
AND A.DOC_ID = B.RES_ID
<include refid="condition"/>
<isNotEmpty prepend=" AND " property="docName">
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
A.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="queryDev" resultClass="HPCW099">
SELECT
<include refid="columnDev"/>
FROM ${hpjxSchema}.T_HPCW099 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countDev" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW099 A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include refid="conditionDev"/>
<include refid="customCondition"/>
</select>
<select id="queryRun" resultClass="HPCW099">
SELECT
<include refid="columnRun"/>
FROM ${hpjxSchema}.T_HPCW099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
<include refid="order"/>
</select>
<select id="countRun" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPCW099 A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include refid="conditionRun"/>
<include refid="customCondition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPCW099 (ID, <!-- 主键ID -->
COMPANY_CODE, <!-- 企业编码 -->
FACTORY_CODE, <!-- 公司编码 -->
FACTORY_NAME, <!-- 公司名称 -->
DEP_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 修改人 -->
UPDATED_NAME, <!-- 修改人名称 -->
UPDATED_TIME, <!-- 修改时间 -->
BIZ_TYPE <!-- 业务类型 -->
)
VALUES (#id#, #companyCode#, #factoryCode#, #factoryName#, #depCode#, #matId#, #docId#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #bizType#)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPCW099 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hpjxSchema}.T_HPCW099
SET
COMPANY_CODE = #companyCode#, <!-- 企业编码 -->
FACTORY_CODE = #factoryCode#, <!-- 公司编码 -->
FACTORY_NAME = #factoryName#, <!-- 公司名称 -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 -->
MAT_ID = #matId#, <!-- 物料ID -->
DOC_ID = #docId#, <!-- 文件ID -->
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
BIZ_TYPE = #bizType# <!-- 业务类型 -->
WHERE
ID = #id#
</update>
<update id="batchUpdate">
UPDATE ${hpjxSchema}.T_HPCW099
SET
MAT_ID = #matId#, <!-- 物料ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate>
</update>
</sqlMap>
\ No newline at end of file
package com.baosight.hpjx.hp.cw.tools;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.constant.S3Constant;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.cw.domain.*;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/16
* @description
*/
public class HPCWTools {
/**
* 销售开票
*/
public static class Hpcw001 {
public static HPCW001 getId(String id) {
AssertUtils.isNull(id, "销售开票单ID不能为空!");
List<HPCW001> results = DaoBase.getInstance().query(HPCW001.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static void cutAmount(String billNumber, BigDecimal cutAmount) {
AssertUtils.isNull(billNumber, "来源单号不能为空!");
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// }
List<HPCW001> results = DaoBase.getInstance().query(HPCW001.QUERY,new HashMap<String,Object>(){
{put(HPCW001.FIELD_BILL_NUMBER,billNumber);}
});
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("找不到对应的销售开票记录!");
}
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HPCW001 hpcw001 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(hpcw001.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("扣款金额不能大于销售开票剩余金额!");
}
hpcw001.setRemainingAmount(remainingAmount);
DaoUtils.update("HPCW001.updateDeductionAmount", hpcw001);
}
}
public static class Hpcw002 {
public static HPCW002 getId(String id) {
AssertUtils.isNull(id, "采购收票单ID不能为空!");
List<HPCW002> results = DaoBase.getInstance().query(HPCW002.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static void cutAmount(String billNumber, BigDecimal cutAmount) {
AssertUtils.isNull(billNumber, "发票号不能为空!");
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// }
List<HPCW002> results = DaoBase.getInstance().query(HPCW002.QUERY,new HashMap<String,Object>(){
{put(HPCW002.FIELD_BILL_NUMBER,billNumber);}
});
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("找不到对应的采购收票记录!");
}
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HPCW002 hpcw002 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(hpcw002.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("扣款金额不能大于采购收票剩余金额!");
}
hpcw002.setRemainingAmount(remainingAmount);
DaoUtils.update("HPCW002.updateDeductionAmount", hpcw002);
}
public static List<HPCW002> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "数据检查参数不能为空");
return DaoBase.getInstance().query("HGCW012.queryCheckList", paramMap);
}
/**
* 根据收货号查询
* @param receiveNo 收货单号
* @return Map
*/
public static Map getReceiveNo(String receiveNo){
AssertUtils.isEmpty(receiveNo, "发票号不能为空");
Map queryMap = new HashMap<>();
queryMap.put(HPCW002.FIELD_SETTLEMENT_NUMBER,receiveNo);
List<Map> list = DaoBase.getInstance().query("HPCW002.queryInvoicing", queryMap);
return list.size() > 0 ? list.get(0) : null;
}
}
public static class Hpcw003 {
public static HPCW003 getId(String id) {
AssertUtils.isNull(id, "收款单ID不能为空!");
List<HPCW003> results = DaoBase.getInstance().query(HPCW003.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
}
public static class HpCw003a {
public static HPCW003A getId(Long id) {
AssertUtils.isNull(id, "收款单ID不能为空!");
List<HPCW003A> results = DaoBase.getInstance().query(HPCW003A.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static List<HPCW003A> mapToList(List<Map> rows, Long mainId) {
List<HPCW003A> hpcw003AList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HPCW003A hpcw003A = new HPCW003A();
hpcw003A.fromMap(row);
hpcw003A.setId(null);
hpcw003A.setDepCode(null);
hpcw003A.setCreatedBy(null);
hpcw003A.setCreatedName(null);
hpcw003A.setCreatedTime(null);
hpcw003A.setUpdatedBy(null);
hpcw003A.setUpdatedName(null);
hpcw003A.setUpdatedTime(null);
String contractNumber = row.get(HPCW001.FIELD_BILL_NUMBER).toString();
String remainingAmount = row.get("thisAmount").toString(); //本次收款金额
hpcw003A.setContractNumber(contractNumber);
hpcw003A.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
if (mainId != null) {
hpcw003A.setParentId(mainId);
}
hpcw003AList.add(hpcw003A);
});
}
return hpcw003AList;
}
public static List<HPCW003A> getMainId(Long mainId) {
AssertUtils.isNull(mainId, "主表ID不能为空!");
List<HPCW003A> results = DaoBase.getInstance().query(HPCW003A.QUERY,new HashMap<String,Object>(){
{put("parentId",mainId);}
});
return results;
}
}
public static class Hpcw004 {
public static HPCW004 getId(String id) {
AssertUtils.isNull(id, "付款单ID不能为空!");
List<HPCW004> results = DaoBase.getInstance().query(HPCW004.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
}
public static class Hpcw004a {
public static HPCW004A getId(Long id) {
AssertUtils.isNull(id, "付款单ID不能为空!");
List<HPCW004A> results = DaoBase.getInstance().query(HPCW004A.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static List<HPCW004A> mapToList(List<Map> rows, Long mainId) {
List<HPCW004A> hgcw017List = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HPCW004A hpcw004A = new HPCW004A();
hpcw004A.fromMap(row);
hpcw004A.setId(null);
hpcw004A.setDepCode(null);
hpcw004A.setCreatedBy(null);
hpcw004A.setCreatedName(null);
hpcw004A.setCreatedTime(null);
hpcw004A.setUpdatedBy(null);
hpcw004A.setUpdatedName(null);
hpcw004A.setUpdatedTime(null);
String contractNumber = row.get(HPCW002.FIELD_BILL_NUMBER).toString();
String remainingAmount = row.get("thisAmount").toString();
hpcw004A.setContractNumber(contractNumber);
hpcw004A.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
if (mainId != null) {
hpcw004A.setParentId(mainId);
}
hgcw017List.add(hpcw004A);
});
}
return hgcw017List;
}
public static List<HPCW004A> getMainId(Long mainId) {
AssertUtils.isNull(mainId, "主表ID不能为空!");
List<HPCW004A> results = DaoBase.getInstance().query(HPCW004A.QUERY,new HashMap<String,Object>(){
{put("parentId",mainId);}
});
return results;
}
}
public static class HpCw099 {
public static void batchUpdate(List<Map> rows, Long id) {
AssertUtils.isNull(id, "业务ID不能为空!");
String[] docIds = rows.stream().map(row -> row.get("docId").toString()).toArray(String[]::new);
if (docIds.length > 0) {
DaoUtils.update("HPCW099.batchUpdate", new HashMap<String,Object>(){
{put("docIds",docIds);}
{put("matId",id);}
});
}
}
public static List<HPCW099> queryByBiz(Long matId, String bizType) {
AssertUtils.isNull(matId, "业务ID不能为空!");
AssertUtils.isNull(bizType, "业务类型不能为空!");
List<HPCW099> results = new ArrayList<>();
// 项目环境
//String projectEnv = ProjectInfo.getProjectEnv();
if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
results = DaoBase.getInstance().query("HPCW099.queryRun",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
});
} else {
results = DaoBase.getInstance().query("HPCW099.queryDev",new HashMap<String,Object>(){
{put("matId",matId);}
{put("bizType",bizType);}
});
}
return results;
}
}
}
...@@ -217,4 +217,14 @@ ...@@ -217,4 +217,14 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, PRDT_CODE, PART_CODE, FACTORY_CODE GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, PRDT_CODE, PART_CODE, FACTORY_CODE
</select> </select>
<select id="queryProjCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT distinct
FACTORY_CODE as "factoryCode",
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName" <!-- 项目名称 -->
FROM ${hpjxSchema}.t_hpkc003
WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition"/>
</select>
</sqlMap> </sqlMap>
...@@ -314,4 +314,12 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -314,4 +314,12 @@ public class ServiceHPSC001 extends ServiceBase {
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo)); CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo; return inInfo;
} }
public EiInfo queryCustCodeBox(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.CUST_CODE_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo),MapUtils.getBoolean(queryRow, "isSplicingSymbol"));
return inInfo;
}
} }
...@@ -205,16 +205,43 @@ ...@@ -205,16 +205,43 @@
<select id="queryComboBox" parameterClass="java.util.HashMap" <select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", A.PROJ_CODE as "projCode",
PROJ_NAME as "projName" A.PROJ_NAME as "projName",
FROM ${hpjxSchema}.t_hpsc001 WHERE 1=1 A.PRINC2 as "princ2",
B.CUST_NAME as "custName"
FROM ${hpjxSchema}.t_hpsc001 A
LEFT JOIN ${hpjxSchema}.T_HPPZ003 B ON A.PRINC2 = B.CUST_CODE
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="status"> <isNotEmpty prepend=" AND " property="status">
STATUS = #status# A.STATUS = #status#
</isNotEmpty>
ORDER BY A.PROJ_CODE
</select>
<select id="queryCustCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
A.PRINC2 as "custCode",
B.CUST_NAME as "custName"
FROM ${hpjxSchema}.t_hpsc001 A
LEFT JOIN ${hpjxSchema}.T_HPPZ003 B ON A.PRINC2 = B.CUST_CODE
WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
A.STATUS = #status#
</isNotEmpty> </isNotEmpty>
ORDER BY PROJ_CODE ORDER BY A.PRINC2
</select> </select>
<select id="queryProjCode" parameterClass="java.util.HashMap" <select id="queryProjCode" parameterClass="java.util.HashMap"
......
...@@ -15,6 +15,14 @@ ...@@ -15,6 +15,14 @@
<!-- 用户服务 --> <!-- 用户服务 -->
<sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/> <sqlMap resource="com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"/>
<!--财务服务-->
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW001.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW002.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW003.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW003A.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW004.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/cw/sql/HPCW004A.xml"/>
<!--设备管理--> <!--设备管理-->
<sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB003.xml"/> <sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB003.xml"/>
<sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB004.xml"/> <sqlMap resource="com/baosight/hpjx/hp/sb/sql/HPSB004.xml"/>
......
$(function() {
var projCodeBox = __eiInfo.getBlock("projCodeBox_block_id").getMappedRows();
var custCodeBox = __eiInfo.getBlock("custCode_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
{
field: "operator",
template: function (item) {
let template = "";
if (item.companyCode){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
}
return template;
}
},{
field: "projCode",
filter:function (options) {
var factoryCode = options.model['factoryCode'];
if(factoryCode) {
// 返回我们过滤后的数据集
return _.filter(projCodeBox, function (item) {
return item["param1Field"]==factoryCode;
})
}
return options.values;
}
},{
field: "partyA",
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-projCode", options.model["projCode"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HPSC001");
inInfo.set("methodName", "queryCustCodeBox");
inInfo.set("blockId", "custCode_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},{
field: "signingDate",
defaultValue: function () {
return currShortDate();
}
}
],
loadComplete: function (grid) {
//此grid对象
$("#SUBMIT").on("click",submitFunc);
$("#BTN_BILL").on("click",billFunc);
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if(e.field == "totalContractPriceIncluding" || e.field == "taxPoints"){
if(item.taxPoints && item.totalContractPriceIncluding){
let thisSettlementAmount = item.totalContractPriceIncluding / (item.taxPoints / 100 + 1);
let thisSettlementTax = item.totalContractPriceIncluding-thisSettlementAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount = Number(thisSettlementAmount.toFixed(2));
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax = Number(thisSettlementTax.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementTax',thisSettlementTax)
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
loadChange(grid,e,"price");
}else if (e.field == "projCode"){
if (!item.factoryCode){
for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i].valueField == item.projCode){
resultGrid.setCellValue(item,'factoryCode',projCodeBox[i].param1Field);
resultGrid.setCellValue(item,'projName',projCodeBox[i].textField);
break;
}
}
}
loadChange(grid,e,"partyA");
}else if (e.field == "factoryCode"){
loadChange(grid,e,"projCode");
}
})
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
downKeyUp();
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
function saveFunc(btn) {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let factoryCode= item.get("factoryCode");
let projCode= item.get("projCode");
let partyA= item.get("partyA");
let totalContractPriceIncluding= item.get("totalContractPriceIncluding");
let reviewStatus= item.get("reviewStatus");
let billState= item.get("billState");
let billNumber= item.get("billNumber");
if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂代码\",不能为空!");
flag = false;
return false;
}
if(isBlank(projCode)){
message("选中的第"+(index+1)+"行\"项目代码\",不能为空!");
flag = false;
return false;
}
if(isBlank(partyA)){
message("选中的第"+(index+1)+"行\"客户名称\",不能为空!");
flag = false;
return false;
}
if(!isNumber(totalContractPriceIncluding) && !isPositiveNumber(totalContractPriceIncluding)){
message("勾选的第" + (index+1) + "行开票总额必须是大于0的数字");
flag = false;
return false;
}
if((reviewStatus === "1")){
message("勾选的第" + (index+1) + "行数据已审核,无法修改");
flag = false;
return false;
}
if((billState === "2")){
message("勾选的第" + (index+1) + "行数据已开票,无法修改");
flag = false;
return false;
}
if((reviewStatus === "1")){
message("勾选的第" + (index+1) + "行数据已审核,无法修改");
flag = false;
return false;
}
if(isBlank(billNumber)){
message("选中的第"+(index+1)+"行\"开票单号\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW001", "save", true,
function (e) {
//detailGrid.setEiInfo(e);
//query();
});
//释放禁用按钮
btn.attr("disabled", false);
}
});
}
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function fileDetailFunc(id) {
JSColorbox.open({
href: "HPCW099?methodName=initLoad&inqu_status-0-bizType=HJCW001&inqu_status-0-matId=" + id + "&efParentFormEname=HPCW001",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row, index) {
let billNumber= row.get("billNumber");
if (row.reviewStatus == "1") {
message("勾选的数据中有已经审核的票据!");
flag = false;
}
if(isBlank(billNumber)){
message("选中的第"+(index+1)+"行\"发票号\",不能为空!");
flag = false;
return false;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"审核\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW001", "submit", true,
function (e) {
//detailGrid.setEiInfo(e);
query();
});
}
});
}
}
function billFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.billState == "2") {
message("勾选的数据中有已经开票的票据!");
flag = false;
}
if (row.billNumber == " ") {
message("勾选的数据中发票号为空");
flag = false;
}
}
)
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"开票\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW001", "billing", true,
function (e) {
//detailGrid.setEiInfo(e);
query();
});
}
});
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/16
Time: 17:53
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 blockId="inqu_status" row="0" ename="factoryCode" cname="工厂" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="开票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect blockId="inqu_status" row="0" ename="partyA" cname="客户名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊发票号"/>
<EF:EFSelect cname="开票状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.billState"/>
</EF:EFSelect>
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition = "ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="true" queryMethod="query">
<EF:EFColumn ename="id" cname="主键" primaryKey="true" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="projCodeBox_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="projName" cname="项目名称" width="160" enable="false" readonly="true" align="center" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="客户名称" blockName="custCode_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="settlementNumber" cname="开票单号" width="140" enable="false" readonly="true" align="center" hidden="true"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="true" readonly="false" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="140" format="{0:N0}" align="center" required="true"/>
<EF:EFComboColumn ename="taxPoints" cname="税率" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="13">
<EF:EFCodeOption codeName="hpjx.hpcw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="true" readonly="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="billState" cname="开票状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpcw.billState"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
var projCodeBox = __eiInfo.getBlock("projCodeBox_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [{
field: "operator",
template: function (item) {
let template = "";
if (item.companyCode){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
}
return template;
}
},{
field: "projCode",
filter:function (options) {
var factoryCode = options.model['factoryCode'];
if(factoryCode) {
// 返回我们过滤后的数据集
return _.filter(projCodeBox, function (item) {
return item["param1Field"]==factoryCode;
})
}
return options.values;
},
},{
field: "signingDate",
defaultValue: function () {
return currShortDate();
}
},{
field: "receiveDate",
defaultValue: function () {
return currShortDate();
}
}],
loadComplete: function (grid) {
//$("#BTN_UPDATE").on("click",updateFunc);
$("#SUBMIT").on("click",submitFunc);
$("#B_SAVE").on("click",saveFunc);
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if(e.field == "totalContractPriceIncluding" || e.field == "taxPoints"){
if(item.taxPoints && item.totalContractPriceIncluding){
let thisSettlementAmount = item.totalContractPriceIncluding / (item.taxPoints / 100 + 1);
let thisSettlementTax = item.totalContractPriceIncluding-thisSettlementAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount = Number(thisSettlementAmount.toFixed(2));
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax = Number(thisSettlementTax.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementTax',thisSettlementTax)
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
loadChange(grid,e,"price");
}else if (e.field == "projCode"){
if (!item.factoryCode){
for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i].valueField == item.projCode){
resultGrid.setCellValue(item,'factoryCode',projCodeBox[i].param1Field);
resultGrid.setCellValue(item,'projName',projCodeBox[i].textField);
break;
}
}
}
loadChange(grid,e,"partyA");
}else if (e.field == "factoryCode"){
loadChange(grid,e,"projCode");
}
})
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveFunc(btnNode);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
downKeyUp();
});
$(window).load(function () {
// 查
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let reviewStatus= item.get("reviewStatus");
let signingDate = item.get("signingDate");
let factoryCode= item.get("factoryCode");
let projCode= item.get("projCode");
let partyA= item.get("partyA");
let totalContractPriceIncluding= item.get("totalContractPriceIncluding");
if(isBlank(factoryCode)){
message("选中的第"+(index+1)+"行\"工厂代码\",不能为空!");
flag = false;
return false;
}
if(isBlank(projCode)){
message("选中的第"+(index+1)+"行\"项目代码\",不能为空!");
flag = false;
return false;
}
if(isBlank(partyA)){
message("选中的第"+(index+1)+"行\"供应商名称\",不能为空!");
flag = false;
return false;
}
if((reviewStatus === "1")){
message("选中的第"+(index+1)+"行数据已审核,不能修改!");
flag = false;
return false;
}
if(isBlank(signingDate)){
message("选中的第"+(index+1)+"行\"发票日期\",不能为空!");
flag = false;
return false;
}
if(!isNumber(totalContractPriceIncluding) && !isPositiveNumber(totalContractPriceIncluding)){
message("勾选的第" + (index+1) + "行开票总额必须是大于0的数字");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW002", "save", true,
function (e) {
//detailGrid.setEiInfo(e);
query();
});
}
});
}
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function fileDetailFunc(id) {
JSColorbox.open({
href: "HPCW099?methodName=initLoad&inqu_status-0-bizType=HJCW002&inqu_status-0-matId=" + id + "&efParentFormEname=HPCW002",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row, index) {
let billNumber= row.get("billNumber");
if (isBlank(row.billTybe)) {
message("勾选的数据中未选择票据类型!");
flag = false;
}
if (row.reviewStatus == "1") {
message("勾选的数据中有已经审批的数据,不能审批!");
flag = false;
}
if(isBlank(billNumber)){
message("选中的第"+(index+1)+"行\"发票号\",不能为空!");
flag = false;
return false;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW002", "submit", true,
function (e) {
//detailGrid.setEiInfo(e);
query();
});
}
});
}
}
<!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}"/>
<head>
</head>
<EF:EFPage title="采购收票">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="收票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect blockId="inqu_status" row="0" ename="partyA" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊发票号"/>
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition = "ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="true" queryMethod="query">
<EF:EFColumn ename="id" cname="主键" primaryKey="true" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="projCodeBox_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="settlementNumber" cname="发票单号" width="200" enable="false" readonly="true" align="center" hidden="true"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiveDate" cname="收票日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" />
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" />
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="true" readonly="false" align="center"/>
<EF:EFComboColumn ename="taxPoints" cname="税率" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="13">
<EF:EFCodeOption codeName="hpjx.hpcw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [{
field: "operator",
template: function (item) {
let template = '';
if (item.companyCode){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">收款清单</a>';
}
return template;
}
},{
field: "signingDate",
defaultValue: function () {
return currShortDate();
}
}
],
loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
$("#BTN_WRITEOFF").on("click",writeoffFunc);
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveResult1Func();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
$("#result-0-projCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-projCode"));
$("#result-0-projName").val(textField);
})
downKeyUp();
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 选择销售开票
*/
function choiceFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length == 1 || rows.length == 0) {
var mainId = "";
if (rows.length == 1) {
mainId = rows[0].id;
}
JSColorbox.open({
href: "HPCW003B?methodName=initLoad&inqu_status-0-hiddenConditions=1" +
"&inqu_status-0-billState=2" + /*已开票*/
"&inqu_status-0-reviewStatus=1" + /*已审核*/
"&inqu_status-0-mainId=" + mainId +
"&efParentFormEname=HPCW003",
title: "<div style='text-align: center;'>销售开票</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
} else {
message("请选择一条数据或不选择数据");
return;
}
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].cancelStatus == "1") {
message("已经核销的单据不能修改");
return;
}
JSColorbox.open({
href: "HPCW001B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HPCW003",
title: "<div style='text-align: center;'>收款清单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function saveResult1Func() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW003", "save", true,
function (e) {
//detailGrid.setEiInfo(e);
//query();
});
}
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!");
flag = false;
return;
}
if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的单据!");
flag = false;
return;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW003", "submit", true,
function (e) {
//detailGrid.setEiInfo(e);
//query();
});
}
});
}
}
function writeoffFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.cancelStatus == "1") {
message("勾选的数据中有已经核销的单据!");
flag = false;
return;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"核销\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW003", "writeoff", true,
function (e) {
//detailGrid.setEiInfo(e);
//query();
});
/*var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HPCW001", "writeoff", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});*/
}
});
}
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let cancelStatus= item.get("cancelStatus");
if(cancelStatus === "2"){
message("选中的第"+(index+1)+"行记录为核销状态,不能删除!");
flag = false;
return;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW003", "delete", true);
}
});
}
}
function contractDetailFunc(id) {
JSColorbox.open({
href: "HPCW003A?methodName=initLoad&inqu_status-0-parentId=" + id + "&efParentFormEname=HPCW003",
title: "<div style='text-align: center;'>收款详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/16
Time: 17:54
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}"/>
<head>
</head>
<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="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="收款日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect blockId="inqu_status" row="0" ename="partyA" cname="客户名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="140" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="partyA" cname="客户名称" blockName="customer_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="projCodeBox_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="140" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="projName" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="signingDate" cname="收款日期" width="100" align="center" readonly="true"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="incomeNumber" cname="收款单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="cancelStatus" cname="核销状态" width="100" align="center" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcw.cancelStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HPCW003A", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW003A", "delete", true);
}
});
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/16
Time: 17:54
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:EFInput cname="隐藏条件" ename="parentId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="projCodeBox_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="partyA" cname="客户名称" blockName="customer_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="contractNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
}
}
downKeyUp();
});
$(window).load(function () {
// 查
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let thisAmount = rows[i]['thisAmount'];
let remainingAmount = rows[i]['remainingAmount'];
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (i + 1) + "行本次收款金额必须是大于0的数字");
return;
}
if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (i + 1) + "行本次收款金额不能大于剩余开票金额");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成收款单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW003", "select", true,
function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/18
Time: 19:58
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:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="reviewStatus" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="billState" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="开票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect blockId="inqu_status" row="0" ename="partyA" cname="客户名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询发票号" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" autoBind="true" queryMethod="query">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="false"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="projCodeBox_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="false"
align="center" filter="contains" sort="true" />
<EF:EFComboColumn ename="partyA" cname="客户名称" blockName="customer_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="false"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="thisAmount" cname="本次收款金额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="200" enable="false" readonly="true" align="center" hidden="true"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="false"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
{
field: "operator",
template: function (item) {
let template = '';
if (item.companyCode){
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">付款清单</a>';
}
return template;
}
},
{
field: "signingDate",
defaultValue: function () {
return currShortDate();
}
},
/*{
field: "companyCode",
template: function (dataItem) {
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['companyCode'] === dataItem['companyCode']) {
dataItem["companyName"] = companyCodeBox[i]['companyName'];
return companyCodeBox[i]['companyName'];
}
}
return dataItem["companyCode"];
}
},*/
],
loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
$("#BTN_WRITEOFF").on("click",writeoffFunc);
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveResult1Func();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
$("#result-0-projCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-projCode"));
$("#result-0-projName").val(textField);
})
downKeyUp();
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 结算单选择
*/
function choiceFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length == 1 || rows.length == 0) {
var mainId = "";
if (rows.length == 1) {
mainId = rows[0].id;
}
JSColorbox.open({
href: "HPCW004B?methodName=initLoad&inqu_status-0-hiddenConditions=1" +
"&inqu_status-0-reviewStatus=1" +
"&inqu_status-0-mainId=" + mainId +
"&efParentFormEname=HPCW004",
title: "<div style='text-align: center;'>采购收票</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
} else {
message("请选择一条数据或不选择数据");
return;
}
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].cancelStatus == "2") {
message("已经核销的单据不能修改");
return;
}
JSColorbox.open({
href: "HPCW002B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HPCW002",
title: "<div style='text-align: center;'>付款清单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function saveResult1Func() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HPCW004", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
/* if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!");
flag = false;
return;
}*/
if (row.reviewStatus == "1") {
message("勾选的数据中有已经提交的单据!");
flag = false;
return;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HPCW004", "submit", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function writeoffFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.cancelStatus == "2") {
message("勾选的数据中有已经核销的单据!");
flag = false;
return;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"核销\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HPCW004", "writeoff", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let cancelStatus= item.get("cancelStatus");
if(cancelStatus === "1"){
message("选中的第"+(index+1)+"行记录为核销状态,不能删除!");
flag = false;
return;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW004", "delete", true);
}
});
}
}
function contractDetailFunc(id) {
JSColorbox.open({
href: "HPCW004A?methodName=initLoad&inqu_status-0-parentId=" + id + "&efParentFormEname=HPCW002",
title: "<div style='text-align: center;'>付款详情</div>",
width: "70%",
height: "70%",
callbackName: windowCallback
});
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/16
Time: 17:55
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}"/>
<head>
</head>
<EF:EFPage title="付款单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="付款日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect blockId="inqu_status" row="0" ename="partyA" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.cancelStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="factoryName" cname="工厂名称" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="signingDate" cname="付款日期" width="100" align="center" readonly="true"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="incomeNumber" cname="付款单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="cancelStatus" cname="核销状态" width="100" align="center" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpcw.cancelStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审核状态" width="100" align="center" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
downKeyUp();
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HPCW004A", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW004A", "delete", true);
}
});
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/16
Time: 17:55
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:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="true"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="contractNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
}
}
downKeyUp();
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let thisAmount = rows[i]['thisAmount'];
let remainingAmount = rows[i]['remainingAmount'];
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (i + 1) + "行本次付款金额必须是大于0的数字");
return;
}
if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (i + 1) + "行本次付款金额不能大于剩余开票金额");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成付款单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW004", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/18
Time: 19:59
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:EFInput cname="隐藏条件" ename="hiddenConditions" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="reviewStatus" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="付款日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFSelect blockId="inqu_status" row="0" ename="partyA" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="false"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余付款金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="supplier_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="160" required="false"
align="center" filter="contains" sort="true" />
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center" hidden="true"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hpjx.hpcw.billTybe"/>
</EF:EFComboColumn>
<%--<EF:EFColumn ename="signingDate" cname="付款日期" width="120" enable="false" readonly="true" align="center"/>--%>
<EF:EFColumn ename="signingDate" cname="付款日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="false" />
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="false"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
return template;
}
}],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 附件上传
$("#UPLOAD_FILE").on("click", uploadFile);
// 查询
$("#BTN_DELETE").on("click", deleteFunc);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
}
/**
* 文件上传
*
* @param id
*/
function uploadFile(id) {
JSColorbox.open({
href: "HPCW099A?methodName=initLoad&inqu_status-0-bizType="+$("#inqu_status-0-bizType").val()+"&inqu_status-0-matId="+$("#inqu_status-0-matId").val(),
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(data) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", data.matId);
inEiInfo.set("result-0-docId", data.docId);
inEiInfo.set("result-0-bizType", data.bizType);
EiCommunicator.send('HPCW099', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
/**
* 删除
*/
function deleteFunc() {
var rows = resultGrid.getCheckedRows();
if (rows.length == 0) {
message("请先勾选数据!");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HPCW099", "delete", true,
function (e) {
var status = e.getStatus();
if (status !== -1) {
resultGrid.dataSource.page(1);
}
});
}
})
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/19
Time: 8: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="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="200" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFUpload = {
uploadFile: {
success: function(e) {
let docId = e.response.docId;
if (isBlank(docId)) {
return;
}
$("#fileDocId").val(docId);
NotificationUtil("附件上传成功");
var matId = $("#inqu_status-0-matId").val();
var bizType = $("#inqu_status-0-bizType").val();
console.log($("#fileDocId").val())
console.log($("#inqu_status-0-matId").val())
console.log($("#inqu_status-0-bizType").val())
var data = {
docId: docId,
matId: matId,
bizType: bizType
}
saveTemp(e);
try {
parent.JSColorbox.setValueCallback(data);
} catch (e){
}
},
}
};
function saveTemp(e) {
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
let result = new EiInfo();
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
result.set("result-0-bizType",$("#inqu_status-0-bizType").val());
result.set("result-0-matId",$("#inqu_status-0-matId").val());
EiCommunicator.send("HPDS002", "insert", result, {
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");
}
});
}
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/19
Time: 8:46
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:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="hk_file11" path="A"/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</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