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
106688fe
Commit
106688fe
authored
Mar 29, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运营后台--
保单列表
parent
a552b912
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
27 deletions
+119
-27
src/main/java/cn/timer/api/bean/insure/InsureLog.java
+3
-0
src/main/java/cn/timer/api/bean/insure/InsureUser.java
+5
-0
src/main/java/cn/timer/api/controller/insure/InsureApplicantController.java
+1
-1
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
+37
-13
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+1
-1
src/main/java/cn/timer/api/dao/insure/InsurePolicyMapper.java
+3
-2
src/main/resources/mapping/insure/InsureLogMapper.xml
+2
-0
src/main/resources/mapping/insure/InsurePolicyMapper.xml
+65
-10
src/main/resources/mapping/insure/InsureUserMapper.xml
+2
-0
No files found.
src/main/java/cn/timer/api/bean/insure/InsureLog.java
View file @
106688fe
...
...
@@ -86,6 +86,8 @@ public class InsureLog extends Model<InsurePolicy> {
*/
private
Integer
requestType
;
private
Integer
policyId
;
/**
* 设置:
*/
...
...
@@ -218,4 +220,5 @@ public class InsureLog extends Model<InsurePolicy> {
public
Integer
getType
()
{
return
type
;
}
}
src/main/java/cn/timer/api/bean/insure/InsureUser.java
View file @
106688fe
...
...
@@ -151,4 +151,9 @@ public class InsureUser extends Model<InsureUser> {
@ApiModelProperty
(
value
=
"替换流水号,使用trans_id,RP_开头"
)
private
String
replaceTransId
;
@ApiModelProperty
(
value
=
"申请类型:1新增 3批增"
)
private
Integer
applyType
;
}
src/main/java/cn/timer/api/controller/insure/InsureApplicantController.java
View file @
106688fe
...
...
@@ -39,7 +39,7 @@ import org.springframework.web.multipart.MultipartFile;
* @email 862422848@qq.com
* @date 2022-03-07 17:02:46
*/
@Api
(
tags
=
"
23.0保险列表
"
)
@Api
(
tags
=
"
投保人
"
)
@RestController
@Transactional
@RequestMapping
(
value
=
"/insureApplicant"
,
produces
=
{
"application/json"
})
...
...
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
View file @
106688fe
...
...
@@ -2,18 +2,21 @@ package cn.timer.api.controller.insure;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
cn.timer.api.bean.insure.InsureUser
;
import
cn.timer.api.dao.insure.InsureUserMapper
;
import
cn.timer.api.dto.insure.PolicyDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
com.beust.jcommander.internal.Lists
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.google.common.collect.Maps
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
/**
...
...
@@ -23,9 +26,30 @@ import org.springframework.web.bind.annotation.RestController;
* @email 862422848@qq.com
* @date 2022-03-11 09:06:53
*/
@Api
(
tags
=
"8.0保险列表"
)
@RestController
@RequestMapping
(
"insureuser"
)
@Transactional
@RequestMapping
(
value
=
"/insureUser"
,
produces
=
{
"application/json"
})
public
class
InsureUserController
{
@Autowired
private
InsureUserMapper
insureUserMapper
;
@PostMapping
(
value
=
"/policyList"
)
@ApiOperation
(
value
=
"3.保单列表"
,
httpMethod
=
"Post"
,
notes
=
"保单列表"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
policyList
(
@RequestBody
PolicyDto
policyDto
)
{
Map
map
=
Maps
.
newHashMap
();
List
<
PolicyDto
>
list
=
insureUserMapper
.
selectPolicyList
(
policyDto
.
getPage
(),
String
.
valueOf
(
policyDto
.
getId
()));
map
.
put
(
"list"
,
Optional
.
ofNullable
(
list
).
orElse
(
Lists
.
newArrayList
()));
map
.
put
(
"total"
,
insureUserMapper
.
totalUser
(
String
.
valueOf
(
policyDto
.
getId
())));
return
ResultUtil
.
data
(
map
);
}
@GetMapping
(
value
=
"/userDetial"
)
@ApiOperation
(
value
=
"3.被保人详情"
,
httpMethod
=
"Post"
,
notes
=
"保单列表"
)
@ApiOperationSupport
(
order
=
2
)
public
Result
<
Object
>
userDetial
(
@RequestParam
(
"userId"
)
String
userId
)
{
InsureUser
user
=
InsureUser
.
builder
().
id
(
Integer
.
parseInt
(
userId
)).
build
().
selectById
();
return
ResultUtil
.
data
(
user
);
}
}
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
106688fe
...
...
@@ -819,7 +819,7 @@ public class QyzxController {
return
ResultUtil
.
data
(
qyzxEntInfoM
,
"添加/修改企业"
);
}
@GetMapping
(
value
=
"/getCompanySelect"
)
@GetMapping
(
value
=
"/getCompanySelect"
)
@ApiOperation
(
value
=
"运营后台---获取选择框下的企业信息"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getCompanySelect
()
{
return
ResultUtil
.
data
(
qyzxEntInfoMMapper
.
getCompanyList
(),
"获取成功"
);
...
...
src/main/java/cn/timer/api/dao/insure/InsurePolicyMapper.java
View file @
106688fe
...
...
@@ -19,8 +19,9 @@ import java.util.List;
*/
@Repository
public
interface
InsurePolicyMapper
extends
BaseMapper
<
InsurePolicy
>
{
public
List
<
PolicyDto
>
policyList
(
@Param
(
"page"
)
Page
page
);
List
<
PolicyDto
>
policyList
(
@Param
(
"policy"
)
PolicyDto
policyDto
);
PolicyDto
getPolicyDetail
(
@Param
(
"id"
)
Integer
id
);
Integer
totalPolicy
();
Integer
totalPolicy
(
@Param
(
"policy"
)
PolicyDto
policyDto
);
List
<
PolicyDto
>
policyTotalList
();
}
src/main/resources/mapping/insure/InsureLogMapper.xml
View file @
106688fe
...
...
@@ -16,6 +16,8 @@
<result
property=
"returnMsg"
column=
"return_msg"
/>
<result
property=
"transId"
column=
"trans_id"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"requestType"
column=
"request_type"
/>
<result
property=
"policyId"
column=
"policy_id"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"cn.timer.api.bean.insure.InsureLog"
>
...
...
src/main/resources/mapping/insure/InsurePolicyMapper.xml
View file @
106688fe
...
...
@@ -232,21 +232,58 @@
</delete>
<select
id=
"policyList"
resultType=
"cn.timer.api.dto.insure.PolicyDto"
>
select ip.id AS id, ip.scheme_name AS schemeName, ip.type AS type, count(iu.id) AS totaPolicy,
count(iu.org_code) AS totalCompany, count(iu.id) AS totalUser, ip.total_premium AS totalPremium,
ip.update_time AS updateTime,ip.policy_file AS policyFile
from insure_policy ip
LEFT JOIN insure_user iu on iu.policy_id = ip.id
where iu.insure_status=1
GROUP BY ip.id
<if
test=
"page.offset != null and page.totalPage !=null"
>
limit #{page.offset},#{page.totalPage}
SELECT
ip.id AS id,
ip.policy_no AS policyNo,
ip.create_time as createTime,
ip.scheme_name AS schemeName,
qy.`name` as `name`,
count( iu.id ) AS totalUser,
ip.policy_date_start as policyDateStart,
ip.policy_date_end as policyDateEnd,
ip.total_premium AS totalPremium,
ip.update_time AS updateTime,
ip.`status` as `status`
FROM
insure_policy ip
LEFT JOIN insure_user iu ON iu.policy_id = ip.id
LEFT JOIN qyzx_ent_info_m qy on qy.id=iu.org_code
<where>
iu.insure_status = 1
<if
test=
"policy.status!=null and policy.status!=''"
>
and ip.status = #{policy.status}
</if>
<if
test=
"policy.orgCode!=null and policy.orgCode!=''"
>
and ip.org_code = #{policy.orgCode}
</if>
<if
test=
"policy.benefitBasicPlan!=null and policy.benefitBasicPlan!=''"
>
and iu.benefit_basic_plan = #{policy.benefitBasicPlan}
</if>
<if
test=
"policy.policyDateStart!=null and policy.policyDateStart!=''"
>
and ip.policy_date_start
<![CDATA[ >= ]]>
#{policy.policyDateStart}
</if>
</where>
GROUP BY
ip.id
<if
test=
"policy.page.offset != null and policy.page.totalPage !=null"
>
limit #{policy.page.offset},#{policy.page.totalPage}
</if>
</select>
<select
id=
"totalPolicy"
resultType=
"java.lang.Integer"
>
select count(ip.id)
from insure_policy ip
<where>
<if
test=
"policy.status!=null and policy.status!=''"
>
and ip.status = #{policy.status}
</if>
<if
test=
"policy.orgCode!=null and policy.orgCode!=''"
>
and ip.org_code = #{policy.orgCode}
</if>
<if
test=
"policy.policyDateStart!=null and policy.policyDateStart!=''"
>
and ip.policy_date_start
<![CDATA[ >= ]]>
#{policy.policyDateStart}
</if>
</where>
</select>
<select
id=
"getPolicyDetail"
resultType=
"cn.timer.api.dto.insure.PolicyDto"
>
...
...
@@ -268,4 +305,22 @@
LIMIT 1
</select>
<select
id=
"policyTotalList"
resultType=
"cn.timer.api.dto.insure.PolicyDto"
>
SELECT
ip.id AS id,
ip.scheme_name AS schemeName,
ip.type AS type,
(select count(id) from insure_policy) AS totaPolicy,
(select count(org_code) from insure_policy) AS totalCompany,
count( iu.id ) AS totalUser,
(select sum(total_premium) from insure_policy) as totalPremium,
ip.update_time AS updateTime
FROM
insure_policy ip
LEFT JOIN insure_user iu ON iu.policy_id = ip.id
WHERE
iu.insure_status = 1
GROUP BY
ip.type
</select>
</mapper>
src/main/resources/mapping/insure/InsureUserMapper.xml
View file @
106688fe
...
...
@@ -29,6 +29,7 @@
<result
property=
"insureStatus"
column=
"insure_status"
/>
<result
property=
"policyId"
column=
"policy_id"
/>
<result
property=
"replaceTransId"
column=
"replace_trans_id"
/>
<result
property=
"applyType"
column=
"apply_type"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"cn.timer.api.bean.insure.InsureUser"
>
...
...
@@ -311,4 +312,5 @@
#{id}
</foreach>
</select>
</mapper>
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