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
4b48583b
Commit
4b48583b
authored
Jul 25, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
0f9215cd
cd3f18ac
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1063 additions
and
285 deletions
+1063
-285
ProjectSetInfoVo.java
...yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
+2
-1
EmployeeContractConstants.java
...v1/yifu/archives/constants/EmployeeContractConstants.java
+2
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+15
-10
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+2
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+81
-5
TInsuranceCompany.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
+1
-1
TInsuranceDetail.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
+0
-7
TInsuranceOperate.java
...oud/plus/v1/yifu/insurances/entity/TInsuranceOperate.java
+61
-0
TInsuranceSettle.java
...loud/plus/v1/yifu/insurances/entity/TInsuranceSettle.java
+3
-2
InsuranceAddParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
+0
-5
InsuranceBatchParam.java
...cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
+0
-5
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+6
-0
InsuranceExportListVO.java
...oud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
+0
-6
InsuranceListVO.java
...ifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListVO.java
+0
-6
InsuranceRefundHandlingListVo.java
.../v1/yifu/insurances/vo/InsuranceRefundHandlingListVo.java
+1
-7
InsuranceRefundListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceRefundListParam.java
+10
-14
InsuranceRefundListVo.java
...oud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
+2
-8
InsuranceRefundOperationParam.java
.../v1/yifu/insurances/vo/InsuranceRefundOperationParam.java
+31
-0
InsuranceRefundResultVo.java
...d/plus/v1/yifu/insurances/vo/InsuranceRefundResultVo.java
+82
-0
InsuranceReplaceParam.java
...oud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
+0
-6
InsuredListVo.java
.../yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
+0
-6
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+6
-0
pom.xml
yifu-insurances/yifu-insurances-biz/pom.xml
+6
-1
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+51
-9
TInsuranceTypeController.java
.../yifu/insurances/controller/TInsuranceTypeController.java
+29
-4
TInsuranceTypeRateController.java
...u/insurances/controller/TInsuranceTypeRateController.java
+4
-4
TInsuranceTypeStandardController.java
...surances/controller/TInsuranceTypeStandardController.java
+5
-5
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+11
-2
TInsuranceOperateMapper.java
...us/v1/yifu/insurances/mapper/TInsuranceOperateMapper.java
+16
-0
TInsuranceSettleMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceSettleMapper.java
+4
-6
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+31
-5
TInsuranceOperateService.java
.../v1/yifu/insurances/service/TInsuranceOperateService.java
+14
-0
TInsuranceSettleService.java
...s/v1/yifu/insurances/service/TInsuranceSettleService.java
+4
-4
TInsuranceTypeService.java
...lus/v1/yifu/insurances/service/TInsuranceTypeService.java
+19
-0
TInsuranceCompanyServiceImpl.java
...insurances/service/impl/TInsuranceCompanyServiceImpl.java
+17
-6
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+346
-93
TInsuranceOperateServiceImpl.java
...insurances/service/impl/TInsuranceOperateServiceImpl.java
+18
-0
TInsuranceSettleServiceImpl.java
.../insurances/service/impl/TInsuranceSettleServiceImpl.java
+5
-6
TInsuranceTypeRateServiceImpl.java
...nsurances/service/impl/TInsuranceTypeRateServiceImpl.java
+17
-3
TInsuranceTypeServiceImpl.java
...fu/insurances/service/impl/TInsuranceTypeServiceImpl.java
+74
-2
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+18
-4
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+36
-23
TInsuranceOperateMapper.xml
...biz/src/main/resources/mapper/TInsuranceOperateMapper.xml
+20
-0
TInsuranceTypeMapper.xml
...es-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
+0
-1
TInsuranceTypeStandardMapper.xml
...rc/main/resources/mapper/TInsuranceTypeStandardMapper.xml
+1
-1
TPreDispatchInfoController.java
...v1/yifu/social/controller/TPreDispatchInfoController.java
+4
-8
TPreDispatchInfoService.java
.../plus/v1/yifu/social/service/TPreDispatchInfoService.java
+2
-2
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+6
-7
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/ProjectSetInfoVo.java
View file @
4b48583b
...
...
@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.vo;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -57,7 +58,7 @@ public class ProjectSetInfoVo implements Serializable {
* 商险结算类型:0预估 1 实缴
*/
@Schema
(
description
=
"商险结算类型"
)
private
String
insuranceSettleType
;
private
String
insuranceSettleType
=
CommonConstants
.
ONE_STRING
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/constants/EmployeeContractConstants.java
View file @
4b48583b
...
...
@@ -8,5 +8,7 @@ public class EmployeeContractConstants {
public
static
final
String
NOT_CREATE_USER
=
"不是创建人,无法删除"
;
public
static
final
String
NOT_AUDIT_STATUS
=
"不是待提交或审核不通过,无法删除"
;
public
static
final
String
NOT_AUDIT
=
"未审核通过,无法更新"
;
public
static
final
String
INVALID
=
"作废、终止,无法更新"
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
4b48583b
...
...
@@ -668,16 +668,21 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
// 存储
contractInfo
=
baseMapper
.
getOneContractByApplyNo
(
excel
.
getApplyNo
());
if
(
contractInfo
!=
null
&&
Common
.
isNotNull
(
contractInfo
.
getId
()))
{
if
(
CommonConstants
.
dingleDigitIntArray
[
2
]
!=
contractInfo
.
getAuditStatus
())
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeContractConstants
.
NOT_AUDIT
));
}
else
if
(
EmployeeConstants
.
SITUATION_SIX
.
equals
(
contractInfo
.
getSituation
())
||
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
contractInfo
.
getSituation
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeContractConstants
.
INVALID
));
}
else
{
newContractInfo
=
new
TEmployeeContractInfo
();
newContractInfo
.
setId
(
contractInfo
.
getId
());
newContractInfo
.
setContractNo
(
excel
.
getContractNo
());
newContractInfo
.
setFileCabinetNo
(
excel
.
getFileCabinetNo
());
this
.
updateById
(
newContractInfo
);
// 记录变更日志
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
3
],
contractInfo
.
getId
(),
""
,
contractInfo
,
newContractInfo
);
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
CommonConstants
.
SAVE_SUCCESS
));
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeContractConstants
.
NO_INFO
));
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
4b48583b
...
...
@@ -387,4 +387,6 @@ public interface CommonConstants {
String
SIX_STRING
=
"6"
;
String
SEVEN_STRING
=
"7"
;
public
static
final
BigDecimal
MONEY_MAX
=
new
BigDecimal
(
"999999.99"
);
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
4b48583b
...
...
@@ -7,6 +7,42 @@ package com.yifu.cloud.plus.v1.yifu.insurances.constants;
*/
public
class
InsurancesConstants
{
/**
* 新增
*/
public
static
final
String
ADD
=
"新增"
;
/**
* 批增
*/
public
static
final
String
BATCH
=
"批增"
;
/**
* 替换
*/
public
static
final
String
REPLACE
=
"替换"
;
/**
* 删除
*/
public
static
final
String
DELETE
=
"删除"
;
/**
* 编辑
*/
public
static
final
String
EDIT
=
"编辑"
;
/**
* 导出办理
*/
public
static
final
String
EXPORT
=
"导出办理"
;
/**
* 投保退回
*/
public
static
final
String
ROLLBACK
=
"投保退回"
;
/**
* 办理成功
*/
public
static
final
String
SUCCESSFUL
=
"办理成功"
;
/**
* 登记保单保费
*/
public
static
final
String
REGISTERED
=
"登记保单保费"
;
/**
* 新增投保成功
*/
...
...
@@ -60,10 +96,6 @@ public class InsurancesConstants {
* 无效、已过期、已出险、已减员的 不能替换
*/
public
static
final
String
REPLACE_IS_NOT_ALLOW
=
"无效、已过期、已出险、已减员的 不能替换"
;
/**
* 订单编号不能为空
*/
public
static
final
String
ORDER_NO_NOT_EMPTY
=
"订单编号不能为空"
;
/**
* 员工姓名不能为空
*/
...
...
@@ -84,6 +116,14 @@ public class InsurancesConstants {
* 员工身份证号格式有误
*/
public
static
final
String
EMP_IDCARD_NO_NOT_LEGITIMATE
=
"员工身份证号格式有误"
;
/**
* 员工姓名、身份证号不一致
*/
public
static
final
String
EMP_ID_CARD_NO_NOT_FIT
=
"员工姓名、身份证号不一致"
;
/**
* 替换员工姓名、身份证号不一致
*/
public
static
final
String
REPLACE_EMP_ID_CARD_NO_NOT_FIT
=
"替换员工姓名、身份证号不一致"
;
/**
* 替换员工身份证号格式有误
*/
...
...
@@ -144,18 +184,34 @@ public class InsurancesConstants {
* 商险购买地省名称不能为空
*/
public
static
final
String
INSURANCE_PROVINCE_NAME_NOT_EMPTY
=
"商险购买地省名称不能为空"
;
/**
* 商险购买地省名称不存在
*/
public
static
final
String
INSURANCE_PROVINCE_NAME_NOT_EXIST
=
"商险购买地省名称不存在"
;
/**
* 商险购买地市名称
*/
public
static
final
String
INSURANCE_CITY_NAME_NOT_EMPTY
=
"商险购买地市名称不能为空"
;
/**
* 商险购买地市名称不存在
*/
public
static
final
String
INSURANCE_CITY_NAME_NOT_EXIST
=
"商险购买地市名称不存在"
;
/**
* 商险办理省名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EMPTY
=
"商险办理省名称不能为空"
;
/**
* 商险办理省名称不存在
*/
public
static
final
String
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
=
"商险办理省名称不存在"
;
/**
* 商险办理城市名称不能为空
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EMPTY
=
"商险办理城市名称不能为空"
;
/**
* 商险办理城市名称不存在
*/
public
static
final
String
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
=
"商险办理城市名称不存在"
;
/**
* 结算月不能为空
*/
...
...
@@ -220,7 +276,7 @@ public class InsurancesConstants {
/**
* 当前保单已结算,无法变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR
=
"前保单已结算,无法变更结算月"
;
public
static
final
String
SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR
=
"
当
前保单已结算,无法变更结算月"
;
/**
* 替换项目ID和原有项目ID相同
...
...
@@ -232,4 +288,24 @@ public class InsurancesConstants {
*/
public
static
final
String
DUPLICATE_DATA_ERROR
=
"重复数据"
;
/**
* 当前变更结算月列表为空
*/
public
static
final
String
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
=
"当前变更结算月列表为空"
;
/**
* 替换人员不允许变更结算月
*/
public
static
final
String
SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR
=
"替换人员不允许变更结算月"
;
/**
* 替换人员不允许变更所属项目
*/
public
static
final
String
DEPT_NO_CHANGE_IS_EFFECT_ERROR
=
"替换人员不允许变更所属项目"
;
/**
* 当前保单已结算,无法变更所属项目
*/
public
static
final
String
DEPT_NO_CHANGE_SETTLE_HANDLE_STATUS_ERROR
=
"当前保单已结算,无法变更所属项目"
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceCompany.java
View file @
4b48583b
...
...
@@ -58,7 +58,7 @@ public class TInsuranceCompany extends BaseEntity {
*/
@NotBlank
(
message
=
"计费方式不能为空"
)
@StringVal
({
"0"
,
"1"
})
@Schema
(
description
=
"计费方式"
)
@Schema
(
description
=
"计费方式
(0:按天,1:按月)
"
)
private
String
billingType
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceDetail.java
View file @
4b48583b
...
...
@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -42,12 +41,6 @@ public class TInsuranceDetail extends BaseEntity {
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目编码
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceOperate.java
0 → 100644
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
* @author licancan
* @description 商险操作表 t_insurance_operate
* @date 2022-07-25 14:20:16
*/
@Data
@TableName
(
"t_insurance_operate"
)
@Schema
(
description
=
"商险操作表"
)
public
class
TInsuranceOperate
implements
Serializable
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 商险明细id
*/
@Schema
(
description
=
"商险明细id"
)
private
String
insuranceDetailId
;
/**
* 操作描述 新增商险人员/批增商险人员/替换商险/变更所属项目/商险导出办理/商险办理成功/商险办理失败。。。。。
*/
@Schema
(
description
=
"操作描述"
)
private
String
operateDesc
;
/**
* 创建者
*/
@Schema
(
description
=
"创建人"
)
private
String
createBy
;
/**
* 创建人姓名
*/
@Schema
(
description
=
"创建人-姓名"
)
private
String
createName
;
/**
* 创建时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Schema
(
description
=
"创建时间"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceSettle.java
View file @
4b48583b
...
...
@@ -11,8 +11,9 @@ import java.math.BigDecimal;
import
java.time.LocalDateTime
;
/**
* 商险结算表
* @TableName t_insurance_settle
* @author licancan
* @description 商险结算表 t_insurance_settle
* @date 2022-07-25 14:20:16
*/
@Data
@TableName
(
"t_insurance_settle"
)
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceAddParam.java
View file @
4b48583b
...
...
@@ -14,11 +14,6 @@ import java.io.Serializable;
@Schema
(
description
=
"商险办理新增入参"
)
public
class
InsuranceAddParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceBatchParam.java
View file @
4b48583b
...
...
@@ -16,11 +16,6 @@ import java.time.LocalDate;
@Schema
(
description
=
"商险办理批增入参"
)
public
class
InsuranceBatchParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目编码
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
4b48583b
...
...
@@ -19,6 +19,12 @@ import java.time.LocalDateTime;
@Schema
(
description
=
"投保详情VO"
)
public
class
InsuranceDetailVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
628032758008497542L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListVO.java
View file @
4b48583b
...
...
@@ -22,12 +22,6 @@ public class InsuranceExportListVO implements Serializable {
*/
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目名称
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListVO.java
View file @
4b48583b
...
...
@@ -24,12 +24,6 @@ public class InsuranceListVO implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingListVo.java
View file @
4b48583b
...
...
@@ -24,12 +24,6 @@ public class InsuranceRefundHandlingListVo implements Serializable {
*/
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目名称
*/
...
...
@@ -175,7 +169,7 @@ public class InsuranceRefundHandlingListVo implements Serializable {
* 创建人姓名
*/
@Schema
(
description
=
"创建人(派单人)"
)
private
String
c
reateName
;
private
String
refundC
reateName
;
/**
* 备注
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListParam.java
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.List
;
...
...
@@ -18,24 +18,20 @@ import java.util.List;
@Data
@Tag
(
name
=
"减员办理类"
)
public
class
InsuranceRefundListParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
@Schema
(
name
=
"办理类型"
)
@NotBlank
(
message
=
"办理类型不能为空"
)
private
String
refundType
;
@Schema
(
name
=
"
减员
办理类型"
)
@NotBlank
(
message
=
"
减员
办理类型不能为空"
)
private
Integer
refundType
;
@Schema
(
name
=
"办理列表"
)
@NotBlank
(
message
=
"办理列表不能为空"
)
private
String
[]
idList
;
@Schema
(
description
=
"减员办理列表"
)
private
List
<
String
>
insuranceDetailList
;
@Schema
(
name
=
"办理人"
)
@NotBlank
(
message
=
"办理类型不能为空"
)
@Schema
(
name
=
"更新人"
)
private
String
updateBy
;
@Schema
(
name
=
"办理时间"
)
@NotBlank
(
message
=
"办理类型不能为空"
)
private
LocalDateTime
refundCreateTime
;
@Schema
(
name
=
"更新时间"
)
private
LocalDateTime
updateTime
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundListVo.java
View file @
4b48583b
...
...
@@ -10,11 +10,11 @@ import java.time.LocalDate;
/**
* @author zhaji
* @description 已
投保
列表
* @description 已
减员
列表
* @date 2022-07-21 11:31:30
*/
@Data
@Tag
(
name
=
"已
投保
列表"
)
@Tag
(
name
=
"已
减员
列表"
)
public
class
InsuranceRefundListVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
...
...
@@ -24,12 +24,6 @@ public class InsuranceRefundListVo implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 项目名称
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundOperationParam.java
0 → 100644
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author zhaji
* @description 减员办理参数
* @date 2022-07-25 14:17:16
*/
@Data
@Schema
(
name
=
"减员办理参数"
)
public
class
InsuranceRefundOperationParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
@Schema
(
name
=
"办理类型"
)
@NotBlank
(
message
=
"办理类型不能为空"
)
private
Integer
operationType
;
@Schema
(
name
=
"减员办理列表"
)
private
List
<
InsuranceRefundHandlingListVo
>
insuranceRefundHandlingList
;
@Schema
(
name
=
"办理参数"
)
private
InsuranceRefundHandlingParam
param
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundResultVo.java
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* @author zhaji
* @description 减员办理返回类
* @date 2022-07-21 12:30:37
*/
@Schema
(
name
=
"减员办理返回类"
)
@Data
public
class
InsuranceRefundResultVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
* 主键
*/
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 员工姓名
*/
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 员工身份证号
*/
@Schema
(
description
=
"员工身份证号"
)
private
String
empIdcardNo
;
/**
* 项目名称
*/
@Schema
(
description
=
"项目名称"
)
private
String
projectName
;
/**
* 项目编码
*/
@JsonIgnore
private
String
deptNo
;
/**
* 投保岗位
*/
@Schema
(
description
=
"投保岗位"
)
private
String
post
;
/**
* 保单开始时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"保单开始时间"
)
private
LocalDate
policyStart
;
/**
* 保单结束时间
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@Schema
(
description
=
"保单结束时间"
)
private
LocalDate
policyEnd
;
/**
* 险种名称
*/
@Schema
(
description
=
"险种名称"
)
private
String
insuranceTypeName
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 减员状态 1待减员 2减员中3减员退回
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
Integer
reduceHandleStatus
;
/**
* 错误原因
*/
@Schema
(
description
=
"减员状态 1待减员 2减员中3减员退回"
)
private
String
errorMessage
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceReplaceParam.java
View file @
4b48583b
...
...
@@ -74,12 +74,6 @@ public class InsuranceReplaceParam implements Serializable {
@Schema
(
description
=
"替换员工项目编码"
)
private
String
replaceDeptNo
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 岗位
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredListVo.java
View file @
4b48583b
...
...
@@ -30,12 +30,6 @@ public class InsuredListVo implements Serializable {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 员工姓名
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
4b48583b
...
...
@@ -51,6 +51,12 @@ public class InsuredParam implements Serializable {
@Schema
(
description
=
"保险公司ID"
)
private
String
insuranceCompanyId
;
/**
* 保险公司名称
*/
@Schema
(
description
=
"保险公司名称"
)
private
String
insuranceCompanyName
;
/**
* 保单开始时间
*/
...
...
yifu-insurances/yifu-insurances-biz/pom.xml
View file @
4b48583b
...
...
@@ -65,6 +65,11 @@
<artifactId>
commons-collections
</artifactId>
<version>
3.2.2
</version>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-check-api
</artifactId>
<version>
1.0.0
</version>
</dependency>
</dependencies>
<build>
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
4b48583b
...
...
@@ -3,6 +3,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.R
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceDetailService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.*
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -159,11 +160,11 @@ public class TInsuranceDetailController {
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
@Operation
(
summary
=
"投保退回"
,
description
=
"投保退回"
)
@PostMapping
(
"/rollBackInsurance"
)
public
R
<
String
>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
public
R
<
List
<
TInsuranceDetail
>
>
rollBackInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
rollBackInsurance
(
idList
);
}
...
...
@@ -172,11 +173,11 @@ public class TInsuranceDetailController {
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
@Operation
(
summary
=
"办理成功"
,
description
=
"办理成功"
)
@PostMapping
(
"/successfulInsurance"
)
public
R
<
String
>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
public
R
<
List
<
TInsuranceDetail
>
>
successfulInsurance
(
@RequestBody
@Valid
@Size
(
min
=
1
,
message
=
"集合不能为空"
)
List
<
String
>
idList
){
return
tInsuranceDetailService
.
successfulInsurance
(
idList
);
}
...
...
@@ -242,7 +243,7 @@ public class TInsuranceDetailController {
@Operation
(
summary
=
"已投保列表分页查询"
,
description
=
"已投保列表分页查询"
)
@PostMapping
(
"/getInsuredListPage"
)
public
R
<
IPage
<
InsuredListVo
>>
getInsuredListPage
(
Page
<
InsuredListVo
>
page
,
@RequestBody
InsuredParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuredListPage
(
page
,
param
));
return
R
.
ok
(
tInsuranceDetailService
.
getInsuredListPage
(
page
,
param
));
}
/**
...
...
@@ -255,7 +256,7 @@ public class TInsuranceDetailController {
@Operation
(
summary
=
"已投保列表不分页查询"
,
description
=
"已投保列表不分页查询"
)
@PostMapping
(
"/getInsuredList"
)
public
R
<
List
<
InsuredListVo
>>
getInsuredList
(
@RequestBody
InsuredParam
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuredList
(
param
));
return
R
.
ok
(
tInsuranceDetailService
.
getInsuredList
(
param
)
,
"查询成功"
);
}
/**
...
...
@@ -299,15 +300,15 @@ public class TInsuranceDetailController {
}
/**
*
减员办理列表不分页查询
*
导出减员列表
*
* @author zhaji
* @param param 查询条件
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation
(
summary
=
"
减员办理列表不分页查询"
,
description
=
"减员办理列表不分页查询
"
)
@Operation
(
summary
=
"
导出减员列表"
,
description
=
"导出减员列表
"
)
@PostMapping
(
"/getInsuranceRefundHandlingList"
)
public
R
<
List
<
InsuranceRefundHandlingListVo
>>
getInsuranceRefundHandlingList
(
@RequestBody
InsuranceRefund
Handling
Param
param
)
{
public
R
<
List
<
InsuranceRefundHandlingListVo
>>
getInsuranceRefundHandlingList
(
@RequestBody
InsuranceRefund
Operation
Param
param
)
{
return
R
.
ok
(
tInsuranceDetailService
.
getInsuranceRefundHandlingList
(
param
));
}
...
...
@@ -323,4 +324,45 @@ public class TInsuranceDetailController {
public
R
updateInsuranceRefund
(
@RequestBody
InsuranceRefundListParam
insuranceDetail
)
{
return
tInsuranceDetailService
.
updateInsuranceRefund
(
insuranceDetail
);
}
/**
* 根据保险公司名称查询保单明细
*
* @author zhaji
* @param CompanyName 保险公司id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation
(
summary
=
"根据保险公司名称查询保单明细"
,
description
=
"根据保险公司名称查询保单明细"
)
@GetMapping
(
"/selectByCompanyName"
)
public
R
selectByCompanyName
(
String
CompanyName
)
{
return
tInsuranceDetailService
.
selectByCompanyName
(
CompanyName
);
}
/**
* 根据险种名称查询保单明细
*
* @author zhaji
* @param id 险种id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation
(
summary
=
"根据险种名称查询保单明细"
,
description
=
"根据险种名称查询保单明细"
)
@GetMapping
(
"/selectByTypeId"
)
public
R
selectByTypeName
(
String
id
)
{
return
tInsuranceDetailService
.
selectByTypeId
(
id
);
}
/**
* 出险
*
* @author zhaji
* @param id 险种id
* @return {@link R<List< InsuranceRefundHandlingListVo >>}
*/
@Operation
(
summary
=
"出险"
,
description
=
"出险"
)
@GetMapping
(
"/updateIsUse"
)
public
R
updateIsUse
(
String
id
)
{
return
tInsuranceDetailService
.
updateIsUse
(
id
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeController.java
View file @
4b48583b
...
...
@@ -17,6 +17,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author zhaji
...
...
@@ -40,7 +41,7 @@ public class TInsuranceTypeController {
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
page
,
@RequestBody
TInsuranceType
insuranceType
)
{
public
R
<
IPage
<
InsuranceTypeVo
>>
getInsuranceTypePage
(
Page
page
,
TInsuranceType
insuranceType
)
{
return
R
.
ok
(
insuranceTypeService
.
pageDiy
(
page
,
insuranceType
));
}
...
...
@@ -51,8 +52,8 @@ public class TInsuranceTypeController {
*/
@Operation
(
summary
=
"新增险种"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"新增险种"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_add')"
)
@PostMapping
(
"/save"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceType_add')" )
public
R
save
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
saveInsuranceType
(
insuranceType
);
}
...
...
@@ -64,9 +65,33 @@ public class TInsuranceTypeController {
*/
@Operation
(
summary
=
"通过id查询险种详情"
,
description
=
"通过id查询:hasPermission('demo_insuranceType_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceType_get')"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceType_get')" )
public
R
getInsuranceTypeDetail
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeService
.
getInsuranceTypeDetail
(
id
);
}
/**
* 修改险种
* @param insuranceType 险种明细
* @return R
*/
@Operation
(
summary
=
"修改险种"
,
description
=
"新增险种:hasPermission('demo_insuranceType_add')"
)
@SysLog
(
"修改险种"
)
@PostMapping
(
"/update"
)
//@PreAuthorize("@pms.hasPermission('demo_insuranceType_add')" )
public
R
update
(
@RequestBody
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
updateInsuranceType
(
insuranceType
);
}
/**
* 查询险种列表
* @param insuranceType 险种信息
* @return
*/
@Operation
(
summary
=
"查询险种列表"
,
description
=
"查询险种列表"
)
@GetMapping
(
"/list"
)
public
R
getInsuranceTypeList
(
TInsuranceType
insuranceType
)
{
return
insuranceTypeService
.
getInsuranceTypeList
(
insuranceType
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceTypeRateController.java
View file @
4b48583b
...
...
@@ -47,8 +47,8 @@ public class TInsuranceTypeRateController {
* @return R
*/
@Operation
(
summary
=
"删除购买费率信息"
,
description
=
"删除购买费率信息:hasPermission('demo_insuranceTypeRate_delete')"
)
@
Get
Mapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeRate_delete')"
)
@
Delete
Mapping
(
"/{id}"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceTypeRate_delete')" )
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeRateService
.
deleteInsuranceTypeRate
(
id
);
}
...
...
@@ -60,8 +60,8 @@ public class TInsuranceTypeRateController {
*/
@Operation
(
summary
=
"新增费率"
,
description
=
"新增费率:hasPermission('demo_insuranceTypeRate_add')"
)
@SysLog
(
"新增费率"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeRate_add')"
)
@PostMapping
(
"/save"
)
//
@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 @
4b48583b
...
...
@@ -34,7 +34,7 @@ public class TInsuranceTypeStandardController {
* 查询购买标准列表(不分页)
* @return
*/
@Operation
(
summary
=
"
费率列表"
,
description
=
"费率
列表"
)
@Operation
(
summary
=
"
购买标准列表"
,
description
=
"购买标准
列表"
)
@GetMapping
(
"/list"
)
public
R
getInsuranceTypeRateList
(
String
id
)
{
return
insuranceTypeStandardService
.
getInsuranceTypeStandard
(
id
);
...
...
@@ -46,8 +46,8 @@ public class TInsuranceTypeStandardController {
* @return R
*/
@Operation
(
summary
=
"删除购买标准信息"
,
description
=
"删除购买标准信息:hasPermission('demo_insuranceTypeStandard_delete')"
)
@
Get
Mapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeStandard_delete')"
)
@
Delete
Mapping
(
"/{id}"
)
//
@PreAuthorize("@pms.hasPermission('demo_insuranceTypeStandard_delete')" )
public
R
deleteById
(
@PathVariable
(
"id"
)
String
id
)
{
return
insuranceTypeStandardService
.
deleteInsuranceTypeStandard
(
id
);
}
...
...
@@ -59,8 +59,8 @@ public class TInsuranceTypeStandardController {
*/
@Operation
(
summary
=
"新增购买标准"
,
description
=
"新增购买标准:hasPermission('demo_insuranceTypeStandard_add')"
)
@SysLog
(
"新增购买标准"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_insuranceTypeStandard_add')"
)
@PostMapping
(
"/save"
)
//
@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/TInsuranceDetailMapper.java
View file @
4b48583b
...
...
@@ -105,7 +105,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
List
<
InsuranceRefundListVo
>
getInsuranceRefundList
(
@Param
(
"param"
)
InsuranceRefundParam
param
);
/**
* 减员列表分页查询
* 减员
办理
列表分页查询
*
* @author zhaji
* @param page 分页参数
...
...
@@ -115,7 +115,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage
<
InsuranceRefundHandlingListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
@Param
(
"param"
)
InsuranceRefundHandlingParam
param
);
/**
* 减员列表不分页查询
* 减员
办理
列表不分页查询
*
* @author zhaji
* @param param 查询参数
...
...
@@ -131,4 +131,13 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @return {@link boolean}
*/
Integer
updateInsuranceRefund
(
@Param
(
"param"
)
InsuranceRefundListParam
insuranceDetail
);
/**
* 查询保单列表
*
* @author zhaji
* @param idList idList
* @return {@link List< TInsuranceDetail>}
*/
List
<
TInsuranceDetail
>
selectDetailListByIds
(
@Param
(
"idList"
)
String
[]
idList
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceOperateMapper.java
0 → 100644
View file @
4b48583b
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.TInsuranceOperate
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Mapper
* @date 2022-07-25 14:20:16
*/
@Mapper
public
interface
TInsuranceOperateMapper
extends
BaseMapper
<
TInsuranceOperate
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceSettleMapper.java
View file @
4b48583b
...
...
@@ -5,13 +5,11 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @author Administrator
* @description 针对表【t_insurance_settle(商险结算表)】的数据库操作Mapper
* @createDate 2022-07-21 16:21:22
* @Entity generator.domain.TInsuranceSettle
*/
* @author licancan
* @description 针对表【t_insurance_settle(商险结算表)】的数据库操作Mapper
* @date 2022-07-25 14:20:16
*/
@Mapper
public
interface
TInsuranceSettleMapper
extends
BaseMapper
<
TInsuranceSettle
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
4b48583b
...
...
@@ -104,18 +104,18 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
R
<
String
>
rollBackInsurance
(
List
<
String
>
idList
);
R
<
List
<
TInsuranceDetail
>
>
rollBackInsurance
(
List
<
String
>
idList
);
/**
* 办理成功
*
* @author licancan
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
*/
R
<
String
>
successfulInsurance
(
List
<
String
>
idList
);
R
<
List
<
TInsuranceDetail
>
>
successfulInsurance
(
List
<
String
>
idList
);
/**
* 登记保单保费
...
...
@@ -192,7 +192,7 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param param 查询参数
* @return {@link List< InsuranceRefundHandlingListVo>}
*/
List
<
InsuranceRefundHandlingListVo
>
getInsuranceRefundHandlingList
(
InsuranceRefund
Handling
Param
param
);
List
<
InsuranceRefundHandlingListVo
>
getInsuranceRefundHandlingList
(
InsuranceRefund
Operation
Param
param
);
/**
* 减员办理
...
...
@@ -221,4 +221,30 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/
R
deptChange
(
List
<
DeptChangeCheckParam
>
deptChangeCheckList
);
/**
* 根据保险公司名称查询保单明细
*
* @author zhaji
* @param companyName 保险公司名称
* @return {@link R}
*/
R
selectByCompanyName
(
String
companyName
);
/**
* 根据险种id查询保单明细
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
selectByTypeId
(
String
id
);
/**
* 出险
*
* @author zhaji
* @param id
* @return {@link R}
*/
R
updateIsUse
(
String
id
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceOperateService.java
0 → 100644
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
/**
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service
* @date 2022-07-25 14:20:16
*/
public
interface
TInsuranceOperateService
extends
IService
<
TInsuranceOperate
>
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceSettleService.java
View file @
4b48583b
...
...
@@ -5,10 +5,10 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceSettle;
import
org.springframework.stereotype.Service
;
/**
* @author Administrator
* @description 针对表【t_insurance_settle(商险结算表)】的数据库操作Service
* @createDate 2022-07-21 16:21:22
*/
* @author licancan
* @description 针对表【t_insurance_settle(商险结算表)】的数据库操作Service
* @date 2022-07-25 14:20:16
*/
@Service
public
interface
TInsuranceSettleService
extends
IService
<
TInsuranceSettle
>
{
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceTypeService.java
View file @
4b48583b
...
...
@@ -9,6 +9,8 @@ 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
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_type(险种表)】的数据库操作Service
...
...
@@ -43,4 +45,21 @@ public interface TInsuranceTypeService extends IService<TInsuranceType> {
*/
R
getInsuranceTypeDetail
(
String
id
);
/**
* 修改险种信息
*
* @author zhaji
* @param insuranceType
* @return {@link R}
*/
R
updateInsuranceType
(
TInsuranceType
insuranceType
);
/**
* 查询险种列表
*
* @author zhaji
* @param insuranceType
* @return {@link List< TInsuranceType>}
*/
R
getInsuranceTypeList
(
TInsuranceType
insuranceType
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceCompanyServiceImpl.java
View file @
4b48583b
...
...
@@ -9,11 +9,14 @@ 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.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
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.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -45,16 +48,18 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
if
(
Common
.
isEmpty
(
insuranceCompany
)){
return
R
.
failed
(
"新增的信息为空"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
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
.
setCreateBy
(
user
.
getId
()
);
insuranceCompany
.
setCreateName
(
user
.
getNickname
()
);
insuranceCompany
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
save
(
insuranceCompany
));
insuranceCompany
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
save
(
insuranceCompany
),
"新增成功"
);
}
else
{
return
R
.
failed
(
"当前保险公司已存在"
);
}
...
...
@@ -69,8 +74,9 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
*/
@Override
public
R
updateInsuranceCompany
(
TInsuranceCompany
insuranceCompany
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
id
=
insuranceCompany
.
getId
();
if
(
Common
.
isEmpty
(
id
)){
if
(
StringUtils
.
isEmpty
(
id
)){
return
R
.
failed
(
"要修改的保险公司id为空"
);
}
String
billingType
=
insuranceCompany
.
getBillingType
();
...
...
@@ -103,6 +109,8 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
}
}
}
else
{
insuranceCompany
.
setUpdateBy
(
user
.
getId
());
insuranceCompany
.
setUpdateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
updateById
(
insuranceCompany
));
}
}
...
...
@@ -115,6 +123,7 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
*/
@Override
public
R
deleteById
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
LambdaQueryWrapper
<
TInsuranceCompany
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceCompany
one
=
this
.
getOne
(
queryWrapper
);
...
...
@@ -122,8 +131,10 @@ public class TInsuranceCompanyServiceImpl extends ServiceImpl<TInsuranceCompanyM
return
R
.
failed
(
"当前保险公司不存在"
);
}
else
{
LambdaUpdateWrapper
<
TInsuranceCompany
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
);
updateWrapper
.
set
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
updateWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
id
)
.
set
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
.
set
(
TInsuranceCompany
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceCompany
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
));
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -8,11 +7,15 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.google.common.collect.Sets
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
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.common.core.util.RedisUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
...
...
@@ -33,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.validation.constraints.NotBlank
;
import
java.sql.Array
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.*
;
...
...
@@ -63,9 +67,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private
ArchivesDaprUtil
archivesDaprUtil
;
@Resource
private
TInsuranceSettleService
tInsuranceSettleService
;
@Resource
private
TInsurance
SettleService
insuranceSettl
eService
;
private
TInsurance
OperateService
tInsuranceOperat
eService
;
/***********************商险办理********************************/
...
...
@@ -85,7 +88,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceListVO
record
:
insuranceList
.
getRecords
())
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
...
@@ -113,7 +116,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceListVO
record
:
insuranceList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
...
@@ -148,8 +151,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceAddParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
List
<
InsuranceAddParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceAddParam
success
:
listSuccess
)
{
TInsuranceDetail
detail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
success
,
detail
);
...
...
@@ -165,7 +168,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
this
.
saveBatch
(
detailList
);
}
//todo 操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
ADD
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
ADD_SUCCESS
);
}
...
...
@@ -191,8 +195,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceBatchParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
List
<
InsuranceBatchParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceBatchParam
success
:
listSuccess
)
{
TInsuranceDetail
detail
=
new
TInsuranceDetail
();
BeanCopyUtils
.
copyProperties
(
success
,
detail
);
...
...
@@ -206,7 +210,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
this
.
saveBatch
(
detailList
);
}
//todo 操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
BATCH
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
BATCH_SUCCESS
);
}
...
...
@@ -232,6 +237,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceReplaceParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
List
<
InsuranceReplaceParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
//替换
...
...
@@ -257,7 +263,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newDetail
.
setEmpName
(
success
.
getReplaceEmpName
());
newDetail
.
setEmpIdcardNo
(
success
.
getReplaceEmpIdcardNo
());
newDetail
.
setDeptNo
(
success
.
getReplaceDeptNo
());
newDetail
.
setOrderNo
(
success
.
getOrderNo
());
newDetail
.
setPost
(
success
.
getPost
());
Boolean
insert
=
this
.
save
(
newDetail
);
//替换记录
...
...
@@ -281,9 +286,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceReplaceService
.
save
(
replace
);
}
detailList
.
add
(
newDetail
);
}
}
//todo 操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REPLACE
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
REPLACE_SUCCESS
);
}
...
...
@@ -296,6 +303,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
public
R
<
String
>
deleteInsurance
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
TInsuranceDetail
byId
=
this
.
getById
(
id
);
if
(
null
==
byId
){
return
R
.
failed
(
InsurancesConstants
.
DATA_IS_NOT_EXIST
);
...
...
@@ -305,6 +316,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
byId
.
setDeleteFlag
(
CommonConstants
.
ONE_INT
);
this
.
updateById
(
byId
);
//操作记录
addOperate
(
Arrays
.
asList
(
byId
),
user
,
InsurancesConstants
.
DELETE
);
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -401,6 +414,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
return
R
.
failed
(
InsurancesConstants
.
EDIT_NOT_ALLOW
);
}
//操作记录
addOperate
(
Arrays
.
asList
(
byId
),
user
,
InsurancesConstants
.
EDIT
);
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -414,6 +429,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
InsuranceDetailVO
getInsuranceDetailById
(
String
id
)
{
InsuranceDetailVO
insuranceDetailVO
=
this
.
baseMapper
.
getInsuranceDetailById
(
id
);
if
(
null
!=
insuranceDetailVO
){
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
insuranceDetailVO
.
getDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
ProjectSetInfoVo
jsonObject
=
data
.
get
(
insuranceDetailVO
.
getDeptNo
());
if
(
null
!=
jsonObject
){
insuranceDetailVO
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
}
}
}
return
insuranceDetailVO
;
}
...
...
@@ -441,7 +466,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceExportList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
for
(
InsuranceExportListVO
record
:
insuranceExportList
)
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
record
.
getDeptNo
());
...
...
@@ -465,6 +490,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
this
.
saveOrUpdateBatch
(
detailList
);
}
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
EXPORT
);
}
return
insuranceExportList
;
}
...
...
@@ -473,11 +500,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* 投保退回
*
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
* @author licancan
*/
@Override
public
R
<
String
>
rollBackInsurance
(
List
<
String
>
idList
)
{
public
R
<
List
<
TInsuranceDetail
>
>
rollBackInsurance
(
List
<
String
>
idList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -486,6 +513,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
List
<
TInsuranceDetail
>
errorList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
detailList
.
stream
().
forEach
(
e
->{
// 记录状态置为「退回」
...
...
@@ -496,18 +524,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//更新
this
.
saveOrUpdateBatch
(
detailList
);
}
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
ROLLBACK
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
* 办理成功
*
* @param idList
* @return {@link R<
String
>}
* @return {@link R<
List<TInsuranceDetail>
>}
* @author licancan
*/
@Override
public
R
<
String
>
successfulInsurance
(
List
<
String
>
idList
)
{
public
R
<
List
<
TInsuranceDetail
>
>
successfulInsurance
(
List
<
String
>
idList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
==
null
||
Common
.
isEmpty
(
user
.
getId
()))
{
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
...
...
@@ -516,6 +546,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
failed
(
CommonConstants
.
PARAM_IS_NOT_EMPTY
);
}
List
<
TInsuranceDetail
>
detailList
=
baseMapper
.
selectBatchIds
(
idList
);
List
<
TInsuranceDetail
>
errorList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
for
(
TInsuranceDetail
detail
:
detailList
)
{
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
...
...
@@ -531,7 +562,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
this
.
saveOrUpdateBatch
(
detailList
);
//todo 根据结算类型推送ekp
}
return
R
.
ok
(
InsurancesConstants
.
OPERATE_SUCCESS
);
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
SUCCESSFUL
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
/**
...
...
@@ -555,6 +588,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceRegisterParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
List
<
InsuranceRegisterParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceRegisterParam
success
:
listSuccess
)
{
//登记保单保费
...
...
@@ -578,9 +612,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// todo 根据结算类型判断推送ekp
}
detailList
.
add
(
detail
);
}
}
//todo 操作记录
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REGISTERED
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
...
...
@@ -595,13 +631,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
InsuranceAddParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceAddParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceAddParam
>
listSuccess
=
new
ArrayList
<>();
for
(
InsuranceAddParam
param
:
paramList
)
{
for
(
InsuranceAddParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
)
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getOrderNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ORDER_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -673,28 +704,39 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
//校验身份合法
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
param
.
getEmpName
());
checkIdCard
.
setIdCard
(
param
.
getEmpIdcardNo
());
ChecksUtil
.
checkIdCard
(
checkIdCard
,
true
);
if
(
CommonConstants
.
ONE_INT
!=
checkIdCard
.
getIsTrue
()){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_ID_CARD_NO_NOT_FIT
);
listResult
.
add
(
param
);
continue
;
}
//根据项目编码查询项目是否存在
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
getDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
)
{
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
jsonObject
){
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
projectSetInfoVo
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
jsonObject
.
getInsuranceSettleType
();
String
settleType
=
projectSetInfoVo
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
listResult
.
add
(
param
);
...
...
@@ -705,11 +747,40 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//todo 省市校验是否正确并设置对应code
//param.setInsuranceProvince();
//param.setInsuranceCity();
//param.setInsuranceHandleProvince();
//param.setInsuranceHandleCity();
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceProvince
(
Integer
.
parseInt
(
redisProvinceName
));
}
String
redisCityName
=
getRedisAreaValue
(
param
.
getInsuranceCityName
()
+
"_"
+
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisCityName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
String
redisHandleProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleProvinceName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleProvince
(
Integer
.
parseInt
(
redisHandleProvinceName
));
}
String
redisHandleCityName
=
getRedisAreaValue
(
param
.
getInsuranceHandleCityName
()
+
"_"
+
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleCityName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleCity
(
Integer
.
parseInt
(
redisHandleCityName
));
}
// 保单开始日期 > 当前派单日期
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
...
...
@@ -777,7 +848,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
eq
(
TInsuranceDetail:
:
getPolicyStart
,
param
.
getPolicyStart
())
.
eq
(
TInsuranceDetail:
:
getPolicyEnd
,
param
.
getPolicyEnd
())
.
notIn
(
TInsuranceDetail:
:
getBuyHandleStatus
,
setRStatus
)
.
eq
(
TInsuranceDetail:
:
getIsOverdue
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
);
if
(
Optional
.
ofNullable
(
insuranceDetail
).
isPresent
()){
...
...
@@ -814,13 +884,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
InsuranceBatchParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceBatchParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceBatchParam
>
listSuccess
=
new
ArrayList
<>();
for
(
InsuranceBatchParam
param
:
paramList
)
{
for
(
InsuranceBatchParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
)
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getOrderNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ORDER_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getDeptNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
...
...
@@ -887,28 +952,40 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
//校验身份合法
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
param
.
getEmpName
());
checkIdCard
.
setIdCard
(
param
.
getEmpIdcardNo
());
ChecksUtil
.
checkIdCard
(
checkIdCard
,
true
);
if
(
CommonConstants
.
ONE_INT
!=
checkIdCard
.
getIsTrue
()){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_ID_CARD_NO_NOT_FIT
);
listResult
.
add
(
param
);
continue
;
}
//根据项目编码查询项目是否存在
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
Arrays
.
asList
(
param
.
getDeptNo
()));
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
!
=
CommonConstants
.
SUCCESS
)
{
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
=
=
CommonConstants
.
SUCCESS
)
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
if
(
MapUtils
.
isEmpty
(
data
)){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
ProjectSetInfoVo
jsonObject
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
jsonObject
){
ProjectSetInfoVo
projectSetInfoVo
=
data
.
get
(
param
.
getDeptNo
());
if
(
null
==
projectSetInfoVo
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_IS_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
//结算类型,根据项目编码获取,并冗余到明细记录中
String
settleType
=
jsonObject
.
getInsuranceSettleType
();
String
settleType
=
projectSetInfoVo
.
getInsuranceSettleType
();
if
(
StringUtils
.
isEmpty
(
settleType
)){
param
.
setErrorMessage
(
InsurancesConstants
.
PROJECT_NOT_FIND_SETTLE_TYPE
);
listResult
.
add
(
param
);
...
...
@@ -919,11 +996,40 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//todo 省市校验是否正确并设置对应code
//param.setInsuranceProvince();
//param.setInsuranceCity();
//param.setInsuranceHandleProvince();
//param.setInsuranceHandleCity();
//省市区域校验是否正确并设置对应id
String
redisProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisProvinceName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceProvince
(
Integer
.
parseInt
(
redisProvinceName
));
}
String
redisCityName
=
getRedisAreaValue
(
param
.
getInsuranceCityName
()
+
"_"
+
param
.
getInsuranceProvinceName
());
if
(
Common
.
isEmpty
(
redisCityName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceCity
(
Integer
.
parseInt
(
redisCityName
));
}
String
redisHandleProvinceName
=
getRedisAreaValue
(
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleProvinceName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_PROVINCE_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleProvince
(
Integer
.
parseInt
(
redisHandleProvinceName
));
}
String
redisHandleCityName
=
getRedisAreaValue
(
param
.
getInsuranceHandleCityName
()
+
"_"
+
param
.
getInsuranceHandleProvinceName
());
if
(
Common
.
isEmpty
(
redisHandleCityName
)){
param
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_HANDLE_CITY_NAME_NOT_EXIST
);
listResult
.
add
(
param
);
continue
;
}
else
{
param
.
setInsuranceHandleCity
(
Integer
.
parseInt
(
redisHandleCityName
));
}
// 保险公司-险种-购买标准 是否存在
TInsuranceCompany
insuranceCompany
=
tInsuranceCompanyService
.
getOne
(
Wrappers
.<
TInsuranceCompany
>
query
().
lambda
()
...
...
@@ -1022,7 +1128,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
InsuranceReplaceParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceReplaceParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceReplaceParam
>
listSuccess
=
new
ArrayList
<>();
for
(
InsuranceReplaceParam
param
:
paramList
)
{
for
(
InsuranceReplaceParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
)
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
...
...
@@ -1074,27 +1180,32 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getOrderNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
ORDER_NO_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
if
(
StringUtils
.
isBlank
(
param
.
getPost
())){
param
.
setErrorMessage
(
InsurancesConstants
.
POST_NOT_EMPTY
);
listResult
.
add
(
param
);
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
if
(
ValidityUtil
.
validateIDCard
(
param
.
getReplaceEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getReplaceEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
}
//校验身份合法
TCheckIdCard
checkIdCard
=
new
TCheckIdCard
();
checkIdCard
.
setName
(
param
.
getReplaceEmpName
());
checkIdCard
.
setIdCard
(
param
.
getReplaceEmpIdcardNo
());
ChecksUtil
.
checkIdCard
(
checkIdCard
,
true
);
if
(
CommonConstants
.
ONE_INT
!=
checkIdCard
.
getIsTrue
()){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_EMP_ID_CARD_NO_NOT_FIT
);
listResult
.
add
(
param
);
continue
;
}
if
(!
LocalDateUtil
.
isDate
(
param
.
getPolicyStart
(),
LocalDateUtil
.
NORM_DATE_PATTERN
)){
param
.
setErrorMessage
(
InsurancesConstants
.
POLICY_START_PARSE_ERROR
);
listResult
.
add
(
param
);
...
...
@@ -1123,10 +1234,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
// 无效、已过期、已出险、已减员的 不能替换
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
||
detail
.
getIsUse
()
==
CommonConstants
.
ONE_INT
||
detail
.
getIsOverdue
()
==
CommonConstants
.
ONE_INT
||
detail
.
getIsEffect
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getBuyHandleStatus
()
==
CommonConstants
.
FIVE_INT
){
param
.
setErrorMessage
(
InsurancesConstants
.
REPLACE_IS_NOT_ALLOW
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1165,7 +1273,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceRegisterParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceRegisterParam
>
listSuccess
=
new
ArrayList
<>();
for
(
InsuranceRegisterParam
param
:
paramList
)
{
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
)
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_NAME_NOT_EMPTY
);
...
...
@@ -1198,7 +1306,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
// 身份证号位数校验(18 位合法)
if
(
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
if
(
!
ValidityUtil
.
validateIDCard
(
param
.
getEmpIdcardNo
())){
param
.
setErrorMessage
(
InsurancesConstants
.
EMP_IDCARD_NO_NOT_LEGITIMATE
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -1249,6 +1357,46 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
map
;
}
/**
* 根据区域名称获取区域id
*
* @author licancan
* @param areaString
* @return {@link String}
*/
private
String
getRedisAreaValue
(
String
areaString
)
{
return
String
.
valueOf
(
RedisUtil
.
redis
.
opsForValue
().
get
(
CacheConstants
.
AREA_VALUE
+
areaString
));
}
/**
* 操作记录
*
* @author licancan
* @param detailList 商险明细集合
* @param user 登录用户
* @param operateDesc 操作描述
* @return void
*/
private
void
addOperate
(
List
<
TInsuranceDetail
>
detailList
,
YifuUser
user
,
String
operateDesc
){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
try
{
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>();
for
(
TInsuranceDetail
detail
:
detailList
)
{
TInsuranceOperate
operate
=
new
TInsuranceOperate
();
operate
.
setInsuranceDetailId
(
detail
.
getId
());
operate
.
setOperateDesc
(
operateDesc
);
operate
.
setCreateBy
(
user
.
getId
());
operate
.
setCreateName
(
user
.
getNickname
());
operate
.
setCreateTime
(
LocalDateTime
.
now
());
operateList
.
add
(
operate
);
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
}
catch
(
Exception
e
){
e
.
getStackTrace
();
}
}
}
/***********************减员办理********************************/
/**
* 减员导入校验
...
...
@@ -1526,7 +1674,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
/**
*
减员办理列表不分页查询
*
导出减员办理列表
*
* @author zhaji
* @param param 查询参数
...
...
@@ -1534,9 +1682,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
InsuranceRefundHandlingListVo
>
getInsuranceRefundHandlingList
(
InsuranceRefundHandlingParam
param
)
{
public
List
<
InsuranceRefundHandlingListVo
>
getInsuranceRefundHandlingList
(
InsuranceRefundOperationParam
param
)
{
Integer
operationType
=
param
.
getOperationType
();
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
InsuranceRefundHandlingListVo
>
insuranceRefundHandlingList
=
this
.
baseMapper
.
getInsuranceRefundHandlingList
(
param
);
List
<
InsuranceRefundHandlingListVo
>
insuranceRefundHandlingList
=
new
ArrayList
<>();
//如果是导出类型的则查询列表并返回
if
(
CommonConstants
.
ONE_INT
==
operationType
){
InsuranceRefundHandlingParam
insuranceRefundHandlingParam
=
param
.
getParam
();
insuranceRefundHandlingList
=
this
.
baseMapper
.
getInsuranceRefundHandlingList
(
insuranceRefundHandlingParam
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundHandlingList
.
stream
().
map
(
e
->
e
.
getDeptNo
()).
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -1551,6 +1704,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
else
{
insuranceRefundHandlingList
=
param
.
getInsuranceRefundHandlingList
();
}
for
(
InsuranceRefundHandlingListVo
insuranceRefund
:
insuranceRefundHandlingList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
insuranceRefund
.
getId
())
...
...
@@ -1572,11 +1728,20 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
updateInsuranceRefund
(
InsuranceRefundListParam
insuranceDetail
)
{
InsuranceRefundListParam
param
=
new
InsuranceRefundListParam
();
Integer
refundType
=
insuranceDetail
.
getRefundType
();
YifuUser
user
=
SecurityUtils
.
getUser
();
insuranceDetail
.
setUpdateBy
(
user
.
getId
());
insuranceDetail
.
setRefundCreateTime
(
LocalDateTime
.
now
());
String
refundType
=
insuranceDetail
.
getRefundType
();
return
R
.
ok
(
this
.
baseMapper
.
updateInsuranceRefund
(
insuranceDetail
));
List
<
String
>
insuranceDetailList
=
insuranceDetail
.
getInsuranceDetailList
();
List
<
TInsuranceDetail
>
tInsuranceDetails
=
this
.
listByIds
(
insuranceDetailList
);
for
(
TInsuranceDetail
tInsuranceDetail
:
tInsuranceDetails
)
{
Integer
deleteFlag
=
tInsuranceDetail
.
getDeleteFlag
();
if
(
CommonConstants
.
ONE_INT
==
deleteFlag
){
tInsuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceDetail
.
setUpdateBy
(
user
.
getId
());
tInsuranceDetail
.
setReduceHandleStatus
(
refundType
);
}
}
return
R
.
ok
(
updateBatchById
(
tInsuranceDetails
),
"办理成功"
);
}
/**
...
...
@@ -1587,7 +1752,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
private
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
settleMonthChangeCheck
(
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
)
{
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
new
HashMap
<>();
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
new
HashMap
<>(
16
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
new
ArrayList
();
List
<
SettleMonthChangeCheckParam
>
successList
=
new
ArrayList
<>();
for
(
SettleMonthChangeCheckParam
param
:
settleMonthCheckList
)
{
...
...
@@ -1703,6 +1868,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
Integer
buyType
=
insuranceDetail
.
getBuyType
();
if
(
CommonConstants
.
FOUR_INT
==
buyType
){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//如果结算月份相同
if
(
settleMonth
.
equals
(
insuranceDetail
.
getSettleMonth
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_IDENTICAL
);
...
...
@@ -1719,7 +1890,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//查询结算状态
LambdaQueryWrapper
<
TInsuranceSettle
>
insuranceSettleQuery
=
new
LambdaQueryWrapper
<>();
insuranceSettleQuery
.
eq
(
TInsuranceSettle
::
getInsDetailId
,
insuranceDetail
.
getId
());
TInsuranceSettle
insuranceSettle
=
i
nsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
TInsuranceSettle
insuranceSettle
=
tI
nsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
//当前结算状态为已结算时,不能变更结算月
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_SETTLE_HANDLE_STATUS_ERROR
);
...
...
@@ -1768,7 +1939,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
settleMonthChange
(
List
<
SettleMonthChangeCheckParam
>
settleMonthCheckList
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
settleMonthCheckList
)){
return
R
.
failed
(
"当前变更结算月列表为空"
);
return
R
.
failed
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
);
}
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
);
//todo 生成EKP通知,通知ekp变更结算月份
...
...
@@ -1786,6 +1957,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
update
(
updateWrapper
);
}
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
//判断当前变更是否全部成功
return
R
.
ok
(
errorList
);
}
...
...
@@ -1824,6 +1996,66 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
R
.
ok
(
errorList
);
}
/**
* 根据保险公司名称查询保单明细
*
* @author zhaji
* @param companyName 保险公司名称
* @return {@link R}
*/
@Override
public
R
selectByCompanyName
(
String
companyName
)
{
LambdaQueryWrapper
<
TInsuranceDetail
>
typeWrapper
=
new
LambdaQueryWrapper
<>();
typeWrapper
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
companyName
).
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
list
(
typeWrapper
));
}
/**
* 根据险种id查询保单明细
*
* @author zhaji
* @param id
* @return {@link R}
*/
@Override
public
R
selectByTypeId
(
String
id
)
{
LambdaQueryWrapper
<
TInsuranceDetail
>
typeWrapper
=
new
LambdaQueryWrapper
<>();
typeWrapper
.
eq
(
TInsuranceDetail
::
getInsuranceTypeId
,
id
).
eq
(
TInsuranceDetail:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
list
(
typeWrapper
));
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
updateIsUse
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
TInsuranceDetail
insuranceDetail
=
getById
(
id
);
if
(
Common
.
isEmpty
(
insuranceDetail
)
||
CommonConstants
.
ONE_INT
==
insuranceDetail
.
getDeleteFlag
()){
return
R
.
failed
(
"保单信息不存在或已被删除"
);
}
Integer
reduceHandleStatus
=
insuranceDetail
.
getReduceHandleStatus
();
Integer
buyHandleStatus
=
insuranceDetail
.
getBuyHandleStatus
();
if
(!(
CommonConstants
.
THREE_INT
==
buyHandleStatus
&&
(
null
==
reduceHandleStatus
||
CommonConstants
.
THREE_INT
==
reduceHandleStatus
))){
return
R
.
failed
(
"当前保单信息非已投保且未减员状态,不能进行出险操作"
);
}
Integer
isEffect
=
insuranceDetail
.
getIsEffect
();
if
(
CommonConstants
.
ZERO_INT
!=
isEffect
){
return
R
.
failed
(
"保单信息已被替换,不能进行出险操作"
);
}
Integer
isUse
=
insuranceDetail
.
getIsUse
();
if
(
CommonConstants
.
ZERO_INT
!=
isUse
){
return
R
.
failed
(
"保单信息已出险,不能进行出险操作"
);
}
Integer
isOverdue
=
insuranceDetail
.
getIsOverdue
();
if
(
CommonConstants
.
ZERO_INT
!=
isOverdue
){
return
R
.
failed
(
"保单信息已过期,不能进行出险操作"
);
}
insuranceDetail
.
setIsUse
(
CommonConstants
.
ONE_INT
);
insuranceDetail
.
setUpdateBy
(
user
.
getId
());
insuranceDetail
.
setUpdateTime
(
LocalDateTime
.
now
());
updateById
(
insuranceDetail
);
return
null
;
}
/**
* 校验所属项目
*
...
...
@@ -1832,8 +2064,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
public
Map
<
String
,
List
<
DeptChangeCheckParam
>>
deptChangeCheck
(
List
<
DeptChangeCheckParam
>
deptChangeCheckList
)
{
Map
<
String
,
List
<
DeptChangeCheckParam
>>
map
=
new
HashMap
<>();
List
<
DeptChangeCheckParam
>
errorList
=
new
ArrayList
();
Map
<
String
,
List
<
DeptChangeCheckParam
>>
map
=
new
HashMap
<>(
16
);
List
<
DeptChangeCheckParam
>
errorList
=
new
ArrayList
<>
();
List
<
DeptChangeCheckParam
>
successList
=
new
ArrayList
<>();
for
(
DeptChangeCheckParam
param
:
deptChangeCheckList
)
{
String
newDeptNo
=
param
.
getNewDeptNo
();
...
...
@@ -1849,7 +2081,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//员工身份证
String
empIdCardNo
=
param
.
getEmpIdCardNo
();
if
(
StringUtils
.
isBlank
(
empIdCardNo
)){
...
...
@@ -1857,7 +2088,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//保险公司名称
String
insuranceCompanyName
=
param
.
getInsuranceCompanyName
();
if
(
StringUtils
.
isBlank
(
insuranceCompanyName
)){
...
...
@@ -1865,7 +2095,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//险种名称
String
insuranceTypeName
=
param
.
getInsuranceTypeName
();
if
(
StringUtils
.
isBlank
(
insuranceTypeName
)){
...
...
@@ -1881,7 +2110,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//保单结束日期
String
policyEnd
=
param
.
getPolicyEnd
();
if
(
StringUtils
.
isBlank
(
policyEnd
)){
...
...
@@ -1954,6 +2182,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//必填格式校通过后查询对应的保单信息
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
).
eq
(
TInsuranceDetail
::
getEmpName
,
empName
)
.
eq
(
TInsuranceDetail
::
getEmpIdcardNo
,
empIdCardNo
).
eq
(
TInsuranceDetail
::
getInsuranceTypeName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getBuyStandard
,
buyStandard
)
.
eq
(
TInsuranceDetail
::
getInsuranceCompanyName
,
insuranceCompanyName
)
.
eq
(
TInsuranceDetail
::
getPolicyStart
,
policyStart
).
eq
(
TInsuranceDetail
::
getPolicyEnd
,
policyEnd
);
TInsuranceDetail
insuranceDetail
=
getOne
(
queryWrapper
);
//替换类型的保单不能变更所属项目
Integer
buyType
=
insuranceDetail
.
getBuyType
();
if
(
CommonConstants
.
FOUR_INT
==
buyType
){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_IS_EFFECT_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//查询结算状态
LambdaQueryWrapper
<
TInsuranceSettle
>
insuranceSettleQuery
=
new
LambdaQueryWrapper
<>();
insuranceSettleQuery
.
eq
(
TInsuranceSettle
::
getInsDetailId
,
insuranceDetail
.
getId
());
TInsuranceSettle
insuranceSettle
=
tInsuranceSettleService
.
getOne
(
insuranceSettleQuery
);
//当前结算状态为:结算中,已结算时,不能变更所属项目
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
insuranceSettle
.
getSettleHandleStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_SETTLE_HANDLE_STATUS_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//判断当前数据中是否存在重复数据
boolean
b
=
successList
.
stream
().
anyMatch
(
u
->
u
.
getEmpName
().
equals
(
param
.
getEmpName
())
&&
u
.
getEmpIdCardNo
().
equals
(
param
.
getEmpIdCardNo
())&&
u
.
getOldDeptNo
().
equals
(
param
.
getOldDeptNo
())
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceOperateServiceImpl.java
0 → 100644
View file @
4b48583b
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceOperateMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService
;
import
org.springframework.stereotype.Service
;
/**
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service实现
* @date 2022-07-25 14:20:16
*/
@Service
public
class
TInsuranceOperateServiceImpl
extends
ServiceImpl
<
TInsuranceOperateMapper
,
TInsuranceOperate
>
implements
TInsuranceOperateService
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceSettleServiceImpl.java
View file @
4b48583b
...
...
@@ -8,12 +8,11 @@ import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceSettleService;
import
org.springframework.stereotype.Service
;
/**
* @author Administrator
* @description 针对表【t_insurance_settle(商险结算表)】的数据库操作Service实现
* @createDate 2022-07-21 16:21:22
*/
* @author licancan
* @description 针对表【t_insurance_settle(商险结算表)】的数据库操作Service实现
* @date 2022-07-25 14:20:16
*/
@Service
public
class
TInsuranceSettleServiceImpl
extends
ServiceImpl
<
TInsuranceSettleMapper
,
TInsuranceSettle
>
implements
TInsuranceSettleService
{
public
class
TInsuranceSettleServiceImpl
extends
ServiceImpl
<
TInsuranceSettleMapper
,
TInsuranceSettle
>
implements
TInsuranceSettleService
{
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeRateServiceImpl.java
View file @
4b48583b
...
...
@@ -7,6 +7,8 @@ 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.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
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
;
...
...
@@ -15,8 +17,10 @@ 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
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -59,7 +63,9 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
deleteInsuranceTypeRate
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"费率id不能为空"
);
}
...
...
@@ -68,9 +74,11 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
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
));
updateWrapper
.
eq
(
TInsuranceTypeRate:
:
getId
,
id
)
.
set
(
TInsuranceTypeRate:
:
getDeleteFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceTypeRate
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceTypeRate
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
),
"删除费率信息成功"
);
}
/**
...
...
@@ -81,7 +89,9 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
saveInsuranceTypeRate
(
TInsuranceTypeRate
insuranceTypeRate
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
insuranceTypeRate
)){
return
R
.
failed
(
"新增的费率信息为空"
);
}
...
...
@@ -103,6 +113,10 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
.
eq
(
TInsuranceTypeRate
::
getRate
,
insuranceTypeRate
.
getRate
()).
eq
(
TInsuranceTypeRate:
:
getMonth
,
insuranceTypeRate
.
getMonth
());
List
<
TInsuranceTypeRate
>
list
=
this
.
list
(
queryWrapper
);
if
(
list
.
isEmpty
()){
insuranceTypeRate
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceTypeRate
.
setCreateBy
(
user
.
getId
());
insuranceTypeRate
.
setCreateName
(
user
.
getNickname
());
insuranceTypeRate
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeRate
));
}
else
{
return
R
.
failed
(
"当前险种已存在相同的费率"
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeServiceImpl.java
View file @
4b48583b
...
...
@@ -2,12 +2,15 @@ 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.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.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
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
;
...
...
@@ -19,10 +22,12 @@ 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.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -58,10 +63,11 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
*/
@Override
public
R
saveInsuranceType
(
TInsuranceType
insuranceType
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
String
bankNo
=
insuranceType
.
getBankNo
();
if
(
Common
.
isNumber
(
bankNo
)){
if
(
!
Common
.
isNumber
(
bankNo
)){
return
R
.
failed
(
"银行账号格式不正确"
);
}
LambdaQueryWrapper
<
TInsuranceCompany
>
companyWrapper
=
new
LambdaQueryWrapper
<>();
companyWrapper
.
eq
(
TInsuranceCompany:
:
getId
,
companyId
).
eq
(
TInsuranceCompany:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
...
...
@@ -75,6 +81,10 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
if
(!
Common
.
isEmpty
(
type
)){
return
R
.
failed
(
"当前险种已存在"
);
}
else
{
insuranceType
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceType
.
setCreateBy
(
user
.
getId
());
insuranceType
.
setCreateName
(
user
.
getNickname
());
insuranceType
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
save
(
insuranceType
));
}
}
...
...
@@ -104,4 +114,66 @@ public class TInsuranceTypeServiceImpl extends ServiceImpl<TInsuranceTypeMapper,
return
R
.
ok
(
insuranceTypeVo
);
}
/**
* 修改险种信息
*
* @author zhaji
* @param insuranceType 险种信息
* @return {@link R}
*/
@Override
public
R
updateInsuranceType
(
TInsuranceType
insuranceType
)
{
if
(
Common
.
isEmpty
(
insuranceType
.
getId
())){
return
R
.
failed
(
"险种ID不能为空"
);
}
TInsuranceType
byId
=
getById
(
insuranceType
.
getId
());
if
(
Common
.
isEmpty
(
byId
)
||
byId
.
getDeleteFlag
()
==
CommonConstants
.
ONE_INT
){
return
R
.
failed
(
"当前险种信息不存在或已被删除"
);
}
if
(
byId
.
getName
().
equals
(
insuranceType
.
getName
())){
return
R
.
ok
(
this
.
updateById
(
insuranceType
),
"修改险种信息成功"
);
}
else
{
LambdaQueryWrapper
<
TInsuranceType
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceType:
:
getName
,
insuranceType
.
getName
())
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
insuranceType
.
getInsuranceCompanyId
())
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
TInsuranceType
one
=
this
.
getOne
(
queryWrapper
);
if
(
Common
.
isEmpty
(
one
)){
return
R
.
ok
(
this
.
updateById
(
insuranceType
),
"修改险种信息成功"
);
}
else
{
return
R
.
failed
(
"当前险种名称已存在"
);
}
}
}
/**
* 查询险种列表
*
* @author zhaji
* @param insuranceType 险种信息
* @return {@link List< TInsuranceType>}
*/
@Override
public
R
getInsuranceTypeList
(
TInsuranceType
insuranceType
)
{
String
companyId
=
insuranceType
.
getInsuranceCompanyId
();
LambdaQueryWrapper
<
TInsuranceType
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
TInsuranceType:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
if
(
StringUtils
.
isBlank
(
companyId
)){
List
<
TInsuranceType
>
list
=
this
.
list
(
query
);
return
R
.
ok
(
list
,
"查询险种列表成功"
);
}
else
{
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
(
"所属保险公司不存在或已被删除"
);
}
else
{
query
.
eq
(
TInsuranceType:
:
getInsuranceCompanyId
,
companyId
);
List
<
TInsuranceType
>
list
=
this
.
list
(
query
);
return
R
.
ok
(
list
,
"查询险种列表成功"
);
}
}
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
4b48583b
...
...
@@ -6,6 +6,8 @@ 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.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
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
;
...
...
@@ -15,8 +17,10 @@ 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
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
/**
...
...
@@ -61,7 +65,9 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
deleteInsuranceTypeStandard
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"购买标准id不能为空"
);
}
...
...
@@ -78,9 +84,11 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
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
));
updateWrapper
.
eq
(
TInsuranceTypeStandard:
:
getId
,
id
)
.
set
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ONE_INT
)
.
set
(
TInsuranceTypeStandard
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceTypeStandard
::
getUpdateTime
,
LocalDateTime
.
now
());
return
R
.
ok
(
update
(
updateWrapper
),
"删除购买标准成功"
);
}
/**
* 新增购买标准
...
...
@@ -90,7 +98,9 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
* @return {@link R}
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
saveInsuranceTypeStandard
(
TInsuranceTypeStandard
insuranceTypeStandard
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
insuranceTypeStandard
)){
return
R
.
failed
(
"新增的购买标准信息为空"
);
}
...
...
@@ -117,7 +127,11 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
.
eq
(
TInsuranceTypeStandard:
:
getDeleteFlag
,
CommonConstants
.
ZERO_INT
);
List
<
TInsuranceTypeStandard
>
list
=
list
(
queryWrapper
);
if
(
list
.
isEmpty
()){
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
));
insuranceTypeStandard
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
insuranceTypeStandard
.
setCreateBy
(
user
.
getId
());
insuranceTypeStandard
.
setCreateName
(
user
.
getNickname
());
insuranceTypeStandard
.
setCreateTime
(
LocalDateTime
.
now
());
return
R
.
ok
(
this
.
baseMapper
.
insert
(
insuranceTypeStandard
),
"新增购买标准成功"
);
}
else
{
return
R
.
failed
(
"当前险种下的购买标准已存在"
);
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
4b48583b
...
...
@@ -8,7 +8,6 @@
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"empName"
column=
"EMP_NAME"
jdbcType=
"VARCHAR"
/>
<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"
/>
...
...
@@ -53,7 +52,7 @@
<sql
id=
"Base_Column_List"
>
ID,EMP_NAME,
EMP_IDCARD_NO,
ORDER_NO,
DEPT_NO,POST,INSURANCE_COMPANY_NAME,INSURANCE_TYPE_NAME,
EMP_IDCARD_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,
...
...
@@ -67,7 +66,6 @@
</sql>
<select
id=
"getInsuranceListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -104,7 +102,6 @@
<select
id=
"getInsuranceList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -141,6 +138,7 @@
<select
id=
"getInsuranceDetailById"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceDetailVO"
>
select
detail.id as id,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -184,7 +182,6 @@
<select
id=
"getInsuranceExportListBySelect"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -215,7 +212,6 @@
<select
id=
"getInsuranceExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceExportListVO"
>
select detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -257,7 +253,6 @@
<select
id=
"getInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -271,7 +266,8 @@
detail.INSURANCE_COMPANY_NAME as insuranceCompanyName,
detail.INSURANCE_TYPE_NAME as insuranceTypeName,
detail.BUY_STANDARD as buyStandard
from t_insurance_detail detail
from
t_insurance_detail detail
where
detail.DELETE_FLAG = 0
and
...
...
@@ -315,7 +311,6 @@
<select
id=
"getInsuredList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -386,7 +381,6 @@
<select
id=
"getInsuranceRefundPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.POST as post,
...
...
@@ -395,11 +389,14 @@
detail.POLICY_START as policyStart,
detail.POLICY_END as policyEnd,
detail.POLICY_NO as policyNo,
detail.REFUND_
CREATE_TIME as refundCreateTime
refund.
CREATE_TIME as refundCreateTime
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.DELETE_FLAG = 0
and
detail.ID = refund.INS_DETAIL_ID
and
detail.REDUCE_HANDLE_STATUS = 4
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
...
@@ -423,12 +420,11 @@
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
AND detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
ORDER BY
detail.REFUND_
CREATE_TIME DESC
ORDER BY
refund.
CREATE_TIME DESC
</select>
<select
id=
"getInsuranceRefundList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -445,10 +441,13 @@
detail.BUY_STANDARD as buyStandard,
detail.MEDICAL_QUOTA as medicalQuota,
detail.DIE_DISABLE_QUOTA as dieDisableQuota,
detail.REFUND_
CREATE_TIME as refundCreateTime
refund.
CREATE_TIME as refundCreateTime
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.ID = refund.INS_DETAIL_ID
and
detail.DELETE_FLAG = 0
and
detail.REDUCE_HANDLE_STATUS = 4
...
...
@@ -473,12 +472,11 @@
<if
test=
"param.policyEnd != null and param.policyEnd.trim() != ''"
>
AND detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59')
</if>
ORDER BY
detail.REFUND_
CREATE_TIME DESC
ORDER BY
refund.
CREATE_TIME DESC
</select>
<select
id=
"getInsuranceRefundHandlingPageList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
detail.BUY_TYPE as buyType,
...
...
@@ -498,9 +496,10 @@
detail.CREATE_NAME as createName,
detail.REDUCE_HANDLE_STATUS as reduceHandleStatus
from
t_insurance_detail detail
t_insurance_detail detail,
t_insurance_refund refund
where
detail.
DELETE_FLAG = 0
detail.
ID = refund.INS_DETAIL_ID
and
(detail.REDUCE_HANDLE_STATUS is not null and detail.REDUCE_HANDLE_STATUS != 3)
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
...
@@ -521,12 +520,11 @@
<if
test=
"param.isUse != null and param.isUse.trim() != ''"
>
and detail.IS_USE like concat('%',replace(replace(#{param.isUse},'_','\_'),'%','\%'),'%')
</if>
ORDER BY
detail.REFUND_
CREATE_TIME DESC
ORDER BY
refund.
CREATE_TIME DESC
</select>
<select
id=
"getInsuranceRefundHandlingList"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceRefundHandlingListVo"
>
select
detail.id as id,
detail.ORDER_NO as orderNo,
detail.DEPT_NO as deptNo,
detail.EMP_NAME as empName,
detail.EMP_IDCARD_NO as empIdcardNo,
...
...
@@ -574,6 +572,19 @@
ORDER BY detail.REFUND_CREATE_TIME DESC
</select>
<select
id=
"selectDetailListByIds"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
select
<include
refid=
"Base_Column_List"
></include>
from
t_insurance_detail
where
ID in
<foreach
collection=
"param.idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<update
id=
"updateInsuranceRefund"
>
update
t_insurance_detail detail
...
...
@@ -582,9 +593,11 @@
REDUCE_HANDLE_STATUS = #{param.refundType},
UPDATE_TIME = #{param.refundCreateTime}
where
detail.
id
in
detail.
ID
in
<foreach
collection=
"param.idList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</update>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceOperateMapper.xml
0 → 100644
View file @
4b48583b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate"
>
<id
property=
"id"
column=
"ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"insuranceDetailId"
column=
"INSURANCE_DETAIL_ID"
jdbcType=
"VARCHAR"
/>
<result
property=
"operateDesc"
column=
"OPERATE_DESC"
jdbcType=
"VARCHAR"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
jdbcType=
"VARCHAR"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,INSURANCE_DETAIL_ID,OPERATE_DESC,
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeMapper.xml
View file @
4b48583b
...
...
@@ -44,7 +44,6 @@
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
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceTypeStandardMapper.xml
View file @
4b48583b
...
...
@@ -13,6 +13,6 @@
</resultMap>
<sql
id=
"Base_Column_List"
>
ID,INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA
ID,INSURANCE_TYPE_ID,BUY_STANDARD,MEDICAL_QUOTA,DIE_DISABLE_QUOTA
,
</sql>
</mapper>
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPreDispatchInfoController.java
View file @
4b48583b
...
...
@@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
...
@@ -34,7 +33,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPreDispatchInfoService;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchUpdateVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.ehcache.impl.internal.util.ServiceUtil
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
...
...
@@ -43,7 +41,6 @@ import lombok.RequiredArgsConstructor;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLDecoder
;
import
java.util.ArrayList
;
...
...
@@ -221,7 +218,7 @@ public class TPreDispatchInfoController {
* @Author huyc
* @Date 2022-07-18
* @param jsonString
* @param
houseId 社保户ID
* @param
socialHouse 社保户
* @param departId 结算主体ID
* @return
**/
...
...
@@ -229,9 +226,8 @@ public class TPreDispatchInfoController {
@SysLog
(
"预派单批量新增派增"
)
@PostMapping
(
"/analysisJsonStringImportAdd"
)
@PreAuthorize
(
"@pms.hasPermission('social:tpredispatchinfo_importAddList')"
)
public
R
analysisJsonStringImportAdd
(
@RequestBody
String
jsonString
,
@RequestParam
(
value
=
"houseId"
,
required
=
true
)
String
houseId
,
@RequestParam
(
value
=
"departId"
,
required
=
true
)
String
departId
)
{
public
R
analysisJsonStringImportAdd
(
@RequestBody
String
jsonString
,
@RequestParam
(
value
=
"socialHouse"
,
required
=
false
)
String
socialHouse
,
@RequestParam
(
value
=
"fundHouse"
,
required
=
false
)
String
fundHouse
,
@RequestParam
String
departId
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
null
==
user
||
null
==
user
.
getId
())
{
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
...
...
@@ -248,7 +244,7 @@ public class TPreDispatchInfoController {
return
R
.
failed
(
util1
.
getErrorInfo
(),
PreDispatchConstants
.
DATA_CHECK
);
}
else
{
if
(
null
!=
listInfo
&&
!
listInfo
.
isEmpty
())
{
errorInfo
=
tPreDispatchInfoService
.
batchSavePreDisPatchAdd
(
listInfo
,
user
,
houseId
,
departId
);
errorInfo
=
tPreDispatchInfoService
.
batchSavePreDisPatchAdd
(
listInfo
,
user
,
socialHouse
,
fundHouse
,
departId
);
}
else
{
errorInfo
.
add
(
new
ErrorMessage
(
null
,
CommonConstants
.
DATA_CAN_NOT_EMPTY
));
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPreDispatchInfoService.java
View file @
4b48583b
...
...
@@ -104,11 +104,11 @@ public interface TPreDispatchInfoService extends IService<TPreDispatchInfo> {
* @Date 2022-07-18
* @param listInfo
* @param user
* @param
houseId
* @param
socialHouse
* @param departId
* @return
**/
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
houseId
,
String
departId
);
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
socialHouse
,
String
fundHouse
,
String
departId
);
/**
* 预派单批量新增派减
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
4b48583b
...
...
@@ -546,7 +546,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
@Override
public
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
houseId
,
String
departId
)
{
public
List
<
ErrorMessage
>
batchSavePreDisPatchAdd
(
List
<
TPreDispatchInfo
>
listInfo
,
YifuUser
user
,
String
socialHouse
,
String
fundHouse
,
String
departId
)
{
List
<
ErrorMessage
>
errorList
=
new
ArrayList
<>();
R
<
TSettleDomainSelectVo
>
domainR
=
archivesDaprUtil
.
getSettleDomainSelectVoById
(
departId
);
TSettleDomainSelectVo
selectVo
=
domainR
.
getData
();
...
...
@@ -579,7 +579,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
continue
;
}
// 基础封装 其他
initBaseInfo
(
houseId
,
selectVo
,
info
);
initBaseInfo
(
socialHouse
,
fundHouse
,
selectVo
,
info
);
// 2.先校验已有数据
checkBatchSave
(
info
,
CommonConstants
.
ZERO_STRING
);
// 3.封装 社保缴纳地 公积金缴纳地
...
...
@@ -1026,15 +1026,14 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
/**
* 初始化基础数据 如 各种状态 合同数据等
*
* @param houseId
* @param socialHouse
* @param selectVo
* @param info
* @return
* @Author fxj
* @Date 2020-12-31
**/
private
void
initBaseInfo
(
String
houseId
,
TSettleDomainSelectVo
selectVo
,
TPreDispatchInfo
info
)
{
private
void
initBaseInfo
(
String
socialHouse
,
String
fundHouse
,
TSettleDomainSelectVo
selectVo
,
TPreDispatchInfo
info
)
{
info
.
setType
(
CommonConstants
.
ZERO_STRING
);
info
.
setDataSubStatus
(
CommonConstants
.
ONE_STRING
);
info
.
setStatus
(
CommonConstants
.
ZERO_STRING
);
...
...
@@ -1056,8 +1055,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
info
.
setContractTermAdd
(
Integer
.
toString
(
Common
.
getYearOfTime
(
info
.
getContractStart
(),
info
.
getContractEnd
())));
// 默认工时制 综合工时制2
info
.
setWorkingHoursAdd
(
CommonConstants
.
TWO_STRING
);
info
.
setSocialHouseAdd
(
houseId
);
info
.
setFundHouseAdd
(
houseId
);
info
.
setSocialHouseAdd
(
socialHouse
);
info
.
setFundHouseAdd
(
fundHouse
);
}
/**
...
...
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