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
aa523f78
Commit
aa523f78
authored
4 years ago
by
tangzhaoqian
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
员工导入模板-insert,添加员工-优化,审批、员工管理、企业中心代码整理
parent
66bb3ce0
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
560 additions
and
853 deletions
+560
-853
src/main/java/cn/timer/api/bean/clazz/CommonArea.java
+0
-2
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+3
-0
src/main/java/cn/timer/api/config/enuminterface/SpmkEnumInterface.java
+1
-1
src/main/java/cn/timer/api/config/enuminterface/YgEnumInterface.java
+1
-1
src/main/java/cn/timer/api/config/enums/CommonEnum.java
+5
-3
src/main/java/cn/timer/api/config/exception/GlobalExceptionHandler.java
+10
-0
src/main/java/cn/timer/api/controller/LoginController.java
+6
-9
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+8
-77
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+8
-21
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
+4
-0
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
+35
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+371
-717
src/main/java/cn/timer/api/dto/yggl/AddygdaDto.java
+0
-1
src/main/java/cn/timer/api/dto/yggl/ImportEmpDto.java
+63
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+39
-14
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+2
-2
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+1
-1
No files found.
src/main/java/cn/timer/api/bean/clazz/CommonArea.java
View file @
aa523f78
...
...
@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
aa523f78
...
...
@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"是否企业中心管理员 "
,
example
=
"0-否 1-主账号 2-子账号"
)
private
Integer
isManager
;
@ApiModelProperty
(
value
=
"离职前状态 1试用、2正式 "
,
example
=
"1试用、2正式"
)
private
Integer
beforeLeavingSts
;
@Transient
@TableField
(
exist
=
false
)
private
String
workTime
;
//工龄
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/config/enuminterface/SpmkEnumInterface.java
View file @
aa523f78
...
...
@@ -98,7 +98,7 @@ public interface SpmkEnumInterface {
*/
@Getter
enum
ParticipatorType
implements
SpmkEnumInterface
{
INITIATOR
(
0
,
"发起
人
"
),
COPY
(
1
,
"抄送人"
),
APPROVER
(
2
,
"审批人"
);
INITIATOR
(
0
,
"发起
申请
"
),
COPY
(
1
,
"抄送人"
),
APPROVER
(
2
,
"审批人"
);
private
Integer
type
;
private
String
name
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/config/enuminterface/YgEnumInterface.java
View file @
aa523f78
...
...
@@ -64,7 +64,7 @@ public interface YgEnumInterface {
*/
@Getter
enum
YgJobType
implements
YgEnumInterface
{
QUANZHI
(
0
,
"全
"
),
SHIXI
(
1
,
"实习"
),
JIANZHI
(
2
,
"兼
"
),
LWPQ
(
3
,
"劳务派遣"
),
LAOWU
(
4
,
"劳务"
),
PAIQIAN
(
5
,
"派遣"
),
QUANZHI
(
0
,
"全
职"
),
SHIXI
(
1
,
"实习"
),
JIANZHI
(
2
,
"兼职
"
),
LWPQ
(
3
,
"劳务派遣"
),
LAOWU
(
4
,
"劳务"
),
PAIQIAN
(
5
,
"派遣"
),
WAIBAO
(
6
,
"外包"
),
TUIXIU
(
7
,
"退休"
);
private
Integer
type
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/config/enums/CommonEnum.java
View file @
aa523f78
...
...
@@ -11,20 +11,22 @@ import lombok.Getter;
@Getter
public
enum
CommonEnum
{
NULL_STR
(
0
,
""
),
/**
* 1 超管理员
*/
U_TYPE_ADMIN
(
1
,
"超管理员"
),
U_TYPE_ADMIN
(
0
,
"超管理员"
),
/**
* 2 子管理
*/
U_TYPE_C_ADMIN
(
2
,
"子管理"
),
U_TYPE_C_ADMIN
(
1
,
"子管理"
),
/**
* 3 普通员工
*/
U_TYPE_EMP
(
3
,
"普通员工"
),
U_TYPE_EMP
(
2
,
"普通员工"
),
/**
* 0 关闭
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/config/exception/GlobalExceptionHandler.java
View file @
aa523f78
package
cn
.
timer
.
api
.
config
.
exception
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -64,6 +65,15 @@ public class GlobalExceptionHandler {
return
ResultUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
());
}
/**
* io异常
*/
@ExceptionHandler
(
IOException
.
class
)
public
Result
<
Object
>
ioException
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
ResultUtil
.
error
(
e
.
getMessage
());
}
/**
* 自定义验证异常
*/
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
aa523f78
...
...
@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
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.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enuminterface.YgEnumInterface.YgJobType
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.controller.spmk.service.SpmkServiceImpl
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
...
...
@@ -430,7 +432,7 @@ public class LoginController {
@ApiOperation
(
value
=
"6.注册企业"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
)
@Log
(
title
=
"企业注册"
,
businessType
=
BusinessType
.
INSERT
)
public
Result
<
String
>
register
(
@RequestBody
EntRegisterDto
entRegisterDto
)
{
public
Result
<
String
>
register
(
@RequestBody
EntRegisterDto
entRegisterDto
)
throws
Exception
{
// 事务回滚
/*
* DefaultTransactionDefinition def = new DefaultTransactionDefinition();
...
...
@@ -473,12 +475,6 @@ public class LoginController {
if
(
login
==
null
)
{
// 员工信息
/*
* QyzxEmpLogin qyzxEmpLogin =
* QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
* .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(
* DateUtil.date()) .endTime(DateUtil.nextMonth()).build();
*/
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
phone
).
pw
(
Md5
.
md5
(
pw
))
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
qyzxEntInfoM
.
getId
()).
regTime
(
DateUtil
.
date
())
.
build
();
...
...
@@ -489,8 +485,9 @@ public class LoginController {
}
}
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
()).
rzTime
(
new
Date
()).
isManager
(
1
)
.
name
(
username
).
jobStatus
(
1
).
build
().
insert
();
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
()).
rzTime
(
new
Date
())
.
isManager
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
()).
name
(
username
).
phone
(
phone
).
jobType
(
YgJobType
.
QUANZHI
.
getType
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
())
.
build
().
insert
();
if
(!
b4
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"注册企业失败3"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
aa523f78
...
...
@@ -142,25 +142,6 @@ public class QyzxController {
}
/**
* 企业认证-审核-通过/未通过
*
* @param qyzxEntAuth
* @return
*/
/*
* @PostMapping(value = "/entauthcheck")
*
* @ApiOperation(value = "企业认证-审核-通过/未通过", httpMethod = "POST", notes =
* "接口发布说明") public Result<QyzxEntAuth> entauthcheck1(@CurrentUser UserBean
* userBean, @RequestBody QyzxEntAuth qyzxEntAuth) { Integer id =
* qyzxEntAuth.getId(); Integer authType = qyzxEntAuth.getAuthType(); if (id ==
* null || authType == null) { return ResultUtil.error("参数缺少/异常"); } QyzxEntAuth
* entAuth = QyzxEntAuth.builder().id(id).authType(authType).build(); boolean b
* = entAuth.updateById(); if (b) { return ResultUtil.data(qyzxEntAuth,
* "企业认证-审批成功"); } else { return ResultUtil.error("企业认证-审批失败"); } }
*/
/**
* 运营管理 企业认证-审核-通过/不通过(weng)
*
* @param qyzxEntAuth
...
...
@@ -267,10 +248,10 @@ public class QyzxController {
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"org_code"
).
eq
(
"emp_num"
,
empNum
);
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
queryWrapper
);
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
select
(
QyzxEmpEntAsso:
:
getOrgCode
)
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
())
);
List
<
QyzxEntInfoM
>
qyzxEntInfoMs
=
new
LambdaQueryChainWrapper
<
QyzxEntInfoM
>(
qyzxEntInfoMMapper
)
.
in
(
CollUtil
.
isNotEmpty
(
orgCodes
),
QyzxEntInfoM:
:
getId
,
orgCodes
).
list
();
return
ResultUtil
.
data
(
qyzxEntInfoMs
,
"获取企业信息成功"
);
...
...
@@ -327,56 +308,6 @@ public class QyzxController {
}
}
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
/**
* 意见反馈
*/
/*
* @PostMapping(value = "/feedback")
*
* @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") public
* Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
*
* @RequestParam(required = false) String opinionText, @RequestParam(required =
* false) String moudle,
*
* @Param("files") List<MultipartFile> files) { String url = null; List<String>
* list = new ArrayList<String>(); if (files != null) { for (MultipartFile file
* : files) { String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle
* + "/" + file.getOriginalFilename(); if (file == null || file.getSize() <= 0)
* { return ResultUtil.error("上传的文件为空,请重新选择!"); } else { try { url =
* oss.uploadFile(path, file.getInputStream()); list.add(url); } catch
* (IOException e) { e.printStackTrace(); } } } } QyzxSuggestionFeeback feeback
* = new QyzxSuggestionFeeback(); feeback.setEmpNum(userBean.getEmpNum());
* feeback.setOpinionText(opinionText); feeback.setCreateTime(new Date());
* feeback.setOrgCode(userBean.getOrgCode()); boolean a = feeback.insert(); if
* (a && list.size() > 0) { for (String opinionUrl : list) {
* QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(
* opinionUrl).build().insert(); } } return ResultUtil.success("意见反馈成功!"); }
*/
// /**
// * 意见反馈2
// */
// @PostMapping(value = "/feedback")
// @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
// public Result<String> feedback(@CurrentUser UserBean userBean, @RequestBody FeebackDto feebackDto) {
// String opinionText = feebackDto.getOpinionText();
// List<String> urlList = feebackDto.getUrlList();
// QyzxSuggestionFeeback qs = QyzxSuggestionFeeback.builder().orgCode(userBean.getOrgCode()).empNum(userBean.getEmpNum()).opinionText(opinionText).bugType(1).createTime(new Date()).build();
//
// boolean tof = qs.insert();
// Integer feebackId = qs.getId();
// if (tof) {
// for (String str : urlList) {
// QyzxFeebackAccessory.builder().feebackId(feebackId).opinionUrl(str).build().insert();
// }
// return ResultUtil.data("意见反馈成功!");
// }
//
// return ResultUtil.data("意见反馈失败!");
// }
/**
* 意见反馈
*/
...
...
@@ -438,8 +369,8 @@ public class QyzxController {
.
build
().
insertOrUpdate
();
// 添加或修改服务计算表
Integer
number
=
qyzxPayServe
.
getNum
();
QueryWrapper
<
QyzxAttaFwjsb
>
queryWrapper
=
new
QueryWrapper
<>
();
queryWrapper
.
eq
(
"emp_num"
,
userBean
.
getEmpNum
()).
eq
(
"code"
,
code
);
LambdaQueryWrapper
<
QyzxAttaFwjsb
>
queryWrapper
=
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
();
queryWrapper
.
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()).
eq
(
QyzxAttaFwjsb:
:
getCode
,
code
);
Integer
result
=
QyzxAttaFwjsb
.
builder
().
build
().
selectCount
(
queryWrapper
);
if
(
result
!=
null
&&
result
>
0
)
{
QyzxAttaFwjsb
fwjb
=
QyzxAttaFwjsb
.
builder
().
build
().
selectOne
(
queryWrapper
);
...
...
@@ -465,7 +396,7 @@ public class QyzxController {
@ApiOperation
(
value
=
"查看服务计算"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxAttaFwjsb
>>
fwjs
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxAttaFwjsb
>
qyzxAttaFpgl
=
QyzxAttaFwjsb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
().
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
qyzxAttaFpgl
,
"获取服务计算成功"
);
}
...
...
@@ -479,7 +410,7 @@ public class QyzxController {
@ApiOperation
(
value
=
"获取购买记录"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxLogBuy
>>
selectgmjl
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxLogBuy
>
qyzxLogBuy
=
QyzxLogBuy
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxLogBuy
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
.
selectList
(
new
QueryWrapper
<
QyzxLogBuy
>().
lambda
().
eq
(
QyzxLogBuy:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
qyzxLogBuy
,
"获取购买记录成功"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
aa523f78
...
...
@@ -47,6 +47,7 @@ import cn.timer.api.config.annotation.UserBean;
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.enums.CommonEnum
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.config.validation.Ranks
;
import
cn.timer.api.config.validation.ValidList
;
...
...
@@ -88,6 +89,8 @@ produces = { "application/json","multipart/form-data" })
public
class
SpmkController
{
@Autowired
SpmkServiceImpl
spmkService
;
@Autowired
private
SpmkApprovalTemplateGMapper
spmkApprovalTemplateGMapper
;
@Autowired
private
SpmkApprovalTemplateMapper
spmkApprovalTemplateMapper
;
...
...
@@ -375,8 +378,6 @@ public class SpmkController {
}
//
/**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
...
...
@@ -408,7 +409,6 @@ public class SpmkController {
}
return
ResultUtil
.
success
(
"操作成功!"
);
}
/**
...
...
@@ -462,7 +462,7 @@ public class SpmkController {
listRouter
.
add
(
spmkApproveSummaryDto
.
getRouter
());
JSONObject
jSONObject
=
spmkApproveSummaryDto
.
getRequestData
()
.
set
(
"orgCode"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
userBean
.
getOrgCode
())).
build
())
.
set
(
"initiator"
,
FromData
.
builder
().
value
(
spmkApproveSummaryDto
.
getInitiator
()).
build
())
.
set
(
"initiator"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getName
()).
build
())
.
set
(
"headUrl"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getHeadUrl
()).
build
())
.
set
(
"id"
,
FromData
.
builder
().
value
(
StrUtil
.
toString
(
userBean
.
getEmpNum
())).
build
());
RouterUtils
.
NextNode
(
listRouter
,
jSONObject
,
ISFIRST
);
...
...
@@ -555,18 +555,7 @@ public class SpmkController {
@Log
(
title
=
"审批-审批详情"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
selectAd
(
@PathVariable
(
required
=
true
)
Integer
id
)
{
SpmkApproveDetail
ad
=
spmkApproveDetailMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>().
lambda
().
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
id
));
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
return
ResultUtil
.
data
(
adD
,
"操作成功!"
);
}
List
<
SpmkApproveExecuteRecord
>
listAer
=
spmkApproveExecuteRecordMapper
.
selectListByAsId
(
id
);
BeanUtil
.
copyProperties
(
ad
,
adD
,
"requestData"
,
"froms"
,
"router"
,
"spmkApproveExecuteRecord"
);
adD
.
setRequestData
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
()));
adD
.
setFroms
(
ObjectUtil
.
deserialize
(
ad
.
getFroms
()));
adD
.
setRouter
(
ObjectUtil
.
deserialize
(
ad
.
getRouter
()));
adD
.
setFlowChildren
(
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
()));
adD
.
setApproveExecuteRecord
(
listAer
);
SpmkApproveDetailDto
adD
=
spmkService
.
selectApproveDetailByAsId
(
id
);
return
ResultUtil
.
data
(
adD
,
"操作成功!"
);
}
...
...
@@ -620,6 +609,7 @@ public class SpmkController {
if
(
aSummary
.
getSts
()
==
0
)
{
List
<
FlowChildren
>
listFlowChildren
=
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
());
// 审批逻辑
RouterUtils
.
approving
(
listFlowChildren
,
approvingDto
.
getAsId
(),
...
...
@@ -641,7 +631,7 @@ public class SpmkController {
.
eq
(
SpmkApproveSummary:
:
getId
,
approvingDto
.
getAsId
()));
if
(
aSummary
.
getSts
()
!=
SpmkEnumInterface
.
ApproveSummarySts
.
REFUSE
.
ordinal
())
{
SpmkApproveSummary
.
builder
().
id
(
approvingDto
.
getAsId
()).
currentApprover
(
""
).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
approvingDto
.
getAsId
()).
currentApprover
(
CommonEnum
.
NULL_STR
.
getDesc
()
).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
JSONObject
jSONObject
=
ObjectUtil
.
deserialize
(
ad
.
getRequestData
());
jSONObject
.
set
(
"approveId"
,
approvingDto
.
getAsId
());
...
...
@@ -754,16 +744,13 @@ public class SpmkController {
return
ResultUtil
.
data
(
spmkIcons
,
"获取图标列表成功"
);
}
@Autowired
SpmkServiceImpl
SpmkService
;
//TODO 测试-生成 审批组 和 自定义审批
@GetMapping
(
value
=
"/test"
)
@ApiOperation
(
value
=
"98.测试-生成 审批组 和 自定义审批"
,
httpMethod
=
"GET"
,
notes
=
"测试-生成 审批组 和 自定义审批"
)
@ApiOperationSupport
(
order
=
98
)
public
Result
<
List
<
SpmkIcon
>>
createCustomApproval
(
@RequestParam
Integer
orgCode
){
S
pmkService
.
createCustomApproval
(
orgCode
);
s
pmkService
.
createCustomApproval
(
orgCode
);
List
<
SpmkIcon
>
spmkIcons
=
SpmkIcon
.
builder
().
build
().
selectAll
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
View file @
aa523f78
package
cn
.
timer
.
api
.
controller
.
spmk
.
service
;
import
cn.timer.api.dto.spmk.SpmkApproveDetailDto
;
public
interface
SpmkService
{
boolean
createCustomApproval
(
Integer
orgCode
);
SpmkApproveDetailDto
selectApproveDetailByAsId
(
Integer
asId
);
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
View file @
aa523f78
...
...
@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
import
cn.timer.api.bean.spmk.SpmkApproveDetail
;
import
cn.timer.api.bean.spmk.SpmkApproveExecuteRecord
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
import
cn.timer.api.dao.spmk.SpmkApproveDetailMapper
;
import
cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper
;
import
cn.timer.api.dao.spmk.SpmkCustomApprovalMapper
;
import
cn.timer.api.dto.spmk.SpmkApproveDetailDto
;
@Service
public
class
SpmkServiceImpl
implements
SpmkService
{
@Autowired
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
private
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
@Autowired
private
SpmkApproveDetailMapper
spmkApproveDetailMapper
;
@Autowired
private
SpmkApproveExecuteRecordMapper
spmkApproveExecuteRecordMapper
;
/**
* 根据orgCode查数据库 审批模板 生成 自定义模板
...
...
@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{
return
true
;
}
/**
* 根据审批汇总id 获取 审批详情
*/
@Override
public
SpmkApproveDetailDto
selectApproveDetailByAsId
(
Integer
asId
)
{
// TODO Auto-generated method stub
SpmkApproveDetail
ad
=
spmkApproveDetailMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>().
lambda
().
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
asId
));
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
return
null
;
}
List
<
SpmkApproveExecuteRecord
>
listAer
=
spmkApproveExecuteRecordMapper
.
selectListByAsId
(
asId
);
BeanUtil
.
copyProperties
(
ad
,
adD
,
"requestData"
,
"froms"
,
"router"
,
"spmkApproveExecuteRecord"
);
adD
.
setRequestData
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
()));
adD
.
setFroms
(
ObjectUtil
.
deserialize
(
ad
.
getFroms
()));
adD
.
setRouter
(
ObjectUtil
.
deserialize
(
ad
.
getRouter
()));
adD
.
setFlowChildren
(
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
()));
adD
.
setApproveExecuteRecord
(
listAer
);
return
adD
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
aa523f78
...
...
@@ -5,20 +5,18 @@
*/
package
cn
.
timer
.
api
.
controller
.
yggl
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.transaction.Transactional
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -38,23 +36,24 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.IoUtil
;
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.hutool.poi.excel.ExcelUtil
;
import
cn.hutool.poi.excel.ExcelWriter
;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.SysRegion
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
...
...
@@ -87,13 +86,12 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.yggl.AddygdaDto
;
import
cn.timer.api.dto.yggl.ImportEmpDto
;
import
cn.timer.api.dto.yggl.LoginInfoDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
import
cn.timer.api.dto.yggl.LzbQueryDto
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgDrjqbDto
;
import
cn.timer.api.dto.yggl.YgDrsDto
;
import
cn.timer.api.dto.yggl.YgKVDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
...
...
@@ -137,151 +135,20 @@ public class YgglController {
private
YgMzDtoMapper
ygMzDtoMapper
;
/**
* 获取登录人的相关信息
*
* @param
* @return
*/
@GetMapping
(
value
=
"/loginmessage"
)
@ApiOperation
(
value
=
"获取登录人的相关信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
68
)
public
Result
<
LoginInfoDto
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
LoginInfoDto
loginInfo
=
LoginInfoDto
.
builder
().
build
();
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getZzTime
,
YgglMainEmp:
:
getEmpNum
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
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
();
if
(
gwObj
!=
null
)
{
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
);
}
loginInfo
.
setEmpNum
(
ygglMainEmp
.
getEmpNum
());
loginInfo
.
setName
(
ygglMainEmp
.
getName
());
loginInfo
.
setGwId
(
gw
);
loginInfo
.
setGwName
(
gwObj
!=
null
?
gwObj
.
getName
()
:
""
);
loginInfo
.
setEntryTime
(
ygglMainEmp
.
getRzTime
());
loginInfo
.
setRegularTime
(
ygglMainEmp
.
getRzTime
());
}
return
ResultUtil
.
data
(
loginInfo
,
"操作成功!"
);
}
/**
* 获取登录人和上级主管的empNum和名称
*
* @param
* @return
*/
@GetMapping
(
value
=
"/loginerChargers"
)
@ApiOperation
(
value
=
" 获取登录人和上级主管的empNum和名称"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
69
)
public
Result
<
List
<
LoginerChargeDto
>>
loginerChargers
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
gw
=
empNumConfirm
(
orgCode
,
empNum
).
getBmgwId
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM
.
getUpDepts
(
list
,
gw
,
zzglBmgwMs
);
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
for
(
Integer
zzglId
:
list
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
}
}
}
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
m
.
setHeadUrl
(
""
);
}
loginerChargeDtos
.
add
(
new
LoginerChargeDto
(
m
.
getEmpNum
(),
m
.
getName
(),
m
.
getHeadUrl
()));
}
Collections
.
reverse
(
loginerChargeDtos
);
return
ResultUtil
.
data
(
loginerChargeDtos
,
"获取上级部门的部门id"
);
}
// 根据传来的empNum获取该人员信息,没有则传全部
public
List
<
YgglMainEmp
>
empNumsConfirm
(
Integer
orgCode
,
List
<
Integer
>
empNumList
)
{
List
<
YgglMainEmp
>
all
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
list
();
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
if
(
empNumList
.
size
()
!=
0
)
{
for
(
Integer
empNum
:
empNumList
)
{
all
.
stream
().
filter
(
item
->
empNum
.
equals
(
item
.
getEmpNum
())).
forEach
(
action
->
{
ygglMainEmps
.
add
(
action
);
});
}
}
else
{
ygglMainEmps
.
addAll
(
all
);
}
return
ygglMainEmps
;
}
// 根据传来的empNum获取该人员信息
public
YgglMainEmp
empNumConfirm
(
Integer
orgCode
,
Integer
empNum
)
{
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
return
one
;
}
/**
* 获取用户头像
*
* @param
* @return
*/
@PostMapping
(
value
=
"/headphotos"
)
@ApiOperation
(
value
=
"获取用户头像"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
70
)
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
if
(
empNumList
.
size
()
==
0
)
{
return
ResultUtil
.
error
(
"请输入empNum数组"
);
}
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
in
(
YgglMainEmp:
:
getEmpNum
,
empNumList
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getHeadUrl
));
for
(
YgglMainEmp
yg
:
yglList
)
{
if
(
StringUtil
.
isEmpty
(
yg
.
getHeadUrl
()))
{
yg
.
setHeadUrl
(
""
);
}
}
return
ResultUtil
.
data
(
yglList
,
"获取用户头像组成功"
);
}
/**
* 获取员工档案
*
* @param
* @return
*/
@GetMapping
(
value
=
"/ygda"
)
@ApiOperation
(
value
=
"获取员工档案"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
1.
获取员工档案"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
)
public
Result
<
YgglMainEmp
>
selectygda
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
).
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
);
Date
rz
=
ygglMainEmp
.
getRzTime
();
if
(
rz
!=
null
)
{
ygglMainEmp
.
setWorkTime
(
DateUtil
.
formatBetween
(
rz
,
new
Date
(),
Level
.
DAY
));
...
...
@@ -291,13 +158,13 @@ public class YgglController {
// 获取员工档案
@GetMapping
(
value
=
"/ygda/{empNum}"
)
@ApiOperation
(
value
=
"获取员工档案(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
2.
获取员工档案(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
YgglMainEmp
>
selectygda
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
).
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
);
Date
rz
=
ygglMainEmp
.
getRzTime
();
if
(
rz
!=
null
)
{
ygglMainEmp
.
setWorkTime
(
DateUtil
.
formatBetween
(
ygglMainEmp
.
getRzTime
(),
new
Date
(),
Level
.
DAY
));
...
...
@@ -312,16 +179,16 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/ygdabm/{gwid}"
)
@ApiOperation
(
value
=
"获取员工档案部门岗位名称"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
3.
获取员工档案部门岗位名称"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
)
public
Result
<
String
>
selectbmgw
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
gwid
)
{
if
(
gwid
==
null
||
gwid
==
0
)
{
return
ResultUtil
.
data
(
"无岗位"
,
"获取员工档案部门岗位名称成功"
);
}
Integer
orgCode
=
userBean
.
getOrgCode
();
QueryWrapper
<
ZzglBmgwM
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
).
eq
(
"id"
,
gwid
);
ZzglBmgwM
zzglBmgwM
=
ZzglBmgwM
.
builder
().
build
().
selectOne
(
queryWrapper
);
ZzglBmgwM
zzglBmgwM
=
ZzglBmgwM
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
)
.
eq
(
ZzglBmgwM:
:
getId
,
gwid
)
);
String
gw
=
null
;
Integer
bmid
=
null
;
if
(
zzglBmgwM
!=
null
)
{
...
...
@@ -329,7 +196,9 @@ public class YgglController {
bmid
=
zzglBmgwM
.
getUpId
();
}
ZzglBmgwM
z
=
ZzglBmgwM
.
builder
().
build
()
.
selectOne
(
new
QueryWrapper
<
ZzglBmgwM
>().
eq
(
"org_code"
,
orgCode
).
eq
(
"id"
,
bmid
));
.
selectOne
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
)
.
eq
(
ZzglBmgwM:
:
getId
,
bmid
));
String
bm
=
null
;
if
(
z
!=
null
)
{
bm
=
z
.
getName
();
...
...
@@ -369,10 +238,8 @@ public class YgglController {
isvalid
=
ReUtil
.
isMatch
(
Regular
.
PASSPORT1
,
zjNum
)
||
ReUtil
.
isMatch
(
Regular
.
PASSPORT2
,
zjNum
);
break
;
default
:
break
;
}
if
(!
isvalid
)
{
return
ResultUtil
.
error
(
"证件格式不对!"
);
}
...
...
@@ -382,15 +249,6 @@ public class YgglController {
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 (!IdcardUtil.isValidCard(zjNum)) {
// return ResultUtil.error("请输入有效的证件信息!");
// }
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(!
StrUtil
.
hasBlank
(
phone
),
QyzxEmpLogin:
:
getPhone
,
phone
).
one
();
...
...
@@ -402,48 +260,28 @@ public class YgglController {
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"添加员工登录表失败,请检查输入信息"
);
}
// 添加三张表
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
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
ygglMainEmp
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
if
(
ygglMainEmp
==
null
)
{
QyzxEmpEntAsso
.
builder
()
.
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
userType
(
CommonEnum
.
U_TYPE_EMP
.
getType
()).
status
(
CommonEnum
.
U_STS_ON
.
getType
())
.
build
()
.
insert
();
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:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"新添加员工档案成功!"
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工成功!"
);
}
else
{
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普通员工
// 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
).
bmgwId
(
bmgwId
).
build
();
ygglMainEmp
.
insert
();
if
(
addygdaDto
.
getBmgwId
()
!=
null
)
{
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
set
(
YgglMainEmp:
:
getBmgwId
,
addygdaDto
.
getBmgwId
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
)
.
eq
(
YgglMainEmp:
:
getId
,
ygglMainEmp
.
getId
()).
update
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工档案成功!"
);
}
else
{
return
ResultUtil
.
error
(
"该手机号已被使用,请输入正确手机号"
);
}
return
ResultUtil
.
error
(
"该手机号已被使用,请输入正确手机号"
);
}
}
/**
...
...
@@ -453,7 +291,7 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/updateygda"
)
@ApiOperation
(
value
=
"修改员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
5.
修改员工档案"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
)
public
Result
<
Object
>
updateygda
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglMainEmp
ygglMainEmp
)
throws
Exception
{
...
...
@@ -463,17 +301,12 @@ public class YgglController {
updateWrapper
.
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
ygglMainEmp
.
getEmpNum
());
ygglMainEmp
.
update
(
updateWrapper
);
// Integer count = qyzxEmpLoginMapper.selectCount(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getPhone, ygglMainEmp.getPhone()));
// if (count >= 1) {
// return ResultUtil.error("手机号已被使用!");
// }
//
// QyzxEmpLogin.builder().phone(ygglMainEmp.getPhone()).build()
// .update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getId, userBean.getEmpNum()));
return
ResultUtil
.
data
(
ygglMainEmp
,
"修改成功"
);
}
return
ResultUtil
.
error
(
"请确认该员工是否存在!"
);
}
/**
* 员工搜索
...
...
@@ -482,7 +315,7 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/ygquery"
)
@ApiOperation
(
value
=
"员工搜索/分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
6.
员工搜索/分页"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
)
public
Result
<
Object
>
ygquery
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgQueryDto
ygQueryDto
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
...
...
@@ -540,8 +373,6 @@ public class YgglController {
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
>();
...
...
@@ -549,11 +380,10 @@ public class YgglController {
.
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
>
ID
CardRepetitions
=
listAddygdaDto
.
stream
()
List
<
AddygdaDto
>
id
CardRepetitions
=
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
);
List
<
YgglMainEmp
>
insertErrors
=
new
ArrayList
<
YgglMainEmp
>();
YgglMainEmp
yme
;
for
(
AddygdaDto
ad
:
list
)
{
...
...
@@ -577,7 +407,6 @@ public class YgglController {
isvalid
=
ReUtil
.
isMatch
(
Regular
.
PASSPORT1
,
zjNum
)
||
ReUtil
.
isMatch
(
Regular
.
PASSPORT2
,
zjNum
);
break
;
default
:
break
;
}
if
(!
isvalid
)
{
...
...
@@ -603,404 +432,91 @@ public class YgglController {
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
();
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
);
}
else
{
insertErrors
.
add
(
yme
);
}
}
JSONObject
obj
=
JSONUtil
.
createObj
();
obj
.
set
(
"empList"
,
listYmp
);
obj
.
set
(
"phoneRepetitions"
,
phoneRepetitions
);
obj
.
set
(
"
IDCardRepetitions"
,
ID
CardRepetitions
);
obj
.
set
(
"
idCardRepetitions"
,
id
CardRepetitions
);
obj
.
set
(
"insertErrors"
,
insertErrors
);
//listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList());
return
ResultUtil
.
data
(
obj
,
"导入员工档案成功!"
);
}
/**
*
导入威力加强版
*
获取导入模板
*
* @param
* @return
* @throws IOException
*/
@PostMapping
(
value
=
"/ygdas"
)
@ApiOperation
(
value
=
"导入威力加强版"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
YgDrjqbDto
>>
ygdr
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgDrsDto
drList
)
{
drList
.
setErrorList
(
new
ArrayList
<
YgDrjqbDto
>());
drList
.
setOrgCode
(
userBean
.
getOrgCode
());
YgDrsDto
tofList
=
errorFilter
(
drList
);
// 滤嘴,过滤信息
if
(
tofList
.
getDrList
().
size
()
==
0
)
return
ResultUtil
.
data
(
tofList
.
getErrorList
(),
"导入发生错误人员名单"
);
YgDrsDto
tof
=
optFilter
(
tofList
);
// 彻底规范好数据
List
<
YgDrjqbDto
>
trueList
=
tof
.
getDrList
();
// 拿出正确的信息
List
<
YgDrjqbDto
>
errorList
=
tof
.
getErrorList
();
// 拿出错误的信息
if
(
trueList
.
size
()
==
0
)
return
ResultUtil
.
data
(
errorList
,
"导入发生错误人员名单"
);
for
(
YgDrjqbDto
e
:
trueList
)
{
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(
QyzxEmpLogin:
:
getPhone
,
e
.
getPhone
()).
one
();
// 证件类型为0
Integer
jobType
=
Integer
.
valueOf
(
e
.
getJobType
());
// 工作类型
Integer
syq
=
Integer
.
valueOf
(
e
.
getSyq
());
// 试用期
Integer
sex
=
Integer
.
valueOf
(
e
.
getSex
());
// 性别
Integer
gw
=
e
.
getHavebmid
();
String
jobNum
=
e
.
getYgnbgh
();
Integer
jg
=
e
.
getJg
();
Date
birthday
=
e
.
getBirthday
();
// 入职日期
Date
rzdate
=
new
Date
();
SimpleDateFormat
straight
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// 正杠
if
(
e
.
getRzTime
().
indexOf
(
"-"
)
!=
-
1
)
{
try
{
rzdate
=
straight
.
parse
(
e
.
getRzTime
());
}
catch
(
ParseException
PException
)
{
PException
.
printStackTrace
();
e
.
setError
(
"请填写正确的时间格式"
);
errorList
.
add
(
e
);
continue
;
}
}
// 判断是否已有员工登录表
if
(
login
==
null
)
{
// 添加三张表
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
e
.
getPhone
()).
pw
(
Md5
.
md5
(
"123456"
))
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
userBean
.
getOrgCode
()).
username
(
e
.
getName
()).
build
();
if
(!
qyzxEmpLogin
.
insert
())
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
e
.
setError
(
"员工无法添加!"
);
errorList
.
add
(
e
);
continue
;
}
// 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定)
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
())
.
build
();
emp
.
insert
();
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainEmp:
:
getId
,
emp
.
getId
())
.
set
(
birthday
!=
null
,
YgglMainEmp:
:
getBirthday
,
birthday
)
.
set
(
jg
!=
null
&&
jg
!=
0
,
YgglMainEmp:
:
getJg
,
jg
).
update
();
// return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
}
else
{
// 添加两张表
YgglMainEmp
ishad
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
.
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正常
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
())
.
orgCode
(
userBean
.
getOrgCode
()).
build
();
emp
.
insert
();
new
LambdaUpdateChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainEmp:
:
getId
,
emp
.
getId
())
.
set
(
birthday
!=
null
,
YgglMainEmp:
:
getBirthday
,
birthday
)
.
set
(
jg
!=
null
&&
jg
!=
0
,
YgglMainEmp:
:
getJg
,
jg
).
update
();
}
else
{
e
.
setError
(
"该手机号码已被使用"
);
errorList
.
add
(
e
);
continue
;
}
}
}
if
(
errorList
.
size
()
==
0
)
{
return
ResultUtil
.
success
(
"员工全部导入成功!"
);
}
return
ResultUtil
.
data
(
errorList
,
"导入发生错误人员名单"
);
}
// 错误选项过滤器
public
YgDrsDto
errorFilter
(
YgDrsDto
ygDrsDto
)
{
List
<
YgDrjqbDto
>
drList
=
ygDrsDto
.
getDrList
();
List
<
YgDrjqbDto
>
newList
=
new
ArrayList
<
YgDrjqbDto
>(
drList
);
List
<
YgDrjqbDto
>
errorList
=
ygDrsDto
.
getErrorList
();
Integer
orgCode
=
ygDrsDto
.
getOrgCode
();
Iterator
<
YgDrjqbDto
>
itDr
=
drList
.
iterator
();
@SuppressWarnings
(
"unused"
)
YgDrjqbDto
a
=
drList
.
get
(
0
);
// 一个员工导入
Integer
size
=
drList
.
size
();
for
(
Integer
i
=
0
;
i
<
size
;
i
++)
{
//
YgDrjqbDto
d
=
newList
.
get
(
i
);
// 计数器
if
(
itDr
.
hasNext
())
{
a
=
itDr
.
next
();
}
// 请填写必填项
String
name
=
newList
.
get
(
i
).
getName
();
String
phone
=
newList
.
get
(
i
).
getPhone
();
String
sex
=
newList
.
get
(
i
).
getSex
();
String
zj
=
newList
.
get
(
i
).
getZj
();
if
(
StrUtil
.
hasBlank
(
name
)
||
StrUtil
.
hasBlank
(
phone
)
||
StrUtil
.
hasBlank
(
sex
)
||
StrUtil
.
hasBlank
(
zj
))
{
d
.
setError
(
"请填写必填项"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
// 手机号码格式不对
String
regex
=
"^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$"
;
if
(
phone
.
length
()
!=
11
)
{
d
.
setError
(
"手机号应为11位数"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
Pattern
p
=
Pattern
.
compile
(
regex
);
Matcher
m
=
p
.
matcher
(
phone
);
boolean
isMatch
=
m
.
matches
();
if
(!
isMatch
)
{
d
.
setError
(
"手机号格式不对"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
// 手机号码已被使用
QyzxEmpLogin
login
=
new
LambdaQueryChainWrapper
<
QyzxEmpLogin
>(
qyzxEmpLoginMapper
)
.
eq
(
QyzxEmpLogin:
:
getPhone
,
phone
).
eq
(
QyzxEmpLogin:
:
getOrgId
,
orgCode
).
one
();
if
(
login
!=
null
)
{
d
.
setError
(
"手机号码已被使用"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
// 证件号码信息有误
if
(
zj
==
null
||
""
.
equals
(
zj
))
{
d
.
setError
(
"证件号码信息有误"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
String
regularExpression
=
"(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|"
+
"(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)"
;
boolean
matches
=
zj
.
matches
(
regularExpression
);
if
(!
matches
)
{
d
.
setError
(
"证件号码信息有误"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
try
{
if
(
zj
.
length
()
==
18
)
{
char
[]
charArray
=
zj
.
toCharArray
();
// 前十七位加权因子
int
[]
idCardWi
=
{
7
,
9
,
10
,
5
,
8
,
4
,
2
,
1
,
6
,
3
,
7
,
9
,
10
,
5
,
8
,
4
,
2
};
// 这是除以11后,可能产生的11位余数对应的验证码
String
[]
idCardY
=
{
"1"
,
"0"
,
"X"
,
"9"
,
"8"
,
"7"
,
"6"
,
"5"
,
"4"
,
"3"
,
"2"
};
int
sum
=
0
;
for
(
Integer
j
=
0
;
j
<
idCardWi
.
length
;
j
++)
{
int
current
=
Integer
.
parseInt
(
String
.
valueOf
(
charArray
[
j
]));
int
count
=
current
*
idCardWi
[
j
];
sum
+=
count
;
}
char
idCardLast
=
charArray
[
17
];
int
idCardMod
=
sum
%
11
;
if
(
idCardY
[
idCardMod
].
toUpperCase
().
equals
(
String
.
valueOf
(
idCardLast
).
toUpperCase
()))
{
// System.out.println("成功,接着完善员工的个人信息");
String
birth
=
zj
.
substring
(
6
,
14
);
String
birthday
=
birth
.
substring
(
0
,
4
)
+
"-"
+
birth
.
substring
(
4
,
6
)
+
"-"
+
birth
.
substring
(
6
,
8
);
SimpleDateFormat
straight
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
d
.
setBirthday
(
straight
.
parse
(
birthday
));
d
.
setJg
(
Integer
.
parseInt
(
zj
.
substring
(
0
,
6
)));
}
else
{
// System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
// "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
// return false;
d
.
setError
(
"证件号码信息有误"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
}
else
{
// 给15位数的添加生日籍贯
String
birth
=
zj
.
substring
(
6
,
12
);
String
birthday
=
"19"
+
birth
.
substring
(
0
,
2
)
+
"-"
+
birth
.
substring
(
2
,
4
)
+
"-"
+
birth
.
substring
(
4
,
6
);
SimpleDateFormat
straight
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
d
.
setBirthday
(
straight
.
parse
(
birthday
));
d
.
setJg
(
Integer
.
parseInt
(
zj
.
substring
(
0
,
6
)));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
// System.out.println("异常:" + zj);
// return false;
d
.
setError
(
"证件号码信息有误"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
// 部门岗位有误
String
oneb
=
newList
.
get
(
i
).
getOneb
();
String
twob
=
newList
.
get
(
i
).
getTwob
();
String
threeb
=
newList
.
get
(
i
).
getThreeb
();
String
fourb
=
newList
.
get
(
i
).
getFourb
();
String
gw
=
newList
.
get
(
i
).
getGw
();
String
[]
bms
=
{
oneb
,
twob
,
threeb
,
fourb
};
if
(
StrUtil
.
hasBlank
(
gw
)
&&
StrUtil
.
hasBlank
(
oneb
)
&&
StrUtil
.
hasBlank
(
twob
)
&&
StrUtil
.
hasBlank
(
threeb
)
&&
StrUtil
.
hasBlank
(
fourb
))
{
// 没填写岗位,通过~ //
}
else
{
// 填写了部门岗位,办他!
Integer
isHaveBmgw
=
isHavebmgw
(
bms
,
gw
,
orgCode
);
if
(
isHaveBmgw
==
0
)
{
d
.
setError
(
"部门岗位有误"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
else
{
// 获取到部门岗位id啦!
d
.
setHavebmid
(
isHaveBmgw
);
}
}
@GetMapping
(
value
=
"/impoet_template"
)
@ApiOperation
(
value
=
"8.获取导入模板"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
8
)
public
Result
<
Object
>
getImpoetTemplate
(
HttpServletResponse
response
)
throws
IOException
{
ImportEmpDto
ied
=
ImportEmpDto
.
builder
()
.
name
(
"张三"
)
.
phone
(
"15219671123"
)
// 证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他
.
zjType
(
0
)
.
zjNum
(
"445381199611063586"
)
// 工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘
.
jobType
(
0
)
.
rzTime
(
"2010-10-10 10:10:10"
)
// 试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)
.
syq
(
1
)
// 性别 0:男;1:女
.
sex
(
0
)
.
build
();
List
<
ImportEmpDto
>
listAd
=
CollUtil
.
newArrayList
(
ied
);
// 通过工具类创建writer
ExcelWriter
writer
=
ExcelUtil
.
getWriter
(
true
);
//自定义标题别名
writer
.
addHeaderAlias
(
"name"
,
"姓名"
);
writer
.
addHeaderAlias
(
"phone"
,
"手机号"
);
writer
.
addHeaderAlias
(
"sex"
,
"性别"
);
writer
.
addHeaderAlias
(
"zjType"
,
"证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他"
);
writer
.
addHeaderAlias
(
"zjNum"
,
"证件号"
);
writer
.
addHeaderAlias
(
"jobType"
,
"工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘"
);
writer
.
addHeaderAlias
(
"syq"
,
"试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)"
);
writer
.
addHeaderAlias
(
"rzTime"
,
"入职日期"
);
// 合并单元格后的标题行,使用默认标题样式
writer
.
merge
(
7
,
"员工导入模板"
);
writer
.
setFreezePane
(
2
);
writer
.
setColumnWidth
(
1
,
15
);
writer
.
setColumnWidth
(
4
,
22
);
writer
.
setColumnWidth
(
7
,
20
);
// 一次性写出内容,使用默认样式,强制输出标题
writer
.
write
(
listAd
,
true
);
response
.
setContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename=8timer_emp_import.xlsx"
);
ServletOutputStream
out
=
response
.
getOutputStream
();
writer
.
flush
(
out
,
true
);
// 关闭writer,释放内存
writer
.
close
();
//此处记得关闭输出Servlet流
IoUtil
.
close
(
out
);
return
ResultUtil
.
data
(
null
,
"获取模板成功"
);
}
// for循环完毕!
YgDrsDto
tofList
=
new
YgDrsDto
(
drList
,
errorList
,
orgCode
);
return
tofList
;
}
// 选填项过滤器
public
YgDrsDto
optFilter
(
YgDrsDto
ygDrsDto
)
{
List
<
YgDrjqbDto
>
drList
=
ygDrsDto
.
getDrList
();
List
<
YgDrjqbDto
>
newList
=
new
ArrayList
<
YgDrjqbDto
>(
drList
);
List
<
YgDrjqbDto
>
errorList
=
ygDrsDto
.
getErrorList
();
Integer
orgCode
=
ygDrsDto
.
getOrgCode
();
Iterator
<
YgDrjqbDto
>
itDr
=
drList
.
iterator
();
@SuppressWarnings
(
"unused"
)
YgDrjqbDto
a
=
drList
.
get
(
0
);
// 一个员工导入
Integer
size
=
drList
.
size
();
for
(
Integer
i
=
0
;
i
<
size
;
i
++)
{
//
YgDrjqbDto
d
=
newList
.
get
(
i
);
// 计数器
if
(
itDr
.
hasNext
())
{
a
=
itDr
.
next
();
}
// for (YgDrjqbDto d : drList) {
String
ygnbgh
=
d
.
getYgnbgh
();
String
sex
=
d
.
getSex
();
String
jobType
=
d
.
getJobType
();
String
jobStatus
=
d
.
getJobStatus
();
String
rzTime
=
d
.
getRzTime
();
String
syq
=
d
.
getSyq
();
String
zy
=
d
.
getZy
();
String
address
=
d
.
getAddress
();
String
hjAddress
=
d
.
getHkAddress
();
String
qq
=
d
.
getQq
();
String
weixin
=
d
.
getWeixin
();
String
email
=
d
.
getEmail
();
String
[]
bathroom
=
{
ygnbgh
,
sex
,
jobType
,
jobStatus
,
rzTime
,
syq
,
zy
,
address
,
hjAddress
,
qq
,
weixin
,
email
};
boolean
child
=
takeshower
(
bathroom
);
if
(
child
==
false
)
{
d
.
setError
(
"填写内容不要大于50字数"
);
errorList
.
add
(
d
);
itDr
.
remove
();
i
++;
continue
;
}
// 公司内部工号
if
(
ygnbgh
!=
null
&&
ygnbgh
.
length
()
!=
0
)
{
d
.
setYgnbgh
(
ygnbgh
.
trim
());
}
else
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyyMMdd HH:mm:ss"
);
String
bh
=
format
.
format
(
new
Date
())
+
orgCode
+
i
+
System
.
currentTimeMillis
();
d
.
setYgnbgh
(
bh
);
}
// 男女(最大优化)
d
.
setSex
(
YgEnumInterface
.
sex
.
isMan
(
sex
));
// 工作性质(最大优化)
d
.
setJobType
(
YgEnumInterface
.
YgJobType
.
choose
(
jobType
));
// 员工状态(最大优化)
d
.
setJobStatus
(
YgEnumInterface
.
jobStatus
.
isZhen
(
jobStatus
));
// 入职日期(最大优化)
d
.
setRzTime
(
rzTime
!=
null
?
YgEnumInterface
.
rzTime
.
tranTime2
(
YgEnumInterface
.
rzTime
.
tranTime
(
rzTime
))
:
null
);
// 试用期(最大优化)
d
.
setSyq
(
YgEnumInterface
.
syq
.
choose
(
syq
));
}
YgDrsDto
clear
=
new
YgDrsDto
(
drList
,
errorList
,
orgCode
);
return
clear
;
}
// 浴池,洗去选填项字节大于100的选项
public
boolean
takeshower
(
String
[]
bathroom
)
{
for
(
String
b
:
bathroom
)
{
if
(
b
!=
null
&&
b
.
length
()
>
100
)
{
return
false
;
}
}
return
true
;
}
// 判断是否导入组织部门
public
Integer
isHavebmgw
(
String
[]
bms
,
String
gw
,
Integer
orgCode
)
{
// 将姓名转为部门岗位对象
List
<
ZzglBmgwM
>
gwList
=
new
ArrayList
<
ZzglBmgwM
>();
// 判断有几个部门,且这几个部门是否属实,里面不包括岗位
for
(
String
bm
:
bms
)
{
if
(!
StrUtil
.
hasBlank
(
bm
))
{
ZzglBmgwM
ibm
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getName
,
bm
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
eq
(
ZzglBmgwM:
:
getType
,
0
).
one
();
// 选择部门类型0为部门,1为岗位
if
(
ibm
==
null
)
{
return
0
;
}
// 找不到有相关名称的部门则报错
gwList
.
add
(
ibm
);
}
else
{
break
;
}
}
Integer
qiantao
=
qiantao
(
gwList
,
gw
,
0
,
orgCode
);
if
(
qiantao
!=
0
)
{
return
qiantao
;
// 组织部门成立!
}
else
{
return
0
;
// 失败
}
};
// 判断是否导入组织部门的嵌套并寻找到正确岗位id
public
Integer
qiantao
(
List
<
ZzglBmgwM
>
gwList
,
String
gw
,
Integer
upid
,
Integer
orgCode
)
{
// 重写
if
(
upid
!=
0
&&
!
gwList
.
get
(
0
).
getUpId
().
equals
(
upid
))
{
return
0
;
}
upid
=
gwList
.
get
(
0
).
getId
();
if
(
gwList
.
size
()
==
1
)
{
ZzglBmgwM
igw
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
).
eq
(
ZzglBmgwM:
:
getName
,
gw
)
.
eq
(
ZzglBmgwM:
:
getUpId
,
upid
).
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
eq
(
ZzglBmgwM:
:
getType
,
1
).
one
();
if
(
igw
==
null
)
{
return
0
;
}
return
igw
.
getId
();
}
gwList
.
remove
(
0
);
Integer
q
=
qiantao
(
gwList
,
gw
,
upid
,
orgCode
);
return
q
;
};
/**
* 导出员工
*
...
...
@@ -1008,8 +524,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/ygdas"
)
@ApiOperation
(
value
=
"
导出
"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
8
)
@ApiOperation
(
value
=
"
9.导出员工
"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
9
)
public
Result
<
List
<
YgglMainEmp
>>
selectygdas
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglMainEmp
>
list
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
in
(
YgglMainEmp:
:
getJobStatus
,
1
,
2
,
3
).
list
();
...
...
@@ -1023,8 +539,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/jyjlb"
)
@ApiOperation
(
value
=
"获取员工教育经历表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
9
)
@ApiOperation
(
value
=
"
10.
获取员工教育经历表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
10
)
public
Result
<
List
<
YgglAttaJyjlb
>>
selectjyjlb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaJyjlb
>
ygglAttaJyjlbss
=
YgglAttaJyjlb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaJyjlb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1034,8 +550,8 @@ public class YgglController {
// 获取员工教育经历表
@GetMapping
(
value
=
"/jyjlb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工教育经历表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
0
)
@ApiOperation
(
value
=
"
11.
获取员工教育经历表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
1
)
public
Result
<
List
<
YgglAttaJyjlb
>>
selectjyjlb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaJyjlb
>
ygglAttaJyjlbs
=
YgglAttaJyjlb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaJyjlb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1049,8 +565,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/jyjlb"
)
@ApiOperation
(
value
=
"添加/修改员工教育经历表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
1
)
@ApiOperation
(
value
=
"
12.
添加/修改员工教育经历表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
2
)
public
Result
<
YgglAttaJyjlb
>
addjyjlb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaJyjlb
ygglAttaJyjlb
)
{
ygglAttaJyjlb
.
setEmpNum
(
ygglAttaJyjlb
.
getEmpNum
());
ygglAttaJyjlb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1065,8 +581,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/jyjlb/{id}"
)
@ApiOperation
(
value
=
"删除员工教育经历表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
2
)
@ApiOperation
(
value
=
"
13.
删除员工教育经历表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
3
)
public
Result
<
Boolean
>
deljyjlb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaJyjlb
.
builder
().
build
()
...
...
@@ -1080,8 +596,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/pxjlxxb"
)
@ApiOperation
(
value
=
"获取员工培训经历信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
3
)
@ApiOperation
(
value
=
"
14.
获取员工培训经历信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
4
)
public
Result
<
List
<
YgglAttaPxjlxxb
>>
selectpxjlxxb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaPxjlxxb
>
ygglAttaPxjlxxbs
=
YgglAttaPxjlxxb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaPxjlxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1091,8 +607,8 @@ public class YgglController {
// 获取员工培训经历信息表
@GetMapping
(
value
=
"/pxjlxxb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工培训经历信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
4
)
@ApiOperation
(
value
=
"
15.
获取员工培训经历信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
5
)
public
Result
<
List
<
YgglAttaPxjlxxb
>>
selectpxjlxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaPxjlxxb
>
ygglAttaPxjlxxbs
=
YgglAttaPxjlxxb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaPxjlxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1106,8 +622,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/pxjlxxb"
)
@ApiOperation
(
value
=
"添加/修改员工培训经历信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
5
)
@ApiOperation
(
value
=
"
16.
添加/修改员工培训经历信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
6
)
public
Result
<
YgglAttaPxjlxxb
>
addpxjlxxb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaPxjlxxb
ygglAttaPxjlxxb
)
{
ygglAttaPxjlxxb
.
setEmpNum
(
ygglAttaPxjlxxb
.
getEmpNum
());
...
...
@@ -1123,8 +639,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/pxjlxxb/{id}"
)
@ApiOperation
(
value
=
"删除员工培训经历信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
6
)
@ApiOperation
(
value
=
"
17.
删除员工培训经历信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
7
)
public
Result
<
Boolean
>
delpxjlxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaPxjlxxb
.
builder
().
build
()
...
...
@@ -1138,8 +654,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/gzjlb"
)
@ApiOperation
(
value
=
"获取员工工作经历表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
7
)
@ApiOperation
(
value
=
"
18.
获取员工工作经历表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
8
)
public
Result
<
List
<
YgglAttaGzjlb
>>
selectgzjlb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaGzjlb
>
ygglAttaGzjlbs
=
YgglAttaGzjlb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaGzjlb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1149,8 +665,8 @@ public class YgglController {
// 获取员工工作经历表
@GetMapping
(
value
=
"/gzjlb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工工作经历表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
8
)
@ApiOperation
(
value
=
"
19.
获取员工工作经历表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
1
9
)
public
Result
<
List
<
YgglAttaGzjlb
>>
selectgzjlb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaGzjlb
>
ygglAttaGzjlbs
=
YgglAttaGzjlb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaGzjlb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1164,8 +680,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/gzjlb"
)
@ApiOperation
(
value
=
"添加/修改员工工作经历表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
19
)
@ApiOperation
(
value
=
"
20.
添加/修改员工工作经历表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
20
)
public
Result
<
YgglAttaGzjlb
>
addgzjlb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaGzjlb
ygglAttaGzjlb
)
{
ygglAttaGzjlb
.
setEmpNum
(
ygglAttaGzjlb
.
getEmpNum
());
ygglAttaGzjlb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1180,8 +696,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/gzjlb/{id}"
)
@ApiOperation
(
value
=
"删除员工工作经历表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
0
)
@ApiOperation
(
value
=
"
21.
删除员工工作经历表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
1
)
public
Result
<
Boolean
>
delgzjlb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaGzjlb
.
builder
().
build
()
...
...
@@ -1195,8 +711,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/zcxxb"
)
@ApiOperation
(
value
=
"获取员工职称信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
1
)
@ApiOperation
(
value
=
"
22.
获取员工职称信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
2
)
public
Result
<
List
<
YgglAttaZcxxb
>>
selectzcxxb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaZcxxb
>
ygglAttaZcxxbs
=
YgglAttaZcxxb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaZcxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1206,8 +722,8 @@ public class YgglController {
// 获取员工职称信息表
@GetMapping
(
value
=
"/zcxxb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工职称信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
2
)
@ApiOperation
(
value
=
"
23.
获取员工职称信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
3
)
public
Result
<
List
<
YgglAttaZcxxb
>>
selectzcxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaZcxxb
>
ygglAttaZcxxbs
=
YgglAttaZcxxb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaZcxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1221,8 +737,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/zcxxb"
)
@ApiOperation
(
value
=
"添加/修改员工职称信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
3
)
@ApiOperation
(
value
=
"
24.
添加/修改员工职称信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
4
)
public
Result
<
YgglAttaZcxxb
>
addzcxxb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaZcxxb
ygglAttaZcxxb
)
{
ygglAttaZcxxb
.
setEmpNum
(
ygglAttaZcxxb
.
getEmpNum
());
ygglAttaZcxxb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1237,8 +753,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/zcxxb/{id}"
)
@ApiOperation
(
value
=
"删除员工职称信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
4
)
@ApiOperation
(
value
=
"
25.
删除员工职称信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
5
)
public
Result
<
Boolean
>
delzcxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaZcxxb
.
builder
().
build
()
...
...
@@ -1252,8 +768,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/zszjb"
)
@ApiOperation
(
value
=
"获取员工证书证件表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
5
)
@ApiOperation
(
value
=
"
26.
获取员工证书证件表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
6
)
public
Result
<
List
<
YgglAttaZszjb
>>
selectzszjb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaZszjb
>
ygglAttaZszjbs
=
YgglAttaZszjb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaZszjb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1263,8 +779,8 @@ public class YgglController {
// 获取员工证书证件表
@GetMapping
(
value
=
"/zszjb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工证书证件表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
6
)
@ApiOperation
(
value
=
"
27.
获取员工证书证件表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
7
)
public
Result
<
List
<
YgglAttaZszjb
>>
selectzszjb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaZszjb
>
ygglAttaZszjbs
=
YgglAttaZszjb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaZszjb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1278,8 +794,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/zszjb"
)
@ApiOperation
(
value
=
"添加/修改员工证书证件表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
7
)
@ApiOperation
(
value
=
"
28.
添加/修改员工证书证件表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
8
)
public
Result
<
YgglAttaZszjb
>
addzszjb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaZszjb
ygglAttaZszjb
)
{
ygglAttaZszjb
.
setEmpNum
(
ygglAttaZszjb
.
getEmpNum
());
ygglAttaZszjb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1294,8 +810,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/zszjb/{id}"
)
@ApiOperation
(
value
=
"删除员工证书证件表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
8
)
@ApiOperation
(
value
=
"
29.
删除员工证书证件表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
2
9
)
public
Result
<
Boolean
>
delzszjb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaZszjb
.
builder
().
build
()
...
...
@@ -1309,8 +825,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/lxxxb"
)
@ApiOperation
(
value
=
"获取员工联系信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
29
)
@ApiOperation
(
value
=
"
30.
获取员工联系信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
30
)
public
Result
<
List
<
YgglAttaLxxxb
>>
selectlxxxb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaLxxxb
>
ygglAttaLxxxbs
=
YgglAttaLxxxb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaLxxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1320,8 +836,8 @@ public class YgglController {
// 获取员工联系信息表
@GetMapping
(
value
=
"/lxxxb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工联系信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
0
)
@ApiOperation
(
value
=
"
31.
获取员工联系信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
1
)
public
Result
<
List
<
YgglAttaLxxxb
>>
selectlxxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaLxxxb
>
ygglAttaLxxxbs
=
YgglAttaLxxxb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaLxxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1335,8 +851,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/lxxxb"
)
@ApiOperation
(
value
=
"添加/修改员工联系信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
1
)
@ApiOperation
(
value
=
"
32.
添加/修改员工联系信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
2
)
public
Result
<
YgglAttaLxxxb
>
addlxxxb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaLxxxb
ygglAttaLxxxb
)
{
ygglAttaLxxxb
.
setEmpNum
(
ygglAttaLxxxb
.
getEmpNum
());
ygglAttaLxxxb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1351,8 +867,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/lxxxb/{id}"
)
@ApiOperation
(
value
=
"删除员工联系信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
2
)
@ApiOperation
(
value
=
"
33.
删除员工联系信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
3
)
public
Result
<
Boolean
>
dellxxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaLxxxb
.
builder
().
build
()
...
...
@@ -1366,8 +882,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/jjlxr"
)
@ApiOperation
(
value
=
"获取员工紧急联系人表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
3
)
@ApiOperation
(
value
=
"
34.
获取员工紧急联系人表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
4
)
public
Result
<
List
<
YgglAttaJjlxr
>>
selectjjlxr
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaJjlxr
>
ygglAttaJjlxrs
=
YgglAttaJjlxr
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaJjlxr
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1377,8 +893,8 @@ public class YgglController {
// 获取员工紧急联系人表
@GetMapping
(
value
=
"/jjlxr/{empNum}"
)
@ApiOperation
(
value
=
"获取员工紧急联系人表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
4
)
@ApiOperation
(
value
=
"
35.
获取员工紧急联系人表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
5
)
public
Result
<
List
<
YgglAttaJjlxr
>>
selectjjlxr
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaJjlxr
>
ygglAttaJjlxrs
=
YgglAttaJjlxr
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaJjlxr
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1392,8 +908,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/jjlxr"
)
@ApiOperation
(
value
=
"添加/修改员工紧急联系人表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
5
)
@ApiOperation
(
value
=
"
36.
添加/修改员工紧急联系人表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
6
)
public
Result
<
YgglAttaJjlxr
>
addjjlxr
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaJjlxr
ygglAttaJjlxr
)
{
ygglAttaJjlxr
.
setEmpNum
(
ygglAttaJjlxr
.
getEmpNum
());
ygglAttaJjlxr
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1408,8 +924,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/jjlxr/{id}"
)
@ApiOperation
(
value
=
"删除员工紧急联系人表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
6
)
@ApiOperation
(
value
=
"
37.
删除员工紧急联系人表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
7
)
public
Result
<
Boolean
>
deljjlxr
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaJjlxr
.
builder
().
build
()
...
...
@@ -1424,8 +940,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/gzk"
)
@ApiOperation
(
value
=
"获取员工工资卡信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
7
)
@ApiOperation
(
value
=
"
38.
获取员工工资卡信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
8
)
public
Result
<
List
<
YgglAttaGzk
>>
selectgzk
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaGzk
>
ygglAttaGzks
=
YgglAttaGzk
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaGzk
>()
.
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
...
...
@@ -1434,8 +950,8 @@ public class YgglController {
// 获取工资卡信息
@GetMapping
(
value
=
"/gzk/{empNum}"
)
@ApiOperation
(
value
=
"获取员工工资卡信息(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
8
)
@ApiOperation
(
value
=
"
39.
获取员工工资卡信息(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
3
9
)
public
Result
<
List
<
YgglAttaGzk
>>
selectgzk
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaGzk
>
ygglAttaGzks
=
YgglAttaGzk
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaGzk
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1449,8 +965,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/gzk"
)
@ApiOperation
(
value
=
"添加/修改工资卡信息"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
39
)
@ApiOperation
(
value
=
"
40.
添加/修改工资卡信息"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
40
)
public
Result
<
YgglAttaGzk
>
addgzk
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaGzk
ygglAttaGzk
)
{
ygglAttaGzk
.
setEmpNum
(
ygglAttaGzk
.
getEmpNum
());
ygglAttaGzk
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1465,8 +981,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/gzk/{id}"
)
@ApiOperation
(
value
=
"删除工资卡信息"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
0
)
@ApiOperation
(
value
=
"
41.
删除工资卡信息"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
1
)
public
Result
<
Boolean
>
delgzk
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaGzk
.
builder
().
build
()
...
...
@@ -1480,8 +996,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/htxxb"
)
@ApiOperation
(
value
=
"获取员工合同信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
1
)
@ApiOperation
(
value
=
"
42.
获取员工合同信息表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
2
)
public
Result
<
List
<
YgglAttaHtxxb
>>
selecthtxxb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaHtxxb
>
ygglAttaHtxxbs
=
YgglAttaHtxxb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaHtxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1491,8 +1007,8 @@ public class YgglController {
// 获取员工合同信息表
@GetMapping
(
value
=
"/htxxb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工合同信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
2
)
@ApiOperation
(
value
=
"
43.
获取员工合同信息表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
3
)
public
Result
<
List
<
YgglAttaHtxxb
>>
selecthtxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaHtxxb
>
ygglAttaHtxxbs
=
YgglAttaHtxxb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaHtxxb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1506,8 +1022,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/htxxb"
)
@ApiOperation
(
value
=
"添加/修改员工合同信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
3
)
@ApiOperation
(
value
=
"
44.
添加/修改员工合同信息表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
4
)
public
Result
<
YgglAttaHtxxb
>
addhtxxb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaHtxxb
ygglAttaHtxxb
)
{
ygglAttaHtxxb
.
setEmpNum
(
ygglAttaHtxxb
.
getEmpNum
());
ygglAttaHtxxb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1522,8 +1038,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/htxxb/{id}"
)
@ApiOperation
(
value
=
"删除员工合同信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
4
)
@ApiOperation
(
value
=
"
45.
删除员工合同信息表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
5
)
public
Result
<
Boolean
>
delhtxxb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaHtxxb
.
builder
().
build
()
...
...
@@ -1537,8 +1053,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/clfjb"
)
@ApiOperation
(
value
=
"获取员工材料附件表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
5
)
@ApiOperation
(
value
=
"
46.
获取员工材料附件表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
6
)
public
Result
<
List
<
YgglAttaClfjb
>>
selectclfjb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaClfjb
>
ygglAttaClfjbs
=
YgglAttaClfjb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaClfjb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1548,8 +1064,8 @@ public class YgglController {
// 获取员工材料附件表
@GetMapping
(
value
=
"/clfjb/{empNum}"
)
@ApiOperation
(
value
=
"获取员工材料附件表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
6
)
@ApiOperation
(
value
=
"
47.
获取员工材料附件表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
7
)
public
Result
<
List
<
YgglAttaClfjb
>>
selectclfjb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaClfjb
>
ygglAttaClfjbs
=
YgglAttaClfjb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaClfjb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1563,8 +1079,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/clfjb"
)
@ApiOperation
(
value
=
"添加/修改员工材料附件表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
7
)
@ApiOperation
(
value
=
"
48.
添加/修改员工材料附件表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
8
)
public
Result
<
YgglAttaClfjb
>
addclfjb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaClfjb
ygglAttaClfjb
)
{
ygglAttaClfjb
.
setOrgCode
(
userBean
.
getOrgCode
());
ygglAttaClfjb
.
setEmpNum
(
ygglAttaClfjb
.
getEmpNum
());
...
...
@@ -1579,8 +1095,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/clfjb/{id}"
)
@ApiOperation
(
value
=
"删除员工材料附件表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
8
)
@ApiOperation
(
value
=
"
49.
删除员工材料附件表"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
4
9
)
public
Result
<
Boolean
>
delclfjb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaClfjb
.
builder
().
build
()
...
...
@@ -1594,8 +1110,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/czjlb"
)
@ApiOperation
(
value
=
"获取成长记录表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
49
)
@ApiOperation
(
value
=
"
50.
获取成长记录表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
50
)
public
Result
<
List
<
YgglAttaCzjlb
>>
selectczjlb
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaCzjlb
>
ygglAttaCzjlbs
=
YgglAttaCzjlb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglAttaCzjlb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
...
...
@@ -1605,8 +1121,8 @@ public class YgglController {
// 获取成长记录表
@GetMapping
(
value
=
"/czjlb/{empNum}"
)
@ApiOperation
(
value
=
"获取成长记录表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
0
)
@ApiOperation
(
value
=
"
51.
获取成长记录表(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
1
)
public
Result
<
List
<
YgglAttaCzjlb
>>
selectczjlb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
List
<
YgglAttaCzjlb
>
ygglAttaCzjlbs
=
YgglAttaCzjlb
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaCzjlb
>().
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
...
...
@@ -1620,8 +1136,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/czjlb"
)
@ApiOperation
(
value
=
"添加/修改成长记录表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
1
)
@ApiOperation
(
value
=
"
52.
添加/修改成长记录表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
2
)
public
Result
<
YgglAttaCzjlb
>
addczjlb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaCzjlb
ygglAttaCzjlb
)
{
ygglAttaCzjlb
.
setEmpNum
(
ygglAttaCzjlb
.
getEmpNum
());
ygglAttaCzjlb
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1636,8 +1152,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/lzb/{empNum}"
)
@ApiOperation
(
value
=
"获取单个离职员工信息(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
2
)
@ApiOperation
(
value
=
"
53.
获取单个离职员工信息(管)"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
3
)
public
Result
<
YgglMainLzb
>
selectlzb
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
YgglMainLzb
lzyg
=
new
LambdaQueryChainWrapper
<
YgglMainLzb
>(
ygglMainLzbMapper
)
.
eq
(
YgglMainLzb:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainLzb:
:
getEmpNum
,
empNum
).
one
();
...
...
@@ -1651,8 +1167,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/ygzz"
)
@ApiOperation
(
value
=
"员工转正"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
3
)
@ApiOperation
(
value
=
"
54.
员工转正"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
4
)
public
Result
<
Void
>
ygzz
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgzzDto
ygzzDto
)
{
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
updateWrapper
.
eq
(
"emp_num"
,
ygzzDto
.
getEmpNum
());
...
...
@@ -1668,8 +1184,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/addlzjh"
)
@ApiOperation
(
value
=
"添加离职计划"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
4
)
@ApiOperation
(
value
=
"
55.
添加离职计划"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
5
)
public
Result
<
YgglMainLzb
>
addjhlz
(
@CurrentUser
UserBean
userBean
,
@RequestBody
LzygQueryDto
lzygQueryDto
)
{
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
...
...
@@ -1679,14 +1195,14 @@ public class YgglController {
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
YgglMainLzb
ygglMainLzb
=
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
build
();
// 移动员工表数据到离职表
BeanUtil
.
copyProperties
(
ygglMainEmp
,
ygglMainLzb
);
BeanUtil
.
copyProperties
(
ygglMainEmp
,
ygglMainLzb
,
"before_leaving_sts"
);
ygglMainLzb
.
insert
();
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
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
())
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
())
.
beforeLeavingSts
(
ygglMainEmp
.
getJobStatus
())
.
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
...
...
@@ -1701,8 +1217,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/qrlz"
)
@ApiOperation
(
value
=
"确认离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
5
)
@ApiOperation
(
value
=
"
56.
确认离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
6
)
public
Result
<
Void
>
addlzb
(
@CurrentUser
UserBean
userBean
,
@RequestBody
LzygQueryDto
lzygQueryDto
)
{
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
// 删除员工档案表
...
...
@@ -1729,12 +1245,19 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/fqlz"
)
@ApiOperation
(
value
=
"放弃离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
6
)
@ApiOperation
(
value
=
"
57.
放弃离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
7
)
public
Result
<
Void
>
fqlz
(
@CurrentUser
UserBean
userBean
,
@RequestBody
LzygQueryDto
lzygQueryDto
)
{
YgglMainEmp
ygglMainEmp
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
lzygQueryDto
.
getEmpNum
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
updateWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
YgglMainEmp
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
()).
build
().
update
(
updateWrapper
);
YgglMainEmp
.
builder
().
jobStatus
(
ygglMainEmp
.
getBeforeLeavingSts
()).
build
().
update
(
updateWrapper
);
QueryWrapper
<
YgglMainLzb
>
queryWrapper
=
new
QueryWrapper
<
YgglMainLzb
>();
queryWrapper
.
eq
(
"emp_num"
,
lzygQueryDto
.
getEmpNum
());
// 删除离职表
...
...
@@ -1744,8 +1267,8 @@ public class YgglController {
}
@PostMapping
(
value
=
"/tzlzyy"
)
@ApiOperation
(
value
=
"调整离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
6
)
@ApiOperation
(
value
=
"
58.
调整离职"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
8
)
public
Result
<
YgglMainLzb
>
tzlzyy
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglMainLzb
ygglMainLzb
)
{
if
(
ygglMainLzb
.
getEmpNum
()
!=
null
)
{
...
...
@@ -1765,8 +1288,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/querylzyg"
)
@ApiOperation
(
value
=
"查询离职员工列表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
7
)
@ApiOperation
(
value
=
"
59.
查询离职员工列表"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
5
9
)
public
Result
<
Object
>
querylzyg
(
@CurrentUser
UserBean
userBean
,
@RequestBody
LzbQueryDto
lzygQueryDto
)
{
lzygQueryDto
.
setOrgCode
(
userBean
.
getOrgCode
());
...
...
@@ -1784,8 +1307,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/mz/{id}"
)
@ApiOperation
(
value
=
"展示民族/展示所有民族"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
59
)
@ApiOperation
(
value
=
"
60.
展示民族/展示所有民族"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
60
)
public
Result
<
List
<
YgmzDto
>>
selectmzs
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
if
(
id
==
null
||
id
==
0
)
{
List
<
YgmzDto
>
allmz
=
new
LambdaQueryChainWrapper
<
YgmzDto
>(
ygMzDtoMapper
).
list
();
...
...
@@ -1805,8 +1328,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/native_place"
)
@ApiOperation
(
value
=
"籍贯树"
,
httpMethod
=
"GET"
,
notes
=
"籍贯树"
)
@ApiOperationSupport
(
order
=
6
0
)
@ApiOperation
(
value
=
"
61.
籍贯树"
,
httpMethod
=
"GET"
,
notes
=
"籍贯树"
)
@ApiOperationSupport
(
order
=
6
1
)
public
Result
<
List
<
CommonArea
>>
selectNativePlace
()
{
List
<
CommonArea
>
listCommonArea
=
commonAreaMapper
.
AllAreaForTree
();
...
...
@@ -1821,7 +1344,7 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/queryemp"
)
@ApiOperation
(
value
=
"查询员工列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
62.
查询员工列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
62
)
public
Result
<
List
<
YgQueryDto
>>
queryEmpMessage
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgQueryDto
>
ygQueryDto
=
ygglMainEmpMapper
.
queryEmpMessage
(
userBean
.
getOrgCode
());
...
...
@@ -1840,7 +1363,7 @@ public class YgglController {
* @return 成功信息
*/
@GetMapping
(
"/yggl"
)
@ApiOperation
(
value
=
"获取员工管理统计图信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"
63.
获取员工管理统计图信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
63
)
public
Result
<
Map
<
String
,
Object
>>
queryYgglCartogram
(
@CurrentUser
UserBean
userBean
)
{
...
...
@@ -1883,8 +1406,8 @@ public class YgglController {
* @return 成功信息(weng)
*/
@GetMapping
(
"/Cartogram"
)
@ApiOperation
(
value
=
"获取员工管理统计图信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
99
)
@ApiOperation
(
value
=
"
64.
获取员工管理统计图信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
64
)
public
Result
<
YgCartogramDto
>
ygCartogram
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
List
<
YgbintuDto
>
bintu
=
ygglMainEmpMapper
.
rsybp
(
orgCode
);
...
...
@@ -1972,8 +1495,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/ygsbgjj"
)
@ApiOperation
(
value
=
"获取员工社保公积金"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
4
)
@ApiOperation
(
value
=
"
65.
获取员工社保公积金"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
5
)
public
Result
<
List
<
YgglAttaSbgjj
>>
selectygsbgjj
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaSbgjj
>
ygglAttaSbgjj
=
YgglAttaSbgjj
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
YgglAttaSbgjj
>()
.
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
...
...
@@ -1987,8 +1510,8 @@ public class YgglController {
* @return
*/
@GetMapping
(
value
=
"/ygsbgjj/{empNum}"
)
@ApiOperation
(
value
=
"获取员工社保公积金"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
5
)
@ApiOperation
(
value
=
"
66.
获取员工社保公积金"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
6
)
public
Result
<
YgglAttaSbgjj
>
selectygsbgjj
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
empNum
)
{
YgglAttaSbgjj
ygglAttaSbgjj
=
YgglAttaSbgjj
.
builder
().
build
()
...
...
@@ -2004,8 +1527,8 @@ public class YgglController {
* @return
*/
@PostMapping
(
value
=
"/ygsbgjj"
)
@ApiOperation
(
value
=
"添加/修改员工社保公积金"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
6
)
@ApiOperation
(
value
=
"
67.
添加/修改员工社保公积金"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
7
)
public
Result
<
YgglAttaSbgjj
>
addygsbgjj
(
@CurrentUser
UserBean
userBean
,
@RequestBody
YgglAttaSbgjj
ygglAttaSbgjj
)
{
Integer
empNum
=
ygglAttaSbgjj
.
getEmpNum
();
if
(
empNum
==
null
)
{
...
...
@@ -2029,8 +1552,8 @@ public class YgglController {
* @return
*/
@DeleteMapping
(
value
=
"/ygsbgjj/{id}"
)
@ApiOperation
(
value
=
"删除员工社保公积金"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
7
)
@ApiOperation
(
value
=
"
68.
删除员工社保公积金"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
8
)
public
Result
<
Boolean
>
delygsbgjj
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
return
ResultUtil
.
data
(
YgglAttaSbgjj
.
builder
().
build
()
...
...
@@ -2062,5 +1585,136 @@ public class YgglController {
return
ResultUtil
.
data
(
treeNodes
,
"获取成功"
);
}
/**
* 获取登录人的相关信息
*
* @param
* @return
*/
@GetMapping
(
value
=
"/loginmessage"
)
@ApiOperation
(
value
=
"69.获取登录人的相关信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
69
)
public
Result
<
LoginInfoDto
>
loginmessage
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
LoginInfoDto
loginInfo
=
LoginInfoDto
.
builder
().
build
();
YgglMainEmp
ygglMainEmp
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
select
(
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getRzTime
,
YgglMainEmp:
:
getZzTime
,
YgglMainEmp:
:
getEmpNum
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
one
();
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
();
if
(
gwObj
!=
null
)
{
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
);
}
loginInfo
.
setEmpNum
(
ygglMainEmp
.
getEmpNum
());
loginInfo
.
setName
(
ygglMainEmp
.
getName
());
loginInfo
.
setGwId
(
gw
);
loginInfo
.
setGwName
(
gwObj
!=
null
?
gwObj
.
getName
()
:
""
);
loginInfo
.
setEntryTime
(
ygglMainEmp
.
getRzTime
());
loginInfo
.
setRegularTime
(
ygglMainEmp
.
getRzTime
());
}
return
ResultUtil
.
data
(
loginInfo
,
"操作成功!"
);
}
/**
* 获取登录人和上级主管的empNum和名称
*
* @param
* @return
*/
@GetMapping
(
value
=
"/loginerChargers"
)
@ApiOperation
(
value
=
"70.获取登录人和上级主管的empNum和名称"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
70
)
public
Result
<
List
<
LoginerChargeDto
>>
loginerChargers
(
@CurrentUser
UserBean
userBean
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
gw
=
empNumConfirm
(
orgCode
,
empNum
).
getBmgwId
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM
.
getUpDepts
(
list
,
gw
,
zzglBmgwMs
);
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
for
(
Integer
zzglId
:
list
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
}
}
}
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
m
.
setHeadUrl
(
""
);
}
loginerChargeDtos
.
add
(
new
LoginerChargeDto
(
m
.
getEmpNum
(),
m
.
getName
(),
m
.
getHeadUrl
()));
}
Collections
.
reverse
(
loginerChargeDtos
);
return
ResultUtil
.
data
(
loginerChargeDtos
,
"获取上级部门的部门id"
);
}
// 根据传来的empNum获取该人员信息,没有则传全部
public
List
<
YgglMainEmp
>
empNumsConfirm
(
Integer
orgCode
,
List
<
Integer
>
empNumList
)
{
List
<
YgglMainEmp
>
all
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
list
();
List
<
YgglMainEmp
>
ygglMainEmps
=
new
ArrayList
<
YgglMainEmp
>();
if
(
empNumList
.
size
()
!=
0
)
{
for
(
Integer
empNum
:
empNumList
)
{
all
.
stream
().
filter
(
item
->
empNum
.
equals
(
item
.
getEmpNum
())).
forEach
(
action
->
{
ygglMainEmps
.
add
(
action
);
});
}
}
else
{
ygglMainEmps
.
addAll
(
all
);
}
return
ygglMainEmps
;
}
// 根据传来的empNum获取该人员信息
public
YgglMainEmp
empNumConfirm
(
Integer
orgCode
,
Integer
empNum
)
{
YgglMainEmp
one
=
new
LambdaQueryChainWrapper
<
YgglMainEmp
>(
ygglMainEmpMapper
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
return
one
;
}
/**
* 获取用户头像
*
* @param
* @return
*/
@PostMapping
(
value
=
"/headphotos"
)
@ApiOperation
(
value
=
"71.获取用户头像"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
71
)
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
if
(
empNumList
.
size
()
==
0
)
{
return
ResultUtil
.
error
(
"请输入empNum数组"
);
}
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
in
(
YgglMainEmp:
:
getEmpNum
,
empNumList
)
.
select
(
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getHeadUrl
));
for
(
YgglMainEmp
yg
:
yglList
)
{
if
(
StringUtil
.
isEmpty
(
yg
.
getHeadUrl
()))
{
yg
.
setHeadUrl
(
""
);
}
}
return
ResultUtil
.
data
(
yglList
,
"获取用户头像组成功"
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/yggl/AddygdaDto.java
View file @
aa523f78
...
...
@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"性别 0:男;1:女"
,
example
=
"0"
)
private
Integer
sex
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"部门岗位id"
,
example
=
"0"
)
private
Integer
bmgwId
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dto/yggl/ImportEmpDto.java
0 → 100644
View file @
aa523f78
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
cn.timer.api.config.exception.Regular
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 员工导入模板
* @author Tang
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ImportEmpDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1230023773946170942L
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"员工姓名"
,
example
=
"华仔"
)
private
String
name
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@Pattern
(
regexp
=
Regular
.
PHONE
,
message
=
ValidationMsg
.
PATTERN
)
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"101"
)
private
String
phone
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他"
,
example
=
"0"
)
private
Integer
zjType
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"证件号码 "
,
example
=
"证件号码"
)
private
String
zjNum
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘"
,
example
=
"0"
)
private
Integer
jobType
;
@ApiModelProperty
(
value
=
"入职日期 "
,
example
=
"客户注册后的时间为入职时间"
)
private
String
rzTime
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)"
,
example
=
"0"
)
private
Integer
syq
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"性别 0:男;1:女"
,
example
=
"0"
)
private
Integer
sex
;
}
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
aa523f78
...
...
@@ -22,6 +22,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecuteRecordSts
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ParticipatorType
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dto.spmk.Condition
;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.FromData
;
...
...
@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User;
*
*/
public
class
RouterUtils
{
/**
* 0 未执行
*/
private
final
static
String
UNEXECUTED
=
"0"
;
/**
* 1 执行中
*/
private
final
static
String
EXECUTING
=
"1"
;
/**
* 2 已执行
*/
private
final
static
String
EXECUTED
=
"2"
;
/**
* creator 抄送人
*/
private
final
static
String
CREATOR
=
"creator"
;
/**
* audit 审批人
*/
private
final
static
String
AUDIT
=
"audit"
;
/**
* copy 抄送人
*/
private
final
static
String
COPY
=
"copy"
;
/**
* department 部门类型
*/
private
final
static
String
RELATION_TYPE_DEPARTMENT
=
"department"
;
/**
* users 用户类型
*/
private
final
static
String
RELATION_TYPE_USERS
=
"users"
;
public
static
List
<
Router
>
NextNode
(
List
<
Router
>
listRouter
,
JSONObject
obj
,
boolean
isFirse
)
throws
NumberFormatException
,
ConvertException
,
Exception
{
...
...
@@ -76,7 +100,7 @@ public class RouterUtils {
.
name
(
obj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
())
.
id
(
obj
.
get
(
"id"
,
FromData
.
class
).
getValue
())
.
headUrl
(
obj
.
get
(
"headUrl"
,
FromData
.
class
).
getValue
())
.
execute
(
"0"
)
.
execute
(
UNEXECUTED
)
.
build
();
users
.
add
(
userFirst
);
List
<
Relation
>
relations
=
new
ArrayList
<
Relation
>();
...
...
@@ -238,9 +262,8 @@ public class RouterUtils {
public
static
List
<
YgglMainEmp
>
selectOtherlistent
(
Integer
orgCode
,
Integer
id
){
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
QueryWrapper
<
ZzglBmgwM
>
queryWrapper
=
new
QueryWrapper
<
ZzglBmgwM
>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
);
List
<
ZzglBmgwM
>
zzglBmgwMs
=
ZzglBmgwM
.
builder
().
build
().
selectList
(
queryWrapper
);
List
<
ZzglBmgwM
>
zzglBmgwMs
=
ZzglBmgwM
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
));
list
.
add
(
id
);
ZzglBmgwM
.
getDepts
(
list
,
id
,
zzglBmgwMs
);
...
...
@@ -293,13 +316,14 @@ public class RouterUtils {
continue
;
}
// ClassName 区分参与审批流程人的角色 CREATOR(发起人)、AUDIT(审核人)、COPY(抄送人)
// 各个角色的逻辑不同
switch
(
listFlowChildren
.
get
(
i
).
getClassName
())
{
case
CREATOR:
SpmkApproveExecuteRecord
aer
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"发起申请"
)
.
name
(
ParticipatorType
.
INITIATOR
.
getName
()
)
.
type
(
ParticipatorType
.
INITIATOR
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
...
...
@@ -321,7 +345,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"审批人"
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
()
)
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
...
...
@@ -354,7 +378,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"抄送人"
)
.
name
(
ParticipatorType
.
COPY
.
getName
()
)
.
type
(
ParticipatorType
.
COPY
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
...
...
@@ -423,7 +447,7 @@ public class RouterUtils {
// 0未执行 1执行中 2同意 3拒绝 4 转派
if
(
sts
==
ExecutorSts
.
REFUSE
.
ordinal
())
{
// 更新 审批汇总 状态
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
""
).
endTime
(
new
Date
()).
sts
(
sts
).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
CommonEnum
.
NULL_STR
.
getDesc
()
).
endTime
(
new
Date
()).
sts
(
sts
).
build
().
updateById
();
SpmkApproveExecuteRecord
.
builder
()
.
id
(
executeRecordId
)
...
...
@@ -434,6 +458,7 @@ public class RouterUtils {
listFlowChildren
.
get
(
i_user
).
setExecute
(
EXECUTED
);
return
;
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}
else
if
(
sts
==
ExecutorSts
.
REDEPLOY
.
ordinal
())
{
List
<
User
>
users1
=
CollectionUtil
.
sub
(
listUser
,
0
,
i_user
+
1
);
users1
.
add
(
redeployUser
);
...
...
@@ -480,8 +505,8 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"发起申请"
)
.
type
(
0
)
.
name
(
ParticipatorType
.
INITIATOR
.
getName
()
)
.
type
(
ParticipatorType
.
INITIATOR
.
ordinal
()
)
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
// 新增 审批执行记录
...
...
@@ -504,7 +529,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"审批人"
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
()
)
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
...
...
@@ -530,7 +555,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"抄送人"
)
.
name
(
ParticipatorType
.
COPY
.
getName
()
)
.
type
(
ParticipatorType
.
COPY
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
View file @
aa523f78
...
...
@@ -53,7 +53,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
.
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
)
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
// 调 考勤管理 业务-出差
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
View file @
aa523f78
...
...
@@ -51,7 +51,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.
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
)
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
// 调 考勤管理 业务-外出
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
View file @
aa523f78
...
...
@@ -58,7 +58,7 @@ public class LeaveBusiness extends SpmkAssoBusiness {
.
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
)
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
// 调 考勤管理 业务-请假
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
View file @
aa523f78
...
...
@@ -42,7 +42,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
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
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
();
...
...
@@ -51,7 +51,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
.
builder
()
.
repairid
(
Convert
.
toInt
(
approveId
))
.
cardrepltime
(
DateUtil
.
getStringTime
(
PatchCardTime
,
"yyyy-MM-dd HH:mm:ss"
))
//
.cardreplperiod(Convert.toInt(cardreplperiod))
.
cardreplperiod
(
Convert
.
toInt
(
cardreplperiod
))
.
build
();
// 调 考勤管理 业务-补卡
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
View file @
aa523f78
...
...
@@ -58,7 +58,7 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
.
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
)
.
duration
(
Convert
.
toDouble
(
timeLong
))
.
compensate
(
Convert
.
toInt
(
compensate
))
.
build
();
...
...
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