Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
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
AutogeneralShanghai
yd-backend
Commits
ce85301a
Commit
ce85301a
authored
Mar 16, 2021
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
N22保单列表查询接口和保单详情接口
parent
b6a130c3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
55 deletions
+72
-55
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
+0
-0
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+35
-49
yd-api/src/main/java/com/yd/api/practitioner/vo/policy/PolicyListQueryRequestVO.java
+9
-0
yd-api/src/main/java/com/yd/rmi/n22/common/utils/N22Utils.java
+17
-0
yd-api/src/main/java/com/yd/rmi/n22/policy/service/impl/N22PolicyServiceImpl.java
+7
-3
yd-api/src/main/java/com/yd/rmi/n22/staff/service/impl/N22StaffServiceImpl.java
+4
-3
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerBasicInfoServiceImpl.java
View file @
ce85301a
This diff is collapsed.
Click to expand it.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
ce85301a
...
@@ -203,56 +203,42 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
...
@@ -203,56 +203,42 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
isSpecial
=
mobileSpecials
.
contains
(
mobileNo
);
isSpecial
=
mobileSpecials
.
contains
(
mobileNo
);
}
}
// if(28L == practitionerType || isSpecial){//只有寿险的经纪人和注册为经纪人的员工才能登录
// if(28L == practitionerType || isSpecial){//只有寿险的经纪人和注册为经纪人的员工才能登录
Long
practitionerId
=
practitionerInfo
.
getPractitionerId
();
PractitionerBasicInfo
practitionerBasicInfo
=
aclPractitionerDALService
.
findByMobileNoE
(
mobileNo
);
Long
customerId
=
practitionerInfo
.
getCustomerId
();
Long
practitionerId
=
practitionerInfo
.
getPractitionerId
();
AclCustomer
customer
=
aclCustomerDALService
.
findById
(
customerId
);
Long
customerId
=
practitionerInfo
.
getCustomerId
();
PractitionerLoginBasicInfo
basicInfo
=
new
PractitionerLoginBasicInfo
();
AclCustomer
customer
=
aclCustomerDALService
.
findById
(
customerId
);
BeanUtils
.
copyProperties
(
practitionerInfo
,
basicInfo
);
PractitionerLoginBasicInfo
basicInfo
=
new
PractitionerLoginBasicInfo
();
//获取头像
BeanUtils
.
copyProperties
(
practitionerInfo
,
basicInfo
);
Integer
targetType
=
1
,
targetUseFor
=
1
;
//获取头像
CustomerFileUpload
fileUpload
=
aclFileUploadDALService
.
findFilePathInfo
(
targetType
,
targetUseFor
,
practitionerId
);
Integer
targetType
=
1
,
targetUseFor
=
1
;
String
imagePath
=
(
fileUpload
!=
null
)
?
fileUpload
.
getFilePath
()
:
null
;
CustomerFileUpload
fileUpload
=
aclFileUploadDALService
.
findFilePathInfo
(
targetType
,
targetUseFor
,
practitionerId
);
basicInfo
.
setHeadImagePath
(
imagePath
);
String
imagePath
=
(
fileUpload
!=
null
)
?
fileUpload
.
getFilePath
()
:
null
;
//获取体系信息
basicInfo
.
setHeadImagePath
(
imagePath
);
Long
subordinateId
=
practitionerInfo
.
getSubordinateId
();
//获取体系信息
if
(
subordinateId
!=
null
){
Long
subordinateId
=
practitionerInfo
.
getSubordinateId
();
PractitionerSubordinateInfo
subordinateInfo
=
aclPractitionerSubordinateSystemDALService
.
findSubordinateInfo
(
subordinateId
);
if
(
subordinateId
!=
null
){
if
(
subordinateInfo
!=
null
){
PractitionerSubordinateInfo
subordinateInfo
=
aclPractitionerSubordinateSystemDALService
.
findSubordinateInfo
(
subordinateId
);
basicInfo
.
setSubordinateName
(
subordinateInfo
.
getSubordinateName
());
if
(
subordinateInfo
!=
null
){
basicInfo
.
setSubordinateLeader
(
subordinateInfo
.
getSubordinateLeader
());
basicInfo
.
setSubordinateName
(
subordinateInfo
.
getSubordinateName
());
}
basicInfo
.
setSubordinateLeader
(
subordinateInfo
.
getSubordinateLeader
());
}
// 1.根据手机号查询经纪人在N22系统的Agent_id
GetStaffNewRequestBody
getStaffNewRequestBody
=
new
GetStaffNewRequestBody
();
getStaffNewRequestBody
.
setMobile
(
mobileNo
);
GetStaffNewResponseVO
resp
=
n22StaffService
.
getStaffNew
(
getStaffNewRequestBody
);
if
(
resp
!=
null
){
if
(
"查询成功"
.
equals
(
resp
.
getResponseHead
().
getMessage
())){
List
<
Staff
>
staffList
=
resp
.
getResponseBody
().
getStaff
();
if
(
staffList
.
size
()
>
0
)
{
Staff
staff
=
staffList
.
get
(
0
);
String
agent_id
=
staff
.
getAgent_id
();
responseVO
.
setPractitionerIdEG
(
agent_id
);
}
}
}
}
}
//获取用户的登录次数
if
(
practitionerBasicInfo
!=
null
){
List
<
AclCustomerLog
>
customerLogList
=
aclCustomerLogDALService
.
findLogInfoByCustomerId
(
customerId
);
responseVO
.
setPractitionerIdEG
(
practitionerBasicInfo
.
getPractitionerId
());
int
logTimes
=
(
customerLogList
.
isEmpty
())
?
0
:
customerLogList
.
size
();
}
//保存用户的登录记录
//获取用户的登录次数
aclCustomerLogDALService
.
saveCustomerLog
(
customerId
,
2
);
List
<
AclCustomerLog
>
customerLogList
=
aclCustomerLogDALService
.
findLogInfoByCustomerId
(
customerId
);
getOpenIdUrl
(
responseVO
,
customer
);
int
logTimes
=
(
customerLogList
.
isEmpty
())
?
0
:
customerLogList
.
size
();
responseVO
.
setCustomerId
(
customerId
);
//保存用户的登录记录
responseVO
.
setPractitionerId
(
practitionerId
);
aclCustomerLogDALService
.
saveCustomerLog
(
customerId
,
2
);
responseVO
.
setPractitionerTypeId
(
practitionerType
);
getOpenIdUrl
(
responseVO
,
customer
);
responseVO
.
setPractitionerBasicInfo
(
basicInfo
);
responseVO
.
setCustomerId
(
customerId
);
responseVO
.
setLoginTimes
(
logTimes
);
responseVO
.
setPractitionerId
(
practitionerId
);
responseVO
.
setCanSeeSalaryList
(
practitionerInfo
.
getCanSeeSalaryList
());
responseVO
.
setPractitionerTypeId
(
practitionerType
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
responseVO
.
setPractitionerBasicInfo
(
basicInfo
);
responseVO
.
setLoginTimes
(
logTimes
);
responseVO
.
setCanSeeSalaryList
(
practitionerInfo
.
getCanSeeSalaryList
());
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
// }
// }
}
else
{
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830001"
)));
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"830001"
)));
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/policy/PolicyListQueryRequestVO.java
View file @
ce85301a
...
@@ -3,6 +3,7 @@ package com.yd.api.practitioner.vo.policy;
...
@@ -3,6 +3,7 @@ package com.yd.api.practitioner.vo.policy;
public
class
PolicyListQueryRequestVO
{
public
class
PolicyListQueryRequestVO
{
private
Long
practitionerId
;
private
Long
practitionerId
;
private
Integer
time
;
private
Integer
time
;
private
Integer
platform
;
//平台,1--yd,2--N22
public
Long
getPractitionerId
()
{
public
Long
getPractitionerId
()
{
return
practitionerId
;
return
practitionerId
;
...
@@ -19,4 +20,12 @@ public class PolicyListQueryRequestVO {
...
@@ -19,4 +20,12 @@ public class PolicyListQueryRequestVO {
public
void
setTime
(
Integer
time
)
{
public
void
setTime
(
Integer
time
)
{
this
.
time
=
time
;
this
.
time
=
time
;
}
}
public
Integer
getPlatform
()
{
return
platform
;
}
public
void
setPlatform
(
Integer
platform
)
{
this
.
platform
=
platform
;
}
}
}
yd-api/src/main/java/com/yd/rmi/n22/common/utils/N22Utils.java
View file @
ce85301a
...
@@ -37,6 +37,7 @@ public class N22Utils {
...
@@ -37,6 +37,7 @@ public class N22Utils {
postMethod
.
getParams
().
setParameter
(
HttpMethodParams
.
HTTP_CONTENT_CHARSET
,
"GBK"
);
postMethod
.
getParams
().
setParameter
(
HttpMethodParams
.
HTTP_CONTENT_CHARSET
,
"GBK"
);
postMethod
.
setRequestHeader
(
"Content_Type"
,
"application/json;charset=utf-8"
);
postMethod
.
setRequestHeader
(
"Content_Type"
,
"application/json;charset=utf-8"
);
postMethod
.
setRequestHeader
(
"Accept"
,
"application/json;charset=utf-8"
);
postMethod
.
setRequestHeader
(
"Accept"
,
"application/json;charset=utf-8"
);
postMethod
.
setRequestHeader
(
"eliteSign"
,
"n9WLrWtWrNmUlhw8SvvwIhyDJXsS1OPWRzUFBPbj89TWRJTfuk4SITBhAiSmNMY6"
);
RequestEntity
requestEntity
=
new
StringRequestEntity
(
requestJson
,
"application/json"
,
"UTF-8"
);
RequestEntity
requestEntity
=
new
StringRequestEntity
(
requestJson
,
"application/json"
,
"UTF-8"
);
postMethod
.
setRequestEntity
(
requestEntity
);
postMethod
.
setRequestEntity
(
requestEntity
);
int
statusCode
=
httpClient
.
executeMethod
(
postMethod
);
int
statusCode
=
httpClient
.
executeMethod
(
postMethod
);
...
@@ -74,4 +75,20 @@ public class N22Utils {
...
@@ -74,4 +75,20 @@ public class N22Utils {
public
static
Long
getN22RelationType
(
String
idType
)
{
public
static
Long
getN22RelationType
(
String
idType
)
{
return
null
;
return
null
;
}
}
public
static
String
getN22PolicyStatus
(
String
policyStatus
)
{
//(1, "投保")
//(2, "已承保/已回执")
//(3, "未支付/支付失败")
//(7, "支付成功")
//(98, "撤单")
switch
(
policyStatus
){
case
"1"
:
return
"投保"
;
case
"2"
:
return
"已承保/已回执"
;
case
"3"
:
return
"未支付/支付失败"
;
case
"7"
:
return
"支付成功"
;
case
"98"
:
return
"撤单"
;
}
return
""
;
}
}
}
yd-api/src/main/java/com/yd/rmi/n22/policy/service/impl/N22PolicyServiceImpl.java
View file @
ce85301a
...
@@ -29,10 +29,12 @@ public class N22PolicyServiceImpl implements N22PolicyService {
...
@@ -29,10 +29,12 @@ public class N22PolicyServiceImpl implements N22PolicyService {
obj
.
put
(
"requestBody"
,
requestBody
);
obj
.
put
(
"requestBody"
,
requestBody
);
logger
.
info
(
"N22查询保单列表请求报文:"
+
obj
.
toString
());
logger
.
info
(
"N22查询保单列表请求报文:"
+
obj
.
toString
());
String
url
=
"https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/PolicyList"
;
// String url = "https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/PolicyList";
String
url
=
"http://101.132.32.185:8082/EliteGeneralHttpTask/GeneralService/PolicyList"
;
String
result
=
N22Utils
.
postTransaction
(
url
,
obj
.
toString
());
String
result
=
N22Utils
.
postTransaction
(
url
,
obj
.
toString
());
logger
.
info
(
"N22查询保单列表响应报文:"
+
result
);
//
logger.info("N22查询保单列表响应报文:"+result);
rObj
=
JSONObject
.
parseObject
(
result
,
PolicyListQueryResponseVO
.
class
);
rObj
=
JSONObject
.
parseObject
(
result
,
PolicyListQueryResponseVO
.
class
);
return
rObj
;
return
rObj
;
...
@@ -45,12 +47,14 @@ public class N22PolicyServiceImpl implements N22PolicyService {
...
@@ -45,12 +47,14 @@ public class N22PolicyServiceImpl implements N22PolicyService {
JSONObject
requestHead
=
new
JSONObject
();
JSONObject
requestHead
=
new
JSONObject
();
requestHead
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
());
requestHead
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
());
requestHead
.
put
(
"appId"
,
"eliteNgpcrtaVU9NAz"
);
obj
.
put
(
"requestHead"
,
requestHead
);
obj
.
put
(
"requestHead"
,
requestHead
);
obj
.
put
(
"requestBody"
,
requestBody
);
obj
.
put
(
"requestBody"
,
requestBody
);
logger
.
info
(
"N22查询保单详情请求报文:"
+
obj
.
toString
());
logger
.
info
(
"N22查询保单详情请求报文:"
+
obj
.
toString
());
String
url
=
"https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/PolicyInfo"
;
// String url = "https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/PolicyInfo";
String
url
=
"http://101.132.32.185:8082/EliteGeneralHttpTask/GeneralService/PolicyInfo"
;
String
result
=
N22Utils
.
postTransaction
(
url
,
obj
.
toString
());
String
result
=
N22Utils
.
postTransaction
(
url
,
obj
.
toString
());
logger
.
info
(
"N22查询保单详情响应报文:"
+
result
);
logger
.
info
(
"N22查询保单详情响应报文:"
+
result
);
...
...
yd-api/src/main/java/com/yd/rmi/n22/staff/service/impl/N22StaffServiceImpl.java
View file @
ce85301a
...
@@ -28,12 +28,13 @@ public class N22StaffServiceImpl implements N22StaffService {
...
@@ -28,12 +28,13 @@ public class N22StaffServiceImpl implements N22StaffService {
obj
.
put
(
"requestHead"
,
requestHead
);
obj
.
put
(
"requestHead"
,
requestHead
);
obj
.
put
(
"requestBody"
,
getStaffNewRequestBody
);
obj
.
put
(
"requestBody"
,
getStaffNewRequestBody
);
logger
.
info
(
"N22
查询保单列表
请求报文:"
+
obj
.
toString
());
logger
.
info
(
"N22
员工查询
请求报文:"
+
obj
.
toString
());
String
url
=
"https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/getStaffNew"
;
// String url = "https://life.ydinsurance.cn/EliteGeneralHttpTask/GeneralService/getStaffNew";
String
url
=
"http://101.132.32.185:8082/EliteGeneralHttpTask/GeneralService/getStaffNew"
;
String
result
=
N22Utils
.
postTransaction
(
url
,
obj
.
toString
());
String
result
=
N22Utils
.
postTransaction
(
url
,
obj
.
toString
());
logger
.
info
(
"N22
查询保单列表
响应报文:"
+
result
);
logger
.
info
(
"N22
员工查询
响应报文:"
+
result
);
GetStaffNewResponseVO
response
=
JSONObject
.
parseObject
(
result
,
GetStaffNewResponseVO
.
class
);
GetStaffNewResponseVO
response
=
JSONObject
.
parseObject
(
result
,
GetStaffNewResponseVO
.
class
);
...
...
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