Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
ec60e32e
Commit
ec60e32e
authored
4 years ago
by
tangzhaoqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批权限优化,8个模板数据调用封装
parent
fac37bc7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
113 additions
and
46 deletions
+113
-46
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
+10
-3
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
+0
-31
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMService.java
+14
-0
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMServiceImpl.java
+64
-0
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
+11
-6
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
+14
-6
No files found.
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
View file @
ec60e32e
...
...
@@ -43,6 +43,7 @@ import cn.timer.api.bean.spmk.SpmkInitiatorConfig;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.spmk.SpmkApprovalGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper
;
...
...
@@ -92,6 +93,11 @@ public class SpmkServiceImpl {
@Autowired
private
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
@Autowired
private
ZzglBmgwMService
zzglBmgwMService
;
//TODO 审批模板组
/**
* 新增或编辑-审批模板组
...
...
@@ -247,8 +253,9 @@ public class SpmkServiceImpl {
@ApiOperationSupport
(
order
=
11
)
public
Result
<
Object
>
selectListAg
(
@CurrentUser
UserBean
userBean
){
// ZzglController.
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCa
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
null
),
"操作成功!"
);
List
<
Integer
>
depts
=
zzglBmgwMService
.
empNumupGetDepts
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
());
System
.
out
.
println
(
depts
);
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCa
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
depts
),
"操作成功!"
);
}
...
...
@@ -472,7 +479,7 @@ public class SpmkServiceImpl {
empNums
.
add
(
ygglMainEmp
.
getEmpNum
());
}
summaryQueryDto
.
setEmpNums
(
empNums
);
// 缺-部门id 搜索
IPage
<
SpmkApproveSummary
>
pageAs
=
spmkApproveSummaryMapper
.
selectPageByQuery
(
page
,
summaryQueryDto
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
ec60e32e
...
...
@@ -189,37 +189,6 @@ public class ZzglController {
}
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
public
List
<
Integer
>
empNumupdept
(
Integer
orgCode
,
Integer
empNum
)
{
Set
<
Integer
>
lanzi
=
new
HashSet
<
Integer
>();
//所有部门岗位
List
<
ZzglBmgwM
>
bmgws
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
//个人岗位
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
Integer
getId
=
one
.
getBmgwId
();
Set
<
Integer
>
all
=
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
return
ListUtil
.
toList
(
all
);
}
//遍历
public
Set
<
Integer
>
empNumupdept2
(
Set
<
Integer
>
lanzi
,
List
<
ZzglBmgwM
>
bmgws
,
Integer
getId
)
{
for
(
ZzglBmgwM
z
:
bmgws
)
{
if
(
getId
.
equals
(
z
.
getId
()))
{
lanzi
.
add
(
getId
);
if
(
z
.
getUpId
()==
null
||
z
.
getUpId
()
==
0
)
{
return
lanzi
;
}
getId
=
z
.
getUpId
();
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
}
}
return
lanzi
;
}
/**
* 删除部门岗位
*
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMService.java
0 → 100644
View file @
ec60e32e
package
cn
.
timer
.
api
.
controller
.
zzgl
.
service
;
import
java.util.List
;
/**
* 部门岗位 服务层
*
* @author Tang
*/
public
interface
ZzglBmgwMService
{
public
List
<
Integer
>
empNumupGetDepts
(
Integer
orgCode
,
Integer
empNum
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMServiceImpl.java
0 → 100644
View file @
ec60e32e
package
cn
.
timer
.
api
.
controller
.
zzgl
.
service
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
/**
* 部门岗位 服务逻辑层
*
* @author Tang
*/
@Service
public
class
ZzglBmgwMServiceImpl
implements
ZzglBmgwMService
{
@Autowired
private
ZzglBmgwMMapper
zzglBmgwMMapper
;
@Autowired
private
YgglMainEmpMapper
ygglMainEmpMapper
;
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
@Override
public
List
<
Integer
>
empNumupGetDepts
(
Integer
orgCode
,
Integer
empNum
)
{
Set
<
Integer
>
lanzi
=
new
HashSet
<
Integer
>();
//所有部门岗位
List
<
ZzglBmgwM
>
bmgws
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
//个人岗位
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
Integer
getId
=
one
.
getBmgwId
();
System
.
out
.
println
(
getId
);
Set
<
Integer
>
all
=
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
all
.
add
(
getId
);
return
ListUtil
.
toList
(
all
);
}
//遍历
public
Set
<
Integer
>
empNumupdept2
(
Set
<
Integer
>
lanzi
,
List
<
ZzglBmgwM
>
bmgws
,
Integer
getId
)
{
for
(
ZzglBmgwM
z
:
bmgws
)
{
if
(
getId
.
equals
(
z
.
getId
()))
{
lanzi
.
add
(
getId
);
if
(
z
.
getUpId
()==
null
||
z
.
getUpId
()
==
0
)
{
return
lanzi
;
}
getId
=
z
.
getUpId
();
empNumupdept2
(
lanzi
,
bmgws
,
getId
);
}
}
return
lanzi
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
View file @
ec60e32e
...
...
@@ -17,17 +17,11 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 申请人名称
String
applicant
=
jsonObj
.
get
(
"__applicant"
,
FromData
.
class
).
getValue
();
// 实际转正时间
String
newConfirmationTime
=
jsonObj
.
get
(
"__newConfirmationTime"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 试用期内主要工作和成绩
String
WorkAndAchievement
=
jsonObj
.
get
(
"WorkAndAchievement"
,
FromData
.
class
).
getValue
();
// 存在问题及改进意见
...
...
@@ -35,6 +29,17 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
// 上传文件
String
file
=
jsonObj
.
get
(
"file"
,
FromData
.
class
).
getValue
();
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 实际转正时间
String
newConfirmationTime
=
jsonObj
.
get
(
"__newConfirmationTime"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 调 员工管理 业务
}
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
View file @
ec60e32e
...
...
@@ -78,12 +78,20 @@
<if
test=
"deptIds != null and deptIds.size() > 0"
>
UNION
SELECT custom_approval_id FROM spmk_initiator_config WHERE
asso_id IN
(
<foreach
item=
"it"
index=
"index"
collection=
"deptIds"
separator=
","
close=
""
>
#{it}
</foreach>
) AND type IN (2,3) GROUP BY custom_approval_id
<choose>
<when
test=
"deptIds.size() > 1"
>
asso_id IN
(
<foreach
item=
"it"
index=
"index"
collection=
"deptIds"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
asso_id = #{deptIds[0]}
</otherwise>
</choose>
AND type IN (2,3) GROUP BY custom_approval_id
</if>
) OR b.is_allvisible = 1)
...
...
This diff is collapsed.
Click to expand it.
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