Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
58dc8f00
Commit
58dc8f00
authored
Jul 19, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
4378d128
f06b8139
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
2126 additions
and
100 deletions
+2126
-100
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+7
-1
EmployeeContractExportVO.java
...ud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
+4
-4
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+2
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+5
-5
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+15
-1
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+8
-0
ValidityConstants.java
....plus.v1/yifu/common/core/constant/ValidityConstants.java
+6
-0
DateUtil.java
...om/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
+28
-2
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+106
-0
InsuranceRefundCheck.java
.../plus/v1/yifu/insurances/entity/InsuranceRefundCheck.java
+69
-0
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+17
-2
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+85
-13
TInsuranceType.java
.../cloud/plus/v1/yifu/insurances/entity/TInsuranceType.java
+10
-2
TInsuranceTypeRate.java
...ud/plus/v1/yifu/insurances/entity/TInsuranceTypeRate.java
+15
-2
TInsuranceTypeStandard.java
...lus/v1/yifu/insurances/entity/TInsuranceTypeStandard.java
+9
-7
BeanCopyUtils.java
...ifu/cloud/plus/v1/yifu/insurances/util/BeanCopyUtils.java
+36
-0
LocalDateUtil.java
...ifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
+155
-0
ValidityUtil.java
...yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
+334
-0
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+64
-18
InsuranceTypeVo.java
...ifu/cloud/plus/v1/yifu/insurances/vo/InsuranceTypeVo.java
+28
-0
pom.xml
yifu-insurances/yifu-insurances-biz/pom.xml
+6
-0
TInsuranceCompanyController.java
...fu/insurances/controller/TInsuranceCompanyController.java
+34
-9
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+42
-0
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+16
-15
TInsuranceTypeRateController.java
...u/insurances/controller/TInsuranceTypeRateController.java
+44
-2
TInsuranceTypeStandardController.java
...surances/controller/TInsuranceTypeStandardController.java
+42
-2
TInsuranceTypeMapper.java
.../plus/v1/yifu/insurances/mapper/TInsuranceTypeMapper.java
+21
-1
TInsuranceCompanyService.java
.../v1/yifu/insurances/service/TInsuranceCompanyService.java
+46
-1
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+27
-0
TInsuranceTypeRateService.java
...v1/yifu/insurances/service/TInsuranceTypeRateService.java
+29
-0
TInsuranceTypeService.java
...lus/v1/yifu/insurances/service/TInsuranceTypeService.java
+29
-1
TInsuranceTypeStandardService.java
...ifu/insurances/service/TInsuranceTypeStandardService.java
+26
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+135
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+310
-0
TInsuranceTypeRateServiceImpl.java
...nsurances/service/impl/TInsuranceTypeRateServiceImpl.java
+87
-0
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+82
-0
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+99
-0
application-dev.yml
...ifu-insurances-biz/src/main/resources/application-dev.yml
+1
-1
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+15
-7
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+30
-0
TInsuranceTypeStandardMapper.xml
...rc/main/resources/mapper/TInsuranceTypeStandardMapper.xml
+2
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
58dc8f00
...
...
@@ -135,7 +135,7 @@ public class TEmployeeContractInfo extends BaseEntity {
* 签订类型(字典也是汉字
*/
@NotBlank
(
message
=
"签订类型不能为空"
)
@Length
(
max
=
1
,
message
=
"签订类型不能超过1个字符"
)
@Length
(
max
=
1
00
,
message
=
"签订类型不能超过1个字符"
)
@ExcelAttribute
(
name
=
"签订类型"
,
isNotEmpty
=
true
,
errorInfo
=
"签订类型不能为空"
,
maxLength
=
100
)
@Schema
(
description
=
"签订类型(字典也是汉字)"
,
name
=
"situation"
)
private
String
situation
;
...
...
@@ -435,6 +435,12 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema
(
description
=
"原因说明"
,
name
=
"reason"
)
private
String
reason
;
/**
* 是否附件 0是/1否
*/
@Schema
(
description
=
"是否附件 0是/1否"
)
@TableField
(
exist
=
false
)
private
String
isAtta
;
@Schema
(
description
=
"附件idList"
)
@TableField
(
exist
=
false
)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
View file @
58dc8f00
...
...
@@ -78,17 +78,17 @@ public class EmployeeContractExportVO implements Serializable {
private
String
contractEnd
;
@ExcelProperty
(
"档案-省"
)
@ExcelAttribute
(
name
=
"档案-省"
,
maxLength
=
32
,
is
DataId
=
true
,
isArea
=
true
,
parentField
=
""
)
@ExcelAttribute
(
name
=
"档案-省"
,
maxLength
=
32
,
is
Area
=
true
)
@Schema
(
description
=
"档案-省"
,
name
=
"fileProvince"
)
private
String
fileProvince
;
@ExcelProperty
(
"档案-市"
)
@ExcelAttribute
(
name
=
"档案-市"
,
maxLength
=
32
,
is
DataId
=
true
,
is
Area
=
true
,
parentField
=
"fileProvince"
)
@ExcelAttribute
(
name
=
"档案-市"
,
maxLength
=
32
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@Schema
(
description
=
"档案-市"
,
name
=
"fileCity"
)
private
String
fileCity
;
@ExcelProperty
(
"档案-县"
)
@ExcelAttribute
(
name
=
"档案-县"
,
maxLength
=
32
,
is
DataId
=
true
,
is
Area
=
true
,
parentField
=
"fileCity"
)
@ExcelAttribute
(
name
=
"档案-县"
,
maxLength
=
32
,
isArea
=
true
,
parentField
=
"fileCity"
)
@Schema
(
description
=
"档案-县"
,
name
=
"fileTown"
)
private
String
fileTown
;
...
...
@@ -114,7 +114,7 @@ public class EmployeeContractExportVO implements Serializable {
@Schema
(
description
=
"合同类型"
,
name
=
"contractName"
)
private
String
contractName
;
@ExcelProperty
(
"
申请编号
"
)
@ExcelProperty
(
"
业务细分
"
)
@NotBlank
(
message
=
"业务细分不能为空"
)
@Length
(
max
=
32
,
message
=
"业务细分不能超过32个字符"
)
@ExcelAttribute
(
name
=
"业务细分"
,
maxLength
=
32
,
needExport
=
true
)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
58dc8f00
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeContractInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO
;
...
...
@@ -69,6 +70,7 @@ public class TEmployeeContractInfoController {
@Operation
(
summary
=
"归档分页查询(审核通过的数据(后面加上权限:自己创建的))"
,
description
=
"归档分页查询"
)
@GetMapping
(
"/filingPage"
)
public
R
<
IPage
<
TEmployeeContractInfo
>>
getFilingPage
(
Page
<
TEmployeeContractInfo
>
page
,
TEmployeeContractInfo
tEmployeeContractInfo
)
{
tEmployeeContractInfo
.
setSituation
(
EmployeeConstants
.
SITUATION_SIX
);
tEmployeeContractInfo
.
setAuditStatus
(
CommonConstants
.
dingleDigitIntArray
[
2
]);
return
new
R
<>(
tEmployeeContractInfoService
.
getTEmployeeContractInfoPage
(
page
,
tEmployeeContractInfo
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
58dc8f00
...
...
@@ -197,10 +197,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private
void
initEmployeeContract
(
TEmployeeContractInfo
tEmployeeContractInfo
,
TEmployeeInfo
tEmployeeInfo
,
TEmployeeProject
tEmployeeProject
,
YifuUser
user
)
{
tEmployeeContractInfo
.
setEmpId
(
tEmployeeInfo
.
getId
());
tEmployeeContractInfo
.
setEmpNatrue
(
tEmployee
Info
.
getEmpNatrue
());
tEmployeeContractInfo
.
setEmpNatrue
(
tEmployee
Project
.
getEmpNatrue
());
tEmployeeContractInfo
.
setEmpIdcard
(
tEmployeeInfo
.
getEmpIdcard
());
tEmployeeContractInfo
.
setEmpName
(
tEmployeeInfo
.
getEmpName
());
tEmployeeContractInfo
.
setEmpNo
(
tEmployee
Info
.
getEmpCode
());
tEmployeeContractInfo
.
setEmpNo
(
tEmployee
Project
.
getEmpNo
());
if
(
Common
.
isEmpty
(
tEmployeeContractInfo
.
getCreateBy
()))
{
tEmployeeContractInfo
.
setCreateBy
(
null
==
user
?
""
:
user
.
getId
());
tEmployeeContractInfo
.
setCreateName
(
null
==
user
?
""
:
user
.
getNickname
());
...
...
@@ -792,7 +792,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
!=
null
&&
contractInfo
.
getExportFields
()
!=
null
&&
!
contractInfo
.
getExportFields
().
isEmpty
())
{
String
fileName
=
"员工合同批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExport
History
(
contractInfo
);
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExport
(
contractInfo
);
ServletOutputStream
out
=
null
;
if
(
list
==
null
||
list
.
isEmpty
())
{
list
=
new
ArrayList
<>();
...
...
@@ -830,7 +830,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Override
public
void
exportContractInfoHistory
(
TEmployeeContractInfo
contractInfo
,
HttpServletResponse
response
)
{
if
(
contractInfo
!=
null
&&
contractInfo
.
getExportFields
()
!=
null
&&
!
contractInfo
.
getExportFields
().
isEmpty
())
{
String
fileName
=
"员工合同批量导出
[合并]
"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"员工合同批量导出
【合并历史】
"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExportHistory
(
contractInfo
);
ServletOutputStream
out
=
null
;
...
...
@@ -848,7 +848,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
).
includeColumnFiledNames
(
contractInfo
.
getExportFields
())
.
sheet
(
"员工合同
[合并]
"
).
doWrite
(
list
);
.
sheet
(
"员工合同
【合并历史】
"
).
doWrite
(
list
);
out
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
EmployeeConstants
.
CONCART_ALL_EXPORT_EXCEPTION
,
e
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
58dc8f00
...
...
@@ -206,6 +206,12 @@
</sql>
<sql
id=
"tEmployeeContractInfo_where"
>
<if
test=
"tEmployeeContractInfo != null"
>
<if
test=
"tEmployeeContractInfo.idList != null"
>
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"tEmployeeContractInfo.idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
<if
test=
"tEmployeeContractInfo.id != null and tEmployeeContractInfo.id.trim() != ''"
>
AND a.ID = #{tEmployeeContractInfo.id}
</if>
...
...
@@ -240,7 +246,12 @@
AND a.SUBJECT_UNIT = #{tEmployeeContractInfo.subjectUnit}
</if>
<if
test=
"tEmployeeContractInfo.situation != null and tEmployeeContractInfo.situation.trim() != ''"
>
AND a.SITUATION = #{tEmployeeContractInfo.situation}
<if
test=
"tEmployeeContractInfo.situation == '作废' "
>
AND a.SITUATION != '作废' AND a.SITUATION != '终止'
</if>
<if
test=
"tEmployeeContractInfo.situation != '作废' "
>
AND a.SITUATION = #{tEmployeeContractInfo.situation}
</if>
</if>
<if
test=
"tEmployeeContractInfo.contractTerm != null"
>
AND a.CONTRACT_TERM = #{tEmployeeContractInfo.contractTerm}
...
...
@@ -257,6 +268,9 @@
<if
test=
"tEmployeeContractInfo.isFile != null and tEmployeeContractInfo.isFile.trim() != ''"
>
AND a.IS_FILE = #{tEmployeeContractInfo.isFile}
</if>
<if
test=
"tEmployeeContractInfo.isAtta != null and tEmployeeContractInfo.isAtta.trim() != ''"
>
AND a.IS_FILE = #{tEmployeeContractInfo.isAtta}
</if>
<if
test=
"tEmployeeContractInfo.oldId != null"
>
AND a.OLD_ID = #{tEmployeeContractInfo.oldId}
</if>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
58dc8f00
...
...
@@ -176,6 +176,14 @@ public interface CommonConstants {
**/
String
[]
dingleDigitStrArray
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
};
/**
* 月份(阿里编码规约不允许直接使用‘魔法值’)
* @Author pwang
* @Date 2019-08-02 16:39
**/
String
[]
MonthStrArray
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
};
/**
* 逗号
* @Author fxj
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ValidityConstants.java
View file @
58dc8f00
...
...
@@ -49,4 +49,10 @@ public class ValidityConstants {
/**日期格式化3*/
public
static
final
String
DATEFORMAT3_PATTERN
=
"YYYY-MM"
;
/**姓名规则 汉字、英文、· 最多10位*/
public
static
final
String
USER_NAME_PATTERN
=
"^[\\u4e00-\\u9fa5a-zA-Z\\·]{1,10}"
;
/** 全汉字 最多20位 规则 */
public
static
final
String
CHINESE_PATTERN_20
=
"^[\\u4E00-\\u9FA5]{1,20}"
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
View file @
58dc8f00
...
...
@@ -1162,6 +1162,34 @@ public class DateUtil {
return
sdf
.
format
(
date
);
}
/**
* @param date
* @param patten
* @Description: 按指定格式返回
* @Author: hgw
* @Date: 2022/7/19 17:10
* @return: java.lang.String
**/
public
static
String
formatDatePatten
(
Date
date
,
String
patten
)
{
if
(
Common
.
isEmpty
(
patten
))
{
patten
=
DATETIME_YYYYMM
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
patten
);
return
sdf
.
format
(
date
);
}
/**
* @param date
* @Description: 按指定格式返回int
* @Author: hgw
* @Date: 2022/7/19 17:13
* @return: java.lang.Integer
**/
public
static
Integer
formatDateInt
(
Date
date
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
DATETIME_YYYYMM
);
return
Integer
.
parseInt
(
sdf
.
format
(
date
));
}
/**
* @param mnt 增减月份的 值
* @param yearMonth 202101
...
...
@@ -1440,7 +1468,6 @@ public class DateUtil {
* @Date: 2020/12/21
* @Description: 获取上个月
* @return: java.lang.String
* @see com.yifu.cloud.v1.common.core.util
**/
public
static
String
getLastMonth
(){
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_YYYYMM
);
...
...
@@ -1459,7 +1486,6 @@ public class DateUtil {
* @Date: 2020/12/21
* @Description: 获取上n个月
* @return: java.lang.String
* @see com.yifu.cloud.v1.common.core.util
**/
public
static
String
getLastXMonth
(
int
month
){
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_YYYYMM
);
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
58dc8f00
...
...
@@ -6,4 +6,110 @@ package com.yifu.cloud.plus.v1.yifu.insurances.constants;
* @date 2022-07-18 17:52:59
*/
public
class
InsurancesConstants
{
/**
* 新增投保成功
*/
public
static
final
String
ADD_SUCCESS
=
"新增投保成功"
;
/**
* 投保信息已存在
*/
public
static
final
String
DATA_IS_EXIST
=
"投保信息已存在"
;
/**
* 订单编号不能为空
*/
public
static
final
String
ORDER_NO_NOT_EMPTY
=
"订单编号不能为空"
;
/**
* 员工姓名不能为空
*/
public
static
final
String
EMP_NAME_NOT_EMPTY
=
"员工姓名不能为空"
;
/**
* 员工身份证号不能为空
*/
public
static
final
String
EMP_IDCARD_NO_NOT_EMPTY
=
"员工身份证号不能为空"
;
/**
* 员工身份证号格式有误
*/
public
static
final
String
EMP_IDCARD_NO_NOT_LEGITIMATE
=
"员工身份证号格式有误"
;
/**
* 项目编码不能为空
*/
public
static
final
String
DEPT_NO_NOT_EMPTY
=
"项目编码不能为空"
;
/**
* 保险公司名称不能为空
*/
public
static
final
String
INSURANCE_COMPANY_NAME_NOT_EMPTY
=
"保险公司名称不能为空"
;
/**
* 保险公司不存在
*/
public
static
final
String
INSURANCE_COMPANY_NAME_NOT_EXIST
=
"保险公司不存在"
;
/**
* 险种名称不能为空
*/
public
static
final
String
INSURANCE_TYPE_NAME_NOT_EMPTY
=
"险种名称不能为空"
;
/**
* 险种不存在
*/
public
static
final
String
INSURANCE_TYPE_NAME_NOT_EXIST
=
"险种不存在"
;
/**
* 保单开始时间不能为空
*/
public
static
final
String
POLICY_START_NOT_EMPTY
=
"保单开始时间不能为空"
;
/**
* 保单开始时间格式错误
*/
public
static
final
String
POLICY_START_PARSE_ERROR
=
"保单开始时间格式错误"
;
/**
* 保单开始时间不能小于派单时间
*/
public
static
final
String
POLICY_START_SHOULD_IS_FUTURE
=
"保单开始时间不能小于派单时间"
;
/**
* 保单结束时间不能为空
*/
public
static
final
String
POLICY_END_NOT_EMPTY
=
"保单结束时间不能为空"
;
/**
* 保单结束时间格式错误
*/
public
static
final
String
POLICY_END_PARSE_ERROR
=
"保单结束时间格式错误"
;
/**
* 购买标准不能为空
*/
public
static
final
String
BUY_STANDARD_NOT_EMPTY
=
"购买标准不能为空"
;
/**
* 购买标准不存在
*/
public
static
final
String
BUY_STANDARD_NOT_EXIST
=
"购买标准不存在"
;
/**
* 商险购买地省名称不能为空
*/
public
static
final
String
INSURANCE_PROVINCE_NAME_NOT_EMPTY
=
"商险购买地省名称不能为空"
;
/**
* 商险购买地市名称
*/
public
static
final
String
INSURANCE_CITY_NAME_NOT_EMPTY
=
"商险购买地市名称不能为空"
;
/**
* 商险办理省名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
=
"商险办理省名称不能为空"
;
/**
* 商险办理城市名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
=
"商险办理城市名称不能为空"
;
/**
* 结算月不能为空
*/
public
static
final
String
SETTLE_MONTH_NOT_EMPTY
=
"结算月不能为空"
;
/**
* 结算月格式错误
*/
public
static
final
String
SETTLE_MONTH_PARSE_ERROR
=
"结算月格式错误"
;
/**
* 结算月不能小于派单月
*/
public
static
final
String
SETTLE_MONTH_SHOULD_IS_FUTURE
=
"结算月不能小于派单月"
;
/**
* 岗位不能为空
*/
public
static
final
String
POST_NOT_EMPTY
=
"岗位不能为空"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/InsuranceRefundCheck.java
0 → 100644
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhaji
* @description 减员校验类
* @date 2022-07-19 09:09:41
*/
@Data
@Tag
(
name
=
"减员校验类"
)
public
class
InsuranceRefundCheck
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号码
*/
@Schema
(
description
=
"员工身份证号码"
)
private
String
empIdCardNo
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 保单开始日期
*/
@Schema
(
description
=
"保单开始日期"
)
private
String
policyStart
;
/**
* 保单结束日期
*/
@Schema
(
description
=
"保单结束日期"
)
private
String
policyEnd
;
/**
* 退款金额
*/
@Schema
(
description
=
"退款金额"
)
private
String
refundMoney
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 错误信息
*/
@Schema
(
description
=
"错误信息"
)
private
String
errorMessage
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
View file @
58dc8f00
...
...
@@ -2,11 +2,15 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.NonNull
;
import
org.checkerframework.common.value.qual.StringVal
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* 保险公司表
...
...
@@ -22,26 +26,37 @@ public class TInsuranceCompany extends BaseEntity {
/**
* 保险公司id
*/
private
Lo
ng
id
;
private
Stri
ng
id
;
/**
* 保险公司名称
*/
@NotBlank
(
message
=
"保险公司名称不能为空"
)
private
String
companyName
;
/**
* 保险公司地址
*/
@NotBlank
(
message
=
"保险公司地址不能为空"
)
private
String
companyAddress
;
/**
* 对接人
*/
@NotBlank
(
message
=
"对接人不能为空"
)
private
String
companyDocking
;
/**
* 计费方式
*/
@NotBlank
(
message
=
"计费方式不能为空"
)
@StringVal
({
"0"
,
"1"
})
private
String
billingType
;
/**
* 删除标志(0:未删除,1:删除)
*/
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
58dc8f00
...
...
@@ -8,9 +8,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
...
...
@@ -36,149 +33,223 @@ public class TInsuranceDetail extends BaseEntity {
/**
* 员工档案id
*/
@Schema
(
description
=
"员工档案id"
)
private
String
empId
;
/**
* 员工姓名
*/
@NotBlank
(
message
=
"员工姓名不能为空"
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目编码
*/
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
/**
* 投保岗位
*/
@Schema
(
description
=
"投保岗位"
)
private
String
post
;
/**
* 保险公司名称(冗余字段)
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种
主键
* 险种
名称
*/
private
String
insuranceTypeId
;
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 险种主键
*/
@Schema
(
description
=
"险种主键"
)
private
Long
insuranceTypeId
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 医疗额度
*/
@Schema
(
description
=
"医疗额度"
)
private
String
medicalQuota
;
/**
* 身故或残疾额度
*/
@Schema
(
description
=
"身故或残疾额度"
)
private
String
dieDisableQuota
;
/**
* 保单编号
*/
@Schema
(
description
=
"保单编号"
)
private
String
policyNo
;
/**
* 保单开始时间
*/
@Schema
(
description
=
"保单开始时间"
)
private
LocalDate
policyStart
;
/**
* 保单结束时间
*/
@Schema
(
description
=
"保单结束时间"
)
private
LocalDate
policyEnd
;
/**
* 保单生效日期
*/
@Schema
(
description
=
"保单生效日期"
)
private
LocalDate
policyEffect
;
/**
* 办理时间
*/
@Schema
(
description
=
"办理时间"
)
private
LocalDateTime
batchDate
;
/**
* 结算月
*/
private
String
settleMonth
;
/**
* 结算月
*/
@Schema
(
description
=
"结算月"
)
private
String
settleMonth
;
/**
* 发票号
*/
@Schema
(
description
=
"发票号"
)
private
String
invoiceNo
;
/**
* 购买类型, 1新增、3批增、4替换
*/
@Schema
(
description
=
" 购买类型, 1新增、3批增、4替换"
)
private
Integer
buyType
;
/**
* 商险购买地省code
*/
@Schema
(
description
=
"商险购买地省code"
)
private
Integer
insuranceProvince
;
/**
* 商险购买地省
*/
@Schema
(
description
=
"商险购买地省"
)
private
String
insuranceProvinceName
;
/**
* 商险购买地市code
*/
@Schema
(
description
=
"商险购买地市code"
)
private
Integer
insuranceCity
;
/**
* 商险购买地市
*/
@Schema
(
description
=
"商险购买地市"
)
private
String
insuranceCityName
;
/**
* 商险办理省code
*/
@Schema
(
description
=
"商险办理省code"
)
private
Integer
insuranceHandleProvince
;
/**
* 商险办理省
*/
@Schema
(
description
=
"商险办理省"
)
private
String
insuranceHandleProvinceName
;
/**
* 商险办理城市code
*/
@Schema
(
description
=
"商险办理城市code"
)
private
Integer
insuranceHandleCity
;
/**
* 商险办理城市
*/
@Schema
(
description
=
"商险办理城市"
)
private
String
insuranceHandleCityName
;
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
*/
private
String
settleType
;
@Schema
(
description
=
"结算类型 (1、单独结算 2、合并结算-和工资一起结算)"
)
private
Integer
settleType
;
/**
* 实际保费
*/
@Schema
(
description
=
"实际保费"
)
private
BigDecimal
actualPremium
;
/**
* 预估保费
*/
@Schema
(
description
=
"预估保费"
)
private
BigDecimal
estimatePremium
;
/**
* 差额(实缴-预估)
*/
@Schema
(
description
=
"差额(实缴-预估)"
)
private
BigDecimal
settleBalance
;
/**
* 投保办理状态 1待
办理 2办理中 3已办理
4投保退回 5 已减员
* 投保办理状态 1待
投保 2投保中 3已投保
4投保退回 5 已减员
*/
@Schema
(
description
=
"投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员"
)
private
Integer
buyHandleStatus
;
/**
* 结算办理状态 1待结算 2结算中 3已结算
*/
@Schema
(
description
=
"结算办理状态 1待结算 2结算中 3已结算"
)
private
Integer
settleHandleStatus
;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
Integer
reduceHandleStatus
;
/**
* 是否出险 0未出险 1已出险
*/
@Schema
(
description
=
"是否出险 0未出险 1已出险"
)
private
Integer
isUse
;
/**
* 是否有效 0有效 1无效
*/
@Schema
(
description
=
"是否有效 0有效 1无效"
)
private
Integer
isEffect
;
/**
...
...
@@ -190,6 +261,7 @@ public class TInsuranceDetail extends BaseEntity {
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceType.java
View file @
58dc8f00
...
...
@@ -2,10 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
@@ -24,33 +26,39 @@ public class TInsuranceType extends BaseEntity {
private
Long
id
;
/**
*
保险
名称
*
险种
名称
*/
@NotBlank
(
message
=
"险种名称不能为空"
)
private
String
name
;
/**
* 保险公司主键ID
*/
private
Long
insuranceCompanyId
;
@NotBlank
(
message
=
"所属保险公司不能为空"
)
private
String
insuranceCompanyId
;
/**
* 收款单位名称
*/
@NotBlank
(
message
=
"收款单位名称不能为空"
)
private
String
receiptUnitName
;
/**
* 收款银行名称
*/
@NotBlank
(
message
=
"收款银行名称不能为空"
)
private
String
bankName
;
/**
* 收款银行账号
*/
@NotBlank
(
message
=
"收款银行账号不能为空"
)
private
String
bankNo
;
/**
* 删除标志(0:未删除,1:删除)
*/
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceTypeRate.java
View file @
58dc8f00
...
...
@@ -2,10 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotBlank
;
import
java.math.BigDecimal
;
/**
...
...
@@ -25,16 +27,27 @@ public class TInsuranceTypeRate extends BaseEntity {
/**
* 险种ID
*/
@NotBlank
(
message
=
"所属险种不能为空"
)
private
String
insuranceTypeId
;
/**
* 月数
*/
private
Integer
month
;
@NotBlank
(
message
=
"月不能为空"
)
private
String
month
;
/**
* 费率
*/
private
BigDecimal
rate
;
@NotBlank
(
message
=
"费率不能为空"
)
private
String
rate
;
/**
* 删除标志(0:未删除,1:删除)
*/
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceTypeStandard.java
View file @
58dc8f00
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -14,7 +15,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_insurance_type_standard"
)
@Tag
(
name
=
"
保险公司
表"
)
@Tag
(
name
=
"
购买标准
表"
)
public
class
TInsuranceTypeStandard
extends
BaseEntity
{
/**
*
...
...
@@ -24,18 +25,13 @@ public class TInsuranceTypeStandard extends BaseEntity {
/**
* 险种主键ID
*/
private
Stri
ng
insuranceTypeId
;
private
Lo
ng
insuranceTypeId
;
/**
* 购买标准
*/
private
String
buyStandard
;
/**
*
*/
private
Integer
type
;
/**
* 医疗额度
*/
...
...
@@ -45,4 +41,10 @@ public class TInsuranceTypeStandard extends BaseEntity {
* 身故或残疾额度
*/
private
String
dieDisableQuota
;
/**
* 删除标志(0:未删除,1:删除)
*/
@Schema
(
description
=
"是否删除 0否/1是"
)
private
Integer
deleteFlag
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/BeanCopyUtils.java
0 → 100644
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanWrapper
;
import
org.springframework.beans.BeanWrapperImpl
;
import
java.util.HashSet
;
import
java.util.Set
;
/**
* @auther wangan
* @date 2019/12/3
* bean复制,忽视空串
*/
public
class
BeanCopyUtils
{
public
static
String
[]
getNullPropertyNames
(
Object
source
)
{
final
BeanWrapper
src
=
new
BeanWrapperImpl
(
source
);
java
.
beans
.
PropertyDescriptor
[]
pds
=
src
.
getPropertyDescriptors
();
Set
<
String
>
emptyNames
=
new
HashSet
<>();
for
(
java
.
beans
.
PropertyDescriptor
pd
:
pds
)
{
Object
srcValue
=
src
.
getPropertyValue
(
pd
.
getName
());
if
(
srcValue
==
null
)
{
emptyNames
.
add
(
pd
.
getName
());
}
}
String
[]
result
=
new
String
[
emptyNames
.
size
()];
return
emptyNames
.
toArray
(
result
);
}
public
static
void
copyProperties
(
Object
src
,
Object
target
)
{
BeanUtils
.
copyProperties
(
src
,
target
,
getNullPropertyNames
(
src
));
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/LocalDateUtil.java
0 → 100644
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Locale
;
/**
* @author licancan
* @description 日期工具类
* @date 2022-07-19 14:20:54
*/
public
class
LocalDateUtil
{
/**
* 年格式:yyyy
*/
public
static
final
String
NORM_YEAR_PATTERN
=
"yyyy"
;
/**
* 年月格式:yyyy-MM
*/
public
static
final
String
NORM_MONTH_PATTERN
=
"yyyy-MM"
;
/**
* 标准日期格式:yyyy-MM-dd
*/
public
static
final
String
NORM_DATE_PATTERN
=
"yyyy-MM-dd"
;
/**
* 标准时间格式:HH:mm:ss
*/
public
static
final
String
NORM_TIME_PATTERN
=
"HH:mm:ss"
;
/**
* 标准日期时间格式,精确到分:yyyy-MM-dd HH:mm
*/
public
static
final
String
NORM_DATETIME_MINUTE_PATTERN
=
"yyyy-MM-dd HH:mm"
;
/**
* 标准日期时间格式,精确到秒:yyyy-MM-dd HH:mm:ss
*/
public
static
final
String
NORM_DATETIME_PATTERN
=
"yyyy-MM-dd HH:mm:ss"
;
/**
* 判断是否是日期
*
* @author licancan
* @param strDate
* @return {@link Boolean}
*/
public
static
Boolean
isDate
(
String
strDate
,
String
pattern
){
if
(
Common
.
isEmpty
(
strDate
)){
return
false
;
}
try
{
DateFormat
dateFormat
=
new
SimpleDateFormat
(
pattern
);
Date
date
=
dateFormat
.
parse
(
strDate
);
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
date
);
return
true
;
}
catch
(
ParseException
pe
){
System
.
out
.
println
(
"日期解析异常,返回false"
);
return
false
;
}
}
/**
* 字符串格式的日期转LocalDate
*
* @author licancan
* @param strDate
* @return {@link LocalDate}
*/
public
static
LocalDate
parseLocalDate
(
String
strDate
){
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
NORM_DATE_PATTERN
,
Locale
.
CHINA
);
LocalDate
localDate
=
LocalDate
.
parse
(
strDate
,
dateTimeFormatter
);
return
localDate
;
}
/**
* 判断时间是否是将来时间(大于当天)
*
* @author licancan
* @param strDate
* @return {@link boolean}
*/
public
static
boolean
isFutureDate
(
String
strDate
){
boolean
flag
=
false
;
//在日期字符串非空时执行
if
(!
Common
.
isEmpty
(
strDate
))
{
//今日的开始时间
Date
nowDate
=
new
Date
();
Date
pastDate
=
null
;
//格式化日期
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
NORM_DATE_PATTERN
,
Locale
.
CHINA
);
try
{
//将字符串转为日期格式,如果此处字符串为非合法日期就会抛出异常。
pastDate
=
sdf
.
parse
(
strDate
);
//调用Date里面的after方法来做判断
flag
=
pastDate
.
after
(
nowDate
);
if
(
flag
)
{
System
.
out
.
println
(
"该日期晚于今日"
);
}
else
{
System
.
out
.
println
(
"该日期早于今日"
);
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
else
{
System
.
out
.
println
(
"日期参数不可为空"
);
}
return
flag
;
}
/**
* 判断传入的月份是否大于等于本月(结算月份 >= 派单月份)
*
* @author licancan
* @param strMonth 传入的月份
* @return {@link boolean}
*/
public
static
boolean
isCurrentOrFutureMonth
(
String
strMonth
){
boolean
flag
=
false
;
//在日期字符串非空时执行
if
(!
Common
.
isEmpty
(
strMonth
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
NORM_MONTH_PATTERN
,
Locale
.
CHINA
);
try
{
//当前时间
Calendar
cal1
=
Calendar
.
getInstance
();
//传入的字符串解析时间
Calendar
cal2
=
Calendar
.
getInstance
();
Date
parseDate
=
sdf
.
parse
(
strMonth
);
cal2
.
setTime
(
parseDate
);
if
(
cal1
==
null
||
cal2
==
null
)
{
throw
new
IllegalArgumentException
(
"The date must not be null"
);
}
if
(
cal2
.
get
(
Calendar
.
YEAR
)
>
cal1
.
get
(
Calendar
.
YEAR
)){
flag
=
true
;
}
else
if
(
cal2
.
get
(
Calendar
.
YEAR
)
==
cal1
.
get
(
Calendar
.
YEAR
)
&&
cal2
.
get
(
Calendar
.
MONTH
)
>=
cal1
.
get
(
Calendar
.
MONTH
)){
flag
=
true
;
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
else
{
System
.
out
.
println
(
"年月参数不可为空"
);
}
return
flag
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
isCurrentOrFutureMonth
(
"2023-1"
));
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/ValidityUtil.java
0 → 100644
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
java.util.StringTokenizer
;
import
java.util.regex.Pattern
;
public
class
ValidityUtil
{
/**
* @param mobile
* @Description: 验证工资、档案手机号码格式
* @Author: hgw
* @Date: 2021/8/31 10:48
* @return: boolean
**/
public
static
boolean
validateEmpPhone
(
String
mobile
)
{
if
(
Common
.
isEmpty
(
mobile
)){
return
Boolean
.
FALSE
;
}
return
mobile
.
matches
(
ValidityConstants
.
EMP_PHONE_PATTERN
);
}
/**
* 验证手机号码,不符合规则返回true 反之 false
* @author fxj
* @param mobile
* @return
*/
public
static
boolean
checkInvalidEmpPhone
(
String
mobile
)
{
return
!
validateEmpPhone
(
mobile
);
}
/**
* @Description: 验证手机号码格式
* @param mobile 手机号码
* @return boolean
*/
public
static
boolean
validateMobile
(
String
mobile
)
{
if
(
Common
.
isEmpty
(
mobile
)){
return
Boolean
.
FALSE
;
}
return
mobile
.
matches
(
ValidityConstants
.
MOBILE_PATTERN
);
}
/**
* 验证是否是电信手机号,133、153、180、189、177
* @param mobile 手机号
* @return boolean
*/
public
static
boolean
validateTelecom
(
String
mobile
){
if
(
Common
.
isEmpty
(
mobile
)){
return
Boolean
.
FALSE
;
}
return
mobile
.
matches
(
ValidityConstants
.
CHINA_TELECOM_PATTERN
)
;
}
/**
* 验证是否是联通手机号 130,131,132,155,156,185,186,145,176,1707,1708,1709,175
* @param mobile 电话号码
* @return boolean
*/
public
static
boolean
validateUnionMobile
(
String
mobile
){
if
(
Common
.
isEmpty
(
mobile
)){
return
Boolean
.
FALSE
;
}
return
mobile
.
matches
(
ValidityConstants
.
CHINA_UNICOM_PATTERN
)
;
}
/**
* 验证是否是移动手机号
* @param mobile 手机号 134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705
* @return boolean
*/
public
static
boolean
validateMoveMobile
(
String
mobile
){
if
(
Common
.
isEmpty
(
mobile
)){
return
Boolean
.
FALSE
;
}
return
mobile
.
matches
(
ValidityConstants
.
CHINA_MOVE_PATTERN
)
;
}
/**
* @Description: 验证密码格式 6-16 位字母、数字
* @param pwd 密码
* @return boolean
*/
public
static
boolean
validatePwd
(
String
pwd
)
{
if
(
Common
.
isEmpty
(
pwd
)){
return
Boolean
.
FALSE
;
}
return
Pattern
.
matches
(
ValidityConstants
.
PASSWORD_PATTERN
,
pwd
);
}
/**
* 验证座机号码,格式如:58654567,023-58654567
* @param landline 固话、座机
* @return boolean
*/
public
static
boolean
validateLandLine
(
final
String
landline
)
{
if
(
Common
.
isEmpty
(
landline
)){
return
Boolean
.
FALSE
;
}
return
landline
.
matches
(
ValidityConstants
.
LANDLINE_PATTERN
);
}
/**
* 验证邮政编码
* @param postCode 邮政编码
* @return boolean
*/
public
static
boolean
validatePostCode
(
final
String
postCode
){
if
(
Common
.
isEmpty
(
postCode
)){
return
Boolean
.
FALSE
;
}
return
postCode
.
matches
(
ValidityConstants
.
POSTCODE_PATTERN
)
;
}
/**
* 验证邮箱(电子邮件)
* @param email 邮箱(电子邮件)
* @return boolean
*/
public
static
boolean
validateEamil
(
final
String
email
){
if
(
Common
.
isEmpty
(
email
)){
return
Boolean
.
FALSE
;
}
return
email
.
matches
(
ValidityConstants
.
EMAIL_PATTERN
)
;
}
/**
* 判断年龄,1-120之间
* @param age 年龄
* @return boolean
*/
public
static
boolean
validateAge
(
final
String
age
){
if
(
Common
.
isEmpty
(
age
)){
return
Boolean
.
FALSE
;
}
return
age
.
matches
(
ValidityConstants
.
AGE_PATTERN
)
;
}
/**
* 身份证验证
* @param idCard 身份证
* @return boolean
*/
public
static
boolean
validateIDCard
(
final
String
idCard
){
if
(
Common
.
isEmpty
(
idCard
)){
return
Boolean
.
FALSE
;
}
return
idCard
.
matches
(
ValidityConstants
.
IDCARD_PATTERN
)
;
}
/**
* 姓名验证
*
* @author licancan
* @param userName 姓名
* @return {@link boolean}
*/
public
static
boolean
validateUserName
(
final
String
userName
){
if
(
Common
.
isEmpty
(
userName
)){
return
Boolean
.
FALSE
;
}
return
userName
.
matches
(
ValidityConstants
.
USER_NAME_PATTERN
)
;
}
/**
* URL地址验证
* @param url URL地址
* @return boolean
*/
public
static
boolean
validateUrl
(
final
String
url
){
if
(
Common
.
isEmpty
(
url
)){
return
Boolean
.
FALSE
;
}
return
url
.
matches
(
ValidityConstants
.
URL_PATTERN
)
;
}
/**
* 验证QQ号
* @param qq QQ号
* @return boolean
*/
public
static
boolean
validateQq
(
final
String
qq
){
if
(
Common
.
isEmpty
(
qq
)){
return
Boolean
.
FALSE
;
}
return
qq
.
matches
(
ValidityConstants
.
QQ_PATTERN
)
;
}
/**
* 验证字符串是否全是汉字
* @param str 字符串
* @return boolean
*/
public
static
boolean
validateChinese
(
final
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
return
str
.
matches
(
ValidityConstants
.
CHINESE_PATTERN
)
;
}
/**
* 验证字符串是否全是汉字 最多20位
*
* @author licancan
* @param str
* @return {@link boolean}
*/
public
static
boolean
validateChinese20
(
final
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
return
str
.
matches
(
ValidityConstants
.
CHINESE_PATTERN_20
)
;
}
/**
* 校验用户姓名是否是初始化的值
*
* @author licancan
* @param str 姓名
* @param phone 手机号
* @return {@link boolean}
*/
public
static
boolean
validateIsInitialize
(
final
String
str
,
final
String
phone
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
//校验手机号是否正确
if
(!
validateMobile
(
phone
)){
return
Boolean
.
FALSE
;
}
String
initializeInfo
=
"用户"
.
concat
(
phone
.
substring
(
phone
.
length
()-
6
,
phone
.
length
()));
if
(!
str
.
trim
().
equals
(
initializeInfo
)){
return
Boolean
.
FALSE
;
}
return
Boolean
.
TRUE
;
}
/**
* 判断字符串是否全字母
* @param str 字符串
* @return boolean
*/
public
static
boolean
validateStrEnglish
(
final
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
return
str
.
matches
(
ValidityConstants
.
STR_ENG_PATTERN
)
;
}
/**
* 判断是否是整数,包括负数
* @param str 字符串
* @return boolean
*/
public
static
boolean
validateInteger
(
final
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
return
str
.
matches
(
ValidityConstants
.
INTEGER_PATTERN
)
;
}
/**
* 判断是否是大于0的正整数
* @param str 字符串
* @return boolean
*/
public
static
boolean
validatePositiveInt
(
final
String
str
){
if
(
Common
.
isEmpty
(
str
)){
return
Boolean
.
FALSE
;
}
return
str
.
matches
(
ValidityConstants
.
POSITIVE_INTEGER_PATTERN
)
;
}
public
static
boolean
isFloat
(
String
numStr
)
{
if
(
numStr
==
null
){
return
false
;
}
if
(
numStr
==
""
){
return
false
;
}
//验证是否是float型
if
(
numStr
.
contains
(
"."
)){
if
(
numStr
.
indexOf
(
'.'
)==
numStr
.
lastIndexOf
(
'.'
)){
StringTokenizer
st
=
new
StringTokenizer
(
numStr
,
"."
);
while
(
st
.
hasMoreElements
()){
String
splitStr
=
st
.
nextToken
();
for
(
int
i
=
splitStr
.
length
();--
i
>=
0
;){
if
(!
Character
.
isDigit
(
splitStr
.
charAt
(
i
))){
return
false
;
}
}
}
}
}
else
{
return
false
;
}
return
true
;
}
public
static
boolean
isMonth
(
String
month
){
for
(
String
s
:
CommonConstants
.
MonthStrArray
){
if
(
s
.
equals
(
month
)){
return
true
;
}
}
return
false
;
}
public
static
boolean
isInt
(
String
numStr
)
{
if
(
numStr
==
null
){
return
false
;
}
if
(
numStr
==
""
){
return
false
;
}
//验证是否是float型
if
(
numStr
.
contains
(
"."
)){
return
false
;
}
else
{
//验证是否是int型
for
(
int
i
=
numStr
.
length
();--
i
>=
0
;){
if
(!
Character
.
isDigit
(
numStr
.
charAt
(
i
))){
return
false
;
}
}
}
return
true
;
}
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* @author licancan
...
...
@@ -14,97 +11,146 @@ import java.time.LocalDate;
* @date 2022-07-18 17:03:31
*/
@Data
@Tag
(
name
=
"商险办理新增入参"
)
public
class
InsuranceAddParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 订单编号
*/
@NotBlank
(
message
=
"订单编号不能为空"
)
@Length
(
max
=
32
,
message
=
"订单编号不能超过32个字符"
)
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
@NotBlank
(
message
=
"员工姓名不能为空"
)
@Length
(
max
=
32
,
message
=
"员工姓名不能超过32个字符"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@NotBlank
(
message
=
"员工身份证号不能为空"
)
@Length
(
max
=
32
,
message
=
"员工身份证号不能超过32个字符"
)
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 项目编码
*/
@NotBlank
(
message
=
"项目编码不能为空"
)
@Length
(
max
=
32
,
message
=
"项目编码不能超过32个字符"
)
@Schema
(
description
=
"项目编码"
)
private
String
deptNo
;
/**
* 保险公司名称
*/
@NotBlank
(
message
=
"保险公司名称不能为空"
)
@Length
(
max
=
32
,
message
=
"保险公司名称不能超过32个字符"
)
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 险种名称
*/
@NotBlank
(
message
=
"险种名称不能为空"
)
@Length
(
max
=
32
,
message
=
"险种名称不能超过32个字符"
)
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 保单开始时间
*/
private
LocalDate
policyStart
;
@Schema
(
description
=
"保单开始时间"
)
private
String
policyStart
;
/**
* 保单结束时间
*/
private
LocalDate
policyEnd
;
@Schema
(
description
=
"保单结束时间"
)
private
String
policyEnd
;
/**
* 购买标准
*/
@Schema
(
description
=
"购买标准"
)
private
String
buyStandard
;
/**
* 商险购买地省名称
*/
@Schema
(
description
=
"商险购买地省名称"
)
private
String
insuranceProvinceName
;
/**
* 商险购买地市名称
*/
@Schema
(
description
=
"商险购买地市名称"
)
private
String
insuranceCityName
;
/**
* 商险办理省名称
*/
@Schema
(
description
=
"商险办理省名称"
)
private
String
insuranceHandleProvinceName
;
/**
* 商险办理城市名称
*/
@Schema
(
description
=
"商险办理城市名称"
)
private
String
insuranceHandleCityName
;
/**
* 结算月
*/
@Schema
(
description
=
"结算月"
)
private
String
settleMonth
;
/**
* 岗位
*/
@Schema
(
description
=
"岗位"
)
private
String
post
;
/**
* 备注
*/
@Schema
(
description
=
"备注"
)
private
String
remark
;
/**
* 错误信息
*/
private
String
errorMessage
;
/***********************************以下字段由系统算出,前端不用传,是为了方便入库***********************************/
/**
* 结算类型 (1、单独结算 2、合并结算-和工资一起结算)
*/
private
Integer
settleType
;
/**
* 医疗额度
*/
private
String
medicalQuota
;
/**
* 身故或残疾额度
*/
private
String
dieDisableQuota
;
/**
* 险种主键
*/
private
Long
insuranceTypeId
;
/**
* 商险购买地省code
*/
private
Integer
insuranceProvince
;
/**
* 商险购买地市code
*/
private
Integer
insuranceCity
;
/**
* 商险办理省code
*/
private
Integer
insuranceHandleProvince
;
/**
* 商险办理城市code
*/
private
Integer
insuranceHandleCity
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceTypeVo.java
0 → 100644
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author zhaji
* @description 险种信息返回类
* @date 2022-07-19 10:26:33
*/
@Data
public
class
InsuranceTypeVo
extends
TInsuranceType
{
/**
* 费率信息
*/
private
List
<
TInsuranceTypeRate
>
insuranceTypeRateList
;
/**
* 购买标准
*/
private
List
<
TInsuranceTypeStandard
>
insuranceTypeStandardList
;
}
yifu-insurances/yifu-insurances-biz/pom.xml
View file @
58dc8f00
...
...
@@ -59,6 +59,12 @@
<version>
5.8.0
</version>
<artifactId>
hutool-all
</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
<dependency>
<groupId>
commons-collections
</groupId>
<artifactId>
commons-collections
</artifactId>
<version>
3.2.2
</version>
</dependency>
</dependencies>
<build>
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceCompanyController.java
View file @
58dc8f00
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
...
...
@@ -15,6 +16,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author zhaji
...
...
@@ -37,9 +39,9 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 保险公司
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
//
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TInsuranceCompany
>>
get
TCertRecord
Page
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
public
R
<
IPage
<
TInsuranceCompany
>>
get
InsuranceCompany
Page
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
return
R
.
ok
(
insuranceCompanyService
.
pageDiy
(
page
,
insuranceCompany
));
}
...
...
@@ -48,9 +50,7 @@ public class TInsuranceCompanyController {
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询保险公司详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceCompany_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceCompany_get')"
)
public
R
<
TInsuranceCompany
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceCompanyService
.
getById
(
id
));
}
...
...
@@ -61,13 +61,38 @@ public class TInsuranceCompanyController {
* @param insuranceCompany 保险公司明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增证明开具记录表
:hasPermission('demo_insuranceCompany_add')"
)
//@Operation(summary = "新增保险公司", description = "新增保险公司
:hasPermission('demo_insuranceCompany_add')")
@SysLog
(
"新增保险公司"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceCompany_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
R
.
ok
(
insuranceCompanyService
.
save
(
insuranceCompany
));
@PostMapping
(
"/save"
)
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_add')" )
public
R
save
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
insuranceCompanyService
.
saveInsuranceCompany
(
insuranceCompany
);
}
/**
* 修改保险公司
* @param insuranceCompany 修改实体类
* @return R
*/
//@Operation(summary = "修改保险公司", description = "修改保险公司:hasPermission('demo_insuranceCompany_update')")
@SysLog
(
"修改保险公司"
)
@PostMapping
(
"/update"
)
//@PreAuthorize("@pms.hasPermission('demo_insuranceCompany_update')" )
public
R
update
(
@RequestBody
TInsuranceCompany
insuranceCompany
)
{
return
insuranceCompanyService
.
updateInsuranceCompany
(
insuranceCompany
);
}
/**
* 查询保险公司列表(不分页)
* @return
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/list"
)
public
R
<
List
<
TInsuranceCompany
>>
getInsuranceCompanyList
()
{
return
R
.
ok
(
insuranceCompanyService
.
getInsuranceCompanyList
());
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
javax.validation.constraints.Size
;
import
java.util.List
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -19,8 +32,37 @@ import javax.annotation.Resource;
@RequiredArgsConstructor
@RequestMapping
(
"/insuranceDetail"
)
@Tag
(
name
=
"商险相关"
)
@Validated
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TInsuranceDetailController
{
@Resource
private
TInsuranceDetailService
tInsuranceDetailService
;
/***********************商险办理********************************/
/**
* 商险新增
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceAddParam>>}
*/
@PostMapping
(
"/addInsurance"
)
public
R
<
List
<
InsuranceAddParam
>>
addInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
InsuranceAddParam
>
paramList
){
return
tInsuranceDetailService
.
addInsurance
(
paramList
);
}
/***********************减员办理********************************/
/**
* 导入减员校验
* @param insuranceRefundCheckList 导入减员校验
* @author zhaji
* @date 2022-07-19
* @since v1.0
*/
@PostMapping
(
"/checkPayRollList"
)
public
R
checkInsuranceRefundList
(
@RequestBody
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
){
return
tInsuranceDetailService
.
checkInsuranceRefundList
(
insuranceRefundCheckList
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
58dc8f00
...
...
@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -43,6 +44,19 @@ public class TInsuranceTypeController {
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
/**
* 新增险种
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"新增险种"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"新增险种"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_add')"
)
public
R
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
saveInsuranceType
(
insuranceType
);
}
/**
* 通过id查询险种详情
* @param id id
...
...
@@ -51,21 +65,8 @@ public class TInsuranceTypeController {
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceType_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_get')"
)
public
R
<
TInsuranceType
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
insuranceTypeService
.
getById
(
id
)
);
public
R
getInsuranceTypeDetail
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeService
.
getInsuranceTypeDetail
(
id
);
}
/**
* 新增险种
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"新增保险公司"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"新增险种"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
save
(
insuranceType
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeRateController.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.
web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.
RestController
;
import
org.springframework.
security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.
*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author zhaji
...
...
@@ -24,4 +30,40 @@ public class TInsuranceTypeRateController {
@Resource
private
TInsuranceTypeRateService
insuranceTypeRateService
;
/**
* 查询费率列表(不分页)
* @return
*/
@Operation
(
summary
=
"费率列表"
,
description
=
"费率列表"
)
@GetMapping
(
"/list"
)
public
R
getInsuranceTypeRateList
(
String
id
)
{
return
insuranceTypeRateService
.
getInsuranceTypeRateList
(
id
);
}
/**
* 删除购买费率信息
* @param id 费率id
* @return R
*/
@Operation
(
summary
=
"删除购买费率信息"
,
description
=
"删除购买费率信息:hasPermission('demo_insuranceTypeRate_delete')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeRate_delete')"
)
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeRateService
.
deleteInsuranceTypeRate
(
id
);
}
/**
* 新增费率
* @param insuranceTypeRate 费率明细
* @return R
*/
@Operation
(
summary
=
"新增费率"
,
description
=
"新增费率:hasPermission('demo_insuranceTypeRate_add')"
)
@SysLog
(
"新增费率"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeRate_add')"
)
public
R
save
(
@RequestBody
TInsuranceTypeRate
insuranceTypeRate
)
{
return
insuranceTypeRateService
.
saveInsuranceTypeRate
(
insuranceTypeRate
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeStandardController.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.
web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.
RestController
;
import
org.springframework.
security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.
*
;
import
javax.annotation.Resource
;
...
...
@@ -24,4 +29,39 @@ public class TInsuranceTypeStandardController {
@Resource
private
TInsuranceTypeStandardService
insuranceTypeStandardService
;
/**
* 查询购买标准列表(不分页)
* @return
*/
@Operation
(
summary
=
"费率列表"
,
description
=
"费率列表"
)
@GetMapping
(
"/list"
)
public
R
getInsuranceTypeRateList
(
String
id
)
{
return
insuranceTypeStandardService
.
getInsuranceTypeStandard
(
id
);
}
/**
* 删除购买标准信息
* @param id 购买标准id
* @return R
*/
@Operation
(
summary
=
"删除购买标准信息"
,
description
=
"删除购买标准信息:hasPermission('demo_insuranceTypeStandard_delete')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeStandard_delete')"
)
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeStandardService
.
deleteInsuranceTypeStandard
(
id
);
}
/**
* 新增购买标准
* @param insuranceTypeStandard 购买标准
* @return R
*/
@Operation
(
summary
=
"新增购买标准"
,
description
=
"新增购买标准:hasPermission('demo_insuranceTypeStandard_add')"
)
@SysLog
(
"新增购买标准"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeStandard_add')"
)
public
R
save
(
@RequestBody
TInsuranceTypeStandard
insuranceTypeStandard
)
{
return
insuranceTypeStandardService
.
saveInsuranceTypeStandard
(
insuranceTypeStandard
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceTypeMapper.java
View file @
58dc8f00
...
...
@@ -2,7 +2,12 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author Administrator
...
...
@@ -13,5 +18,20 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
TInsuranceTypeMapper
extends
BaseMapper
<
TInsuranceType
>
{
/**
* 根据险种id查询费率
*
* @author zhaji
* @param id 险种id
* @return {@link List< TInsuranceTypeRate>}
*/
List
<
TInsuranceTypeRate
>
selectInsuranceTypeRateList
(
@Param
(
"id"
)
String
id
);
/**
* 根据险种id查询购买标准
*
* @author zhaji
* @param id 险种id
* @return {@link List< TInsuranceTypeStandard>}
*/
List
<
TInsuranceTypeStandard
>
selectInsuranceTypeStandardList
(
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceCompanyService.java
View file @
58dc8f00
...
...
@@ -3,14 +3,59 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_company(保险公司表)】的数据库操作Service
* @createDate 2022-07-18 17:19:09
*/
public
interface
TInsuranceCompanyService
extends
IService
<
TInsuranceCompany
>
{
/**
* 分页查询保险公司
*
* @author zhaji
* @param page 分页参数
* @param insuranceCompany 查询类
* @return {@link IPage< TInsuranceCompany>}
*/
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
);
/**
* 新增保险公司
*
* @author zhaji
* @param insuranceCompany 新增类
* @return {@link R}
*/
R
saveInsuranceCompany
(
TInsuranceCompany
insuranceCompany
);
/**
* 修改保险公司
*
* @author zhaji
* @param insuranceCompany 修改类
* @return {@link R}
*/
R
updateInsuranceCompany
(
TInsuranceCompany
insuranceCompany
);
/**
* 删除保险公司信息
*
* @author zhaji
* @param id 保险公司id
* @return {@link R}
*/
R
deleteById
(
String
id
);
/**
* 查询当前保险公司列表
*
* @author zhaji
* @return {@link List< TInsuranceCompany>}
*/
List
<
TInsuranceCompany
>
getInsuranceCompanyList
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
58dc8f00
...
...
@@ -2,7 +2,15 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.InsuranceRefundCheck
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceAddParam
;
import
java.util.List
;
import
java.util.List
;
/**
* @author licancan
...
...
@@ -11,4 +19,23 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
*/
public
interface
TInsuranceDetailService
extends
IService
<
TInsuranceDetail
>
{
/***********************商险办理********************************/
/**
* 商险新增
*
* @author licancan
* @param paramList
* @return {@link R<List<InsuranceAddParam>>}
*/
R
<
List
<
InsuranceAddParam
>>
addInsurance
(
List
<
InsuranceAddParam
>
paramList
);
/***********************减员办理********************************/
/**
* 减员导入校验
*
* @author zhaji
* @param insuranceRefundCheckList 减员表
* @return {@link R}
*/
R
checkInsuranceRefundList
(
List
<
InsuranceRefundCheck
>
insuranceRefundCheckList
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeRateService.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_type_rate(费率表)】的数据库操作Service
...
...
@@ -10,4 +13,30 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
*/
public
interface
TInsuranceTypeRateService
extends
IService
<
TInsuranceTypeRate
>
{
/**
* 根据险种id查询费率列表
*
* @author zhaji
* @param id
* @return {@link List< TInsuranceTypeRate>}
*/
R
getInsuranceTypeRateList
(
String
id
);
/**
* 删除费率
*
* @author zhaji
* @param id 费率id
* @return {@link R}
*/
R
deleteInsuranceTypeRate
(
String
id
);
/**
* 新增费率
*
* @author zhaji
* @param insuranceTypeRate
* @return {@link R}
*/
R
saveInsuranceTypeRate
(
TInsuranceTypeRate
insuranceTypeRate
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeService.java
View file @
58dc8f00
...
...
@@ -4,8 +4,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo
;
/**
* @author Administrator
...
...
@@ -13,6 +15,32 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
* @createDate 2022-07-18 17:19:23
*/
public
interface
TInsuranceTypeService
extends
IService
<
TInsuranceType
>
{
/**
* 险种分页查询
*
* @author zhaji
* @param page 分页参数
* @param insuranceType 分页查询参数
* @return {@link IPage< TInsuranceType>}
*/
IPage
<
TInsuranceType
>
pageDiy
(
Page
page
,
TInsuranceType
insuranceType
);
/**
* 新增险种信息
*
* @author zhaji
* @param insuranceType 新增参数
* @return {@link R}
*/
R
saveInsuranceType
(
TInsuranceType
insuranceType
);
/**
* 查看险种详情
*
* @author zhaji
* @param id 险种id
* @return {@link InsuranceTypeVo}
*/
R
getInsuranceTypeDetail
(
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeStandardService.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
/**
...
...
@@ -9,5 +10,30 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard;
* @createDate 2022-07-18 17:19:41
*/
public
interface
TInsuranceTypeStandardService
extends
IService
<
TInsuranceTypeStandard
>
{
/**
* 查询购买标准列表
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
getInsuranceTypeStandard
(
String
id
);
/**
* 删除购买标准
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
deleteInsuranceTypeStandard
(
String
id
);
/**
* 新增购买标准
*
* @author zhaji
* @param insuranceTypeStandard
* @return {@link R}
*/
R
saveInsuranceTypeStandard
(
TInsuranceTypeStandard
insuranceTypeStandard
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceCompanyMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_company(保险公司表)】的数据库操作Service实现
...
...
@@ -17,10 +29,133 @@ import org.springframework.stereotype.Service;
@Service
public
class
TInsuranceCompanyServiceImpl
extends
ServiceImpl
<
TInsuranceCompanyMapper
,
TInsuranceCompany
>
implements
TInsuranceCompanyService
{
@Resource
private
TInsuranceDetailService
insuranceDetailService
;
@Override
public
IPage
<
TInsuranceCompany
>
pageDiy
(
Page
page
,
TInsuranceCompany
insuranceCompany
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceCompany:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
@Override
public
R
saveInsuranceCompany
(
TInsuranceCompany
insuranceCompany
)
{
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"新增的信息为空"
);
}
String
billingType
=
insuranceCompany
.
getBillingType
();
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
billingType
)
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
billingType
)){
return
R
.
failed
(
"计费方式格式不正确"
);
}
boolean
b
=
companyIsExists
(
insuranceCompany
.
getCompanyName
());
if
(!
b
){
insuranceCompany
.
setCreateBy
(
""
);
insuranceCompany
.
setCreateName
(
""
);
insuranceCompany
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
save
(
insuranceCompany
));
}
else
{
return
R
.
failed
(
"当前保险公司已存在"
);
}
}
/**
* 修改保险公司
*
* @author zhaji
* @param insuranceCompany 修改类
* @return {@link R}
*/
@Override
public
R
updateInsuranceCompany
(
TInsuranceCompany
insuranceCompany
)
{
String
id
=
insuranceCompany
.
getId
();
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"要修改的保险公司id为空"
);
}
String
billingType
=
insuranceCompany
.
getBillingType
();
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
billingType
)
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
billingType
)){
return
R
.
failed
(
"计费方式格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceCompany
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
one
=
this
.
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
return
R
.
failed
(
"要修改的保险公司不存在或已被删除"
);
}
String
companyName
=
one
.
getCompanyName
();
//如果当前保险公司名称和修改后的名称不同
if
(!
companyName
.
equals
(
insuranceCompany
.
getCompanyName
())){
//校验旧的保险公司名称是否已存在对应的商险信息
LambdaQueryWrapper
<
TInsuranceDetail
>
detailQueryWrapper
=
new
LambdaQueryWrapper
<>();
detailQueryWrapper
.
eq
(
TInsuranceDetail:
:
getInsuranceCompanyName
,
companyName
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceDetail
>
list
=
insuranceDetailService
.
list
(
detailQueryWrapper
);
if
(
Common
.
isNotEmpty
(
list
)){
return
R
.
failed
(
"当前保险公司的名称已存在对应的商险信息,不能进行修改"
);
}
else
{
//校验新的保险公司名称在数据库中是否存在
boolean
b
=
companyIsExists
(
insuranceCompany
.
getCompanyName
());
if
(
b
){
return
R
.
failed
(
"当前保险公司名称已存在"
);
}
else
{
return
R
.
ok
(
updateById
(
insuranceCompany
));
}
}
}
else
{
return
R
.
ok
(
updateById
(
insuranceCompany
));
}
}
/**
* 删除保险公司信息
*
* @author zhaji
* @param id 保险公司id
* @return {@link R}
*/
@Override
public
R
deleteById
(
String
id
)
{
LambdaQueryWrapper
<
TInsuranceCompany
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
one
=
this
.
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
return
R
.
failed
(
"当前保险公司不存在"
);
}
else
{
LambdaUpdateWrapper
<
TInsuranceCompany
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
update
(
updateWrapper
));
}
}
/**
* 查询当前保险公司列表
*
* @author zhaji
* @return {@link List< TInsuranceCompany>}
*/
@Override
public
List
<
TInsuranceCompany
>
getInsuranceCompanyList
()
{
LambdaQueryWrapper
<
TInsuranceCompany
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
list
(
queryWrapper
);
}
/**
* 校验保险公司是否存在
*
* @author zhaji
* @param companyName 保险公司名称
* @return {@link boolean}
*/
public
boolean
companyIsExists
(
String
companyName
){
LambdaQueryWrapper
<
TInsuranceCompany
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceCompany:
:
getCompanyName
,
companyName
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
one
=
this
.
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
return
false
;
}
else
{
return
true
;
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
58dc8f00
This diff is collapsed.
Click to expand it.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeRateServiceImpl.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeRateMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_type_rate(费率表)】的数据库操作Service实现
...
...
@@ -14,4 +27,78 @@ import org.springframework.stereotype.Service;
@Service
public
class
TInsuranceTypeRateServiceImpl
extends
ServiceImpl
<
TInsuranceTypeRateMapper
,
TInsuranceTypeRate
>
implements
TInsuranceTypeRateService
{
@Resource
private
TInsuranceTypeService
insuranceTypeService
;
/**
* 根据险种id查询费率列表
*
* @author zhaji
* @param id
* @return {@link List< TInsuranceTypeRate>}
*/
@Override
public
R
getInsuranceTypeRateList
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"险种id为空"
);
}
TInsuranceType
byId
=
insuranceTypeService
.
getById
(
id
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
LambdaQueryWrapper
<
TInsuranceTypeRate
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceTypeRate:
:
getInsuranceTypeId
,
id
);
return
R
.
ok
(
list
(
queryWrapper
));
}
/**
* 删除费率
*
* @author zhaji
* @param id 费率id
* @return {@link R}
*/
@Override
public
R
deleteInsuranceTypeRate
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"费率id不能为空"
);
}
TInsuranceTypeRate
byId
=
getById
(
id
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"费率信息不存在或已被删除"
);
}
LambdaUpdateWrapper
<
TInsuranceTypeRate
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceTypeRate:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
update
(
updateWrapper
));
}
/**
* 新增费率
*
* @author zhaji
* @param insuranceTypeRate 费率信息
* @return {@link R}
*/
@Override
public
R
saveInsuranceTypeRate
(
TInsuranceTypeRate
insuranceTypeRate
)
{
if
(
Common
.
isEmpty
(
insuranceTypeRate
)){
return
R
.
failed
(
"新增的费率信息为空"
);
}
String
insuranceTypeId
=
insuranceTypeRate
.
getInsuranceTypeId
();
TInsuranceType
byId
=
insuranceTypeService
.
getById
(
insuranceTypeId
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
String
month
=
insuranceTypeRate
.
getMonth
();
if
(!
ValidityUtil
.
isMonth
(
month
)){
return
R
.
failed
(
"当前月份格式不正确"
);
}
String
rate
=
insuranceTypeRate
.
getRate
();
if
(!
Common
.
isNumber
(
rate
)){
return
R
.
failed
(
"当前费率格式不正确"
);
}
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeRate
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
58dc8f00
...
...
@@ -5,11 +5,26 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceCompanyService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils
;
import
com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_type(险种表)】的数据库操作Service实现
...
...
@@ -18,10 +33,77 @@ import org.springframework.stereotype.Service;
@Service
public
class
TInsuranceTypeServiceImpl
extends
ServiceImpl
<
TInsuranceTypeMapper
,
TInsuranceType
>
implements
TInsuranceTypeService
{
@Resource
private
TInsuranceCompanyService
insuranceCompanyService
;
/**
* 险种分页查询
*
* @author zhaji
* @param page 分页参数
* @param insuranceType 分页查询参数
* @return {@link IPage< TInsuranceType>}
*/
@Override
public
IPage
<
TInsuranceType
>
pageDiy
(
Page
page
,
TInsuranceType
insuranceType
)
{
LambdaQueryWrapper
<
TInsuranceType
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByDesc
(
TInsuranceType:
:
getCreateTime
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
/**
* 新增险种信息
*
* @author zhaji
* @param insuranceType 新增参数
* @return {@link R}
*/
@Override
public
R
saveInsuranceType
(
TInsuranceType
insuranceType
)
{
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
String
bankNo
=
insuranceType
.
getBankNo
();
if
(
Common
.
isNumber
(
bankNo
)){
}
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
insuranceCompany
=
insuranceCompanyService
.
getOne
(
companyWrapper
);
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"所属保险公司不存在或已被删除"
);
}
LambdaQueryWrapper
<
TInsuranceType
>
typeWrapper
=
new
LambdaQueryWrapper
<>();
typeWrapper
.
eq
(
TInsuranceType
::
getInsuranceCompanyId
,
companyId
).
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
()).
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceType
type
=
getOne
(
typeWrapper
);
if
(!
Common
.
isEmpty
(
type
)){
return
R
.
failed
(
"当前险种已存在"
);
}
else
{
return
R
.
ok
(
save
(
insuranceType
));
}
}
/**
* 查看险种详情
*
* @author zhaji
* @param id 险种id
* @return {@link InsuranceTypeVo}
*/
@Override
public
R
getInsuranceTypeDetail
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"险种ID不能为空"
);
}
InsuranceTypeVo
insuranceTypeVo
=
new
InsuranceTypeVo
();
TInsuranceType
byId
=
getById
(
id
);
if
(
Common
.
isEmpty
(
byId
)
||
byId
.
getDeleteFlag
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
BeanCopyUtils
.
copyProperties
(
byId
,
insuranceTypeVo
);
List
<
TInsuranceTypeRate
>
tInsuranceTypeRates
=
this
.
baseMapper
.
selectInsuranceTypeRateList
(
id
);
List
<
TInsuranceTypeStandard
>
tInsuranceTypeStandards
=
this
.
baseMapper
.
selectInsuranceTypeStandardList
(
id
);
insuranceTypeVo
.
setInsuranceTypeRateList
(
tInsuranceTypeRates
);
insuranceTypeVo
.
setInsuranceTypeStandardList
(
tInsuranceTypeStandards
);
return
R
.
ok
(
insuranceTypeVo
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
58dc8f00
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeStandardService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_type_standard(购买标准表)】的数据库操作Service实现
...
...
@@ -13,5 +26,91 @@ import org.springframework.stereotype.Service;
*/
@Service
public
class
TInsuranceTypeStandardServiceImpl
extends
ServiceImpl
<
TInsuranceTypeStandardMapper
,
TInsuranceTypeStandard
>
implements
TInsuranceTypeStandardService
{
@Resource
private
TInsuranceTypeService
insuranceTypeService
;
@Resource
private
TInsuranceDetailService
insuranceDetailService
;
/**
* 查询购买标准列表
*
* @author zhaji
* @param id
* @return {@link R}
*/
@Override
public
R
getInsuranceTypeStandard
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"险种id为空"
);
}
TInsuranceType
byId
=
insuranceTypeService
.
getById
(
id
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
LambdaQueryWrapper
<
TInsuranceTypeStandard
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceTypeStandard:
:
getInsuranceTypeId
,
id
);
return
R
.
ok
(
list
(
queryWrapper
));
}
/**
* 删除购买标准
*
* @author zhaji
* @param id
* @return {@link R}
*/
@Override
public
R
deleteInsuranceTypeStandard
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"购买标准id不能为空"
);
}
TInsuranceTypeStandard
byId
=
getById
(
id
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"购买标准信息不存在或已被删除"
);
}
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail:
:
getInsuranceTypeId
,
byId
.
getInsuranceTypeId
())
.
eq
(
TInsuranceDetail:
:
getBuyStandard
,
byId
.
getBuyStandard
())
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceDetail
>
list
=
insuranceDetailService
.
list
(
queryWrapper
);
if
(
Common
.
isNotEmpty
(
list
)){
return
R
.
failed
(
"当前险种的购买标准已存在对应的商险信息,不能删除"
);
}
LambdaUpdateWrapper
<
TInsuranceTypeStandard
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceTypeStandard:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
update
(
updateWrapper
));
}
/**
* 新增购买标准
*
* @author zhaji
* @param insuranceTypeStandard
* @return {@link R}
*/
@Override
public
R
saveInsuranceTypeStandard
(
TInsuranceTypeStandard
insuranceTypeStandard
)
{
if
(
Common
.
isEmpty
(
insuranceTypeStandard
)){
return
R
.
failed
(
"新增的购买标准信息为空"
);
}
String
insuranceTypeId
=
insuranceTypeStandard
.
getInsuranceTypeId
();
TInsuranceType
byId
=
insuranceTypeService
.
getById
(
insuranceTypeId
);
if
(
Common
.
isEmpty
(
byId
)
||
CommonConstants
.
ONE_INT
==
byId
.
getDeleteFlag
()){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
String
buyStandard
=
insuranceTypeStandard
.
getBuyStandard
();
String
medicalQuota
=
insuranceTypeStandard
.
getMedicalQuota
();
String
dieDisableQuota
=
insuranceTypeStandard
.
getDieDisableQuota
();
if
(!
Common
.
isNumber
(
buyStandard
)){
return
R
.
failed
(
"当前购买标准格式不正确"
);
}
if
(!
Common
.
isNumber
(
medicalQuota
)){
return
R
.
failed
(
"当前医疗额度格式不正确"
);
}
if
(!
Common
.
isNumber
(
dieDisableQuota
)){
return
R
.
failed
(
"当前身故或残疾额度格式不正确"
);
}
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/resources/application-dev.yml
View file @
58dc8f00
...
...
@@ -8,7 +8,7 @@ spring:
redis
:
host
:
127.0.0.1
port
:
6379
password
:
'
@yf_2017'
password
:
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
58dc8f00
...
...
@@ -11,22 +11,30 @@
<result
property=
"empIdcardNo"
column=
"EMP_IDCARD_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"orderNo"
column=
"ORDER_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"deptNo"
column=
"DEPT_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"post"
column=
"POST"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceCompanyName"
column=
"INSURANCE_COMPANY_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeId"
column=
"INSURANCE_TYPE_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeName"
column=
"INSURANCE_TYPE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeId"
column=
"INSURANCE_TYPE_ID"
jdbcType=
"BIGINT"
/>
<result
property=
"buyStandard"
column=
"BUY_STANDARD"
jdbcType=
"VARCHAR"
/>
<result
property=
"medicalQuota"
column=
"MEDICAL_QUOTA"
jdbcType=
"VARCHAR"
/>
<result
property=
"dieDisableQuota"
column=
"DIE_DISABLE_QUOTA"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyNo"
column=
"POLICY_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"policyStart"
column=
"POLICY_START"
jdbcType=
"DATE"
/>
<result
property=
"policyEnd"
column=
"POLICY_END"
jdbcType=
"DATE"
/>
<result
property=
"policyEffect"
column=
"POLICY_EFFECT"
jdbcType=
"DATE"
/>
<result
property=
"batchDate"
column=
"BATCH_DATE"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"settleMonth"
column=
"SETTLE_MONTH"
jdbcType=
"VARCHAR"
/>
<result
property=
"settleMonth"
column=
"SETTLE_MONTH"
jdbcType=
"VARCHAR"
/>
<result
property=
"invoiceNo"
column=
"INVOICE_NO"
jdbcType=
"VARCHAR"
/>
<result
property=
"buyType"
column=
"BUY_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceProvince"
column=
"INSURANCE_PROVINCE"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceProvinceName"
column=
"INSURANCE_PROVINCE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceCity"
column=
"INSURANCE_CITY"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceCityName"
column=
"INSURANCE_CITY_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceHandleProvince"
column=
"INSURANCE_HANDLE_PROVINCE"
jdbcType=
"TINYINT"
/>
<result
property=
"insuranceHandleProvinceName"
column=
"INSURANCE_HANDLE_PROVINCE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceHandleCity"
column=
"INSURANCE_HANDLE_CITY"
jdbcType=
"TINYINT"
/>
<result
property=
"settleType"
column=
"SETTLE_TYPE"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceHandleCityName"
column=
"INSURANCE_HANDLE_CITY_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"settleType"
column=
"SETTLE_TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"actualPremium"
column=
"ACTUAL_PREMIUM"
jdbcType=
"DECIMAL"
/>
<result
property=
"estimatePremium"
column=
"ESTIMATE_PREMIUM"
jdbcType=
"DECIMAL"
/>
<result
property=
"settleBalance"
column=
"SETTLE_BALANCE"
jdbcType=
"DECIMAL"
/>
...
...
@@ -47,12 +55,12 @@
<sql
id=
"Base_Column_List"
>
ID,EMP_ID,EMP_NAME,
EMP_IDCARD_NO,ORDER_NO,DEPT_NO,
INSURANCE_COMPANY
_NAME,
INSURANCE_TYPE_ID,BUY_STANDARD,POLICY_NO,
EMP_IDCARD_NO,ORDER_NO,DEPT_NO,
POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE
_NAME,
INSURANCE_TYPE_ID,BUY_STANDARD,
MEDICAL_QUOTA,DIE_DISABLE_QUOTA,
POLICY_NO,
POLICY_START,POLICY_END,POLICY_EFFECT,
BATCH_DATE,SETTLE_MONTH,INVOICE_NO,
BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_
CITY
,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_
CITY
,SETTLE_TYPE,
BUY_TYPE,INSURANCE_PROVINCE,INSURANCE_
PROVINCE_NAME,INSURANCE_CITY,INSURANCE_CITY_NAME
,
INSURANCE_HANDLE_PROVINCE,INSURANCE_HANDLE_
PROVINCE_NAME,INSURANCE_HANDLE_CITY,INSURANCE_HANDLE_CITY_NAME
,SETTLE_TYPE,
ACTUAL_PREMIUM,ESTIMATE_PREMIUM,SETTLE_BALANCE,
BUY_HANDLE_STATUS,SETTLE_HANDLE_STATUS,REDUCE_HANDLE_STATUS,
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
58dc8f00
...
...
@@ -25,4 +25,34 @@
DELETE_FLAG,CREATE_BY,CREATE_NAME,
CREATE_TIME,UPDATE_BY,UPDATE_TIME
</sql>
<select
id=
"selectInsuranceTypeRateList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate"
>
select
ID as id,
INSURANCE_TYPE_ID as insuranceTypeId,
MONTH as month,
RATE as rate
from
t_insurance_type_rate
where
INSURANCE_TYPE_ID = #{id}
and
DELETE_FLAG = 0
</select>
<select
id=
"selectInsuranceTypeStandardList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard"
>
select
ID as id,
INSURANCE_TYPE_ID as insuranceTypeId,
BUY_STANDARD as buyStandard,
TYPE as type,
MEDICAL_QUOTA as medicalQuota,
DIE_DISABLE_QUOTA as dieDisableQuota
from
t_insurance_type_standard
where
INSURANCE_TYPE_ID = #{id}
and
DELETE_FLAG = 0
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeStandardMapper.xml
View file @
58dc8f00
...
...
@@ -6,15 +6,13 @@
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceTypeId"
column=
"INSURANCE_TYPE_ID"
jdbcType=
"
VARCHAR
"
/>
<result
property=
"insuranceTypeId"
column=
"INSURANCE_TYPE_ID"
jdbcType=
"
BIGINT
"
/>
<result
property=
"buyStandard"
column=
"BUY_STANDARD"
jdbcType=
"VARCHAR"
/>
<result
property=
"type"
column=
"TYPE"
jdbcType=
"TINYINT"
/>
<result
property=
"medicalQuota"
column=
"MEDICAL_QUOTA"
jdbcType=
"VARCHAR"
/>
<result
property=
"dieDisableQuota"
column=
"DIE_DISABLE_QUOTA"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,INSURANCE_TYPE_ID,BUY_STANDARD,
TYPE,MEDICAL_QUOTA,DIE_DISABLE_QUOTA
ID,INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA
</sql>
</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