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
fad7a97c
Commit
fad7a97c
authored
Jul 17, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
b69e255d
ea5c435e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
35 deletions
+37
-35
HGCBTools.java
src/main/java/com/baosight/hggp/hg/cb/tools/HGCBTools.java
+24
-22
HGCW002.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
+1
-1
HGSC001C.jsp
src/main/webapp/HG/SC/HGSC001C.jsp
+4
-4
HGSC001D.jsp
src/main/webapp/HG/SC/HGSC001D.jsp
+4
-4
HGSC001U.jsp
src/main/webapp/HG/SC/HGSC001U.jsp
+4
-4
No files found.
src/main/java/com/baosight/hggp/hg/cb/tools/HGCBTools.java
View file @
fad7a97c
...
...
@@ -686,28 +686,30 @@ public class HGCBTools {
kc003ParamMap
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_DATE_START
,
hgcw001
.
getAccountPeriodDateStart
());
kc003ParamMap
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD_DATE_END
,
hgcw001
.
getAccountPeriodDateEnd
());
List
<
HGKC003
>
hgkc003List
=
HGKCTools
.
HgKc003
.
list
(
kc003ParamMap
);
//入库单按项目编码、产品编码、存货工序ID、规格、单重分组,分别取正向入库单数量、重量和退回数量
//生成制造成本基础数据
List
<
HGCB005
>
hgcb005List
=
constractHGCB005
(
hgcw001
,
hgkc003List
);
//设置权重
setingCostWeight
(
hgcb005List
);
//计算项目总成本
Map
<
String
,
BigDecimal
>
totalAmoutMap
=
calculateProjAmout
(
hgcw001
);
//计算产副品成本:权重值*项目总费用=产副品制造总成本;总成本/数量=单位成本
Optional
.
ofNullable
(
hgcb005List
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
o
->
{
BigDecimal
totalAmout
=
totalAmoutMap
.
get
(
o
.
getProjCode
());
o
.
setTotalCost
(
totalAmout
.
multiply
(
o
.
getCostWeightValue
()).
setScale
(
6
,
RoundingMode
.
HALF_UP
));
o
.
setUnitCost
(
o
.
getTotalCost
().
divide
(
o
.
getQuantity
(),
6
,
RoundingMode
.
HALF_UP
));
});
//按公司删除当前会计起的成本核算数据
Map
cb005DeleteParam
=
new
HashMap
();
cb005DeleteParam
.
put
(
HGCB005
.
FIELD_company_code
,
hgcw001
.
getCompanyCode
());
cb005DeleteParam
.
put
(
HGCB005
.
FIELD_account_year
,
hgcw001
.
getAccountYear
());
cb005DeleteParam
.
put
(
HGCB005
.
FIELD_account_month
,
hgcw001
.
getAccountPeriod
().
substring
(
4
));
deleteByCondition
(
cb005DeleteParam
);
//保存新的成本核算数据
if
(
CollectionUtils
.
isNotEmpty
(
hgcb005List
)){
DaoBase
.
getInstance
().
insertBatch
(
HGCB005
.
INSERT
,
hgcb005List
);
if
(
CollectionUtils
.
isNotEmpty
(
hgkc003List
))
{
//入库单按项目编码、产品编码、存货工序ID、规格、单重分组,分别取正向入库单数量、重量和退回数量
//生成制造成本基础数据
List
<
HGCB005
>
hgcb005List
=
constractHGCB005
(
hgcw001
,
hgkc003List
);
//设置权重
setingCostWeight
(
hgcb005List
);
//计算项目总成本
Map
<
String
,
BigDecimal
>
totalAmoutMap
=
calculateProjAmout
(
hgcw001
);
//计算产副品成本:权重值*项目总费用=产副品制造总成本;总成本/数量=单位成本
Optional
.
ofNullable
(
hgcb005List
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
o
->
{
BigDecimal
totalAmout
=
totalAmoutMap
.
get
(
o
.
getProjCode
());
o
.
setTotalCost
(
totalAmout
.
multiply
(
o
.
getCostWeightValue
()).
setScale
(
6
,
RoundingMode
.
HALF_UP
));
o
.
setUnitCost
(
o
.
getTotalCost
().
divide
(
o
.
getQuantity
(),
6
,
RoundingMode
.
HALF_UP
));
});
//按公司删除当前会计起的成本核算数据
Map
cb005DeleteParam
=
new
HashMap
();
cb005DeleteParam
.
put
(
HGCB005
.
FIELD_company_code
,
hgcw001
.
getCompanyCode
());
cb005DeleteParam
.
put
(
HGCB005
.
FIELD_account_year
,
hgcw001
.
getAccountYear
());
cb005DeleteParam
.
put
(
HGCB005
.
FIELD_account_month
,
hgcw001
.
getAccountPeriod
().
substring
(
4
));
deleteByCondition
(
cb005DeleteParam
);
//保存新的成本核算数据
if
(
CollectionUtils
.
isNotEmpty
(
hgcb005List
))
{
DaoBase
.
getInstance
().
insertBatch
(
HGCB005
.
INSERT
,
hgcb005List
);
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW002.xml
View file @
fad7a97c
...
...
@@ -558,7 +558,7 @@
LEFT JOIN ${hggpSchema}.HGSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1
AND a.REVIEW_STATUS= 3
AND a.CONTRACT_TYPE IN (1,2)
AND a.CONTRACT_TYPE IN (1,2
,4
)
AND b.approval_status = 2
AND b.proj_status = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
...
...
src/main/webapp/HG/SC/HGSC001C.jsp
View file @
fad7a97c
...
...
@@ -21,13 +21,13 @@
</EF:EFCascadeSelect>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-subcontractName"
cname=
"
甲
方名称"
type=
"hidden"
/>
<EF:EFSelect
cname=
"
甲
方"
ename=
"result-0-subcontractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFInput
ename=
"result-0-subcontractName"
cname=
"
乙
方名称"
type=
"hidden"
/>
<EF:EFSelect
cname=
"
乙
方"
ename=
"result-0-subcontractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOptions
blockId=
"roleCompany"
valueField=
"companyCode"
textField=
"companyName"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"result-0-genralContractName"
cname=
"
乙
方名称"
type=
"hidden"
/>
<EF:EFCascadeSelect
cascadeFrom=
"result-0-subcontractCode"
cname=
"
乙
方"
ename=
"result-0-genralContractCode"
<EF:EFInput
ename=
"result-0-genralContractName"
cname=
"
甲
方名称"
type=
"hidden"
/>
<EF:EFCascadeSelect
cascadeFrom=
"result-0-subcontractCode"
cname=
"
甲
方"
ename=
"result-0-genralContractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
defaultValue=
""
serviceName=
"HGSC001"
methodName=
"genralContractComboBox"
resultId=
"customer_record_block_id"
textField=
"textField"
valueField=
"valueField"
>
...
...
src/main/webapp/HG/SC/HGSC001D.jsp
View file @
fad7a97c
...
...
@@ -21,13 +21,13 @@
</EF:EFCascadeSelect>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-subcontractName"
cname=
"
甲
方名称"
type=
"hidden"
/>
<EF:EFSelect
cname=
"
甲
方"
ename=
"result-0-subcontractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFInput
ename=
"result-0-subcontractName"
cname=
"
乙
方名称"
type=
"hidden"
/>
<EF:EFSelect
cname=
"
乙
方"
ename=
"result-0-subcontractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOptions
blockId=
"roleCompany"
valueField=
"companyCode"
textField=
"companyName"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"result-0-genralContractName"
cname=
"
乙
方名称"
type=
"hidden"
/>
<EF:EFCascadeSelect
cascadeFrom=
"result-0-subcontractCode"
cname=
"
乙
方"
ename=
"result-0-genralContractCode"
<EF:EFInput
ename=
"result-0-genralContractName"
cname=
"
甲
方名称"
type=
"hidden"
/>
<EF:EFCascadeSelect
cascadeFrom=
"result-0-subcontractCode"
cname=
"
甲
方"
ename=
"result-0-genralContractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
defaultValue=
""
serviceName=
"HGSC001"
methodName=
"genralContractComboBox"
resultId=
"customer_record_block_id"
textField=
"textField"
valueField=
"valueField"
>
...
...
src/main/webapp/HG/SC/HGSC001U.jsp
View file @
fad7a97c
...
...
@@ -23,13 +23,13 @@
</EF:EFCascadeSelect>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-subcontractName"
cname=
"
甲
方名称"
type=
"hidden"
/>
<EF:EFSelect
cname=
"
甲
方"
ename=
"result-0-subcontractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFInput
ename=
"result-0-subcontractName"
cname=
"
乙
方名称"
type=
"hidden"
/>
<EF:EFSelect
cname=
"
乙
方"
ename=
"result-0-subcontractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
>
<EF:EFOption
label=
"-- 请选择 --"
value=
""
/>
<EF:EFOptions
blockId=
"roleCompany"
valueField=
"companyCode"
textField=
"companyName"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"result-0-genralContractName"
cname=
"
乙
方名称"
type=
"hidden"
/>
<EF:EFCascadeSelect
cascadeFrom=
"result-0-subcontractCode"
cname=
"
乙
方"
ename=
"result-0-genralContractCode"
<EF:EFInput
ename=
"result-0-genralContractName"
cname=
"
甲
方名称"
type=
"hidden"
/>
<EF:EFCascadeSelect
cascadeFrom=
"result-0-subcontractCode"
cname=
"
甲
方"
ename=
"result-0-genralContractCode"
colWidth=
"4"
required=
"true"
filter=
"contains"
defaultValue=
""
serviceName=
"HGSC001"
methodName=
"genralContractComboBox"
resultId=
"customer_record_block_id"
textField=
"textField"
valueField=
"valueField"
>
...
...
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