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
a27e4ed2
Commit
a27e4ed2
authored
Oct 21, 2021
by
liyanlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加获取4k费用单接口
parent
2fbc76ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
0 deletions
+39
-0
CostController.java
.../com/blt/other/module/cost/controller/CostController.java
+11
-0
CostDao.java
.../src/main/java/com/blt/other/module/cost/dao/CostDao.java
+3
-0
CostService.java
...n/java/com/blt/other/module/cost/service/CostService.java
+2
-0
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+10
-0
Cost.xml
cost-service/src/main/resources/mapper/Cost.xml
+13
-0
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/CostController.java
View file @
a27e4ed2
...
...
@@ -507,4 +507,15 @@ public class CostController {
return
resp
;
}
@LoginIgnore
@ApiOperation
(
"获取4k数据"
)
@GetMapping
(
"/costFor4k/{sourceFrom}/{pageSize}/{pageNum}"
)
public
CostResult
<
Page
<
CostDomain
>>
getTypeName
(
@PathVariable
(
"sourceFrom"
)
String
sourceFrom
,
@PathVariable
(
"pageSize"
)
long
pageSize
,
@PathVariable
(
"pageNum"
)
long
pageNum
)
{
// 获取费用单详细信息
Page
<
CostDomain
>
costDomainPage
=
costService
.
queryPageFor4k
(
new
Page
(
pageNum
,
pageSize
),
sourceFrom
);
return
CostResult
.
success
(
costDomainPage
);
}
}
cost-service/src/main/java/com/blt/other/module/cost/dao/CostDao.java
View file @
a27e4ed2
...
...
@@ -93,4 +93,7 @@ public interface CostDao extends BaseMapper<CostDomain> {
List
<
CostDomain
>
getCostList
(
@Param
(
"page"
)
IPage
<
CostDomain
>
page
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
Page
<
CostDomain
>
queryPageFor4k
(
@Param
(
"page"
)
Page
<
Object
>
page
,
@Param
(
"sourceFrom"
)
String
sourceFrom
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/CostService.java
View file @
a27e4ed2
...
...
@@ -139,4 +139,6 @@ public interface CostService {
* @return res
*/
Page
<
CostDomain
>
queryPage
(
CostQueryPageReq
req
);
Page
<
CostDomain
>
queryPageFor4k
(
Page
page
,
String
sourceFrom
);
}
cost-service/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
a27e4ed2
...
...
@@ -518,6 +518,16 @@ public abstract class AbstractCostService implements CostService {
return
page
;
}
@Override
public
Page
<
CostDomain
>
queryPageFor4k
(
Page
page
,
String
sourceFrom
){
Page
<
CostDomain
>
data
=
costDao
.
queryPageFor4k
(
page
,
sourceFrom
);
List
<
CostDetailDomain
>
costDetailList
=
costDetailDao
.
selectList
(
new
LambdaQueryWrapper
<
CostDetailDomain
>()
.
in
(
CostDetailDomain:
:
getCostNo
,
data
.
getRecords
().
stream
().
map
(
x
->
x
.
getCostNo
()).
collect
(
Collectors
.
toList
())));
Map
<
String
,
List
<
CostDetailDomain
>>
listMap
=
costDetailList
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getCostNo
()));
data
.
getRecords
().
forEach
(
x
->
x
.
setCostDetailDomainList
(
listMap
.
get
(
x
.
getCostNo
())));
return
data
;
}
@Resource
CostCashiercallbackService
costCashiercallbackService
;
...
...
cost-service/src/main/resources/mapper/Cost.xml
View file @
a27e4ed2
...
...
@@ -377,4 +377,17 @@
and t1.last_modify_date
<
= #{endDate}
</select>
<select
id=
"queryPageFor4k"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
select
c.*
from
cost c
left join oa_user ou on
ou.oa_user_id = c.create_userid
where
ou.company_id in(18, 27, 32)
and c.source_from in(#{sourceFrom})
order by id desc
</select>
</mapper>
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