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
5d611ea0
Commit
5d611ea0
authored
Apr 24, 2022
by
jianshuqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用单接口增加费用单明细信息
parent
50fe2180
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
CostDetailDao.java
...ain/java/com/blt/other/module/cost/dao/CostDetailDao.java
+1
-1
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+11
-10
CostDetailMapper.xml
cost-service/src/main/resources/mapper/CostDetailMapper.xml
+4
-1
No files found.
cost-service/src/main/java/com/blt/other/module/cost/dao/CostDetailDao.java
View file @
5d611ea0
...
...
@@ -12,7 +12,7 @@ import java.util.List;
public
interface
CostDetailDao
extends
BaseMapper
<
CostDetailDomain
>
{
List
<
CostDetailDomain
>
selectListByCostNo
(
String
costNo
);
List
<
CostDetailDomain
>
selectListByCostNo
(
String
...
costNo
);
CostDetailDomain
selectByDetailNo
(
String
detailNo
);
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
5d611ea0
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.bailuntec.common.exception.BizException
;
import
com.bailuntec.cost.api.dto.*
;
import
com.bailuntec.cost.api.request.ManageCostListReq
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -9,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.blt.other.common.config.property.ProjectConstant
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.common.util.CurUtils
;
import
com.blt.other.common.util.PathUtil
;
import
com.blt.other.database.model.*
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.cost.dao.*
;
...
...
@@ -146,10 +144,8 @@ public class CostApiServiceImpl implements CostApiService {
costDomain
.
setCreateTime
(
new
Date
());
}
costDomain
.
setCostTemplateIdByFrom
();
if
(
costForm
!=
1
){
costDomain
.
setProject
(
logisticsCostDto
.
getProject
());
costDomain
.
setProjectDate
(
logisticsCostDto
.
getProjectDate
());
}
costDomain
.
setProject
(
logisticsCostDto
.
getProject
());
costDomain
.
setProjectDate
(
logisticsCostDto
.
getProjectDate
());
costDao
.
insert
(
costDomain
);
if
(
costForm
==
1
)
{
CostDetailDomain
costDetailDomain
=
new
CostDetailDomain
();
...
...
@@ -404,11 +400,16 @@ public class CostApiServiceImpl implements CostApiService {
@Override
public
List
<
CostDto
>
getCostList
(
String
startDate
,
String
endDate
,
Integer
pageNum
,
Integer
pageSize
)
{
IPage
<
CostDomain
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
List
<
CostDto
>
listCostDto
=
this
.
costDao
.
getCostList
(
page
,
startDate
,
endDate
).
stream
().
map
(
CostDomain:
:
castToDto
).
collect
(
Collectors
.
toList
());
if
(
listCostDto
!=
null
&&
listCostDto
.
size
()
>
0
){
String
[]
listCostNo
=
listCostDto
.
stream
().
map
(
l
->
l
.
getCostNo
()).
toArray
(
String
[]::
new
);
List
<
CostDetailDomain
>
costDetailDomainList
=
costDetailDao
.
selectListByCostNo
(
listCostNo
);
for
(
CostDto
costDto:
listCostDto
.
stream
().
filter
(
l
->
l
.
getCostForm
()
==
CostDomain
.
COST_FROM_1
).
collect
(
Collectors
.
toList
()))
{
costDto
.
setCostDetailList
(
costDetailDomainList
.
stream
().
filter
(
l
->
l
.
getCostNo
().
equals
(
costDto
.
getCostNo
())).
map
(
CostDetailDomain:
:
castToDto
).
collect
(
Collectors
.
toList
()));
}
}
return
this
.
costDao
.
getCostList
(
page
,
startDate
,
endDate
)
.
stream
()
.
map
(
CostDomain:
:
castToDto
)
.
collect
(
Collectors
.
toList
());
return
listCostDto
;
}
@Override
...
...
cost-service/src/main/resources/mapper/CostDetailMapper.xml
View file @
5d611ea0
...
...
@@ -13,7 +13,10 @@
FROM cost_detail t1
left join cost_type ct on t1.type_id = ct.id
left join bailun_other.accounting_subject ast on ct.accounting_subject_id = ast.id
WHERE t1.cost_no = #{costNo}
WHERE t1.cost_no in
<foreach
collection=
"array"
item=
"costNo"
separator=
","
open=
"("
close=
")"
>
#{costNo,jdbcType=VARCHAR}
</foreach>
</select>
<select
id=
"selectByDetailNo"
resultType=
"com.blt.other.module.cost.model.CostDetailDomain"
>
...
...
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