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
43a7083f
Commit
43a7083f
authored
Feb 27, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
fb33552a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
4 deletions
+54
-4
CostDto.java
...ces/src/main/java/com/bailuntec/cost/api/dto/CostDto.java
+2
-0
CostDao.java
.../src/main/java/com/blt/other/module/cost/dao/CostDao.java
+4
-0
CostDomain.java
...main/java/com/blt/other/module/cost/model/CostDomain.java
+3
-0
CostApiServiceImpl.java
...lt/other/module/cost/service/impl/CostApiServiceImpl.java
+1
-4
Cost.xml
cost-service/src/main/resources/mapper/Cost.xml
+7
-0
CostApiServiceImplTest.java
...ther/module/cost/service/impl/CostApiServiceImplTest.java
+37
-0
No files found.
cost-interfaces/src/main/java/com/bailuntec/cost/api/dto/CostDto.java
View file @
43a7083f
...
@@ -262,4 +262,6 @@ public class CostDto {
...
@@ -262,4 +262,6 @@ public class CostDto {
private
Boolean
isManageCost
;
private
Boolean
isManageCost
;
private
String
departmentName
;
}
}
cost-service/src/main/java/com/blt/other/module/cost/dao/CostDao.java
View file @
43a7083f
...
@@ -78,4 +78,8 @@ public interface CostDao extends BaseMapper<CostDomain> {
...
@@ -78,4 +78,8 @@ public interface CostDao extends BaseMapper<CostDomain> {
@Param
(
"req"
)
CostQueryPageReq
req
);
@Param
(
"req"
)
CostQueryPageReq
req
);
List
<
CostDomain
>
manageCostList
(
ManageCostListReq
req
);
List
<
CostDomain
>
manageCostList
(
ManageCostListReq
req
);
List
<
CostDomain
>
getCostList
(
@Param
(
"page"
)
IPage
<
CostDomain
>
page
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
}
}
cost-service/src/main/java/com/blt/other/module/cost/model/CostDomain.java
View file @
43a7083f
...
@@ -264,6 +264,9 @@ public class CostDomain implements Serializable {
...
@@ -264,6 +264,9 @@ public class CostDomain implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
CostDetailDomain
>
costDetailDomainList
;
private
List
<
CostDetailDomain
>
costDetailDomainList
;
@TableField
(
exist
=
false
)
private
String
departmentName
;
public
void
setCostType
(
CostTypeDomain
costTypeDomain
)
{
public
void
setCostType
(
CostTypeDomain
costTypeDomain
)
{
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/CostApiServiceImpl.java
View file @
43a7083f
...
@@ -265,10 +265,7 @@ public class CostApiServiceImpl implements CostApiService {
...
@@ -265,10 +265,7 @@ public class CostApiServiceImpl implements CostApiService {
public
List
<
CostDto
>
getCostList
(
String
startDate
,
String
endDate
,
Integer
pageNum
,
Integer
pageSize
)
{
public
List
<
CostDto
>
getCostList
(
String
startDate
,
String
endDate
,
Integer
pageNum
,
Integer
pageSize
)
{
IPage
<
CostDomain
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
IPage
<
CostDomain
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
return
this
.
costDao
.
selectPage
(
page
,
new
LambdaQueryWrapper
<
CostDomain
>()
return
this
.
costDao
.
getCostList
(
page
,
startDate
,
endDate
)
.
ge
(
CostDomain:
:
getLastModifyDate
,
startDate
)
.
le
(
CostDomain:
:
getLastModifyDate
,
endDate
))
.
getRecords
()
.
stream
()
.
stream
()
.
map
(
CostDomain:
:
castToDto
)
.
map
(
CostDomain:
:
castToDto
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
...
...
cost-service/src/main/resources/mapper/Cost.xml
View file @
43a7083f
...
@@ -334,4 +334,11 @@
...
@@ -334,4 +334,11 @@
and t1.last_modify_date between #{startDateStr} and #{endDateStr}
and t1.last_modify_date between #{startDateStr} and #{endDateStr}
</select>
</select>
<select
id=
"getCostList"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
select t1.*, od.name department_name
from cost t1
left join oa_user t2 on t1.create_userid = t2.oa_user_id
left join oa_department od on t2.department_id = od.department_id
</select>
</mapper>
</mapper>
cost-service/src/test/java/com/blt/other/module/cost/service/impl/CostApiServiceImplTest.java
0 → 100644
View file @
43a7083f
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.CostApiService
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/2/27 6:24 下午
*/
@Transactional
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
@ActiveProfiles
(
"test"
)
public
class
CostApiServiceImplTest
{
@Resource
CostApiService
costApiService
;
@Test
public
void
getCostList
()
{
costApiService
.
getCostList
(
"2021-01-01 00:00:00"
,
"2021-01-01 00:00:00"
,
1
,
10
);
}
}
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