Commit fbedab41 by 13420

采购收票bug调整

parent 86088286
......@@ -17,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-05 9:05:21 create
* @history 2024-07-04 17:28:58 create
*/
public class HGCW012 extends DaoEPBase {
......@@ -48,8 +48,13 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_RECEIVE_DATE = "receiveDate"; /* 收票日期*/
public static final String FIELD_CONTRACT_TYPE = "contractType"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_CONTRACT_TYPE = "contractType"; /* 合同类型;1.采购收货2.劳务3.租赁*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /* 存货大类*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -75,6 +80,13 @@ public class HGCW012 extends DaoEPBase {
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_REMAINING_AMOUNT = "REMAINING_AMOUNT"; /* 剩余开票/收票金额*/
public static final String COL_RECEIVE_DATE = "RECEIVE_DATE"; /* 收票日期*/
public static final String COL_CONTRACT_TYPE = "CONTRACT_TYPE"; /* 合同类型;1.采购收货2.劳务3.租赁*/
public static final String COL_INVENT_TYPE_DETAIL = "INVENT_TYPE_DETAIL"; /* 存货大类*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
public static final String COL_DEPOSIT_QTY = "DEPOSIT_QTY"; /* 入库数量*/
public static final String COL_RECEIVE_WEIGHT = "RECEIVE_WEIGHT"; /* 收货重量*/
public static final String QUERY = "HGCW012.query";
public static final String COUNT = "HGCW012.count";
......@@ -87,12 +99,12 @@ public class HGCW012 extends DaoEPBase {
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String settlementNumber = " "; /* 来源单号*/
private Integer billTybe = new Integer(1); /* 票据类型*/
private Integer billTybe = new Integer(0); /* 票据类型*/
private String billNumber = " "; /* 发票号*/
private Integer billState = new Integer(0); /* 开票状态*/
private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 供应商名称*/
private Integer reviewStatus = 0; /* 审批状态*/
private Boolean reviewStatus; /* 审批状态*/
private Integer taxPoints = new Integer(0); /* 税率*/
private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/
......@@ -106,7 +118,13 @@ public class HGCW012 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/
private String receiveDate = " "; /* 收票日期*/
private Integer contractType;
private Boolean contractType; /* 合同类型;1.采购收货2.劳务3.租赁*/
private Boolean inventTypeDetail; /* 存货大类*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/
private BigDecimal receiveWeight = new BigDecimal("0"); /* 收货重量*/
/**
* initialize the metadata.
......@@ -218,7 +236,37 @@ public class HGCW012 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_TYPE);
eiColumn.setDescName("合同类型");
eiColumn.setDescName("合同类型;1.采购收货2.劳务3.租赁");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
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);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPOSIT_QTY);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("入库数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECEIVE_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn);
......@@ -395,7 +443,7 @@ public class HGCW012 extends DaoEPBase {
* get the reviewStatus - 审批状态.
* @return the reviewStatus
*/
public Integer getReviewStatus() {
public Boolean getReviewStatus() {
return this.reviewStatus;
}
......@@ -404,7 +452,7 @@ public class HGCW012 extends DaoEPBase {
*
* @param reviewStatus - 审批状态
*/
public void setReviewStatus(Integer reviewStatus) {
public void setReviewStatus(Boolean reviewStatus) {
this.reviewStatus = reviewStatus;
}
/**
......@@ -615,15 +663,119 @@ public class HGCW012 extends DaoEPBase {
public void setReceiveDate(String receiveDate) {
this.receiveDate = receiveDate;
}
public Integer getContractType() {
return contractType;
/**
* get the contractType - 合同类型;1.采购收货2.劳务3.租赁.
* @return the contractType
*/
public Boolean getContractType() {
return this.contractType;
}
public void setContractType(Integer contractType) {
/**
* set the contractType - 合同类型;1.采购收货2.劳务3.租赁.
*
* @param contractType - 合同类型;1.采购收货2.劳务3.租赁
*/
public void setContractType(Boolean contractType) {
this.contractType = contractType;
}
/**
* get the inventTypeDetail - 存货大类.
* @return the inventTypeDetail
*/
public Boolean getInventTypeDetail() {
return this.inventTypeDetail;
}
/**
* set the inventTypeDetail - 存货大类.
*
* @param inventTypeDetail - 存货大类
*/
public void setInventTypeDetail(Boolean inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the depositQty - 入库数量.
* @return the depositQty
*/
public BigDecimal getDepositQty() {
return this.depositQty;
}
/**
* set the depositQty - 入库数量.
*
* @param depositQty - 入库数量
*/
public void setDepositQty(BigDecimal depositQty) {
this.depositQty = depositQty;
}
/**
* get the receiveWeight - 收货重量.
* @return the receiveWeight
*/
public BigDecimal getReceiveWeight() {
return this.receiveWeight;
}
/**
* set the receiveWeight - 收货重量.
*
* @param receiveWeight - 收货重量
*/
public void setReceiveWeight(BigDecimal receiveWeight) {
this.receiveWeight = receiveWeight;
}
/**
* get the value from Map.
*
* @param map - source data map
......@@ -641,7 +793,7 @@ public class HGCW012 extends DaoEPBase {
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
......@@ -655,7 +807,13 @@ public class HGCW012 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setReceiveDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_DATE)), receiveDate));
setContractType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_TYPE)), contractType));
setContractType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_CONTRACT_TYPE)), contractType));
setInventTypeDetail(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
}
/**
......@@ -690,6 +848,12 @@ public class HGCW012 extends DaoEPBase {
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put(FIELD_RECEIVE_DATE, StringUtils.toString(receiveDate, eiMetadata.getMeta(FIELD_RECEIVE_DATE)));
map.put(FIELD_CONTRACT_TYPE, StringUtils.toString(contractType, eiMetadata.getMeta(FIELD_CONTRACT_TYPE)));
map.put(FIELD_INVENT_TYPE_DETAIL, StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
return map;
}
......
<?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-06-05 9:05:21
Generate time : 2024-07-04 17:33:00
Version : 1.0
schema : hggp
tableName : HGCW012
......@@ -27,39 +27,18 @@
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR,
REMAINING_AMOUNT DECIMAL,
RECEIVE_DATE VARCHAR
RECEIVE_DATE VARCHAR,
CONTRACT_TYPE TINYINT,
INVENT_TYPE_DETAIL TINYINT,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
SPEC VARCHAR,
DEPOSIT_QTY DECIMAL,
RECEIVE_WEIGHT DECIMAL
-->
<sqlMap namespace="HGCW012">
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_TYBE as "billTybe", <!-- 票据类型 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
BILL_STATE as "billState", <!-- 开票状态 -->
SIGNING_DATE as "signingDate", <!-- 开票日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 发票总额 -->
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", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount", <!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate", <!-- 收票日期 -->
CONTRACT_TYPE as "contractType"
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -70,7 +49,7 @@
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME like ('%$companyName$%')
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
......@@ -79,7 +58,7 @@
BILL_TYBE = #billTybe#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER like ('%$billNumber$%')
BILL_NUMBER = #billNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billState">
BILL_STATE = #billState#
......@@ -88,7 +67,7 @@
SIGNING_DATE = #signingDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A like ('%$partyA$%')
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
......@@ -132,24 +111,63 @@
<isNotEmpty prepend=" AND " property="receiveDate">
RECEIVE_DATE = #receiveDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
<isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="hiddenConditions">
REMAINING_AMOUNT > 0
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
resultClass="com.baosight.hggp.hg.cw.service.HGCW012">
SELECT
<include refid="column" />
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_TYBE as "billTybe", <!-- 票据类型 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
BILL_STATE as "billState", <!-- 开票状态 -->
SIGNING_DATE as "signingDate", <!-- 开票日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 发票总额 -->
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", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount", <!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate", <!-- 收票日期 -->
CONTRACT_TYPE as "contractType", <!-- 合同类型;1.采购收货2.劳务3.租赁 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货大类 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
RECEIVE_WEIGHT as "receiveWeight" <!-- 收货重量 -->
FROM ${hggpSchema}.HGCW012 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -157,7 +175,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
ID asc
</isEmpty>
</dynamic>
......@@ -241,6 +259,27 @@
<isNotEmpty prepend=" AND " property="receiveDate">
RECEIVE_DATE = #receiveDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
-->
<insert id="insert">
......@@ -268,12 +307,15 @@
DEP_CODE, <!-- 部门编码 -->
REMAINING_AMOUNT, <!-- 剩余开票/收票金额 -->
RECEIVE_DATE, <!-- 收票日期 -->
CONTRACT_TYPE
CONTRACT_TYPE, <!-- 合同类型;1.采购收货2.劳务3.租赁 -->
INVENT_TYPE_DETAIL, <!-- 存货大类 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
DEPOSIT_QTY, <!-- 入库数量 -->
RECEIVE_WEIGHT <!-- 收货重量 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#,#contractType#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012
</selectKey>
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#, #contractType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #depositQty#, #receiveWeight#)
</insert>
<delete id="delete">
......@@ -307,80 +349,15 @@
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票/收票金额 -->
RECEIVE_DATE = #receiveDate#, <!-- 收票日期 -->
CONTRACT_TYPE = #contractType#
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hggpSchema}.HGCW012
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
<update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW012
SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票/收票金额 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
CONTRACT_TYPE = #contractType#, <!-- 合同类型;1.采购收货2.劳务3.租赁 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#, <!-- 存货大类 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
RECEIVE_WEIGHT = #receiveWeight# <!-- 收货重量 -->
WHERE
ID = #id#
</update>
<select id="queryCheckList" resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGCW012
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="billDate">
LEFT(RECEIVE_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
REVIEW_STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<!--查询采购已审核开票金额-->
<select id="queryInvoicing" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
B.ACCOUNT_CODE as "accountCode",
B.COMPANY_CODE as "companyCode",
C.SETTLEMENT_NUMBER as "receiveNo", <!-- 收货单号 -->
SUM(C.THIS_SETTLEMENT_TAX) as "thisSettlementAmount" <!-- 金额 -->
from ${hggpSchema}.HGCW012 B
inner join ${hggpSchema}.HGCW013 C on B.ID = C.MAIN_ID
WHERE B.CONTRACT_TYPE = 1 AND B.REVIEW_STATUS = 1
<isNotEmpty prepend=" AND " property="accountCode">
B.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
B.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
B.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
B.SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
left(B.SIGNING_DATE,6) = #accountPeriod#
</isNotEmpty>
GROUP BY B.ACCOUNT_CODE, B.COMPANY_CODE, C.SETTLEMENT_NUMBER
</select>
</sqlMap>
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