Commit ae6d0b7d by yukang

付款单

parent cf25a59e
package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HGCW016.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-30 14:11:38 create
*/
public class HGCW016 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_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/
public static final String FIELD_INCOME_NUMBER = "incomeNumber"; /* 单号*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 付款日期*/
public static final String FIELD_PARTY_A = "partyA"; /* 供应商名称*/
public static final String FIELD_CANCEL_STATUS = "cancelStatus"; /* 核销状态*/
public static final String FIELD_REVIEW_STATUS = "reviewStatus"; /* 审批状态*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 付款总额*/
public static final String 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_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/
public static final String COL_INCOME_NUMBER = "INCOME_NUMBER"; /* 单号*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 付款日期*/
public static final String COL_PARTY_A = "PARTY_A"; /* 供应商名称*/
public static final String COL_CANCEL_STATUS = "CANCEL_STATUS"; /* 核销状态*/
public static final String COL_REVIEW_STATUS = "REVIEW_STATUS"; /* 审批状态*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 付款总额*/
public static final String 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 = "HGCW016.query";
public static final String COUNT = "HGCW016.count";
public static final String INSERT = "HGCW016.insert";
public static final String UPDATE = "HGCW016.update";
public static final String DELETE = "HGCW016.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String contractNumber = " "; /* 来源单号*/
private String incomeNumber = " "; /* 单号*/
private String signingDate = " "; /* 付款日期*/
private String partyA = " "; /* 供应商名称*/
private Integer cancelStatus; /* 核销状态*/
private Integer reviewStatus; /* 审批状态*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 付款总额*/
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_CONTRACT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INCOME_NUMBER);
eiColumn.setDescName("单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE);
eiColumn.setDescName("付款日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CANCEL_STATUS);
eiColumn.setDescName("核销状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REVIEW_STATUS);
eiColumn.setDescName("审批状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("付款总额");
eiMetadata.addMeta(eiColumn);
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 HGCW016() {
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 contractNumber - 来源单号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 来源单号.
*
* @param contractNumber - 来源单号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the incomeNumber - 单号.
* @return the incomeNumber
*/
public String getIncomeNumber() {
return this.incomeNumber;
}
/**
* set the incomeNumber - 单号.
*
* @param incomeNumber - 单号
*/
public void setIncomeNumber(String incomeNumber) {
this.incomeNumber = incomeNumber;
}
/**
* get the signingDate - 付款日期.
* @return the signingDate
*/
public String getSigningDate() {
return this.signingDate;
}
/**
* set the signingDate - 付款日期.
*
* @param signingDate - 付款日期
*/
public void setSigningDate(String signingDate) {
this.signingDate = signingDate;
}
/**
* get the partyA - 供应商名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 供应商名称.
*
* @param partyA - 供应商名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the cancelStatus - 核销状态.
* @return the cancelStatus
*/
public Integer getCancelStatus() {
return this.cancelStatus;
}
/**
* set the cancelStatus - 核销状态.
*
* @param cancelStatus - 核销状态
*/
public void setCancelStatus(Integer cancelStatus) {
this.cancelStatus = cancelStatus;
}
/**
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
return this.reviewStatus;
}
/**
* set the reviewStatus - 审批状态.
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
* get the totalContractPriceIncluding - 付款总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 付款总额.
*
* @param totalContractPriceIncluding - 付款总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* get the 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;
}
/**
* 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));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setIncomeNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INCOME_NUMBER)), incomeNumber));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setCancelStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CANCEL_STATUS)), cancelStatus));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
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_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_INCOME_NUMBER, StringUtils.toString(incomeNumber, eiMetadata.getMeta(FIELD_INCOME_NUMBER)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_CANCEL_STATUS, StringUtils.toString(cancelStatus, eiMetadata.getMeta(FIELD_CANCEL_STATUS)));
map.put(FIELD_REVIEW_STATUS, StringUtils.toString(reviewStatus, eiMetadata.getMeta(FIELD_REVIEW_STATUS)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
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;
}
}
package com.baosight.hggp.hg.cw.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:HGCW017.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-30 11:09:41 create
*/
public class HGCW017 extends DaoEPBase {
private static final long serialVersionUID = 1L;
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_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_CONTRACT_NUMBER = "contractNumber"; /* 来源单号*/
public static final String FIELD_PARTY_A = "partyA"; /* 供应商名称*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 收款总额*/
public static final String 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_MAIN_ID = "MAIN_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_CONTRACT_NUMBER = "CONTRACT_NUMBER"; /* 来源单号*/
public static final String COL_PARTY_A = "PARTY_A"; /* 供应商名称*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 收款总额*/
public static final String 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 = "HGCW017.query";
public static final String COUNT = "HGCW017.count";
public static final String INSERT = "HGCW017.insert";
public static final String UPDATE = "HGCW017.update";
public static final String DELETE = "HGCW017.delete";
private Long id = new Long(0);
private Long mainId = new Long(0); /* 主表ID*/
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String contractNumber = " "; /* 来源单号*/
private String partyA = " "; /* 供应商名称*/
private BigDecimal totalContractPriceIncluding = new BigDecimal("0"); /* 收款总额*/
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_MAIN_ID);
eiColumn.setDescName("主表ID");
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_CONTRACT_NUMBER);
eiColumn.setDescName("来源单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("收款总额");
eiMetadata.addMeta(eiColumn);
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 HGCW017() {
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 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 - 企业编码.
* @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 contractNumber - 来源单号.
* @return the contractNumber
*/
public String getContractNumber() {
return this.contractNumber;
}
/**
* set the contractNumber - 来源单号.
*
* @param contractNumber - 来源单号
*/
public void setContractNumber(String contractNumber) {
this.contractNumber = contractNumber;
}
/**
* get the partyA - 供应商名称.
* @return the partyA
*/
public String getPartyA() {
return this.partyA;
}
/**
* set the partyA - 供应商名称.
*
* @param partyA - 供应商名称
*/
public void setPartyA(String partyA) {
this.partyA = partyA;
}
/**
* get the totalContractPriceIncluding - 收款总额.
* @return the totalContractPriceIncluding
*/
public BigDecimal getTotalContractPriceIncluding() {
return this.totalContractPriceIncluding;
}
/**
* set the totalContractPriceIncluding - 收款总额.
*
* @param totalContractPriceIncluding - 收款总额
*/
public void setTotalContractPriceIncluding(BigDecimal totalContractPriceIncluding) {
this.totalContractPriceIncluding = totalContractPriceIncluding;
}
/**
* get the 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;
}
/**
* 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));
setMainId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAIN_ID)), mainId));
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));
setContractNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NUMBER)), contractNumber));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
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_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_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_CONTRACT_NUMBER, StringUtils.toString(contractNumber, eiMetadata.getMeta(FIELD_CONTRACT_NUMBER)));
map.put(FIELD_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
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;
}
}
......@@ -47,7 +47,7 @@ public class ServiceHGCW014 extends ServiceBase {
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW014().eiMetadata);
} catch (PlatException e) {
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
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.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW016;
import com.baosight.hggp.hg.cw.domain.HGCW015;
import com.baosight.hggp.hg.cw.domain.HGCW017;
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.DateUtils;
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 com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW016 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "收款单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW016().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, HGCW016.QUERY, new HGCW016());
} 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++) {
HGCW016 HGCW016 = new HGCW016();
HGCW016.fromMap(resultRows.get(i));
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW016.setCompanyCode(userVO.getUsercode());
HGCW016.setCompanyName(userVO.getUsername());
HGCW016.setCancelStatus(1);
HGCW016.setReviewStatus(0);
HGCW016.setIncomeNumber(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_COLLECTION_NO));
HGCW016.setSigningDate(DateUtils.formatShort(HGCW016.getSigningDate()));
if (HGCW016.getId() == null || HGCW016.getId() == 0) {
this.add(HGCW016);
} else {
this.modify(HGCW016);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param HGCW016
* @return
*/
public void add(HGCW016 HGCW016) {
DaoUtils.insert("HGCW016.insert", HGCW016);
}
/**
* 修改操作
*
* @param HGCW016
* @return
*/
public void modify(HGCW016 HGCW016) {
DaoUtils.update("HGCW016.update", HGCW016);
}
/**
* 删除操作
*
* @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++) {
HGCW016 HGCW016 = new HGCW016();
HGCW016.fromMap(resultRows.get(i));
List<HGCW015> hgcw015List = HGCWTools.HgCw015.getMainId(HGCW016.getId());
if (CollectionUtils.isNotEmpty(hgcw015List)) {
for (HGCW015 hgcw015 : hgcw015List) {
HGCWTools.HgCw010.cutAmount(hgcw015.getContractNumber(),
hgcw015.getTotalContractPriceIncluding().multiply(new BigDecimal(-1)));
DaoUtils.update("HGCW015.delete", hgcw015);
}
}
DaoUtils.update("HGCW016.delete", HGCW016);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "收款单",operType = "插入",operDesc = "生成收款单")
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) {
mainId = queryRows.get(0).get("mainId").toString();
}
//获取相应的数据
List<HGCW017> hgcw017List = HGCWTools.HgCw017.mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hgcw017List)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW016 HGCW016 = new HGCW016();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW016.setCompanyCode(userVO.getUsercode());
HGCW016.setCompanyName(userVO.getUsername());
HGCW016.setCancelStatus(1);
HGCW016.setReviewStatus(0);
HGCW016.setIncomeNumber(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_COLLECTION_NO));
HGCW016.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
Map<String, BigDecimal> rowMap = new HashMap<>();
for (HGCW017 hgcw017 : hgcw017List) {
contractNumber.append(hgcw017.getContractNumber()).append(",");
}
for (Map m : resultRows) {
String c = m.get("settlementNumber").toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}
HGCW016.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
HGCW016.setPartyA(hgcw017List.get(0).getPartyA());
HGCW016.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.add(HGCW016);
//生成明细表
for (HGCW017 hgcw017 : hgcw017List) {
hgcw017.setMainId(HGCW016.getId());
// 反写金额
HGCWTools.HgCw010.cutAmount(hgcw017.getContractNumber(),rowMap.get(hgcw017.getContractNumber()));
DaoUtils.insert(HGCW015.INSERT, hgcw017);
}
} else {
HGCW016 HGCW016 = HGCWTools.HgCw016.getId(mainId);
Map<String, BigDecimal> rowMap = new HashMap<>();
for (Map m : resultRows) {
String c = m.get("settlementNumber").toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
}
// 生成明细表
for (HGCW017 hgcw017 : hgcw017List) {
hgcw017.setMainId(HGCW016.getId());
// 反写金额
HGCWTools.HgCw012.cutAmount(hgcw017.getContractNumber(),rowMap.get(hgcw017.getContractNumber()));
this.addHGCW017(hgcw017);
}
List<HGCW017> hgcw017s = HGCWTools.HgCw017.getMainId(HGCW016.getId());
if (CollectionUtils.isNotEmpty(hgcw017s)) {
// 更新主表
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW017 hgcw017 : hgcw017s) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw017.getTotalContractPriceIncluding());
contractNumber.append(hgcw017.getContractNumber()).append(",");
}
HGCW016.setTotalContractPriceIncluding(totalContractPriceIncluding);
HGCW016.setPartyA(hgcw017s.get(0).getPartyA());
HGCW016.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
this.modify(HGCW016);
}
}
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败");
}
return inInfo;
}
public void addHGCW017(HGCW017 HGCW017) {
DaoUtils.insert("HGCW017.insert", HGCW017);
}
/**
* 提交操作
* @param inInfo
* @return
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW016 HGCW016 = new HGCW016();
HGCW016.fromMap(resultRows.get(i));
HGCW016.setReviewStatus(3);
DaoUtils.update("HGCW016.submit", HGCW016);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
public EiInfo writeoff(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW016 HGCW016 = new HGCW016();
HGCW016.fromMap(resultRows.get(i));
HGCW016.setCancelStatus(2);
DaoUtils.update("HGCW016.writeoff", HGCW016);
}
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;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW012;
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;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW016A extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012().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, HGCW012.QUERY, new HGCW012());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
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.hg.cw.domain.HGCW017;
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;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW016B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().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, HGCW017.QUERY, new HGCW017());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
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.hg.cw.domain.HGCW015;
import com.baosight.hggp.hg.cw.domain.HGCW017;
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;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW016C extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW017().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, HGCW017.QUERY, new HGCW017());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-30 11:09:35
Version : 1.0
schema : hggp
tableName : HGCW016
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
INCOME_NUMBER VARCHAR,
SIGNING_DATE VARCHAR,
PARTY_A VARCHAR,
CANCEL_STATUS TINYINT,
REVIEW_STATUS TINYINT,
TOTAL_CONTRACT_PRICE_INCLUDING VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW016">
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW016">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
INCOME_NUMBER as "incomeNumber", <!-- 单号 -->
SIGNING_DATE as "signingDate", <!-- 付款日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
CANCEL_STATUS as "cancelStatus", <!-- 核销状态 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 付款总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW016 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW016 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="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="incomeNumber">
INCOME_NUMBER = #incomeNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cancelStatus">
CANCEL_STATUS = #cancelStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<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}.HGCW016 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
INCOME_NUMBER, <!-- 单号 -->
SIGNING_DATE, <!-- 付款日期 -->
PARTY_A, <!-- 供应商名称 -->
CANCEL_STATUS, <!-- 核销状态 -->
REVIEW_STATUS, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 付款总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #incomeNumber#, #signingDate#, #partyA#, #cancelStatus#, #reviewStatus#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW016
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW016 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW016
SET
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
INCOME_NUMBER = #incomeNumber#, <!-- 单号 -->
SIGNING_DATE = #signingDate#, <!-- 付款日期 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
CANCEL_STATUS = #cancelStatus#, <!-- 核销状态 -->
REVIEW_STATUS = #reviewStatus#, <!-- 审批状态 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 付款总额 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hggpSchema}.HGCW016
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<update id="writeoff">
UPDATE ${hggpSchema}.HGCW016
SET
CANCEL_STATUS = #cancelStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-05-30 11:09:41
Version : 1.0
schema : hggp
tableName : HGCW017
ID BIGINT NOT NULL primarykey,
MAIN_ID BIGINT NOT NULL,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
PARTY_A VARCHAR,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL,
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="HGCW017">
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainId">
MAIN_ID = #mainId#
</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="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW017">
SELECT
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 来源单号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 收款总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainId">
MAIN_ID = #mainId#
</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="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<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}.HGCW017 (
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 来源单号 -->
PARTY_A, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 收款总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#mainId#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #partyA#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW017 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW017
SET
MAIN_ID = #mainId#, <!-- 主表ID -->
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 来源单号 -->
PARTY_A = #partyA#, <!-- 供应商名称 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 收款总额 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -323,6 +323,31 @@ public class HGCWTools {
}
}
public static class HgCw012 {
public static void cutAmount(String settlementNumber, BigDecimal cutAmount) {
AssertUtils.isNull(settlementNumber, "来源单号不能为空!");
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// }
List<HGCW012> results = DaoBase.getInstance().query(HGCW012.QUERY,new HashMap<String,Object>(){
{put("settlementNumber",settlementNumber);}
});
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("找不到对应的采购收票记录!");
}
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW012 HGCW012 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(HGCW012.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
throw new PlatException("扣款金额不能大于采购收票剩余金额!");
}
HGCW012.setRemainingAmount(remainingAmount);
DaoUtils.update("HGCW010.updateDeductionAmount", HGCW012);
}
}
public static class HgCw014 {
public static HGCW014 getId(String id) {
......@@ -392,6 +417,74 @@ public class HGCWTools {
}
}
public static class HgCw016 {
public static HGCW016 getId(String id) {
AssertUtils.isNull(id, "付款单ID不能为空!");
List<HGCW016> results = DaoBase.getInstance().query(HGCW016.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static void updateAmount(Long id) {
AssertUtils.isNull(id, "收款单ID不能为空!");
HGCW016 hgcw016 = HGCWTools.HgCw016.getId(id.toString());
List<HGCW017> hgcw017s = HGCWTools.HgCw017.getMainId(hgcw016.getId());
if (CollectionUtils.isNotEmpty(hgcw017s)) {
// 更新主表
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer();
for (HGCW017 hgcw017 : hgcw017s) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw017.getTotalContractPriceIncluding());
contractNumber.append(hgcw017.getContractNumber()).append(",");
}
hgcw016.setTotalContractPriceIncluding(totalContractPriceIncluding);
hgcw016.setPartyA(hgcw017s.get(0).getPartyA());
hgcw016.setContractNumber(contractNumber.toString().substring(0, contractNumber.length() - 1));
DaoUtils.update("HGCW016.update", hgcw016);
}
}
}
public static class HgCw017 {
public static HGCW017 getId(Long id) {
AssertUtils.isNull(id, "付款单ID不能为空!");
List<HGCW017> results = DaoBase.getInstance().query(HGCW017.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static List<HGCW017> mapToList(List<Map> rows, Long mainId) {
List<HGCW017> hgcw017List = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HGCW017 hgcw017 = new HGCW017();
hgcw017.fromMap(row);
String contractNumber = row.get("settlementNumber").toString();
String remainingAmount = row.get("thisAmount").toString();
hgcw017.setContractNumber(contractNumber);
hgcw017.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
if (mainId != null) {
hgcw017.setMainId(mainId);
}
hgcw017List.add(hgcw017);
});
}
return hgcw017List;
}
public static List<HGCW017> getMainId(Long mainId) {
AssertUtils.isNull(mainId, "主表ID不能为空!");
List<HGCW017> results = DaoBase.getInstance().query(HGCW017.QUERY,new HashMap<String,Object>(){
{put("mainId",mainId);}
});
return results;
}
}
public static class HgCw999 {
public static void batchUpdate(List<Map> rows, Long id) {
......
......@@ -28,8 +28,8 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="partyA" cname="客户名称" width="120" align="left" defaultValue=""
filter="contains" readonly="true">
<EF:EFOptions blockId="sup_record_block_id"
valueField="valueField" textField="textField"/>
<EF:EFOptions blockId="customer_record_block_id"
valueField="textField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" cname="项目名称" width="120" align="left" defaultValue=""
filter="contains" readonly="true">
......
$(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>';
return template;
}
}
],
loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc);
$("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc);
$("#BTN_WRITEOFF").on("click",writeoffFunc);
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveResult1Func();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
}
$("#result-0-projCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-projCode"));
$("#result-0-projName").val(textField);
})
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 choiceFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length == 1 || rows.length == 0) {
var mainId = "";
if (rows.length == 1) {
mainId = rows[0].id;
}
JSColorbox.open({
href: "HGCW014A?methodName=initLoad&inqu_status-0-hiddenConditions=1" +
"&inqu_status-0-billState=2" +
"&inqu_status-0-reviewStatus=3" +
"&inqu_status-0-mainId=" + mainId +
"&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>销售开票</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
} else {
message("请选择一条数据或不选择数据");
return;
}
}
/**
* 修改
*/
function updateFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].cancelStatus == "2") {
message("已经核销的单据不能修改");
return;
}
JSColorbox.open({
href: "HGCW014B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>收款清单</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function saveResult1Func() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请至少选择一条数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW014", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function windowCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function submitFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!");
flag = false;
return;
}
if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的单据!");
flag = false;
return;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"提交\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW014", "submit", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function writeoffFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
var flag = true;
rows.forEach(function (row) {
if (row.cancelStatus == "2") {
message("勾选的数据中有已经核销的单据!");
flag = false;
return;
}
})
if (flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"核销\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW014", "writeoff", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let cancelStatus= item.get("cancelStatus");
if(cancelStatus === "2"){
message("选中的第"+(index+1)+"行记录为核销状态,不能删除!");
flag = false;
return;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW014", "delete", true);
}
});
}
}
function contractDetailFunc(id) {
JSColorbox.open({
href: "HGCW014C?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW002",
title: "<div style='text-align: center;'>合同详情</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
<!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:EFSelect cname="核销状态" ename="inqu_status-0-cancelStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" width="120" align="left" defaultValue=""
filter="contains" readonly="true">
<EF:EFOptions blockId="sup_record_block_id"
valueField="textField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="付款日期" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="incomeNumber" cname="付款单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="付款总额" width="120" format="{0:N3}" readonly="true" align="center"/>
<EF:EFComboColumn ename="cancelStatus" cname="核销状态" width="100" align="center" readonly="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.cancelStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center" readonly="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>
$(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", "HGCW014", "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="partyA" blockId="inqu_status" row="0" type="hidden"/>
<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="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="thisAmount" cname="本次收款金额" width="120" align="center"/>
<EF:EFColumn ename="remainingAmount" 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="projCode" cname="项目编码" hidden="true"/>
<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:EFComboColumn ename="billTybe" cname="票据类型" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFComboColumn>
<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: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],
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW015", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW015", "delete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="收款清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projName" 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="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW015", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCW015", "delete", true);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="收款清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projName" 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="contractNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="center" enable="false" readonly="true"/>
</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