Commit 60b613c3 by yukang

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

# Conflicts:
#	src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
parents ae6d0b7d 8596a267
...@@ -94,10 +94,10 @@ public class HGCW010 extends DaoEPBase { ...@@ -94,10 +94,10 @@ public class HGCW010 extends DaoEPBase {
private String settlementNumber = " "; /* 来源单号*/ private String settlementNumber = " "; /* 来源单号*/
private String billTybe = " "; /* 票据类型*/ private String billTybe = " "; /* 票据类型*/
private String billNumber = " "; /* 发票号*/ private String billNumber = " "; /* 发票号*/
private String billState = " "; /* 开票状态*/ private Integer billState; /* 开票状态*/
private String signingDate = " "; /* 开票日期*/ private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 客户名称*/ private String partyA = " "; /* 客户名称*/
private Boolean reviewStatus; /* 审批状态*/ private Integer reviewStatus; /* 审批状态*/
private String thisSettlementTax = " "; /* 税额*/ private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/ private String thisSettlementAmount = " "; /* 不含税金额*/
private String taxPoints = " "; /* 税率*/ private String taxPoints = " "; /* 税率*/
...@@ -381,7 +381,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -381,7 +381,7 @@ public class HGCW010 extends DaoEPBase {
* get the billState - 开票状态. * get the billState - 开票状态.
* @return the billState * @return the billState
*/ */
public String getBillState() { public Integer getBillState() {
return this.billState; return this.billState;
} }
...@@ -390,7 +390,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -390,7 +390,7 @@ public class HGCW010 extends DaoEPBase {
* *
* @param billState - 开票状态 * @param billState - 开票状态
*/ */
public void setBillState(String billState) { public void setBillState(Integer billState) {
this.billState = billState; this.billState = billState;
} }
/** /**
...@@ -429,7 +429,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -429,7 +429,7 @@ public class HGCW010 extends DaoEPBase {
* get the reviewStatus - 审批状态. * get the reviewStatus - 审批状态.
* @return the reviewStatus * @return the reviewStatus
*/ */
public Boolean getReviewStatus() { public Integer getReviewStatus() {
return this.reviewStatus; return this.reviewStatus;
} }
...@@ -438,7 +438,7 @@ public class HGCW010 extends DaoEPBase { ...@@ -438,7 +438,7 @@ public class HGCW010 extends DaoEPBase {
* *
* @param reviewStatus - 审批状态 * @param reviewStatus - 审批状态
*/ */
public void setReviewStatus(Boolean reviewStatus) { public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus; this.reviewStatus = reviewStatus;
} }
/** /**
...@@ -642,10 +642,10 @@ public class HGCW010 extends DaoEPBase { ...@@ -642,10 +642,10 @@ public class HGCW010 extends DaoEPBase {
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber)); setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setBillTybe(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_TYBE)), billTybe)); setBillTybe(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_TYBE)), billTybe));
setBillNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_NUMBER)), billNumber)); setBillNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_NUMBER)), billNumber));
setBillState(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState)); setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate)); setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA)); setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus)); setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax)); setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount)); setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setTaxPoints(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints)); setTaxPoints(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
......
package com.baosight.hggp.hg.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.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:HGCW008.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-22 13:50:20 create
*/
public class HGCW010A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 合同号*/
public static final String FIELD_CONTRACT_NAME = "contractName"; /* 合同名称*/
public static final String FIELD_SETTLEMENT_NUMBER = "settlementNumber"; /* 结算编号*/
public static final String FIELD_SETTLEMENT_TYPE = "settlementType"; /* 结算类别;1部分结算2最终结算*/
public static final String FIELD_CONTRACT_DATE = "contractDate"; /* 结算日期*/
public static final String FIELD_TAX_POINTS = "taxPoints"; /* 税点*/
public static final String FIELD_PRICE_TAX_SEPARATION = "priceTaxSeparation"; /* 价税分离;1是2否*/
public static final String FIELD_THIS_SETTLEMENT_AMOUNT = "thisSettlementAmount"; /* 本次结算金额*/
public static final String FIELD_THIS_SETTLEMENT_TAX = "thisSettlementTax"; /* 本次结算税金*/
public static final String FIELD_THIS_PRICE_TAX = "thisPriceTax"; /* 本次结算价税合计金额*/
public static final String FIELD_TOTAL_CONTRACT_PRICE = "totalContractPrice"; /* 合同金额(元)*/
public static final String FIELD_CUMULATIVE_SETTLEMENT_AMOUNT = "cumulativeSettlementAmount"; /* 累计结算金额*/
public static final String FIELD_CUMULATIVE_SETTLEMENT_TAX = "cumulativeSettlementTax"; /* 累计结算税金*/
public static final String FIELD_CUMULATIVE_PRICE_TAX = "cumulativePriceTax"; /* 累计结算价税合计金额*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 累计结算价税合计金额*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审核状态*/
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_DEP_CODE = "depCode"; /* 部门编码*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 合同号*/
public static final String COL_CONTRACT_NAME = "CONTRACT_NAME"; /* 合同名称*/
public static final String COL_SETTLEMENT_NUMBER = "SETTLEMENT_NUMBER"; /* 结算编号*/
public static final String COL_SETTLEMENT_TYPE = "SETTLEMENT_TYPE"; /* 结算类别;1部分结算2最终结算*/
public static final String COL_CONTRACT_DATE = "CONTRACT_DATE"; /* 结算日期*/
public static final String COL_TAX_POINTS = "TAX_POINTS"; /* 税点*/
public static final String COL_PRICE_TAX_SEPARATION = "PRICE_TAX_SEPARATION"; /* 价税分离;1是2否*/
public static final String COL_THIS_SETTLEMENT_AMOUNT = "THIS_SETTLEMENT_AMOUNT"; /* 本次结算金额*/
public static final String COL_THIS_SETTLEMENT_TAX = "THIS_SETTLEMENT_TAX"; /* 本次结算税金*/
public static final String COL_THIS_PRICE_TAX = "THIS_PRICE_TAX"; /* 本次结算价税合计金额*/
public static final String COL_TOTAL_CONTRACT_PRICE = "TOTAL_CONTRACT_PRICE"; /* 合同金额(元)*/
public static final String COL_CUMULATIVE_SETTLEMENT_AMOUNT = "CUMULATIVE_SETTLEMENT_AMOUNT"; /* 累计结算金额*/
public static final String COL_CUMULATIVE_SETTLEMENT_TAX = "CUMULATIVE_SETTLEMENT_TAX"; /* 累计结算税金*/
public static final String COL_CUMULATIVE_PRICE_TAX = "CUMULATIVE_PRICE_TAX"; /* 累计结算价税合计金额*/
public static final String COL_REMAINING_AMOUNT = "REMAINING_AMOUNT"; /* 累计结算价税合计金额*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审核状态*/
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_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String QUERY = "HGCW008.query";
public static final String COUNT = "HGCW008.count";
public static final String INSERT = "HGCW008.insert";
public static final String UPDATE = "HGCW008.update";
public static final String DELETE = "HGCW008.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String contractNumber = " "; /* 合同号*/
private String contractName = " "; /* 合同名称*/
private String settlementNumber = " "; /* 结算编号*/
private Integer settlementType; /* 结算类别;1部分结算2最终结算*/
private String contractDate = " "; /* 结算日期*/
private Integer taxPoints = new Integer(0); /* 税点*/
private Integer priceTaxSeparation = new Integer(0); /* 价税分离;1是2否*/
private BigDecimal thisSettlementAmount = new BigDecimal("0"); /* 本次结算金额*/
private BigDecimal thisSettlementTax = new BigDecimal("0"); /* 本次结算税金*/
private BigDecimal thisPriceTax = new BigDecimal("0"); /* 本次结算价税合计金额*/
private BigDecimal totalContractPrice = new BigDecimal("0"); /* 合同金额(元)*/
private BigDecimal cumulativeSettlementAmount = new BigDecimal("0"); /* 累计结算金额*/
private BigDecimal cumulativeSettlementTax = new BigDecimal("0"); /* 累计结算税金*/
private BigDecimal cumulativePriceTax = new BigDecimal("0"); /* 累计结算价税合计金额*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 累计结算价税合计金额*/
private Integer reviewStatus; /* 审核状态*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_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_CONTRACT_NUMBER);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NAME);
eiColumn.setDescName("合同名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_NUMBER);
eiColumn.setDescName("结算编号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SETTLEMENT_TYPE);
eiColumn.setDescName("结算类别;1部分结算2最终结算");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_DATE);
eiColumn.setDescName("结算日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setDescName("税点");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE_TAX_SEPARATION);
eiColumn.setDescName("价税分离;1是2否");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算税金");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_PRICE_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算价税合计金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("合同金额(元)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算税金");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_PRICE_TAX);
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);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
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_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCW010A() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the 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 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 contractName - 合同名称.
* @return the contractName
*/
public String getContractName() {
return this.contractName;
}
/**
* set the contractName - 合同名称.
*
* @param contractName - 合同名称
*/
public void setContractName(String contractName) {
this.contractName = contractName;
}
/**
* 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 settlementType - 结算类别;1部分结算2最终结算.
* @return the settlementType
*/
public Integer getSettlementType() {
return this.settlementType;
}
/**
* set the settlementType - 结算类别;1部分结算2最终结算.
*
* @param settlementType - 结算类别;1部分结算2最终结算
*/
public void setSettlementType(Integer settlementType) {
this.settlementType = settlementType;
}
/**
* get the contractDate - 结算日期.
* @return the contractDate
*/
public String getContractDate() {
return this.contractDate;
}
/**
* set the contractDate - 结算日期.
*
* @param contractDate - 结算日期
*/
public void setContractDate(String contractDate) {
this.contractDate = contractDate;
}
/**
* 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 priceTaxSeparation - 价税分离;1是2否.
* @return the priceTaxSeparation
*/
public Integer getPriceTaxSeparation() {
return this.priceTaxSeparation;
}
/**
* set the priceTaxSeparation - 价税分离;1是2否.
*
* @param priceTaxSeparation - 价税分离;1是2否
*/
public void setPriceTaxSeparation(Integer priceTaxSeparation) {
this.priceTaxSeparation = priceTaxSeparation;
}
/**
* get the thisSettlementAmount - 本次结算金额.
* @return the thisSettlementAmount
*/
public BigDecimal getThisSettlementAmount() {
return this.thisSettlementAmount;
}
/**
* set the thisSettlementAmount - 本次结算金额.
*
* @param thisSettlementAmount - 本次结算金额
*/
public void setThisSettlementAmount(BigDecimal thisSettlementAmount) {
this.thisSettlementAmount = thisSettlementAmount;
}
/**
* get the thisSettlementTax - 本次结算税金.
* @return the thisSettlementTax
*/
public BigDecimal getThisSettlementTax() {
return this.thisSettlementTax;
}
/**
* set the thisSettlementTax - 本次结算税金.
*
* @param thisSettlementTax - 本次结算税金
*/
public void setThisSettlementTax(BigDecimal thisSettlementTax) {
this.thisSettlementTax = thisSettlementTax;
}
/**
* get the thisPriceTax - 本次结算价税合计金额.
* @return the thisPriceTax
*/
public BigDecimal getThisPriceTax() {
return this.thisPriceTax;
}
/**
* set the thisPriceTax - 本次结算价税合计金额.
*
* @param thisPriceTax - 本次结算价税合计金额
*/
public void setThisPriceTax(BigDecimal thisPriceTax) {
this.thisPriceTax = thisPriceTax;
}
/**
* get the totalContractPrice - 合同金额(元).
* @return the totalContractPrice
*/
public BigDecimal getTotalContractPrice() {
return this.totalContractPrice;
}
/**
* set the totalContractPrice - 合同金额(元).
*
* @param totalContractPrice - 合同金额(元)
*/
public void setTotalContractPrice(BigDecimal totalContractPrice) {
this.totalContractPrice = totalContractPrice;
}
/**
* get the cumulativeSettlementAmount - 累计结算金额.
* @return the cumulativeSettlementAmount
*/
public BigDecimal getCumulativeSettlementAmount() {
return this.cumulativeSettlementAmount;
}
/**
* set the cumulativeSettlementAmount - 累计结算金额.
*
* @param cumulativeSettlementAmount - 累计结算金额
*/
public void setCumulativeSettlementAmount(BigDecimal cumulativeSettlementAmount) {
this.cumulativeSettlementAmount = cumulativeSettlementAmount;
}
/**
* get the cumulativeSettlementTax - 累计结算税金.
* @return the cumulativeSettlementTax
*/
public BigDecimal getCumulativeSettlementTax() {
return this.cumulativeSettlementTax;
}
/**
* set the cumulativeSettlementTax - 累计结算税金.
*
* @param cumulativeSettlementTax - 累计结算税金
*/
public void setCumulativeSettlementTax(BigDecimal cumulativeSettlementTax) {
this.cumulativeSettlementTax = cumulativeSettlementTax;
}
/**
* get the cumulativePriceTax - 累计结算价税合计金额.
* @return the cumulativePriceTax
*/
public BigDecimal getCumulativePriceTax() {
return this.cumulativePriceTax;
}
/**
* set the cumulativePriceTax - 累计结算价税合计金额.
*
* @param cumulativePriceTax - 累计结算价税合计金额
*/
public void setCumulativePriceTax(BigDecimal cumulativePriceTax) {
this.cumulativePriceTax = cumulativePriceTax;
}
/**
* 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 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 depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setSettlementType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SETTLEMENT_TYPE)), settlementType));
setContractDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_DATE)), contractDate));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setPriceTaxSeparation(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRICE_TAX_SEPARATION)), priceTaxSeparation));
setThisSettlementAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setThisSettlementTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisPriceTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_PRICE_TAX)), thisPriceTax));
setTotalContractPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE)), totalContractPrice));
setCumulativeSettlementAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT)), cumulativeSettlementAmount));
setCumulativeSettlementTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_SETTLEMENT_TAX)), cumulativeSettlementTax));
setCumulativePriceTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CUMULATIVE_PRICE_TAX)), cumulativePriceTax));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
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));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_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_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_CONTRACT_NAME, StringUtils.toString(contractName, eiMetadata.getMeta(FIELD_CONTRACT_NAME)));
map.put(FIELD_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
map.put(FIELD_SETTLEMENT_TYPE, StringUtils.toString(settlementType, eiMetadata.getMeta(FIELD_SETTLEMENT_TYPE)));
map.put(FIELD_CONTRACT_DATE, StringUtils.toString(contractDate, eiMetadata.getMeta(FIELD_CONTRACT_DATE)));
map.put(FIELD_TAX_POINTS, StringUtils.toString(taxPoints, eiMetadata.getMeta(FIELD_TAX_POINTS)));
map.put(FIELD_PRICE_TAX_SEPARATION, StringUtils.toString(priceTaxSeparation, eiMetadata.getMeta(FIELD_PRICE_TAX_SEPARATION)));
map.put(FIELD_THIS_SETTLEMENT_AMOUNT, StringUtils.toString(thisSettlementAmount, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_AMOUNT)));
map.put(FIELD_THIS_SETTLEMENT_TAX, StringUtils.toString(thisSettlementTax, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_TAX)));
map.put(FIELD_THIS_PRICE_TAX, StringUtils.toString(thisPriceTax, eiMetadata.getMeta(FIELD_THIS_PRICE_TAX)));
map.put(FIELD_TOTAL_CONTRACT_PRICE, StringUtils.toString(totalContractPrice, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE)));
map.put(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT, StringUtils.toString(cumulativeSettlementAmount, eiMetadata.getMeta(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT)));
map.put(FIELD_CUMULATIVE_SETTLEMENT_TAX, StringUtils.toString(cumulativeSettlementTax, eiMetadata.getMeta(FIELD_CUMULATIVE_SETTLEMENT_TAX)));
map.put(FIELD_CUMULATIVE_PRICE_TAX, StringUtils.toString(cumulativePriceTax, eiMetadata.getMeta(FIELD_CUMULATIVE_PRICE_TAX)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
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_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
return map;
}
}
...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.domain; ...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap; import java.util.HashMap;
...@@ -16,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-05-23 9:08:57 create * @history 2024-05-28 18:02:47 create
*/ */
public class HGCW011 extends DaoEPBase { public class HGCW011 extends DaoEPBase {
...@@ -24,16 +25,19 @@ public class HGCW011 extends DaoEPBase { ...@@ -24,16 +25,19 @@ public class HGCW011 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_MAIN_ID = "mainId"; /* 主表ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/ public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/ public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INCOME_NUMBER = "incomeNumber"; /* 单号*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 付款日期*/ public static final String FIELD_SETTLEMENT_NUMBER = "settlementNumber"; /* 来源单号*/
public static final String FIELD_PARTY_A = "partyA"; /* 供应商名称*/ public static final String FIELD_BILL_NUMBER = "billNumber"; /* 发票号*/
public static final String FIELD_CANCEL_STATUS = "cancelStatus"; /* 核销状态*/ 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_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 付款总额*/ 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_CREATED_BY = "createdBy"; /* 记录创建者*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/ public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/ public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
...@@ -43,16 +47,19 @@ public class HGCW011 extends DaoEPBase { ...@@ -43,16 +47,19 @@ public class HGCW011 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/ public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INCOME_NUMBER = "INCOME_NUMBER"; /* 单号*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编号*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 付款日期*/ public static final String COL_SETTLEMENT_NUMBER = "SETTLEMENT_NUMBER"; /* 来源单号*/
public static final String COL_PARTY_A = "PARTY_A"; /* 供应商名称*/ public static final String COL_BILL_NUMBER = "BILL_NUMBER"; /* 发票号*/
public static final String COL_CANCEL_STATUS = "CANCEL_STATUS"; /* 核销状态*/ 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_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 付款总额*/ 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 COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/ public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/ public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
...@@ -68,16 +75,19 @@ public class HGCW011 extends DaoEPBase { ...@@ -68,16 +75,19 @@ public class HGCW011 extends DaoEPBase {
public static final String DELETE = "HGCW011.delete"; public static final String DELETE = "HGCW011.delete";
private Long id = new Long(0); private Long id = new Long(0);
private Long mainId = new Long(0); /* 主表ID*/
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/ private String companyName = " "; /* 公司名称*/
private String contractNumber = " "; /* 来源单号*/ private String projName = " "; /* 项目名称*/
private String incomeNumber = " "; /* 单号*/ private String projCode = " "; /* 项目编号*/
private String signingDate = " "; /* 付款日期*/ private String settlementNumber = " "; /* 来源单号*/
private String partyA = " "; /* 供应商名称*/ private String billNumber = " "; /* 发票号*/
private Boolean cancelStatus; /* 核销状态*/ private String partyA = " "; /* 客户名称*/
private Boolean reviewStatus; /* 审批状态*/ private String thisSettlementTax = " "; /* 税额*/
private String totalContractPriceIncluding = " "; /* 付款总额*/ private String thisSettlementAmount = " "; /* 不含税金额*/
private Boolean taxPoints; /* 税率*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 开票总额*/
private String createdBy = " "; /* 记录创建者*/ private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/ private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/ private String createdTime = " "; /* 记录创建时间*/
...@@ -97,6 +107,10 @@ public class HGCW011 extends DaoEPBase { ...@@ -97,6 +107,10 @@ public class HGCW011 extends DaoEPBase {
eiColumn.setDescName(" "); eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAIN_ID);
eiColumn.setDescName("主表ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE); eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码"); eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -109,32 +123,43 @@ public class HGCW011 extends DaoEPBase { ...@@ -109,32 +123,43 @@ public class HGCW011 extends DaoEPBase {
eiColumn.setDescName("公司名称"); eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NUMBER); eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("来源单号"); eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INCOME_NUMBER); eiColumn = new EiColumn(FIELD_SETTLEMENT_NUMBER);
eiColumn.setDescName("单号"); eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE); eiColumn = new EiColumn(FIELD_BILL_NUMBER);
eiColumn.setDescName("付款日期"); eiColumn.setDescName("发票号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A); eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("供应商名称"); eiColumn.setDescName("客户名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX);
eiColumn.setDescName("税额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CANCEL_STATUS); eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT);
eiColumn.setDescName("核销状态"); eiColumn.setDescName("不含税金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS); eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setDescName("审批状态"); eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING); eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setDescName("付款总额"); eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("开票总额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
...@@ -192,6 +217,22 @@ public class HGCW011 extends DaoEPBase { ...@@ -192,6 +217,22 @@ public class HGCW011 extends DaoEPBase {
this.id = id; this.id = id;
} }
/** /**
* get the mainId - 主表ID.
* @return the mainId
*/
public Long getMainId() {
return this.mainId;
}
/**
* set the mainId - 主表ID.
*
* @param mainId - 主表ID
*/
public void setMainId(Long mainId) {
this.mainId = mainId;
}
/**
* get the accountCode - 企业编码. * get the accountCode - 企业编码.
* @return the accountCode * @return the accountCode
*/ */
...@@ -240,55 +281,71 @@ public class HGCW011 extends DaoEPBase { ...@@ -240,55 +281,71 @@ public class HGCW011 extends DaoEPBase {
this.companyName = companyName; this.companyName = companyName;
} }
/** /**
* get the contractNumber - 来源单号. * get the projName - 项目名称.
* @return the contractNumber * @return the projName
*/ */
public String getContractNumber() { public String getProjName() {
return this.contractNumber; return this.projName;
} }
/** /**
* set the contractNumber - 来源单号. * set the projName - 项目名称.
* *
* @param contractNumber - 来源单号 * @param projName - 项目名称
*/ */
public void setContractNumber(String contractNumber) { public void setProjName(String projName) {
this.contractNumber = contractNumber; this.projName = projName;
} }
/** /**
* get the incomeNumber - 单号. * get the projCode - 项目编号.
* @return the incomeNumber * @return the projCode
*/ */
public String getIncomeNumber() { public String getProjCode() {
return this.incomeNumber; return this.projCode;
} }
/** /**
* set the incomeNumber - 单号. * set the projCode - 项目编号.
* *
* @param incomeNumber - 单 * @param projCode - 项目编
*/ */
public void setIncomeNumber(String incomeNumber) { public void setProjCode(String projCode) {
this.incomeNumber = incomeNumber; this.projCode = projCode;
} }
/** /**
* get the signingDate - 付款日期. * get the settlementNumber - 来源单号.
* @return the signingDate * @return the settlementNumber
*/ */
public String getSigningDate() { public String getSettlementNumber() {
return this.signingDate; return this.settlementNumber;
} }
/** /**
* set the signingDate - 付款日期. * set the settlementNumber - 来源单号.
* *
* @param signingDate - 付款日期 * @param settlementNumber - 来源单号
*/ */
public void setSigningDate(String signingDate) { public void setSettlementNumber(String settlementNumber) {
this.signingDate = signingDate; this.settlementNumber = settlementNumber;
} }
/** /**
* get the partyA - 供应商名称. * 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 partyA - 客户名称.
* @return the partyA * @return the partyA
*/ */
public String getPartyA() { public String getPartyA() {
...@@ -296,59 +353,75 @@ public class HGCW011 extends DaoEPBase { ...@@ -296,59 +353,75 @@ public class HGCW011 extends DaoEPBase {
} }
/** /**
* set the partyA - 供应商名称. * set the partyA - 客户名称.
* *
* @param partyA - 供应商名称 * @param partyA - 客户名称
*/ */
public void setPartyA(String partyA) { public void setPartyA(String partyA) {
this.partyA = partyA; this.partyA = partyA;
} }
/** /**
* get the cancelStatus - 核销状态. * get the thisSettlementTax - 税额.
* @return the cancelStatus * @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 Boolean getCancelStatus() { public String getThisSettlementAmount() {
return this.cancelStatus; return this.thisSettlementAmount;
} }
/** /**
* set the cancelStatus - 核销状态. * set the thisSettlementAmount - 不含税金额.
* *
* @param cancelStatus - 核销状态 * @param thisSettlementAmount - 不含税金额
*/ */
public void setCancelStatus(Boolean cancelStatus) { public void setThisSettlementAmount(String thisSettlementAmount) {
this.cancelStatus = cancelStatus; this.thisSettlementAmount = thisSettlementAmount;
} }
/** /**
* get the reviewStatus - 审批状态. * get the taxPoints - 税率.
* @return the reviewStatus * @return the taxPoints
*/ */
public Boolean getReviewStatus() { public Boolean getTaxPoints() {
return this.reviewStatus; return this.taxPoints;
} }
/** /**
* set the reviewStatus - 审批状态. * set the taxPoints - 税率.
* *
* @param reviewStatus - 审批状态 * @param taxPoints - 税率
*/ */
public void setReviewStatus(Boolean reviewStatus) { public void setTaxPoints(Boolean taxPoints) {
this.reviewStatus = reviewStatus; this.taxPoints = taxPoints;
} }
/** /**
* get the totalContractPriceIncluding - 付款总额. * get the totalContractPriceIncluding - 开票总额.
* @return the totalContractPriceIncluding * @return the totalContractPriceIncluding
*/ */
public String getTotalContractPriceIncluding() { public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding; return this.totalContractPriceIncluding;
} }
/** /**
* set the totalContractPriceIncluding - 付款总额. * set the totalContractPriceIncluding - 开票总额.
* *
* @param totalContractPriceIncluding - 付款总额 * @param totalContractPriceIncluding - 开票总额
*/ */
public void setTotalContractPriceIncluding(String totalContractPriceIncluding) { public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding; this.totalContractPriceIncluding = totalContractPriceIncluding;
} }
/** /**
...@@ -472,16 +545,19 @@ public class HGCW011 extends DaoEPBase { ...@@ -472,16 +545,19 @@ public class HGCW011 extends DaoEPBase {
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setMainId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAIN_ID)), mainId));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode)); setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName)); setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setIncomeNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INCOME_NUMBER)), incomeNumber)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate)); setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setBillNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BILL_NUMBER)), billNumber));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA)); setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setCancelStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_CANCEL_STATUS)), cancelStatus)); setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus)); setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
setTotalContractPriceIncluding(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding)); setTaxPoints(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
...@@ -499,15 +575,18 @@ public class HGCW011 extends DaoEPBase { ...@@ -499,15 +575,18 @@ public class HGCW011 extends DaoEPBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_MAIN_ID, StringUtils.toString(mainId, eiMetadata.getMeta(FIELD_MAIN_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE))); map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME))); map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_INCOME_NUMBER, StringUtils.toString(incomeNumber, eiMetadata.getMeta(FIELD_INCOME_NUMBER))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE))); map.put(FIELD_SETTLEMENT_NUMBER, StringUtils.toString(settlementNumber, eiMetadata.getMeta(FIELD_SETTLEMENT_NUMBER)));
map.put(FIELD_BILL_NUMBER, StringUtils.toString(billNumber, eiMetadata.getMeta(FIELD_BILL_NUMBER)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A))); 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_THIS_SETTLEMENT_TAX, StringUtils.toString(thisSettlementTax, eiMetadata.getMeta(FIELD_THIS_SETTLEMENT_TAX)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS))); 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_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); 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_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
......
package com.baosight.hggp.hg.cw.domain; package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
...@@ -12,12 +13,13 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -12,12 +13,13 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Project: <br> * Project: <br>
* Title:HGCW012.java <br> * Title:HGCW012.java <br>
* Description: <br> * Description: <br>
* yukang *
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-05-27 16:53:39 create * @history 2024-05-30 14:16:59 create
*/ */
public class HGCW012 extends DaoEPBase { public class HGCW012 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -44,6 +46,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -44,6 +46,7 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -67,6 +70,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -67,6 +70,7 @@ public class HGCW012 extends DaoEPBase {
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称*/ public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMAINING_AMOUNT = "REMAINING_AMOUNT"; /* 剩余开票/收票金额*/
public static final String QUERY = "HGCW012.query"; public static final String QUERY = "HGCW012.query";
public static final String COUNT = "HGCW012.count"; public static final String COUNT = "HGCW012.count";
...@@ -84,7 +88,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -84,7 +88,7 @@ public class HGCW012 extends DaoEPBase {
private Integer billState = new Integer(0); /* 开票状态*/ private Integer billState = new Integer(0); /* 开票状态*/
private String signingDate = " "; /* 开票日期*/ private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 供应商名称*/ private String partyA = " "; /* 供应商名称*/
private Boolean reviewStatus; /* 审批状态*/ private Integer reviewStatus; /* 审批状态*/
private Integer taxPoints = new Integer(0); /* 税率*/ private Integer taxPoints = new Integer(0); /* 税率*/
private String thisSettlementTax = " "; /* 税额*/ private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/ private String thisSettlementAmount = " "; /* 不含税金额*/
...@@ -96,6 +100,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -96,6 +100,7 @@ public class HGCW012 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/ private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/ private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -145,7 +150,6 @@ public class HGCW012 extends DaoEPBase { ...@@ -145,7 +150,6 @@ public class HGCW012 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS); eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("审批状态"); eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -196,6 +200,13 @@ public class HGCW012 extends DaoEPBase { ...@@ -196,6 +200,13 @@ public class HGCW012 extends DaoEPBase {
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn);
} }
...@@ -370,7 +381,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -370,7 +381,7 @@ public class HGCW012 extends DaoEPBase {
* get the reviewStatus - 审批状态. * get the reviewStatus - 审批状态.
* @return the reviewStatus * @return the reviewStatus
*/ */
public Boolean getReviewStatus() { public Integer getReviewStatus() {
return this.reviewStatus; return this.reviewStatus;
} }
...@@ -379,7 +390,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -379,7 +390,7 @@ public class HGCW012 extends DaoEPBase {
* *
* @param reviewStatus - 审批状态 * @param reviewStatus - 审批状态
*/ */
public void setReviewStatus(Boolean reviewStatus) { public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus; this.reviewStatus = reviewStatus;
} }
/** /**
...@@ -559,6 +570,22 @@ public class HGCW012 extends DaoEPBase { ...@@ -559,6 +570,22 @@ public class HGCW012 extends DaoEPBase {
this.depCode = depCode; this.depCode = depCode;
} }
/** /**
* get the remainingAmount - 剩余开票/收票金额.
* @return the remainingAmount
*/
public BigDecimal getRemainingAmount() {
return this.remainingAmount;
}
/**
* set the remainingAmount - 剩余开票/收票金额.
*
* @param remainingAmount - 剩余开票/收票金额
*/
public void setRemainingAmount(BigDecimal remainingAmount) {
this.remainingAmount = remainingAmount;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -576,7 +603,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -576,7 +603,7 @@ public class HGCW012 extends DaoEPBase {
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState)); setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate)); setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA)); setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus)); setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints)); setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax)); setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount)); setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
...@@ -588,6 +615,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -588,6 +615,7 @@ public class HGCW012 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
} }
/** /**
...@@ -619,6 +647,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -619,6 +647,7 @@ public class HGCW012 extends DaoEPBase {
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); 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_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
return map; return map;
} }
......
package com.baosight.hggp.hg.cw.domain; package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
...@@ -16,8 +17,9 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,8 +17,9 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-05-27 16:30:51 create * @history 2024-05-30 14:16:59 create
*/ */
public class HGCW013 extends DaoEPBase { public class HGCW013 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.baosight.hggp.hg.cw.service; package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW010; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
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.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -33,11 +41,11 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -33,11 +41,11 @@ public class ServiceHGCW010 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false); DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -51,7 +59,7 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -51,7 +59,7 @@ public class ServiceHGCW010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -68,7 +76,7 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -68,7 +76,7 @@ public class ServiceHGCW010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "保存",operDesc = "保存") @OperationLogAnnotation(operModul = "收款单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -79,8 +87,12 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -79,8 +87,12 @@ public class ServiceHGCW010 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW010.setCompanyCode(userVO.getUsercode()); HGCW010.setCompanyCode(userVO.getUsercode());
HGCW010.setCompanyName(userVO.getUsername()); HGCW010.setCompanyName(userVO.getUsername());
HGCW010.setRemainingAmount(HGCW010.getTotalContractPriceIncluding()); HGCW010.setBillState(1);
HGCW010.setReviewStatus(0);
HGCW010.setSigningDate(DateUtils.formatShort(HGCW010.getSigningDate()));
// 获取项目名称
HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(HGCW010.getProjCode());
HGCW010.setProjName(HGSC001.getProjName());
if (HGCW010.getId() == null || HGCW010.getId() == 0) { if (HGCW010.getId() == null || HGCW010.getId() == 0) {
this.add(HGCW010); this.add(HGCW010);
} else { } else {
...@@ -117,107 +129,88 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -117,107 +129,88 @@ public class ServiceHGCW010 extends ServiceBase {
} }
/** /**
* 新增操作 * 删除操作
* *
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "新增",operDesc = "新增") @OperationLogAnnotation(operModul = "收款单",operType = "删除",operDesc = "删除")
@Override public EiInfo delete(EiInfo inInfo) {
public EiInfo insert(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW010 HGCW010 = new HGCW010(); DaoUtils.update("HGCW010.delete", resultRows.get(i));
HGCW010.fromMap(resultRows.get(i));
DaoUtils.insert("HGCW010.insert", HGCW010);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo; return inInfo;
} }
/** @OperationLogAnnotation(operModul = "收款单",operType = "插入",operDesc = "生成收款单")
* 修改操作 public EiInfo select(EiInfo inInfo) {
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) {
mainId = queryRows.get(0).get("mainId").toString();
}
//获取相应的数据
List<HGCW011> hgcw011List = HGCWTools.HgCw011.mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hgcw011List)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW010 HGCW010 = new HGCW010(); HGCW010 HGCW010 = new HGCW010();
HGCW010.fromMap(resultRows.get(i)); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
DaoUtils.update("HGCW010.update", HGCW010); HGCW010.setCompanyCode(userVO.getUsercode());
HGCW010.setCompanyName(userVO.getUsername());
HGCW010.setBillState(1);
HGCW010.setReviewStatus(0);
HGCW010.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011List) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
} }
inInfo = this.query(inInfo); HGCW010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
inInfo.setStatus(EiConstant.STATUS_DEFAULT); HGCW010.setPartyA(hgcw011List.get(0).getPartyA());
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) { this.add(HGCW010);
LogUtils.setDetailMsg(inInfo, e, "修改失败"); //生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(HGCW010.getId());
DaoUtils.insert(HGCW011.INSERT, hgcw011);
} }
return inInfo; } else {
// 更新主表
HGCW010 HGCW010 = HGCWTools.HgCw010.getId(mainId);
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011List) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
} }
HGCW010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
/** this.modify(HGCW010);
* 删除操作 // 生成明细表
* for (HGCW011 hgcw011 : hgcw011List) {
* @param inInfo hgcw011.setMainId(HGCW010.getId());
* @return DaoUtils.insert(HGCW011.INSERT, hgcw011);
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW010.delete", resultRows.get(i));
} }
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
} }
return inInfo;
} }
// /** } catch (Exception e) {
// * 上传附件 LogUtils.setMsg(inInfo, e, "生成收款单失败");
// * @param inInfo
// * @return
// */
// @OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件")
// public EiInfo form(EiInfo inInfo) {
// return inInfo;
// }
@OperationLogAnnotation(operModul = "账期维护",operType = "上传附件",operDesc = "上传附件操作")
public EiInfo updateDocId(EiInfo inInfo){
int i = 0;
try {
HGCW010 HGCW010 = new HGCW010();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGCW010.fromMap(map);
DaoUtils.update(HGCW010.UPDATE_DOC_ID, HGCW010);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "修改")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
} }
return inInfo; return inInfo;
} }
} }
......
...@@ -2,22 +2,24 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,22 +2,24 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW010; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW010A;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.*; import java.util.Arrays;
import java.util.List;
import java.util.Map;
/** /**
* @author yukang * @author yukang
...@@ -31,129 +33,38 @@ public class ServiceHGCW010A extends ServiceBase { ...@@ -31,129 +33,38 @@ public class ServiceHGCW010A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata);
inInfo.addBlock("detail1").addBlockMeta(new HGCW010().eiMetadata);
inInfo.addBlock("detail2").addBlockMeta(new HGCW010().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
return inInfo; return inInfo;
} }
/** /**
* 甲方名称查询 * 查询操作
* 合同类别为收入时,乙方为组织机构中的公司,甲方选择客户档案里的客户;数据提交之后需要把客户档案中的客户类别更新为正式客户 *
* 合同类别为支出时,甲方为组织机构中的公司,乙方选择供应商档案里面的供应商 *
* @param inInfo
* @return
*/
public EiInfo partyAQuery(EiInfo inInfo) {
try {
List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory");
if (contractCategory.equals("1")) {
List<HGPZ002> hgpz002List = HGPZTools.HgPz002.list(1);
if (CollectionUtils.isNotEmpty(hgpz002List)) {
hgpz002List.forEach(hgpz002 -> {
UserVO userVO = new UserVO();
userVO.setUsercode(hgpz002.getCustCode());
userVO.setUsername(hgpz002.getCustName());
userVOList.add(userVO);
});
}
} else if (contractCategory.equals("2")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
}
}
}
inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "甲方名称查询失败");
}
return inInfo;
}
/**
* 乙方名称查询
* @param inInfo * @param inInfo
* @return * @return
*/ */
public EiInfo partyBQuery(EiInfo inInfo) { @OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try { try {
List<UserVO> userVOList = new ArrayList<>(); inInfo = super.query(inInfo, HGCW010A.QUERY, new HGCW010A());
String contractCategory = inInfo.getString("contractCategory"); } catch (Exception e) {
if (contractCategory.equals("1")) { LogUtils.setDetailMsg(inInfo, e, "查询失败");
List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
}
}
} else if (contractCategory.equals("2")) {
List<HGPZ003> hgpz003List = HGPZTools.HgPz003.list(4);
if (CollectionUtils.isNotEmpty(hgpz003List)) {
hgpz003List.forEach(hgpz003 -> {
UserVO userVO = new UserVO();
userVO.setUsercode(hgpz003.getSupCode());
userVO.setUsername(hgpz003.getSupName());
userVOList.add(userVO);
});
}
}
inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "乙方名称查询失败");
} }
return inInfo; return inInfo;
} }
public EiInfo queryconteractComboBox(EiInfo inInfo){
Map<String, Object> map = new HashMap<>();
List<String> contractTypArray = new ArrayList<>();
if (StringUtils.isNotEmpty(inInfo.getString("contractNumber"))) {
map.put("contractNumber", inInfo.getString("contractNumber"));
}
if (StringUtils.isNotEmpty(inInfo.getString("settlementNumber"))) {
map.put("settlementNumber", inInfo.getString("settlementNumber"));
}
if (StringUtils.isNotEmpty(inInfo.getString("settlementNumbers"))) {
String[] settlementNumbers = inInfo.getString("settlementNumbers").split(",");
for (String c : settlementNumbers) {
contractTypArray.add(c);
}
map.put("settlementNumbers", contractTypArray);
}
List<HGCW010> HGCW010List = dao.query("HGCW010.queryconteractComboBox", map);
inInfo.addBlock("conteract_combo_box").setRows(HGCW010List);
return inInfo;
}
} }
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW011 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW011().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 = super.query(inInfo, HGCW011.QUERY, new HGCW011());
} 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++) {
HGCW011 HGCW011 = new HGCW011();
HGCW011.fromMap(resultRows.get(i));
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW011.setCompanyCode(userVO.getUsercode());
HGCW011.setCompanyName(userVO.getUsername());
if (HGCW011.getId() == null || HGCW011.getId() == 0) {
this.add(HGCW011);
} else {
this.modify(HGCW011);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param HGCW011
* @return
*/
public void add(HGCW011 HGCW011) {
DaoUtils.insert("HGCW011.insert", HGCW011);
}
/**
* 修改操作
*
* @param HGCW011
* @return
*/
public void modify(HGCW011 HGCW011) {
DaoUtils.update("HGCW011.update", HGCW011);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW011.delete", resultRows.get(i));
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cw.service; package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW012; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.ErrorCodeUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -33,12 +39,12 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -33,12 +39,12 @@ public class ServiceHGCW012 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false); DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -51,11 +57,11 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -51,11 +57,11 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGCW012.QUERY, new HGCW012()); inInfo = super.query(inInfo, HGCW010.QUERY, new HGCW010());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
...@@ -68,23 +74,27 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -68,23 +74,27 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "保存",operDesc = "保存") @OperationLogAnnotation(operModul = "收款单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW012 HGCW012 = new HGCW012(); HGCW010 HGCW010 = new HGCW010();
HGCW012.fromMap(resultRows.get(i)); HGCW010.fromMap(resultRows.get(i));
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW012.setCompanyCode(userVO.getUsercode()); HGCW010.setCompanyCode(userVO.getUsercode());
HGCW012.setCompanyName(userVO.getUsername()); HGCW010.setCompanyName(userVO.getUsername());
HGCW010.setBillState(1);
HGCW010.setReviewStatus(0);
if (HGCW012.getId() == null || HGCW012.getId() == 0) { HGCW010.setSigningDate(DateUtils.formatShort(HGCW010.getSigningDate()));
this.add(HGCW012); // 获取项目名称
HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(HGCW010.getProjCode());
HGCW010.setProjName(HGSC001.getProjName());
if (HGCW010.getId() == null || HGCW010.getId() == 0) {
this.add(HGCW010);
} else { } else {
this.modify(HGCW012); this.modify(HGCW010);
} }
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -99,21 +109,21 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -99,21 +109,21 @@ public class ServiceHGCW012 extends ServiceBase {
/** /**
* 新增操作 * 新增操作
* *
* @param HGCW012 * @param HGCW010
* @return * @return
*/ */
public void add(HGCW012 HGCW012) { public void add(HGCW010 HGCW010) {
DaoUtils.insert("HGCW012.insert", HGCW012); DaoUtils.insert("HGCW010.insert", HGCW010);
} }
/** /**
* 修改操作 * 修改操作
* *
* @param HGCW012 * @param HGCW010
* @return * @return
*/ */
public void modify(HGCW012 HGCW012) { public void modify(HGCW010 HGCW010) {
DaoUtils.update("HGCW012.update", HGCW012); DaoUtils.update("HGCW010.update", HGCW010);
} }
/** /**
...@@ -122,12 +132,12 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -122,12 +132,12 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "删除",operDesc = "删除") @OperationLogAnnotation(operModul = "收款单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW012.delete", resultRows.get(i)); DaoUtils.update("HGCW010.delete", resultRows.get(i));
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -138,6 +148,68 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -138,6 +148,68 @@ public class ServiceHGCW012 extends ServiceBase {
return inInfo; 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<HGCW011> hgcw011List = HGCWTools.HgCw011.mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hgcw011List)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW010 HGCW010 = new HGCW010();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW010.setCompanyCode(userVO.getUsercode());
HGCW010.setCompanyName(userVO.getUsername());
HGCW010.setBillState(1);
HGCW010.setReviewStatus(0);
HGCW010.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011List) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
}
HGCW010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
HGCW010.setPartyA(hgcw011List.get(0).getPartyA());
this.add(HGCW010);
//生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(HGCW010.getId());
DaoUtils.insert(HGCW011.INSERT, hgcw011);
}
} else {
// 更新主表
HGCW010 HGCW010 = HGCWTools.HgCw010.getId(mainId);
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011List) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
}
HGCW010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
this.modify(HGCW010);
// 生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(HGCW010.getId());
DaoUtils.insert(HGCW011.INSERT, hgcw011);
}
}
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败");
}
return inInfo;
}
} }
......
...@@ -294,32 +294,6 @@ ...@@ -294,32 +294,6 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<select id="queryconteractComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
A.COMPANY_NAME as "companyName", <!-- 所属公司 -->
A.PROJ_CODE as "projCode", <!-- 项目编号 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
A.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
A.SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
A.THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税金 -->
A.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 结算金额 -->
A.THIS_PRICE_TAX as "thisPriceTax", <!-- 税价合计 -->
B.CONTRACT_TYPE as "contractType" <!-- 合同类型 -->
FROM ${hggpSchema}.HGCW008 A LEFT JOIN ${hggpSchema}.HGCW002 B
ON A.PROJ_CODE = B.PROJ_CODE
AND A.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND A.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND A.SETTLEMENT_TYPE = 2
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
A.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
ORDER BY A.CONTRACT_NUMBER
</select>
<update id="updateDeductionAmount"> <update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW010 UPDATE ${hggpSchema}.HGCW010
......
<?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-05-22 13:50:20
Version : 1.0
schema : hggp
tableName : HGCW008
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW010A">
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
T1.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
T1.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
T1.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
T1.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
T1.PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
T1.PROJ_NAME like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
T1.CONTRACT_NUMBER like ('%$contractNumber$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
T1.CONTRACT_NAME like ('%$contractName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
T1.SETTLEMENT_NUMBER like ('%$settlementNumber$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementType">
T1.SETTLEMENT_TYPE = #settlementType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
T1.CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDateFrom">
T1.CONTRACT_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDateTo">
T1.CONTRACT_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
T1.TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceTaxSeparation">
T1.PRICE_TAX_SEPARATION = #priceTaxSeparation#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
T1.THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
T1.THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisPriceTax">
T1.THIS_PRICE_TAX = #thisPriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPrice">
T1.TOTAL_CONTRACT_PRICE = #totalContractPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementAmount">
T1.CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementTax">
T1.CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativePriceTax">
T1.CUMULATIVE_PRICE_TAX = #cumulativePriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
T1.REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
T1.CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
T1.CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
T1.CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
T1.UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
T1.UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
T1.UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
T1.DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW008">
SELECT
T1.ID as "id",
T1.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
T1.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
T1.COMPANY_NAME as "companyName", <!-- 公司名称 -->
T1.PROJ_CODE as "projCode", <!-- 项目编码 -->
T1.PROJ_NAME as "projName", <!-- 项目名称 -->
T1.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
T1.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
T1.SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
T1.SETTLEMENT_TYPE as "settlementType", <!-- 结算类别;1部分结算2最终结算 -->
T1.CONTRACT_DATE as "contractDate", <!-- 结算日期 -->
T1.TAX_POINTS as "taxPoints", <!-- 税点 -->
T1.PRICE_TAX_SEPARATION as "priceTaxSeparation", <!-- 价税分离;1是2否 -->
T1.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 本次结算金额 -->
T1.THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 本次结算税金 -->
T1.THIS_PRICE_TAX as "thisPriceTax", <!-- 本次结算价税合计金额 -->
T1.TOTAL_CONTRACT_PRICE as "totalContractPrice", <!-- 合同金额(元) -->
T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount", <!-- 累计结算金额 -->
T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax", <!-- 累计结算税金 -->
T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax", <!-- 累计结算价税合计金额 -->
T1.REMAINING_AMOUNT as "remainingAmount", <!-- 累计结算价税合计金额 -->
T1.REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
T1.CREATED_BY as "createdBy", <!-- 记录创建者 -->
T1.CREATED_NAME as "createdName", <!-- 记录创建名称 -->
T1.CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
T1.UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
T1.UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
T1.UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
T1.DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW008 T1 LEFT JOIN
${hggpSchema}.HGCW002 B
ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.SETTLEMENT_TYPE = 2
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
T1.ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementType">
SETTLEMENT_TYPE = #settlementType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceTaxSeparation">
PRICE_TAX_SEPARATION = #priceTaxSeparation#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisPriceTax">
THIS_PRICE_TAX = #thisPriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPrice">
TOTAL_CONTRACT_PRICE = #totalContractPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementAmount">
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementTax">
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativePriceTax">
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</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="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW008 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
CONTRACT_NUMBER, <!-- 合同号 -->
CONTRACT_NAME, <!-- 合同名称 -->
SETTLEMENT_NUMBER, <!-- 结算编号 -->
SETTLEMENT_TYPE, <!-- 结算类别;1部分结算2最终结算 -->
CONTRACT_DATE, <!-- 结算日期 -->
TAX_POINTS, <!-- 税点 -->
PRICE_TAX_SEPARATION, <!-- 价税分离;1是2否 -->
THIS_SETTLEMENT_AMOUNT, <!-- 本次结算金额 -->
THIS_SETTLEMENT_TAX, <!-- 本次结算税金 -->
THIS_PRICE_TAX, <!-- 本次结算价税合计金额 -->
TOTAL_CONTRACT_PRICE, <!-- 合同金额(元) -->
CUMULATIVE_SETTLEMENT_AMOUNT, <!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX, <!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX, <!-- 累计结算价税合计金额 -->
REMAINING_AMOUNT, <!-- 累计结算价税合计金额 -->
REVIEW_STATUS, <!-- 审核状态 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #settlementNumber#, #settlementType#, #contractDate#, #taxPoints#, #priceTaxSeparation#, #thisSettlementAmount#, #thisSettlementTax#, #thisPriceTax#, #totalContractPrice#, #cumulativeSettlementAmount#, #cumulativeSettlementTax#, #cumulativePriceTax#,#remainingAmount#, #reviewStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW008
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW008 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW008
SET
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 合同号 -->
CONTRACT_NAME = #contractName#, <!-- 合同名称 -->
SETTLEMENT_NUMBER = #settlementNumber#, <!-- 结算编号 -->
SETTLEMENT_TYPE = #settlementType#, <!-- 结算类别;1部分结算2最终结算 -->
CONTRACT_DATE = #contractDate#, <!-- 结算日期 -->
TAX_POINTS = #taxPoints#, <!-- 税点 -->
PRICE_TAX_SEPARATION = #priceTaxSeparation#, <!-- 价税分离;1是2否 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 本次结算金额 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 本次结算税金 -->
THIS_PRICE_TAX = #thisPriceTax#, <!-- 本次结算价税合计金额 -->
TOTAL_CONTRACT_PRICE = #totalContractPrice#, <!-- 合同金额(元) -->
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#, <!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#, <!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#, <!-- 累计结算价税合计金额 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<select id="queryCalculateAmount" resultClass="java.util.HashMap">
SELECT
IFNULL(SUM( CUMULATIVE_SETTLEMENT_AMOUNT ),0) as "sumCumulativeSettlementAmount",
IFNULL(SUM( CUMULATIVE_SETTLEMENT_TAX ),0) as "sumCumulativeSettlementTax"
FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include refid="condition" />
</select>
<update id="submit">
UPDATE ${hggpSchema}.HGCW008
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW008
SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?> <?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 <!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-05-27 16:53:39 Generate time : 2024-05-30 14:16:59
Version : 1.0 Version : 1.0
schema : hggp schema : hggp
tableName : HGCW012 tableName : HGCW012
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
BILL_STATE TINYINT, BILL_STATE TINYINT,
SIGNING_DATE VARCHAR, SIGNING_DATE VARCHAR,
PARTY_A VARCHAR, PARTY_A VARCHAR,
REVIEW_STATUS TINYINT NOT NULL primarykey, REVIEW_STATUS TINYINT,
TAX_POINTS INTEGER, TAX_POINTS INTEGER,
THIS_SETTLEMENT_TAX VARCHAR, THIS_SETTLEMENT_TAX VARCHAR,
THIS_SETTLEMENT_AMOUNT VARCHAR, THIS_SETTLEMENT_AMOUNT VARCHAR,
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
UPDATED_BY VARCHAR NOT NULL, UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL, UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL, UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR DEP_CODE VARCHAR,
REMAINING_AMOUNT DECIMAL
--> -->
<sqlMap namespace="HGCW012"> <sqlMap namespace="HGCW012">
...@@ -96,10 +97,13 @@ ...@@ -96,10 +97,13 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingAmount">
REMAINING_AMOUNT = #remainingAmount#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW012"> resultClass="com.baosight.hggp.hg.cw.service.HGCW012">
SELECT SELECT
ID as "id", ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
...@@ -122,7 +126,8 @@ ...@@ -122,7 +126,8 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 --> UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount" <!-- 剩余开票/收票金额 -->
FROM ${hggpSchema}.HGCW012 WHERE 1=1 FROM ${hggpSchema}.HGCW012 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -130,8 +135,7 @@ ...@@ -130,8 +135,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc, ID asc
REVIEW_STATUS asc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -209,6 +213,9 @@ ...@@ -209,6 +213,9 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode# DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingAmount">
REMAINING_AMOUNT = #remainingAmount#
</isNotEmpty>
--> -->
<insert id="insert"> <insert id="insert">
...@@ -233,15 +240,15 @@ ...@@ -233,15 +240,15 @@
UPDATED_BY, <!-- 记录修改者 --> UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 --> UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMAINING_AMOUNT <!-- 剩余开票/收票金额 -->
) )
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#) VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hggpSchema}.HGCW012 WHERE DELETE FROM ${hggpSchema}.HGCW012 WHERE
ID = #id# AND ID = #id#
REVIEW_STATUS = #reviewStatus#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -256,6 +263,7 @@ ...@@ -256,6 +263,7 @@
BILL_STATE = #billState#, <!-- 开票状态 --> BILL_STATE = #billState#, <!-- 开票状态 -->
SIGNING_DATE = #signingDate#, <!-- 开票日期 --> SIGNING_DATE = #signingDate#, <!-- 开票日期 -->
PARTY_A = #partyA#, <!-- 供应商名称 --> PARTY_A = #partyA#, <!-- 供应商名称 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
TAX_POINTS = #taxPoints#, <!-- 税率 --> TAX_POINTS = #taxPoints#, <!-- 税率 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 税额 --> THIS_SETTLEMENT_TAX = #thisSettlementTax#, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 不含税金额 --> THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#, <!-- 不含税金额 -->
...@@ -266,10 +274,10 @@ ...@@ -266,10 +274,10 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
REMAINING_AMOUNT = #remainingAmount# <!-- 剩余开票/收票金额 -->
WHERE WHERE
ID = #id# AND ID = #id#
REVIEW_STATUS = #reviewStatus#
</update> </update>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?> <?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 <!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-05-27 16:30:51 Generate time : 2024-05-30 14:16:59
Version : 1.0 Version : 1.0
schema : hggp schema : hggp
tableName : HGCW013 tableName : HGCW013
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
UPDATED_TIME VARCHAR NOT NULL, UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR DEP_CODE VARCHAR
--> -->
<sqlMap namespace="HGCW013"> <sqlMap namespace="hgcw013">
<sql id="condition"> <sql id="condition">
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW013"> resultClass="com.baosight.hggp.hg.cw.service.Hgcw013">
SELECT SELECT
ID as "id", ID as "id",
MAIN_ID as "mainId", <!-- 主表ID --> MAIN_ID as "mainId", <!-- 主表ID -->
......
...@@ -301,6 +301,15 @@ public class HGCWTools { ...@@ -301,6 +301,15 @@ public class HGCWTools {
} }
public static class HgCw010 { public static class HgCw010 {
public static HGCW010 getId(String id) {
AssertUtils.isNull(id, "销售票据ID不能为空!");
List<HGCW010> results = DaoBase.getInstance().query(HGCW010.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static void cutAmount(String settlementNumber, BigDecimal cutAmount) { public static void cutAmount(String settlementNumber, BigDecimal cutAmount) {
AssertUtils.isNull(settlementNumber, "来源单号不能为空!"); AssertUtils.isNull(settlementNumber, "来源单号不能为空!");
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) { // if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
...@@ -323,6 +332,27 @@ public class HGCWTools { ...@@ -323,6 +332,27 @@ public class HGCWTools {
} }
} }
public static class HgCw011 {
public static List<HGCW011> mapToList(List<Map> rows, Long mainId) {
List<HGCW011> hgcw011List = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HGCW011 hgcw011 = new HGCW011();
hgcw011.fromMap(row);
String contractNumber = row.get("settlementNumber").toString();
String remainingAmount = row.get("remainingAmount").toString();
hgcw011.setBillNumber(contractNumber);
hgcw011.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
if (mainId != null) {
hgcw011.setMainId(mainId);
}
hgcw011List.add(hgcw011);
});
}
return hgcw011List;
}
}
public static class HgCw012 { public static class HgCw012 {
public static void cutAmount(String settlementNumber, BigDecimal cutAmount) { public static void cutAmount(String settlementNumber, BigDecimal cutAmount) {
......
...@@ -16,7 +16,7 @@ $(function() { ...@@ -16,7 +16,7 @@ $(function() {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">合同详情</a>'; + 'onclick="contractDetailFunc(' + item.id + ')">明细详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>'; + 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template; return template;
...@@ -100,8 +100,8 @@ function windowCallback() { ...@@ -100,8 +100,8 @@ function windowCallback() {
function contractDetailFunc(id) { function contractDetailFunc(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGCW010C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW010", href: "HGCW011?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW011",
title: "<div style='text-align: center;'>合同详情</div>", title: "<div style='text-align: center;'>明细详情</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
callbackName: windowCallback callbackName: windowCallback
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
......
$(function() { $(function() {
// 查询 // 查询
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
query(); query();
}); });
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200], pageSizes: [10,20,30,50,100,200],
},
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">合同详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
loadComplete: function (e) {
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
} }
},
} }
...@@ -55,79 +37,43 @@ $(window).load(function () { ...@@ -55,79 +37,43 @@ $(window).load(function () {
* 查询 * 查询
*/ */
let query = function () { let query = function () {
resultGrid.dataSource.page(2);
}
/**
* 结算单选择
*/
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
} }
function cancelFunc() {
function fileDetailFunc(id) { // 关闭弹窗
JSColorbox.open({ parent.JSColorbox.setValueCallback();
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=KP&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
} }
function submitFunc() { function btnSaveFunc() {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length != 1) { if (rows.length < 1) {
message("请选择一条数据"); message("请选择数据")
return; return;
} }
var flag = true; for (let i = 0; i < rows.length; i++) {
rows.forEach(function (row) { let thisAmount = rows[i]['thisAmount'];
if (row.reviewStatus == "3") { let remainingAmount = rows[i]['remainingAmount'];
message("勾选的数据中有已经提交的合同!"); if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
flag = false; message("勾选的第" + (i + 1) + "行本次开票金额必须是大于0的数字");
return;
} }
}) if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (i + 1) + "行本次开票金额不能大于剩余开票金额");
if (flag) { return;
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW010", "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 { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成销售票据吗? ", {
NotificationUtil(ei, "error"); ok: function () {
JSUtils.submitGridsData("result", "HGCW010", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
// parent.JSColorbox.setValueCallback();
} }
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
} }
}); );
} }
}); });
}
} }
...@@ -6,31 +6,38 @@ ...@@ -6,31 +6,38 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head> <head>
</head> </head>
<EF:EFPage title="结算单"> <EF:EFPage title="结算单选择">
<EF:EFRegion id="detail1" title="结算单明细">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/> <div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<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:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目编号" ename="projCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="结算编号" ename="settlementNumber" 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:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyName" cname="所属公司" width="120" serviceName="HGCW010" methodName="queryconteractComboBox" resultId="conteract_combo_box" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" serviceName="HGCW010" methodName="queryconteractComboBox" resultId="conteract_combo_box" enable="false" readonly="true" align="center" /> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" serviceName="HGCW010" methodName="queryconteractComboBox" resultId="conteract_combo_box" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="合同号" width="120" serviceName="HGCW010" methodName="queryconteractComboBox" resultId="conteract_combo_box" enable="false" readonly="true" align="center" />
<EF:EFColumn ename="contractName" cname="合同名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="true" align="center" required="true"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail2" title="附件信息">
<EF:EFGrid blockId="detail2" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="rowNo" cname="行号" hidden="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:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;"> <div class="row" style="display:flex;justify-content:center;">
......
...@@ -16,7 +16,7 @@ $(function() { ...@@ -16,7 +16,7 @@ $(function() {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">合同详情</a>'; + 'onclick="contractDetailFunc(' + item.id + ')">明细详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>'; + 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template; return template;
...@@ -64,7 +64,7 @@ let query = function () { ...@@ -64,7 +64,7 @@ let query = function () {
*/ */
function addFunc() { function addFunc() {
JSColorbox.open({ JSColorbox.open({
href: "HGCW012A?methodName=initLoad&efParentFormEname=HGCW012", href: "HGCW010A?methodName=initLoad&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>结算单</div>", title: "<div style='text-align: center;'>结算单</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
...@@ -82,7 +82,7 @@ function updateFunc() { ...@@ -82,7 +82,7 @@ function updateFunc() {
return; return;
} }
JSColorbox.open({ JSColorbox.open({
href: "HGCW012B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW012", href: "HGCW010B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>修改合同</div>", title: "<div style='text-align: center;'>修改合同</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
...@@ -100,8 +100,8 @@ function windowCallback() { ...@@ -100,8 +100,8 @@ function windowCallback() {
function contractDetailFunc(id) { function contractDetailFunc(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGCW012C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW012", href: "HGCW011?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW011",
title: "<div style='text-align: center;'>合同详情</div>", title: "<div style='text-align: center;'>明细详情</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
callbackName: windowCallback callbackName: windowCallback
...@@ -110,7 +110,7 @@ function contractDetailFunc(id) { ...@@ -110,7 +110,7 @@ function contractDetailFunc(id) {
function fileDetailFunc(id) { function fileDetailFunc(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=HT&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW012", href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=HT&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>附件清单</div>", title: "<div style='text-align: center;'>附件清单</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
...@@ -136,7 +136,7 @@ function submitFunc() { ...@@ -136,7 +136,7 @@ function submitFunc() {
ok: function () { ok: function () {
var info = new EiInfo(); var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result")); info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW012", "submit", info, { EiCommunicator.send("HGCW010", "submit", info, {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei.getStatus() >= 0) { if (ei.getStatus() >= 0) {
try { try {
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFDateSpan startCname="付款日期(从)" endCname="至" blockId="inqu_status" <EF:EFDateSpan startCname="开票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date" startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="票据类型" ename="billTybe" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="票据类型" ename="billTybe" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="审批状态" ename="inqu_status-0-billState" colWidth="3" filter="contains"> <EF:EFSelect cname="开票状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/> <EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -27,17 +27,22 @@ ...@@ -27,17 +27,22 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billTybe" cname="票据类型" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="billTybe" cname="票据类型" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="signingDate" cname="票日期" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="signingDate" cname="票日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" 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="taxPoints" cname="税率" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billState" cname="开票状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.billState"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true" <EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/> <EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
......
$(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],
}
}
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 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", "HGCW010", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
// parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="结算单选择">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<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:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目编号" ename="projCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="结算编号" ename="settlementNumber" 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:EFColumn ename="projCode" cname="项目编号" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="true" align="center" required="true"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
</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 = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">合同详情</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
],
loadComplete: function (e) {
$("#SELECT_BILL").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
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 addFunc() {
JSColorbox.open({
href: "HGCW012A?methodName=initLoad&efParentFormEname=HGCW012",
title: "<div style='text-align: center;'>结算单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
JSColorbox.open({
href: "HGCW012B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW012",
title: "<div style='text-align: center;'>修改合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function contractDetailFunc(id) {
JSColorbox.open({
href: "HGCW012C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW012",
title: "<div style='text-align: center;'>合同详情</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=HT&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW012",
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) {
if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的合同!");
flag = false;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW012", "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");
}
});
}
});
}
}
<!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: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:EFInput cname="供应商名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="票据类型" ename="billTybe" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="审批状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</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:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billTybe" cname="票据类型" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="signingDate" cname="收票日期" width="120" enable="false" 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" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
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