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
8c92b3d6
Commit
8c92b3d6
authored
Jul 13, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
更改保全增员逻辑
parent
20d8cc3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
39 deletions
+43
-39
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+5
-3
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+37
-35
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
+1
-1
No files found.
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
8c92b3d6
...
@@ -126,9 +126,7 @@ public class CallBackContorll {
...
@@ -126,9 +126,7 @@ public class CallBackContorll {
log
.
info
(
"增员核保回调参数:- {}"
,
JSON
.
toJSONString
(
callBack
));
log
.
info
(
"增员核保回调参数:- {}"
,
JSON
.
toJSONString
(
callBack
));
if
(
callBack
.
getCallback_type
().
equals
(
"1"
))
{
if
(
callBack
.
getCallback_type
().
equals
(
"1"
))
{
List
<
InsureUser
>
insureUserList
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getTransId
,
callBack
.
getOrder_import_info
().
getThird_uuid
()));
List
<
InsureUser
>
insureUserList
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getTransId
,
callBack
.
getOrder_import_info
().
getThird_uuid
()));
if
(
insureUserList
.
size
()<=
0
){
insureUserList
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getBatchNo
,
callBack
.
getOrder_import_info
().
getUuid
()));
}
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
insureUserList
.
get
(
0
).
getPolicyId
()).
build
().
selectById
();
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
id
(
insureUserList
.
get
(
0
).
getPolicyId
()).
build
().
selectById
();
if
(
callBack
.
getStatus
().
equals
(
"1"
))
{
if
(
callBack
.
getStatus
().
equals
(
"1"
))
{
if
(
insureUserList
.
size
()
>
0
)
{
if
(
insureUserList
.
size
()
>
0
)
{
...
@@ -141,6 +139,10 @@ public class CallBackContorll {
...
@@ -141,6 +139,10 @@ public class CallBackContorll {
insurePolicy
.
updateById
();
insurePolicy
.
updateById
();
}
}
insureUserList
.
stream
().
forEach
(
v
->{
v
.
setBatchNo
(
callBack
.
getOrder_import_info
().
getUuid
());
v
.
updateById
();
});
InsureLog
.
builder
().
type
(
7
)
InsureLog
.
builder
().
type
(
7
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/addpPayCallBack"
)
.
requestData
(
sb
.
toString
()).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
JSONObject
.
toJSONString
(
callBack
)).
requestPath
(
base_api_url
+
"/callBack/policy/addpPayCallBack"
)
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
"核保通过"
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
.
returnCode
(
callBack
.
getStatus
()).
returnMsg
(
"核保通过"
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
...
...
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
8c92b3d6
...
@@ -454,6 +454,38 @@ public class InsureContorll {
...
@@ -454,6 +454,38 @@ public class InsureContorll {
bodyMap
.
put
(
"import_review_callback"
,
base_api_url
+
"/callBack/policy/addpPayCallBack"
);
bodyMap
.
put
(
"import_review_callback"
,
base_api_url
+
"/callBack/policy/addpPayCallBack"
);
}
}
bodyMap
.
put
(
"third_uuid"
,
"IS_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
));
bodyMap
.
put
(
"third_uuid"
,
"IS_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
));
List
<
YgglMainEmp
>
ygglMainEmpList
=
ygglMainEmpMapper
.
selectListByIds
(
insureDto
.
getUserIds
());
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
id
(
Integer
.
parseInt
(
insureDto
.
getOrgCode
())).
build
().
selectById
();
ygglMainEmpList
.
forEach
(
y
->
{
try
{
InsureUser
.
builder
()
.
transId
(
bodyMap
.
get
(
"third_uuid"
).
toString
())
.
insuredName
(
qyzxEntInfoM
.
getName
())
.
price
(
String
.
valueOf
(
PlanEnum
.
getEnum
(
insureDto
.
getBenefitBasicPlan
(),
insureDto
.
getBenefitOccupationCategory
()).
getPrice
()))
/*前端获取的保费*/
.
premium
(
String
.
valueOf
(
PlanEnum
.
getEnum
(
insureDto
.
getBenefitBasicPlan
(),
insureDto
.
getBenefitOccupationCategory
()).
getPrice
()
*
insureDto
.
getUserIds
().
length
))
// .batchNo(data.get("import_uuid").toString())
.
benefitBasicPlan
(
insureDto
.
getBenefitBasicPlan
())
.
policyNo
(
insurePolicy
.
getPolicyNo
())
.
userId
(
y
.
getId
())
.
orgCode
(
y
.
getOrgCode
())
.
insuredMobile
(
y
.
getPhone
())
.
benefitOccupationCategory
(
insureDto
.
getBenefitOccupationCategory
())
.
insuredNo
(
y
.
getZjNum
())
.
tricycleFrameNumber
(
insureDto
.
getTricycleFrameNumber
())
.
insuredEContact
(
y
.
getName
())
.
applyType
(
1
)
.
applicantEmployeeList
(
url
)
.
policyDateStart
(
dtf3
.
parse
(
insureDto
.
getPolicyDateStart
()))
.
policyDateEnd
(
dtf3
.
parse
(
insureDto
.
getPolicyDateEnd
()))
.
createTime
(
new
Date
())
.
insureStatus
(
3
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
}
catch
(
ParseException
e
)
{
log
.
info
(
"增员异常:policyDateStart:"
+
insureDto
.
getPolicyDateStart
()
+
"policyDateEnd:"
+
insureDto
.
getPolicyDateEnd
());
throw
new
CustomException
(
"增员异常"
);
}
y
.
setIsInsure
(
1
);
/*废弃*/
y
.
insertOrUpdate
();
});
String
responData
=
HttpUtils
.
sendPost
(
batchUrl
,
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appidq
,
secretq
),
bodyMap
);
String
responData
=
HttpUtils
.
sendPost
(
batchUrl
,
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appidq
,
secretq
),
bodyMap
);
Map
<
String
,
Object
>
dataMap
=
JSONObject
.
parseObject
(
responData
);
Map
<
String
,
Object
>
dataMap
=
JSONObject
.
parseObject
(
responData
);
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
))
{
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
))
{
...
@@ -464,40 +496,10 @@ public class InsureContorll {
...
@@ -464,40 +496,10 @@ public class InsureContorll {
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
2
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
2
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
transId
(
"IS_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
)).
fileUrl
(
data
.
get
(
"file_url"
).
toString
()).
build
().
insert
();
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
transId
(
"IS_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
)).
fileUrl
(
data
.
get
(
"file_url"
).
toString
()).
build
().
insert
();
return
ResultUtil
.
error
(
"信息填写错误,请查看日志"
);
// return ResultUtil.error("信息填写错误,请查看日志");
throw
new
CustomException
(
"信息填写错误,请查看日志"
);
}
else
{
}
else
{
List
<
YgglMainEmp
>
ygglMainEmpList
=
ygglMainEmpMapper
.
selectListByIds
(
insureDto
.
getUserIds
());
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
id
(
Integer
.
parseInt
(
insureDto
.
getOrgCode
())).
build
().
selectById
();
ygglMainEmpList
.
forEach
(
y
->
{
try
{
InsureUser
.
builder
()
.
transId
(
bodyMap
.
get
(
"third_uuid"
).
toString
())
.
insuredName
(
qyzxEntInfoM
.
getName
())
.
price
(
String
.
valueOf
(
PlanEnum
.
getEnum
(
insureDto
.
getBenefitBasicPlan
(),
insureDto
.
getBenefitOccupationCategory
()).
getPrice
()))
/*前端获取的保费*/
.
premium
(
String
.
valueOf
(
PlanEnum
.
getEnum
(
insureDto
.
getBenefitBasicPlan
(),
insureDto
.
getBenefitOccupationCategory
()).
getPrice
()
*
insureDto
.
getUserIds
().
length
))
.
batchNo
(
data
.
get
(
"import_uuid"
).
toString
())
.
benefitBasicPlan
(
insureDto
.
getBenefitBasicPlan
())
.
policyNo
(
orderImportInfo
.
get
(
"contract_no"
).
toString
())
.
userId
(
y
.
getId
())
.
orgCode
(
y
.
getOrgCode
())
.
insuredMobile
(
y
.
getPhone
())
.
benefitOccupationCategory
(
insureDto
.
getBenefitOccupationCategory
())
.
insuredNo
(
y
.
getZjNum
())
.
tricycleFrameNumber
(
insureDto
.
getTricycleFrameNumber
())
.
insuredEContact
(
y
.
getName
())
.
applyType
(
1
)
.
applicantEmployeeList
(
data
.
get
(
"file_url"
).
toString
())
.
policyDateStart
(
dtf3
.
parse
(
insureDto
.
getPolicyDateStart
()))
.
policyDateEnd
(
dtf3
.
parse
(
insureDto
.
getPolicyDateEnd
()))
.
createTime
(
new
Date
())
.
insureStatus
(
3
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
}
catch
(
ParseException
e
)
{
log
.
info
(
"增员异常:policyDateStart:"
+
insureDto
.
getPolicyDateStart
()
+
"policyDateEnd:"
+
insureDto
.
getPolicyDateEnd
());
throw
new
CustomException
(
"增员异常"
);
}
y
.
setIsInsure
(
1
);
/*废弃*/
y
.
insertOrUpdate
();
});
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
2
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
2
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
fileUrl
(
url
).
build
().
insert
();
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
fileUrl
(
url
).
build
().
insert
();
...
@@ -603,7 +605,7 @@ public class InsureContorll {
...
@@ -603,7 +605,7 @@ public class InsureContorll {
bodyMap
.
put
(
"third_uuid"
,
"RP_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
));
bodyMap
.
put
(
"third_uuid"
,
"RP_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
));
String
responData
=
HttpUtils
.
sendPost
(
batchUrl
,
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appidq
,
secretq
),
bodyMap
);
String
responData
=
HttpUtils
.
sendPost
(
batchUrl
,
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appidq
,
secretq
),
bodyMap
);
Map
<
String
,
Object
>
dataMap
=
JSONObject
.
parseObject
(
responData
);
Map
<
String
,
Object
>
dataMap
=
JSONObject
.
parseObject
(
responData
);
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
3
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
q
,
secretq
))).
type
(
3
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
fileUrl
(
url
).
build
().
insert
();
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
fileUrl
(
url
).
build
().
insert
();
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
))
{
if
(
dataMap
.
get
(
"errcode"
).
toString
().
equals
(
"suc"
))
{
...
@@ -611,7 +613,7 @@ public class InsureContorll {
...
@@ -611,7 +613,7 @@ public class InsureContorll {
Map
<
String
,
Object
>
orderImportInfo
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
data
.
get
(
"order_import_info"
)));
Map
<
String
,
Object
>
orderImportInfo
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
data
.
get
(
"order_import_info"
)));
String
status
=
orderImportInfo
.
get
(
"status"
).
toString
();
String
status
=
orderImportInfo
.
get
(
"status"
).
toString
();
if
(
status
.
equals
(
"5"
)
||
status
.
equals
(
"6"
)
||
status
.
equals
(
"7"
))
{
if
(
status
.
equals
(
"5"
)
||
status
.
equals
(
"6"
)
||
status
.
equals
(
"7"
))
{
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
,
secret
))).
type
(
2
)
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
setParams
(
JSONObject
.
toJSONString
(
bodyMap
),
appid
q
,
secretq
))).
type
(
2
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
requestData
(
JSONObject
.
toJSONString
(
bodyMap
)).
createTime
(
new
Date
()).
requestType
(
1
).
returnBody
(
responData
).
requestPath
(
batchUrl
)
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
transId
(
"RP_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
)).
fileUrl
(
data
.
get
(
"file_url"
).
toString
()).
build
().
insert
();
.
returnCode
(
dataMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
dataMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
insurePolicy
.
getId
()).
transId
(
"RP_"
+
insurePolicy
.
getOrgCode
()
+
"_"
+
dtf2
.
format
(
now
)).
fileUrl
(
data
.
get
(
"file_url"
).
toString
()).
build
().
insert
();
//TODO 写入日志
//TODO 写入日志
...
...
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
View file @
8c92b3d6
...
@@ -501,7 +501,7 @@
...
@@ -501,7 +501,7 @@
FROM
FROM
yggl_main_emp a
yggl_main_emp a
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
LEFT JOIN zzgl_bmgw_m b ON a.bmgw_id = b.id
LEFT JOIN insure_user iu on iu.user_id=a.id AND date_format(iu.
create_time
,'%Y-%m') = #{createTime} and iu.insure_status=1 and iu.`status`=1
LEFT JOIN insure_user iu on iu.user_id=a.id AND date_format(iu.
policy_date_start
,'%Y-%m') = #{createTime} and iu.insure_status=1 and iu.`status`=1
WHERE
WHERE
a.org_code = #{orgCode}
a.org_code = #{orgCode}
AND
AND
...
...
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