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
79334da6
Commit
79334da6
authored
Apr 29, 2020
by
dengshichuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dsc' into 'develop'
Dsc See merge request 8timerv2/8timerapiv200!63
parents
1b81adf0
80c6c0fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
23 deletions
+18
-23
src/main/java/cn/timer/api/controller/LoginController.java
+18
-23
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
79334da6
...
@@ -496,8 +496,8 @@ public class LoginController {
...
@@ -496,8 +496,8 @@ public class LoginController {
return
ResultUtil
.
error
(
"注册企业失败2"
);
return
ResultUtil
.
error
(
"注册企业失败2"
);
}
}
}
}
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
())
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
())
.
rzTime
(
new
Date
())
.
name
(
username
).
build
().
insert
();
.
name
(
username
).
build
().
insert
();
if
(!
b4
)
{
if
(!
b4
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
@@ -505,8 +505,8 @@ public class LoginController {
...
@@ -505,8 +505,8 @@ public class LoginController {
}
}
// 员工企业关联表
// 员工企业关联表
QyzxEmpEntAsso
qyzxEmpEntAsso
=
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
qyzxEntInfoM
.
getId
())
.
status
(
1
)
QyzxEmpEntAsso
qyzxEmpEntAsso
=
QyzxEmpEntAsso
.
builder
().
empNum
(
login
.
getId
()).
orgCode
(
qyzxEntInfoM
.
getId
())
.
userType
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
()).
build
();
.
status
(
1
).
userType
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
()).
build
();
boolean
b3
=
qyzxEmpEntAsso
.
insert
();
boolean
b3
=
qyzxEmpEntAsso
.
insert
();
if
(!
b3
)
{
if
(!
b3
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
@@ -559,31 +559,26 @@ public class LoginController {
...
@@ -559,31 +559,26 @@ public class LoginController {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
List
<
QysDto
>
qys
=
qyzxEmpLoginMapper
.
getQys
(
qyzxEmpLogin1
.
getId
()
List
<
QysDto
>
qys
=
qyzxEmpLoginMapper
.
getQys
(
qyzxEmpLogin1
.
getId
());
);
if
(
qys
.
size
()
==
0
)
if
(
qys
.
size
()
==
0
)
return
ResultUtil
.
error
(
"没有任何公司可以查看!"
);
return
ResultUtil
.
error
(
"没有任何公司可以查看!"
);
qyzxEmpLogin1
.
setQys
(
qys
);
qyzxEmpLogin1
.
setQys
(
qys
);
QysDto
ctrl
=
qys
.
get
(
0
);
QysDto
ctrl
=
qys
.
get
(
0
);
if
(
qyzxEmpLogin1
.
getOrgId
()
!=
null
)
{
if
(
qyzxEmpLogin1
.
getOrgId
()
!=
null
)
{
// for (QysDto qysDto : qys) {
for
(
QysDto
qysDto
:
qys
)
{
// if (qyzxEmpLogin1.getOrgId().equals(qysDto.getId()) && qysDto.getStatus() == 1) {
if
(
qyzxEmpLogin1
.
getOrgId
().
equals
(
qysDto
.
getId
())
&&
qysDto
.
getStatus
()
==
1
)
{
// ctrl = qysDto;
ctrl
=
qysDto
;
// }
}
// System.out.println(qyzxEmpLogin1.getOrgId());
// System.out.println(qysDto);
// }
Optional
<
QysDto
>
s
=
qys
.
parallelStream
()
.
filter
(
item
->
item
.
getStatus
()
==
1
&&
qyzxEmpLogin1
.
getOrgId
().
equals
(
item
.
getId
())).
findFirst
();
System
.
out
.
println
(
s
.
isPresent
());
if
(
s
!=
null
&&
s
.
isPresent
())
{
ctrl
=
s
.
get
();
}
}
// Stream<QysDto> s = qys.stream()
// .filter(item -> item.getStatus() == 1 && qyzxEmpLogin1.getOrgId().equals(item.getId()));
//
// if (s != null) {
// ctrl = s.findFirst().get();
// }
}
}
if
(
ctrl
.
getStatus
()
==
null
||
ctrl
.
getStatus
().
equals
(
0
))
{
if
(
ctrl
.
getStatus
()
==
null
||
ctrl
.
getStatus
().
equals
(
0
))
{
return
ResultUtil
.
error
(
"帐号被禁用"
);
return
ResultUtil
.
error
(
"帐号被禁用"
);
...
...
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