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
4b064fde
Commit
4b064fde
authored
Nov 23, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
bee0a147
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
CostPlanNewLend2ServiceImpl.java
...st/service/impl/costplan/CostPlanNewLend2ServiceImpl.java
+13
-9
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costplan/CostPlanNewLend2ServiceImpl.java
View file @
4b064fde
...
@@ -102,14 +102,15 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
...
@@ -102,14 +102,15 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
costPlanDomain
.
setLendBalance
(
BigDecimal
.
ZERO
);
costPlanDomain
.
setLendBalance
(
BigDecimal
.
ZERO
);
CostDomain
costDomain
=
planToCost
(
costPlanDomain
.
getCostPlanNo
());
CostDomain
costDomain
=
planToCost
(
costPlanDomain
.
getCostPlanNo
());
costDomain
.
setCostNo
(
getCostNo
());
costDomain
.
setCostNo
(
getCostNo
());
//待提交
costDomain
.
setCostStatus
(
0
);
costDomain
.
setCostStatus
(
0
);
//费用单金额
costDomain
.
setAmount
(
costDomain
.
getCounteract
());
costDomain
.
setAmount
(
counteract
);
costDomain
.
setLendBalance
(
BigDecimal
.
ZERO
);
//关联借支单币种 ->人民币 汇率
costDomain
.
setPayPlanAmount
(
costDomain
.
getPayCounteract
());
costDomain
.
setPayLendBalance
(
BigDecimal
.
ZERO
);
BigDecimal
toRmbRate
=
CurUtils
.
getCur
(
costDomain
.
getDic
(),
"CNY"
);
BigDecimal
toRmbRate
=
CurUtils
.
getCur
(
costDomain
.
getDic
(),
"CNY"
);
costDomain
.
setToRmbRate
(
toRmbRate
);
costDomain
.
setToRmbRate
(
toRmbRate
);
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDao
.
insert
(
costDomain
);
costDao
.
insert
(
costDomain
);
//更新借支单申请归还金额
//更新借支单申请归还金额
...
@@ -225,14 +226,17 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
...
@@ -225,14 +226,17 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
throw
new
BizRuntimeException
(
"冲销后归还金额 > 借支单待归还金额"
);
throw
new
BizRuntimeException
(
"冲销后归还金额 > 借支单待归还金额"
);
}
}
costPlanDomain
.
setCounteract
(
BigDecimal
.
ZERO
);
CostDomain
costDomain
=
planToCost
(
costPlanDomain
.
getCostPlanNo
());
CostDomain
costDomain
=
planToCost
(
costPlanDomain
.
getCostPlanNo
());
costDomain
.
setCostNo
(
getCostNo
());
costDomain
.
setCostNo
(
getCostNo
());
costDomain
.
setCostStatus
(
0
);
costDomain
.
setCostStatus
(
0
);
costDomain
.
setAmount
(
lendBalance
);
costDomain
.
setAmount
(
costDomain
.
getLendBalance
());
BigDecimal
toRmbRate
=
CurUtils
.
getCur
(
costDomain
.
getDic
(),
"CNY"
);
costDomain
.
setCounteract
(
new
BigDecimal
(
0
));
costDomain
.
setToRmbRate
(
toRmbRate
);
costDomain
.
setPayPlanAmount
(
costDomain
.
getPayLendBalance
());
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDomain
.
setPayCounteract
(
new
BigDecimal
(
0
));
BigDecimal
toRmbRate1
=
CurUtils
.
getCur
(
costDomain
.
getDic
(),
"CNY"
);
costDomain
.
setToRmbRate
(
toRmbRate1
);
costDomain
.
setAmountRmb
(
costDomain
.
getAmount
().
multiply
(
toRmbRate1
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
costDao
.
insert
(
costDomain
);
costDao
.
insert
(
costDomain
);
//更新借支单申请归还金额
//更新借支单申请归还金额
...
...
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