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
b2e8519f
Commit
b2e8519f
authored
Aug 30, 2023
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批假期时间显示
parent
ae2a67c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
3 deletions
+46
-3
src/main/java/cn/timer/api/controller/spmk/AdminSpmkController.java
+23
-2
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+23
-1
No files found.
src/main/java/cn/timer/api/controller/spmk/AdminSpmkController.java
View file @
b2e8519f
...
...
@@ -2,11 +2,14 @@ package cn.timer.api.controller.spmk;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.annotation.Role
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.jxgl.JxglAppraisalT
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.spmk.*
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
...
...
@@ -112,7 +115,7 @@ public class AdminSpmkController {
// 查询 SpmkApproveSummary 状态,
SpmkApproveSummary
aSummary
=
spmkApproveSummaryMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
()
.
select
(
SpmkApproveSummary:
:
getSts
)
.
select
(
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getAssoType
,
SpmkApproveSummary:
:
getEmpNum
,
SpmkApproveSummary:
:
getOrgCode
)
.
eq
(
SpmkApproveSummary:
:
getId
,
asId
));
// if (aSummary.getSts() > ApproveSummarySts.IN.ordinal()) {
...
...
@@ -129,7 +132,24 @@ public class AdminSpmkController {
// redisUtil.set(asId.toString(),0,500);
// return ResultUtil.error("您已审批过!");
// }
//判断是否是请假审批
if
(
aSummary
.
getAssoType
()==
ApproveEnum
.
LEAVE
.
getType
()){
if
(
approvingDto
.
getSts
()==
2
)
{
JSONObject
jSONObject
=
jsonObject
.
parseObject
(
ad
.
getRequestData
(),
JSONObject
.
class
);
// 请假类型 - 前端传中文
String
LeaveType
=
ObjectUtil
.
isNull
(
jSONObject
.
get
(
"__LeaveType"
,
FromData
.
class
))
?
null
:
jSONObject
.
get
(
"__LeaveType"
,
FromData
.
class
).
getValue
();
// 时长
String
longTime
=
ObjectUtil
.
isNull
(
jSONObject
.
get
(
"__longTime"
,
FromData
.
class
))
?
null
:
jSONObject
.
get
(
"__longTime"
,
FromData
.
class
).
getValue
();
//判断这个人假期是否足够
KqglAssoLeaveEmployeeBalance
emba
=
KqglAssoLeaveEmployeeBalance
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveEmployeeBalance
>().
lambda
().
eq
(
KqglAssoLeaveEmployeeBalance:
:
getLeaveRulesId
,
Convert
.
toInt
(
LeaveType
))
.
eq
(
KqglAssoLeaveEmployeeBalance:
:
getUserid
,
aSummary
.
getEmpNum
()).
eq
(
KqglAssoLeaveEmployeeBalance:
:
getOrgCode
,
aSummary
.
getOrgCode
()));
if
(
emba
!=
null
)
{
if
(
emba
.
getBalanceDays
()!=-
1
&&
emba
.
getBalanceDays
()
<
Convert
.
toInt
(
longTime
))
{
return
ResultUtil
.
error
(
"当前发起人假期余额不足"
);
}
}
}
}
if
(
spmkExecutorMapper
.
selectCount
(
new
QueryWrapper
<
SpmkExecutor
>().
lambda
()
.
eq
(
SpmkExecutor:
:
getId
,
approvingDto
.
getExecutorId
())
.
eq
(
SpmkExecutor:
:
getEmpNum
,
userBean
.
getEmpNum
())
...
...
@@ -207,6 +227,7 @@ public class AdminSpmkController {
*/
if
(
fc
.
getExecute
()
==
"2"
)
{
// 查询 SpmkApproveSummary 状态
aSummary
=
spmkApproveSummaryMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
()
.
select
(
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getAssoType
)
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
b2e8519f
...
...
@@ -5,9 +5,11 @@ import java.io.Serializable;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.db.sql.SqlBuilder
;
import
cn.timer.api.bean.crm.CrmBusinessGroupMember
;
import
cn.timer.api.bean.crm.CrmClientContacts
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.sche.ScheduleTask
;
import
cn.timer.api.bean.spmk.*
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
...
...
@@ -833,7 +835,7 @@ public class SpmkController {
// 查询 SpmkApproveSummary 状态,
SpmkApproveSummary
aSummary
=
spmkApproveSummaryMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveSummary
>().
lambda
()
.
select
(
SpmkApproveSummary:
:
getSts
)
.
select
(
SpmkApproveSummary:
:
getSts
,
SpmkApproveSummary:
:
getAssoType
,
SpmkApproveSummary:
:
getEmpNum
,
SpmkApproveSummary:
:
getOrgCode
)
.
eq
(
SpmkApproveSummary:
:
getId
,
asId
));
if
(
aSummary
.
getSts
()
>
ApproveSummarySts
.
IN
.
ordinal
())
{
...
...
@@ -869,6 +871,26 @@ public class SpmkController {
}
//判断是否是请假审批
if
(
aSummary
.
getAssoType
()==
ApproveEnum
.
LEAVE
.
getType
()){
if
(
approvingDto
.
getSts
()==
2
)
{
JSONObject
jSONObject
=
jsonObject
.
parseObject
(
ad
.
getRequestData
(),
JSONObject
.
class
);
// 请假类型 - 前端传中文
String
LeaveType
=
ObjectUtil
.
isNull
(
jSONObject
.
get
(
"__LeaveType"
,
FromData
.
class
))
?
null
:
jSONObject
.
get
(
"__LeaveType"
,
FromData
.
class
).
getValue
();
// 时长
String
longTime
=
ObjectUtil
.
isNull
(
jSONObject
.
get
(
"__longTime"
,
FromData
.
class
))
?
null
:
jSONObject
.
get
(
"__longTime"
,
FromData
.
class
).
getValue
();
//判断这个人假期是否足够
KqglAssoLeaveEmployeeBalance
emba
=
KqglAssoLeaveEmployeeBalance
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoLeaveEmployeeBalance
>().
lambda
().
eq
(
KqglAssoLeaveEmployeeBalance:
:
getLeaveRulesId
,
Convert
.
toInt
(
LeaveType
))
.
eq
(
KqglAssoLeaveEmployeeBalance:
:
getUserid
,
aSummary
.
getEmpNum
()).
eq
(
KqglAssoLeaveEmployeeBalance:
:
getOrgCode
,
aSummary
.
getOrgCode
()));
if
(
emba
!=
null
)
{
if
(
emba
.
getBalanceDays
()!=-
1
&&
emba
.
getBalanceDays
()
<
Convert
.
toInt
(
longTime
))
{
return
ResultUtil
.
error
(
"当前发起人假期余额不足"
);
}
}
}
}
if
(
aSummary
.
getSts
()
==
0
)
{
List
<
FlowChildren
>
listFlowChildren
=
jsonObject
.
parseArray
(
ad
.
getFlowChildren
(),
FlowChildren
.
class
);
// 审批逻辑
...
...
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