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
da6a2372
Commit
da6a2372
authored
Jun 15, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时运营后台--
增加保单回调是查询保单信息 导入保单时判断批改
parent
9a41cd1e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
4 deletions
+40
-4
sql/V2.3.sql
+3
-0
src/main/java/cn/timer/api/bean/insure/InsureUser.java
+8
-3
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+5
-1
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
+24
-0
No files found.
sql/V2.3.sql
View file @
da6a2372
...
...
@@ -34,3 +34,6 @@ CREATE TABLE ` yggl_main_importLog ` (
`
org_code
` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`
id
`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
ALTER TABLE `
timer_test
`.`
insure_user
`
MODIFY COLUMN `
apply_type
` int(11) NULL DEFAULT NULL COMMENT '申请类型:1新增 2投保 3批改' AFTER `
replace_trans_id
`;
src/main/java/cn/timer/api/bean/insure/InsureUser.java
View file @
da6a2372
package
cn
.
timer
.
api
.
bean
.
insure
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -16,8 +17,9 @@ import javax.persistence.GeneratedValue;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -152,7 +154,7 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty
(
value
=
"替换流水号,使用trans_id,RP_开头"
)
private
String
replaceTransId
;
@ApiModelProperty
(
value
=
"申请类型:1新增 2投保 3批
增
"
)
@ApiModelProperty
(
value
=
"申请类型:1新增 2投保 3批
改
"
)
private
Integer
applyType
;
@ApiModelProperty
(
value
=
"批改原因"
)
...
...
@@ -161,5 +163,8 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty
(
value
=
"录单时间"
)
private
Date
createTime
;
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"导入备注"
)
private
String
remake
;
}
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
da6a2372
...
...
@@ -8,6 +8,7 @@ import cn.timer.api.utils.ResultUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.mysql.cj.util.StringUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -199,7 +200,10 @@ public class CallBackContorll {
paramsMap
.
put
(
"timestamp"
,
timestamp
);
paramsMap
.
put
(
"sign"
,
sign
);
CallBack
callBack
=
JSONObject
.
parseObject
(
sb
.
toString
(),
CallBack
.
class
);
List
<
InsureUser
>
list
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getBatchNo
,
callBack
.
getOrder_import_info
().
getUuid
()).
eq
(
InsureUser:
:
getInsureStatus
,
3
));
List
<
InsureUser
>
list
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getTransId
,
callBack
.
getOrder_import_info
().
getThird_uuid
()));
if
(
list
.
size
()<=
0
){
list
=
InsureUser
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsureUser
>().
lambda
().
eq
(
InsureUser:
:
getBatchNo
,
callBack
.
getOrder_import_info
().
getUuid
()));
}
InsurePolicy
insurePolicy
=
InsurePolicy
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getPolicyNo
,
list
.
get
(
0
).
getPolicyNo
()));
if
(
callBack
.
getStatus
().
equals
(
"1"
))
{
list
.
forEach
(
i
->
{
...
...
src/main/java/cn/timer/api/controller/insure/InsureContorll.java
View file @
da6a2372
...
...
@@ -1111,6 +1111,11 @@ public class InsureContorll {
case
"总保费"
:
user
.
setPrice
(
ExcelUtils
.
getString
(
cell
));
break
;
case
"备注"
:
if
(!
StringUtils
.
isNullOrEmpty
(
ExcelUtils
.
getString
(
cell
))){
user
.
setRemake
(
ExcelUtils
.
getString
(
cell
));
}
break
;
}
}
userList
.
add
(
user
);
...
...
@@ -1186,7 +1191,26 @@ public class InsureContorll {
insureUser
.
setStatus
(
"1"
);
insureUser
.
setCreateTime
(
new
Date
());
insureUser
.
insert
();
/*判断批改状态*/
if
(
insureUser
.
getApplyType
()==
3
){
if
(
StringUtils
.
isNullOrEmpty
(
insureUser
.
getRemake
())){
return
ResultUtil
.
data
(
"批改状态下备注不能为空"
);
}
if
(
insureUser
.
getRemake
().
indexOf
(
"被保险人信息批改-原被保险人,"
)!=-
1
){
String
newStr
=
insureUser
.
getRemake
().
substring
(
insureUser
.
getRemake
().
indexOf
(
","
)+
1
,
insureUser
.
getRemake
().
length
());
String
[]
arr
=
newStr
.
split
(
"/"
);
if
(
arr
[
0
].
equals
(
insureUser
.
getInsuredEContact
())&&
arr
[
2
].
equals
(
insureUser
.
getInsuredNo
())){
return
ResultUtil
.
data
(
"批改状态下替换人和被替换人不能相同"
);
}
/*更新人员投保状态*/
InsureUser
.
builder
().
status
(
"2"
).
insureStatus
(
2
).
build
().
update
(
new
QueryWrapper
<
InsureUser
>()
.
lambda
().
eq
(
InsureUser:
:
getInsuredNo
,
arr
[
2
]).
eq
(
InsureUser:
:
getInsuredEContact
,
arr
[
0
]));
ygglMainEmp
.
builder
().
isInsure
(
2
).
build
().
update
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getId
,
insureUser
.
getUserId
()));
}
}
}
InsureLog
.
builder
().
requestParam
(
JSONObject
.
toJSONString
(
map
)).
type
(
9
).
createTime
(
new
Date
()).
requestType
(
2
).
returnBody
(
data
).
requestPath
(
policyDetailUrl
)
.
returnCode
(
returnMap
.
get
(
"errcode"
).
toString
()).
returnMsg
(
returnMap
.
get
(
"errmsg"
).
toString
()).
policyId
(
policy
.
getId
()).
build
().
insert
();
}
catch
(
IOException
e
)
{
...
...
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