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
66bb3ce0
Commit
66bb3ce0
authored
4 years ago
by
tangzhaoqian
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
员工导出、导入,审批请假、补卡、加班、出差、外出对接,审批逻辑优化
parent
509f7f09
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
338 additions
and
127 deletions
+338
-127
src/main/java/cn/timer/api/bean/spmk/SpmkApproveExecuteRecord.java
+5
-0
src/main/java/cn/timer/api/bean/spmk/SpmkExecutor.java
+5
-0
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+7
-11
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+143
-89
src/main/java/cn/timer/api/dto/yggl/AddygdaDto.java
+1
-1
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+2
-1
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+25
-3
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
+26
-2
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+27
-2
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+27
-2
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
+3
-0
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+30
-2
src/main/java/cn/timer/api/utils/router/enums/ApproveEnum.java
+3
-3
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
+19
-6
src/main/resources/mapping/spmk/SpmkExecutorMapper.xml
+15
-5
No files found.
src/main/java/cn/timer/api/bean/spmk/SpmkApproveExecuteRecord.java
View file @
66bb3ce0
...
...
@@ -58,6 +58,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@TableField
(
fill
=
FieldFill
.
UPDATE
)
@ApiModelProperty
(
value
=
"操作时间 "
,
example
=
"操作时间"
)
private
Date
updateTime
;
private
List
<
SpmkExecutor
>
spmkExecutors
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/spmk/SpmkExecutor.java
View file @
66bb3ce0
...
...
@@ -65,4 +65,8 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
createTime
;
@TableField
(
fill
=
FieldFill
.
UPDATE
)
@ApiModelProperty
(
value
=
"创建时间 "
,
example
=
"创建时间"
)
private
Date
updateTime
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
66bb3ce0
...
...
@@ -18,10 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.druid.sql.visitor.functions.Nil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
...
...
@@ -50,7 +48,6 @@ import cn.timer.api.config.enuminterface.SpmkEnumInterface;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.config.validation.Insert
;
import
cn.timer.api.config.validation.Ranks
;
import
cn.timer.api.config.validation.ValidList
;
import
cn.timer.api.controller.spmk.service.SpmkServiceImpl
;
...
...
@@ -88,10 +85,8 @@ import io.swagger.annotations.ApiOperation;
@Transactional
@RequestMapping
(
value
=
"/spmk"
,
produces
=
{
"application/json"
,
"multipart/form-data"
})
//@BindingResultCtrol(title = "发起审批")
public
class
SpmkController
{
@Autowired
private
SpmkApprovalTemplateGMapper
spmkApprovalTemplateGMapper
;
@Autowired
...
...
@@ -127,7 +122,7 @@ public class SpmkController {
public
Result
<
Object
>
saveAtg
(
@RequestBody
SpmkApprovalTemplateG
spmkApprovalTemplateG
){
if
(
spmkApprovalTemplateG
.
selectCount
(
new
QueryWrapper
<
SpmkApprovalTemplateG
>().
lambda
()
.
ne
(
SpmkApprovalTemplateG:
:
getId
,
spmkApprovalTemplateG
.
getId
())
.
ne
(
spmkApprovalTemplateG
.
getId
()
!=
null
,
SpmkApprovalTemplateG:
:
getId
,
spmkApprovalTemplateG
.
getId
())
.
eq
(
SpmkApprovalTemplateG:
:
getName
,
spmkApprovalTemplateG
.
getName
()))
>
0
)
{
return
ResultUtil
.
error
(
"审批模板组名重复!"
);
}
...
...
@@ -198,7 +193,7 @@ public class SpmkController {
at
.
setRouter
(
ObjectUtil
.
serialize
(
spmkApprovalTemplateDto
.
getRouter
()));
if
(
at
.
selectCount
(
new
QueryWrapper
<
SpmkApprovalTemplate
>().
lambda
()
.
ne
(
SpmkApprovalTemplate:
:
getId
,
at
.
getId
())
.
ne
(
at
.
getId
()
!=
null
,
SpmkApprovalTemplate:
:
getId
,
at
.
getId
())
.
eq
(
SpmkApprovalTemplate:
:
getName
,
at
.
getName
()))
>
0
)
{
return
ResultUtil
.
error
(
"审批模板名重复!"
);
}
...
...
@@ -266,7 +261,7 @@ public class SpmkController {
public
Result
<
Object
>
saveAg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SpmkApprovalG
spmkApprovalG
){
if
(
spmkApprovalG
.
selectCount
(
new
QueryWrapper
<
SpmkApprovalG
>().
lambda
()
.
ne
(
SpmkApprovalG:
:
getId
,
spmkApprovalG
.
getId
())
.
ne
(
spmkApprovalG
.
getId
()
!=
null
,
SpmkApprovalG:
:
getId
,
spmkApprovalG
.
getId
())
.
eq
(
SpmkApprovalG:
:
getName
,
spmkApprovalG
.
getName
())
.
eq
(
SpmkApprovalG:
:
getOrgCode
,
userBean
.
getOrgCode
()))
>
0
)
{
return
ResultUtil
.
error
(
"审批组名重复!"
);
...
...
@@ -315,7 +310,6 @@ public class SpmkController {
public
Result
<
Object
>
selectListAg
(
@CurrentUser
UserBean
userBean
){
List
<
Integer
>
depts
=
zzglBmgwMService
.
empNumupGetDepts
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
());
System
.
out
.
println
(
depts
);
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCa
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
depts
),
"操作成功!"
);
}
...
...
@@ -349,7 +343,7 @@ public class SpmkController {
BeanUtil
.
copyProperties
(
spmkCustomApprovalDto
,
ca
,
"froms"
,
"router"
,
"initiatorConfigs"
);
if
(
ca
.
selectCount
(
new
QueryWrapper
<
SpmkCustomApproval
>().
lambda
()
.
ne
(
SpmkCustomApproval:
:
getId
,
ca
.
getId
())
.
ne
(
ca
.
getId
()
!=
null
,
SpmkCustomApproval:
:
getId
,
ca
.
getId
())
.
eq
(
SpmkCustomApproval:
:
getName
,
ca
.
getName
())
.
eq
(
SpmkCustomApproval:
:
getOrgCode
,
userBean
.
getOrgCode
()))
>
0
)
{
return
ResultUtil
.
error
(
"自定义审批名重复!"
);
...
...
@@ -649,10 +643,12 @@ public class SpmkController {
if
(
aSummary
.
getSts
()
!=
SpmkEnumInterface
.
ApproveSummarySts
.
REFUSE
.
ordinal
())
{
SpmkApproveSummary
.
builder
().
id
(
approvingDto
.
getAsId
()).
currentApprover
(
""
).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
JSONObject
jSONObject
=
ObjectUtil
.
deserialize
(
ad
.
getRequestData
());
jSONObject
.
set
(
"approveId"
,
approvingDto
.
getAsId
());
//审批完成后 业务
SpmkAssoBusiness
sab
=
SpmkAssoBusinessFactory
.
createSpmkAssoType
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
if
(
sab
!=
null
)
sab
.
handleApprove
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
())
);
sab
.
handleApprove
(
jSONObject
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
66bb3ce0
...
...
@@ -49,9 +49,11 @@ import cn.hutool.core.date.DateUtil;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNodeConfig
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ReUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.SysRegion
;
...
...
@@ -77,6 +79,7 @@ import cn.timer.api.config.annotation.UserBean;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.exception.Regular
;
import
cn.timer.api.config.validation.ValidList
;
import
cn.timer.api.dao.clazz.CommonAreaMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.yggl.YgMzDtoMapper
;
...
...
@@ -153,12 +156,14 @@ public class YgglController {
if
(
ygglMainEmp
!=
null
)
{
Integer
gw
=
ygglMainEmp
.
getBmgwId
();
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
)
.
eq
(
ZzglBmgwM:
:
getId
,
gw
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
ZzglBmgwM
gwObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
select
(
ZzglBmgwM:
:
getUpId
,
ZzglBmgwM:
:
getName
).
eq
(
ZzglBmgwM:
:
getId
,
gw
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
if
(
gwObj
!=
null
)
{
ZzglBmgwM
bmObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
select
(
ZzglBmgwM:
:
getId
,
ZzglBmgwM:
:
getName
)
.
eq
(
ZzglBmgwM:
:
getId
,
gwObj
.
getUpId
()).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
ZzglBmgwM
bmObj
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
select
(
ZzglBmgwM:
:
getId
,
ZzglBmgwM:
:
getName
).
eq
(
ZzglBmgwM:
:
getId
,
gwObj
.
getUpId
())
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
one
();
loginInfo
.
setBmId
(
bmObj
!=
null
?
bmObj
.
getId
()
:
null
);
loginInfo
.
setBmName
(
bmObj
!=
null
?
bmObj
.
getName
()
:
null
);
}
...
...
@@ -335,14 +340,15 @@ public class YgglController {
/**
* 添加员工档案
*
* @param userBean
* @param addygdaDto
* @return
*/
@PostMapping
(
value
=
"/addygda"
)
@ApiOperation
(
value
=
"添加员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
4.
添加员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
)
public
Result
<
Object
>
addygda
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AddygdaDto
addygdaDto
)
throws
Exception
{
public
Result
<
Object
>
addygda
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AddygdaDto
addygdaDto
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
String
name
=
addygdaDto
.
getName
();
String
phone
=
addygdaDto
.
getPhone
();
...
...
@@ -372,16 +378,19 @@ public class YgglController {
}
Integer
jobType
=
addygdaDto
.
getJobType
();
Date
rzTime
=
addygdaDto
.
getRzTime
();
Date
rzTime
=
addygdaDto
.
getRzTime
()
==
null
?
new
Date
()
:
addygdaDto
.
getRzTime
()
;
Integer
syq
=
addygdaDto
.
getSyq
();
Integer
sex
=
addygdaDto
.
getSex
();
Integer
bmgwId
=
addygdaDto
.
getBmgwId
();
if
(
StrUtil
.
hasBlank
(
phone
)
||
StrUtil
.
hasBlank
(
name
)
||
StrUtil
.
hasBlank
(
zjNum
))
{
return
ResultUtil
.
error
(
"请输入员工姓名,手机号和身份证号"
);
}
if
(!
ObjectUtil
.
isAllNotEmpty
(
name
,
phone
,
zjType
,
zjNum
,
jobType
,
rzTime
,
syq
,
bmgwId
,
sex
))
{
return
ResultUtil
.
error
(
"请完善员工信息!"
);
}
// if (StrUtil.hasBlank(phone) || StrUtil.hasBlank(name) || StrUtil.hasBlank(zjNum)) {
// return ResultUtil.error("请输入员工姓名,手机号和身份证号");
// }
// if (!ObjectUtil.isAllNotEmpty(name, phone, zjType, zjNum, jobType, rzTime, syq, bmgwId, sex)) {
// return ResultUtil.error("请完善员工信息!");
// }
// if (!IdcardUtil.isValidCard(zjNum)) {
// return ResultUtil.error("请输入有效的证件信息!");
// }
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(!
StrUtil
.
hasBlank
(
phone
),
QyzxEmpLogin:
:
getPhone
,
phone
).
one
();
...
...
@@ -396,71 +405,39 @@ public class YgglController {
// 添加三张表
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso
.
builder
()
.
empNum
(
qyzxEmpLogin
.
getId
())
.
orgCode
(
orgCode
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
())
.
status
(
1
)
.
build
()
.
insert
();
// usertype2普通员工 status1正常
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
()
.
name
(
name
)
.
phone
(
phone
)
.
zjType
(
zjType
)
.
zjNum
(
zjNum
)
.
jobType
(
jobType
)
.
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
())
.
rzTime
(
rzTime
)
.
syq
(
syq
)
.
sex
(
sex
)
.
empNum
(
qyzxEmpLogin
.
getId
())
.
orgCode
(
orgCode
)
.
build
();
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
orgCode
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// usertype2普通员工 status1正常
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
)
.
jobType
(
jobType
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
rzTime
(
rzTime
).
syq
(
syq
)
.
sex
(
sex
).
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
orgCode
).
bmgwId
(
bmgwId
).
build
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
get
OrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
get
Id
,
ygglMainEmp
.
getId
()).
update
();
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
}
else
{
YgglMainEmp
ishad
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
.
lambda
()
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
YgglMainEmp
ishad
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
if
(
ishad
==
null
)
{
// 添加三张表
// 员工权限表(未定)
QyzxEmpEntAsso
.
builder
()
.
empNum
(
login
.
getId
())
.
orgCode
(
orgCode
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
())
.
status
(
1
)
.
build
()
.
insert
();
// usertype2普通员工
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
orgCode
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// usertype2普通员工
// status1正常
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
()
.
name
(
name
)
.
phone
(
phone
)
.
zjType
(
zjType
)
.
zjNum
(
zjNum
)
.
jobType
(
jobType
)
.
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
())
.
rzTime
(
rzTime
)
.
syq
(
syq
)
.
sex
(
sex
)
.
empNum
(
login
.
getId
())
.
orgCode
(
orgCode
)
.
build
();
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
)
.
jobType
(
jobType
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
rzTime
(
rzTime
).
syq
(
syq
)
.
sex
(
sex
).
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
bmgwId
(
bmgwId
).
build
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
get
OrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
get
Id
,
ygglMainEmp
.
getId
()).
update
();
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工档案成功!"
);
}
else
{
...
...
@@ -539,34 +516,111 @@ public class YgglController {
* 导入员工档案
*/
@PostMapping
(
value
=
"/import_emp_record"
)
@ApiOperation
(
value
=
"导入员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
7.
导入员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
7
)
public
Result
<
List
<
YgDrjqbDto
>
>
importEmpRecord
(
@CurrentUser
UserBean
userBean
/* ,@Validated @RequestBody List<AddygdaDto> listAddygdaDto */
)
{
public
Result
<
JSONObject
>
importEmpRecord
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
AddygdaDto
>
listAddygdaDto
)
throws
Exception
{
Integer
orgCode
=
userBean
.
getOrgCode
();
// 查询所有员工手机号
// List<QyzxEmpLogin> listEl = qyzxEmpLoginMapper
// .selectList(new QueryWrapper<QyzxEmpLogin>().lambda()
// .select(QyzxEmpLogin::getPhone));
List
<
YgglMainEmp
>
listMe
=
ygglMainEmpMapper
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
select
(
YgglMainEmp:
:
getPhone
,
YgglMainEmp:
:
getZjNum
));
listMe
=
listMe
!=
null
?
listMe
.
stream
()
.
filter
(
o
->
o
!=
null
&&
o
.
getPhone
()
!=
null
).
collect
(
Collectors
.
toList
())
:
null
;
// 抽取 登录表 的phone的集合
List
<
String
>
listPhone
=
listMe
.
stream
().
map
(
YgglMainEmp:
:
getPhone
).
collect
(
Collectors
.
toList
());
// 抽取 登录表 的zjNum的集合
List
<
String
>
listzjNum
=
listMe
.
stream
().
map
(
YgglMainEmp:
:
getZjNum
).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
listPhone
);
System
.
out
.
println
(
listzjNum
);
List
<
YgglMainEmp
>
listYmp
=
new
ArrayList
<
YgglMainEmp
>();
List
<
AddygdaDto
>
list
=
listAddygdaDto
.
stream
()
.
filter
(
o
->
o
!=
null
&&
!
listPhone
.
contains
(
o
.
getPhone
())
&&
!
listzjNum
.
contains
(
o
.
getZjNum
())).
collect
(
Collectors
.
toList
());
List
<
AddygdaDto
>
phoneRepetitions
=
listAddygdaDto
.
stream
()
.
filter
(
o
->
o
!=
null
&&
listPhone
.
contains
(
o
.
getPhone
())).
collect
(
Collectors
.
toList
());
List
<
AddygdaDto
>
IDCardRepetitions
=
listAddygdaDto
.
stream
()
.
filter
(
o
->
o
!=
null
&&
listzjNum
.
contains
(
o
.
getZjNum
())).
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
"list:"
+
list
);
System
.
out
.
println
(
"phoneRepetitions:"
+
phoneRepetitions
);
System
.
out
.
println
(
"IDCardRepetitions:"
+
IDCardRepetitions
);
YgglMainEmp
yme
;
for
(
AddygdaDto
ad
:
list
)
{
String
name
=
ad
.
getName
();
String
phone
=
ad
.
getPhone
();
Integer
zjType
=
ad
.
getZjType
();
String
zjNum
=
ad
.
getZjNum
();
boolean
isvalid
=
true
;
switch
(
zjType
)
{
case
0
:
isvalid
=
ReUtil
.
isMatch
(
Regular
.
IDCARD
,
zjNum
);
break
;
case
1
:
isvalid
=
ReUtil
.
isMatch
(
Regular
.
HKMAKAO
,
zjNum
);
break
;
case
2
:
isvalid
=
ReUtil
.
isMatch
(
Regular
.
TAIWAN1
,
zjNum
)
||
ReUtil
.
isMatch
(
Regular
.
TAIWAN2
,
zjNum
);
break
;
case
3
:
isvalid
=
ReUtil
.
isMatch
(
Regular
.
PASSPORT1
,
zjNum
)
||
ReUtil
.
isMatch
(
Regular
.
PASSPORT2
,
zjNum
);
break
;
default
:
List
<
QyzxEmpLogin
>
listEl
=
qyzxEmpLoginMapper
.
selectList
(
new
QueryWrapper
<
QyzxEmpLogin
>().
lambda
()
.
select
(
QyzxEmpLogin:
:
getPhone
));
listEl
=
listEl
!=
null
?
listEl
.
stream
()
break
;
}
if
(!
isvalid
)
{
return
ResultUtil
.
error
(
"证件格式不对!"
);
}
Integer
jobType
=
ad
.
getJobType
();
Date
rzTime
=
ad
.
getRzTime
()
==
null
?
new
Date
()
:
ad
.
getRzTime
();
Integer
syq
=
ad
.
getSyq
();
Integer
sex
=
ad
.
getSex
();
Integer
bmgwId
=
ad
.
getBmgwId
();
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(!
StrUtil
.
hasBlank
(
phone
),
QyzxEmpLogin:
:
getPhone
,
phone
).
one
();
if
(
login
==
null
)
{
// 初始化密码 pwd
login
=
QyzxEmpLogin
.
builder
().
phone
(
phone
).
pw
(
Md5
.
md5
(
pwd
))
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
userBean
.
getOrgCode
()).
username
(
name
).
build
();
if
(!
login
.
insert
())
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"添加员工登录表失败,请检查输入信息"
);
}
}
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
orgCode
)
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
CommonEnum
.
U_STS_ON
.
getType
()).
build
().
insert
();
// usertype2普通员工 status1正常
yme
=
YgglMainEmp
.
builder
().
name
(
name
).
phone
(
phone
).
zjType
(
zjType
).
zjNum
(
zjNum
)
.
jobType
(
jobType
).
jobStatus
(
YgEnumInterface
.
jobStatus
.
SHIYONG
.
getType
()).
rzTime
(
rzTime
).
syq
(
syq
)
.
sex
(
sex
).
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
bmgwId
(
bmgwId
).
build
();
if
(
yme
.
insert
())
{
listYmp
.
add
(
yme
);
}
}
.
filter
(
o
->
o
!=
null
&&
o
.
getPhone
()
!=
null
)
.
collect
(
Collectors
.
toList
())
:
null
;
System
.
out
.
println
(
JSONUtil
.
parseObj
(
listEl
));
// listEl.stream().filter(predicate)
// listEl.stream().filter(item -> objId.equals(item.getUpId())).forEach(zzglBmgwM -> {
// list.add(zzglBmgwM.getId());
// getDepts(list, zzglBmgwM.getId(), objs);
// });
JSONObject
obj
=
JSONUtil
.
createObj
();
obj
.
set
(
"empList"
,
listYmp
);
obj
.
set
(
"phoneRepetitions"
,
phoneRepetitions
);
obj
.
set
(
"IDCardRepetitions"
,
IDCardRepetitions
);
//抽取 登录表 的phone的集合
List
<
String
>
listPhone
=
listEl
.
stream
()
.
map
(
QyzxEmpLogin:
:
getPhone
)
.
collect
(
Collectors
.
toList
());
System
.
out
.
println
(
JSONUtil
.
parseObj
(
listPhone
));
listEl
.
stream
().
filter
(
i
->
i
!=
null
).
collect
(
Collectors
.<
QyzxEmpLogin
>
toList
());
return
null
;
//listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList());
return
ResultUtil
.
data
(
obj
,
"导入员工档案成功!"
);
}
/**
...
...
@@ -624,8 +678,8 @@ public class YgglController {
}
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
())
.
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
QyzxEmpEntAsso
.
builder
().
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
).
zjNum
(
e
.
getZj
())
.
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
()).
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
)
.
sex
(
sex
).
jobNum
(
jobNum
).
bmgwId
(
gw
).
empNum
(
qyzxEmpLogin
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
...
...
@@ -643,8 +697,8 @@ public class YgglController {
.
eq
(
"phone"
,
e
.
getPhone
()).
eq
(
"org_code"
,
userBean
.
getOrgCode
()));
if
(
ishad
==
null
)
{
// 员工权限表(未定)
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
)
.
build
().
insert
();
// userType2普通员工,status1正常
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
userBean
.
getOrgCode
())
.
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
1
).
build
().
insert
();
// userType2普通员工,status1正常
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
name
(
e
.
getName
()).
phone
(
e
.
getPhone
()).
zjType
(
0
)
.
zjNum
(
e
.
getZj
()).
jobType
(
jobType
).
rzTime
(
rzdate
).
updateTime
(
new
Date
())
.
updateMan
(
userBean
.
getEmpNum
()).
syq
(
syq
).
sex
(
sex
).
jobNum
(
jobNum
).
empNum
(
login
.
getId
())
...
...
@@ -957,9 +1011,8 @@ public class YgglController {
@ApiOperation
(
value
=
"导出"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
8
)
public
Result
<
List
<
YgglMainEmp
>>
selectygdas
(
@CurrentUser
UserBean
userBean
)
{
int
[]
jList
=
{
1
,
2
,
3
};
List
<
YgglMainEmp
>
list
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
YgglMainEmp:
:
getJobStatus
,
jList
).
list
();
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
YgglMainEmp:
:
getJobStatus
,
1
,
2
,
3
).
list
();
return
ResultUtil
.
data
(
list
,
"导出员工成功"
);
}
...
...
@@ -1633,7 +1686,8 @@ public class YgglController {
updateWrapper
.
eq
(
"emp_num"
,
empNum
);
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
build
().
update
(
updateWrapper
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
())
.
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/yggl/AddygdaDto.java
View file @
66bb3ce0
...
...
@@ -55,7 +55,7 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘"
,
example
=
"0"
)
private
Integer
jobType
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
//
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty
(
value
=
"入职日期 "
,
example
=
"客户注册后的时间为入职时间"
)
private
Date
rzTime
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
66bb3ce0
...
...
@@ -541,7 +541,7 @@ public class RouterUtils {
for
(
Relation
relation
:
listRelation
)
{
List
<
User
>
listUser2
=
relation
.
getUsers
();
if
(
listUser2
!=
null
)
{
// 新增 执行人
for
(
User
user2
:
listUser2
)
{
SpmkExecutor
executor
=
SpmkExecutor
.
builder
()
...
...
@@ -554,6 +554,7 @@ public class RouterUtils {
executor
.
insert
();
}
}
}
listFlowChildren
.
get
(
i
).
setExecute
(
EXECUTED
);
break
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
View file @
66bb3ce0
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.controller.kqgl.service.KqglService
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
...
...
@@ -14,8 +21,11 @@ import lombok.Builder;
@Builder
public
class
EvectionBusiness
extends
SpmkAssoBusiness
{
@Autowired
private
KqglService
kqglService
;
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
...
...
@@ -23,6 +33,9 @@ public class EvectionBusiness extends SpmkAssoBusiness {
String
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 审批汇总id
String
approveId
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"approveId"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"approveId"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
...
...
@@ -34,8 +47,17 @@ public class EvectionBusiness extends SpmkAssoBusiness {
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
AttEvectionApprovalDto
eaD
=
AttEvectionApprovalDto
.
builder
()
.
evectionid
(
Convert
.
toInt
(
approveId
))
.
evectiontype
(
1
)
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
longTime
)*
60
D
)
.
build
();
// 调 考勤管理 业务-出差
kqglService
.
attevectionapproval
(
eaD
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
View file @
66bb3ce0
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.controller.kqgl.service.KqglService
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
* 外出
* 外出
-业务
* @author Tang
*
*/
@Builder
public
class
GoOutBusiness
extends
SpmkAssoBusiness
{
@Autowired
private
KqglService
kqglService
;
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
Exception
{
// TODO Auto-generated method stub
...
...
@@ -19,6 +31,9 @@ public class GoOutBusiness extends SpmkAssoBusiness {
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
();
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 审批汇总id
String
approveId
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"approveId"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"approveId"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
...
...
@@ -30,8 +45,17 @@ public class GoOutBusiness extends SpmkAssoBusiness {
// 上传文件
String
UploadAttachment
=
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
AttEvectionApprovalDto
eaD
=
AttEvectionApprovalDto
.
builder
()
.
evectionid
(
Convert
.
toInt
(
approveId
))
.
evectiontype
(
2
)
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
longTime
)*
60
D
)
.
build
();
// 调 考勤管理 业务-外出
kqglService
.
attevectionapproval
(
eaD
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
View file @
66bb3ce0
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.controller.kqgl.service.KqglService
;
import
cn.timer.api.dto.kqmk.AttEvectionApprovalDto
;
import
cn.timer.api.dto.kqmk.AttLeaveApprovalDto
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
...
...
@@ -14,8 +23,11 @@ import lombok.Builder;
@Builder
public
class
LeaveBusiness
extends
SpmkAssoBusiness
{
@Autowired
private
KqglService
kqglService
;
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
...
...
@@ -24,6 +36,9 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 审批汇总id
String
approveId
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"approveId"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"approveId"
,
FromData
.
class
).
getValue
();
// 请假类型
String
LeaveType
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__LeaveType"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__LeaveType"
,
FromData
.
class
).
getValue
();
// 开始时间
...
...
@@ -37,7 +52,17 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
AttLeaveApprovalDto
laD
=
AttLeaveApprovalDto
.
builder
()
.
leaveid
(
Convert
.
toInt
(
approveId
))
.
leavetype
(
Convert
.
toInt
(
LeaveType
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
longTime
)*
60
D
)
.
build
();
// 调 考勤管理 业务-请假
kqglService
.
attleaveapproval
(
laD
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
View file @
66bb3ce0
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.controller.kqgl.service.KqglService
;
import
cn.timer.api.dto.kqmk.AttRepairApprovalDto
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
...
...
@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder
public
class
ReissueACardBusiness
extends
SpmkAssoBusiness
{
@Autowired
private
KqglService
kqglService
;
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
...
...
@@ -23,14 +34,28 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 审批汇总id
String
approveId
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"approveId"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"approveId"
,
FromData
.
class
).
getValue
();
// 补卡时间
String
PatchCardTime
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__PatchCardTime"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__PatchCardTime"
,
FromData
.
class
).
getValue
();
// 缺卡原因
String
cardShortage
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"cardShortage"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"cardShortage"
,
FromData
.
class
).
getValue
();
// 缺卡时段-上班、下班-前端未改
// String cardreplperiod = ObjectUtil.isNull(jsonObj.get("cardreplperiod",FromData.class)) ? null : jsonObj.get("cardreplperiod",FromData.class).getValue();
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
AttRepairApprovalDto
raD
=
AttRepairApprovalDto
.
builder
()
.
repairid
(
Convert
.
toInt
(
approveId
))
.
cardrepltime
(
DateUtil
.
getStringTime
(
PatchCardTime
,
"yyyy-MM-dd HH:mm:ss"
))
// .cardreplperiod(Convert.toInt(cardreplperiod))
.
build
();
// 调 考勤管理 业务-补卡
kqglService
.
attrepairapproval
(
raD
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/SpmkAssoBusinessFactory.java
View file @
66bb3ce0
...
...
@@ -35,6 +35,9 @@ public class SpmkAssoBusinessFactory {
case
EVECTION:
sat
=
EvectionBusiness
.
builder
().
build
();
break
;
case
GO_OUT:
sat
=
GoOutBusiness
.
builder
().
build
();
break
;
case
REISSUE_A_CARD:
sat
=
ReissueACardBusiness
.
builder
().
build
();
break
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
View file @
66bb3ce0
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.controller.kqgl.service.KqglService
;
import
cn.timer.api.dto.kqmk.AttOvertimeApprovalDto
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
...
...
@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder
public
class
WorkOvertimeBusiness
extends
SpmkAssoBusiness
{
@Autowired
private
KqglService
kqglService
;
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
// 发起人企业id
String
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"orgCode"
,
FromData
.
class
).
getValue
();
...
...
@@ -23,6 +34,9 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 审批汇总id
String
approveId
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"approveId"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"approveId"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
// 结束时间
...
...
@@ -33,10 +47,24 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
String
compensate
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__compensate"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__compensate"
,
FromData
.
class
).
getValue
();
// 加班原因
String
OvertimeReason
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__OvertimeReason"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__OvertimeReason"
,
FromData
.
class
).
getValue
();
// 加班类型-前端未给
String
overtimetype
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__overtimetype"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__overtimetype"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
// 调 考勤管理 业务
AttOvertimeApprovalDto
oaD
=
AttOvertimeApprovalDto
.
builder
()
.
overtimeid
(
Convert
.
toInt
(
approveId
))
.
overtimetype
(
Convert
.
toInt
(
overtimetype
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
timeLong
)*
60
D
)
.
compensate
(
Convert
.
toInt
(
compensate
))
.
build
();
// 调 考勤管理 业务-加班
kqglService
.
attovertimeapproval
(
oaD
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/enums/ApproveEnum.java
View file @
66bb3ce0
...
...
@@ -2,9 +2,9 @@ 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
),
;
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
),
GO_OUT
(
8
,
"外出"
,
2
),
REISSUE_A_CARD
(
9
,
"补卡"
,
2
),
WAGE_ADJUSTMENT
(
10
,
"调薪"
,
3
)
;
private
Integer
type
;
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
View file @
66bb3ce0
...
...
@@ -10,6 +10,7 @@
<result
column=
"type"
property=
"type"
/>
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<resultMap
id=
"BaseResultMapDto"
type=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"
>
...
...
@@ -19,6 +20,7 @@
<result
column=
"type"
property=
"type"
/>
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<collection
column=
"SpmkExecutor_id"
property=
"spmkExecutors"
ofType=
"cn.timer.api.bean.spmk.SpmkExecutor"
resultMap=
"cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap"
columnPrefix=
"SpmkExecutor_"
>
</collection>
...
...
@@ -30,7 +32,8 @@
name,
type,
sts,
create_time
create_time,
update_time
</sql>
<sql
id=
"Base_Column_List_a"
>
...
...
@@ -39,7 +42,8 @@
a.name,
a.type,
a.sts,
a.create_time
a.create_time,
a.update_time
</sql>
<sql
id=
"Base_Column_List_Alias_b"
>
...
...
@@ -50,7 +54,8 @@
b.operator_header_url SpmkExecutor_operator_header_url,
b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time
b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
@@ -59,7 +64,8 @@
name SpmkApproveExecuteRecord_name,
type SpmkApproveExecuteRecord_type,
sts SpmkApproveExecuteRecord_sts,
create_time SpmkApproveExecuteRecord_create_time
create_time SpmkApproveExecuteRecord_create_time,
update_time SpmkApproveExecuteRecord_update_time
</sql>
...
...
@@ -93,7 +99,10 @@
sts,
</if>
<if test ='null != createTime'>
create_time
create_time,
</if>
<if test ='null != updateTime'>
update_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
...
@@ -111,6 +120,9 @@
</if>
<if test ='null != createTime'>
#{createTime}
</if>,
<if test ='null != updateTime'>
#{updateTime}
</if>
</trim>
</insert>
...
...
@@ -127,7 +139,8 @@
<if test ='null != name'>name = #{name},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != sts'>sts = #{sts},</if>
<if test ='null != createTime'>create_time = #{createTime}</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/mapping/spmk/SpmkExecutorMapper.xml
View file @
66bb3ce0
...
...
@@ -12,6 +12,7 @@
<result
column=
"opinion"
property=
"opinion"
/>
<result
column=
"sts"
property=
"sts"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -22,7 +23,8 @@
operator_header_url,
opinion,
sts,
create_time
create_time,
update_time
</sql>
<sql
id=
"Base_Column_List_Alias"
>
...
...
@@ -33,7 +35,8 @@
operator_header_url SpmkExecutor_operator_header_url,
opinion SpmkExecutor_opinion,
sts SpmkExecutor_sts,
create_time SpmkExecutor_create_time
create_time SpmkExecutor_create_time,
update_time SpmkExecutor_update_time
</sql>
<!--
...
...
@@ -60,7 +63,10 @@
sts,
</if>
<if test ='null != createTime'>
create_time
create_time,
</if>
<if test ='null != updateTime'>
update_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
...
...
@@ -83,7 +89,10 @@
#{sts},
</if>
<if test ='null != createTime'>
#{createTime}
#{createTime},
</if>
<if test ='null != updateTime'>
#{updateTime}
</if>
</trim>
</insert>
...
...
@@ -102,7 +111,8 @@
<if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if>
<if test ='null != opinion'>opinion = #{opinion},</if>
<if test ='null != sts'>sts = #{sts},</if>
<if test ='null != createTime'>create_time = #{createTime}</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
...
...
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