Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
1729a577
Commit
1729a577
authored
Jul 31, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
管理成本报表如果是原币付款的,统计费用的时候要换成人民币,明细里面“金额”这一列保留原币种金额,“人民币金额”这一列换成人民币即可,而不是原币。
parent
70e1f364
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
pom.xml
cost-core/pom.xml
+2
-2
CostApiServiceImpl.java
...blt/other/other_cost/service/impl/CostApiServiceImpl.java
+13
-0
No files found.
cost-core/pom.xml
View file @
1729a577
...
@@ -4,11 +4,11 @@
...
@@ -4,11 +4,11 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.blt
</groupId>
<groupId>
com.blt
</groupId>
<artifactId>
other
</artifactId>
<artifactId>
cost-core
</artifactId>
<version>
1.1.13
</version>
<version>
1.1.13
</version>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<name>
other
</name>
<name>
cost-core
</name>
<description>
blt other purcharse
</description>
<description>
blt other purcharse
</description>
<parent>
<parent>
...
...
cost-core/src/main/java/com/blt/other/other_cost/service/impl/CostApiServiceImpl.java
View file @
1729a577
...
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -173,6 +174,14 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -173,6 +174,14 @@ public class CostApiServiceImpl implements CostApiService {
}
}
}
}
List
<
ManageCostDto
>
manageCostDtoList
=
costDao
.
selectManageCost
(
startDate
,
DateTimeUtil
.
addDays
(
endDate
,
1
),
feeSuperType
,
feeSubType
,
companyValueList
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
List
<
ManageCostDto
>
manageCostDtoList
=
costDao
.
selectManageCost
(
startDate
,
DateTimeUtil
.
addDays
(
endDate
,
1
),
feeSuperType
,
feeSubType
,
companyValueList
,
companyName
,
departmentName
,
createUserId
,
payUserId
);
if
(
manageCostDtoList
!=
null
&&
!
manageCostDtoList
.
isEmpty
())
{
for
(
ManageCostDto
manageCostDto
:
manageCostDtoList
)
{
if
(!
manageCostDto
.
getCurrency
().
equals
(
"CNY"
))
{
BigDecimal
exhcnageRate
=
CurUtils
.
getCur
(
manageCostDto
.
getCurrency
(),
"CNY"
,
getExchangeRateApi
);
manageCostDto
.
setAmountRmb
(
manageCostDto
.
getAmount
().
multiply
(
exhcnageRate
).
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
}
}
}
if
((
companyValue
==
null
||
companyValue
==
2
)
&&
((
feeSuperType
==
null
&&
departmentName
==
null
)
||
if
((
companyValue
==
null
||
companyValue
==
2
)
&&
((
feeSuperType
==
null
&&
departmentName
==
null
)
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
"采购部"
.
equals
(
departmentName
))
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
"采购部"
.
equals
(
departmentName
))
||
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
departmentName
==
null
))){
((
"耗材"
.
equals
(
feeSuperType
)
||
"耗材"
.
equals
(
feeSubType
))
&&
departmentName
==
null
))){
...
@@ -190,6 +199,10 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -190,6 +199,10 @@ public class CostApiServiceImpl implements CostApiService {
manageCostDto
.
setCompanyName
(
"香港百伦科技有限公司"
);
manageCostDto
.
setCompanyName
(
"香港百伦科技有限公司"
);
manageCostDto
.
setFeeSuperType
(
"耗材"
);
manageCostDto
.
setFeeSuperType
(
"耗材"
);
manageCostDto
.
setFeeSubType
(
"耗材"
);
manageCostDto
.
setFeeSubType
(
"耗材"
);
if
(!
manageCostDto
.
getCurrency
().
equals
(
"CNY"
))
{
BigDecimal
exhcnageRate
=
CurUtils
.
getCur
(
manageCostDto
.
getCurrency
(),
"CNY"
,
getExchangeRateApi
);
manageCostDto
.
setAmountRmb
(
manageCostDto
.
getAmount
().
multiply
(
exhcnageRate
).
setScale
(
4
,
RoundingMode
.
HALF_EVEN
));
}
manageCostDtoList
.
add
(
manageCostDto
);
manageCostDtoList
.
add
(
manageCostDto
);
}
}
}
}
...
...
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