Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-cost-system
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
bltdc
dc-cost-system
Commits
361fbb90
Commit
361fbb90
authored
Nov 17, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3f2f7377
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
32 deletions
+37
-32
CostController.java
...blt/other/module/cost/controller/cost/CostController.java
+4
-13
CostDao.java
.../src/main/java/com/blt/other/module/cost/dao/CostDao.java
+3
-7
CostApiDto.java
...c/main/java/com/blt/other/module/cost/dto/CostApiDto.java
+13
-0
CostService.java
...n/java/com/blt/other/module/cost/service/CostService.java
+1
-1
AbstractCostService.java
...er/module/cost/service/impl/cost/AbstractCostService.java
+5
-4
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+11
-7
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/cost/CostController.java
View file @
361fbb90
...
...
@@ -21,7 +21,6 @@ import com.blt.other.module.cost.vo.*;
import
com.blt.other.module.database.model.CostExpDomain
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.io.FileSystemResource
;
import
org.springframework.core.io.InputStreamResource
;
...
...
@@ -218,25 +217,17 @@ public class CostController {
@ApiOperation
(
"审核费用单列表"
)
@GetMapping
(
"/checkCostList"
)
public
CostResult
<
IPage
<
CostDto
>>
checkCostList
(
@RequestParam
Integer
userid
,
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
pageSize
,
@RequestParam
@ApiParam
(
"1-财务+最终审核 2-部门审核"
)
Integer
type
,
@RequestParam
@ApiParam
(
"1- 全部 2-待审核 3-已手动审核 4-已自动审核"
)
Integer
status
)
{
public
CostResult
<
IPage
<
CostDto
>>
checkCostList
(
CostApiDto
.
CheckCostListReq
req
)
{
costService
=
CostServiceFactory
.
getCostService
();
IPage
<
CostDto
>
page
=
costService
.
checkCostList
(
userid
,
pageNum
,
pageSize
,
type
,
status
);
IPage
<
CostDto
>
page
=
costService
.
checkCostList
(
req
);
return
CostResult
.
success
(
page
);
}
@ApiOperation
(
"审核费用单列表"
)
@GetMapping
(
"/checkCostCount"
)
public
CostResult
<
Long
>
checkCostCount
(
@RequestParam
Integer
userid
,
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
pageSize
,
@RequestParam
@ApiParam
(
"1-财务+最终审核 2-部门审核"
)
Integer
type
,
@RequestParam
@ApiParam
(
"1- 全部 2-待审核 3-已手动审核 4-已自动审核"
)
Integer
status
)
{
public
CostResult
<
Long
>
checkCostCount
(
CostApiDto
.
CheckCostListReq
req
)
{
costService
=
CostServiceFactory
.
getCostService
();
Long
count
=
costService
.
checkCostList
(
userid
,
pageNum
,
pageSize
,
type
,
status
).
getTotal
();
Long
count
=
costService
.
checkCostList
(
req
).
getTotal
();
return
CostResult
.
success
(
count
);
}
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dao/CostDao.java
View file @
361fbb90
...
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.dao;
import
com.bailuntec.cost.api.dto.ManageCostDto
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.blt.other.module.cost.dto.CostApiDto
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.vo.CostExportVo
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -108,14 +109,9 @@ public interface CostDao extends BaseMapper<CostDomain> {
/**
* 审核列表查询
*
* @param page page
* @param type type
* @param status status
* @param userid userid
* @param page page
* @return
*/
IPage
<
CostDomain
>
checkCostList
(
@Param
(
"page"
)
IPage
<
CostDomain
>
page
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"status"
)
Integer
status
,
@Param
(
"userid"
)
Integer
userid
);
@Param
(
"req"
)
CostApiDto
.
CheckCostListReq
req
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/CostApiDto.java
View file @
361fbb90
...
...
@@ -4,6 +4,7 @@ import com.bailuntec.cost.api.dto.CostDto;
import
com.bailuntec.cost.api.dto.CostListPrintDto
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
...
...
@@ -54,4 +55,16 @@ public class CostApiDto {
List
<
CostDto
>
costs
;
}
@Data
public
static
class
CheckCostListReq
{
Integer
userid
;
Integer
pageNum
;
Integer
pageSize
;
@ApiModelProperty
(
"1-财务+最终审核 2-部门审核"
)
Integer
type
;
@ApiModelProperty
(
"1- 全部 2-待审核 3-已手动审核 4-已自动审核"
)
Integer
status
;
private
String
costNo
;
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/CostService.java
View file @
361fbb90
...
...
@@ -108,7 +108,7 @@ public interface CostService {
* @param type 1-财务+最终审核 2-部门审核
* @return 费用单列表
*/
IPage
<
CostDto
>
checkCostList
(
Integer
userid
,
Integer
pageNum
,
Integer
pageSize
,
Integer
type
,
Integer
status
);
IPage
<
CostDto
>
checkCostList
(
CostApiDto
.
CheckCostListReq
req
);
/**
* <p>
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/cost/AbstractCostService.java
View file @
361fbb90
...
...
@@ -230,10 +230,11 @@ public abstract class AbstractCostService implements CostService {
@Transactional
@Override
public
IPage
<
CostDto
>
checkCostList
(
Integer
userid
,
Integer
pageNum
,
Integer
pageSize
,
Integer
type
,
Integer
status
)
{
IPage
<
CostDomain
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
UserDomain
userDomain
=
userService
.
findByUserid
(
userid
);
return
costDao
.
checkCostList
(
page
,
type
,
status
,
userid
).
convert
(
CostDomain:
:
castToDto
);
public
IPage
<
CostDto
>
checkCostList
(
CostApiDto
.
CheckCostListReq
req
)
{
IPage
<
CostDomain
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
UserDomain
userDomain
=
userService
.
findByUserid
(
req
.
getUserid
());
return
costDao
.
checkCostList
(
page
,
req
).
convert
(
CostDomain:
:
castToDto
);
}
@Resource
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
361fbb90
...
...
@@ -425,25 +425,29 @@
LEFT JOIN cost_reviewer t7 on t6.primary_department_id = t7.refer_id and t7.type = 1
where true
/*财务 或者 最终审核 只显示待审核的*/
<if
test=
"
type==
1"
>
<if
test=
"
req.type ==
1"
>
and (t1.cost_status = 7 or t1.cost_status = 8)
and (t4.reviewer_user_id = #{
userid} or t5.reviewer_user_id = #{
userid})
and (t4.reviewer_user_id = #{
req.userid} or t5.reviewer_user_id = #{req.
userid})
</if>
/*部门审核*/
<if
test=
"
type==
2"
>
<if
test=
"
req.type ==
2"
>
/*待审核*/
<if
test=
" status == 2 "
>
<if
test=
"
req.
status == 2 "
>
and t1.cost_status = 6
</if>
/*已手动审核*/
<if
test=
" status == 3 "
>
<if
test=
"
req.
status == 3 "
>
and t2.type = 5
</if>
/*已自动审核*/
<if
test=
" status == 4 "
>
<if
test=
"
req.
status == 4 "
>
and t2.type = 4
</if>
and (t7.reviewer_user_id = #{userid} )
and (t7.reviewer_user_id = #{req.userid} )
</if>
<if
test=
"req.costNo != null and req.costNo !='' "
>
and t1.cost_no =#{req.costNo}
</if>
group by
t1.id
...
...
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