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
a23a0388
Commit
a23a0388
authored
May 14, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
e702a93d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
3 deletions
+100
-3
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+0
-0
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+100
-3
No files found.
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
a23a0388
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
a23a0388
...
...
@@ -7,6 +7,7 @@ import java.util.ArrayList;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpEntity
;
...
...
@@ -40,6 +41,7 @@ import cn.timer.api.bean.kqgl.AttendanceMachine;
import
cn.timer.api.bean.kqgl.PunchCardDetails
;
import
cn.timer.api.bean.kqgl.PunchRecord
;
import
cn.timer.api.bean.kqgl.UserAttendanceRel
;
import
cn.timer.api.bean.kqgl.UserEquiRelation
;
import
cn.timer.api.bean.kqmk.KqglAssOvertimeVice
;
import
cn.timer.api.bean.kqmk.KqglAssoBcsz
;
import
cn.timer.api.bean.kqmk.KqglAssoDkdz
;
...
...
@@ -86,6 +88,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.kqgl.AttemacDto
;
import
cn.timer.api.dto.kqmk.AttSchedulingDto
;
import
cn.timer.api.dto.kqmk.AttendanceAssistantDto
;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
...
...
@@ -467,7 +470,6 @@ public class TimeCardController {
@GetMapping
(
value
=
"/synchrotime/{code}"
)
@ApiOperation
(
value
=
"考勤机一键同步"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
54
)
public
Result
<
Object
>
SynchronizationTime
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"code"
)
String
code
)
{
JSONObject
vResultJson
=
new
JSONObject
();
...
...
@@ -490,6 +492,80 @@ public class TimeCardController {
}
/**
* 移除考勤机管理员
*/
@PostMapping
(
value
=
"/removeadministrator/{kqjid}/{id}"
)
@ApiOperation
(
value
=
"移除考勤机管理员"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
RemoveAdministrator
(
@PathVariable
int
kqjid
,
@PathVariable
int
id
,
@RequestBody
Map
<
String
,
String
>
mmd
)
{
String
[]
xgyh
=
mmd
.
get
(
"a"
).
split
(
","
);
if
(
xgyh
.
length
>
0
){
KqglAssoKqj
kqj
=
KqglAssoKqj
.
builder
().
id
(
kqjid
).
build
().
selectById
();
//查询考勤机“序列号”
for
(
int
a
=
0
;
a
<
xgyh
.
length
;
a
++){
JSONObject
vResultJson
=
new
JSONObject
();
vResultJson
.
put
(
"devId"
,
kqj
.
getCode
());
vResultJson
.
put
(
"userId"
,
xgyh
[
a
]);
vResultJson
.
put
(
"privilege"
,
1
);
String
sFinal
=
vResultJson
.
toString
();
String
url
=
StaticVariable
.
mac_command
+
"/addUserPrivilege"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"json"
,
sFinal
);
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错"
);
return
ResultUtil
.
success
(
"失败"
);
}
KqglAssoYhsb
.
builder
().
id
(
id
).
isGly
(
0
).
build
().
updateById
();
}
}
return
ResultUtil
.
success
(
"成功"
);
}
@PostMapping
(
value
=
"/modifyauthority/{kqjid}/{id}"
)
@ApiOperation
(
value
=
"添加考勤机管理员"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
ModifyAuthority
(
@CurrentUser
UserBean
userBean
,
@PathVariable
int
kqjid
,
@PathVariable
int
id
,
@RequestBody
Map
<
String
,
String
>
mmd
)
{
String
[]
xgyh
=
mmd
.
get
(
"a"
).
split
(
","
);
if
(
xgyh
.
length
>
0
){
KqglAssoKqj
kqj
=
KqglAssoKqj
.
builder
().
id
(
kqjid
).
build
().
selectById
();
//查询考勤机“序列号”
for
(
int
a
=
0
;
a
<
xgyh
.
length
;
a
++){
JSONObject
vResultJson
=
new
JSONObject
();
vResultJson
.
put
(
"devId"
,
kqj
.
getCode
());
vResultJson
.
put
(
"userId"
,
xgyh
[
a
]);
vResultJson
.
put
(
"privilege"
,
2
);
String
sFinal
=
vResultJson
.
toString
();
String
url
=
StaticVariable
.
mac_command
+
"/addUserPrivilege"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"json"
,
sFinal
);
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错"
);
return
ResultUtil
.
success
(
"失败"
);
}
UserEquiRelation
kqjry
=
new
UserEquiRelation
();
kqjry
.
setId
(
id
);
kqjry
.
setIsGly
(
1
);
userequirelationmapper
.
updateByPrimaryKeySelective
(
kqjry
);
}
}
return
ResultUtil
.
success
(
"成功"
);
}
/**
* 新增考勤机
*/
@PostMapping
(
value
=
"/Attendance_machine"
)
...
...
@@ -499,7 +575,29 @@ public class TimeCardController {
kqglassokqj
.
setLuryid
(
userBean
.
getEmpNum
());
kqglassokqj
.
setLusjTime
(
new
Date
().
getTime
());
kqglassokqj
.
setQyid
(
userBean
.
getOrgCode
());
return
kqglassokqj
.
insert
()
?
ResultUtil
.
success
(
"操作成功!"
)
:
ResultUtil
.
error
(
"操作失败!"
);
if
(!
kqglassokqj
.
insert
())
return
ResultUtil
.
error
(
"操作失败--新增考勤机"
);
JSONObject
vResultJson
=
new
JSONObject
();
vResultJson
.
put
(
"devId"
,
kqglassokqj
.
getCode
());
vResultJson
.
put
(
"orgCode"
,
userBean
.
getOrgCode
());
String
sFinal
=
vResultJson
.
toString
();
String
url
=
StaticVariable
.
mac_command
+
"/addDev"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"json"
,
sFinal
);
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错"
);
return
ResultUtil
.
success
(
"失败"
);
}
return
ResultUtil
.
success
(
"操作成功!"
);
}
/**
...
...
@@ -1754,7 +1852,6 @@ public class TimeCardController {
return
ResultUtil
.
data
(
pageAs
,
listAs
,
"操作成功!"
);
}
/**************************/
/**
* 查询列表-加班补偿方式
...
...
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