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
7a186899
Commit
7a186899
authored
May 20, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
aa8d63dd
6c624d22
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
142 additions
and
11 deletions
+142
-11
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+6
-0
ServiceHGCW002.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
+32
-0
HGCW002.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
+34
-8
HGCW002A.js
src/main/webapp/HG/CW/HGCW002A.js
+58
-1
HGCW002A.jsp
src/main/webapp/HG/CW/HGCW002A.jsp
+11
-1
HGCW002B.js
src/main/webapp/HG/CW/HGCW002B.js
+1
-1
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
7a186899
...
...
@@ -241,6 +241,12 @@ public enum DdynamicEnum {
*/
PLAN_PROCESS_BLOCK_ID
(
"plan_process_block_id"
,
"processName"
,
"processName"
,
"HGSC005A.queryProcessComboBox"
),
/**
* 合同
*/
CONTRACT_BLOCK_ID
(
"contract_block_id"
,
"contractNumber"
,
"contractName"
,
"HGCW002.queryComboBox"
),
/**
*
*/
...
...
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
View file @
7a186899
...
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.common.DdynamicEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.domain.HGCW002
;
import
com.baosight.hggp.hg.cw.domain.HGCW003
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.util.CommonMethod
;
...
...
@@ -14,10 +15,14 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -99,6 +104,21 @@ public class ServiceHGCW002 extends ServiceBase {
HGCW002
.
setPlanStartDate
(
DateUtils
.
formatShort
(
HGCW002
.
getPlanStartDate
()));
HGCW002
.
setPlanEndDate
(
DateUtils
.
formatShort
(
HGCW002
.
getPlanEndDate
()));
HGCW002
.
setSigningDate
(
DateUtils
.
formatShort
(
HGCW002
.
getSigningDate
()));
BigDecimal
totalContractPriceExcluding
=
new
BigDecimal
(
0
);
BigDecimal
totalContractPriceIncluding
=
new
BigDecimal
(
0
);
BigDecimal
valueAddedTax
=
new
BigDecimal
(
0
);
//计算合同清单金额
for
(
int
i
=
0
;
i
<
detail1Rows
.
size
();
i
++)
{
HGCW003
hgcw003
=
new
HGCW003
();
hgcw003
.
fromMap
(
detail1Rows
.
get
(
i
));
totalContractPriceExcluding
=
totalContractPriceExcluding
.
add
(
hgcw003
.
getTotalPriceExcluding
());
totalContractPriceIncluding
=
totalContractPriceIncluding
.
add
(
hgcw003
.
getTotalPriceIncluding
());
}
valueAddedTax
=
totalContractPriceIncluding
.
subtract
(
totalContractPriceExcluding
);
DecimalFormat
decimalFormat
=
new
DecimalFormat
(
"#.000"
);
HGCW002
.
setTotalContractPriceExcluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceExcluding
)));
HGCW002
.
setTotalContractPriceIncluding
(
new
BigDecimal
(
decimalFormat
.
format
(
totalContractPriceIncluding
)));
HGCW002
.
setValueAddedTax
(
new
BigDecimal
(
decimalFormat
.
format
(
valueAddedTax
)));
this
.
modify
(
HGCW002
);
}
}
...
...
@@ -203,5 +223,17 @@ public class ServiceHGCW002 extends ServiceBase {
return
inInfo
;
}
public
EiInfo
contractComboBox
(
EiInfo
inInfo
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
StringUtils
.
isNotEmpty
(
inInfo
.
getString
(
"reviewStatus"
)))
{
map
.
put
(
"reviewStatus"
,
inInfo
.
getString
(
"reviewStatus"
));
}
if
(
StringUtils
.
isNotEmpty
(
inInfo
.
getString
(
"contractType"
)))
{
map
.
put
(
"contractType"
,
inInfo
.
getString
(
"contractType"
));
}
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
CONTRACT_BLOCK_ID
),
map
,
false
);
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
View file @
7a186899
...
...
@@ -412,7 +412,7 @@
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCW002
SET
ACCOUNT_CODE = #accountCode#,
<!--
企业编码 -->
<!-- ACCOUNT_CODE = #accountCode#,
企业编码 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
...
...
@@ -442,17 +442,43 @@
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#,
<!-- 合同总价(不含税) -->
VALUE_ADDED_TAX = #valueAddedTax#,
<!-- 税点 -->
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#,
<!-- 合同总价(含税) -->
REVIEW_STATUS = #reviewStatus#,
<!--
审核状态 -->
BALANCE_STATUS = #balanceStatus#,
<!--
结算状态;1未结算2部分结算3最终结算 -->
CREATED_BY = #createdBy#,
<!--
记录创建者 -->
CREATED_NAME = #createdName#,
<!--
记录创建名称 -->
CREATED_TIME = #createdTime#,
<!--
记录创建时间 -->
<!-- REVIEW_STATUS = #reviewStatus#,
审核状态 -->
<!-- BALANCE_STATUS = #balanceStatus#,
结算状态;1未结算2部分结算3最终结算 -->
<!-- CREATED_BY = #createdBy#,
记录创建者 -->
<!-- CREATED_NAME = #createdName#,
记录创建名称 -->
<!-- CREATED_TIME = #createdTime#,
记录创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#
,
<!-- 记录修改时间 -->
DEP_CODE = #depCode#
<!--
部门编码 -->
UPDATED_TIME = #updatedTime#
<!-- 记录修改时间 -->
<!-- DEP_CODE = #depCode#
部门编码 -->
WHERE
ID = #id#
</update>
<select
id=
"queryComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
CONTRACT_NUMBER as contractNumber,
<!-- 合同号 -->
CONTRACT_NAME as contractName
<!-- 合同名称 -->
FROM ${hggpSchema}.HGCW002
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</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>
<isNotEmpty
prepend=
" AND "
property=
"reviewStatus"
>
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"contractType"
>
CONTRACT_TYPE = #contractType#
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
</select>
</sqlMap>
src/main/webapp/HG/CW/HGCW002A.js
View file @
7a186899
...
...
@@ -113,8 +113,11 @@ $(function() {
//清除甲乙方
IPLAT
.
EFPopupInput
.
clear
((
"#popupInputPartyA"
),
true
)
IPLAT
.
EFPopupInput
.
clear
((
"#popupInputPartyB"
),
true
)
IPLAT
.
EFPopupInput
.
clear
((
"#popupInputMainContractNumber"
),
true
)
$
(
"#result-0-partyA"
).
val
(
""
);
$
(
"#result-0-partyB"
).
val
(
""
);
$
(
"#result-0-mainContractNumber"
).
val
(
""
);
}
}
}
...
...
@@ -199,6 +202,50 @@ $(function() {
IPLAT
.
EFPopupInput
.
text
(
$
(
"#popupInputPartyB"
)
,
partyB
)
e
.
preventDefault
();
// 不使用默认的回填逻辑
}
},
"popupInputMainContractNumber"
:
{
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query
:
function
(
e
)
{
console
.
log
(
"Step"
+
(
++
i
)
+
": ----query----"
);
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var
contractType
=
$
(
"#result-0-contractType"
).
val
();
if
(
!
contractType
)
{
message
(
"请先选择合同类型!"
);
// 阻止弹窗
e
.
preventDefault
();
}
else
if
(
!
contractType
===
"3"
)
{
message
(
"只有合同类型为补充协议时,才需要填写主合同号!"
);
e
.
preventDefault
();
}
var
info
=
new
EiInfo
();
info
.
set
(
"contractType"
,
contractType
)
return
info
;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill
:
function
(
e
)
{
console
.
log
(
"Step"
+
(
++
i
)
+
": ----backFill----"
);
// 回填数据
var
model
=
e
.
model
;
// var data = model.toJSON();
console
.
log
(
model
);
var
contractNumber
=
model
.
contractNumber
;
var
contractName
=
model
.
contractName
;
$
(
"#result-0-mainContractNumber"
).
val
(
contractNumber
);
IPLAT
.
EFPopupInput
.
text
(
$
(
"#popupInputMainContractNumber"
)
,
contractName
)
e
.
preventDefault
();
// 不使用默认的回填逻辑
}
}
};
...
...
@@ -277,6 +324,7 @@ function cancelFunc() {
}
function
btnSaveFunc
()
{
fieldValidation
();
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
"detail1,detail2"
,
"HGCW002"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowCallback
});
...
...
@@ -313,7 +361,16 @@ let refreshRowNo = function () {
detail1Grid
.
refresh
();
}
}
function
fieldValidation
()
{
var
contractType
=
$
(
"#result-0-contractType"
).
val
();
if
(
contractType
==
"3"
)
{
var
mainContractNumber
=
$
(
"#result-0-mainContractNumber"
).
val
();
if
(
!
mainContractNumber
)
{
message
(
"请填写主合同号!"
);
return
;
}
}
}
$
(
window
).
load
(
function
()
{
refreshRowNo
();
});
...
...
src/main/webapp/HG/CW/HGCW002A.jsp
View file @
7a186899
...
...
@@ -79,7 +79,17 @@
<div
class=
"row"
>
<EF:EFDatePicker
cname=
"签约日期"
ename=
"result-0-signingDate"
colWidth=
"4"
format=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFInput
ename=
"result-0-mainContractNumber"
cname=
"主合同号"
colWidth=
"8"
ratio=
"2:10"
/>
<EF:EFInput
ename=
"result-0-mainContractNumber"
cname=
"主合同号"
type=
"hidden"
/>
<EF:EFPopupInput
ename=
"popupInputMainContractNumber"
cname=
"主合同号"
colWidth=
"8"
ratio=
"2:10"
serviceName=
"HGCW002"
methodName=
"contractComboBox"
resultId=
"contract_block_id"
save=
"false"
popupType=
"ServiceGrid"
valueField=
"contractNumber"
textField=
"contractName"
columnEnames=
"contractNumber,contractName"
columnCnames=
"合同号,合同名称"
readonly=
"true"
resizable=
"true"
popupTitle=
"主合同号"
popupWidth=
"800"
>
</EF:EFPopupInput>
</div>
<div
class=
"row"
>
<EF:EFInput
type=
"textarea"
ename=
"result-0-contractContent"
cname=
"合同内容"
colWidth=
"8"
ratio=
"2:10"
required=
"true"
/>
...
...
src/main/webapp/HG/CW/HGCW002B.js
View file @
7a186899
...
...
@@ -334,7 +334,7 @@ function cancelFunc() {
function
btnSaveFunc
()
{
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
"
result
"
,
"HGCW002"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowCallback
});
JSUtils
.
submitGrid
(
"
detail1,detail2
"
,
"HGCW002"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
windowCallback
});
}
});
}
...
...
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