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
2f6ac23e
Commit
2f6ac23e
authored
Dec 14, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序审批流程
parent
5affe103
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
110 additions
and
22 deletions
+110
-22
MiniAppCostController.java
...er/module/cost/controller/cost/MiniAppCostController.java
+8
-0
CostDao.java
.../src/main/java/com/blt/other/module/cost/dao/CostDao.java
+5
-0
AppCheckCostListReq.java
...lt/other/module/cost/dto/request/AppCheckCostListReq.java
+8
-0
AppCostListReq.java
...com/blt/other/module/cost/dto/request/AppCostListReq.java
+32
-0
AppCostService.java
...ava/com/blt/other/module/cost/service/AppCostService.java
+9
-0
AppCostServiceImpl.java
...lt/other/module/cost/service/impl/AppCostServiceImpl.java
+7
-0
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+41
-22
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/controller/cost/MiniAppCostController.java
View file @
2f6ac23e
...
...
@@ -4,6 +4,7 @@ import com.bailuntec.cost.api.dto.CostDto;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.module.cost.dto.request.AppCheckCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostPassReq
;
import
com.blt.other.module.cost.dto.request.AppCostRejectReq
;
import
com.blt.other.module.cost.service.AppCostService
;
...
...
@@ -52,4 +53,11 @@ public class MiniAppCostController {
appCostService
.
appCostReject
(
req
);
return
CostResult
.
success
();
}
@ApiOperation
(
"费用列表"
)
@PostMapping
(
"/appCostList"
)
public
CostResult
<
Page
<
CostDto
>>
appCostList
(
@RequestBody
AppCostListReq
req
)
{
Page
<
CostDto
>
page
=
appCostService
.
appCostList
(
req
);
return
CostResult
.
success
(
page
);
}
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dao/CostDao.java
View file @
2f6ac23e
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.module.cost.dto.request.AppCheckCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostListReq
;
import
com.blt.other.module.cost.dto.request.CheckCostListReq
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.vo.CostExportVo
;
...
...
@@ -67,4 +68,8 @@ public interface CostDao extends BaseMapper<CostDomain> {
//小程序审核列表查询
Page
<
CostDomain
>
appCheckCostList
(
@Param
(
"page"
)
IPage
<
CostDomain
>
page
,
@Param
(
"req"
)
AppCheckCostListReq
req
);
//小程序列表查询
Page
<
CostDomain
>
appCostList
(
@Param
(
"page"
)
IPage
<
CostDomain
>
costDomainIPage
,
@Param
(
"req"
)
AppCostListReq
req
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/request/AppCheckCostListReq.java
View file @
2f6ac23e
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* <p>
*
...
...
@@ -20,4 +23,9 @@ public class AppCheckCostListReq {
@ApiModelProperty
(
"当前oa用户id"
)
private
Integer
oaUserId
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
startTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
endTime
;
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/request/AppCostListReq.java
0 → 100644
View file @
2f6ac23e
package
com
.
blt
.
other
.
module
.
cost
.
dto
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/12/14 2:45 下午
*/
@Data
public
class
AppCostListReq
{
private
Integer
pageNum
;
private
Integer
pageSize
;
@ApiModelProperty
(
"当前oa用户id"
)
private
Integer
oaUserId
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
startTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
endTime
;
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/AppCostService.java
View file @
2f6ac23e
...
...
@@ -3,6 +3,7 @@ package com.blt.other.module.cost.service;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.blt.other.module.cost.dto.request.AppCheckCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostPassReq
;
import
com.blt.other.module.cost.dto.request.AppCostRejectReq
;
...
...
@@ -37,4 +38,12 @@ public interface AppCostService {
* @param req req
*/
void
appCostReject
(
AppCostRejectReq
req
);
/**
* 费用列表
*
* @param req req
* @return 费用列表
*/
Page
<
CostDto
>
appCostList
(
AppCostListReq
req
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/AppCostServiceImpl.java
View file @
2f6ac23e
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.module.cost.dao.CostDao
;
import
com.blt.other.module.cost.dto.request.AppCheckCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostListReq
;
import
com.blt.other.module.cost.dto.request.AppCostPassReq
;
import
com.blt.other.module.cost.dto.request.AppCostRejectReq
;
import
com.blt.other.module.cost.model.CostDomain
;
...
...
@@ -49,6 +50,12 @@ public class AppCostServiceImpl implements AppCostService {
costContext
.
refuse
(
req
.
getRejectReason
());
}
@Override
public
Page
<
CostDto
>
appCostList
(
AppCostListReq
req
)
{
IPage
<
CostDomain
>
costDomainIPage
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
return
(
Page
<
CostDto
>)
costDao
.
appCostList
(
costDomainIPage
,
req
).
convert
(
CostDomain:
:
castToDto
);
}
private
CostContext
getCostState
(
String
costNo
,
Integer
oaUserId
)
{
CostDomain
costDomain
=
costDao
.
selectByCostNo
(
costNo
);
CostState
costState
;
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
2f6ac23e
...
...
@@ -479,28 +479,47 @@
<select
id=
"appCheckCostList"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
select t1.*
from cost t1
left join cost_log t2 on t1.cost_no = t2.cost_no
left join cost_company t3 on t1.company_no = t3.company_no
-- 最终审核人
LEFT JOIN cost_reviewer t4 on t3.id = t4.refer_id and t4.type = 3
-- 财务审核人
LEFT JOIN cost_reviewer t5 on t3.id = t5.refer_id and t5.type = 2
-- 部门审核人
LEFT JOIN oa_user t6 on t1.create_userid = t6.oa_user_id
LEFT JOIN cost_reviewer t7 on t6.primary_department_id = t7.refer_id and t7.type = 1
-- 行政审核
LEFT JOIN cost_reviewer t8 on t3.id = t8.refer_id and t5.type = 4
where
-- 最终审核
(t1.cost_status = 8 and t4.reviewer_user_id = #{req.oaUserId})
-- 财务审核
or (t1.cost_status = 7 and t5.reviewer_user_id = #{req.oaUserId})
-- 部门审核
or (t1.cost_status = 6 and t7.reviewer_user_id = #{req.oaUserId})
-- 行政审核
or (t1.cost_status = 9 and t8.reviewer_user_id = #{req.oaUserId})
group by
t1.id
left join cost_log t2 on t1.cost_no = t2.cost_no
left join cost_company t3 on t1.company_no = t3.company_no
-- 最终审核人
left join cost_reviewer t4 on t3.id = t4.refer_id and t4.type = 3
-- 财务审核人
left join cost_reviewer t5 on t3.id = t5.refer_id and t5.type = 2
-- 部门审核人
left join oa_user t6 on t1.create_userid = t6.oa_user_id
left join cost_reviewer t7 on t6.primary_department_id = t7.refer_id and t7.type = 1
-- 行政审核
left join cost_reviewer t8 on t3.id = t8.refer_id and t5.type = 4
where (
-- 最终审核
(t1.cost_status = 8 and t4.reviewer_user_id = #{req.oaUserId})
-- 财务审核
or (t1.cost_status = 7 and t5.reviewer_user_id = #{req.oaUserId})
-- 部门审核
or (t1.cost_status = 6 and t7.reviewer_user_id = #{req.oaUserId})
-- 行政审核
or (t1.cost_status = 9 and t8.reviewer_user_id = #{req.oaUserId})
)
<if
test=
" req.startTime!=null"
>
and t1.create_time
>
=#{req.startTime}
</if>
<if
test=
" req.endTime!=null"
>
and t1.create_time
<
=#{req.endTime}
</if>
group by t1.id
order by t1.create_time desc
</select>
<select
id=
"appCostList"
resultType=
"com.blt.other.module.cost.model.CostDomain"
>
select *
from cost
where create_userid = #{req.oaUserId}
and cost_status in (6,7,8,9)
<if
test=
" req.startTime!=null"
>
and create_time
>
=#{req.startTime}
</if>
<if
test=
" req.endTime!=null"
>
and create_time
<
=#{req.endTime}
</if>
</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