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
f0f0147a
Commit
f0f0147a
authored
Jan 26, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# update
parent
60d44582
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
CostTypeDomain.java
...ain/java/com/blt/other/database/model/CostTypeDomain.java
+1
-0
CostTypeServiceImpl.java
...t/other/module/cost/service/impl/CostTypeServiceImpl.java
+10
-2
No files found.
cost-service/src/main/java/com/blt/other/database/model/CostTypeDomain.java
View file @
f0f0147a
...
...
@@ -33,6 +33,7 @@ public class CostTypeDomain {
private
String
typeName
;
private
String
accountingSubjectNo
;
private
Integer
accountingSubjectId
;
/**
* 形如0b1001 四位二进制
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostTypeServiceImpl.java
View file @
f0f0147a
...
...
@@ -14,6 +14,7 @@ import com.blt.other.module.cost.dto.request.CostTypeAddReq;
import
com.blt.other.module.cost.dto.request.CostTypeModifyReq
;
import
com.blt.other.module.cost.dto.request.CostTypeQueryPageReq
;
import
com.blt.other.module.cost.dto.response.CostTypeResult
;
import
com.blt.other.module.cost.model.AccountingSubject
;
import
com.blt.other.module.cost.service.CostTypeService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
...
...
@@ -31,23 +32,30 @@ public class CostTypeServiceImpl extends ServiceImpl<CostTypeDao, CostTypeDomain
@Override
public
void
addCostType
(
CostTypeAddReq
req
)
{
AccountingSubject
accountingSubject
=
accountingSubjectMapper
.
selectByNo
(
req
.
getAccountingSubjectNo
());
CostTypeDomain
costTypeDomain
=
new
CostTypeDomain
();
costTypeDomain
.
setAccountingSubjectNo
(
req
.
getAccountingSubjectNo
());
costTypeDomain
.
setTypeNo
(
IdWorker
.
getIdStr
());
costTypeDomain
.
setTypeName
(
req
.
getTypeName
());
costTypeDomain
.
setDescription
(
req
.
getDescription
());
costTypeDomain
.
setAccountingSubjectId
(
accountingSubject
.
getId
());
costTypeDomain
.
setCostTemplateType
(
this
.
getCostTemplateType
(
req
.
getType
()));
this
.
save
(
costTypeDomain
);
if
(
req
.
getType
().
equals
(
1
))
{
AccountingSubject
lendAccountingSubject
=
accountingSubjectMapper
.
selectByName
(
"其他应收款"
);
CostTypeDomain
lendCostTypeDomain
=
new
CostTypeDomain
();
lendCostTypeDomain
.
setCostTemplateType
(
CostTypeDomain
.
borrow
);
lendCostTypeDomain
.
setAccountingSubjectNo
(
"1345912843756503041"
);
lendCostTypeDomain
.
setAccountingSubjectNo
(
lendAccountingSubject
.
getSubjectNo
()
);
lendCostTypeDomain
.
setTypeNo
(
IdWorker
.
getIdStr
());
lendCostTypeDomain
.
setTypeName
(
req
.
getTypeName
());
lendCostTypeDomain
.
setDescription
(
req
.
getDescription
());
lendCostTypeDomain
.
setAccountingSubjectId
(
lendAccountingSubject
.
getId
());
}
}
...
...
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