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
035c615f
Commit
035c615f
authored
Dec 29, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
3426385d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
12 deletions
+48
-12
OaDepartmentMapper.java
...ava/com/blt/other/module/auth/dao/OaDepartmentMapper.java
+3
-2
CheckCostListReq.java
...m/blt/other/module/cost/dto/request/CheckCostListReq.java
+2
-0
FinalCheckState.java
...r/module/cost/service/impl/costcheck/FinalCheckState.java
+4
-4
DepartmentReviewerServiceImpl.java
...odule/sys/service/impl/DepartmentReviewerServiceImpl.java
+9
-1
Cost.xml
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
+19
-1
OaDepartmentMapper.xml
...ore/src/main/resources/mapper/auth/OaDepartmentMapper.xml
+10
-0
DepartmentReviewerMapper.xml
.../resources/mapper/module/sys/DepartmentReviewerMapper.xml
+1
-4
No files found.
bailuntec-cost-core/src/main/java/com/blt/other/module/auth/dao/OaDepartmentMapper.java
View file @
035c615f
...
...
@@ -2,9 +2,9 @@ package com.blt.other.module.auth.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.blt.other.module.auth.model.OaDepartment
;
import
com.blt.other.module.sys.dto.request.DepartmentReviewerListReq
;
import
com.blt.other.module.sys.dto.response.DepartmentReviewerListItem
;
import
com.blt.other.module.auth.model.OaDepartment
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -34,6 +34,7 @@ public interface OaDepartmentMapper extends BaseMapper<OaDepartment> {
OaDepartment
selectByName
(
String
name
);
List
<
OaDepartment
>
allOaDepartment
();
List
<
OaDepartment
>
selectByIds
(
@Param
(
"collect"
)
List
<
Integer
>
collect
);
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/dto/request/CheckCostListReq.java
View file @
035c615f
...
...
@@ -25,4 +25,6 @@ public class CheckCostListReq {
@ApiModelProperty
(
"1- 全部 2-待审核 3-已手动审核 4-已自动审核"
)
Integer
status
;
private
String
costNo
;
private
String
bankCardUser
;
}
bailuntec-cost-core/src/main/java/com/blt/other/module/cost/service/impl/costcheck/FinalCheckState.java
View file @
035c615f
...
...
@@ -2,12 +2,12 @@ package com.blt.other.module.cost.service.impl.costcheck;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.blt.other.common.exception.BizRuntimeException
;
import
com.blt.other.module.sys.model.CostReviewer
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostLogDomain
;
import
com.blt.other.module.cost.dao.CostLogDao
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.model.CostTemplate
;
import
com.blt.other.database.model.CostCompanyDomain
;
import
com.blt.other.database.model.CostLogDomain
;
import
com.blt.other.module.sys.model.CostReviewer
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -88,7 +88,7 @@ public class FinalCheckState extends CostState {
if
(
costContext
.
currentUserId
!=
null
)
{
//人工审核通过
if
(
!
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
if
(
costCurrentReviewerService
.
canAudit
(
currentUserId
,
costDomain
.
getCostNo
()))
{
costDomain
.
setCostStatus
(
CostDomain
.
STATUS_UN_PAY
);
costDomain
.
setLastModifyDate
(
LocalDateTime
.
now
());
costDao
.
updateById
(
costDomain
);
...
...
bailuntec-cost-core/src/main/java/com/blt/other/module/sys/service/impl/DepartmentReviewerServiceImpl.java
View file @
035c615f
...
...
@@ -53,14 +53,20 @@ public class DepartmentReviewerServiceImpl extends ServiceImpl<DepartmentReviewe
public
IPage
<
DepartmentReviewerListItem
>
departmentReviewerList
(
DepartmentReviewerListReq
req
)
{
IPage
<
DepartmentReviewerListItem
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
page
=
baseMapper
.
departmentReviewerList
(
page
,
req
);
if
(
ListUtil
.
isNotEmpty
(
page
.
getRecords
()))
{
Map
<
Integer
,
List
<
CostReviewer
>>
cMap
=
costReviewerMapper
.
selectList
(
new
LambdaQueryWrapper
<
CostReviewer
>()
.
in
(
CostReviewer:
:
getReferId
,
page
.
getRecords
().
stream
().
map
(
DepartmentReviewerListItem:
:
getId
).
collect
(
Collectors
.
toList
())))
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
CostReviewer:
:
getReferId
));
page
.
getRecords
().
forEach
(
departmentReviewerListItem
->
departmentReviewerListItem
.
setCostReviewerList
(
cMap
.
get
(
departmentReviewerListItem
.
getId
())));
Map
<
Integer
,
OaDepartment
>
dMap
=
oaDepartmentMapper
.
selectByIds
(
page
.
getRecords
().
stream
().
map
(
DepartmentReviewerListItem:
:
getPrimaryDepartmentId
).
collect
(
Collectors
.
toList
()))
.
stream
()
.
collect
(
Collectors
.
toMap
(
OaDepartment:
:
getDepartmentId
,
oaDepartment
->
oaDepartment
));
page
.
getRecords
().
forEach
(
departmentReviewerListItem
->
departmentReviewerListItem
.
setCompanyName
(
dMap
.
get
(
departmentReviewerListItem
.
getPrimaryDepartmentId
()).
getCompanyName
()));
}
return
page
;
}
...
...
@@ -71,6 +77,8 @@ public class DepartmentReviewerServiceImpl extends ServiceImpl<DepartmentReviewe
DepartmentReviewer
departmentReviewer
=
this
.
getById
(
req
.
getId
());
departmentReviewer
.
setAutoReviewAmount
(
req
.
getAutoReviewerAmount
());
departmentReviewer
.
setUpdateUserId
(
SessionUtils
.
getCurrentUserId
());
departmentReviewer
.
setUpdateUserName
(
SessionUtils
.
getSysUser
().
getUserName
());
if
(
ListUtil
.
isNotEmpty
(
req
.
getDepartmentReviewerUserIdList
()))
{
costReviewerMapper
.
delete
(
new
LambdaQueryWrapper
<
CostReviewer
>()
...
...
bailuntec-cost-core/src/main/resources/mapper/Cost.xml
View file @
035c615f
...
...
@@ -470,6 +470,9 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
<if
test=
"req.bankCardUser !=null and req.bankCardUser !=''"
>
and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')
</if>
</select>
<!--待我部门审核 + 我已经部门手动审核 + 我已经部门自动审核-->
...
...
@@ -485,6 +488,9 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
<if
test=
"req.bankCardUser !=null and req.bankCardUser !=''"
>
and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')
</if>
</select>
<!--我手动部门审核过的 -->
...
...
@@ -495,6 +501,9 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
<if
test=
"req.bankCardUser !=null and req.bankCardUser !=''"
>
and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')
</if>
</select>
<!--我部门自动审核过的 -->
...
...
@@ -505,6 +514,9 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status not in (0, 3, 5)
and t2.id is not null
<if
test=
"req.bankCardUser !=null and req.bankCardUser !=''"
>
and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')
</if>
</select>
<!--需要我财务审核的-->
...
...
@@ -514,6 +526,9 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 6
and t3.id is not null
<if
test=
"req.bankCardUser !=null and req.bankCardUser !=''"
>
and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')
</if>
</select>
<!--需要我人事审核的-->
...
...
@@ -523,6 +538,9 @@
left join cost_current_reviewer t3 on t1.cost_no = t3.cost_no and t3.oa_user_id = #{req.userid}
where t1.cost_status = 9
and t3.id is not null
</select>
<if
test=
"req.bankCardUser !=null and req.bankCardUser !=''"
>
and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')
</if>
</select>
</mapper>
bailuntec-cost-core/src/main/resources/mapper/auth/OaDepartmentMapper.xml
View file @
035c615f
...
...
@@ -49,6 +49,16 @@
from oa_department
where name = #{name}
</select>
<select
id=
"selectByIds"
resultType=
"com.blt.other.module.auth.model.OaDepartment"
>
select t1.*,
t2.name company_name
from oa_department t1
left join oa_company t2 on t1.company_id = t2.oa_company_id
where department_id in
<foreach
collection=
"collect"
item=
"departmentId"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<if
test=
"departmentId != null and departmentId != 0"
>
#{departmentId}
</if>
</foreach>
</select>
</mapper>
bailuntec-cost-core/src/main/resources/mapper/module/sys/DepartmentReviewerMapper.xml
View file @
035c615f
...
...
@@ -4,12 +4,9 @@
<select
id=
"departmentReviewerList"
resultType=
"com.blt.other.module.sys.dto.response.DepartmentReviewerListItem"
>
select t1.*,
t4.name company_name
select t1.*
from department_reviewer t1
left join cost_reviewer t2 on t1.id = t2.refer_id
left join oa_department t3 on t1.primary_department_id =t3.department_id
left join oa_company t4 on t3.company_id = t4.oa_company_id
where true
<if
test=
"req.reviewerUserId !=null"
>
and t2.reviewer_user_id =#{req.reviewerUserId}
...
...
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