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
4d80a30b
Commit
4d80a30b
authored
4 years ago
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tzq' into 'develop'
Tzq See merge request 8timerv2/8timerapiv200!74
parents
b3ee7dc0
ec60e32e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
690 additions
and
80 deletions
+690
-80
src/main/java/cn/timer/api/aspect/BindingResultAspect.java
+39
-6
src/main/java/cn/timer/api/aspect/lang/bean/ValidationError.java
+0
-1
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplate.java
+1
-1
src/main/java/cn/timer/api/bean/spmk/SpmkApproveSummary.java
+1
-1
src/main/java/cn/timer/api/bean/spmk/SpmkCustomApproval.java
+4
-1
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+0
-1
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
+50
-23
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/dao/spmk/SpmkApprovalGMapper.java
+1
-1
src/main/java/cn/timer/api/dto/spmk/MySummaryQueryDto.java
+2
-2
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateDto.java
+1
-1
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
+3
-3
src/main/java/cn/timer/api/dto/spmk/SpmkCustomApprovalDto.java
+22
-2
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+40
-0
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+42
-0
src/main/java/cn/timer/api/utils/router/business/RecruitBusiness.java
+57
-0
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
+47
-0
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+35
-0
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
+39
-0
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusiness.java
+16
-0
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
+49
-0
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
+43
-0
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+41
-0
src/main/java/cn/timer/api/utils/router/enums/ApproveEnum.java
+43
-0
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
+25
-5
src/main/resources/mapping/spmk/SpmkCustomApprovalMapper.xml
+10
-0
No files found.
src/main/java/cn/timer/api/aspect/BindingResultAspect.java
View file @
4d80a30b
...
...
@@ -37,25 +37,38 @@ import cn.timer.api.utils.ResultUtil;
@Component
public
class
BindingResultAspect
{
// 配置织入点
//
@annotation
配置织入点
@Pointcut
(
"@annotation(cn.timer.api.aspect.lang.annotation.BindingResultCtrol)"
)
public
void
bindingResultPointCut
()
{
}
// execution 配置织入点
@Pointcut
(
"execution(* cn.timer.api.controller.*.*.*(..))"
)
public
void
clazzPointCut
()
{
}
@Before
(
"bindingResultPointCut()"
)
//
@Before("bindingResultPointCut()")
public
void
doBefore
(
JoinPoint
point
)
throws
Throwable
{
//预留
// handleDataScope(point);
}
@Around
(
"bindingResultPointCut() && args(..,bindingResult)"
)
public
Object
doAround
(
ProceedingJoinPoint
joinPoint
,
BindingResult
bindingResult
)
throws
Throwable
{
// @Around("bindingResultPointCut() && args(..,bindingResult)")
@Around
(
"clazzPointCut()"
)
public
Object
doAround
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
Long
startTime
=
System
.
currentTimeMillis
();
Object
retVal
;
if
(
bindingResult
.
hasErrors
()){
List
<
ObjectError
>
ls
=
bindingResult
.
getAllErrors
();
Object
[]
objs
=
joinPoint
.
getArgs
();
List
<
Object
>
listObj
=
CollectionUtil
.
toList
(
objs
);
BeanPropertyBindingResult
optional
=
(
BeanPropertyBindingResult
)
listObj
.
stream
()
.
filter
(
p
->
"BeanPropertyBindingResult"
.
equals
(
ClassUtil
.
getClassName
(
p
,
true
)))
.
findFirst
()
.
orElse
(
null
);
if
(
optional
!=
null
&&
optional
.
hasErrors
()){
List
<
ObjectError
>
ls
=
optional
.
getAllErrors
();
List
<
ValidationError
>
listVe
=
new
ArrayList
<
ValidationError
>();
ValidationError
ve
;
for
(
ObjectError
one
:
ls
)
{
...
...
@@ -80,6 +93,26 @@ public class BindingResultAspect {
Console
.
log
(
"返回内容 {}: "
,
JSONObject
.
toJSONString
(
retVal
));
Long
endtime
=
System
.
currentTimeMillis
();
Console
.
log
(
"执行耗时为{}:"
,
endtime
-
startTime
+
"ms"
);
// Object[] objs = joinPoint.getArgs();
//
// List<Object> listObj = CollectionUtil.toList(objs);
// BeanPropertyBindingResult optional = (BeanPropertyBindingResult)listObj.stream()
// .filter(p -> "BeanPropertyBindingResult".equals(ClassUtil.getClassName(p, true)))
// .findFirst()
// .orElse(null);
// if (optional != null && optional.hasErrors()) {
// System.err.println("Optional: "+ optional);
// }
return
retVal
;
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/aspect/lang/bean/ValidationError.java
View file @
4d80a30b
package
cn
.
timer
.
api
.
aspect
.
lang
.
bean
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/spmk/SpmkApprovalTemplate.java
View file @
4d80a30b
...
...
@@ -70,7 +70,7 @@ public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪
"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/spmk/SpmkApproveSummary.java
View file @
4d80a30b
...
...
@@ -73,7 +73,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty
(
value
=
"历史审批人 "
,
example
=
"历史审批人"
)
private
String
historyApprover
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"5
"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
,
example
=
"1
"
)
private
Integer
assoType
;
@TableField
(
fill
=
FieldFill
.
UPDATE
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/spmk/SpmkCustomApproval.java
View file @
4d80a30b
...
...
@@ -73,8 +73,11 @@ public class SpmkCustomApproval extends Model<SpmkCustomApproval> {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪
"
,
example
=
"1"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"所有可见 0否 1是"
,
example
=
"1"
)
private
Integer
isAllvisible
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
byte
[]
froms
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
4d80a30b
...
...
@@ -39,7 +39,6 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntAuthMapper
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/spmk/SpmkServiceImpl.java
View file @
4d80a30b
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/zzgl/ZzglController.java
View file @
4d80a30b
...
...
@@ -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 @
4d80a30b
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 @
4d80a30b
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/dao/spmk/SpmkApprovalGMapper.java
View file @
4d80a30b
...
...
@@ -17,7 +17,7 @@ import cn.timer.api.bean.spmk.SpmkApprovalG;
@Repository
public
interface
SpmkApprovalGMapper
extends
BaseMapper
<
SpmkApprovalG
>
{
List
<
SpmkApprovalG
>
selectListAgInCa
(
@Param
(
"org_code"
)
Integer
org_code
,
@Param
(
"emp_num"
)
Integer
emp_num
);
List
<
SpmkApprovalG
>
selectListAgInCa
(
@Param
(
"org_code"
)
Integer
org_code
,
@Param
(
"emp_num"
)
Integer
emp_num
,
@Param
(
"deptIds"
)
List
<
Integer
>
deptIds
);
boolean
updateListRandsById
(
List
<
SpmkApprovalG
>
list
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/spmk/MySummaryQueryDto.java
View file @
4d80a30b
...
...
@@ -35,8 +35,8 @@ public class MySummaryQueryDto extends Page{
private
String
endTime
;
@NotNull
(
message
=
"type为空"
)
@DecimalMax
(
value
=
"2"
,
message
=
"
assoT
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@DecimalMin
(
value
=
"0"
,
message
=
"
assoT
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@DecimalMax
(
value
=
"2"
,
message
=
"
t
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@DecimalMin
(
value
=
"0"
,
message
=
"
t
ype 只能为 0我发起的 1抄送我的 2我审批的"
)
@ApiModelProperty
(
value
=
"0我发起的 1抄送我的 2我审批的"
,
example
=
"0"
)
private
Integer
type
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/spmk/SpmkApprovalTemplateDto.java
View file @
4d80a30b
...
...
@@ -47,7 +47,7 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型
1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"2
"
)
@ApiModelProperty
(
value
=
"关联类型
0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
,
example
=
"1
"
)
private
Integer
assoType
;
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/spmk/SpmkApproveSummaryDto.java
View file @
4d80a30b
...
...
@@ -38,9 +38,9 @@ public class SpmkApproveSummaryDto{
private
String
initiator
;
@NotNull
(
message
=
"assoType为空"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
薪 4调岗 5加班 6请假 7出差 8外出 9补卡
"
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调
薪 4调岗 5加班 6请假 7出差 8外出 9补卡 "
,
example
=
"5
"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
岗 4加班 5请假 6出差 7外出 8补卡 9调薪
"
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调
岗 4加班 5请假 6出差 7外出 8补卡 9调薪
"
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调
岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
,
example
=
"1
"
)
private
Integer
assoType
;
@NotNull
(
message
=
"requestData为空"
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/spmk/SpmkCustomApprovalDto.java
View file @
4d80a30b
...
...
@@ -3,6 +3,10 @@ package cn.timer.api.dto.spmk;
import
java.util.Date
;
import
java.util.List
;
import
javax.validation.constraints.DecimalMax
;
import
javax.validation.constraints.DecimalMin
;
import
javax.validation.constraints.NotBlank
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.spmk.SpmkInitiatorConfig
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -23,12 +27,15 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty
(
value
=
"企业组织代码 企业组织代码"
,
example
=
"101"
)
private
Integer
orgCode
;
@NotBlank
(
message
=
"approvalGId为空"
)
@ApiModelProperty
(
value
=
"审批组id 当前用户ID"
,
example
=
"101"
)
private
Integer
approvalGId
;
@NotBlank
(
message
=
"iconUrl为空"
)
@ApiModelProperty
(
value
=
"审批图标地址 "
,
example
=
"审批图标地址"
)
private
String
iconUrl
;
@NotBlank
(
message
=
"name为空"
)
@ApiModelProperty
(
value
=
"审批名称 "
,
example
=
"审批名称"
)
private
String
name
;
...
...
@@ -41,6 +48,7 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty
(
value
=
"排序 排序"
,
example
=
"101"
)
private
Integer
ranks
;
@NotBlank
(
message
=
"isOpinion为空"
)
@ApiModelProperty
(
value
=
"审批意见 是否必填 意见 0是 1否"
,
example
=
"101"
)
private
Integer
isOpinion
;
...
...
@@ -50,15 +58,27 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"关联类型 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡"
,
example
=
"1"
)
@NotBlank
(
message
=
"assoType为空"
)
@DecimalMax
(
value
=
"9"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
)
@DecimalMin
(
value
=
"0"
,
message
=
"assoType 只能为 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
)
@ApiModelProperty
(
value
=
"关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪"
,
example
=
"1"
)
private
Integer
assoType
;
@NotBlank
(
message
=
"isAllvisible为空"
)
@DecimalMax
(
value
=
"1"
,
message
=
"isAllvisible 只能为 0否 1是"
)
@DecimalMin
(
value
=
"0"
,
message
=
"isAllvisible 只能为 0否 1是"
)
@ApiModelProperty
(
value
=
"所有可见 0否 1是"
,
example
=
"1"
)
private
Integer
isAllvisible
;
@NotBlank
(
message
=
"froms为空"
)
@ApiModelProperty
(
value
=
"审批表单 "
,
example
=
"审批表单"
)
private
List
<
JSONObject
>
froms
;
@NotBlank
(
message
=
"router为空"
)
@ApiModelProperty
(
value
=
"审批流程 "
,
example
=
"审批流程"
)
private
Router
router
;
@NotBlank
(
message
=
"initiatorConfigs为空"
)
@ApiModelProperty
(
value
=
"可见发起人配置 "
,
example
=
"数组类型"
)
private
List
<
SpmkInitiatorConfig
>
initiatorConfigs
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
4d80a30b
...
...
@@ -196,8 +196,8 @@ public class RouterUtils {
if
(
listCondition
==
null
||
listCondition
.
size
()
==
0
)
{
routerRule
.
setFlow
(
true
);
}
else
{
Compare
compare
;
for
(
Condition
condition
:
listCondition
)
{
Compare
compare
;
for
(
String
string
:
condition
.
getValues
())
{
// 简单工厂模式 - 判断条件
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 出差-业务
* @author Tang
*
*/
@Builder
public
class
EvectionBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
String
endTime
=
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
longTime
=
jsonObj
.
get
(
"__longTime"
,
FromData
.
class
).
getValue
();
// 出差事由
String
businessTrip
=
jsonObj
.
get
(
"__businessTrip"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 请假-业务
*
* @author Tang
*
*/
@Builder
public
class
LeaveBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
LeaveType
=
jsonObj
.
get
(
"__LeaveType"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
String
endTime
=
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
longTime
=
jsonObj
.
get
(
"__longTime"
,
FromData
.
class
).
getValue
();
// 请假事由
String
ReasonsForLeave
=
jsonObj
.
get
(
"__ReasonsForLeave"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/RecruitBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 招聘-业务
*
* @author Tang
*
*/
@Builder
public
class
RecruitBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
RecruitmentDept
=
jsonObj
.
get
(
"__RecruitmentDept"
,
FromData
.
class
).
getValue
();
// 招聘职位
String
RecruitmentPost
=
jsonObj
.
get
(
"__RecruitmentPost"
,
FromData
.
class
).
getValue
();
// 工性性质
String
WorkingNature
=
jsonObj
.
get
(
"__WorkingNature"
,
FromData
.
class
).
getValue
();
// 招聘人数
String
NumberOfRecruiters
=
jsonObj
.
get
(
"__NumberOfRecruiters"
,
FromData
.
class
).
getValue
();
// 已在岗人数
String
NumberOfPeople
=
jsonObj
.
get
(
"NumberOfPeople"
,
FromData
.
class
).
getValue
();
// 招聘原因
String
RecruitmentReasons
=
jsonObj
.
get
(
"RecruitmentReasons"
,
FromData
.
class
).
getValue
();
// 该岗位工作职责
String
operatingDuty
=
jsonObj
.
get
(
"operatingDuty"
,
FromData
.
class
).
getValue
();
// 招聘要求
String
RecruitmentRequirements
=
jsonObj
.
get
(
"RecruitmentRequirements"
,
FromData
.
class
).
getValue
();
// 薪酬上限
String
SalaryCap
=
jsonObj
.
get
(
"SalaryCap"
,
FromData
.
class
).
getValue
();
// 薪酬下限
String
TransferInDepartment
=
jsonObj
.
get
(
"TransferInDepartment"
,
FromData
.
class
).
getValue
();
// 生效日期
String
PayFloor
=
jsonObj
.
get
(
"PayFloor"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 招聘管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 转正-业务
* @author Tang
*
*/
@Builder
public
class
RegularizationBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 申请人名称
String
applicant
=
jsonObj
.
get
(
"__applicant"
,
FromData
.
class
).
getValue
();
// 试用期内主要工作和成绩
String
WorkAndAchievement
=
jsonObj
.
get
(
"WorkAndAchievement"
,
FromData
.
class
).
getValue
();
// 存在问题及改进意见
String
problem
=
jsonObj
.
get
(
"problem"
,
FromData
.
class
).
getValue
();
// 上传文件
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/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 补卡-业务
* @author Tang
*
*/
@Builder
public
class
ReissueACardBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
PatchCardTime
=
jsonObj
.
get
(
"__PatchCardTime"
,
FromData
.
class
).
getValue
();
// 缺卡原因
String
cardShortage
=
jsonObj
.
get
(
"cardShortage"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 离职-业务
* @author Tang
*
*/
@Builder
public
class
ResignationBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
terminationDate
=
jsonObj
.
get
(
"__terminationDate"
,
FromData
.
class
).
getValue
();
// 离职原因
String
ReasonForResignation
=
jsonObj
.
get
(
"__ReasonForResignation"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 员工管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
lombok.Data
;
/**
* 审批关联业务
* @author Tang
*
*/
@Data
public
abstract
class
SpmkAssoBusiness
{
public
abstract
void
handleApprove
(
JSONObject
jsonObj
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.timer.api.utils.router.enums.ApproveEnum
;
/**
* 审批关联业务工厂类
* @author Tang
*
*/
public
class
SpmkAssoBusinessFactory
{
public
static
SpmkAssoBusiness
createSpmkAssoType
(
ApproveEnum
assotype
)
{
SpmkAssoBusiness
sat
=
null
;
switch
(
assotype
)
{
case
DEFAULT:
break
;
case
REGULARIZATION:
sat
=
RegularizationBusiness
.
builder
().
build
();
break
;
case
RESIGNATION:
sat
=
ResignationBusiness
.
builder
().
build
();
break
;
case
TRANSFER_POSITION:
sat
=
TransferPositionBusiness
.
builder
().
build
();
break
;
case
RECRUIT:
sat
=
RecruitBusiness
.
builder
().
build
();
break
;
case
WORK_OVERTIME:
sat
=
WorkOvertimeBusiness
.
builder
().
build
();
break
;
case
LEAVE:
sat
=
LeaveBusiness
.
builder
().
build
();
break
;
case
EVECTION:
sat
=
EvectionBusiness
.
builder
().
build
();
break
;
case
REISSUE_A_CARD:
sat
=
ReissueACardBusiness
.
builder
().
build
();
break
;
default
:
break
;
}
return
sat
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 调岗-业务
* @author Tang
*
*/
@Builder
public
class
TransferPositionBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
ReasonForApplication
=
jsonObj
.
get
(
"__ReasonForApplication"
,
FromData
.
class
).
getValue
();
// 调入部门
String
TransferInDepartment
=
jsonObj
.
get
(
"__TransferInDepartment"
,
FromData
.
class
).
getValue
();
// 调入岗位
String
TransferInPosition
=
jsonObj
.
get
(
"__TransferInPosition"
,
FromData
.
class
).
getValue
();
// 生效日期
String
effectiveDate
=
jsonObj
.
get
(
"__effectiveDate"
,
FromData
.
class
).
getValue
();
// 备注
String
Remarks
=
jsonObj
.
get
(
"Remarks"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 员工管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.dto.spmk.FromData
;
import
lombok.Builder
;
/**
* 加班-业务
* @author Tang
*
*/
@Builder
public
class
WorkOvertimeBusiness
extends
SpmkAssoBusiness
{
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// 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
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
String
endTime
=
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
timeLong
=
jsonObj
.
get
(
"__timeLong"
,
FromData
.
class
).
getValue
();
// 加班补偿方式
String
compensate
=
jsonObj
.
get
(
"__compensate"
,
FromData
.
class
).
getValue
();
// 加班原因
String
OvertimeReason
=
jsonObj
.
get
(
"__OvertimeReason"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/enums/ApproveEnum.java
0 → 100644
View file @
4d80a30b
package
cn
.
timer
.
api
.
utils
.
router
.
enums
;
public
enum
ApproveEnum
{
DEFAULT
(
0
,
"默认"
,
1
),
REGULARIZATION
(
1
,
"转正"
,
1
),
RESIGNATION
(
2
,
"离职"
,
1
),
TRANSFER_POSITION
(
3
,
"调岗"
,
1
),
RECRUIT
(
4
,
"招聘"
,
1
),
WORK_OVERTIME
(
5
,
"加班"
,
2
),
LEAVE
(
6
,
"请假"
,
2
),
EVECTION
(
7
,
"出差"
,
2
),
REISSUE_A_CARD
(
8
,
"补卡"
,
2
),
WAGE_ADJUSTMENT
(
9
,
"调薪"
,
3
),;
private
Integer
type
;
private
String
desc
;
private
Integer
businessType
;
ApproveEnum
(
Integer
type
,
String
desc
,
Integer
businessType
)
{
this
.
type
=
type
;
this
.
desc
=
desc
;
this
.
businessType
=
businessType
;
}
public
Integer
getType
()
{
return
this
.
type
;
}
public
static
ApproveEnum
getEnums
(
Integer
type
)
{
for
(
ApproveEnum
approveEnum
:
values
())
{
if
(
approveEnum
.
getType
()
==
type
)
{
return
approveEnum
;
}
}
return
null
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
Integer
getBusinessType
()
{
return
this
.
businessType
;
}
}
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/spmk/SpmkApprovalGMapper.xml
View file @
4d80a30b
...
...
@@ -60,7 +60,8 @@
b.is_opinion SpmkCustomApproval_is_opinion,
b.update_time SpmkCustomApproval_update_time,
b.create_time SpmkCustomApproval_create_time,
b.asso_type SpmkCustomApproval_asso_type
<!-- ,
b.asso_type SpmkCustomApproval_asso_type,
b.is_allvisible SpmkCustomApproval_is_allvisible
<!-- ,
b.froms SpmkCustomApproval_froms,
b.router SpmkCustomApproval_router -->
</sql>
...
...
@@ -71,12 +72,31 @@
<include
refid=
"Base_Column_List_Alias_ca"
/>
FROM spmk_approval_g a
LEFT JOIN spmk_custom_approval b ON a.id = b.approval_g_id
LEFT JOIN spmk_custom_approval b
ON a.id = b.approval_g_id AND ( b.id IN (
SELECT custom_approval_id FROM spmk_initiator_config WHERE asso_id = #{emp_num} AND type = 1 GROUP BY custom_approval_id
<if
test=
"deptIds != null and deptIds.size() > 0"
>
UNION
SELECT custom_approval_id FROM spmk_initiator_config WHERE
<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)
WHERE a.org_code = #{org_code}
<!-- AND b.id IN (
SELECT custom_approval_id FROM spmk_initiator_config WHERE asso_id = #{emp_num} AND type = 1 GROUP BY custom_approval_id
) -->
ORDER BY a.ranks, b.ranks
</select>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/spmk/SpmkCustomApprovalMapper.xml
View file @
4d80a30b
...
...
@@ -16,6 +16,7 @@
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"asso_type"
property=
"assoType"
/>
<result
column=
"is_allvisible"
property=
"isAllvisible"
/>
<result
column=
"froms"
property=
"froms"
/>
<result
column=
"router"
property=
"router"
/>
</resultMap>
...
...
@@ -33,6 +34,7 @@
update_time,
create_time,
asso_type,
is_allvisible,
froms,
router
</sql>
...
...
@@ -50,6 +52,7 @@
update_time SpmkCustomApproval_update_time,
create_time SpmkCustomApproval_create_time,
asso_type SpmkCustomApproval_asso_type,
is_allvisible SpmkCustomApproval_is_allvisible,
froms SpmkCustomApproval_froms,
router SpmkCustomApproval_router
</sql>
...
...
@@ -102,6 +105,9 @@
<if test ='null != assoType'>
asso_type,
</if>
<if test ='null != isAllvisible'>
is_allvisible,
</if>
<if test ='null != froms'>
froms,
</if>
...
...
@@ -143,6 +149,9 @@
<if test ='null != assoType'>
#{assoType},
</if>
<if test ='null != isAllvisible'>
#{isAllvisible},
</if>
<if test ='null != froms'>
#{froms},
</if>
...
...
@@ -171,6 +180,7 @@
<if test ='null != updateTime'>update_time = #{updateTime},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != assoType'>asso_type = #{assoType},</if>
<if test ='null != isAllvisible'>is_allvisible = #{isAllvisible},</if>
<if test ='null != froms'>froms = #{froms},</if>
<if test ='null != router'>router = #{router}</if>
</set>
...
...
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