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
92d94e31
Commit
92d94e31
authored
Jan 27, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
b634ee16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
CostDetailServiceImpl.java
...other/module/cost/service/impl/CostDetailServiceImpl.java
+11
-3
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+4
-1
No files found.
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostDetailServiceImpl.java
View file @
92d94e31
...
@@ -7,10 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -7,10 +7,12 @@ 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.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.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
;
import
com.blt.other.module.cost.dto.response.ResetResp
;
import
com.blt.other.module.cost.dto.response.ResetResp
;
import
com.blt.other.module.cost.model.AccountingSubject
;
import
com.blt.other.module.cost.model.CostDetailDomain
;
import
com.blt.other.module.cost.model.CostDetailDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostDetailService
;
import
com.blt.other.module.cost.service.CostDetailService
;
...
@@ -53,7 +55,8 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
...
@@ -53,7 +55,8 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
@Resource
@Resource
CostTypeDao
costTypeDao
;
CostTypeDao
costTypeDao
;
@Resource
AccountingSubjectMapper
accountingSubjectMapper
;
@Override
@Override
public
ResetResp
reset
(
ResetReq
req
)
{
public
ResetResp
reset
(
ResetReq
req
)
{
...
@@ -69,9 +72,14 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
...
@@ -69,9 +72,14 @@ public class CostDetailServiceImpl extends ServiceImpl<CostDetailDao, CostDetail
}
}
if
(
StringUtils
.
isNotEmpty
(
req
.
getTypeNo
()))
{
if
(
StringUtils
.
isNotEmpty
(
req
.
getTypeNo
()))
{
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNo
(
req
.
getTypeNo
());
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNo
(
req
.
getTypeNo
());
costDetailDomain
.
setTypeId
(
costTypeDomain
.
getId
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
costDetailDomain
.
setAccountingSubjectId
(
costTypeDomain
.
getAccountingSubjectId
());
costDetailDomain
.
setTypeNo
(
costTypeDomain
.
getTypeNo
());
costDetailDomain
.
setTypeName
(
costTypeDomain
.
getTypeName
());
costDetailDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDetailDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
}
}
baseMapper
.
updateById
(
costDetailDomain
);
baseMapper
.
updateById
(
costDetailDomain
);
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
92d94e31
...
@@ -142,6 +142,8 @@ public abstract class AbstractCostService implements CostService {
...
@@ -142,6 +142,8 @@ public abstract class AbstractCostService implements CostService {
CostTemplateBaseColMapper
costTemplateBaseColMapper
;
CostTemplateBaseColMapper
costTemplateBaseColMapper
;
@Resource
@Resource
AccountingSubjectMapper
accountingSubjectMapper
;
AccountingSubjectMapper
accountingSubjectMapper
;
@Resource
CostTypeDao
costTypeDao
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
...
@@ -166,7 +168,7 @@ public abstract class AbstractCostService implements CostService {
...
@@ -166,7 +168,7 @@ public abstract class AbstractCostService implements CostService {
if
(
StringUtils
.
isNotEmpty
(
costDomain
.
getTypeNo
()))
{
if
(
StringUtils
.
isNotEmpty
(
costDomain
.
getTypeNo
()))
{
CostTypeDomain
costTypeDomain
=
new
CostTypeDomain
(
);
CostTypeDomain
costTypeDomain
=
costTypeDao
.
selectByNo
(
costDomain
.
getTypeNo
()
);
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectById
(
costTypeDomain
.
getAccountingSubjectId
());
costDomain
.
setTypeNo
(
costDomain
.
getTypeNo
());
costDomain
.
setTypeNo
(
costDomain
.
getTypeNo
());
...
@@ -174,6 +176,7 @@ public abstract class AbstractCostService implements CostService {
...
@@ -174,6 +176,7 @@ public abstract class AbstractCostService implements CostService {
costDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDomain
.
setAccountingSubjectNo
(
accountingSubject
.
getSubjectNo
());
costDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
costDomain
.
setAccountingSubjectName
(
accountingSubject
.
getName
());
}
}
Integer
update
=
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
Integer
update
=
costDao
.
update
(
costDomain
,
new
LambdaQueryWrapper
<
CostDomain
>()
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
.
eq
(
CostDomain:
:
getCostNo
,
costDomain
.
getCostNo
()));
...
...
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