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
9c61e8bd
Commit
9c61e8bd
authored
Aug 05, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-05 销售开票 1.选择合同逻辑调整 2.查询条件界面调整
parent
9e0a6706
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
8 deletions
+81
-8
HGCW002.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
+11
-0
HGCW006.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW006.xml
+1
-1
HGCW010A.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW010A.xml
+1
-1
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+42
-1
HGCW006.jsp
src/main/webapp/HG/CW/HGCW006.jsp
+2
-1
HGCW010.js
src/main/webapp/HG/CW/HGCW010.js
+20
-0
HGCW010.jsp
src/main/webapp/HG/CW/HGCW010.jsp
+1
-1
HGCW010A.jsp
src/main/webapp/HG/CW/HGCW010A.jsp
+3
-3
No files found.
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
View file @
9c61e8bd
...
@@ -609,4 +609,15 @@
...
@@ -609,4 +609,15 @@
</isNotEqual>
</isNotEqual>
ORDER BY a.CONTRACT_NUMBER
ORDER BY a.CONTRACT_NUMBER
</select>
</select>
<update
id=
"updateDeductionAmount"
>
UPDATE ${hggpSchema}.HGCW002
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/HGCW006.xml
View file @
9c61e8bd
...
@@ -408,7 +408,7 @@
...
@@ -408,7 +408,7 @@
<update
id=
"updateDeductionAmount"
>
<update
id=
"updateDeductionAmount"
>
UPDATE ${hggpSchema}.HGCW006
UPDATE ${hggpSchema}.HGCW006
SET
SET
REMAINING_AMOUNT = #remainingAmount#,
<!--
审核状态
-->
REMAINING_AMOUNT = #remainingAmount#,
<!--
剩余金额
-->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#
<!-- 记录修改时间 -->
UPDATED_TIME = #updatedTime#
<!-- 记录修改时间 -->
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW010A.xml
View file @
9c61e8bd
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
ON T1.PROJ_CODE = B.PROJ_CODE
ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE
AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.REMAINING_AMOUNT != 0
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.REMAINING_AMOUNT != 0
AND T1.REVIEW_STATUS = '3'
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
...
...
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
9c61e8bd
...
@@ -311,6 +311,34 @@ public class HGCWTools {
...
@@ -311,6 +311,34 @@ public class HGCWTools {
});
});
return
results
.
get
(
0
);
return
results
.
get
(
0
);
}
}
public
static
void
deductionAmount
(
String
contractNumber
,
BigDecimal
deductionAmount
)
{
AssertUtils
.
isNull
(
contractNumber
,
"合同不能为空!"
);
// if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// }
List
<
HGCW002
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW002
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"contractNumber"
,
contractNumber
);}
});
BigDecimal
totalAmount
=
HgCw011
.
sumSettlementNumber
(
contractNumber
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的合同!"
);
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
HGCW002
hgcw002
=
results
.
get
(
0
);
List
<
HGCW002
>
hgcw002List
=
DaoBase
.
getInstance
().
query
(
"HGCW010D.sumContractPrice"
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"contractNumberStr"
,
contractNumber
);}
});
BigDecimal
remaining
=
hgcw002List
.
get
(
0
).
getTotalContractPriceIncluding
().
add
(
hgcw002List
.
get
(
0
).
getTotalContractPriceIncluding
().
multiply
(
new
BigDecimal
(
"0.2"
)));
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
remaining
.
subtract
(
deductionAmount
.
add
(
totalAmount
))));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
throw
new
PlatException
(
"本次开票金额加累计开票金额超出销售合同金额20%,超出20%需要业务新增补充协议"
);
}
BigDecimal
remainingCount
=
new
BigDecimal
(
decimalFormat
.
format
(
hgcw002
.
getRemainingAmount
().
subtract
(
deductionAmount
)));
hgcw002
.
setRemainingAmount
(
remainingCount
);
DaoUtils
.
update
(
"HGCW002.updateDeductionAmount"
,
hgcw002
);
}
}
}
public
static
class
HgCw003
{
public
static
class
HgCw003
{
...
@@ -355,7 +383,7 @@ public class HGCWTools {
...
@@ -355,7 +383,7 @@ public class HGCWTools {
// if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// throw new PlatException("扣款金额不能小于等于0!");
// }
// }
List
<
HGCW006
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW00
8
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
List
<
HGCW006
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW00
6
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"contractNumber"
,
settlementNumber
);}
{
put
(
"contractNumber"
,
settlementNumber
);}
});
});
if
(
CollectionUtils
.
isEmpty
(
results
))
{
if
(
CollectionUtils
.
isEmpty
(
results
))
{
...
@@ -694,6 +722,19 @@ public class HGCWTools {
...
@@ -694,6 +722,19 @@ public class HGCWTools {
});
});
return
results
;
return
results
;
}
}
public
static
BigDecimal
sumSettlementNumber
(
String
settlementNumber
)
{
AssertUtils
.
isNull
(
settlementNumber
,
"来源单号不能为空!"
);
List
<
HGCW011
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW011
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"settlementNumber"
,
settlementNumber
);}
});
AssertUtils
.
isEmpty
(
results
,
"找不到对应的销售开票记录!"
);
BigDecimal
totalAmount
=
new
BigDecimal
(
"0"
);
for
(
HGCW011
hgcw011:
results
)
{
totalAmount
=
totalAmount
.
add
(
hgcw011
.
getTotalContractPriceIncluding
());
}
return
totalAmount
;
}
}
}
/**
/**
...
...
src/main/webapp/HG/CW/HGCW006.jsp
View file @
9c61e8bd
...
@@ -37,7 +37,8 @@
...
@@ -37,7 +37,8 @@
<EF:EFColumn
ename=
"companyName"
cname=
"所属公司"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"所属公司"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"signingDate"
cname=
"签订日期"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"signingDate"
cname=
"签订日期"
align=
"center"
enable=
"false"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
<EF:EFColumn
ename=
"contractNumber"
cname=
"合同号"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"contractNumber"
cname=
"合同号"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"contractName"
cname=
"合同名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"contractName"
cname=
"合同名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"partyA"
cname=
"甲方名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"partyA"
cname=
"甲方名称"
align=
"center"
enable=
"false"
/>
...
...
src/main/webapp/HG/CW/HGCW010.js
View file @
9c61e8bd
...
@@ -26,6 +26,8 @@ $(function() {
...
@@ -26,6 +26,8 @@ $(function() {
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
//此grid对象
//此grid对象
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
$
(
"#SELECT_BILL"
).
on
(
"click"
,
addFunc
);
$
(
"#SELECT_CONT"
).
on
(
"click"
,
add1Func
);
$
(
"#SELECT_LEASE"
).
on
(
"click"
,
add2Func
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
);
$
(
"#BTN_BILL"
).
on
(
"click"
,
billFunc
);
$
(
"#BTN_BILL"
).
on
(
"click"
,
billFunc
);
$
(
"#BII_SAVE"
).
on
(
"click"
,
saveFunc
);
$
(
"#BII_SAVE"
).
on
(
"click"
,
saveFunc
);
...
@@ -94,6 +96,24 @@ function addFunc() {
...
@@ -94,6 +96,24 @@ function addFunc() {
callbackName
:
windowCallback
callbackName
:
windowCallback
});
});
}
}
function
add1Func
()
{
JSColorbox
.
open
({
href
:
"HGCW010D?methodName=initLoad&efParentFormEname=HGCW010"
,
title
:
"<div style='text-align: center;'>合同管理</div>"
,
width
:
"90%"
,
height
:
"90%"
,
callbackName
:
windowCallback
});
}
function
add2Func
()
{
JSColorbox
.
open
({
href
:
"HGCW010E?methodName=initLoad&efParentFormEname=HGCW010"
,
title
:
"<div style='text-align: center;'>租赁合同</div>"
,
width
:
"90%"
,
height
:
"90%"
,
callbackName
:
windowCallback
});
}
/**
/**
* 保存
* 保存
...
...
src/main/webapp/HG/CW/HGCW010.jsp
View file @
9c61e8bd
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<EF:EFColumn
ename=
"signingDate"
cname=
"开票日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
<EF:EFColumn
ename=
"signingDate"
cname=
"开票日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
<EF:EFColumn
ename=
"billNumber"
cname=
"发票号"
width=
"120"
format=
"{0:N3}"
align=
"center"
/>
<EF:EFColumn
ename=
"billNumber"
cname=
"发票号"
width=
"120"
format=
"{0:N3}"
align=
"center"
/>
<EF:EFComboColumn
ename=
"taxPoints"
cname=
"税
点
"
width=
"120"
align=
"center"
required=
"true"
<EF:EFComboColumn
ename=
"taxPoints"
cname=
"税
率
"
width=
"120"
align=
"center"
required=
"true"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"true"
>
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
<EF:EFCodeOption
codeName=
"hggp.cw.taxPoints"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/CW/HGCW010A.jsp
View file @
9c61e8bd
...
@@ -36,13 +36,13 @@
...
@@ -36,13 +36,13 @@
align=
"center"
filter=
"contains"
sort=
"true"
>
align=
"center"
filter=
"contains"
sort=
"true"
>
<EF:EFOptions
blockId=
"roleCompany"
textField=
"companyName"
valueField=
"companyCode"
/>
<EF:EFOptions
blockId=
"roleCompany"
textField=
"companyName"
valueField=
"companyCode"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"partyA"
cname=
"客户名称"
width=
"1
2
0"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"partyA"
cname=
"客户名称"
width=
"1
6
0"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
width=
"1
2
0"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
width=
"1
3
0"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算编号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"settlementNumber"
cname=
"结算编号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
<EF:EFColumn
ename=
"contractDate"
cname=
"结算日期"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
<EF:EFColumn
ename=
"taxPoints"
cname=
"税率(%)"
width=
"
12
0"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"taxPoints"
cname=
"税率(%)"
width=
"
8
0"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"结算价税合计金额"
hidden=
"true"
/>
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"结算价税合计金额"
hidden=
"true"
/>
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"结算税金"
width=
"120"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"结算税金"
width=
"120"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"15"
required=
"false"
...
...
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