Commit 98f78e4d by 江和松

采购收票选择结算单:增加收票数量(默认等于数量,可修改)、收票重量(默认等于数量,可修改)、收票金额(默认等于数量,可修改),剩余数量(数量-收票数量)、剩余重…

采购收票选择结算单:增加收票数量(默认等于数量,可修改)、收票重量(默认等于数量,可修改)、收票金额(默认等于数量,可修改),剩余数量(数量-收票数量)、剩余重量(重量-收票重量)、剩余收票金额(收货金额-收票金额)
parent f3f747f1
......@@ -19,9 +19,9 @@ import com.baosight.iplat4j.core.util.StringUtils;
* @history 2024-09-04 9:15:38 create
*/
public class HGCG003B 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_DEP_CODE = "depCode"; /* 部门编码*/
......@@ -72,7 +72,13 @@ public class HGCG003B extends DaoEPBase {
public static final String FIELD_CALCULATION_METHOD = "calculationMethod"; /* 计算方式 0-数量乘单价 1-重量乘单价*/
public static final String FIELD_CANCEL_AMOUNT = "cancelAmount"; /* 核销金额*/
public static final String FIELD_UN_CANCEL_AMOUNT = "unCancelAmount"; /* 未核销金额*/
public static final String FIELD_INVOICE_QTY = "invoiceQty"; /* 收票数量*/
public static final String FIELD_INVOICE_WEIGHT = "invoiceWeight"; /* 收票重量*/
public static final String FIELD_INVOICE_AMOUNT = "invoiceAmount"; /* 收票金额*/
public static final String FIELD_INVOICE_REMAINING_QTY = "invoiceRemainingQty"; /* 收票剩余数量*/
public static final String FIELD_INVOICE_REMAINING_WEIGHT = "invoiceRemainingWeight"; /* 收票剩余重量*/
public static final String FIELD_INVOICE_REMAINING_AMOUNT = "invoiceRemainingAmount"; /* 收票剩余金额*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
......@@ -117,13 +123,13 @@ public class HGCG003B extends DaoEPBase {
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_CALCULATION_METHOD = "CALCULATION_METHOD"; /* 计算方式 0-数量乘单价 1-重量乘单价*/
public static final String QUERY = "HGCG003A.query";
public static final String COUNT = "HGCG003A.count";
public static final String INSERT = "HGCG003A.insert";
public static final String UPDATE = "HGCG003A.update";
public static final String DELETE = "HGCG003A.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
......@@ -174,229 +180,235 @@ public class HGCG003B extends DaoEPBase {
private Integer calculationMethod = 0; /* 计算方式 0-数量乘单价 1-重量乘单价*/
private BigDecimal cancelAmount = new BigDecimal("0"); /* 核销金额*/
private BigDecimal unCancelAmount = new BigDecimal("0"); /* 未核销金额*/
private BigDecimal invoiceQty = new BigDecimal("0"); /* 收票数量*/
private BigDecimal invoiceWeight = new BigDecimal("0"); /* 收票重量*/
private BigDecimal invoiceAmount = new BigDecimal("0"); /* 收票金额*/
private BigDecimal invoiceRemainingQty = new BigDecimal("0"); /* 收票剩余数量*/
private BigDecimal invoiceRemainingWeight = new BigDecimal("0"); /* 收票剩余重量*/
private BigDecimal invoiceRemainingAmount = new BigDecimal("0"); /* 收票剩余金额*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_DATE);
eiColumn.setDescName("收货日期");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_NO);
eiColumn.setDescName("收货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_LINE_NO);
eiColumn.setDescName("收货单行号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_NO);
eiColumn.setDescName("计划单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_LINE_NO);
eiColumn.setDescName("合同行号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_DETAIL_ID);
eiColumn.setDescName("合同明细id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("长度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("宽度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("厚度");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELIVER_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("退货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态:0-已收货,1-已入库,2-部分入库,3-退货");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRICE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("单价");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("金额(不含税金额)");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_INCLUDE_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("含税金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(20);
eiColumn.setDescName("税额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TAX_RATE);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("税率");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型大类");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRIMARY_ID);
eiColumn.setDescName("主表id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_IS_INVOICING);
eiColumn.setDescName("是否开票 0否 1是");
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);
......@@ -408,7 +420,7 @@ public class HGCG003B extends DaoEPBase {
eiColumn = new EiColumn(FIELD_SUP_NAME);
eiColumn.setDescName("供应商名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CALCULATION_METHOD);
eiColumn.setDescName("计算方式 0-数量乘单价 1-重量乘单价");
eiMetadata.addMeta(eiColumn);
......@@ -426,15 +438,58 @@ public class HGCG003B extends DaoEPBase {
eiColumn.setFieldLength(12);
eiColumn.setDescName("未核销金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("收票金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_REMAINING_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票剩余数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_REMAINING_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票剩余重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_REMAINING_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("收票剩余金额");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGCG003B() {
initMetaData();
}
/**
* get the id .
* @return the id
......@@ -442,7 +497,7 @@ public class HGCG003B extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id .
*
......@@ -458,7 +513,7 @@ public class HGCG003B extends DaoEPBase {
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
......@@ -474,7 +529,7 @@ public class HGCG003B extends DaoEPBase {
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
......@@ -490,7 +545,7 @@ public class HGCG003B extends DaoEPBase {
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
......@@ -506,7 +561,7 @@ public class HGCG003B extends DaoEPBase {
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
......@@ -522,7 +577,7 @@ public class HGCG003B extends DaoEPBase {
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
......@@ -538,7 +593,7 @@ public class HGCG003B extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
......@@ -554,7 +609,7 @@ public class HGCG003B extends DaoEPBase {
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
......@@ -570,7 +625,7 @@ public class HGCG003B extends DaoEPBase {
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
......@@ -586,7 +641,7 @@ public class HGCG003B extends DaoEPBase {
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
......@@ -602,7 +657,7 @@ public class HGCG003B extends DaoEPBase {
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
......@@ -618,7 +673,7 @@ public class HGCG003B extends DaoEPBase {
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
......@@ -634,7 +689,7 @@ public class HGCG003B extends DaoEPBase {
public String getReceiveDate() {
return this.receiveDate;
}
/**
* set the receiveDate - 收货日期.
*
......@@ -650,7 +705,7 @@ public class HGCG003B extends DaoEPBase {
public String getReceiveNo() {
return this.receiveNo;
}
/**
* set the receiveNo - 收货单号.
*
......@@ -666,7 +721,7 @@ public class HGCG003B extends DaoEPBase {
public String getPlanNo() {
return this.planNo;
}
/**
* set the planNo - 计划单号.
*
......@@ -682,7 +737,7 @@ public class HGCG003B extends DaoEPBase {
public String getContractNo() {
return this.contractNo;
}
/**
* set the contractNo - 合同号.
*
......@@ -698,7 +753,7 @@ public class HGCG003B extends DaoEPBase {
public Long getContractDetailId() {
return this.contractDetailId;
}
/**
* set the contractDetailId - 合同明细id.
*
......@@ -714,7 +769,7 @@ public class HGCG003B extends DaoEPBase {
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
......@@ -730,7 +785,7 @@ public class HGCG003B extends DaoEPBase {
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
......@@ -746,7 +801,7 @@ public class HGCG003B extends DaoEPBase {
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
......@@ -762,7 +817,7 @@ public class HGCG003B extends DaoEPBase {
public Long getSpecId() {
return this.specId;
}
/**
* set the specId - 规格ID.
*
......@@ -778,7 +833,7 @@ public class HGCG003B extends DaoEPBase {
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
......@@ -794,7 +849,7 @@ public class HGCG003B extends DaoEPBase {
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
......@@ -810,7 +865,7 @@ public class HGCG003B extends DaoEPBase {
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
......@@ -826,7 +881,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长度.
*
......@@ -842,7 +897,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽度.
*
......@@ -858,7 +913,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚度.
*
......@@ -874,7 +929,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getReceiveQty() {
return this.receiveQty;
}
/**
* set the receiveQty - 收货数量.
*
......@@ -890,7 +945,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getDeliverQty() {
return this.deliverQty;
}
/**
* set the deliverQty - 退货数量.
*
......@@ -906,7 +961,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getDepositQty() {
return this.depositQty;
}
/**
* set the depositQty - 入库数量.
*
......@@ -922,7 +977,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getReceiveUnitWeight() {
return this.receiveUnitWeight;
}
/**
* set the receiveUnitWeight - 收货单重.
*
......@@ -938,7 +993,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getReceiveWeight() {
return this.receiveWeight;
}
/**
* set the receiveWeight - 收货重量.
*
......@@ -954,7 +1009,7 @@ public class HGCG003B extends DaoEPBase {
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态:0-已收货,1-已入库,2-部分入库,3-退货.
*
......@@ -970,7 +1025,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getPrice() {
return this.price;
}
/**
* set the price - 单价.
*
......@@ -986,7 +1041,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getAmount() {
return this.amount;
}
/**
* set the amount - 金额(不含税金额).
*
......@@ -1002,7 +1057,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getTaxIncludeAmount() {
return this.taxIncludeAmount;
}
/**
* set the taxIncludeAmount - 含税金额.
*
......@@ -1018,7 +1073,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getTaxAmount() {
return this.taxAmount;
}
/**
* set the taxAmount - 税额.
*
......@@ -1034,7 +1089,7 @@ public class HGCG003B extends DaoEPBase {
public BigDecimal getTaxRate() {
return this.taxRate;
}
/**
* set the taxRate - 税率.
*
......@@ -1050,7 +1105,7 @@ public class HGCG003B extends DaoEPBase {
public Integer getInventTypeDetail() {
return this.inventTypeDetail;
}
/**
* set the inventTypeDetail - 存货类型大类.
*
......@@ -1066,7 +1121,7 @@ public class HGCG003B extends DaoEPBase {
public Long getPrimaryId() {
return this.primaryId;
}
/**
* set the primaryId - 主表id.
*
......@@ -1082,7 +1137,7 @@ public class HGCG003B extends DaoEPBase {
public Integer getIsInvoicing() {
return this.isInvoicing;
}
/**
* set the isInvoicing - 是否开票 0否 1是.
*
......@@ -1098,7 +1153,7 @@ public class HGCG003B extends DaoEPBase {
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
......@@ -1114,7 +1169,7 @@ public class HGCG003B extends DaoEPBase {
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
......@@ -1130,7 +1185,7 @@ public class HGCG003B extends DaoEPBase {
public Integer getCalculationMethod() {
return this.calculationMethod;
}
/**
* set the calculationMethod - 计算方式 0-数量乘单价 1-重量乘单价.
*
......@@ -1171,23 +1226,71 @@ public class HGCG003B extends DaoEPBase {
public void setSupName(String supName) {
this.supName = supName;
}
public String getReceiveLineNo() {
return receiveLineNo;
}
public void setReceiveLineNo(String receiveLineNo) {
this.receiveLineNo = receiveLineNo;
}
public String getContractLineNo() {
return contractLineNo;
}
public void setContractLineNo(String contractLineNo) {
this.contractLineNo = contractLineNo;
}
public BigDecimal getInvoiceQty() {
return invoiceQty;
}
public void setInvoiceQty(BigDecimal invoiceQty) {
this.invoiceQty = invoiceQty;
}
public BigDecimal getInvoiceWeight() {
return invoiceWeight;
}
public void setInvoiceWeight(BigDecimal invoiceWeight) {
this.invoiceWeight = invoiceWeight;
}
public BigDecimal getInvoiceAmount() {
return invoiceAmount;
}
public void setInvoiceAmount(BigDecimal invoiceAmount) {
this.invoiceAmount = invoiceAmount;
}
public BigDecimal getInvoiceRemainingQty() {
return invoiceRemainingQty;
}
public void setInvoiceRemainingQty(BigDecimal invoiceRemainingQty) {
this.invoiceRemainingQty = invoiceRemainingQty;
}
public BigDecimal getInvoiceRemainingWeight() {
return invoiceRemainingWeight;
}
public void setInvoiceRemainingWeight(BigDecimal invoiceRemainingWeight) {
this.invoiceRemainingWeight = invoiceRemainingWeight;
}
public BigDecimal getInvoiceRemainingAmount() {
return invoiceRemainingAmount;
}
public void setInvoiceRemainingAmount(BigDecimal invoiceRemainingAmount) {
this.invoiceRemainingAmount = invoiceRemainingAmount;
}
/**
* get the value from Map.
*
......@@ -1195,7 +1298,7 @@ public class HGCG003B extends DaoEPBase {
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
......@@ -1246,14 +1349,20 @@ public class HGCG003B extends DaoEPBase {
setCalculationMethod(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CALCULATION_METHOD)), calculationMethod));
setCancelAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CANCEL_AMOUNT)), cancelAmount));
setUnCancelAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UN_CANCEL_AMOUNT)), unCancelAmount));
setInvoiceQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_QTY)), invoiceQty));
setInvoiceWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_WEIGHT)), invoiceWeight));
setInvoiceAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_AMOUNT)), invoiceAmount));
setInvoiceRemainingQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_REMAINING_QTY)), invoiceRemainingQty));
setInvoiceRemainingWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_REMAINING_WEIGHT)), invoiceRemainingWeight));
setInvoiceRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_REMAINING_AMOUNT)), invoiceRemainingAmount));
}
/**
* 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)));
......@@ -1305,7 +1414,13 @@ public class HGCG003B extends DaoEPBase {
map.put(FIELD_CALCULATION_METHOD, StringUtils.toString(calculationMethod, eiMetadata.getMeta(FIELD_CALCULATION_METHOD)));
map.put(FIELD_CANCEL_AMOUNT, StringUtils.toString(cancelAmount, eiMetadata.getMeta(FIELD_CANCEL_AMOUNT)));
map.put(FIELD_UN_CANCEL_AMOUNT, StringUtils.toString(unCancelAmount, eiMetadata.getMeta(FIELD_UN_CANCEL_AMOUNT)));
map.put(FIELD_INVOICE_QTY, StringUtils.toString(invoiceQty, eiMetadata.getMeta(FIELD_INVOICE_QTY)));
map.put(FIELD_INVOICE_WEIGHT, StringUtils.toString(invoiceWeight, eiMetadata.getMeta(FIELD_INVOICE_WEIGHT)));
map.put(FIELD_INVOICE_AMOUNT, StringUtils.toString(invoiceAmount, eiMetadata.getMeta(FIELD_INVOICE_AMOUNT)));
map.put(FIELD_INVOICE_REMAINING_QTY, StringUtils.toString(invoiceRemainingQty, eiMetadata.getMeta(FIELD_INVOICE_REMAINING_QTY)));
map.put(FIELD_INVOICE_REMAINING_WEIGHT, StringUtils.toString(invoiceRemainingWeight, eiMetadata.getMeta(FIELD_INVOICE_REMAINING_WEIGHT)));
map.put(FIELD_INVOICE_REMAINING_AMOUNT, StringUtils.toString(invoiceRemainingAmount, eiMetadata.getMeta(FIELD_INVOICE_REMAINING_AMOUNT)));
return map;
}
}
......@@ -50,7 +50,13 @@
PROJ_NAME as "projName", <!-- 项目名称 -->
CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
CANCEL_AMOUNT as "cancelAmount",
UN_CANCEL_AMOUNT as "unCancelAmount"
UN_CANCEL_AMOUNT as "unCancelAmount",
INVOICE_QTY as "invoiceQty",
INVOICE_WEIGHT as "invoiceWeight",
INVOICE_AMOUNT as "invoiceAmount",
INVOICE_REMAINING_QTY as "invoiceRemainingQty",
INVOICE_REMAINING_WEIGHT as "invoiceRemainingWeight",
INVOICE_REMAINING_AMOUNT as "invoiceRemainingAmount"
</sql>
<sql id="condition">
......@@ -273,7 +279,13 @@
PROJ_NAME, <!-- 项目名称 -->
CALCULATION_METHOD, <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
CANCEL_AMOUNT,
UN_CANCEL_AMOUNT
UN_CANCEL_AMOUNT,
INVOICE_QTY,
INVOICE_WEIGHT,
INVOICE_AMOUNT,
INVOICE_REMAINING_QTY,
INVOICE_REMAINING_WEIGHT,
INVOICE_REMAINING_AMOUNT
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#companyCode#, #companyName#, #receiveDate#, #receiveNo#, #receiveLineNo#, #planNo#,
......@@ -282,7 +294,8 @@
#material#, #unit#, #length#, #width#, #thick#, #receiveQty#, #deliverQty#,
#depositQty#, #receiveUnitWeight#, #receiveWeight#, #status#, #price#, #amount#,
#taxIncludeAmount#, #taxAmount#, #taxRate#, #inventTypeDetail#, #primaryId#,
#isInvoicing#, #projCode#, #projName#, #calculationMethod#, #cancelAmount#, #unCancelAmount#
#isInvoicing#, #projCode#, #projName#, #calculationMethod#, #cancelAmount#, #unCancelAmount#,
#invoiceQty#, #invoiceWeight#, #invoiceAmount#, #invoiceRemainingQty#, #invoiceRemainingWeight#, #invoiceRemainingAmount#
)
</insert>
......@@ -327,6 +340,12 @@
IS_INVOICING = #isInvoicing#,
CANCEL_AMOUNT = #cancelAmount#,
UN_CANCEL_AMOUNT = #unCancelAmount#,
INVOICE_QTY = #invoiceQty#,
INVOICE_WEIGHT = #invoiceWeight#,
INVOICE_AMOUNT = #invoiceAmount#,
INVOICE_REMAINING_QTY = #invoiceRemainingQty#,
INVOICE_REMAINING_WEIGHT = #invoiceRemainingWeight#,
INVOICE_REMAINING_AMOUNT = #invoiceRemainingAmount#,
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
......@@ -418,7 +437,13 @@
b.PUR_USER_ID as "purUserId", <!-- 采购员 -->
b.PUR_USER_NAME as "purUserName", <!-- 采购员名称 -->
a.CANCEL_AMOUNT as "cancelAmount",
a.UN_CANCEL_AMOUNT as "unCancelAmount"
a.UN_CANCEL_AMOUNT as "unCancelAmount",
a.INVOICE_QTY as "invoiceQty",
a.INVOICE_WEIGHT as "invoiceWeight",
a.INVOICE_AMOUNT as "invoiceAmount",
a.INVOICE_REMAINING_QTY as "invoiceRemainingQty",
a.INVOICE_REMAINING_WEIGHT as "invoiceRemainingWeight",
a.INVOICE_REMAINING_AMOUNT as "invoiceRemainingAmount"
FROM ${hggpSchema}.HGCG003A a
LEFT JOIN ${hggpSchema}.HGCG003 b ON a.PRIMARY_ID = b.id
WHERE 1=1
......
......@@ -51,6 +51,14 @@ public class HGCW013 extends DaoEPBase {
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
//页面取值字段
public static final String FIELD_SAVE_INVOICE_QTY = "saveInvoiceQty"; /* 收票数量*/
public static final String FIELD_SAVE_INVOICE_WEIGHT = "saveInvoiceWeight"; /* 收票重量*/
public static final String FIELD_SAVE_INVOICE_AMOUNT = "saveInvoiceAmount"; /* 收票金额*/
public static final String FIELD_INVOICE_REMAINING_QTY = "invoiceRemainingQty"; /* 收票剩余数量*/
public static final String FIELD_INVOICE_REMAINING_WEIGHT = "invoiceRemainingWeight"; /* 收票剩余重量*/
public static final String FIELD_INVOICE_REMAINING_AMOUNT = "invoiceRemainingAmount"; /* 收票剩余金额*/
public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -104,6 +112,14 @@ public class HGCW013 extends DaoEPBase {
private String spec = " "; /* 规格*/
private String contractNo = " "; /* 合同号*/
//页面取值字段
private BigDecimal saveInvoiceQty = new BigDecimal("0"); /* 收票数量*/
private BigDecimal saveInvoiceWeight = new BigDecimal("0"); /* 收票重量*/
private BigDecimal saveInvoiceAmount = new BigDecimal("0"); /* 收票金额*/
private BigDecimal invoiceRemainingQty = new BigDecimal("0"); /* 收票剩余数量*/
private BigDecimal invoiceRemainingWeight = new BigDecimal("0"); /* 收票剩余重量*/
private BigDecimal invoiceRemainingAmount = new BigDecimal("0"); /* 收票剩余金额*/
/**
* initialize the metadata.
*/
......@@ -213,6 +229,48 @@ public class HGCW013 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SAVE_INVOICE_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SAVE_INVOICE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SAVE_INVOICE_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("收票金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_REMAINING_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票剩余数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_REMAINING_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收票剩余重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVOICE_REMAINING_AMOUNT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(12);
eiColumn.setDescName("收票剩余金额");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -576,6 +634,54 @@ public class HGCW013 extends DaoEPBase {
this.contractNo = contractNo;
}
public BigDecimal getSaveInvoiceQty() {
return saveInvoiceQty;
}
public void setSaveInvoiceQty(BigDecimal saveInvoiceQty) {
this.saveInvoiceQty = saveInvoiceQty;
}
public BigDecimal getSaveInvoiceWeight() {
return saveInvoiceWeight;
}
public void setSaveInvoiceWeight(BigDecimal saveInvoiceWeight) {
this.saveInvoiceWeight = saveInvoiceWeight;
}
public BigDecimal getSaveInvoiceAmount() {
return saveInvoiceAmount;
}
public void setSaveInvoiceAmount(BigDecimal saveInvoiceAmount) {
this.saveInvoiceAmount = saveInvoiceAmount;
}
public BigDecimal getInvoiceRemainingQty() {
return invoiceRemainingQty;
}
public void setInvoiceRemainingQty(BigDecimal invoiceRemainingQty) {
this.invoiceRemainingQty = invoiceRemainingQty;
}
public BigDecimal getInvoiceRemainingWeight() {
return invoiceRemainingWeight;
}
public void setInvoiceRemainingWeight(BigDecimal invoiceRemainingWeight) {
this.invoiceRemainingWeight = invoiceRemainingWeight;
}
public BigDecimal getInvoiceRemainingAmount() {
return invoiceRemainingAmount;
}
public void setInvoiceRemainingAmount(BigDecimal invoiceRemainingAmount) {
this.invoiceRemainingAmount = invoiceRemainingAmount;
}
/**
* get the value from Map.
*
......@@ -609,6 +715,13 @@ public class HGCW013 extends DaoEPBase {
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
//页面取值字段
setSaveInvoiceQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SAVE_INVOICE_QTY)), saveInvoiceQty));
setSaveInvoiceWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SAVE_INVOICE_WEIGHT)), saveInvoiceWeight));
setSaveInvoiceAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_SAVE_INVOICE_AMOUNT)), saveInvoiceAmount));
setInvoiceRemainingQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_REMAINING_QTY)), invoiceRemainingQty));
setInvoiceRemainingWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_REMAINING_WEIGHT)), invoiceRemainingWeight));
setInvoiceRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INVOICE_REMAINING_AMOUNT)), invoiceRemainingAmount));
}
/**
......@@ -644,6 +757,13 @@ public class HGCW013 extends DaoEPBase {
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
map.put(FIELD_SAVE_INVOICE_QTY, StringUtils.toString(saveInvoiceQty, eiMetadata.getMeta(FIELD_SAVE_INVOICE_QTY)));
map.put(FIELD_SAVE_INVOICE_WEIGHT, StringUtils.toString(saveInvoiceWeight, eiMetadata.getMeta(FIELD_SAVE_INVOICE_WEIGHT)));
map.put(FIELD_SAVE_INVOICE_AMOUNT, StringUtils.toString(saveInvoiceAmount, eiMetadata.getMeta(FIELD_SAVE_INVOICE_AMOUNT)));
map.put(FIELD_INVOICE_REMAINING_QTY, StringUtils.toString(invoiceRemainingQty, eiMetadata.getMeta(FIELD_INVOICE_REMAINING_QTY)));
map.put(FIELD_INVOICE_REMAINING_WEIGHT, StringUtils.toString(invoiceRemainingWeight, eiMetadata.getMeta(FIELD_INVOICE_REMAINING_WEIGHT)));
map.put(FIELD_INVOICE_REMAINING_AMOUNT, StringUtils.toString(invoiceRemainingAmount, eiMetadata.getMeta(FIELD_INVOICE_REMAINING_AMOUNT)));
return map;
}
}
......@@ -12,11 +12,13 @@ import com.baosight.hggp.hg.cg.constant.HgCgConst;
import com.baosight.hggp.hg.cg.domain.HGCG003;
import com.baosight.hggp.hg.cg.domain.HGCG003B;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -246,7 +248,7 @@ public class ServiceHGCW012 extends ServiceBase {
}
}
DaoUtils.update(HGCW012.DELETE, hgcw012);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......@@ -408,17 +410,44 @@ public class ServiceHGCW012 extends ServiceBase {
//hgcw012.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
DaoUtils.insert(HGCW012.INSERT, hgcw012);
List<HGCG003B> hgcg003BList = MapUtils.toDaoEPBases(inInfo, HGCG003B.class);
Map<Long, HGCG003B> dbCg003BMap = HGCGUtils.HgCg003B.lockGetDataEp(hgcg003BList);
//生成明细表
for (HGCW013 hgcw013 : hgcw013List) {
HGCG003B hgcg003B = dbCg003BMap.get(hgcw013.getId());
hgcw013.setMainId(hgcw012.getId());
//跟新采购收票状态
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HGCG003B.FIELD_RECEIVE_NO, hgcw013.getSettlementNumber());
paramMap.put(HGCG003B.FIELD_IS_INVOICING, HGConstant.CgIsInvoicing.S_1);
paramMap.put(HGCG003B.FIELD_IS_INVOICING, HGConstant.CgIsInvoicing.S_0);
paramMap.put(HGCG003B.FIELD_CANCEL_AMOUNT, hgcw013.getTotalContractPriceIncluding());
paramMap.put(HGCG003B.FIELD_UN_CANCEL_AMOUNT, 0);
paramMap.put(HGCG003B.FIELD_ID, hgcw013.getId());
if(Objects.nonNull(hgcg003B)){
paramMap.put(HGCG003B.FIELD_INVOICE_QTY, hgcg003B.getInvoiceQty().add(hgcw013.getSaveInvoiceQty()));
paramMap.put(HGCG003B.FIELD_INVOICE_WEIGHT, hgcg003B.getInvoiceWeight().add(hgcw013.getSaveInvoiceWeight()));
paramMap.put(HGCG003B.FIELD_INVOICE_AMOUNT, hgcg003B.getInvoiceAmount().add(hgcw013.getSaveInvoiceAmount()));
if(hgcg003B.getInvoiceRemainingQty().compareTo(BigDecimal.ZERO) > 0){
paramMap.put(HGCG003B.FIELD_INVOICE_REMAINING_QTY, hgcg003B.getInvoiceRemainingQty().subtract(hgcw013.getSaveInvoiceQty()));
}else{
paramMap.put(HGCG003B.FIELD_INVOICE_REMAINING_QTY, hgcg003B.getReceiveQty().subtract(hgcw013.getSaveInvoiceQty()));
}
if(hgcg003B.getInvoiceRemainingWeight().compareTo(BigDecimal.ZERO) > 0){
paramMap.put(HGCG003B.FIELD_INVOICE_REMAINING_WEIGHT, hgcg003B.getInvoiceRemainingWeight().subtract(hgcw013.getSaveInvoiceWeight()));
}else{
paramMap.put(HGCG003B.FIELD_INVOICE_REMAINING_WEIGHT, hgcg003B.getReceiveWeight().subtract(hgcw013.getSaveInvoiceWeight()));
}
if(hgcg003B.getInvoiceRemainingAmount().compareTo(BigDecimal.ZERO) > 0){
paramMap.put(HGCG003B.FIELD_INVOICE_REMAINING_AMOUNT, hgcg003B.getInvoiceRemainingAmount().subtract(hgcw013.getSaveInvoiceAmount()));
}else{
paramMap.put(HGCG003B.FIELD_INVOICE_REMAINING_AMOUNT, hgcg003B.getAmount().subtract(hgcw013.getSaveInvoiceAmount()));
}
//收货金额等于开票金额
if(hgcg003B.getAmount().compareTo(hgcg003B.getInvoiceAmount().add(hgcw013.getSaveInvoiceAmount())) == 0){
paramMap.put(HGCG003B.FIELD_IS_INVOICING, HGConstant.CgIsInvoicing.S_1);
}
}
DaoUtils.update(HGSqlConstant.HgCg003A.UPDATE_IS_INVOICING, paramMap);
hgcw013.setId(null);
this.addHGCW013(hgcw013);
......
......@@ -4,33 +4,33 @@
Version : 1.0
schema : hggp
tableName : HGCW008
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW012A">
......@@ -456,7 +456,13 @@
A.IS_INVOICING as "isInvoicing",
A.CALCULATION_METHOD as "calculationMethod", <!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
A.CANCEL_AMOUNT as "cancelAmount",
A.UN_CANCEL_AMOUNT as "unCancelAmount"
A.UN_CANCEL_AMOUNT as "unCancelAmount",
A.INVOICE_QTY as "invoiceQty",
A.INVOICE_WEIGHT as "invoiceWeight",
A.INVOICE_AMOUNT as "invoiceAmount",
A.INVOICE_REMAINING_QTY as "invoiceRemainingQty",
A.INVOICE_REMAINING_WEIGHT as "invoiceRemainingWeight",
A.INVOICE_REMAINING_AMOUNT as "invoiceRemainingAmount"
FROM ${hggpSchema}.HGCG003A A LEFT JOIN ${hggpSchema}.HGCG003 B ON A.PRIMARY_ID = B.ID
WHERE A.DELETE_FLAG = 0 and b.delete_flag = 0
<isNotEmpty prepend=" AND " property="id">
......
......@@ -75,6 +75,66 @@ function btnSaveFunc(btnNode, gridNode) {
return;
}
let flag = true;
if(gridNode == 'result'){
$.each(rows, function(index, item) {
let saveInvoiceQty = item['saveInvoiceQty'];
let depositQty = item['depositQty'];
let invoiceRemainingQty = item['invoiceRemainingQty'];
if (!isNumber(saveInvoiceQty) && !isPositiveNumber(saveInvoiceQty)) {
message("勾选的第" + (index + 1) + "行收票数量必须是大于0的数字");
flag = false;
return false;
}
if (parseFloat(saveInvoiceQty) > parseFloat(depositQty)) {
message("第" + (index + 1) + "行收票数量不能大于数量");
flag = false;
return false;
}
if (parseFloat(saveInvoiceQty) > parseFloat(invoiceRemainingQty)) {
message("第" + (index + 1) + "行收票数量不能大于收票剩余数量");
flag = false;
return false;
}
let saveInvoiceWeight = item['saveInvoiceWeight'];
let receiveWeight = item['receiveWeight'];
let invoiceRemainingWeight = item['invoiceRemainingWeight'];
if (!isNumber(saveInvoiceWeight) && !isPositiveNumber(saveInvoiceWeight)) {
message("勾选的第" + (index + 1) + "行收票重量必须是大于0的数字");
flag = false;
return false;
}
if (parseFloat(saveInvoiceWeight) > parseFloat(receiveWeight)) {
message("第" + (index + 1) + "行收票重量不能大于重量");
flag = false;
return false;
}
if (parseFloat(saveInvoiceWeight) > parseFloat(invoiceRemainingWeight)) {
message("第" + (index + 1) + "行收票重量不能大于收票剩余重量");
flag = false;
return false;
}
let thisSettlementAmount = item['thisSettlementAmount'];
let amount = item['amount'];
let invoiceRemainingAmount = item['invoiceRemainingAmount'];
if (!isNumber(thisSettlementAmount) && !isPositiveNumber(thisSettlementAmount)) {
message("勾选的第" + (index + 1) + "行发票总额必须是大于0的数字");
flag = false;
return false;
}
if (parseFloat(thisSettlementAmount) > parseFloat(amount)) {
message("第" + (index + 1) + "行发票总额不能大于收货金额");
flag = false;
return false;
}
if (parseFloat(thisSettlementAmount) > parseFloat(invoiceRemainingAmount)) {
message("第" + (index + 1) + "行发票总额不能大于收票剩余金额");
flag = false;
return false;
}
})
}
if(gridNode == 'resultA'){
$.each(rows, function(index, item) {
let thisAmount = item['thisAmount'];
......@@ -222,7 +282,7 @@ $(function () {
field: "depositQty",
title: "数量",
headerTemplate: "<span style='color: '>数量 </span>",
format:"{0:N0}",
format:"{0:N2}",
align:"right",
enable: false,
locked: false
......@@ -243,7 +303,7 @@ $(function () {
editType: "date",
parseFormats:"['yyyyMMdd']",
dateFormat:"yyyy-MM-dd",
enable: true,
enable: false,
locked: false,
template: function (date) {
if (date.receiveDate instanceof Date){
......@@ -271,18 +331,104 @@ $(function () {
format:"{0:C2}",
align:"right",
locked: false,
attributes: {required: true},
template: function (item) {
if (isBlank(item.thisSettlementAmount)){
//剩余金额大于0,默认为剩余金额
if (item.isInvoicing == 0 && item.invoiceRemainingAmount > 0 && isBlank(item.thisSettlementAmount)){
item.thisSettlementAmount = item.invoiceRemainingAmount;
}else if (isBlank(item.thisSettlementAmount)){
item.thisSettlementAmount = item.taxIncludeAmount;
resultGrid.setCellValue(item, "thisSettlementAmount", item.taxIncludeAmount)
}
item.saveInvoiceAmount = item.thisSettlementAmount;
return kendo.format("{0:C2}",parseFloat(item.thisSettlementAmount));
}
},
{
field: "saveInvoiceQty",
title: "收票数量",
headerTemplate: "<span style='color: '>收票数量 </span>",
format:"{0:N2}",
align:"right",
enable: true,
locked: false,
attributes: {required: true},
template: function (item) {
if (item.isInvoicing == 0 && item.invoiceRemainingQty > 0 && isBlank(item.saveInvoiceQty)){
item.saveInvoiceQty = item.invoiceRemainingQty;
}else if (item.isInvoicing == 0 && isBlank(item.saveInvoiceQty)){
item.saveInvoiceQty = item.depositQty;
}
return kendo.format("{0:N2}",parseFloat(item.saveInvoiceQty));
}
},
{
field: "saveInvoiceWeight",
title: "收票重量",
headerTemplate: "<span style='color: '>收票重量 </span>",
format:"{0:N2}",
align:"right",
enable: true,
locked: false,
attributes: {required: true},
template: function (item) {
if (item.isInvoicing == 0 && item.invoiceRemainingWeight > 0 && isBlank(item.saveInvoiceWeight)){
item.saveInvoiceWeight = item.invoiceRemainingWeight;
}else if (item.isInvoicing == 0 && isBlank(item.saveInvoiceWeight)){
item.saveInvoiceWeight = item.receiveWeight;
}
return kendo.format("{0:N2}",parseFloat(item.saveInvoiceWeight));
}
},
{
field: "invoiceRemainingQty",
title: "收票剩余数量",
headerTemplate: "<span style='color: '>收票剩余数量 </span>",
format:"{0:N2}",
align:"right",
enable: false,
locked: false,
template: function (item) {
if (item.isInvoicing == 0 && item.invoiceRemainingQty == 0){
item.invoiceRemainingQty = item.depositQty;
}
return kendo.format("{0:N2}",parseFloat(item.invoiceRemainingQty));
}
},
{
field: "invoiceRemainingWeight",
title: "收票剩余重量",
headerTemplate: "<span style='color: '>收票剩余重量 </span>",
format:"{0:N2}",
align:"right",
enable: false,
locked: false,
template: function (item) {
if (item.isInvoicing == 0 && item.invoiceRemainingWeight == 0){
item.invoiceRemainingWeight = item.receiveWeight;
}
return kendo.format("{0:N2}",parseFloat(item.invoiceRemainingWeight));
}
},
{
field: "invoiceRemainingAmount",
title: "收票剩余金额",
headerTemplate: "<span style='color: '>收票剩余金额 </span>",
format:"{0:C2}",
align:"right",
enable: false,
locked: false,
template: function (item) {
if (item.isInvoicing == 0 && item.invoiceRemainingAmount == 0){
item.invoiceRemainingAmount = item.amount;
}
return kendo.format("{0:N2}",parseFloat(item.invoiceRemainingAmount));
}
}],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-1").on("click", function () {
grid.dataSource.page(1);
});
},
dataBound: function (e) {
......
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