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
80a0231c
Commit
80a0231c
authored
4 years ago
by
leialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lal' into 'develop'
提交 See merge request 8timerv2/8timerapiv200!349
parents
d157afb3
37108dd0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
33 deletions
+30
-33
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+13
-15
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+13
-14
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+4
-4
No files found.
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
80a0231c
...
@@ -1428,6 +1428,19 @@ public class AttController {
...
@@ -1428,6 +1428,19 @@ public class AttController {
for
(
AttGroupBinPunchMode
abp:
kqjs
)
{
for
(
AttGroupBinPunchMode
abp:
kqjs
)
{
AttendanceMachine
kqj
=
attendancemachineservice
.
selectByPrimaryKey
(
abp
.
getDkfsid
());
//查询考勤机“序列号”
AttendanceMachine
kqj
=
attendancemachineservice
.
selectByPrimaryKey
(
abp
.
getDkfsid
());
//查询考勤机“序列号”
YgglMainEmp
yggluser
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainEmp:
:
getEmpNum
,
attser
[
u
]));
String
url
=
mac_command
+
"/addUserName"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"devId"
,
kqj
.
getCode
());
params
.
add
(
"userId"
,
attser
[
u
]);
params
.
add
(
"userName"
,
yggluser
.
getName
());
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
print
(
request
.
getBody
());
UserEquiRelation
kqjry
=
userequirelationmapper
.
selectByuserIdkqjid
(
Integer
.
valueOf
(
attser
[
u
]),
kqj
.
getId
());
UserEquiRelation
kqjry
=
userequirelationmapper
.
selectByuserIdkqjid
(
Integer
.
valueOf
(
attser
[
u
]),
kqj
.
getId
());
if
(
kqjry
==
null
)
{
if
(
kqjry
==
null
)
{
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
attser
[
u
]).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
attser
[
u
]).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
...
@@ -1444,21 +1457,6 @@ public class AttController {
...
@@ -1444,21 +1457,6 @@ public class AttController {
}
}
userequirelationmapper
.
insert
(
uskqj
);
userequirelationmapper
.
insert
(
uskqj
);
}
}
YgglMainEmp
yggluser
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainEmp:
:
getEmpNum
,
attser
[
u
]));
String
url
=
mac_command
+
"/addUserName"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"devId"
,
kqj
.
getCode
());
params
.
add
(
"userId"
,
attser
[
u
]);
params
.
add
(
"userName"
,
yggluser
.
getName
());
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
print
(
request
.
getBody
());
}
}
/*****************************************************************************/
/*****************************************************************************/
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
80a0231c
...
@@ -1342,21 +1342,7 @@ public class TimeCardController {
...
@@ -1342,21 +1342,7 @@ public class TimeCardController {
KqglAssoYhsb
kqjry
=
KqglAssoYhsb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
Integer
.
valueOf
(
attser
[
u
])).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
KqglAssoYhsb
kqjry
=
KqglAssoYhsb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
Integer
.
valueOf
(
attser
[
u
])).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
if
(
kqjry
==
null
)
{
if
(
kqjry
==
null
)
{
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
attser
[
u
]).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
KqglAssoYhsb
uskqj
=
KqglAssoYhsb
.
builder
().
userId
(
Integer
.
valueOf
(
attser
[
u
])).
kqjid
(
kqj
.
getId
()).
type
(
1
).
build
();
UserEquiRelation
isgly
=
userequirelationmapper
.
selectByuserId
(
Integer
.
valueOf
(
attser
[
u
]));
if
(
isgly
!=
null
)
{
uskqj
.
setIsGly
(
isgly
.
getIsGly
());
}
else
{
uskqj
.
setIsGly
(
0
);
}
if
(!
uskqj
.
insert
())
return
ResultUtil
.
error
(
"操作失败--新增用户与设备关系"
);
YgglMainEmp
yggluser
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainEmp:
:
getEmpNum
,
attser
[
u
]));
YgglMainEmp
yggluser
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
YgglMainEmp:
:
getEmpNum
,
attser
[
u
]));
String
url
=
mac_command
+
"/addUserName"
;
String
url
=
mac_command
+
"/addUserName"
;
HttpHeaders
headers
=
new
HttpHeaders
();
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
...
@@ -1367,6 +1353,19 @@ public class TimeCardController {
...
@@ -1367,6 +1353,19 @@ public class TimeCardController {
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
print
(
request
.
getBody
());
System
.
err
.
print
(
request
.
getBody
());
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
attser
[
u
]).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
KqglAssoYhsb
uskqj
=
KqglAssoYhsb
.
builder
().
userId
(
Integer
.
valueOf
(
attser
[
u
])).
kqjid
(
kqj
.
getId
()).
type
(
1
).
build
();
UserEquiRelation
isgly
=
userequirelationmapper
.
selectByuserId
(
Integer
.
valueOf
(
attser
[
u
]));
if
(
isgly
!=
null
)
{
uskqj
.
setIsGly
(
isgly
.
getIsGly
());
}
else
{
uskqj
.
setIsGly
(
0
);
}
if
(!
uskqj
.
insert
())
return
ResultUtil
.
error
(
"操作失败--新增用户与设备关系"
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
80a0231c
...
@@ -268,9 +268,9 @@ public class YgglController {
...
@@ -268,9 +268,9 @@ public class YgglController {
default
:
default
:
break
;
break
;
}
}
if
(!
isvalid
)
{
//
if (!isvalid) {
return
ResultUtil
.
error
(
"证件格式不对!"
);
//
return ResultUtil.error("证件格式不对!");
}
//
}
Integer
jobType
=
addygdaDto
.
getJobType
();
Integer
jobType
=
addygdaDto
.
getJobType
();
Date
rzTime
=
addygdaDto
.
getRzTime
()
==
null
?
new
Date
()
:
addygdaDto
.
getRzTime
();
Date
rzTime
=
addygdaDto
.
getRzTime
()
==
null
?
new
Date
()
:
addygdaDto
.
getRzTime
();
...
@@ -1846,7 +1846,7 @@ public class YgglController {
...
@@ -1846,7 +1846,7 @@ public class YgglController {
@ApiOperationSupport
(
order
=
71
)
@ApiOperationSupport
(
order
=
71
)
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
public
Result
<
List
<
YgglMainEmp
>>
headphotos
(
@CurrentUser
UserBean
userBean
,
@RequestBody
List
<
Integer
>
empNumList
)
{
if
(
empNumList
==
null
||
empNumList
.
size
()
==
0
)
{
if
(
empNumList
==
null
||
empNumList
.
size
()
==
0
)
{
return
ResultUtil
.
error
(
"
请输入empNum数组
"
);
return
ResultUtil
.
error
(
"
存在未设置的审批人
"
);
}
}
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
()
List
<
YgglMainEmp
>
yglList
=
YgglMainEmp
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
selectList
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
())
...
...
This diff is collapsed.
Click to expand it.
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