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
e2cb75e8
Commit
e2cb75e8
authored
Jun 16, 2020
by
lal
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal
parents
a947a4b1
3ebd53d0
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
265 additions
and
30 deletions
+265
-30
src/main/java/cn/timer/api/bean/qyzx/QyzxEmpLogin.java
+4
-0
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+3
-0
src/main/java/cn/timer/api/controller/LoginController.java
+5
-0
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
+3
-1
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+2
-0
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+51
-6
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+15
-11
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+45
-5
src/main/java/cn/timer/api/dao/yggl/YgglMainEmpMapper.java
+11
-0
src/main/java/cn/timer/api/dto/jxgl/AppraisalQuery.java
+5
-0
src/main/java/cn/timer/api/dto/yggl/EmpQuery.java
+40
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+2
-2
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
+21
-5
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
+1
-0
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
+57
-0
No files found.
src/main/java/cn/timer/api/bean/qyzx/QyzxEmpLogin.java
View file @
e2cb75e8
...
...
@@ -75,6 +75,10 @@ public class QyzxEmpLogin extends Model<QyzxEmpLogin> {
@ApiModelProperty
(
value
=
"验证码 "
,
example
=
"666666"
)
private
Integer
code
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"是否主管"
,
example
=
"0 是 1 否"
)
private
Integer
isLeader
;
@ApiModelProperty
(
value
=
"权限 "
,
example
=
"0,1,2"
)
@TableField
(
exist
=
false
)
private
List
<
String
>
menus
;
...
...
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
e2cb75e8
...
...
@@ -166,6 +166,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"部门岗位id 部门岗位id"
,
example
=
"101"
)
private
Integer
bmgwId
;
@ApiModelProperty
(
value
=
"部门名称"
,
example
=
""
)
private
String
bmgwName
;
@ApiModelProperty
(
value
=
"修改时间"
,
example
=
"修改时间"
)
private
Date
updateTime
;
...
...
src/main/java/cn/timer/api/controller/LoginController.java
View file @
e2cb75e8
...
...
@@ -589,6 +589,11 @@ public class LoginController {
e
.
printStackTrace
();
}
Integer
isLeader
=
zzglBmgwMMapper
.
selectCount
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
.
eq
(
ZzglBmgwM:
:
getLeader
,
qyzxEmpLogin1
.
getId
())
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
qyzxEmpLogin1
.
getOrgId
()))
>
0
?
0
:
1
;
qyzxEmpLogin1
.
setIsLeader
(
isLeader
);
List
<
QysDto
>
qys
=
qyzxEmpLoginMapper
.
getQys
(
qyzxEmpLogin1
.
getId
());
if
(
qys
.
size
()
==
0
)
return
ResultUtil
.
error
(
"没有任何公司可以查看!"
);
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
View file @
e2cb75e8
...
...
@@ -355,6 +355,8 @@ public class DzhtController {
}
else
{
DzhtController2
d
=
new
DzhtController2
();
accountId
=
d
.
grzc
(
userBean
,
empNum
);
if
(
accountId
.
equals
(
"IDCARD-ERROR"
))
return
ResultUtil
.
error
(
"请先完善身份证信息!"
);
}
grrz
.
setAccountId
(
accountId
);
...
...
@@ -623,7 +625,7 @@ public class DzhtController {
code
=
a
.
getBody
().
get
(
"code"
).
toString
();
returnList
.
add
(
a
.
getBody
());
}
if
(
code
.
equals
(
"0"
))
{
if
(
code
!=
null
&&
code
.
equals
(
"0"
))
{
return
ResultUtil
.
data
(
returnList
);
}
else
{
return
ResultUtil
.
data
(
returnList
,
"查询失败"
);
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
e2cb75e8
...
...
@@ -112,6 +112,8 @@ public class DzhtController2 {
String
name
=
yg
.
getName
();
Integer
type
=
yg
.
getZjType
();
String
idType
=
null
;
if
(
type
==
null
)
return
"IDCARD-ERROR"
;
if
(
type
==
0
)
{
idType
=
"CRED_PSN_CH_IDCARD"
;
// 大陆身份证
}
else
if
(
type
==
1
)
{
...
...
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
e2cb75e8
...
...
@@ -470,7 +470,7 @@ public class JxglController {
.
ne
(
aT
.
getIsUseNotFixd
()
==
1
,
JxglAppraisalIndicatorsT:
:
getType
,
IndicatorsType
.
NOT_FIXATION
.
getType
()));
if
(
listAIT
==
null
||
listAIT
.
size
()
<=
0
)
{
if
(
CollectionUtil
.
isEmpty
(
listAIT
)
)
{
throw
new
CustomException
(
"考核指标不存在"
);
}
...
...
@@ -504,7 +504,7 @@ public class JxglController {
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setExecutorId
(
bAP
);
appraisalLog
.
setExecutorName
(
yME
.
getName
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
()
.
getName
());
appraisalLog
.
setType
(
AppraisalLogType
.
START
.
getType
());
appraisalLog
.
insert
();
}
...
...
@@ -541,7 +541,7 @@ public class JxglController {
// 删除 绩效考核
jxglPerformanceAppraisalMapper
.
deleteById
(
id
);
if
(
aIds
.
size
()
>
0
)
{
if
(
CollectionUtil
.
isNotEmpty
(
aIds
)
)
{
// 批量删除 考核
jxglAppraisalMapper
.
deleteBatchIds
(
aIds
);
...
...
@@ -745,11 +745,32 @@ public class JxglController {
// 修改 考核状态
jxglAppraisalMapper
.
update
(
JxglAppraisal
.
builder
().
performanceAppraisalId
(
id
).
sts
(
Performance
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()).
build
(),
JxglAppraisal
.
builder
().
performanceAppraisalId
(
id
).
sts
(
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()).
build
(),
new
UpdateWrapper
<
JxglAppraisal
>().
lambda
()
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
id
)
);
List
<
JxglAppraisal
>
listAppraisal
=
jxglAppraisalMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisal
>().
lambda
()
.
select
(
JxglAppraisal:
:
getId
)
.
eq
(
JxglAppraisal:
:
getPerformanceAppraisalId
,
performanceAppraisal
.
getId
()));
if
(
CollectionUtil
.
isNotEmpty
(
listAppraisal
))
{
List
<
Integer
>
aIds
=
listAppraisal
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
aIds
))
{
aIds
.
forEach
(
aId
->
{
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
aId
);
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setType
(
AppraisalLogType
.
TERMINATION_ASSESSMENT
.
getType
());
appraisalLog
.
insert
();
});
}
}
return
ResultUtil
.
success
();
}
...
...
@@ -827,6 +848,23 @@ public class JxglController {
IPage
<
JxglAppraisal
>
page
=
new
Page
<
JxglAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
List
<
Integer
>
empNums
=
CollUtil
.
toList
();
if
(
query
.
getBmId
()
!=
null
)
{
List
<
YgglMainEmp
>
usersQuery
=
zzglBmgwMService
.
selectOtherlistent
(
userBean
.
getOrgCode
(),
query
.
getBmId
());
if
(
usersQuery
!=
null
)
{
empNums
=
usersQuery
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
}
else
{
return
ResultUtil
.
data
(
null
);
}
if
(
empNums
==
null
||
empNums
.
size
()
==
0
)
{
return
ResultUtil
.
data
(
null
);
}
}
query
.
setEmpNums
(
empNums
);
IPage
<
JxglAppraisal
>
pageA
=
jxglAppraisalMapper
.
selectListByQuery
(
page
,
query
);
List
<
JxglAppraisal
>
listPA
=
pageA
.
getRecords
();
...
...
@@ -925,6 +963,13 @@ public class JxglController {
return
ResultUtil
.
error
(
"考核不存在"
);
}
else
if
(
appraisal
.
getSts
()
<=
AppraisalSts
.
RESULT_VERIFICATION
.
getType
())
{
JxglAppraisal
.
builder
().
id
(
id
).
sts
(
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
()).
build
().
updateById
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
appraisalLog
.
setAppraisalId
(
appraisal
.
getId
());
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setType
(
AppraisalLogType
.
TERMINATION_ASSESSMENT
.
getType
());
appraisalLog
.
insert
();
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
ASSESSMENT_COMPLETE
.
getType
())
{
return
ResultUtil
.
error
(
"考核已完成,无法终止"
);
}
else
if
(
appraisal
.
getSts
()
==
AppraisalSts
.
TERMINATION_ASSESSMENT
.
getType
())
{
...
...
@@ -951,13 +996,13 @@ public class JxglController {
if
(
query
.
getBmId
()
!=
null
)
{
List
<
YgglMainEmp
>
usersQuery
=
zzglBmgwMService
.
selectOtherlistent
(
userBean
.
getOrgCode
(),
query
.
getBmId
());
if
(
usersQuery
!=
null
)
{
if
(
CollectionUtil
.
isNotEmpty
(
usersQuery
)
)
{
empNums
=
usersQuery
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
}
else
{
return
ResultUtil
.
data
(
null
);
}
if
(
empNums
==
null
||
empNums
.
size
()
==
0
)
{
if
(
CollectionUtil
.
isEmpty
(
empNums
)
)
{
return
ResultUtil
.
data
(
null
);
}
}
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
e2cb75e8
...
...
@@ -25,6 +25,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
...
...
@@ -361,7 +362,7 @@ public class SpmkController {
.
eq
(
SpmkCustomApproval:
:
getOrgCode
,
userBean
.
getOrgCode
()))
>
0
)
{
return
ResultUtil
.
error
(
"自定义审批名重复!"
);
}
ca
.
setOrgCode
(
userBean
.
getOrgCode
());
ca
.
setFroms
(
ObjectUtil
.
serialize
(
spmkCustomApprovalDto
.
getFroms
()));
ca
.
setRouter
(
ObjectUtil
.
serialize
(
spmkCustomApprovalDto
.
getRouter
()));
...
...
@@ -468,7 +469,9 @@ public class SpmkController {
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>()
.
lambda
()
.
select
(
YgglMainEmp:
:
getHeadUrl
,
YgglMainEmp:
:
getName
)
.
eq
(
YgglMainEmp:
:
getEmpNum
,
userBean
.
getEmpNum
()));
.
eq
(
YgglMainEmp:
:
getEmpNum
,
userBean
.
getEmpNum
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
);
if
(
ygglMainEmp
==
null
)
return
ResultUtil
.
error
(
"发起人不存在!"
);
...
...
@@ -477,13 +480,13 @@ public class SpmkController {
Router
router
=
spmkApproveSummaryDto
.
getRouter
();
List
<
Router
>
routers
=
router
.
getChildren
();
if
(
routers
!=
null
&&
routers
.
size
()
>
0
)
{
if
(
CollectionUtil
.
isNotEmpty
(
routers
)
)
{
List
<
Relation
>
relations
=
routers
.
get
(
0
).
getRelation
();
if
(
relations
==
null
||
relations
.
size
()
<
1
)
{
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
List
<
User
>
users
=
relations
.
get
(
0
).
getUsers
();
if
(
users
==
null
||
users
.
size
()
<
1
)
{
if
(
CollectionUtil
.
isEmpty
(
users
)
)
{
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
...
...
@@ -537,7 +540,6 @@ public class SpmkController {
throw
new
CustomException
(
"审批详情-新增异常"
);
return
ResultUtil
.
success
();
}
//TODO 审批汇总
...
...
@@ -606,17 +608,18 @@ public class SpmkController {
// @BindingResultCtrol(title = "审批人审批")
public
Result
<
Object
>
approving
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ApprovingDto
approvingDto
)
throws
Exception
{
Integer
asId
=
approvingDto
.
getAsId
();
SpmkApproveDetail
ad
=
SpmkApproveDetail
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>()
.
lambda
()
.
select
(
SpmkApproveDetail:
:
getId
,
SpmkApproveDetail:
:
getRequestData
,
SpmkApproveDetail:
:
getFlowChildren
)
.
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
a
pprovingDto
.
getAsId
()
));
.
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
a
sId
));
// 查询 SpmkApproveSummary 状态
SpmkApproveSummary
aSummary
=
spmkApproveSummaryMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
()
.
select
(
SpmkApproveSummary:
:
getSts
)
.
eq
(
SpmkApproveSummary:
:
getId
,
a
pprovingDto
.
getAsId
()
));
.
eq
(
SpmkApproveSummary:
:
getId
,
a
sId
));
if
(
aSummary
.
getSts
()
>
SpmkEnumInterface
.
ApproveSummarySts
.
IN
.
ordinal
())
{
return
ResultUtil
.
error
(
"该审批已结束!"
);
...
...
@@ -643,7 +646,7 @@ public class SpmkController {
// 审批逻辑
RouterUtils
.
approving
(
listFlowChildren
,
a
pprovingDto
.
getAsId
()
,
a
sId
,
approvingDto
.
getExecuteRecordId
(),
approvingDto
.
getExecutorId
(),
approvingDto
.
getOpinion
(),
...
...
@@ -659,13 +662,14 @@ public class SpmkController {
// 查询 SpmkApproveSummary 状态
aSummary
=
spmkApproveSummaryMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
()
.
select
(
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getAssoType
)
.
eq
(
SpmkApproveSummary:
:
getId
,
a
pprovingDto
.
getAsId
()
));
.
eq
(
SpmkApproveSummary:
:
getId
,
a
sId
));
if
(
aSummary
.
getSts
()
!=
SpmkEnumInterface
.
ApproveSummarySts
.
REFUSE
.
ordinal
())
{
SpmkApproveSummary
.
builder
().
id
(
a
pprovingDto
.
getAsId
()
).
currentApprover
(
CommonEnum
.
NULL_STR
.
getDesc
()).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
a
sId
).
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
());
jSONObject
.
set
(
"approveId"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
asId
)));
//审批完成后 业务
SpmkAssoBusiness
sab
=
SpmkAssoBusinessFactory
.
createSpmkAssoType
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
if
(
sab
!=
null
)
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
e2cb75e8
...
...
@@ -42,6 +42,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.IoUtil
;
...
...
@@ -83,6 +84,7 @@ import cn.timer.api.config.enums.CommonEnum;
import
cn.timer.api.config.enums.SysRoleType
;
import
cn.timer.api.config.exception.Regular
;
import
cn.timer.api.config.validation.ValidList
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.clazz.CommonAreaMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
...
...
@@ -91,6 +93,7 @@ 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.EmpQuery
;
import
cn.timer.api.dto.yggl.ImportEmpDto
;
import
cn.timer.api.dto.yggl.LoginInfoDto
;
import
cn.timer.api.dto.yggl.LoginerChargeDto
;
...
...
@@ -338,9 +341,7 @@ public class YgglController {
Integer
j
=
ygQueryDto
.
getJobStatus
();
Integer
t
=
ygQueryDto
.
getJobType
();
String
q
=
ygQueryDto
.
getQuery
();
Page
<
YgglMainEmp
>
page
=
new
Page
<
YgglMainEmp
>(
ygQueryDto
.
getCurrentPage
()
==
null
?
1
:
ygQueryDto
.
getCurrentPage
(),
ygQueryDto
.
getTotalPage
()
==
null
?
10
:
ygQueryDto
.
getTotalPage
());
Page
<
YgglMainEmp
>
page
=
new
Page
<
YgglMainEmp
>(
ygQueryDto
.
getCurrentPage
(),
ygQueryDto
.
getTotalPage
());
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
()
.
select
(
YgglMainEmp:
:
getName
,
YgglMainEmp:
:
getEmpNum
,
YgglMainEmp:
:
getBmgwId
,
YgglMainEmp:
:
getRzTime
,
...
...
@@ -356,6 +357,45 @@ public class YgglController {
return
ResultUtil
.
data
(
ygglMainEmpPage
);
}
@Autowired
private
ZzglBmgwMService
zzglBmgwMService
;
/**
* 员工列表-分页
*
* @param
* @return
*/
@PostMapping
(
value
=
"/selects_emp"
)
@ApiOperation
(
value
=
"6.员工列表-分页"
,
httpMethod
=
"POST"
,
notes
=
"员工列表-分页"
)
@ApiOperationSupport
(
order
=
6
)
public
Result
<
Object
>
selectsEmp
(
@CurrentUser
UserBean
userBean
,
@RequestBody
EmpQuery
empQuery
)
{
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
bmgwId
=
empQuery
.
getBmgwid
();
Page
<
YgglMainEmp
>
page
=
new
Page
<
YgglMainEmp
>(
empQuery
.
getCurrentPage
(),
empQuery
.
getTotalPage
());
List
<
Integer
>
empNums
=
CollUtil
.
toList
();
if
(
bmgwId
!=
null
)
{
List
<
YgglMainEmp
>
usersQuery
=
zzglBmgwMService
.
selectOtherlistent
(
userBean
.
getOrgCode
(),
bmgwId
);
if
(
CollectionUtil
.
isNotEmpty
(
usersQuery
))
{
empNums
=
usersQuery
.
stream
().
map
(
YgglMainEmp:
:
getEmpNum
).
collect
(
Collectors
.
toList
());
}
else
{
return
ResultUtil
.
data
(
null
);
}
if
(
CollectionUtil
.
isEmpty
(
empNums
))
{
return
ResultUtil
.
data
(
null
);
}
}
empQuery
.
setOrgCode
(
orgCode
);
empQuery
.
setEmpNums
(
empNums
);
IPage
<
YgglMainEmp
>
ygglMainEmpPage
=
ygglMainEmpMapper
.
selectME
(
page
,
empQuery
);
List
<
YgglMainEmp
>
ygglMainEmps
=
ygglMainEmpPage
.
getRecords
();
return
ResultUtil
.
data
(
page
,
ygglMainEmps
);
}
/**
* 导入员工档案
*/
...
...
@@ -1511,8 +1551,8 @@ public class YgglController {
@GetMapping
(
value
=
"/ygsbgjj"
)
@ApiOperation
(
value
=
"65.获取员工社保公积金"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
65
)
public
Result
<
List
<
YgglAttaSbgjj
>
>
selectygsbgjj
(
@CurrentUser
UserBean
userBean
)
{
List
<
YgglAttaSbgjj
>
ygglAttaSbgjj
=
YgglAttaSbgjj
.
builder
().
build
().
selectList
(
public
Result
<
YgglAttaSbgjj
>
selectygsbgjj
(
@CurrentUser
UserBean
userBean
)
{
YgglAttaSbgjj
ygglAttaSbgjj
=
YgglAttaSbgjj
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglAttaSbgjj
>().
lambda
().
eq
(
YgglAttaSbgjj:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
YgglAttaSbgjj:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
ygglAttaSbgjj
);
...
...
src/main/java/cn/timer/api/dao/yggl/YgglMainEmpMapper.java
View file @
e2cb75e8
...
...
@@ -7,9 +7,12 @@ import org.springframework.stereotype.Repository;
import
org.springframework.web.bind.annotation.PathVariable
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.dto.yggl.EmpQuery
;
import
cn.timer.api.dto.yggl.YgCartogramDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
...
...
@@ -119,4 +122,12 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @return
*/
List
<
YgglCartogramDto
>
queryWorkingAge
(
UserBean
userBean
);
/**
* 员工列表
* @param page
* @param empQuery
* @return
*/
IPage
<
YgglMainEmp
>
selectME
(
Page
<
YgglMainEmp
>
page
,
@Param
(
"param"
)
EmpQuery
empQuery
);
}
src/main/java/cn/timer/api/dto/jxgl/AppraisalQuery.java
View file @
e2cb75e8
package
cn
.
timer
.
api
.
dto
.
jxgl
;
import
java.util.List
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
...
...
@@ -36,4 +38,7 @@ public class AppraisalQuery extends Page{
@ApiModelProperty
(
value
=
"部门id"
,
example
=
""
)
private
Integer
bmId
;
@ApiModelProperty
(
value
=
"员工id列表"
,
example
=
""
)
private
List
<
Integer
>
empNums
;
}
src/main/java/cn/timer/api/dto/yggl/EmpQuery.java
0 → 100644
View file @
e2cb75e8
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
java.io.Serializable
;
import
java.util.List
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
EmpQuery
extends
Page
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1230023773946170942L
;
@ApiModelProperty
(
value
=
"工作性质0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘"
,
example
=
"0"
)
private
Integer
jobType
;
@ApiModelProperty
(
value
=
"部门id"
,
example
=
"10"
)
private
Integer
bmgwid
;
@ApiModelProperty
(
value
=
"员工状态0试用、1正式、2离职中、3已离职"
,
example
=
"0"
)
private
Integer
jobStatus
;
@ApiModelProperty
(
value
=
"手机号、姓名"
,
example
=
"1388888888 or 张三"
)
private
String
query
;
@ApiModelProperty
(
value
=
"企业id"
,
example
=
"0"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"员工id列表"
,
example
=
""
)
private
List
<
Integer
>
empNums
;
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
e2cb75e8
...
...
@@ -78,7 +78,7 @@ public class RouterUtils {
public
static
List
<
Router
>
NextNode
(
List
<
Router
>
listRouter
,
JSONObject
obj
,
boolean
isFirse
,
boolean
isAuditNext
)
throws
NumberFormatException
,
ConvertException
,
Exception
{
Router
router
;
if
(
listRouter
!=
null
&&
listRouter
.
size
()
!=
0
)
{
if
(
CollectionUtil
.
isNotEmpty
(
listRouter
)
)
{
// 非条件节点
if
(
listRouter
.
size
()
==
1
)
{
router
=
listRouter
.
get
(
0
);
...
...
@@ -291,7 +291,7 @@ public class RouterUtils {
getIsFlowChildren
(
router
.
getChildren
(),
listFlowChildren
);
}
}
else
if
(
listRouter
.
size
()
>
1
)
{
}
else
if
(
listRouter
!=
null
&&
listRouter
.
size
()
>
1
)
{
for
(
Router
router2
:
listRouter
)
{
if
(
router2
.
getFlow
())
{
getIsFlowChildren
(
router2
.
getChildren
(),
listFlowChildren
);
...
...
src/main/resources/mapping/jxgl/JxglAppraisalMapper.xml
View file @
e2cb75e8
...
...
@@ -238,16 +238,31 @@
FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num AND b.org_code = #{param.orgCode}
LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.sts = 1
<!-- 缺部门 搜索 -->
WHERE a.performance_appraisal_id = #{param.id}
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
AND b.emp_num IN
(
<foreach
item=
"it"
index=
"index"
collection=
"param.empNums"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
AND b.emp_num = #{param.empNums[0]}
</otherwise>
</choose>
</if>
<if
test=
"param.query != null and param.query != ''"
>
and
(
AND
(
b.name like CONCAT('%',#{param.query},'%') or
b.phone like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.sts != null"
>
and
a.sts = #{param.sts}
AND
a.sts = #{param.sts}
</if>
ORDER BY a.id DESC
...
...
@@ -260,10 +275,11 @@
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = b.bmgw_id limit 1) limit 1) as bm_name,
(SELECT name FROM yggl_main_emp WHERE emp_num = c.executor_id AND org_code = #{param.orgCode}) as executor_name
FROM jxgl_appraisal a
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num
AND b.org_code = #{param.orgCode}
LEFT JOIN yggl_main_emp b ON a.emp_num = b.emp_num
LEFT JOIN jxgl_process_node c ON a.id = c.appraisal_id AND c.sts = 1
<where>
AND b.org_code = #{param.orgCode}
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
...
...
@@ -275,7 +291,7 @@
)
</when>
<otherwise>
AND
asso_id
= #{param.empNums[0]}
AND
b.emp_num
= #{param.empNums[0]}
</otherwise>
</choose>
</if>
...
...
src/main/resources/mapping/jxgl/JxglPerformanceAppraisalMapper.xml
View file @
e2cb75e8
...
...
@@ -137,6 +137,7 @@
SUM((CASE WHEN b.sts in (0,1) THEN 1 ELSE 0 END)) AS target_seting,
SUM((CASE WHEN b.sts in (2,3) THEN 1 ELSE 0 END)) AS performance_score,
SUM((CASE WHEN b.sts in (4,5) THEN 1 ELSE 0 END)) AS result_verification,
SUM((CASE WHEN b.sts = 6 THEN 1 ELSE 0 END)) AS termination_assessment,
SUM((CASE WHEN b.sts = 7 THEN 1 ELSE 0 END)) AS performance_archive
FROM jxgl_performance_appraisal a
LEFT JOIN jxgl_appraisal b ON a.id = b.performance_appraisal_id
...
...
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
View file @
e2cb75e8
...
...
@@ -47,6 +47,8 @@
<result
column=
"work_email"
property=
"workEmail"
/>
<result
column=
"zpqd"
property=
"zpqd"
/>
<result
column=
"bmgw_id"
property=
"bmgwId"
/>
<result
column=
"bmgw_name"
property=
"bmgwName"
/>
<result
column=
"org_code"
property=
"orgCode"
/>
<result
column=
"unionid"
property=
"unionid"
/>
<result
column=
"openid"
property=
"openid"
/>
...
...
@@ -117,6 +119,23 @@
appopenid
</sql>
<sql
id=
"Base_Column_List_a"
>
a.id,
a.emp_num,
a.phone,
a.head_url,
a.name,
a.english_name,
a.sex,
a.birthday,
a.jg,
a.job_type,
a.job_status,
a.rz_time,
a.bmgw_id,
a.org_code
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id YgglMainEmp_id,
emp_num YgglMainEmp_emp_num,
...
...
@@ -180,6 +199,44 @@
WHERE e.org_code = #{orgCode}
</select>
<select
id=
"selectME"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List_a"
/>
,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT up_id FROM zzgl_bmgw_m WHERE id = a.bmgw_id limit 1) limit 1) as bmgw_name
FROM yggl_main_emp a
<where>
AND a.org_code = #{param.orgCode}
<if
test=
"param.jobType != null"
>
AND a.job_type = #{param.jobType}
</if>
<if
test=
"param.jobStatus != null"
>
AND a.job_status = #{param.jobStatus}
</if>
<if
test=
"param.query != null and param.query != ''"
>
AND (
a.name like CONCAT('%',#{param.query},'%') or
a.phone like CONCAT('%',#{param.query},'%')
)
</if>
<if
test=
"param.empNums != null and param.empNums.size() > 0"
>
<choose>
<when
test=
"param.empNums.size() > 1"
>
AND a.emp_num IN
(
<foreach
item=
"it"
index=
"index"
collection=
"param.empNums"
separator=
","
close=
""
>
#{it}
</foreach>
)
</when>
<otherwise>
AND a.emp_num = #{param.empNums[0]}
</otherwise>
</choose>
</if>
</where>
</select>
<!-- benyueLz本月离职人数 -->
<select
id=
"benyueLz"
resultType=
"Integer"
>
SELECT COUNT(datediff(CURDATE(),l.sjlz_time)) FROM yggl_main_lzb l WHERE datediff(CURDATE(),l.sjlz_time)
<![CDATA[ <= ]]>
30 AND org_code = #{orgCode};
...
...
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