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
2fe03523
Commit
2fe03523
authored
Jul 20, 2020
by
lal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
1fa0b5be
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
4 deletions
+85
-4
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+42
-4
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
+0
-0
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+10
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoLeaveBalanceMapper.java
+4
-0
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
+29
-0
No files found.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
2fe03523
...
...
@@ -9,9 +9,6 @@ import java.util.Date;
import
java.util.List
;
import
java.util.Map
;
import
javax.management.Query
;
import
org.codehaus.jettison.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
...
...
@@ -72,6 +69,7 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.controller.kqgl.atttimer.RealTimeUpdate
;
import
cn.timer.api.dao.kqgl.PunchRecordMapper
;
import
cn.timer.api.dao.kqgl.UserAttendanceRelMapper
;
import
cn.timer.api.dao.kqgl.UserEquiRelationMapper
;
...
...
@@ -95,6 +93,7 @@ import cn.timer.api.dao.kqmk.KqglAssoYhkqzMapper;
import
cn.timer.api.dao.kqmk.KqglAssoYhsbMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoZhoupaibanMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dto.kqmk.AdditionalDto
;
import
cn.timer.api.dto.kqmk.AttLateLate
;
import
cn.timer.api.dto.kqmk.AttMemberSettings
;
import
cn.timer.api.dto.kqmk.AttSchedule
;
...
...
@@ -137,6 +136,7 @@ import cn.timer.api.utils.ResponseResult;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
=
"3.0[1]考勤模块"
)
...
...
@@ -1222,6 +1222,8 @@ public class TimeCardController {
}
List
<
AdditionalDto
>
userlist
=
kqglassoleavebalancemapper
.
RealTimeUpdate
(
userBean
.
getOrgCode
(),
id
);
if
(
KqglMainKqz
.
builder
().
id
(
id
).
build
().
deleteById
())
{
userequirelationmapper
.
deleteBykqzid
(
id
);
...
...
@@ -1243,6 +1245,12 @@ public class TimeCardController {
//刪除假期规则-适用范围
KqglAssoRulesVice
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoRulesVice
>().
lambda
().
eq
(
KqglAssoRulesVice:
:
getAttgroupId
,
id
));
try
{
realtimeupdate
.
AttendanceTask
(
userBean
.
getOrgCode
(),
0
,
3
,
userlist
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
ResultUtil
.
data
(
id
,
"删除成功"
);
}
return
ResultUtil
.
error
(
"删除失败"
);
...
...
@@ -1258,6 +1266,9 @@ public class TimeCardController {
private
KqglAssoTeshuMapper
kqglassoteshumapper
;
@Autowired
private
KqglAssoPbmxMapper
kqglassopbmxmapper
;
@Autowired
private
RealTimeUpdate
realtimeupdate
;
/**
* 新建考勤组
*/
...
...
@@ -1417,6 +1428,13 @@ public class TimeCardController {
kqglassopbmxmapper
.
insertKqglAssoPbmxList
(
schlist
);
}
try
{
realtimeupdate
.
AttendanceTask
(
userBean
.
getOrgCode
(),
attid
,
1
,
null
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
ResultUtil
.
data
(
attgro
,
"操作成功!"
);
}
...
...
@@ -1448,11 +1466,27 @@ public class TimeCardController {
return
ResultUtil
.
data
(
usatt
);
}
@SuppressWarnings
(
"all"
)
//
@SuppressWarnings("all")
@PostMapping
(
value
=
"/setmembers"
)
@ApiOperation
(
value
=
"考勤设置成员"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
Attsetmembers
(
@CurrentUser
UserBean
userBean
,
@RequestBody
AttMemberSettings
attsetuser
)
{
List
<
KqglAssoKqzdkfs
>
qtdkfs
=
kqglassokqzdkfsmapper
.
selectList
(
new
QueryWrapper
<
KqglAssoKqzdkfs
>().
lambda
().
ne
(
KqglAssoKqzdkfs:
:
getType
,
1
).
eq
(
KqglAssoKqzdkfs:
:
getKqzId
,
attsetuser
.
getAttgroupid
()));
if
(
qtdkfs
.
size
()
>
0
)
{
//考勤组新增员工
String
[]
addmember
=
attsetuser
.
getAddMember
();
for
(
int
a
=
0
;
a
<
addmember
.
length
;
a
++){
KqglAssoYhkqz
.
builder
().
kqzid
(
attsetuser
.
getAttgroupid
()).
userid
(
Integer
.
valueOf
(
addmember
[
a
])).
qyid
(
userBean
.
getOrgCode
()).
build
().
insert
();
}
//考勤组减少员工
String
[]
removemember
=
attsetuser
.
getRemoveMember
();
for
(
int
r
=
0
;
r
<
removemember
.
length
;
r
++){
//用户和考勤组关系表
KqglAssoYhkqz
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhkqz
>().
lambda
().
eq
(
KqglAssoYhkqz:
:
getKqzid
,
attsetuser
.
getAttgroupid
()).
eq
(
KqglAssoYhkqz:
:
getUserid
,
removemember
[
r
]));
}
}
//确认当前考勤组是否存在考勤机打卡
List
<
KqglAssoKqzdkfs
>
dkfs
=
kqglassokqzdkfsmapper
.
selectList
(
new
QueryWrapper
<
KqglAssoKqzdkfs
>().
lambda
().
eq
(
KqglAssoKqzdkfs:
:
getType
,
1
).
eq
(
KqglAssoKqzdkfs:
:
getKqzId
,
attsetuser
.
getAttgroupid
()));
if
(
dkfs
.
size
()
>
0
)
{
...
...
@@ -1460,8 +1494,12 @@ public class TimeCardController {
String
DevId
=
null
;
int
kqjid
=
0
;
KqglAssoKqj
kqj
=
KqglAssoKqj
.
builder
().
id
(
fss
.
getDkfsid
()).
build
().
selectById
();
//查询考勤机“序列号”
if
(
kqj
!=
null
)
{
DevId
=
kqj
.
getCode
();
kqjid
=
kqj
.
getId
();
}
else
{
return
ResultUtil
.
error
(
"考勤机不存在"
);
}
//考勤组新增员工
String
[]
addmember
=
attsetuser
.
getAddMember
();
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
0 → 100644
View file @
2fe03523
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
2fe03523
...
...
@@ -6,6 +6,7 @@
package
cn
.
timer
.
api
.
controller
.
yggl
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Collections
;
...
...
@@ -90,6 +91,7 @@ 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.kqgl.ClockInTool
;
import
cn.timer.api.controller.kqgl.atttimer.RealTimeUpdate
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.clazz.CommonAreaMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
...
...
@@ -222,6 +224,9 @@ public class YgglController {
return
ResultUtil
.
data
(
bmgw
);
}
@Autowired
private
RealTimeUpdate
realtimeupdate
;
/**
* 添加员工档案
*
...
...
@@ -320,6 +325,11 @@ public class YgglController {
}
try
{
realtimeupdate
.
AttendanceTask
(
userBean
.
getOrgCode
(),
ygglMainEmp
.
getEmpNum
(),
2
,
null
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
ResultUtil
.
data
(
ygglMainEmp
,
"添加员工成功!"
);
}
else
{
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoLeaveBalanceMapper.java
View file @
2fe03523
...
...
@@ -31,4 +31,8 @@ public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBala
// JiaqibalanceDto selectleavebalanceList(int leaverulesid,int userid);
Double
Sumbalancedays
(
int
userid
,
int
orgcode
,
int
leaverulesid
);
List
<
AdditionalDto
>
RealTimeUpdate
(
int
orgcode
,
int
kqzid
);
List
<
AdditionalDto
>
selectAdditionalByempnum
(
int
orgcode
,
int
empnum
);
}
src/main/resources/mapping/kqmk/KqglAssoLeaveBalanceMapper.xml
View file @
2fe03523
...
...
@@ -136,6 +136,35 @@
and emp.job_status != 3
</select>
<select
id=
"RealTimeUpdate"
resultMap=
"AdditionalMap"
>
SELECT emp.emp_num as empnum,
emp.`name` as empname,
emp.phone,
IFNULL(c.name,null) as department,
IFNULL(gw.`name`,null) as position
from yggl_main_emp emp
LEFT JOIN kqgl_asso_yhkqz as yhkqz on yhkqz.userid = emp.emp_num
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{orgcode}
and yhkqz.kqzid = #{kqzid}
and emp.job_status != 3;
</select>
<select
id=
"selectAdditionalByempnum"
resultMap=
"AdditionalMap"
>
SELECT emp.emp_num as empnum,
emp.`name` as empname,
emp.phone,
IFNULL(c.name,null) as department,
IFNULL(gw.`name`,null) as position
from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{orgcode}
and emp.job_status != 3
and emp.emp_num = #{empnum}
</select>
<!-- <select id="selectleavebalanceList" resultMap="JiaqibalanceMap">
select bal.userid,SUM(bal.balance_days) as balancedays
...
...
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