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
6a1a7008
Commit
6a1a7008
authored
Jun 02, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
导入人员时生成一个员工登录表数据
parent
91d0e935
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+22
-1
No files found.
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
6a1a7008
...
...
@@ -2,10 +2,12 @@ package cn.timer.api.controller.insure;
import
cn.timer.api.bean.insure.*
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
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.enums.CommonEnum
;
import
cn.timer.api.config.enums.Regular
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.controller.insure.enums.PlanEnum
;
...
...
@@ -113,6 +115,8 @@ public class InsureContorll {
@Value
(
"${insure.cancelPayment}"
)
private
String
cancelPayment
;
@Value
(
value
=
"${config-8timer.init-password}"
)
private
String
pwd
;
private
static
SimpleDateFormat
dtf3
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -546,8 +550,11 @@ public class InsureContorll {
YgglMainEmp
y
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getName
,
insureDto
.
getUserName
()).
eq
(
YgglMainEmp:
:
getZjNum
,
insureDto
.
getIdCardNo
()));
if
(
y
==
null
)
{
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
String
.
valueOf
(
System
.
currentTimeMillis
())).
pw
(
Md5
.
md5
(
pwd
)).
regTime
(
new
Date
()).
orgId
(
Integer
.
parseInt
(
insureDto
.
getOrgCode
())).
username
(
insureDto
.
getUserName
()).
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
build
();
qyzxEmpLogin
.
insert
();
y
=
new
YgglMainEmp
();
y
.
setName
(
insureDto
.
getUserName
());
y
.
setEmpNum
(
qyzxEmpLogin
.
getId
());
y
.
setZjType
(
0
);
y
.
setZjNum
(
insureDto
.
getIdCardNo
());
y
.
setOrgCode
(
Integer
.
parseInt
(
insureDto
.
getOrgCode
()));
...
...
@@ -851,7 +858,12 @@ public class InsureContorll {
List
<
String
>
idNumList
=
userList
.
stream
().
map
(
YgglMainEmp:
:
getZjNum
).
collect
(
Collectors
.
toList
());
List
<
YgglMainEmp
>
newList
=
yg
.
stream
().
filter
(
v
->
!
idNumList
.
contains
(
v
.
getZjNum
())).
collect
(
Collectors
.
toList
());
if
(
newList
.
size
()
>
0
)
{
newList
.
forEach
(
u
->
u
.
insert
());
newList
.
forEach
(
u
->{
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
String
.
valueOf
(
System
.
currentTimeMillis
())).
pw
(
Md5
.
md5
(
pwd
)).
regTime
(
new
Date
()).
orgId
(
company
.
getId
()).
username
(
u
.
getName
()).
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
build
();
qyzxEmpLogin
.
insert
();
u
.
setEmpNum
(
qyzxEmpLogin
.
getId
());
u
.
insert
();
});
}
allList
=
ygglMainEmpMapper
.
selectListByIZjNum
(
yg
.
stream
().
map
(
YgglMainEmp:
:
getZjNum
).
toArray
(
String
[]::
new
),
company
.
getId
());
selectUserList
=
allList
.
stream
().
filter
(
s
->
s
.
getIsInsure
()
==
0
).
collect
(
Collectors
.
toList
());
...
...
@@ -1109,6 +1121,9 @@ public class InsureContorll {
if
(!
dataMap
.
get
(
"product_code"
).
equals
(
insureProduct
.
getProductCodeId
()))
{
return
ResultUtil
.
error
(
"导入的保单产品和选择的保单产品不一致"
);
}
if
(!
dataMap
.
get
(
"corporate_applicant_name"
).
equals
(
company
.
getName
())){
return
ResultUtil
.
error
(
"导入的保单投保人和企业投保人不一样"
);
}
policy
.
setProductId
(
insureProduct
.
getId
());
policy
.
setPolicyFile
(
dataMap
.
get
(
"policy_file"
).
toString
());
policy
.
setStatus
(
"1"
);
...
...
@@ -1144,8 +1159,11 @@ public class InsureContorll {
}
insureUser
.
setInsuredMobile
(
ygglMainEmp
.
getPhone
());
}
else
{
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
String
.
valueOf
(
System
.
currentTimeMillis
())).
pw
(
Md5
.
md5
(
pwd
)).
regTime
(
new
Date
()).
orgId
(
insureUser
.
getOrgCode
()).
username
(
insureUser
.
getInsuredEContact
()).
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
build
();
qyzxEmpLogin
.
insert
();
/*如果不存在员工就创建一名员工*/
ygglMainEmp
=
new
YgglMainEmp
();
ygglMainEmp
.
setEmpNum
(
qyzxEmpLogin
.
getId
());
ygglMainEmp
.
setName
(
insureUser
.
getInsuredEContact
());
ygglMainEmp
.
setZjType
(
0
);
ygglMainEmp
.
setZjNum
(
insureUser
.
getInsuredNo
());
...
...
@@ -1255,7 +1273,10 @@ public class InsureContorll {
y
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getZjNum
,
iu
.
getInsuredNo
())
.
eq
(
YgglMainEmp:
:
getName
,
iu
.
getInsuredEContact
()).
eq
(
YgglMainEmp:
:
getOrgCode
,
qyzxEntInfoM
.
getId
()));
if
(
y
==
null
)
{
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
pw
(
Md5
.
md5
(
pwd
)).
phone
(
String
.
valueOf
(
System
.
currentTimeMillis
())).
regTime
(
new
Date
()).
orgId
(
qyzxEntInfoM
.
getId
()).
username
(
iu
.
getInsuredEContact
()).
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
build
();
qyzxEmpLogin
.
insert
();
y
=
new
YgglMainEmp
();
y
.
setEmpNum
(
qyzxEmpLogin
.
getId
());
y
.
setName
(
iu
.
getInsuredEContact
());
y
.
setZjType
(
0
);
y
.
setZjNum
(
iu
.
getInsuredNo
());
...
...
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