Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
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
huluobin
bailuntec-cost
Commits
738072ec
Commit
738072ec
authored
Jan 27, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
92d94e31
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
CostDetailServiceImpl.java
...other/module/cost/service/impl/CostDetailServiceImpl.java
+11
-1
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+11
-1
No files found.
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostDetailServiceImpl.java
View file @
738072ec
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.bailuntec.common.BeanUtils
;
import
com.bailuntec.common.BeanUtils
;
import
com.bailuntec.common.StringUtils
;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.common.StringUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.database.model.CostTypeDomain
;
import
com.blt.other.database.model.CostTypeDomain
;
import
com.blt.other.module.cost.dao.AccountingSubjectMapper
;
import
com.blt.other.module.cost.dao.AccountingSubjectMapper
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dao.CostDetailDao
;
import
com.blt.other.module.cost.dao.CostDetailDao
;
import
com.blt.other.module.cost.dao.CostTypeDao
;
import
com.blt.other.module.cost.dao.CostTypeDao
;
import
com.blt.other.module.cost.dto.request.ResetReq
;
import
com.blt.other.module.cost.dto.request.ResetReq
;
...
@@ -57,10 +59,17 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
...
@@ -57,10 +59,17 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
CostTypeDao
costTypeDao
;
CostTypeDao
costTypeDao
;
@Resource
@Resource
AccountingSubjectMapper
accountingSubjectMapper
;
AccountingSubjectMapper
accountingSubjectMapper
;
@Resource
CostDao
costDao
;
@Override
@Override
public
ResetResp
reset
(
ResetReq
req
)
{
public
ResetResp
reset
(
ResetReq
req
)
{
CostDetailDomain
costDetailDomain
=
this
.
getCostDetailByDetailNo
(
req
.
getDetailNo
());
CostDetailDomain
costDetailDomain
=
this
.
getCostDetailByDetailNo
(
req
.
getDetailNo
());
List
<
CostDetailDomain
>
costDetailDomainList
=
baseMapper
.
selectListByCostNo
(
costDetailDomain
.
getCostNo
());
if
(
costDetailDomainList
.
size
()
>
1
)
{
throw
new
BizRuntimeException
(
"大于1条不能改"
);
}
BeanUtils
.
copyProperties
(
req
,
costDetailDomain
);
BeanUtils
.
copyProperties
(
req
,
costDetailDomain
);
if
(
req
.
getFileSelect2
()
!=
null
)
{
if
(
req
.
getFileSelect2
()
!=
null
)
{
...
@@ -76,6 +85,7 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
...
@@ -76,6 +85,7 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNo
(
req
.
getTypeNo
());
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNo
(
req
.
getTypeNo
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
costDetailDomain
.
setTypeId
(
costTypeDomain
.
getId
());
costDetailDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDetailDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDetailDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
costDetailDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
costDetailDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDetailDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
738072ec
...
@@ -219,7 +219,17 @@ public abstract class AbstractCostService implements CostService {
...
@@ -219,7 +219,17 @@ public abstract class AbstractCostService implements CostService {
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
));
costDomain
.
setTypeId
(
costDetailDomains
.
get
(
0
).
getTypeId
());
CostDetailDomain
costDetailDomain
=
costDetailDomains
.
get
(
0
);
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectById
(
costDetailDomain
.
getTypeId
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
costDomain
.
setTypeId
(
costTypeDomain
.
getId
());
costDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
costDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
costDao
.
updateById
(
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