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
3ec8cf4f
Commit
3ec8cf4f
authored
Jun 20, 2020
by
tangzhaoqian
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效-绩效归档、员工离职、审批汇总-转派
parent
bf81eba9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
17 deletions
+104
-17
src/main/java/cn/timer/api/controller/LoginController.java
+1
-0
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+32
-7
src/main/java/cn/timer/api/controller/jxgl/service/JxglServiceImpl.java
+2
-0
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+17
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+3
-3
src/main/java/cn/timer/api/utils/DateUtil.java
+42
-0
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
+2
-2
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
+3
-2
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
+2
-2
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
3ec8cf4f
...
...
@@ -581,6 +581,7 @@ public class LoginController {
System
.
out
.
println
(
"重复初始化数据!"
);
}
// 绩效设置初始化
JxglBasicSetting
bS
=
jxglService
.
selectAT
(
qyId
);
if
(
bS
==
null
)
{
boolean
res
=
jxglService
.
initJxglBasicSetting
(
qyId
);
...
...
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
3ec8cf4f
...
...
@@ -644,7 +644,7 @@ public class JxglController {
.
id
(
appraisalUpdateSts
.
getId
())
.
sts
(
PerformanceAppraisalSts
.
PERFORMANCE_ARCHIVE
.
getType
())
.
build
());
return
ResultUtil
.
success
(
""
);
return
ResultUtil
.
success
();
}
Integer
sts
=
null
;
...
...
@@ -746,6 +746,34 @@ public class JxglController {
}
}
break
;
case
3
:
// 修改 考核状态
jxglAppraisalMapper
.
update
(
JxglAppraisal
.
builder
().
performanceAppraisalId
(
id
).
sts
(
AppraisalSts
.
PERFORMANCE_ARCHIVE
.
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
>
aIds2
=
listAppraisal
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
aIds2
))
{
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
aIds2
.
forEach
(
aId
->
{
appraisalLog
.
setId
(
null
);
appraisalLog
.
setAppraisalId
(
aId
);
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
appraisalLog
.
setType
(
AppraisalLogType
.
PERFORMANCE_ARCHIVE
.
getType
());
appraisalLog
.
insert
();
});
}
}
break
;
default
:
break
;
}
...
...
@@ -797,8 +825,9 @@ public class JxglController {
List
<
Integer
>
aIds
=
listAppraisal
.
stream
().
map
(
JxglAppraisal:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
aIds
))
{
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
aIds
.
forEach
(
aId
->
{
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
(
);
appraisalLog
.
setId
(
null
);
appraisalLog
.
setAppraisalId
(
aId
);
appraisalLog
.
setExecutorId
(
userBean
.
getEmpNum
());
appraisalLog
.
setExecutorName
(
userBean
.
getUserInfo
().
getName
());
...
...
@@ -808,8 +837,6 @@ public class JxglController {
}
}
return
ResultUtil
.
success
();
}
...
...
@@ -1159,10 +1186,8 @@ public class JxglController {
@PostMapping
(
value
=
"/selects_my_performance_processed"
)
@ApiOperation
(
value
=
"18.查询-我的绩效-已处理-列表"
,
httpMethod
=
"POST"
,
notes
=
"查询"
)
@ApiOperationSupport
(
order
=
18
)
public
Result
<
Object
>
selectsP
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
Object
>
selectsP
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
MyPerformance
query
)
{
MyPerformance
query
=
MyPerformance
.
builder
().
build
();
IPage
<
JxglPerformanceAppraisal
>
page
=
new
Page
<
JxglPerformanceAppraisal
>(
query
.
getCurrentPage
(),
query
.
getTotalPage
());
query
.
setOrgCode
(
userBean
.
getOrgCode
());
query
.
setId
(
userBean
.
getEmpNum
());
...
...
src/main/java/cn/timer/api/controller/jxgl/service/JxglServiceImpl.java
View file @
3ec8cf4f
...
...
@@ -40,6 +40,7 @@ public class JxglServiceImpl implements JxglService {
res
=
!
performanceRating
.
insert
()
&&
res
?
false
:
res
;
performanceRating
.
setId
(
null
);
performanceRating
.
setBasicSettingId
(
bC
.
getId
());
performanceRating
.
setName
(
"B"
);
performanceRating
.
setSectionMinScore
(
60
);
...
...
@@ -47,6 +48,7 @@ public class JxglServiceImpl implements JxglService {
performanceRating
.
setRanks
(
0
);
res
=
!
performanceRating
.
insert
()
&&
res
?
false
:
res
;
performanceRating
.
setId
(
null
);
performanceRating
.
setBasicSettingId
(
bC
.
getId
());
performanceRating
.
setName
(
"A"
);
performanceRating
.
setSectionMinScore
(
80
);
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
3ec8cf4f
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
...
...
@@ -34,6 +35,7 @@ import cn.hutool.core.util.StrUtil;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
...
...
@@ -52,6 +54,7 @@ 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.enums.SysRoleType
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.config.validation.Insert
;
import
cn.timer.api.config.validation.Ranks
;
...
...
@@ -60,6 +63,7 @@ import cn.timer.api.config.validation.ValidList;
import
cn.timer.api.controller.spmk.service.SpmkService
;
import
cn.timer.api.controller.yggl.service.YgglService
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper
;
import
cn.timer.api.dao.spmk.SpmkApprovalTemplateMapper
;
...
...
@@ -103,6 +107,8 @@ public class SpmkController {
private
ZzglBmgwMService
zzglBmgwMService
;
@Autowired
private
QyzxEmpEntAssoMapper
qyzxEmpEntAssoMapper
;
@Autowired
private
SpmkApprovalTemplateGMapper
spmkApprovalTemplateGMapper
;
@Autowired
private
SpmkApprovalTemplateMapper
spmkApprovalTemplateMapper
;
...
...
@@ -691,7 +697,17 @@ public class SpmkController {
.
eq
(
SpmkExecutor:
:
getId
,
approvingDto
.
getExecutorId
())
.
eq
(
SpmkExecutor:
:
getEmpNum
,
userBean
.
getEmpNum
())
.
eq
(
SpmkExecutor:
:
getSts
,
SpmkEnumInterface
.
ExecutorSts
.
IN_EXECUTION
.
ordinal
()))
==
0
)
{
return
ResultUtil
.
error
(
"非当前审批人,无法审批!"
);
Integer
adminNum
=
new
LambdaQueryChainWrapper
<
QyzxEmpEntAsso
>(
qyzxEmpEntAssoMapper
)
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
())
.
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
in
(
QyzxEmpEntAsso:
:
getUserType
,
SysRoleType
.
U_TYPE_ADMIN
,
SysRoleType
.
U_TYPE_C_ADMIN
)
.
count
();
if
(
adminNum
<=
0
)
{
return
ResultUtil
.
error
(
"非当前审批人 或 管理员,无法操作!"
);
}
}
if
(
aSummary
.
getSts
()
==
0
)
{
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
3ec8cf4f
...
...
@@ -1309,8 +1309,7 @@ public class YgglController {
LambdaQueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
empNum
)
.
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
())
;
.
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
());
// 确认离职 删除员工关联表
qyzxEmpEntAssoMapper
.
delete
(
queryWrapper
);
...
...
@@ -1322,7 +1321,8 @@ public class YgglController {
.
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
// 更新当前企业
List
<
QyzxEmpEntAsso
>
listEEA
=
qyzxEmpEntAssoMapper
.
selectList
(
queryWrapper
);
List
<
QyzxEmpEntAsso
>
listEEA
=
qyzxEmpEntAssoMapper
.
selectList
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
empNum
));
if
(
listEEA
!=
null
&&
listEEA
.
size
()
>
0
)
{
QyzxEmpLogin
.
builder
().
id
(
empNum
).
orgId
(
CollUtil
.
getFirst
(
listEEA
).
getOrgCode
()).
build
().
updateById
();
}
...
...
src/main/java/cn/timer/api/utils/DateUtil.java
View file @
3ec8cf4f
...
...
@@ -99,6 +99,35 @@ public class DateUtil {
return
0
;
}
/**
* 将String时间转换为时间戳
*
* @param time
* @return
* @throws ParseException
*/
public
static
Date
getFormatDate
(
String
time
)
throws
ParseException
{
if
(
StrUtil
.
isNotBlank
(
time
))
{
switch
(
time
.
length
())
{
case
10
:
return
getStringDate
(
time
,
"yyyy-MM-dd"
);
case
16
:
return
getStringDate
(
time
,
"yyyy-MM-dd HH:mm"
);
case
19
:
return
getStringDate
(
time
,
"yyyy-MM-dd HH:mm:ss"
);
default
:
break
;
}
return
null
;
}
return
null
;
}
/**
* 将String时间转换为时间戳
...
...
@@ -107,6 +136,19 @@ public class DateUtil {
* @return
* @throws ParseException
*/
public
static
Date
getStringDate
(
String
time
,
String
format
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
format
);
return
simpleDateFormat
.
parse
(
time
);
}
/**
* 将String时间转换为 Date
*
* @param time
* @return
* @throws ParseException
*/
public
static
long
getStringTime
(
String
time
,
String
format
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
format
);
...
...
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
View file @
3ec8cf4f
...
...
@@ -50,8 +50,8 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.
orgcode
(
orgCode
)
.
evectionid
(
Convert
.
toInt
(
approveId
))
.
evectiontype
(
2
)
.
starttime
(
DateUtil
.
get
StringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
get
StringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
starttime
(
DateUtil
.
get
Format
(
startTime
))
.
endtime
(
DateUtil
.
get
Format
(
endTime
))
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
...
...
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
View file @
3ec8cf4f
...
...
@@ -15,6 +15,7 @@ import cn.timer.api.controller.yggl.service.YgglService;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.utils.DateFormatUtils
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
...
...
@@ -60,8 +61,8 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
YgzzDto
ygzzDto
=
YgzzDto
.
builder
()
.
empNum
(
id
)
.
orgCode
(
orgCode
)
.
zzTime
(
Date
FormatUtils
.
getDateByString
(
confirmationTime
))
.
sjzzTime
(
Date
FormatUtils
.
getDateByString
(
newConfirmationTime
))
.
zzTime
(
Date
Util
.
getFormatDate
(
confirmationTime
))
.
sjzzTime
(
Date
Util
.
getFormatDate
(
newConfirmationTime
))
.
zzRemark
(
Remarks
)
.
build
();
System
.
out
.
println
(
"转正:"
+
ygzzDto
);
...
...
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
View file @
3ec8cf4f
...
...
@@ -6,13 +6,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.controller.yggl.service.YgglService
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.utils.DateFormatUtils
;
import
cn.timer.api.utils.DateUtil
;
import
lombok.Builder
;
/**
...
...
@@ -46,7 +46,7 @@ public class ResignationBusiness extends SpmkAssoBusiness {
LzygQueryDto
dtO
=
LzygQueryDto
.
builder
()
.
orgCode
(
orgCode
)
.
empNum
(
id
)
.
lzTime
(
Date
FormatUtils
.
getDateByString
(
terminationDate
))
.
lzTime
(
Date
Util
.
getFormatDate
(
terminationDate
))
.
lzyy
(
ReasonForResignation
)
.
lzbz
(
Remarks
)
.
build
();
...
...
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