Commit 3f860ffa by yukang

租赁合同管理

parent 3125b7e4
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:HGCW006.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-21 14:06:39 create
*/
public class HGCW006 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_PARTY_A = "partyA"; /* 甲方名称*/
public static final String FIELD_PARTY_B = "partyB"; /* 乙方名称*/
public static final String FIELD_SIGNING_DATE = "signingDate"; /* 签约日期*/
public static final String FIELD_TOTAL_QUANTITY = "totalQuantity"; /* 总数量*/
public static final String FIELD_PARTY_A_NAME = "partyAName"; /* 甲方联系人姓名*/
public static final String FIELD_PARTY_A_PHONE_NUMBER = "partyAPhoneNumber"; /* 甲方联系人电话*/
public static final String FIELD_ALREADY_NAME = "alreadyName"; /* 已方联系人姓名*/
public static final String FIELD_ALREADY_PHONE_NUMBER = "alreadyPhoneNumber"; /* 已方联系人电话*/
public static final String FIELD_CONTRACT_STATUS = "contractStatus"; /* 合同状态;1草签2签约*/
public static final String FIELD_LEASE_START_DATE = "leaseStartDate"; /* 租赁开始日期*/
public static final String FIELD_LEASE_END_DATE = "leaseEndDate"; /* 租赁结束日期*/
public static final String FIELD_PAYMENT_METHOD = "paymentMethod"; /* 付款方式;1一次性付款2分期付款*/
public static final String FIELD_PRICING_METHOD = "pricingMethod"; /* 计价方式;1固定单价合同2固定总价合同*/
public static final String FIELD_TAX_POINTS = "taxPoints"; /* 税点*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING = "totalContractPriceExcluding"; /* 合同总价(不含税)*/
public static final String FIELD_VALUE_ADDED_TAX = "valueAddedTax"; /* 增值税*/
public static final String FIELD_TOTAL_CONTRACT_PRICE_INCLUDING = "totalContractPriceIncluding"; /* 合同总价(含税)*/
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_PARTY_A = "PARTY_A"; /* 甲方名称*/
public static final String COL_PARTY_B = "PARTY_B"; /* 乙方名称*/
public static final String COL_SIGNING_DATE = "SIGNING_DATE"; /* 签约日期*/
public static final String COL_TOTAL_QUANTITY = "TOTAL_QUANTITY"; /* 总数量*/
public static final String COL_PARTY_A_NAME = "PARTY_A_NAME"; /* 甲方联系人姓名*/
public static final String COL_PARTY_A_PHONE_NUMBER = "PARTY_A_PHONE_NUMBER"; /* 甲方联系人电话*/
public static final String COL_ALREADY_NAME = "ALREADY_NAME"; /* 已方联系人姓名*/
public static final String COL_ALREADY_PHONE_NUMBER = "ALREADY_PHONE_NUMBER"; /* 已方联系人电话*/
public static final String COL_CONTRACT_STATUS = "CONTRACT_STATUS"; /* 合同状态;1草签2签约*/
public static final String COL_LEASE_START_DATE = "LEASE_START_DATE"; /* 租赁开始日期*/
public static final String COL_LEASE_END_DATE = "LEASE_END_DATE"; /* 租赁结束日期*/
public static final String COL_PAYMENT_METHOD = "PAYMENT_METHOD"; /* 付款方式;1一次性付款2分期付款*/
public static final String COL_PRICING_METHOD = "PRICING_METHOD"; /* 计价方式;1固定单价合同2固定总价合同*/
public static final String COL_TAX_POINTS = "TAX_POINTS"; /* 税点*/
public static final String COL_TOTAL_CONTRACT_PRICE_EXCLUDING = "TOTAL_CONTRACT_PRICE_EXCLUDING"; /* 合同总价(不含税)*/
public static final String COL_VALUE_ADDED_TAX = "VALUE_ADDED_TAX"; /* 增值税*/
public static final String COL_TOTAL_CONTRACT_PRICE_INCLUDING = "TOTAL_CONTRACT_PRICE_INCLUDING"; /* 合同总价(含税)*/
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 = "HGCW006.query";
public static final String COUNT = "HGCW006.count";
public static final String INSERT = "HGCW006.insert";
public static final String UPDATE = "HGCW006.update";
public static final String DELETE = "HGCW006.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 partyA = " "; /* 甲方名称*/
private String partyB = " "; /* 乙方名称*/
private String signingDate = " "; /* 签约日期*/
private BigDecimal totalQuantity = new BigDecimal("0"); /* 总数量*/
private String partyAName = " "; /* 甲方联系人姓名*/
private String partyAPhoneNumber = " "; /* 甲方联系人电话*/
private String alreadyName = " "; /* 已方联系人姓名*/
private String alreadyPhoneNumber = " "; /* 已方联系人电话*/
private Integer contractStatus; /* 合同状态;1草签2签约*/
private String leaseStartDate = " "; /* 租赁开始日期*/
private String leaseEndDate = " "; /* 租赁结束日期*/
private Integer paymentMethod; /* 付款方式;1一次性付款2分期付款*/
private Integer pricingMethod; /* 计价方式;1固定单价合同2固定总价合同*/
private Integer taxPoints = new Integer(0); /* 税点*/
private BigDecimal totalContractPriceExcluding = new BigDecimal("0"); /* 合同总价(不含税)*/
private BigDecimal valueAddedTax = new BigDecimal("0"); /* 增值税*/
private BigDecimal totalContractPriceIncluding = 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_PARTY_A);
eiColumn.setDescName("甲方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_B);
eiColumn.setDescName("乙方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SIGNING_DATE);
eiColumn.setDescName("签约日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("总数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A_NAME);
eiColumn.setDescName("甲方联系人姓名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARTY_A_PHONE_NUMBER);
eiColumn.setDescName("甲方联系人电话");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ALREADY_NAME);
eiColumn.setDescName("已方联系人姓名");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ALREADY_PHONE_NUMBER);
eiColumn.setDescName("已方联系人电话");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_STATUS);
eiColumn.setDescName("合同状态;1草签2签约");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LEASE_START_DATE);
eiColumn.setDescName("租赁开始日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LEASE_END_DATE);
eiColumn.setDescName("租赁结束日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PAYMENT_METHOD);
eiColumn.setDescName("付款方式;1一次性付款2分期付款");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICING_METHOD);
eiColumn.setDescName("计价方式;1固定单价合同2固定总价合同");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_POINTS);
eiColumn.setDescName("税点");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("合同总价(不含税)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_VALUE_ADDED_TAX);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
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_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 HGCW006() {
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 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 partyB - 乙方名称.
* @return the partyB
*/
public String getPartyB() {
return this.partyB;
}
/**
* set the partyB - 乙方名称.
*
* @param partyB - 乙方名称
*/
public void setPartyB(String partyB) {
this.partyB = partyB;
}
/**
* 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 totalQuantity - 总数量.
* @return the totalQuantity
*/
public BigDecimal getTotalQuantity() {
return this.totalQuantity;
}
/**
* set the totalQuantity - 总数量.
*
* @param totalQuantity - 总数量
*/
public void setTotalQuantity(BigDecimal totalQuantity) {
this.totalQuantity = totalQuantity;
}
/**
* get the partyAName - 甲方联系人姓名.
* @return the partyAName
*/
public String getPartyAName() {
return this.partyAName;
}
/**
* set the partyAName - 甲方联系人姓名.
*
* @param partyAName - 甲方联系人姓名
*/
public void setPartyAName(String partyAName) {
this.partyAName = partyAName;
}
/**
* get the partyAPhoneNumber - 甲方联系人电话.
* @return the partyAPhoneNumber
*/
public String getPartyAPhoneNumber() {
return this.partyAPhoneNumber;
}
/**
* set the partyAPhoneNumber - 甲方联系人电话.
*
* @param partyAPhoneNumber - 甲方联系人电话
*/
public void setPartyAPhoneNumber(String partyAPhoneNumber) {
this.partyAPhoneNumber = partyAPhoneNumber;
}
/**
* get the alreadyName - 已方联系人姓名.
* @return the alreadyName
*/
public String getAlreadyName() {
return this.alreadyName;
}
/**
* set the alreadyName - 已方联系人姓名.
*
* @param alreadyName - 已方联系人姓名
*/
public void setAlreadyName(String alreadyName) {
this.alreadyName = alreadyName;
}
/**
* get the alreadyPhoneNumber - 已方联系人电话.
* @return the alreadyPhoneNumber
*/
public String getAlreadyPhoneNumber() {
return this.alreadyPhoneNumber;
}
/**
* set the alreadyPhoneNumber - 已方联系人电话.
*
* @param alreadyPhoneNumber - 已方联系人电话
*/
public void setAlreadyPhoneNumber(String alreadyPhoneNumber) {
this.alreadyPhoneNumber = alreadyPhoneNumber;
}
/**
* get the contractStatus - 合同状态;1草签2签约.
* @return the contractStatus
*/
public Integer getContractStatus() {
return this.contractStatus;
}
/**
* set the contractStatus - 合同状态;1草签2签约.
*
* @param contractStatus - 合同状态;1草签2签约
*/
public void setContractStatus(Integer contractStatus) {
this.contractStatus = contractStatus;
}
/**
* get the leaseStartDate - 租赁开始日期.
* @return the leaseStartDate
*/
public String getLeaseStartDate() {
return this.leaseStartDate;
}
/**
* set the leaseStartDate - 租赁开始日期.
*
* @param leaseStartDate - 租赁开始日期
*/
public void setLeaseStartDate(String leaseStartDate) {
this.leaseStartDate = leaseStartDate;
}
/**
* get the leaseEndDate - 租赁结束日期.
* @return the leaseEndDate
*/
public String getLeaseEndDate() {
return this.leaseEndDate;
}
/**
* set the leaseEndDate - 租赁结束日期.
*
* @param leaseEndDate - 租赁结束日期
*/
public void setLeaseEndDate(String leaseEndDate) {
this.leaseEndDate = leaseEndDate;
}
/**
* get the paymentMethod - 付款方式;1一次性付款2分期付款.
* @return the paymentMethod
*/
public Integer getPaymentMethod() {
return this.paymentMethod;
}
/**
* set the paymentMethod - 付款方式;1一次性付款2分期付款.
*
* @param paymentMethod - 付款方式;1一次性付款2分期付款
*/
public void setPaymentMethod(Integer paymentMethod) {
this.paymentMethod = paymentMethod;
}
/**
* get the pricingMethod - 计价方式;1固定单价合同2固定总价合同.
* @return the pricingMethod
*/
public Integer getPricingMethod() {
return this.pricingMethod;
}
/**
* set the pricingMethod - 计价方式;1固定单价合同2固定总价合同.
*
* @param pricingMethod - 计价方式;1固定单价合同2固定总价合同
*/
public void setPricingMethod(Integer pricingMethod) {
this.pricingMethod = pricingMethod;
}
/**
* 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 totalContractPriceExcluding - 合同总价(不含税).
* @return the totalContractPriceExcluding
*/
public BigDecimal getTotalContractPriceExcluding() {
return this.totalContractPriceExcluding;
}
/**
* set the totalContractPriceExcluding - 合同总价(不含税).
*
* @param totalContractPriceExcluding - 合同总价(不含税)
*/
public void setTotalContractPriceExcluding(BigDecimal totalContractPriceExcluding) {
this.totalContractPriceExcluding = totalContractPriceExcluding;
}
/**
* get the valueAddedTax - 增值税.
* @return the valueAddedTax
*/
public BigDecimal getValueAddedTax() {
return this.valueAddedTax;
}
/**
* set the valueAddedTax - 增值税.
*
* @param valueAddedTax - 增值税
*/
public void setValueAddedTax(BigDecimal valueAddedTax) {
this.valueAddedTax = valueAddedTax;
}
/**
* 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 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;
}
/**
* 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));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setPartyB(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_B)), partyB));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setTotalQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_QUANTITY)), totalQuantity));
setPartyAName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A_NAME)), partyAName));
setPartyAPhoneNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A_PHONE_NUMBER)), partyAPhoneNumber));
setAlreadyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ALREADY_NAME)), alreadyName));
setAlreadyPhoneNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ALREADY_PHONE_NUMBER)), alreadyPhoneNumber));
setContractStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_STATUS)), contractStatus));
setLeaseStartDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEASE_START_DATE)), leaseStartDate));
setLeaseEndDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_LEASE_END_DATE)), leaseEndDate));
setPaymentMethod(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PAYMENT_METHOD)), paymentMethod));
setPricingMethod(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRICING_METHOD)), pricingMethod));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setTotalContractPriceExcluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING)), totalContractPriceExcluding));
setValueAddedTax(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_VALUE_ADDED_TAX)), valueAddedTax));
setTotalContractPriceIncluding(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)), totalContractPriceIncluding));
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_PARTY_A, StringUtils.toString(partyA, eiMetadata.getMeta(FIELD_PARTY_A)));
map.put(FIELD_PARTY_B, StringUtils.toString(partyB, eiMetadata.getMeta(FIELD_PARTY_B)));
map.put(FIELD_SIGNING_DATE, StringUtils.toString(signingDate, eiMetadata.getMeta(FIELD_SIGNING_DATE)));
map.put(FIELD_TOTAL_QUANTITY, StringUtils.toString(totalQuantity, eiMetadata.getMeta(FIELD_TOTAL_QUANTITY)));
map.put(FIELD_PARTY_A_NAME, StringUtils.toString(partyAName, eiMetadata.getMeta(FIELD_PARTY_A_NAME)));
map.put(FIELD_PARTY_A_PHONE_NUMBER, StringUtils.toString(partyAPhoneNumber, eiMetadata.getMeta(FIELD_PARTY_A_PHONE_NUMBER)));
map.put(FIELD_ALREADY_NAME, StringUtils.toString(alreadyName, eiMetadata.getMeta(FIELD_ALREADY_NAME)));
map.put(FIELD_ALREADY_PHONE_NUMBER, StringUtils.toString(alreadyPhoneNumber, eiMetadata.getMeta(FIELD_ALREADY_PHONE_NUMBER)));
map.put(FIELD_CONTRACT_STATUS, StringUtils.toString(contractStatus, eiMetadata.getMeta(FIELD_CONTRACT_STATUS)));
map.put(FIELD_LEASE_START_DATE, StringUtils.toString(leaseStartDate, eiMetadata.getMeta(FIELD_LEASE_START_DATE)));
map.put(FIELD_LEASE_END_DATE, StringUtils.toString(leaseEndDate, eiMetadata.getMeta(FIELD_LEASE_END_DATE)));
map.put(FIELD_PAYMENT_METHOD, StringUtils.toString(paymentMethod, eiMetadata.getMeta(FIELD_PAYMENT_METHOD)));
map.put(FIELD_PRICING_METHOD, StringUtils.toString(pricingMethod, eiMetadata.getMeta(FIELD_PRICING_METHOD)));
map.put(FIELD_TAX_POINTS, StringUtils.toString(taxPoints, eiMetadata.getMeta(FIELD_TAX_POINTS)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING, StringUtils.toString(totalContractPriceExcluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_EXCLUDING)));
map.put(FIELD_VALUE_ADDED_TAX, StringUtils.toString(valueAddedTax, eiMetadata.getMeta(FIELD_VALUE_ADDED_TAX)));
map.put(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING, StringUtils.toString(totalContractPriceIncluding, eiMetadata.getMeta(FIELD_TOTAL_CONTRACT_PRICE_INCLUDING)));
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;
}
}
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:HGCW007.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-05-21 14:15:46 create
*/
public class HGCW007 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_DEVICE_NAME = "deviceName"; /* 设备名称*/
public static final String FIELD_DEVICE_NUMBER = "deviceNumber"; /* 数量*/
public static final String FIELD_UNIT_PRICE = "unitPrice"; /* 单价*/
public static final String FIELD_DAY_NUMBER = "dayNumber"; /* 天数*/
public static final String FIELD_TOTAL_PRICE = "totalPrice"; /* 总价*/
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_DEVICE_NAME = "DEVICE_NAME"; /* 设备名称*/
public static final String COL_DEVICE_NUMBER = "DEVICE_NUMBER"; /* 数量*/
public static final String COL_UNIT_PRICE = "UNIT_PRICE"; /* 单价*/
public static final String COL_DAY_NUMBER = "DAY_NUMBER"; /* 天数*/
public static final String COL_TOTAL_PRICE = "TOTAL_PRICE"; /* 总价*/
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 = "HGCW007.query";
public static final String COUNT = "HGCW007.count";
public static final String INSERT = "HGCW007.insert";
public static final String UPDATE = "HGCW007.update";
public static final String DELETE = "HGCW007.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String contractNumber = " "; /* 合同号*/
private String deviceName = " "; /* 设备名称*/
private BigDecimal deviceNumber = new BigDecimal("0"); /* 数量*/
private BigDecimal unitPrice = new BigDecimal("0"); /* 单价*/
private BigDecimal dayNumber = new BigDecimal("0"); /* 天数*/
private BigDecimal totalPrice = 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_DEVICE_NAME);
eiColumn.setDescName("设备名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEVICE_NUMBER);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DAY_NUMBER);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("天数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_PRICE);
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 HGCW007() {
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 deviceName - 设备名称.
* @return the deviceName
*/
public String getDeviceName() {
return this.deviceName;
}
/**
* set the deviceName - 设备名称.
*
* @param deviceName - 设备名称
*/
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
/**
* get the deviceNumber - 数量.
* @return the deviceNumber
*/
public BigDecimal getDeviceNumber() {
return this.deviceNumber;
}
/**
* set the deviceNumber - 数量.
*
* @param deviceNumber - 数量
*/
public void setDeviceNumber(BigDecimal deviceNumber) {
this.deviceNumber = deviceNumber;
}
/**
* get the unitPrice - 单价.
* @return the unitPrice
*/
public BigDecimal getUnitPrice() {
return this.unitPrice;
}
/**
* set the unitPrice - 单价.
*
* @param unitPrice - 单价
*/
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
/**
* get the dayNumber - 天数.
* @return the dayNumber
*/
public BigDecimal getDayNumber() {
return this.dayNumber;
}
/**
* set the dayNumber - 天数.
*
* @param dayNumber - 天数
*/
public void setDayNumber(BigDecimal dayNumber) {
this.dayNumber = dayNumber;
}
/**
* get the totalPrice - 总价.
* @return the totalPrice
*/
public BigDecimal getTotalPrice() {
return this.totalPrice;
}
/**
* set the totalPrice - 总价.
*
* @param totalPrice - 总价
*/
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
/**
* 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));
setDeviceName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEVICE_NAME)), deviceName));
setDeviceNumber(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEVICE_NUMBER)), deviceNumber));
setUnitPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_PRICE)), unitPrice));
setDayNumber(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DAY_NUMBER)), dayNumber));
setTotalPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_TOTAL_PRICE)), totalPrice));
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_DEVICE_NAME, StringUtils.toString(deviceName, eiMetadata.getMeta(FIELD_DEVICE_NAME)));
map.put(FIELD_DEVICE_NUMBER, StringUtils.toString(deviceNumber, eiMetadata.getMeta(FIELD_DEVICE_NUMBER)));
map.put(FIELD_UNIT_PRICE, StringUtils.toString(unitPrice, eiMetadata.getMeta(FIELD_UNIT_PRICE)));
map.put(FIELD_DAY_NUMBER, StringUtils.toString(dayNumber, eiMetadata.getMeta(FIELD_DAY_NUMBER)));
map.put(FIELD_TOTAL_PRICE, StringUtils.toString(totalPrice, eiMetadata.getMeta(FIELD_TOTAL_PRICE)));
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;
}
}
......@@ -42,7 +42,7 @@ public class ServiceHGCW002 extends ServiceBase {
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW002().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
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.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW007;
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.StringUtils;
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 ServiceHGCW006 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "租赁合同",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW006().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, HGCW006.QUERY, new HGCW006());
} 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();
List<Map> detail1Rows = inInfo.getBlock("detail1").getRows();
List<Map> detail2Rows = inInfo.getBlock("detail2").getRows();
if (CollectionUtils.isNotEmpty(resultRows)) {
HGCW006 HGCW006 = new HGCW006();
HGCW006.fromMap(resultRows.get(0));
if (HGCW006.getId() == null || HGCW006.getId() == 0) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
String contractNumber =userVO.getUsercode() +
"5" +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW006.setCompanyCode(userVO.getUsercode());
HGCW006.setCompanyName(userVO.getUsername());
HGCW006.setContractNumber(contractNumber);
HGCW006.setReviewStatus(0);
HGCW006.setLeaseStartDate(DateUtils.formatShort(HGCW006.getLeaseStartDate()));
HGCW006.setLeaseEndDate(DateUtils.formatShort(HGCW006.getLeaseEndDate()));
HGCW006.setSigningDate(DateUtils.formatShort(HGCW006.getSigningDate()));
this.add(HGCW006);
// 写入其他数据
HGCWTools.HgCw007.save(detail1Rows,contractNumber,userVO);
HGCWTools.HgCw999.batchUpdate(detail2Rows,HGCW006.getId());
} else {
HGCW006.setLeaseStartDate(DateUtils.formatShort(HGCW006.getLeaseStartDate()));
HGCW006.setLeaseEndDate(DateUtils.formatShort(HGCW006.getLeaseEndDate()));
HGCW006.setSigningDate(DateUtils.formatShort(HGCW006.getSigningDate()));
BigDecimal totalContractPriceExcluding = new BigDecimal(0);
BigDecimal totalContractPriceIncluding = new BigDecimal(0);
BigDecimal valueAddedTax = new BigDecimal(0);
BigDecimal totalQuantity = new BigDecimal(0);
//计算合同清单金额
for (int i = 0; i < detail1Rows.size(); i++) {
HGCW007 hgcw007 = new HGCW007();
hgcw007.fromMap(detail1Rows.get(i));
totalContractPriceExcluding = totalContractPriceExcluding.add(hgcw007.getTotalPrice());
totalQuantity = totalQuantity.add(hgcw007.getDeviceNumber());
}
BigDecimal taxPoints = new BigDecimal(HGCW006.getTaxPoints() / 100);
totalContractPriceIncluding = totalContractPriceExcluding.multiply(taxPoints.add(new BigDecimal(1)));
valueAddedTax = totalContractPriceIncluding.subtract(totalContractPriceExcluding);
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW006.setTotalContractPriceExcluding(new BigDecimal(decimalFormat.format(totalContractPriceExcluding)));
HGCW006.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
HGCW006.setValueAddedTax(new BigDecimal(decimalFormat.format(valueAddedTax)));
HGCW006.setTotalQuantity(totalQuantity);
this.modify(HGCW006);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param HGCW006
* @return
*/
public void add(HGCW006 HGCW006) {
DaoUtils.insert("HGCW006.insert", HGCW006);
}
/**
* 修改操作
*
* @param HGCW006
* @return
*/
public void modify(HGCW006 HGCW006) {
DaoUtils.update("HGCW006.update", HGCW006);
}
/**
* 删除操作
*
* @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("HGCW006.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;
}
/**
* 提交操作
* @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++) {
HGCW006 HGCW006 = new HGCW006();
HGCW006.fromMap(resultRows.get(i));
HGCW006.setReviewStatus(3);
DaoUtils.update("HGCW006.submit", HGCW006);
}
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.common.DdynamicEnum;
import com.baosight.hggp.hg.cw.domain.HGCW006;
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.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW006A extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
inInfo.addBlock("detail1").addBlockMeta(new HGCW006().eiMetadata);
inInfo.addBlock("detail2").addBlockMeta(new HGCW006().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 甲方名称查询
* 合同类别为收入时,乙方为组织机构中的公司,甲方选择客户档案里的客户;数据提交之后需要把客户档案中的客户类别更新为正式客户
* 合同类别为支出时,甲方为组织机构中的公司,乙方选择供应商档案里面的供应商
* @param inInfo
* @return
*/
public EiInfo partyAQuery(EiInfo inInfo) {
try {
List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory");
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;
}
}
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.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
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;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW006B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "修改合同",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
String id = inInfo.getString("id");
HGCW006 HGCW006 = HGCWTools.HgCw006.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW006);
//获取清单
List<HGCW007> hgcw007List = HGCWTools.HgCw007.queryByContractNumber(HGCW006.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw007List);
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(HGCW006.getId(),"ZL");
inInfo.addBlock("detail2").addRows(hgcw999List);
} catch (PlatException 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.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
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.List;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW006C extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同详情",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
String id = inInfo.getString("id");
HGCW006 HGCW006 = HGCWTools.HgCw006.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW006);
//获取清单
List<HGCW007> hgcw007List = HGCWTools.HgCw007.queryByContractNumber(HGCW006.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw007List);
List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(HGCW006.getId(),"ZL");
inInfo.addBlock("detail2").addRows(hgcw999List);
} catch (PlatException 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.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
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 java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author yukang
* @date 2024年05月06日 18:22
*/
public class ServiceHGCW007 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW007().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, HGCW007.QUERY, new HGCW007());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
List<Map> resultRows = inInfo.getBlock("detail1").getRows();
String contractNumber = "";
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGCW007 HGCW007 = new HGCW007();
HGCW007.fromMap(resultRows.get(i));
contractNumber = HGCW007.getContractNumber();
if (HGCW007.getId() == null || HGCW007.getId() == 0) {
this.add(HGCW007);
} else {
this.modify(HGCW007);
}
}
List<HGCW007> HGCW007List = HGCWTools.HgCw007.queryByContractNumber(contractNumber);
eiInfo.addBlock("detail1").addRows(HGCW007List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return eiInfo;
}
/**
* 新增操作
*
* @param HGCW007
* @return
*/
public void add(HGCW007 HGCW007) {
DaoUtils.insert("HGCW007.insert", HGCW007);
}
/**
* 修改操作
*
* @param HGCW007
* @return
*/
public void modify(HGCW007 HGCW007) {
DaoUtils.update("HGCW007.update", HGCW007);
}
public void deleteEntity(HGCW007 HGCW007) {
DaoUtils.update("HGCW007.delete", HGCW007);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "合同清单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
EiInfo eiInfo = new EiInfo();
try {
List<Map> resultRows = inInfo.getBlock("detail1").getRows();
String contractNumber = "";
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGCW007 HGCW007 = new HGCW007();
HGCW007.fromMap(resultRows.get(i));
contractNumber = HGCW007.getContractNumber();
this.deleteEntity(HGCW007);
}
List<HGCW007> HGCW007List = HGCWTools.HgCw007.queryByContractNumber(contractNumber);
eiInfo.addBlock("detail1").addRows(HGCW007List);
eiInfo.setStatus(EiConstant.STATUS_DEFAULT);
eiInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return eiInfo;
}
}
<?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-21 14:06:39
Version : 1.0
schema : hggp
tableName : HGCW006
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,
PARTY_A VARCHAR,
PARTY_B VARCHAR,
SIGNING_DATE VARCHAR,
TOTAL_QUANTITY DECIMAL,
PARTY_A_NAME VARCHAR,
PARTY_A_PHONE_NUMBER VARCHAR,
ALREADY_NAME VARCHAR,
ALREADY_PHONE_NUMBER VARCHAR,
CONTRACT_STATUS TINYINT,
LEASE_START_DATE VARCHAR,
LEASE_END_DATE VARCHAR,
PAYMENT_METHOD TINYINT,
PRICING_METHOD TINYINT,
TAX_POINTS INTEGER,
TOTAL_CONTRACT_PRICE_EXCLUDING DECIMAL,
VALUE_ADDED_TAX DECIMAL,
TOTAL_CONTRACT_PRICE_INCLUDING 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="HGCW006">
<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="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="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
PARTY_B = #partyB#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalQuantity">
TOTAL_QUANTITY = #totalQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAName">
PARTY_A_NAME = #partyAName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAPhoneNumber">
PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyName">
ALREADY_NAME = #alreadyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyPhoneNumber">
ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaseStartDate">
LEASE_START_DATE = #leaseStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaseEndDate">
LEASE_END_DATE = #leaseEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMethod">
PAYMENT_METHOD = #paymentMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pricingMethod">
PRICING_METHOD = #pricingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceExcluding">
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="valueAddedTax">
VALUE_ADDED_TAX = #valueAddedTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW006">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB", <!-- 乙方名称 -->
SIGNING_DATE as "signingDate", <!-- 签约日期 -->
TOTAL_QUANTITY as "totalQuantity", <!-- 总数量 -->
PARTY_A_NAME as "partyAName", <!-- 甲方联系人姓名 -->
PARTY_A_PHONE_NUMBER as "partyAPhoneNumber", <!-- 甲方联系人电话 -->
ALREADY_NAME as "alreadyName", <!-- 已方联系人姓名 -->
ALREADY_PHONE_NUMBER as "alreadyPhoneNumber", <!-- 已方联系人电话 -->
CONTRACT_STATUS as "contractStatus", <!-- 合同状态;1草签2签约 -->
LEASE_START_DATE as "leaseStartDate", <!-- 租赁开始日期 -->
LEASE_END_DATE as "leaseEndDate", <!-- 租赁结束日期 -->
PAYMENT_METHOD as "paymentMethod", <!-- 付款方式;1一次性付款2分期付款 -->
PRICING_METHOD as "pricingMethod", <!-- 计价方式;1固定单价合同2固定总价合同 -->
TAX_POINTS as "taxPoints", <!-- 税点 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
VALUE_ADDED_TAX as "valueAddedTax", <!-- 增值税 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
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}.HGCW006 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}.HGCW006 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="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
PARTY_B = #partyB#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDate">
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalQuantity">
TOTAL_QUANTITY = #totalQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAName">
PARTY_A_NAME = #partyAName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAPhoneNumber">
PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyName">
ALREADY_NAME = #alreadyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyPhoneNumber">
ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaseStartDate">
LEASE_START_DATE = #leaseStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaseEndDate">
LEASE_END_DATE = #leaseEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMethod">
PAYMENT_METHOD = #paymentMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pricingMethod">
PRICING_METHOD = #pricingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceExcluding">
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="valueAddedTax">
VALUE_ADDED_TAX = #valueAddedTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</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}.HGCW006 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
CONTRACT_NUMBER, <!-- 合同号 -->
CONTRACT_NAME, <!-- 合同名称 -->
PARTY_A, <!-- 甲方名称 -->
PARTY_B, <!-- 乙方名称 -->
SIGNING_DATE, <!-- 签约日期 -->
TOTAL_QUANTITY, <!-- 总数量 -->
PARTY_A_NAME, <!-- 甲方联系人姓名 -->
PARTY_A_PHONE_NUMBER, <!-- 甲方联系人电话 -->
ALREADY_NAME, <!-- 已方联系人姓名 -->
ALREADY_PHONE_NUMBER, <!-- 已方联系人电话 -->
CONTRACT_STATUS, <!-- 合同状态;1草签2签约 -->
LEASE_START_DATE, <!-- 租赁开始日期 -->
LEASE_END_DATE, <!-- 租赁结束日期 -->
PAYMENT_METHOD, <!-- 付款方式;1一次性付款2分期付款 -->
PRICING_METHOD, <!-- 计价方式;1固定单价合同2固定总价合同 -->
TAX_POINTS, <!-- 税点 -->
TOTAL_CONTRACT_PRICE_EXCLUDING, <!-- 合同总价(不含税) -->
VALUE_ADDED_TAX, <!-- 增值税 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 合同总价(含税) -->
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#, #partyA#, #partyB#, #signingDate#, #totalQuantity#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#, #contractStatus#, #leaseStartDate#, #leaseEndDate#, #paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#, #totalContractPriceIncluding#, #reviewStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW006
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW006 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW006
SET
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 合同号 -->
CONTRACT_NAME = #contractName#, <!-- 合同名称 -->
PARTY_A = #partyA#, <!-- 甲方名称 -->
PARTY_B = #partyB#, <!-- 乙方名称 -->
SIGNING_DATE = #signingDate#, <!-- 签约日期 -->
TOTAL_QUANTITY = #totalQuantity#, <!-- 总数量 -->
PARTY_A_NAME = #partyAName#, <!-- 甲方联系人姓名 -->
PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#, <!-- 甲方联系人电话 -->
ALREADY_NAME = #alreadyName#, <!-- 已方联系人姓名 -->
ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#, <!-- 已方联系人电话 -->
CONTRACT_STATUS = #contractStatus#, <!-- 合同状态;1草签2签约 -->
LEASE_START_DATE = #leaseStartDate#, <!-- 租赁开始日期 -->
LEASE_END_DATE = #leaseEndDate#, <!-- 租赁结束日期 -->
PAYMENT_METHOD = #paymentMethod#, <!-- 付款方式;1一次性付款2分期付款 -->
PRICING_METHOD = #pricingMethod#, <!-- 计价方式;1固定单价合同2固定总价合同 -->
TAX_POINTS = #taxPoints#, <!-- 税点 -->
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#, <!-- 合同总价(不含税) -->
VALUE_ADDED_TAX = #valueAddedTax#, <!-- 增值税 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#, <!-- 合同总价(含税) -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hggpSchema}.HGCW006
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
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-21 14:15:46
Version : 1.0
schema : hggp
tableName : HGCW007
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
DEVICE_NAME VARCHAR,
DEVICE_NUMBER DECIMAL,
UNIT_PRICE DECIMAL,
DAY_NUMBER DECIMAL,
TOTAL_PRICE 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="HGCW007">
<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="deviceName">
DEVICE_NAME = #deviceName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceNumber">
DEVICE_NUMBER = #deviceNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dayNumber">
DAY_NUMBER = #dayNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</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.HGCW007">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
DEVICE_NAME as "deviceName", <!-- 设备名称 -->
DEVICE_NUMBER as "deviceNumber", <!-- 数量 -->
UNIT_PRICE as "unitPrice", <!-- 单价 -->
DAY_NUMBER as "dayNumber", <!-- 天数 -->
TOTAL_PRICE as "totalPrice", <!-- 总价 -->
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}.HGCW007 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}.HGCW007 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="deviceName">
DEVICE_NAME = #deviceName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deviceNumber">
DEVICE_NUMBER = #deviceNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitPrice">
UNIT_PRICE = #unitPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dayNumber">
DAY_NUMBER = #dayNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalPrice">
TOTAL_PRICE = #totalPrice#
</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}.HGCW007 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
CONTRACT_NUMBER, <!-- 合同号 -->
DEVICE_NAME, <!-- 设备名称 -->
DEVICE_NUMBER, <!-- 数量 -->
UNIT_PRICE, <!-- 单价 -->
DAY_NUMBER, <!-- 天数 -->
TOTAL_PRICE, <!-- 总价 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #deviceName#, #deviceNumber#, #unitPrice#, #dayNumber#, #totalPrice#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW007 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW007
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
CONTRACT_NUMBER = #contractNumber#, <!-- 合同号 -->
DEVICE_NAME = #deviceName#, <!-- 设备名称 -->
DEVICE_NUMBER = #deviceNumber#, <!-- 数量 -->
UNIT_PRICE = #unitPrice#, <!-- 单价 -->
DAY_NUMBER = #dayNumber#, <!-- 天数 -->
TOTAL_PRICE = #totalPrice#, <!-- 总价 -->
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>
......@@ -3,9 +3,7 @@ package com.baosight.hggp.hg.cw.tools;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001A;
import com.baosight.hggp.hg.xs.domain.Org;
......@@ -76,6 +74,44 @@ public class HGCWTools {
}
}
public static class HgCw006 {
public static HGCW006 getId(String id) {
AssertUtils.isNull(id, "合同ID不能为空!");
List<HGCW006> results = DaoBase.getInstance().query(HGCW006.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
}
public static class HgCw007 {
public static void save(List<Map> rows, String contractNumber, UserVO userVO) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> {
HGCW007 hgcw007 = new HGCW007();
hgcw007.fromMap(row);
hgcw007.setCompanyCode(userVO.getUsercode());
hgcw007.setCompanyName(userVO.getUsername());
hgcw007.setContractNumber(contractNumber);
DaoUtils.insert(HGCW007.INSERT, hgcw007);
});
}
/**
* 根据合同号获取合同清单
* @param contractNumber
* @return
*/
public static List<HGCW007> queryByContractNumber(String contractNumber) {
AssertUtils.isNull(contractNumber, "合同号不能为空!");
List<HGCW007> results = DaoBase.getInstance().query(HGCW007.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
return results;
}
}
public static class HgCw999 {
public static void batchUpdate(List<Map> rows, Long id) {
......
......@@ -36,6 +36,9 @@
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW003.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW006.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW007.xml"/>
<!--配置-->
<sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/>
......
......@@ -12,7 +12,7 @@
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" />
......
......@@ -120,7 +120,7 @@
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" />
......
......@@ -122,7 +122,7 @@
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="contractNumber" cname="合同号" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" />
......
$(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) {
$("#BTN_INSERT").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: "HGCW006A?methodName=initLoad&efParentFormEname=HGCW006",
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: "HGCW006B?methodName=initLoad&id=" + rows[0].id + "&efParentFormEname=HGCW006",
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: "HGCW006C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW006",
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=ZL&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW006",
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("HGCW006", "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:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同名称" ename="contractName" blockId="inqu_status" row="0" colWidth="3" />
<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="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="审批状态" ename="inqu_status-0-reviewStatus" 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="200" align="center"/>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
<EF:EFColumn ename="signingDate" cname="签订日期" align="center" enable="false"/>
<EF:EFColumn ename="contractNumber" cname="合同号" align="center" enable="false"/>
<EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFComboColumn ename="contractStatus" cname="合同状态" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
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>
<script src="${ctx}/HG/CW/HGCW006.js"></script>
\ No newline at end of file
$(function() {
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail1 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "dayNumber") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var deviceNumber = parseFloat(item.deviceNumber) || 0;
var unitPrice = parseFloat(item.unitPrice) || 0;
var dayNumber = parseFloat(item.dayNumber) || 0;
var totalPrice = deviceNumber * unitPrice * dayNumber;
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
console.log(grid.dataSource._data);
console.log(detail1Grid.getDataItems());
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
totalPrice = 0;
deviceNumber = 0
allRows.forEach(function (row, index) {
totalPrice += parseFloat(row.totalPrice);
deviceNumber += parseFloat(row.deviceNumber);
});
totalPriceExcluding = totalPrice;
totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(parseFloat(totalPriceExcluding).toFixed(3))
$("#result-0-totalContractPriceIncluding").val(parseFloat(totalPriceIncluding).toFixed(3))
$("#result-0-valueAddedTax").val(parseFloat(valueAddedTax).toFixed(3))
$("#result-0-totalQuantity").val(parseFloat(deviceNumber).toFixed(3))
}
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveResult1Func();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
},
}
$("#UPLOAD_FILE").on("click", function () {
uploadFileFunc();
});
$("#DELETE_FILE").on("click", function () {
deleteFileFunc();
});
IPLATUI.EFGrid.detail2 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
]
}
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"projCodeBox": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'].split("-")[1];
$("#result-0-projCode").val(valueField);
$("#result-0-projName").val(textField);
} else {
$("#result-0-projName").val(textField);
}
}
}
}
IPLATUI.EFPopupInput = {
"popupInputPartyA": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
var info = new EiInfo();
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyA = model.usercode + "-" + model.username;
$("#result-0-partyA").val(partyA);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
e.preventDefault(); // 不使用默认的回填逻辑
}
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function uploadFileFunc() {
JSColorbox.open({
href: "HGCW099?methodName=initLoad&inqu_status-0-bizType=ZL",
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(data) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-docId", data.docId);
inEiInfo.set("result-0-bizType", data.bizType);
EiCommunicator.send('HGCW999', 'insert', inEiInfo, {
onSuccess(response) {
if (response.status === 0) {
EiCommunicator.send('HGCW999', 'queryDoc', inEiInfo, {
onSuccess(e) {
console.log(e);
if (e.status === 0) {
let data = e.extAttr.data;
detail2Grid.dataSource.insert();
detail2Grid.setCellValue(0, "rowNo", 0);
detail2Grid.setCellValue(0, "id", data.id);
detail2Grid.setCellValue(0, "docId", data.docId);
detail2Grid.setCellValue(0, "docName", data.docName);
detail2Grid.setCellValue(0, "createdTime", data.createdTime);
detail2Grid.refresh();
} else {
NotificationUtil("执行失败!", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
} else {
NotificationUtil("执行失败!", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
fieldValidation();
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail1,detail2", "HGCW006", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detail2Grid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
rows.forEach(function (row) {
detail1Grid.removeRows([rows.rowNo]);// 刷新行号
})
refreshRowNo();
}
let refreshRowNo = function () {
let allRows = detail1Grid.getDataItems();
for (let i = 0; i < allRows.length; i++) {
detail1Grid.setCellValue(i, "rowNo", i);
detail1Grid.refresh();
}
}
function fieldValidation() {
}
$(window).load(function () {
refreshRowNo();
});
<!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="inqu1" title="基本信息">
<div class="row">
<EF:EFSelect cname="项目编号" ename="projCodeBox" colWidth="4" required="true" filter="contains">
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions
blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/>
<EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
serviceName="HGCW006A" methodName="partyAQuery"
resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" />
</div>
<div class="row">
<EF:EFDatePicker cname="签约日期" ename="result-0-signingDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-totalQuantity" cname="总数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" />
</div>
<div class="row">
<EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" />
<EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" />
<EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" />
</div>
<div class="row">
<EF:EFDateSpan startCname="租赁开始/结束日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="leaseStartDate" endName="leaseEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row">
<EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="deviceName" cname="设备名称" align="center" />
<EF:EFColumn ename="deviceNumber" cname="数量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="center"/>
<EF:EFColumn ename="dayNumber" cname="天数" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPrice" cname="总价" enable="false" format="{0:N3}" 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: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>
<script src="${ctx}/HG/CW/HGCW006A.js"></script>
\ No newline at end of file
$(function() {
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
btnSaveFunc();
});
IPLATUI.EFGrid.detail1 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function(e) {
if (e.field == "dayNumber") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
// 计算总金额
var taxPoints = $("#result-0-taxPoints").val() ? $("#result-0-taxPoints").val() / 100 : 0;
var deviceNumber = parseFloat(item.deviceNumber) || 0;
var unitPrice = parseFloat(item.unitPrice) || 0;
var dayNumber = parseFloat(item.dayNumber) || 0;
var totalPrice = deviceNumber * unitPrice * dayNumber;
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
console.log(grid.dataSource._data);
console.log(detail1Grid.getDataItems());
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
totalPrice = 0;
deviceNumber = 0
allRows.forEach(function (row, index) {
totalPrice += parseFloat(row.totalPrice);
deviceNumber += parseFloat(row.deviceNumber);
});
totalPriceExcluding = totalPrice;
totalPriceIncluding = totalPriceExcluding * (1 + parseFloat(taxPoints));
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(parseFloat(totalPriceExcluding).toFixed(3))
$("#result-0-totalContractPriceIncluding").val(parseFloat(totalPriceIncluding).toFixed(3))
$("#result-0-valueAddedTax").val(parseFloat(valueAddedTax).toFixed(3))
$("#result-0-totalQuantity").val(parseFloat(deviceNumber).toFixed(3))
}
});
setTimeout(function() {
initDate();
}, 1000);
},
onAdd: function (e) {
var contractNumber = $("#result-0-contractNumber").val();
$.each(e.items, function (index, item) {
item['contractNumber'] = contractNumber;
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
saveResult1Func(btnNode);
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteResult1Func();
},
}
$("#UPLOAD_FILE").on("click", function () {
uploadFileFunc();
});
$("#DELETE_FILE").on("click", function () {
// let btnNode = $(this);
//禁用按钮
// btnNode.attr("disabled", true);
deleteFileFunc();
});
IPLATUI.EFGrid.detail2 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
]
}
/**
* 下拉框事件
* @type {{"result-0-contractType": {select: IPLATUI.EFSelect.result-0-contractType.select}, projCodeBox: {select: IPLATUI.EFSelect.projCodeBox.select}}}
*/
IPLATUI.EFSelect = {
"projCodeBox": {
// 点击下拉选项时触发
select: function (e) { //获取勾选值
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
var textField = "";
if (valueField) {
textField = dataItem['textField'].split("-")[1];
$("#result-0-projCode").val(valueField);
$("#result-0-projName").val(textField);
} else {
$("#result-0-projName").val(textField);
}
}
}
}
IPLATUI.EFPopupInput = {
"popupInputPartyA": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
var info = new EiInfo();
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyA = model.usercode + "-" + model.username;
$("#result-0-partyA").val(partyA);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
e.preventDefault(); // 不使用默认的回填逻辑
}
}
};
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
function initDate() {
var projCode = $("#result-0-projCode").val();
$("#projCodeBox").data("kendoDropDownList").value(projCode);
var partyA = $("#result-0-partyA").val();
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
}
function saveResult1Func(btn) {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail1"));
EiCommunicator.send("HGCW003", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(response.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail1")) {
window['detail1Grid'].setEiInfo(ei);
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//释放禁用按钮
btn.attr("disabled", false);
}
});
}
function uploadFileFunc() {
var id = $("#result-0-id").val();
JSColorbox.open({
href: "HGCW099?methodName=initLoad&inqu_status-0-bizType=ZL&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件上传</div>",
width: "60%",
height: "50%",
callbackName: uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function uploadFileCallback(data) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", data.matId);
inEiInfo.set("result-0-docId", data.docId);
inEiInfo.set("result-0-bizType", data.bizType);
EiCommunicator.send('HGCW999', 'insert', inEiInfo, {
onSuccess(ei) {
if (ei.status === 0) {
try {
NotificationUtil(ei.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail2")) {
window['detail2Grid'].setEiInfo(ei);
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil("执行失败!", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
function btnSaveFunc() {
fieldValidation();
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail1,detail2", "HGCW002", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
}
});
}
function deleteFileFunc() {
let rows = detail2Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail2"));
EiCommunicator.send("HGCW999", "delete", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(ei.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail2")) {
window['detail2Grid'].setEiInfo(ei);
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//释放禁用按钮
// btn.attr("disabled", false);
}
});
}
function deleteResult1Func() {
let rows = detail1Grid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除1\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("detail1"));
EiCommunicator.send("HGCW003", "delete", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
NotificationUtil(response.msg);
} catch (e) {
// TODO: handle exception
}
if (IPLAT.isAvailable("detail1")) {
window['detail1Grid'].setEiInfo(ei);
calculateAmount();
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
function calculateAmount() {
var allRows = detail1Grid.getDataItems();
var totalPriceExcluding = 0;
var totalPriceIncluding = 0;
var valueAddedTax = 0;
allRows.forEach(function (row, index) {
totalPriceExcluding += parseFloat(row.totalPriceExcluding);
totalPriceIncluding += parseFloat(row.totalPriceIncluding);
});
valueAddedTax = parseFloat(totalPriceIncluding) - parseFloat(totalPriceExcluding);
$("#result-0-totalContractPriceExcluding").val(totalPriceExcluding.toFixed(3))
$("#result-0-totalContractPriceIncluding").val(totalPriceIncluding.toFixed(3))
$("#result-0-valueAddedTax").val(valueAddedTax.toFixed(3))
}
function fieldValidation() {
var contractType = $("#result-0-contractType").val();
if (contractType == "3") {
var mainContractNumber = $("#result-0-mainContractNumber").val();
if (!mainContractNumber) {
message("请填写主合同号!");
return;
}
}
}
<!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="inqu1" title="基本信息">
<div class="row">
<EF:EFSelect cname="项目编号" ename="projCodeBox" colWidth="4" required="true" filter="contains">
<EF:EFOption label="-- 请选择 --" value="" />
<EF:EFOptions
blockId="projectCodeBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/>
<EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
serviceName="HGCW006A" methodName="partyAQuery"
resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" />
</div>
<div class="row">
<EF:EFDatePicker cname="签约日期" ename="result-0-signingDate" colWidth="4"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-totalQuantity" cname="总数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" />
</div>
<div class="row">
<EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" />
<EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" />
<EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" />
</div>
<div class="row">
<EF:EFDateSpan startCname="租赁开始/结束日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="leaseStartDate" endName="leaseEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row">
<EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="deviceName" cname="设备名称" align="center" />
<EF:EFColumn ename="deviceNumber" cname="数量" format="{0:N3}" align="center"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="center"/>
<EF:EFColumn ename="dayNumber" cname="天数" format="{0:N3}" align="center"/>
<EF:EFColumn ename="totalPrice" cname="总价" enable="false" format="{0:N3}" 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: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>
<script src="${ctx}/HG/CW/HGCW006B.js"></script>
\ No newline at end of file
$(function() {
IPLATUI.EFGrid.detail1 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
]
}
IPLATUI.EFGrid.detail2 = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
]
}
});
<!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="inqu1" title="基本信息">
<div class="row">
<EF:EFInput ename="result-0-id" cname="id" type="hidden"/>
<EF:EFInput ename="result-0-projCode" cname="项目编号" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-signingDate" cname="签约日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-totalQuantity" cname="总数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyAName" cname="甲方联系人姓名" colWidth="4" readonly="true" enable="false"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-partyAPhoneNumber" cname="甲方联系人电话" colWidth="4" readonly="true" enable="false"/>
<EF:EFInput ename="result-0-alreadyName" cname="已方联系人姓名" colWidth="4" readonly="true" enable="false"/>
<EF:EFInput ename="result-0-alreadyPhoneNumber" cname="已方联系人电话" colWidth="4" readonly="true" enable="false"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-leaseStartDate" cname="租赁开始日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-leaseEndDate" cname="租赁结束日期" colWidth="4" readonly="true"/>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains" readonly="true" enable="false">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu2" title="承包方式及合同价款">
<div class="row">
<EF:EFSelect cname="付款方式" ename="result-0-paymentMethod" colWidth="4" filter="contains" readonly="true" enable="false">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.paymentMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="计价方式" ename="result-0-pricingMethod" colWidth="4" filter="contains" readonly="true" enable="false">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.pricingMethod"/>
</EF:EFSelect>
<EF:EFSelect cname="税点" ename="result-0-taxPoints" colWidth="4" filter="contains" readonly="true" enable="false">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPriceExcluding" cname="合同总价(不含税)" colWidth="4" readonly="true" enable="false"/>
<EF:EFInput ename="result-0-valueAddedTax" cname="增值税" colWidth="4" readonly="true" enable="false"/>
<EF:EFInput ename="result-0-totalContractPriceIncluding" cname="合同总价(含税)" colWidth="4" readonly="true" enable="false"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="deviceName" cname="设备名称" align="center" enable="false"/>
<EF:EFColumn ename="deviceNumber" cname="数量" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="dayNumber" cname="天数" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="totalPrice" cname="总价" enable="false" format="{0:N3}" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail2" title="附件信息">
<EF:EFGrid blockId="detail2" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="matId" cname="matId" 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:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW006C.js"></script>
\ No newline at end of file
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