Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
46f30bf6
Commit
46f30bf6
authored
May 28, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算单管理-增加收款付款剩余金额
parent
e7fbac6b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
72 deletions
+92
-72
HGCW008.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW008.java
+24
-0
HGCW012.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012.java
+0
-0
ServiceHGCW008.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
+1
-0
HGCW008.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW008.xml
+15
-1
HGCW012.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
+25
-70
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+23
-0
HGSC001.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
+1
-1
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+3
-0
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW008.java
View file @
46f30bf6
...
@@ -42,6 +42,7 @@ public class HGCW008 extends DaoEPBase {
...
@@ -42,6 +42,7 @@ public class HGCW008 extends DaoEPBase {
public
static
final
String
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
=
"cumulativeSettlementAmount"
;
/* 累计结算金额*/
public
static
final
String
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
=
"cumulativeSettlementAmount"
;
/* 累计结算金额*/
public
static
final
String
FIELD_CUMULATIVE_SETTLEMENT_TAX
=
"cumulativeSettlementTax"
;
/* 累计结算税金*/
public
static
final
String
FIELD_CUMULATIVE_SETTLEMENT_TAX
=
"cumulativeSettlementTax"
;
/* 累计结算税金*/
public
static
final
String
FIELD_CUMULATIVE_PRICE_TAX
=
"cumulativePriceTax"
;
/* 累计结算价税合计金额*/
public
static
final
String
FIELD_CUMULATIVE_PRICE_TAX
=
"cumulativePriceTax"
;
/* 累计结算价税合计金额*/
public
static
final
String
FIELD_REMAINING_AMOUNT
=
"remainingAmount"
;
/* 累计结算价税合计金额*/
public
static
final
String
FIELD_REVIEW_STATUS
=
"reviewStatus"
;
/* 审核状态*/
public
static
final
String
FIELD_REVIEW_STATUS
=
"reviewStatus"
;
/* 审核状态*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 记录创建名称*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 记录创建名称*/
...
@@ -71,6 +72,9 @@ public class HGCW008 extends DaoEPBase {
...
@@ -71,6 +72,9 @@ public class HGCW008 extends DaoEPBase {
public
static
final
String
COL_CUMULATIVE_SETTLEMENT_AMOUNT
=
"CUMULATIVE_SETTLEMENT_AMOUNT"
;
/* 累计结算金额*/
public
static
final
String
COL_CUMULATIVE_SETTLEMENT_AMOUNT
=
"CUMULATIVE_SETTLEMENT_AMOUNT"
;
/* 累计结算金额*/
public
static
final
String
COL_CUMULATIVE_SETTLEMENT_TAX
=
"CUMULATIVE_SETTLEMENT_TAX"
;
/* 累计结算税金*/
public
static
final
String
COL_CUMULATIVE_SETTLEMENT_TAX
=
"CUMULATIVE_SETTLEMENT_TAX"
;
/* 累计结算税金*/
public
static
final
String
COL_CUMULATIVE_PRICE_TAX
=
"CUMULATIVE_PRICE_TAX"
;
/* 累计结算价税合计金额*/
public
static
final
String
COL_CUMULATIVE_PRICE_TAX
=
"CUMULATIVE_PRICE_TAX"
;
/* 累计结算价税合计金额*/
public
static
final
String
COL_REMAINING_AMOUNT
=
"REMAINING_AMOUNT"
;
/* 累计结算价税合计金额*/
public
static
final
String
COL_REVIEW_STATUS
=
"REVIEW_STATUS"
;
/* 审核状态*/
public
static
final
String
COL_REVIEW_STATUS
=
"REVIEW_STATUS"
;
/* 审核状态*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 记录创建名称*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 记录创建名称*/
...
@@ -106,6 +110,7 @@ public class HGCW008 extends DaoEPBase {
...
@@ -106,6 +110,7 @@ public class HGCW008 extends DaoEPBase {
private
BigDecimal
cumulativeSettlementAmount
=
new
BigDecimal
(
"0"
);
/* 累计结算金额*/
private
BigDecimal
cumulativeSettlementAmount
=
new
BigDecimal
(
"0"
);
/* 累计结算金额*/
private
BigDecimal
cumulativeSettlementTax
=
new
BigDecimal
(
"0"
);
/* 累计结算税金*/
private
BigDecimal
cumulativeSettlementTax
=
new
BigDecimal
(
"0"
);
/* 累计结算税金*/
private
BigDecimal
cumulativePriceTax
=
new
BigDecimal
(
"0"
);
/* 累计结算价税合计金额*/
private
BigDecimal
cumulativePriceTax
=
new
BigDecimal
(
"0"
);
/* 累计结算价税合计金额*/
private
BigDecimal
remainingAmount
=
new
BigDecimal
(
"0"
);
/* 累计结算价税合计金额*/
private
Integer
reviewStatus
;
/* 审核状态*/
private
Integer
reviewStatus
;
/* 审核状态*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdName
=
" "
;
/* 记录创建名称*/
private
String
createdName
=
" "
;
/* 记录创建名称*/
...
@@ -223,6 +228,13 @@ public class HGCW008 extends DaoEPBase {
...
@@ -223,6 +228,13 @@ public class HGCW008 extends DaoEPBase {
eiColumn
.
setDescName
(
"累计结算价税合计金额"
);
eiColumn
.
setDescName
(
"累计结算价税合计金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMAINING_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"剩余开票/收票金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REVIEW_STATUS
);
eiColumn
=
new
EiColumn
(
FIELD_REVIEW_STATUS
);
eiColumn
.
setDescName
(
"审核状态"
);
eiColumn
.
setDescName
(
"审核状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -713,6 +725,14 @@ public class HGCW008 extends DaoEPBase {
...
@@ -713,6 +725,14 @@ public class HGCW008 extends DaoEPBase {
public
void
setDepCode
(
String
depCode
)
{
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
this
.
depCode
=
depCode
;
}
}
public
BigDecimal
getRemainingAmount
()
{
return
remainingAmount
;
}
public
void
setRemainingAmount
(
BigDecimal
remainingAmount
)
{
this
.
remainingAmount
=
remainingAmount
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -741,6 +761,7 @@ public class HGCW008 extends DaoEPBase {
...
@@ -741,6 +761,7 @@ public class HGCW008 extends DaoEPBase {
setCumulativeSettlementAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
)),
cumulativeSettlementAmount
));
setCumulativeSettlementAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
)),
cumulativeSettlementAmount
));
setCumulativeSettlementTax
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CUMULATIVE_SETTLEMENT_TAX
)),
cumulativeSettlementTax
));
setCumulativeSettlementTax
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CUMULATIVE_SETTLEMENT_TAX
)),
cumulativeSettlementTax
));
setCumulativePriceTax
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CUMULATIVE_PRICE_TAX
)),
cumulativePriceTax
));
setCumulativePriceTax
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CUMULATIVE_PRICE_TAX
)),
cumulativePriceTax
));
setRemainingAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMAINING_AMOUNT
)),
remainingAmount
));
setReviewStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REVIEW_STATUS
)),
reviewStatus
));
setReviewStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REVIEW_STATUS
)),
reviewStatus
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
...
@@ -778,6 +799,7 @@ public class HGCW008 extends DaoEPBase {
...
@@ -778,6 +799,7 @@ public class HGCW008 extends DaoEPBase {
map
.
put
(
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
,
StringUtils
.
toString
(
cumulativeSettlementAmount
,
eiMetadata
.
getMeta
(
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
)));
map
.
put
(
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
,
StringUtils
.
toString
(
cumulativeSettlementAmount
,
eiMetadata
.
getMeta
(
FIELD_CUMULATIVE_SETTLEMENT_AMOUNT
)));
map
.
put
(
FIELD_CUMULATIVE_SETTLEMENT_TAX
,
StringUtils
.
toString
(
cumulativeSettlementTax
,
eiMetadata
.
getMeta
(
FIELD_CUMULATIVE_SETTLEMENT_TAX
)));
map
.
put
(
FIELD_CUMULATIVE_SETTLEMENT_TAX
,
StringUtils
.
toString
(
cumulativeSettlementTax
,
eiMetadata
.
getMeta
(
FIELD_CUMULATIVE_SETTLEMENT_TAX
)));
map
.
put
(
FIELD_CUMULATIVE_PRICE_TAX
,
StringUtils
.
toString
(
cumulativePriceTax
,
eiMetadata
.
getMeta
(
FIELD_CUMULATIVE_PRICE_TAX
)));
map
.
put
(
FIELD_CUMULATIVE_PRICE_TAX
,
StringUtils
.
toString
(
cumulativePriceTax
,
eiMetadata
.
getMeta
(
FIELD_CUMULATIVE_PRICE_TAX
)));
map
.
put
(
FIELD_REMAINING_AMOUNT
,
StringUtils
.
toString
(
remainingAmount
,
eiMetadata
.
getMeta
(
FIELD_REMAINING_AMOUNT
)));
map
.
put
(
FIELD_REVIEW_STATUS
,
StringUtils
.
toString
(
reviewStatus
,
eiMetadata
.
getMeta
(
FIELD_REVIEW_STATUS
)));
map
.
put
(
FIELD_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_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
...
@@ -789,4 +811,6 @@ public class HGCW008 extends DaoEPBase {
...
@@ -789,4 +811,6 @@ public class HGCW008 extends DaoEPBase {
return
map
;
return
map
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW012.java
View file @
46f30bf6
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW008.java
View file @
46f30bf6
...
@@ -88,6 +88,7 @@ public class ServiceHGCW008 extends ServiceBase {
...
@@ -88,6 +88,7 @@ public class ServiceHGCW008 extends ServiceBase {
HGCW008
.
setSettlementNumber
(
settlementNumber
);
HGCW008
.
setSettlementNumber
(
settlementNumber
);
HGCW008
.
setReviewStatus
(
0
);
HGCW008
.
setReviewStatus
(
0
);
HGCW008
.
setContractDate
(
DateUtils
.
formatShort
(
HGCW008
.
getContractDate
()));
HGCW008
.
setContractDate
(
DateUtils
.
formatShort
(
HGCW008
.
getContractDate
()));
HGCW008
.
setRemainingAmount
(
HGCW008
.
getThisPriceTax
());
this
.
add
(
HGCW008
);
this
.
add
(
HGCW008
);
// 写入其他数据
// 写入其他数据
HGCWTools
.
HgCw009
.
save
(
detail1Rows
,
settlementNumber
,
userVO
);
HGCWTools
.
HgCw009
.
save
(
detail1Rows
,
settlementNumber
,
userVO
);
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW008.xml
View file @
46f30bf6
...
@@ -152,6 +152,7 @@
...
@@ -152,6 +152,7 @@
CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount",
<!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount",
<!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax",
<!-- 累计结算税金 -->
CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax",
<!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX as "cumulativePriceTax",
<!-- 累计结算价税合计金额 -->
CUMULATIVE_PRICE_TAX as "cumulativePriceTax",
<!-- 累计结算价税合计金额 -->
REMAINING_AMOUNT as "remainingAmount",
<!-- 累计结算价税合计金额 -->
REVIEW_STATUS as "reviewStatus",
<!-- 审核状态 -->
REVIEW_STATUS as "reviewStatus",
<!-- 审核状态 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
...
@@ -286,6 +287,7 @@
...
@@ -286,6 +287,7 @@
CUMULATIVE_SETTLEMENT_AMOUNT,
<!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_AMOUNT,
<!-- 累计结算金额 -->
CUMULATIVE_SETTLEMENT_TAX,
<!-- 累计结算税金 -->
CUMULATIVE_SETTLEMENT_TAX,
<!-- 累计结算税金 -->
CUMULATIVE_PRICE_TAX,
<!-- 累计结算价税合计金额 -->
CUMULATIVE_PRICE_TAX,
<!-- 累计结算价税合计金额 -->
REMAINING_AMOUNT,
<!-- 累计结算价税合计金额 -->
REVIEW_STATUS,
<!-- 审核状态 -->
REVIEW_STATUS,
<!-- 审核状态 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_NAME,
<!-- 记录创建名称 -->
...
@@ -295,7 +297,7 @@
...
@@ -295,7 +297,7 @@
UPDATED_TIME,
<!-- 记录修改时间 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
DEP_CODE
<!-- 部门编码 -->
DEP_CODE
<!-- 部门编码 -->
)
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #settlementNumber#, #settlementType#, #contractDate#, #taxPoints#, #priceTaxSeparation#, #thisSettlementAmount#, #thisSettlementTax#, #thisPriceTax#, #totalContractPrice#, #cumulativeSettlementAmount#, #cumulativeSettlementTax#, #cumulativePriceTax#, #reviewStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #settlementNumber#, #settlementType#, #contractDate#, #taxPoints#, #priceTaxSeparation#, #thisSettlementAmount#, #thisSettlementTax#, #thisPriceTax#, #totalContractPrice#, #cumulativeSettlementAmount#, #cumulativeSettlementTax#, #cumulativePriceTax#,
#remainingAmount#,
#reviewStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW008
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW008
</selectKey>
</selectKey>
...
@@ -351,4 +353,16 @@
...
@@ -351,4 +353,16 @@
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
<update
id=
"updateDeductionAmount"
>
UPDATE ${hggpSchema}.HGCW008
SET
REMAINING_AMOUNT = #remainingAmount#,
<!-- 审核状态 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#
<!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW012.xml
View file @
46f30bf6
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-2
3 9:08:57
Generate time : 2024-05-2
7 16:53:39
Version : 1.0
Version : 1.0
schema : hggp
schema : hggp
tableName : HGCW012
tableName : HGCW012
...
@@ -8,18 +8,16 @@
...
@@ -8,18 +8,16 @@
ACCOUNT_CODE VARCHAR,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_NAME VARCHAR,
PROJ_CODE VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
BILL_TYBE
VARCHAR
,
BILL_TYBE
TINYINT
,
BILL_NUMBER VARCHAR,
BILL_NUMBER VARCHAR,
BILL_STATE
VARCHAR
,
BILL_STATE
TINYINT
,
SIGNING_DATE VARCHAR,
SIGNING_DATE VARCHAR,
PARTY_A VARCHAR,
PARTY_A VARCHAR,
REVIEW_STATUS TINYINT,
REVIEW_STATUS TINYINT NOT NULL primarykey,
TAX_POINTS INTEGER,
THIS_SETTLEMENT_TAX VARCHAR,
THIS_SETTLEMENT_TAX VARCHAR,
THIS_SETTLEMENT_AMOUNT VARCHAR,
THIS_SETTLEMENT_AMOUNT VARCHAR,
TAX_POINTS VARCHAR,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL,
TOTAL_CONTRACT_PRICE_INCLUDING DECIMAL,
CREATED_BY VARCHAR NOT NULL,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
...
@@ -44,12 +42,6 @@
...
@@ -44,12 +42,6 @@
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
COMPANY_NAME = #companyName#
COMPANY_NAME = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"settlementNumber"
>
<isNotEmpty
prepend=
" AND "
property=
"settlementNumber"
>
SETTLEMENT_NUMBER = #settlementNumber#
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
</isNotEmpty>
...
@@ -71,15 +63,15 @@
...
@@ -71,15 +63,15 @@
<isNotEmpty
prepend=
" AND "
property=
"reviewStatus"
>
<isNotEmpty
prepend=
" AND "
property=
"reviewStatus"
>
REVIEW_STATUS = #reviewStatus#
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"taxPoints"
>
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"thisSettlementTax"
>
<isNotEmpty
prepend=
" AND "
property=
"thisSettlementTax"
>
THIS_SETTLEMENT_TAX = #thisSettlementTax#
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"thisSettlementAmount"
>
<isNotEmpty
prepend=
" AND "
property=
"thisSettlementAmount"
>
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"taxPoints"
>
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"totalContractPriceIncluding"
>
<isNotEmpty
prepend=
" AND "
property=
"totalContractPriceIncluding"
>
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
</isNotEmpty>
...
@@ -113,18 +105,16 @@
...
@@ -113,18 +105,16 @@
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PROJ_CODE as "projCode",
<!-- 项目编号 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 来源单号 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 来源单号 -->
BILL_TYBE as "billTybe",
<!-- 票据类型 -->
BILL_TYBE as "billTybe",
<!-- 票据类型 -->
BILL_NUMBER as "billNumber",
<!-- 发票号 -->
BILL_NUMBER as "billNumber",
<!-- 发票号 -->
BILL_STATE as "billState",
<!-- 开票状态 -->
BILL_STATE as "billState",
<!-- 开票状态 -->
SIGNING_DATE as "signingDate",
<!-- 开票日期 -->
SIGNING_DATE as "signingDate",
<!-- 开票日期 -->
PARTY_A as "partyA",
<!-- 客户
名称 -->
PARTY_A as "partyA",
<!-- 供应商
名称 -->
REVIEW_STATUS as "reviewStatus",
<!-- 审批状态 -->
REVIEW_STATUS as "reviewStatus",
<!-- 审批状态 -->
TAX_POINTS as "taxPoints",
<!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税额 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 不含税金额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 不含税金额 -->
TAX_POINTS as "taxPoints",
<!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding",
<!-- 开票总额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding",
<!-- 开票总额 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
...
@@ -140,7 +130,8 @@
...
@@ -140,7 +130,8 @@
$orderBy$
$orderBy$
</isNotEmpty>
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
ID asc
ID asc,
REVIEW_STATUS asc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
...
@@ -164,12 +155,6 @@
...
@@ -164,12 +155,6 @@
<isNotEmpty prepend=" AND " property="companyName">
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
COMPANY_NAME = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
</isNotEmpty>
...
@@ -191,15 +176,15 @@
...
@@ -191,15 +176,15 @@
<isNotEmpty prepend=" AND " property="reviewStatus">
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
</isNotEmpty>
...
@@ -231,18 +216,16 @@
...
@@ -231,18 +216,16 @@
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
COMPANY_NAME,
<!-- 公司名称 -->
PROJ_NAME,
<!-- 项目名称 -->
PROJ_CODE,
<!-- 项目编号 -->
SETTLEMENT_NUMBER,
<!-- 来源单号 -->
SETTLEMENT_NUMBER,
<!-- 来源单号 -->
BILL_TYBE,
<!-- 票据类型 -->
BILL_TYBE,
<!-- 票据类型 -->
BILL_NUMBER,
<!-- 发票号 -->
BILL_NUMBER,
<!-- 发票号 -->
BILL_STATE,
<!-- 开票状态 -->
BILL_STATE,
<!-- 开票状态 -->
SIGNING_DATE,
<!-- 开票日期 -->
SIGNING_DATE,
<!-- 开票日期 -->
PARTY_A,
<!-- 客户
名称 -->
PARTY_A,
<!-- 供应商
名称 -->
REVIEW_STATUS,
<!-- 审批状态 -->
REVIEW_STATUS,
<!-- 审批状态 -->
TAX_POINTS,
<!-- 税率 -->
THIS_SETTLEMENT_TAX,
<!-- 税额 -->
THIS_SETTLEMENT_TAX,
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT,
<!-- 不含税金额 -->
THIS_SETTLEMENT_AMOUNT,
<!-- 不含税金额 -->
TAX_POINTS,
<!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING,
<!-- 开票总额 -->
TOTAL_CONTRACT_PRICE_INCLUDING,
<!-- 开票总额 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_NAME,
<!-- 记录创建名称 -->
...
@@ -252,12 +235,13 @@
...
@@ -252,12 +235,13 @@
UPDATED_TIME,
<!-- 记录修改时间 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
DEP_CODE
<!-- 部门编码 -->
DEP_CODE
<!-- 部门编码 -->
)
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints
#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount
#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCW012 WHERE
DELETE FROM ${hggpSchema}.HGCW012 WHERE
ID = #id#
ID = #id# AND
REVIEW_STATUS = #reviewStatus#
</delete>
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
...
@@ -266,18 +250,15 @@
...
@@ -266,18 +250,15 @@
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PROJ_CODE = #projCode#,
<!-- 项目编号 -->
SETTLEMENT_NUMBER = #settlementNumber#,
<!-- 来源单号 -->
SETTLEMENT_NUMBER = #settlementNumber#,
<!-- 来源单号 -->
BILL_TYBE = #billTybe#,
<!-- 票据类型 -->
BILL_TYBE = #billTybe#,
<!-- 票据类型 -->
BILL_NUMBER = #billNumber#,
<!-- 发票号 -->
BILL_NUMBER = #billNumber#,
<!-- 发票号 -->
BILL_STATE = #billState#,
<!-- 开票状态 -->
BILL_STATE = #billState#,
<!-- 开票状态 -->
SIGNING_DATE = #signingDate#,
<!-- 开票日期 -->
SIGNING_DATE = #signingDate#,
<!-- 开票日期 -->
PARTY_A = #partyA#,
<!-- 客户
名称 -->
PARTY_A = #partyA#,
<!-- 供应商
名称 -->
REVIEW_STATUS = #reviewStatus#,
<!-- 审批状态
-->
TAX_POINTS = #taxPoints#,
<!-- 税率
-->
THIS_SETTLEMENT_TAX = #thisSettlementTax#,
<!-- 税额 -->
THIS_SETTLEMENT_TAX = #thisSettlementTax#,
<!-- 税额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#,
<!-- 不含税金额 -->
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#,
<!-- 不含税金额 -->
TAX_POINTS = #taxPoints#,
<!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#,
<!-- 开票总额 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#,
<!-- 开票总额 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
...
@@ -287,34 +268,8 @@
...
@@ -287,34 +268,8 @@
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
DEP_CODE = #depCode#
<!-- 部门编码 -->
DEP_CODE = #depCode#
<!-- 部门编码 -->
WHERE
WHERE
ID = #id#
ID = #id# AND
REVIEW_STATUS = #reviewStatus#
</update>
</update>
<select
id=
"queryconteractComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
COMPANY_NAME as "companyName",
<!-- 所属公司 -->
PROJ_CODE as "projCode",
<!-- 项目编号 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber",
<!-- 合同号 -->
CONTRACT_NAME as "contractName",
<!-- 合同名称 -->
SETTLEMENT_NUMBER as "settlementNumber",
<!-- 结算编号 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税金 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 结算金额 -->
THIS_PRICE_TAX as "thisPriceTax"
<!-- 税价合计 -->
FROM ${hggpSchema}.HGCW008
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"settlementType"
>
SETTLEMENT_TYPE = "2"
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
</select>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
46f30bf6
...
@@ -13,6 +13,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
...
@@ -13,6 +13,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -142,6 +143,28 @@ public class HGCWTools {
...
@@ -142,6 +143,28 @@ public class HGCWTools {
});
});
return
results
.
get
(
0
);
return
results
.
get
(
0
);
}
}
public
static
void
deductionAmount
(
String
settlementNumber
,
BigDecimal
deductionAmount
)
{
AssertUtils
.
isNull
(
settlementNumber
,
"结算单不能为空!"
);
if
(
deductionAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<=
0
)
{
throw
new
PlatException
(
"扣款金额不能小于等于0!"
);
}
List
<
HGCW008
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW008
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"settlementNumber"
,
settlementNumber
);}
});
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的结算单!"
);
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
HGCW008
hgcw008
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
hgcw008
.
getRemainingAmount
().
subtract
(
deductionAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
throw
new
PlatException
(
"扣款金额不能大于结算单剩余金额!"
);
}
hgcw008
.
setRemainingAmount
(
remainingAmount
);
DaoUtils
.
update
(
"HGCW008.updateDeductionAmount"
,
hgcw008
);
}
}
}
public
static
class
HgCw009
{
public
static
class
HgCw009
{
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
View file @
46f30bf6
...
@@ -385,7 +385,7 @@
...
@@ -385,7 +385,7 @@
SELECT distinct
SELECT distinct
proj_code as "projCode",
<!-- 项目编码 -->
proj_code as "projCode",
<!-- 项目编码 -->
CONCAT(proj_code,"-",proj_name) as "projName"
<!-- 项目名称 -->
CONCAT(proj_code,"-",proj_name) as "projName"
<!-- 项目名称 -->
FROM ${hggpSchema}.HGSC001 WHERE approval_status = 2
FROM ${hggpSchema}.HGSC001 WHERE approval_status = 2
and proj_status = 0
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
</sqlMap>
</sqlMap>
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
46f30bf6
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW008.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW008.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW009.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW009.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW014.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cw/sql/HGCW015.xml"
/>
<!--配置-->
<!--配置-->
<sqlMap
resource=
"com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment