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
8e8d251a
Commit
8e8d251a
authored
May 31, 2022
by
翁国栋
Committed by
284718418@qq.com
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时运营后台--
投保人信息验证 企业列表信息验证 导入信息验证 导入人员信息验证 保单搜索列表更据企业名称查找
parent
92aff9ea
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
145 additions
and
26 deletions
+145
-26
src/main/java/cn/timer/api/bean/insure/BatchPayCallBack.java
+19
-0
src/main/java/cn/timer/api/bean/insure/InsureApplicant.java
+65
-6
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
+0
-0
src/main/java/cn/timer/api/controller/insure/InsureApplicantController.java
+25
-9
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
+2
-1
src/main/java/cn/timer/api/controller/insure/task/InsureTaskTiming.java
+13
-4
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
+1
-0
src/main/resources/mapping/insure/InsurePolicyMapper.xml
+9
-6
src/main/resources/mapping/qyzx/QyzxEntInfoMMapper.xml
+11
-0
No files found.
src/main/java/cn/timer/api/bean/insure/BatchPayCallBack.java
0 → 100644
View file @
8e8d251a
package
cn
.
timer
.
api
.
bean
.
insure
;
import
lombok.Data
;
/**
* @Description TODO
* @Author wgd
* @Date 2022/5/30 11:01
*/
@Data
public
class
BatchPayCallBack
{
private
String
order_import_uuid
;
private
String
pay_status
;
private
String
transaction_id
;
private
String
pay_time
;
private
String
pay_money
;
private
String
method
;
}
src/main/java/cn/timer/api/bean/insure/InsureApplicant.java
View file @
8e8d251a
...
...
@@ -4,22 +4,21 @@ import cn.timer.api.bean.htzz.HtzzAssoZztx;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.mysql.cj.util.StringUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.*
;
import
org.springframework.beans.factory.annotation.Value
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.validation.constraints.NotEmpty
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 投保人
*
...
...
@@ -49,6 +48,7 @@ public class InsureApplicant extends Model<InsureApplicant> {
* 企业/网点名称
*/
@ApiModelProperty
(
value
=
"企业/网点名称"
)
@NotEmpty
private
String
applicantEName
;
/**
* 企业/网点地址
...
...
@@ -132,7 +132,7 @@ public class InsureApplicant extends Model<InsureApplicant> {
private
String
applicantInvoicedAmount
;
@ApiModelProperty
(
value
=
"企业id"
,
example
=
""
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"银行账号"
)
@ApiModelProperty
(
value
=
"银行账号"
)
private
String
applicantCorporateBankAccount
;
/**
...
...
@@ -148,198 +148,231 @@ public class InsureApplicant extends Model<InsureApplicant> {
public
void
setApplicantEName
(
String
applicantEName
)
{
this
.
applicantEName
=
applicantEName
;
}
/**
* 获取:企业/网点名称
*/
public
String
getApplicantEName
()
{
return
applicantEName
;
}
/**
* 设置:企业/网点地址
*/
public
void
setApplicantEAddress
(
String
applicantEAddress
)
{
this
.
applicantEAddress
=
applicantEAddress
;
}
/**
* 获取:企业/网点地址
*/
public
String
getApplicantEAddress
()
{
return
applicantEAddress
;
}
/**
* 设置:人员清单
*/
public
void
setApplicantEmployeeList
(
String
applicantEmployeeList
)
{
this
.
applicantEmployeeList
=
applicantEmployeeList
;
}
/**
* 获取:人员清单
*/
public
String
getApplicantEmployeeList
()
{
return
applicantEmployeeList
;
}
/**
* 设置:企业授权操作人姓名
*/
public
void
setApplicantEContacts
(
String
applicantEContacts
)
{
this
.
applicantEContacts
=
applicantEContacts
;
}
/**
* 获取:企业授权操作人姓名
*/
public
String
getApplicantEContacts
()
{
return
applicantEContacts
;
}
/**
* 设置:操作人的联系电话
*/
public
void
setApplicantEPhone
(
String
applicantEPhone
)
{
this
.
applicantEPhone
=
applicantEPhone
;
}
/**
* 获取:操作人的联系电话
*/
public
String
getApplicantEPhone
()
{
return
applicantEPhone
;
}
/**
* 设置:企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/
public
void
setApplicantENoType
(
String
applicantENoType
)
{
this
.
applicantENoType
=
applicantENoType
;
}
/**
* 获取:企业证件类型:3646、统一社会信用代码 3924、组织机构代码
*/
public
String
getApplicantENoType
()
{
return
applicantENoType
;
}
/**
* 设置:企业证件号码
*/
public
void
setApplicantENo
(
String
applicantENo
)
{
this
.
applicantENo
=
applicantENo
;
}
/**
* 获取:企业证件号码
*/
public
String
getApplicantENo
()
{
return
applicantENo
;
}
/**
* 设置:企业邮箱
*/
public
void
setApplicantEMail
(
String
applicantEMail
)
{
this
.
applicantEMail
=
applicantEMail
;
}
/**
* 获取:企业邮箱
*/
public
String
getApplicantEMail
()
{
return
applicantEMail
;
}
/**
* 设置:省市区
*/
public
void
setApplicantProvinceCity
(
String
applicantProvinceCity
)
{
this
.
applicantProvinceCity
=
applicantProvinceCity
;
}
/**
* 获取:省市区
*/
public
String
getApplicantProvinceCity
()
{
return
applicantProvinceCity
;
}
/**
* 设置:发票收件地址
*/
public
void
setApplicantInvoiceReceivingAddress
(
String
applicantInvoiceReceivingAddress
)
{
this
.
applicantInvoiceReceivingAddress
=
applicantInvoiceReceivingAddress
;
}
/**
* 获取:发票收件地址
*/
public
String
getApplicantInvoiceReceivingAddress
()
{
return
applicantInvoiceReceivingAddress
;
}
/**
* 设置:发票开票电话
*/
public
void
setApplicantInvoiceBillingPhone
(
String
applicantInvoiceBillingPhone
)
{
this
.
applicantInvoiceBillingPhone
=
applicantInvoiceBillingPhone
;
}
/**
* 获取:发票开票电话
*/
public
String
getApplicantInvoiceBillingPhone
()
{
return
applicantInvoiceBillingPhone
;
}
/**
* 设置:企业开户行名称
*/
public
void
setApplicantBusinessBankName
(
String
applicantBusinessBankName
)
{
this
.
applicantBusinessBankName
=
applicantBusinessBankName
;
}
/**
* 获取:企业开户行名称
*/
public
String
getApplicantBusinessBankName
()
{
return
applicantBusinessBankName
;
}
/**
* 设置:保单号
*/
public
void
setPolicyNo
(
String
policyNo
)
{
this
.
policyNo
=
policyNo
;
}
/**
* 获取:保单号
*/
public
String
getPolicyNo
()
{
return
policyNo
;
}
/**
* 设置:投保类型:1个人 2 企业
*/
public
void
setApplicantType
(
String
applicantType
)
{
this
.
applicantType
=
applicantType
;
}
/**
* 获取:投保类型:1个人 2 企业
*/
public
String
getApplicantType
()
{
return
applicantType
;
}
/**
* 设置:报价请求流水号
*/
public
void
setTransId
(
String
transId
)
{
this
.
transId
=
transId
;
}
/**
* 获取:报价请求流水号
*/
public
String
getTransId
()
{
return
transId
;
}
/**
* 设置:报价号
*/
public
void
setCurrency
(
String
currency
)
{
this
.
currency
=
currency
;
}
/**
* 获取:报价号
*/
public
String
getCurrency
()
{
return
currency
;
}
/**
* 设置:发票开票金额
*/
public
void
setApplicantInvoicedAmount
(
String
applicantInvoicedAmount
)
{
this
.
applicantInvoicedAmount
=
applicantInvoicedAmount
;
}
/**
* 获取:发票开票金额
*/
...
...
@@ -354,4 +387,30 @@ public class InsureApplicant extends Model<InsureApplicant> {
public
void
setOrgCode
(
Integer
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
/*验证必要字段*/
public
String
checkValiad
()
{
if
(
StringUtils
.
isNullOrEmpty
(
applicantEName
))
{
return
"企业/网点名称未设置"
;
}
if
(
StringUtils
.
isNullOrEmpty
(
applicantEAddress
))
{
return
"企业/网点地址未设置"
;
}
if
(
StringUtils
.
isNullOrEmpty
(
applicantEContacts
))
{
return
"企业授权操作人姓名未设置"
;
}
if
(
StringUtils
.
isNullOrEmpty
(
applicantEPhone
))
{
return
"操作人的联系电话未设置"
;
}
if
(
StringUtils
.
isNullOrEmpty
(
applicantENoType
))
{
return
"企业证件类型未设置"
;
}
if
(
StringUtils
.
isNullOrEmpty
(
applicantENo
))
{
return
"企业证件号码未设置"
;
}
if
(
StringUtils
.
isNullOrEmpty
(
applicantEMail
))
{
return
"企业邮箱未设置"
;
}
return
"true"
;
}
}
src/main/java/cn/timer/api/controller/insure/CallBackContorll.java
View file @
8e8d251a
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/insure/InsureApplicantController.java
View file @
8e8d251a
...
...
@@ -9,6 +9,7 @@ import cn.timer.api.bean.insure.InsureApplicant;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.dao.insure.InsureApplicantMapper
;
import
cn.timer.api.dto.insure.InsureDto
;
import
cn.timer.api.utils.HttpUtils
;
...
...
@@ -49,32 +50,42 @@ public class InsureApplicantController {
@PostMapping
(
"/insureApplicationSetting"
)
@ApiOperation
(
value
=
"设置投保人"
,
httpMethod
=
"POST"
,
notes
=
"投保申请"
)
private
Result
<
Object
>
insureApplicationSetting
(
@RequestBody
InsureApplicant
params
)
{
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
params
.
getOrgCode
()));
try
{
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
params
.
getOrgCode
()));
params
.
setId
(
insureApplicant
.
getId
());
params
.
updateById
();
return
ResultUtil
.
data
(
params
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"设置投保人异常"
);
}
}
@GetMapping
(
"/getApplicantAdmin"
)
@ApiOperation
(
value
=
"获取投保人--运营后台"
,
httpMethod
=
"GET"
,
notes
=
"获取投保人"
)
private
Result
<
Object
>
getApplicant
(
@RequestParam
(
"orgCode"
)
Integer
orgCode
)
{
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
orgCode
));
if
(
insureApplicant
==
null
){
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
id
(
orgCode
).
build
().
selectById
();
try
{
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
orgCode
));
if
(
insureApplicant
==
null
)
{
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
id
(
orgCode
).
build
().
selectById
();
insureApplicant
=
getInsureApplicant
(
qyzxEntInfoM
);
insureApplicant
.
setOrgCode
(
orgCode
);
insureApplicant
.
insert
();
}
return
ResultUtil
.
data
(
insureApplicant
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"获取投保人异常"
);
}
}
private
InsureApplicant
getInsureApplicant
(
QyzxEntInfoM
qyzxEntInfoM
)
{
InsureApplicant
insureApplicant
;
insureApplicant
=
new
InsureApplicant
();
insureApplicant
=
new
InsureApplicant
();
insureApplicant
.
setApplicantEName
(
qyzxEntInfoM
.
getName
());
insureApplicant
.
setApplicantEAddress
(
qyzxEntInfoM
.
getWorkAddress
());
insureApplicant
.
setApplicantEContacts
(
qyzxEntInfoM
.
get
OperName
());
/*这里为避免联系人为空,默认使用法人*/
insureApplicant
.
setApplicantEContacts
(
qyzxEntInfoM
.
get
LinkMan
());
insureApplicant
.
setApplicantEPhone
(
qyzxEntInfoM
.
getPhone
());
/*这里为避免联系人为空,默认使用法人*/
insureApplicant
.
setApplicantType
(
"2"
);
insureApplicant
.
setApplicantENoType
(
"3646"
);
...
...
@@ -86,14 +97,19 @@ public class InsureApplicantController {
@GetMapping
(
"/getApplicant"
)
@ApiOperation
(
value
=
"获取投保人--8小时"
,
httpMethod
=
"GET"
,
notes
=
"获取投保人"
)
private
Result
<
Object
>
getApplicant
(
@CurrentUser
UserBean
userBean
)
{
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
insureApplicant
==
null
){
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
id
(
userBean
.
getOrgCode
()).
build
().
selectById
();
try
{
InsureApplicant
insureApplicant
=
InsureApplicant
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
InsureApplicant
>().
lambda
().
eq
(
InsureApplicant:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
insureApplicant
==
null
)
{
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
id
(
userBean
.
getOrgCode
()).
build
().
selectById
();
insureApplicant
=
getInsureApplicant
(
qyzxEntInfoM
);
insureApplicant
.
setOrgCode
(
userBean
.
getOrgCode
());
insureApplicant
.
insert
();
}
return
ResultUtil
.
data
(
insureApplicant
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
CustomException
(
"获取投保人异常"
);
}
}
}
src/main/java/cn/timer/api/controller/insure/InsureUserController.java
View file @
8e8d251a
...
...
@@ -114,6 +114,7 @@ public class InsureUserController{
policyDto
.
setCategoryId
(
categoryId
);
List
<
PolicyDto
>
list
=
insureUserMapper
.
selectPolicyList
(
policyDto
);
String
[]
rowName
=
new
String
[]{
"ID"
,
"name"
,
"ID_type"
,
"ID_number"
,
"Scheme_name"
,
"Date_start"
,
"Branch"
,
"Tricycle_frame_number"
,
"benefit_occupation_category"
};
/*XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);*/
// for ()
// XSSFWorkbook xssfWorkbook = ExcelUtils.exportExcel("导出人员清单.xlsx", rowName, list);
}
}
src/main/java/cn/timer/api/controller/insure/task/InsureTaskTiming.java
View file @
8e8d251a
...
...
@@ -5,6 +5,7 @@ import cn.timer.api.bean.insure.InsureLog;
import
cn.timer.api.bean.insure.InsurePolicy
;
import
cn.timer.api.bean.insure.InsureUser
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.dao.insure.InsurePolicyMapper
;
import
cn.timer.api.dao.insure.InsureUserMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
...
...
@@ -36,10 +37,12 @@ public class InsureTaskTiming {
private
YgglMainEmpMapper
ygglMainEmpMapper
;
@Scheduled
(
cron
=
"0 0 0 1 * ?"
)
//每月第一天
public
void
updateInsureStatusTask
()
throws
ParseException
{
public
void
updateInsureStatusTask
(){
try
{
Date
now
=
DateUtil
.
date
();
/*获取正常的保单*/
List
<
InsurePolicy
>
insurePolicyList
=
InsurePolicy
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getStatus
,
"1"
).
lt
(
InsurePolicy:
:
getPolicyDateEnd
,
now
));
List
<
InsurePolicy
>
insurePolicyList
=
InsurePolicy
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
InsurePolicy
>().
lambda
().
eq
(
InsurePolicy:
:
getStatus
,
"1"
).
lt
(
InsurePolicy:
:
getPolicyDateEnd
,
now
));
if
(
insurePolicyList
.
size
()
>
0
)
{
/*获取已经过期保单*/
for
(
InsurePolicy
insurePolicy
:
insurePolicyList
)
{
...
...
@@ -48,14 +51,20 @@ public class InsureTaskTiming {
.
eq
(
InsureUser:
:
getInsureStatus
,
1
));
if
(
insureUsersList
.
size
()
>
0
)
{
int
count
=
ygglMainEmpMapper
.
updateInsure
(
insureUsersList
.
stream
().
map
(
InsureUser:
:
getUserId
).
toArray
(
Integer
[]::
new
));
log
.
info
(
"总共更新员工投保状态
"
,
count
);
log
.
info
(
"总共更新员工投保状态
:"
+
count
);
int
uCount
=
insureUserMapper
.
updateInsure
(
insurePolicyList
.
stream
().
map
(
InsurePolicy:
:
getId
).
toArray
(
Integer
[]::
new
));
log
.
info
(
"总共更新投保人投保状态
"
,
uCount
);
log
.
info
(
"总共更新投保人投保状态
:"
+
uCount
);
}
insurePolicy
.
setStatus
(
"3"
);
insurePolicy
.
updateById
();
InsureLog
.
builder
().
type
(
7
)
.
createTime
(
new
Date
()).
requestType
(
1
).
returnMsg
(
"保单已到期,自动失效"
).
policyId
(
insurePolicy
.
getId
()).
build
().
insert
();
}
}
log
.
error
(
"暂无过期保单"
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
CustomException
(
"保单失效定时器异常"
);
}
}
}
src/main/java/cn/timer/api/dto/insure/PolicyDto.java
View file @
8e8d251a
...
...
@@ -46,4 +46,5 @@ public class PolicyDto {
private
Integer
applyType
;
private
String
monthD
;
private
String
userName
;
private
String
companyName
;
}
src/main/resources/mapping/insure/InsurePolicyMapper.xml
View file @
8e8d251a
...
...
@@ -268,6 +268,9 @@
<if
test=
"policy.policyDateStart!=null and policy.policyDateStart!=''"
>
and ip.policy_date_start
<![CDATA[ >= ]]>
#{policy.policyDateStart}
</if>
<if
test=
"policy.companyName!=null and policy.companyName!=''"
>
and qy.name like CONCAT('%',#{policy.companyName},'%')
</if>
</where>
GROUP BY ip.id
order by ip.create_time desc
...
...
@@ -319,17 +322,17 @@
<select
id=
"policyTotalList"
resultType=
"cn.timer.api.dto.insure.PolicyDto"
>
SELECT
ip.id
as
id,
ip.
name
AS schemeName,
ip.id
AS
id,
ip.
NAME
AS schemeName,
ip.type AS type,
count(ipp.id
) AS totaPolicy,
count(ipp.org_code) AS
totalCompany,
(select count(id) from insure_policy WHERE product_id=ip.id
) AS totaPolicy,
(select count(org_code) from insure_policy WHERE product_id=ip.id) as
totalCompany,
count( iu.id ) AS totalUser,
sum(
iu.price) as
totalPremium,
sum(
iu.price ) AS
totalPremium,
ipp.update_time AS updateTime
FROM
insure_product ip
LEFT JOIN insure_policy ipp ON ipp.product_id = ip.id
LEFT JOIN insure_policy ipp ON ipp.product_id = ip.id
and ipp.`status`=1
LEFT JOIN insure_user iu ON iu.policy_id = ipp.id
WHERE
ip.is_del = 0
...
...
src/main/resources/mapping/qyzx/QyzxEntInfoMMapper.xml
View file @
8e8d251a
...
...
@@ -237,6 +237,17 @@
<select
id=
"companyAdminCount"
resultType=
"java.lang.Integer"
>
select count(qeim.id) from qyzx_ent_info_m qeim
<where>
<if
test=
"param.name != null and param.name !=''"
>
and qeim.NAME like CONCAT('%',#{param.name},'%')
</if>
<if
test=
"param.linkMan != null and param.linkMan !=''"
>
and qeim.link_man like CONCAT('%',#{param.linkMan},'%')
</if>
<if
test=
"param.linkManPhone != null and param.linkManPhone !=''"
>
and qeim.phone like CONCAT('%',#{param.linkManPhone},'%')
</if>
</where>
</select>
<select
id =
"getCompanyList"
resultType=
"java.util.HashMap"
>
...
...
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