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
ab9548b3
Commit
ab9548b3
authored
Jul 02, 2020
by
yuquan.zhu
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
试用期计算
parent
f5172620
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+14
-10
No files found.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
ab9548b3
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
package
cn
.
timer
.
api
.
controller
.
yggl
;
package
cn
.
timer
.
api
.
controller
.
yggl
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -44,6 +45,7 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -44,6 +45,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.BetweenFormater.Level
;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.Tree
;
...
@@ -60,6 +62,7 @@ import cn.hutool.poi.excel.ExcelWriter;
...
@@ -60,6 +62,7 @@ import cn.hutool.poi.excel.ExcelWriter;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.SysRegion
;
import
cn.timer.api.bean.clazz.SysRegion
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
...
@@ -289,25 +292,19 @@ public class YgglController {
...
@@ -289,25 +292,19 @@ public class YgglController {
.
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
bmgwId
(
bmgwId
).
build
();
.
empNum
(
login
.
getId
()).
orgCode
(
orgCode
).
bmgwId
(
bmgwId
).
build
();
ygglMainEmp
.
insert
();
ygglMainEmp
.
insert
();
//假期规则初始化
//假期规则初始化
String
current_time
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
new
Date
());
List
<
KqglAssoLeaveRules
>
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
orgCode
));
List
<
KqglAssoLeaveRules
>
rul
=
KqglAssoLeaveRules
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoLeaveRules
>().
lambda
().
eq
(
KqglAssoLeaveRules:
:
getOrgCode
,
orgCode
));
for
(
KqglAssoLeaveRules
r
:
rul
)
{
for
(
KqglAssoLeaveRules
r
:
rul
)
{
if
(
r
.
getLeaveBalance
()
==
0
)
{
if
(
r
.
getLeaveBalance
()
==
0
)
{
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
r
.
getId
()).
userid
(
ygglMainEmp
.
getEmpNum
()).
modifyAction
(
2
).
balanceDays
(
"-1"
)
KqglAssoLeaveEmployeeBalance
.
builder
().
leaveRulesId
(
r
.
getId
()).
userid
(
ygglMainEmp
.
getEmpNum
()).
balanceDays
(-
1
).
modifyUserid
(
userBean
.
getEmpNum
()).
modifyTimer
(
current_time
).
orgCode
(
userBean
.
getOrgCode
()).
build
().
insert
();
.
reason
(
"不限制余额"
).
modifyUserid
(
ygglMainEmp
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
userBean
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
1
).
build
().
insert
();
//员工假期余额
}
else
{
}
else
{
KqglAssoLeaveBalance
.
builder
().
leaveRulesId
(
r
.
getId
()).
userid
(
ygglMainEmp
.
getEmpNum
()).
modifyAction
(
1
).
balanceDays
(
"+0"
)
KqglAssoLeaveEmployeeBalance
.
builder
().
leaveRulesId
(
r
.
getId
()).
userid
(
ygglMainEmp
.
getEmpNum
()).
balanceDays
(
0.0
).
modifyUserid
(
userBean
.
getEmpNum
()).
modifyTimer
(
current_time
).
orgCode
(
userBean
.
getOrgCode
()).
build
().
insert
();
.
reason
(
"系统按照规则自动"
).
modifyUserid
(
ygglMainEmp
.
getEmpNum
()).
modifyTimer
(
new
Date
().
getTime
()).
orgCode
(
userBean
.
getOrgCode
()).
isAutomatic
(
1
).
modifyNumber
(
1
).
build
().
insert
();
//员工假期余额
}
}
}
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工成功!"
);
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工成功!"
);
}
else
{
}
else
{
return
ResultUtil
.
error
(
"该手机号已被使用,请输入正确手机号"
);
return
ResultUtil
.
error
(
"该手机号已被使用,请输入正确手机号"
);
...
@@ -1724,7 +1721,14 @@ public class YgglController {
...
@@ -1724,7 +1721,14 @@ public class YgglController {
loginInfo
.
setGwId
(
gw
);
loginInfo
.
setGwId
(
gw
);
loginInfo
.
setGwName
(
gwObj
!=
null
?
gwObj
.
getName
()
:
""
);
loginInfo
.
setGwName
(
gwObj
!=
null
?
gwObj
.
getName
()
:
""
);
loginInfo
.
setEntryTime
(
ygglMainEmp
.
getRzTime
());
loginInfo
.
setEntryTime
(
ygglMainEmp
.
getRzTime
());
loginInfo
.
setRegularTime
(
ygglMainEmp
.
getRzTime
());
if
(
ygglMainEmp
.
getSyq
()!=
null
)
{
Date
expireDate
=
DateUtil
.
offsetMonth
(
ygglMainEmp
.
getRzTime
(),
ygglMainEmp
.
getSyq
());
// 时间偏移
loginInfo
.
setRegularTime
(
expireDate
);
}
else
{
loginInfo
.
setRegularTime
(
new
Date
());
}
}
}
return
ResultUtil
.
data
(
loginInfo
);
return
ResultUtil
.
data
(
loginInfo
);
}
}
...
...
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