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
80f8ef06
Commit
80f8ef06
authored
May 28, 2024
by
13420
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
優化調整
parent
6f61712b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
48 deletions
+63
-48
HGCW010.java
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW010.java
+19
-0
HGCW010.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW010.xml
+18
-20
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+22
-0
HGCW010A.js
src/main/webapp/HG/CW/HGCW010A.js
+2
-27
HGCW010A.jsp
src/main/webapp/HG/CW/HGCW010A.jsp
+2
-1
No files found.
src/main/java/com/baosight/hggp/hg/cw/domain/HGCW010.java
View file @
80f8ef06
...
...
@@ -48,6 +48,7 @@ public class HGCW010 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 记录修改名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 记录修改时间*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_REMAINING_AMOUNT
=
"remainingAmount"
;
/* 累计结算价税合计金额*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -73,6 +74,7 @@ public class HGCW010 extends DaoEPBase {
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 记录修改名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 记录修改时间*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_REMAINING_AMOUNT
=
"REMAINING_AMOUNT"
;
/* 累计结算价税合计金额*/
public
static
final
String
QUERY
=
"HGCW010.query"
;
public
static
final
String
COUNT
=
"HGCW010.count"
;
...
...
@@ -107,6 +109,7 @@ public class HGCW010 extends DaoEPBase {
private
String
updatedName
=
" "
;
/* 记录修改名称*/
private
String
updatedTime
=
" "
;
/* 记录修改时间*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
BigDecimal
remainingAmount
=
new
BigDecimal
(
"0"
);
/* 累计结算价税合计金额*/
/**
* initialize the metadata.
...
...
@@ -214,6 +217,12 @@ public class HGCW010 extends DaoEPBase {
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMAINING_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"剩余开票/收票金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -608,6 +617,14 @@ public class HGCW010 extends DaoEPBase {
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
//剩余开票金额
public
BigDecimal
getRemainingAmount
()
{
return
remainingAmount
;
}
public
void
setRemainingAmount
(
BigDecimal
remainingAmount
)
{
this
.
remainingAmount
=
remainingAmount
;
}
/**
* get the value from Map.
*
...
...
@@ -640,6 +657,7 @@ public class HGCW010 extends DaoEPBase {
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setRemainingAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMAINING_AMOUNT
)),
remainingAmount
));
}
/**
...
...
@@ -673,6 +691,7 @@ public class HGCW010 extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_REMAINING_AMOUNT
,
StringUtils
.
toString
(
remainingAmount
,
eiMetadata
.
getMeta
(
FIELD_REMAINING_AMOUNT
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW010.xml
View file @
80f8ef06
...
...
@@ -292,29 +292,27 @@
<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>
A.COMPANY_NAME as "companyName",
<!-- 所属公司 -->
A.PROJ_CODE as "projCode",
<!-- 项目编号 -->
A.PROJ_NAME as "projName",
<!-- 项目名称 -->
A.CONTRACT_NUMBER as "contractNumber",
<!-- 合同号 -->
A.CONTRACT_NAME as "contractName",
<!-- 合同名称 -->
A.SETTLEMENT_NUMBER as "settlementNumber",
<!-- 结算编号 -->
A.THIS_SETTLEMENT_TAX as "thisSettlementTax",
<!-- 税金 -->
A.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount",
<!-- 结算金额 -->
A.THIS_PRICE_TAX as "thisPriceTax",
<!-- 税价合计 -->
B.CONTRACT_TYPE as "contractType"
<!-- 合同类型 -->
FROM ${hggpSchema}.HGCW008 A LEFT JOIN ${hggpSchema}.HGCW002 B
ON A.PROJ_CODE = B.PROJ_CODE
AND A.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND A.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND A.SETTLEMENT_TYPE = 2
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
A.
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
A.
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
ORDER BY
A.
CONTRACT_NUMBER
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
80f8ef06
...
...
@@ -165,6 +165,28 @@ public class HGCWTools {
DaoUtils
.
update
(
"HGCW008.updateDeductionAmount"
,
hgcw008
);
}
public
static
void
cutAmount
(
String
settlementNumber
,
BigDecimal
cutAmount
)
{
AssertUtils
.
isNull
(
settlementNumber
,
"结算单不能为空!"
);
if
(
cutAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<=
0
)
{
throw
new
PlatException
(
"扣款金额不能小于等于0!"
);
}
List
<
HGCW010
>
results
=
DaoBase
.
getInstance
().
query
(
HGCW010
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"settlementNumber"
,
settlementNumber
);}
});
if
(
CollectionUtils
.
isEmpty
(
results
))
{
throw
new
PlatException
(
"找不到对应的结算单!"
);
}
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
HGCW010
HGCW010
=
results
.
get
(
0
);
BigDecimal
remainingAmount
=
new
BigDecimal
(
decimalFormat
.
format
(
HGCW010
.
getRemainingAmount
().
subtract
(
cutAmount
)));
if
(
remainingAmount
.
compareTo
(
new
BigDecimal
(
BigInteger
.
ZERO
))
<
0
)
{
throw
new
PlatException
(
"扣款金额不能大于结算单剩余金额!"
);
}
HGCW010
.
setRemainingAmount
(
remainingAmount
);
DaoUtils
.
update
(
"HGCW010.updateDeductionAmount"
,
HGCW010
);
}
}
public
static
class
HgCw009
{
...
...
src/main/webapp/HG/CW/HGCW010A.js
View file @
80f8ef06
...
...
@@ -63,23 +63,7 @@ let query = function () {
*/
/**
* 修改
*/
function
updateFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
!=
1
)
{
message
(
"请选择一条数据"
);
return
;
}
JSColorbox
.
open
({
href
:
"HGCW010B?methodName=initLoad&id="
+
rows
[
0
].
id
+
"&efParentFormEname=HGCW010"
,
title
:
"<div style='text-align: center;'>修改合同</div>"
,
width
:
"90%"
,
height
:
"90%"
,
callbackName
:
windowCallback
});
}
function
windowCallback
()
{
...
...
@@ -89,19 +73,10 @@ function windowCallback() {
JSColorbox
.
close
();
}
function
contractDetailFunc
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW010C?methodName=initLoad&id="
+
id
+
"&efParentFormEname=HGCW010"
,
title
:
"<div style='text-align: center;'>合同详情</div>"
,
width
:
"90%"
,
height
:
"90%"
,
callbackName
:
windowCallback
});
}
function
fileDetailFunc
(
id
)
{
JSColorbox
.
open
({
href
:
"HGCW999?methodName=initLoad&inqu_status-0-bizType=
HT
&inqu_status-0-matId="
+
id
+
"&efParentFormEname=HGCW010"
,
href
:
"HGCW999?methodName=initLoad&inqu_status-0-bizType=
KP
&inqu_status-0-matId="
+
id
+
"&efParentFormEname=HGCW010"
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HG/CW/HGCW010A.jsp
View file @
80f8ef06
...
...
@@ -20,6 +20,7 @@
<EF:EFColumn
ename=
"thisPriceTax"
cname=
"结算价税合计金额"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"thisSettlementTax"
cname=
"结算税金"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"thisSettlementAmount"
cname=
"结算金额"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
ename=
"billNumber"
cname=
"发票号"
width=
"120"
enable=
"false"
readonly=
"true"
align=
"center"
/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion
id=
"detail2"
title=
"附件信息"
>
...
...
@@ -34,7 +35,7 @@
</EF:EFRegion>
<div
class=
"row"
style=
"display:flex;justify-content:center;"
>
<EF:EFButton
ename=
"cancel"
cname=
"取消"
type=
"button"
class=
"btn-center"
/>
<EF:EFButton
ename=
"btn_save"
cname=
"
生成
"
type=
"button"
class=
"btn-center"
/>
<EF:EFButton
ename=
"btn_save"
cname=
"
保存
"
type=
"button"
class=
"btn-center"
/>
</div>
</EF:EFPage>
...
...
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