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
fc4fa1fc
Commit
fc4fa1fc
authored
Aug 25, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
cbcc250c
7e4fe0db
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
575 additions
and
182 deletions
+575
-182
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+2
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+98
-4
TInsuranceEkp.java
...u/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
+10
-2
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+2
-2
EKP.java
...n/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EKP.java
+0
-27
EKPInteractiveParam.java
...cloud/plus/v1/yifu/insurances/vo/EKPInteractiveParam.java
+6
-0
SettleVo.java
...a/com/yifu/cloud/plus/v1/yifu/insurances/vo/SettleVo.java
+37
-0
TInsuranceEnclosureController.java
.../insurances/controller/TInsuranceEnclosureController.java
+12
-12
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+9
-0
TInsuranceEkpMapper.java
...d/plus/v1/yifu/insurances/mapper/TInsuranceEkpMapper.java
+10
-0
TInsuranceEnclosureService.java
...1/yifu/insurances/service/TInsuranceEnclosureService.java
+4
-4
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+299
-89
TInsuranceEkpServiceImpl.java
...ifu/insurances/service/impl/TInsuranceEkpServiceImpl.java
+3
-7
TInsuranceEnclosureServiceImpl.java
...surances/service/impl/TInsuranceEnclosureServiceImpl.java
+18
-17
TInsuranceTypeStandardServiceImpl.java
...ances/service/impl/TInsuranceTypeStandardServiceImpl.java
+0
-3
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+6
-0
TInsuranceEkpMapper.xml
...ces-biz/src/main/resources/mapper/TInsuranceEkpMapper.xml
+12
-1
TInsuranceEnclosureMapper.xml
...z/src/main/resources/mapper/TInsuranceEnclosureMapper.xml
+1
-0
SalaryUploadController.java
...lus/v1/yifu/salary/controller/SalaryUploadController.java
+13
-0
SalaryUploadService.java
...loud/plus/v1/yifu/salary/service/SalaryUploadService.java
+2
-0
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+20
-7
SalaryAccountUtil.java
...ifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
+6
-4
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+4
-2
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+1
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
fc4fa1fc
...
...
@@ -243,6 +243,8 @@ public interface CommonConstants {
int
FIVE_INT
=
5
;
String
TEN_STRING
=
"10"
;
int
SEVEN_INT
=
7
;
public
static
final
String
SPOT
=
"."
;
int
FIFTY_INT
=
50
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
fc4fa1fc
...
...
@@ -881,19 +881,113 @@ public class InsurancesConstants {
*/
public
static
final
String
REFUND_STATUS_ONE_HANDLE_ERROR
=
"当前为待减员状态,不可办理"
;
/**
* 当前为
已减员
状态,不可办理
* 当前为
减员退回
状态,不可办理
*/
public
static
final
String
REFUND_STATUS_THREE_HANDLE_ERROR
=
"当前为
已减员
状态,不可办理"
;
public
static
final
String
REFUND_STATUS_THREE_HANDLE_ERROR
=
"当前为
减员退回
状态,不可办理"
;
/**
* 当前为
减员退回
状态,不可办理
* 当前为
已减员
状态,不可办理
*/
public
static
final
String
REFUND_STATUS_FOUR_HANDLE_ERROR
=
"当前为
减员退回
状态,不可办理"
;
public
static
final
String
REFUND_STATUS_FOUR_HANDLE_ERROR
=
"当前为
已减员
状态,不可办理"
;
/**
* 办理意见长度超过50字符限制
*/
public
static
final
String
HAND_REMARK_NOT_MORE_THAN_50
=
"办理意见长度超过50字符限制"
;
/**
* 操作类型不正确
*/
public
static
final
String
OPERATION_TYPE_ERROR
=
"操作类型不正确"
;
/**
* 该保单信息已被更新为减员成功
*/
public
static
final
String
INSURANCE_DETAIL_IS_REFUND_SUCCESS
=
"该保单信息已被更新为减员成功"
;
/**
* 该保单信息已被更新为减员退回
*/
public
static
final
String
INSURANCE_DETAIL_IS_REFUND_FAIL
=
"该保单信息已被更新为减员退回"
;
/**
* 减员退回的办理意见不能为空
*/
public
static
final
String
REMARK_IS_EMPTY
=
"减员退回的办理意见不能为空"
;
/**
* 列表为空
*/
public
static
final
String
OPERATION_LIST_IS_EMPTY
=
"列表为空"
;
/**EKP提示*/
/**
* 更新EKP结算月份失败
*/
public
static
final
String
EKP_UPDATE_SETTLE_MONTH_ERROR
=
"更新EKP结算月份失败"
;
/**电子保单提示*/
/**
* 电子保单为空
*/
public
static
final
String
INSURANCE_ENCLOSURE_IS_EMPTY
=
"电子保单为空"
;
/**
* 非法的电子保单类型
*/
public
static
final
String
INSURANCE_ENCLOSURE_TYPE_IS_ERROR
=
"非法的电子保单类型"
;
/**
* 电子保单超出上传上限
*/
public
static
final
String
INSURANCE_ENCLOSURE_SIZE_ERROR
=
"电子保单超出上传上限"
;
/**
* 电子保单备注字段不能超过50个字符
*/
public
static
final
String
INSURANCE_ENCLOSURE_REMARK_SIZE_ERROR
=
"电子保单备注字段不能超过50个字符"
;
/**
* 电子保单上传成功
*/
public
static
final
String
INSURANCE_ENCLOSURE_UPLOAD_SUCCESS
=
"电子保单上传成功"
;
/**
* 电子保单上传失败
*/
public
static
final
String
INSURANCE_ENCLOSURE_UPLOAD_FAIL
=
"电子保单上传失败"
;
/**
* 电子保单id为空
*/
public
static
final
String
INSURANCE_ENCLOSURE_ID_IS_EMPTY
=
"电子保单id为空"
;
/**
* 无对应的电子保单信息
*/
public
static
final
String
INSURANCE_ENCLOSURE_IS_NOT_EXIST
=
"无对应的电子保单信息"
;
/**
* 删除电子保单成功
*/
public
static
final
String
INSURANCE_ENCLOSURE_DELETE_SUCCESS
=
"删除电子保单成功"
;
/**
* 电子保单删除失败
*/
public
static
final
String
INSURANCE_ENCLOSURE_DELETE_FAIL
=
"电子保单删除失败"
;
/**
* 电子保单删除异常
*/
public
static
final
String
INSURANCE_ENCLOSURE_DELETE_ABNORMAL
=
"电子保单删除异常"
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/entity/TInsuranceEkp.java
View file @
fc4fa1fc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
entity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
...
...
@@ -136,12 +138,18 @@ public class TInsuranceEkp implements Serializable {
/**
* 创建时间
*/
private
Dat
e
createTime
;
private
LocalDateTim
e
createTime
;
/**
* 发送时间
*/
private
Date
pushTime
;
private
LocalDateTime
pushTime
;
/**
* EKP推送类型
*/
@Schema
(
description
=
"1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费"
)
private
Integer
pushType
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
View file @
fc4fa1fc
...
...
@@ -85,7 +85,7 @@ public class EKPUtil {
public
static
String
sendToEKP
(
EKPInteractiveParam
param
){
log
.
info
(
"推送EKP开始"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
TInsuranceSettlePushParam
pushParam
=
I
nsuranceDetail2PushParam
(
param
);
TInsuranceSettlePushParam
pushParam
=
i
nsuranceDetail2PushParam
(
param
);
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
pushParam
);
//指向EKP的接口url
...
...
@@ -134,7 +134,7 @@ public class EKPUtil {
* @param param 转换类
* @return {@link TInsuranceSettlePushParam}
*/
public
static
TInsuranceSettlePushParam
I
nsuranceDetail2PushParam
(
EKPInteractiveParam
param
){
public
static
TInsuranceSettlePushParam
i
nsuranceDetail2PushParam
(
EKPInteractiveParam
param
){
String
format
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
TInsuranceSettlePushParam
pushParam
=
new
TInsuranceSettlePushParam
();
param
.
setHappenDate
(
format
);
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EKP.java
deleted
100644 → 0
View file @
cbcc250c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Value
;
/**
* @author zhaji
* @description TODO
* @date 2022-08-08 17:59:20
*/
@Data
public
class
EKP
{
@Value
(
"${ekp.url}"
)
private
String
url
;
@Value
(
"${ekp.fdModelId}"
)
private
String
fdModelId
;
@Value
(
"${ekp.fdFlowId}"
)
private
String
fdFlowId
;
@Value
(
"${ekp.docStatus}"
)
private
String
docStatus
;
@Value
(
"${ekp.docSubject}"
)
private
String
docSubject
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EKPInteractiveParam.java
View file @
fc4fa1fc
...
...
@@ -165,4 +165,10 @@ public class EKPInteractiveParam implements Serializable {
@Schema
(
description
=
"状态:1新增结算单,2更新结算单信息,3作废结算单信息"
)
private
Integer
interactiveType
;
/**
* EKP推送类型
*/
@Schema
(
description
=
"1推送预估费用,2推送实缴费用,3变更结算月,4推送作废信息,5推送红冲信息,6投保退回红冲,7变更保单保费"
)
private
Integer
pushType
;
}
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/SettleVo.java
0 → 100644
View file @
fc4fa1fc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author zhaji
* @description EKP结算信息表
* @date 2022-08-24 17:37:21
*/
@Data
@Tag
(
name
=
"EKP结算信息表"
)
public
class
SettleVo
implements
Serializable
{
/**
* 结算id
*/
@Schema
(
description
=
"结算id"
)
private
String
fd_3b05ba46bb042e
;
/**
* 预估单结算状态
*/
@Schema
(
description
=
"预估单结算状态:未结算、已结算、结算中、无需结算"
)
private
String
fd_3b05ba4808a3ca
;
/**
* 实缴单结算状态
*/
@Schema
(
description
=
"实缴单结算状态:未结算、已结算、结算中、无需结算"
)
private
String
fd_3b05bd5ed0b976
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceEnclosureController.java
View file @
fc4fa1fc
...
...
@@ -40,7 +40,7 @@ public class TInsuranceEnclosureController {
TInsuranceEnclosureService
tInsuranceEnclosureService
;
/**
*
商险文件
上传
*
电子保单
上传
*
* @param file 文件
* @param filePath 如: import 或 import/test/test..../test
...
...
@@ -49,45 +49,45 @@ public class TInsuranceEnclosureController {
* @Author zhaji
* @Date 2022-08-23
*/
@SysLog
(
"
商险文件
上传"
)
@Schema
(
description
=
"
商险文件
上传"
)
@SysLog
(
"
电子保单
上传"
)
@Schema
(
description
=
"
电子保单
上传"
)
@PostMapping
(
value
=
"/uploadInsuranceEnclosure"
)
public
R
uploadInsuranceEnclosure
(
@RequestBody
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
return
tInsuranceEnclosureService
.
uploadInsuranceEnclosure
(
file
,
filePath
,
remark
);
}
/**
* 获取
附件
下载地址
* 获取
电子保单
下载地址
*
* @param id
* @return
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"
商险附件
预览下载地址"
)
@SysLog
(
"
商险附件
预览下载地址"
)
@Schema
(
description
=
"
电子保单
预览下载地址"
)
@SysLog
(
"
电子保单
预览下载地址"
)
@GetMapping
(
"/getInsuranceEnclosureUrl/{id}"
)
public
R
getInsuranceEnclosureUrl
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
getInsuranceEnclosureUrl
(
id
);
}
/**
* 删除
商险附件
* 删除
电子保单
*
* @param id 商险id
* @return R
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"删除
商险附件
"
)
@SysLog
(
"删除
商险附件
"
)
@Schema
(
description
=
"删除
电子保单
"
)
@SysLog
(
"删除
电子保单
"
)
@GetMapping
(
"/deleteInsuranceEnclosure/{id}"
)
public
R
deleteInsuranceEnclosure
(
@PathVariable
String
id
)
{
return
tInsuranceEnclosureService
.
deleteInsuranceEnclosure
(
id
);
}
/**
*
商险附件
列表分页查询
*
电子保单
列表分页查询
*
* @param page 分页参数
* @param param 查询条件
...
...
@@ -95,8 +95,8 @@ public class TInsuranceEnclosureController {
* @Author zhaji
* @Date 2022-08-23
**/
@Schema
(
description
=
"
商险附件
列表分页查询"
)
@SysLog
(
"
商险附件
列表分页查询"
)
@Schema
(
description
=
"
电子保单
列表分页查询"
)
@SysLog
(
"
电子保单
列表分页查询"
)
@PostMapping
(
"/getInsuranceEnclosurePage"
)
public
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
@RequestBody
InsuranceEnclosureParam
param
)
{
return
tInsuranceEnclosureService
.
getInsuranceEnclosurePage
(
page
,
param
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
fc4fa1fc
...
...
@@ -75,6 +75,15 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List
<
InsuranceExportListVO
>
getInsuranceExportList
(
@Param
(
"param"
)
InsuranceExportListParam
param
);
/**
* 批量更新保单号
*
* @author licancan
* @param details
* @return void
*/
void
updatePolicyNoBatch
(
@Param
(
"details"
)
List
<
TInsuranceDetail
>
details
);
/***********************减员办理********************************/
/**
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceEkpMapper.java
View file @
fc4fa1fc
...
...
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEkp
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @author Administrator
* @description 针对表【t_insurance_ekp(ekp交互失败存储表)】的数据库操作Mapper
...
...
@@ -13,5 +15,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
TInsuranceEkpMapper
extends
BaseMapper
<
TInsuranceEkp
>
{
/**
* 获取所有待发送的ekp
*
* @author zhaji
* @param
* @return {@link List< TInsuranceEkp>}
*/
List
<
TInsuranceEkp
>
getEkpRefundList
();
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceEnclosureService.java
View file @
fc4fa1fc
...
...
@@ -17,7 +17,7 @@ import java.io.IOException;
public
interface
TInsuranceEnclosureService
extends
IService
<
TInsuranceEnclosure
>
{
/**
* 上传
商险附件
* 上传
电子保单
*
* @author zhaji
* @param file 文件
...
...
@@ -29,7 +29,7 @@ public interface TInsuranceEnclosureService extends IService<TInsuranceEnclosure
R
uploadInsuranceEnclosure
(
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
;
/**
* 获取
附件
列表
* 获取
电子保单
列表
*
* @author zhaji
* @param page 分页参数
...
...
@@ -39,7 +39,7 @@ public interface TInsuranceEnclosureService extends IService<TInsuranceEnclosure
R
getInsuranceEnclosurePage
(
Page
<
InsuranceEnclosureParam
>
page
,
InsuranceEnclosureParam
param
);
/**
* 获
取商险附件
地址
* 获
电子保单
地址
*
* @author zhaji
* @param id
...
...
@@ -48,7 +48,7 @@ public interface TInsuranceEnclosureService extends IService<TInsuranceEnclosure
R
getInsuranceEnclosureUrl
(
String
id
);
/**
* 删除
商险附件
* 删除
电子保单
*
* @author zhaji
* @param id
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
fc4fa1fc
...
...
@@ -7,7 +7,6 @@ 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.yifu.archives.vo.ProjectSetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
...
...
@@ -78,9 +77,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
private
TInsuranceOperateService
tInsuranceOperateService
;
@Resource
private
CheckDaprUtil
checkDaprUtil
;
@Resource
private
TInsuranceRefundService
tInsuranceRefundService
;
@Resource
private
TInsuranceEkpService
tInsuranceEkpService
;
@Resource
private
TInsuranceSettleCancelService
tInsuranceSettleCancelService
;
...
...
@@ -800,7 +801,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceOperate
>
list
=
tInsuranceOperateService
.
list
(
Wrappers
.<
TInsuranceOperate
>
query
().
lambda
()
.
eq
(
TInsuranceOperate:
:
getInsuranceDetailId
,
id
)
.
eq
(
TInsuranceOperate:
:
getDisplayFlag
,
CommonConstants
.
ONE_INT
)
.
orderBy
De
sc
(
TInsuranceOperate:
:
getCreateTime
)
.
orderBy
A
sc
(
TInsuranceOperate:
:
getCreateTime
)
);
return
list
;
}
...
...
@@ -1025,7 +1026,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//获取成功数据的remark
paramList
.
stream
().
forEach
(
e
->{
if
(
detail
.
getId
().
equals
(
e
.
getId
())){
...
...
@@ -1223,7 +1223,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateBatchById
(
successList
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
threadPool
.
execute
(()
->
{
//
todo
根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
//根据结算类型是合并结算,推送预估保费到ekp(上面已经算好,这里直接判断有预估保费的就推送)
for
(
TInsuranceDetail
tInsuranceDetail
:
successList
)
{
Integer
settleType
=
tInsuranceDetail
.
getSettleType
();
//如果是合并计算则推送至EKP
...
...
@@ -1237,8 +1237,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.
set
(
TInsuranceSettle
::
getEstimatePushTime
,
LocalDateTime
.
now
());
//更新结算信息表
tInsuranceSettleService
.
update
(
settleWrapper
);
}
else
{
//todo 异常处理
}
}
}
...
...
@@ -1306,12 +1304,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
StringUtils
.
isNotBlank
(
success
.
getPolicyNo
())){
detail
.
setPolicyNo
(
success
.
getPolicyNo
());
//如果保单号不为空,将替换类型的保单号也全部更新
List
<
TInsuranceReplace
>
list
=
tInsuranceReplaceService
.
list
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getOriginInsuranceDetailId
,
detail
.
getId
()));
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
List
<
String
>
collect
=
list
.
stream
().
map
(
TInsuranceReplace:
:
getToInsuranceDetailId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
TInsuranceDetail
>
details
=
this
.
baseMapper
.
selectBatchIds
(
collect
);
if
(
CollectionUtils
.
isNotEmpty
(
details
)){
details
.
stream
().
forEach
(
e
->
e
.
setPolicyNo
(
success
.
getPolicyNo
()));
//这里自己写sql更新保单号,防止用mybatisPlus批量更新,把updateTime更新了(updateTime不能更新)
baseMapper
.
updatePolicyNoBatch
(
details
);
}
}
}
if
(
StringUtils
.
isNotBlank
(
success
.
getActualPremium
())){
//判断推送金额是否一致,不一致才推送ekp
if
(
detail
.
getActualPremium
()
==
null
||
(
new
BigDecimal
(
success
.
getActualPremium
()).
compareTo
(
detail
.
getActualPremium
())
!=
0
)){
// todo 判断是否推送过ekp,没推送过调新增接口,推送过调更新接口
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
settle
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
...
...
@@ -1345,6 +1357,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setActualPremium
(
new
BigDecimal
(
success
.
getActualPremium
()));
threadPool
.
execute
(()
->{
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
TWO_INT
);
//如果推送成功则更改推送状态
if
(
StringUtils
.
isNotBlank
(
s
)){
settle
.
setActualPushTime
(
LocalDateTime
.
now
());
settle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
...
...
@@ -2327,13 +2340,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
else
{
//校验当前项目是否在权限范围内
if
(
!
deptNoList
.
stream
().
any
Match
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
if
(
deptNoList
.
stream
().
none
Match
(
u
->
u
.
equals
(
param
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
}
//校验当前项目是否在权限范围内
if
(
!
deptNoList
.
stream
().
any
Match
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
()))){
if
(
deptNoList
.
stream
().
none
Match
(
u
->
u
.
equals
(
param
.
getReplaceDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
listResult
.
add
(
param
);
continue
;
...
...
@@ -2903,7 +2916,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceList
=
this
.
baseMapper
.
getInsuredListPage
(
page
,
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceList
.
getRecords
())){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceList
.
getRecords
().
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
...
...
@@ -2941,7 +2954,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuredList
=
this
.
baseMapper
.
getInsuredList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuredList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuredList
.
stream
().
map
(
InsuredListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
...
...
@@ -2978,7 +2991,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage
<
InsuranceRefundListVo
>
insuranceRefundPageList
=
this
.
baseMapper
.
getInsuranceRefundPageList
(
page
,
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundPageList
.
getRecords
())){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundPageList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundPageList
.
getRecords
().
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
...
...
@@ -3010,7 +3023,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceRefundListVo
>
insuranceRefundList
=
this
.
baseMapper
.
getInsuranceRefundList
(
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundList
)){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundList
.
stream
().
map
(
InsuranceRefundListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
...
...
@@ -3048,7 +3061,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
IPage
<
RefundExportListVo
>
insuranceRefundHandlingPageList
=
this
.
baseMapper
.
getInsuranceRefundHandlingPageList
(
page
,
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingPageList
.
getRecords
())){
//根据项目编码获取项目名称
List
<
String
>
collect
=
insuranceRefundHandlingPageList
.
getRecords
().
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
insuranceRefundHandlingPageList
.
getRecords
().
stream
().
map
(
RefundExportListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
...
...
@@ -3084,11 +3097,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
refundExportList
=
baseMapper
.
getRefundExportListBySelect
(
param
.
getIdList
());
for
(
RefundExportListVo
refundExportListVo
:
refundExportList
)
{
if
(
null
!=
refundExportListVo
.
getReduceHandleStatus
()
&&
CommonConstants
.
ONE_INT
!=
refundExportListVo
.
getReduceHandleStatus
()){
return
R
.
failed
(
InsurancesConstants
.
CHANGE_ERROR
);
}
}
}
else
{
refundExportList
=
baseMapper
.
getRefundExportList
(
param
);
}
...
...
@@ -3096,7 +3104,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceRefund
>
refundList
=
new
ArrayList
<>();
//根据项目编码获取项目名称
List
<
String
>
collect
=
refundExportList
.
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
refundExportList
.
stream
().
map
(
RefundExportListVo:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
Map
<
String
,
ProjectSetInfoVo
>
data
=
setInfoByCodes
.
getData
().
getProjectSetInfoVoMap
();
...
...
@@ -3126,10 +3134,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//批量更新
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
for
(
TInsuranceDetail
s
:
detailList
)
{
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
s
.
getId
())
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
TWO_INT
);
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
s
.
getId
())
.
set
(
TInsuranceDetail
::
getReduceHandleStatus
,
CommonConstants
.
TWO_INT
);
update
(
updateWrapper
);
}
}
...
...
@@ -3157,16 +3164,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
updateInsuranceRefund
(
InsuranceRefundListParam
insuranceDetail
)
{
Integer
refundType
=
insuranceDetail
.
getRefundType
();
if
(
CommonConstants
.
THREE_INT
!=
refundType
&&
CommonConstants
.
FOUR_INT
!=
refundType
){
return
R
.
failed
(
"当前的操作类型不正确"
);
return
R
.
failed
(
InsurancesConstants
.
OPERATION_TYPE_ERROR
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
String
>
insuranceDetailList
=
insuranceDetail
.
getInsuranceDetailList
();
if
(
CollectionUtils
.
isEmpty
(
insuranceDetailList
)){
return
R
.
failed
(
"减员办理列表为空"
);
return
R
.
failed
(
InsurancesConstants
.
OPERATION_LIST_IS_EMPTY
);
}
String
remark
=
insuranceDetail
.
getRemark
();
if
(
CommonConstants
.
FOUR
_INT
==
refundType
&&
Common
.
isEmpty
(
remark
)){
return
R
.
failed
(
"减员退回的办理意见不能为空"
);
if
(
CommonConstants
.
THREE
_INT
==
refundType
&&
Common
.
isEmpty
(
remark
)){
return
R
.
failed
(
InsurancesConstants
.
REMARK_IS_EMPTY
);
}
List
<
RefundErrorVo
>
errorList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
...
...
@@ -3179,10 +3186,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Integer
deleteFlag
=
tInsuranceDetail
.
getDeleteFlag
();
if
(
refundType
.
equals
(
tInsuranceDetail
.
getReduceHandleStatus
())){
if
(
CommonConstants
.
THREE_INT
==
refundType
){
refundErrorVo
.
setErrorMessage
(
"该保单信息已被更新为减员退回"
);
refundErrorVo
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_DETAIL_IS_REFUND_FAIL
);
errorList
.
add
(
refundErrorVo
);
}
else
{
refundErrorVo
.
setErrorMessage
(
"该保单信息已被更新为减员成功"
);
refundErrorVo
.
setErrorMessage
(
InsurancesConstants
.
INSURANCE_DETAIL_IS_REFUND_SUCCESS
);
errorList
.
add
(
refundErrorVo
);
}
}
else
{
...
...
@@ -3273,6 +3280,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
else
{
operate
.
setOperateDesc
(
InsurancesConstants
.
INSURANCE_REFUND_FAILED
);
}
operateList
.
add
(
operate
);
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
...
...
@@ -3292,6 +3300,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//初始化线程池
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
10
,
10
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
YifuUser
user
=
SecurityUtils
.
getUser
();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(!
Common
.
isNotEmpty
(
settleMonthCheckList
))
{
return
R
.
failed
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
);
}
...
...
@@ -3300,7 +3309,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
List
<
SettleMonthChangeCheckParam
>
ekpList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
SettleMonthChangeCheckParam
settleMonthChangeCheckParam
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail:
:
getId
,
settleMonthChangeCheckParam
.
getId
())
...
...
@@ -3318,7 +3327,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceOperateService
.
save
(
insuranceOperate
);
TInsuranceDetail
byId
=
getById
(
settleMonthChangeCheckParam
.
getId
());
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
))
{
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
||
settle
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
)
{
ekpList
.
add
(
settleMonthChangeCheckParam
);
...
...
@@ -3331,7 +3340,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
ekpList
);
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
String
body
=
EKPUtil
.
sendToEKP
(
ekpInteractiveParam
);
if
(!
StringUtils
.
isBlank
(
body
))
{
if
(!
StringUtils
.
isBlank
(
body
)){
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getDetailId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
...
...
@@ -3341,9 +3350,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate
.
setDisplayFlag
(
CommonConstants
.
ZERO_INT
);
tInsuranceOperateService
.
save
(
insuranceOperate
);
}
else
{
saveInsuranceEkp
(
ekpInteractiveParam
,
CommonConstants
.
THREE_INT
);
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
getDetailId
()))
{
success
.
setErrorMessage
(
"更新EKP结算月份失败"
);
success
.
setErrorMessage
(
InsurancesConstants
.
EKP_UPDATE_SETTLE_MONTH_ERROR
);
errorList
.
add
(
success
);
}
}
...
...
@@ -3351,7 +3361,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
});
}
return
R
.
ok
(
errorList
,
"导入成功"
);
//操作记录
addOperate
(
detailList
,
user
,
InsurancesConstants
.
MONTH_CHANGE
,
null
,
CommonConstants
.
ZERO_INT
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
IMPORT_SUCCESS
);
}
/**
* 变更所属项目
...
...
@@ -3367,7 +3379,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
50
,
50
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
deptChangeCheckList
)){
return
R
.
failed
(
"当前变更所属项目列表为空"
);
return
R
.
failed
(
InsurancesConstants
.
OPERATION_LIST_IS_EMPTY
);
}
Map
<
String
,
List
<
DeptChangeCheckParam
>>
stringListMap
=
deptChangeCheck
(
deptChangeCheckList
,
user
);
List
<
DeptChangeCheckParam
>
successList
=
stringListMap
.
get
(
"successList"
);
...
...
@@ -3433,7 +3445,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleCancelService
.
save
(
cancel
);
//如果已经推送过实际保费,则先作废,再推送新的实际保费
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
)
{
//TODO: 2022/8/2
//推送至EKP执行作废操作
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
...
...
@@ -3463,12 +3474,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理 // TODO: 2022/8/9
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
// TODO: 2022/8/2
//先推送预估,再推送实际
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
...
...
@@ -3497,13 +3508,76 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理 // TODO: 2022/8/9
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
}
else
{
// TODO: 2022/8/9 已有实缴但是未推送则推送新的结算信息
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
)
{
//推送新的结算信息至EKP
interactiveParam
.
setSettleType
(
CommonConstants
.
ONE_INT
);
interactiveParam
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
addBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
addBody
)){
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
)
{
//先推送预估,再推送实际
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
null
);
interactiveParam
.
setSettleType
(
CommonConstants
.
ZERO_INT
);
String
estimateBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
CommonConstants
.
ONE_INT
);
interactiveParam
.
setEstimatePremium
(
null
);
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
// TODO: 2022/8/9 已有实缴但是未推送属于异常,暂时不推
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
}
//未登记保单保费
...
...
@@ -3511,7 +3585,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//变更后为单独结算
if
(
CommonConstants
.
ONE_INT
==
newSettleType
){
//变更项目且不做处理
//update(updateWrapper);
}
//变更后为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
...
...
@@ -3529,7 +3602,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
tInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送结算信息至EKP
// TODO: 2022/8/2
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
...
...
@@ -3546,7 +3618,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
tInsuranceSettle
);
}
else
{
//异常处理 // TODO: 2022/8/9
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
...
...
@@ -3578,9 +3651,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
save
(
newInsuranceSettle
);
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//如果预估和实缴都推送了
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送作废结算信息至EKP
// TODO: 2022/8/2
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
...
...
@@ -3600,7 +3673,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper
.
set
(
TInsuranceDetail
::
getEstimatePremium
,
new
BigDecimal
(
"0.00"
));
update
(
updateWrapper
);
//推送新的结算信息至EKP,推实际保费
// TODO: 2022/8/2
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
...
...
@@ -3617,12 +3689,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理 // TODO: 2022/8/9
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
//变更为合并结算
if
(
CommonConstants
.
ZERO_INT
==
newSettleType
){
// 推送新的结算信息
TODO: 2022/8/2
// 推送新的结算信息
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
...
...
@@ -3641,20 +3714,107 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//todo 异常情况,需进行处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
else
{
//todo 异常情况,需进行处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
}
}
//如果预估已推送和实缴未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送作废结算信息至EKP
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getOldDeptName
());
interactiveParam
.
setInteractiveType
(
CommonConstants
.
THREE_INT
);
interactiveParam
.
setEstimatePremium
(
one
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
one
.
getActualPremium
());
interactiveParam
.
setSettleType
(
CommonConstants
.
ONE_INT
);
String
deleteBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
deleteBody
)){
//先推送预估,再推送实际
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
null
);
interactiveParam
.
setSettleType
(
CommonConstants
.
ZERO_INT
);
String
estimateBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
CommonConstants
.
ONE_INT
);
interactiveParam
.
setEstimatePremium
(
null
);
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
//todo 异常情况,需进行处理
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
//如果预估和实缴均未推送
if
(
byId
.
getIsActualPush
()
==
CommonConstants
.
ZERO_INT
&&
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//先推送预估,再推送实际
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
//推送预估单
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
null
);
interactiveParam
.
setSettleType
(
CommonConstants
.
ZERO_INT
);
String
estimateBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
))
{
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
//推送实缴单
interactiveParam
.
setSettleType
(
CommonConstants
.
ONE_INT
);
interactiveParam
.
setEstimatePremium
(
null
);
interactiveParam
.
setActualPremium
(
success
.
getActualPremium
());
String
actualBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
actualBody
))
{
//推送成功后更新本地推送状态
newInsuranceSettle
.
setActualPushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setIsActualPush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
TWO_INT
);
}
}
else
{
//异常处理
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
//如果没有登记保费
if
(
BigDecimalUtils
.
isNullOrZero
(
actualPremium
)){
if
(
byId
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
){
//推送至EKP TODO: 2022/8/2
interactiveParam
.
setCustomerCode
(
success
.
getOldCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getOldCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getOldDeptNo
());
...
...
@@ -3689,7 +3849,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
updateWrapper
.
set
(
TInsuranceDetail
::
getDefaultSettleId
,
newInsuranceSettle
.
getId
());
update
(
updateWrapper
);
//推送新的结算信息至EKP
// TODO: 2022/8/2
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
...
...
@@ -3707,13 +3866,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理 // TODO: 2022/8/9
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
else
{
//异常处理 // TODO: 2022/8/9
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
FOUR_INT
);
}
}
else
{
//todo 异常情况,需进行处理
//推送新的结算信息至EKP
interactiveParam
.
setCustomerCode
(
success
.
getNewCustomerCode
());
interactiveParam
.
setCustomerName
(
success
.
getNewCustomerName
());
interactiveParam
.
setDeptNo
(
success
.
getNewDeptNo
());
interactiveParam
.
setDeptName
(
success
.
getNewDeptName
());
interactiveParam
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
interactiveParam
.
setEstimatePremium
(
success
.
getEstimatePremium
());
interactiveParam
.
setActualPremium
(
null
);
interactiveParam
.
setSettleType
(
CommonConstants
.
ONE_INT
);
String
estimateBody
=
EKPUtil
.
sendToEKP
(
interactiveParam
);
if
(
StringUtils
.
isNotBlank
(
estimateBody
)){
//推送成功更新预估推送状态
newInsuranceSettle
.
setIsEstimatePush
(
CommonConstants
.
ONE_INT
);
newInsuranceSettle
.
setEstimatePushTime
(
LocalDateTime
.
now
());
newInsuranceSettle
.
setUpdateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
updateById
(
newInsuranceSettle
);
}
else
{
//异常处理 // TODO: 2022/8/9
saveInsuranceEkp
(
interactiveParam
,
CommonConstants
.
ONE_INT
);
}
}
}
}
...
...
@@ -3939,7 +4119,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
if
(
!
deptNoList
.
stream
().
any
Match
(
u
->
u
.
equals
(
one
.
getDeptNo
()))){
if
(
deptNoList
.
stream
().
none
Match
(
u
->
u
.
equals
(
one
.
getDeptNo
()))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
...
...
@@ -4118,7 +4298,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//项目所属权限验证
if
(
!
deptNoList
.
stream
().
any
Match
(
u
->
u
.
equals
(
deptNo
))){
if
(
deptNoList
.
stream
().
none
Match
(
u
->
u
.
equals
(
deptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_NOT_IN_USER_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
...
...
@@ -4487,15 +4667,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList
.
add
(
param
);
continue
;
}
//
已减员
//
减员退回
if
(
CommonConstants
.
THREE_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_
THREE
_HANDLE_ERROR
);
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_
FOUR
_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
//
减员退回
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_
FOUR
_HANDLE_ERROR
);
//
已减员
if
(
CommonConstants
.
FOUR_INT
==
reduceHandleStatus
){
param
.
setErrorMessage
(
InsurancesConstants
.
REFUND_STATUS_
THREE
_HANDLE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
...
...
@@ -4683,18 +4863,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
//旧项目ID不在当前权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
oldDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//新项目ID不在当前权限范围内
if
(!
deptNoList
.
stream
().
anyMatch
(
u
->
u
.
equals
(
newDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//必填格式校通过后查询对应的保单信息
LambdaQueryWrapper
<
TInsuranceDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceDetail
::
getDeleteFlag
,
CommonConstants
.
ZERO_INT
)
...
...
@@ -4722,13 +4890,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
//旧项目ID不在当前权限范围内
if
(
!
deptNoList
.
stream
().
any
Match
(
u
->
u
.
equals
(
oldDeptNo
))){
if
(
deptNoList
.
stream
().
none
Match
(
u
->
u
.
equals
(
oldDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
OLD_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
}
//新项目ID不在当前权限范围内
if
(
!
deptNoList
.
stream
().
any
Match
(
u
->
u
.
equals
(
newDeptNo
))){
if
(
deptNoList
.
stream
().
none
Match
(
u
->
u
.
equals
(
newDeptNo
))){
param
.
setErrorMessage
(
InsurancesConstants
.
NEW_DEPT_NO_NOT_IN_DEPT_LIST
);
errorList
.
add
(
param
);
continue
;
...
...
@@ -4847,7 +5015,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
R
getDeptList
(){
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
//EKPUtil.testAddNewsInRestTemplate(detailList);
/*
List<Dept> deptList = new ArrayList<>();
List
<
Dept
>
deptList
=
new
ArrayList
<>();
R
<
TSettleDomainListVo
>
tSettleDomainListVoR
=
archivesDaprUtil
.
selectAllSettleDomainSelectVos
();
if
(
null
!=
tSettleDomainListVoR
&&
tSettleDomainListVoR
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
tSettleDomainListVoR
.
getData
()))
{
TSettleDomainListVo
data
=
tSettleDomainListVoR
.
getData
();
...
...
@@ -4860,8 +5028,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
return R.ok(deptList);*/
return
R
.
ok
();
return
R
.
ok
(
deptList
);
}
/**
...
...
@@ -5018,7 +5185,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
public
List
<
EKPInteractiveParam
>
getDeptDetail
(
List
<
SettleMonthChangeCheckParam
>
list
){
//根据项目编码获取项目名称
List
<
String
>
collect
=
list
.
stream
().
map
(
e
->
e
.
getDeptNo
()
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
list
.
stream
().
map
(
SettleMonthChangeCheckParam:
:
getDeptNo
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
EKPInteractiveParam
>
ekpInteractiveParams
=
new
ArrayList
<>();
R
<
SetInfoVo
>
setInfoByCodes
=
archivesDaprUtil
.
getSetInfoByCodes
(
collect
);
if
(
null
!=
setInfoByCodes
&&
setInfoByCodes
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
Common
.
isNotNull
(
setInfoByCodes
.
getData
()))
{
...
...
@@ -5039,13 +5206,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
/**
*
投保成功后推送预估保费
*
推送EKP
*
* @author zhaji
* @param
* @return {@link String}
*/
public
String
pushEstimate
(
TInsuranceDetail
tInsuranceDetail
,
Integer
pushType
){
public
String
pushEstimate
(
TInsuranceDetail
tInsuranceDetail
,
Integer
type
){
Integer
pushType
=
null
;
//1,推送预估保费,2,推送实际保费,3推送预估冲正保费,4更新实际保费
EKPInteractiveParam
param
=
new
EKPInteractiveParam
();
List
<
String
>
deptNoList
=
new
ArrayList
<>();
...
...
@@ -5062,17 +5230,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setCustomerCode
(
projectSetInfoVo
.
getCustomerCode
());
}
//1,推送预估保费(用户办理成功,推送预估保费)
if
(
CommonConstants
.
ONE_INT
==
pushT
ype
){
if
(
CommonConstants
.
ONE_INT
==
t
ype
){
param
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
param
.
setSettleType
(
CommonConstants
.
ONE_INT
);
pushType
=
CommonConstants
.
ONE_INT
;
}
//2,推送实际保费(用于登记保单保费未推送过实缴保费)
if
(
CommonConstants
.
TWO_INT
==
pushT
ype
){
if
(
CommonConstants
.
TWO_INT
==
t
ype
){
param
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
param
.
setSettleType
(
CommonConstants
.
TWO_INT
);
pushType
=
CommonConstants
.
TWO_INT
;
}
//3推送预估冲正保费(用于投保退回场景)
if
(
CommonConstants
.
THREE_INT
==
pushT
ype
){
if
(
CommonConstants
.
THREE_INT
==
t
ype
){
String
defaultSettleId
=
tInsuranceDetail
.
getDefaultSettleId
();
TInsuranceSettle
byId
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
//冲正取负数
...
...
@@ -5084,14 +5254,54 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
param
.
setInteractiveType
(
CommonConstants
.
ONE_INT
);
param
.
setSettleType
(
CommonConstants
.
ONE_INT
);
pushType
=
CommonConstants
.
FIVE_INT
;
}
//4更新实际保费(用于登记保单保费场景推送过实缴保费)
if
(
CommonConstants
.
FOUR_INT
==
pushT
ype
){
if
(
CommonConstants
.
FOUR_INT
==
t
ype
){
param
.
setInteractiveType
(
CommonConstants
.
TWO_INT
);
param
.
setSettleType
(
CommonConstants
.
ONE_INT
);
pushType
=
CommonConstants
.
SEVEN_INT
;
}
if
(
StringUtils
.
isBlank
(
EKPUtil
.
sendToEKP
(
param
))){
saveInsuranceEkp
(
param
,
pushType
);
return
null
;
}
else
{
return
EKPUtil
.
sendToEKP
(
param
);
}
}
/**
* 获取当前保单的结算状态
*
* @author zhaji
* @param
* @return {@link String}
*/
public
SettleVo
getInsuranceDetailSettleStatus
(
String
detailId
,
String
settleId
){
String
id
=
detailId
+
CommonConstants
.
DOWN_LINE_STRING
+
settleId
;
//获取ekp结算信息
SettleVo
settleVo
=
new
SettleVo
();
//id
settleVo
.
setFd_3b05ba46bb042e
(
id
);
settleVo
.
setFd_3b05ba4808a3ca
(
"预估单结算状态"
);
settleVo
.
setFd_3b05bd5ed0b976
(
"实缴单结算状态"
);
return
settleVo
;
}
String
body
=
EKPUtil
.
sendToEKP
(
param
);
return
body
;
/**
* 保存失败信息
*
* @author zhaji
* @param
* @return {@link String}
*/
public
Boolean
saveInsuranceEkp
(
EKPInteractiveParam
param
,
Integer
pushType
){
TInsuranceEkp
ekp
=
new
TInsuranceEkp
();
BeanCopyUtils
.
copyProperties
(
param
,
ekp
);
ekp
.
setCreateTime
(
LocalDateTime
.
now
());
ekp
.
setPushType
(
pushType
);
tInsuranceEkpService
.
save
(
ekp
);
return
Boolean
.
TRUE
;
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceEkpServiceImpl.java
View file @
fc4fa1fc
...
...
@@ -24,13 +24,9 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
@Override
public
R
resend
()
{
LambdaQueryWrapper
<
TInsuranceEkp
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TInsuranceEkp
::
getResendFlag
,
CommonConstants
.
ZERO_INT
);
queryWrapper
.
orderByDesc
(
TInsuranceEkp:
:
getDetailId
);
queryWrapper
.
orderByAsc
(
TInsuranceEkp:
:
getCreateTime
);
List
<
TInsuranceEkp
>
list
=
list
(
queryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
TInsuranceEkp
tInsuranceEkp
:
list
)
{
List
<
TInsuranceEkp
>
ekpRefundList
=
this
.
baseMapper
.
getEkpRefundList
();
if
(
CollectionUtils
.
isNotEmpty
(
ekpRefundList
)){
for
(
TInsuranceEkp
tInsuranceEkp
:
ekpRefundList
)
{
EKPInteractiveParam
ekpParam
=
new
EKPInteractiveParam
();
BeanCopyUtils
.
copyProperties
(
tInsuranceEkp
,
ekpParam
);
String
detailId
=
ekpParam
.
getDetailId
();
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceEnclosureServiceImpl.java
View file @
fc4fa1fc
...
...
@@ -10,6 +10,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
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.constants.InsurancesConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure
;
import
com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceEnclosureMapper
;
import
com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceEnclosureService
;
...
...
@@ -54,13 +55,13 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
@Override
public
R
uploadInsuranceEnclosure
(
MultipartFile
file
,
String
filePath
,
String
remark
)
throws
IOException
{
if
(
Common
.
isEmpty
(
file
)){
return
R
.
failed
(
"商险附件为空"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_IS_EMPTY
);
}
if
(!
Common
.
checkInsuranceFile
(
file
.
getOriginalFilename
())){
return
R
.
failed
(
"非法的文件类型"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_TYPE_IS_ERROR
);
}
if
(
file
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
"文件超出上传上限"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_SIZE_ERROR
);
}
String
enclosureName
=
Objects
.
requireNonNull
(
file
.
getOriginalFilename
()).
substring
(
0
,
file
.
getOriginalFilename
().
lastIndexOf
(
"."
));
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
file
.
getOriginalFilename
();
...
...
@@ -79,7 +80,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
insuranceEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
if
(
StringUtils
.
isNotBlank
(
remark
)){
if
(!
ValidityUtil
.
validate50
(
remark
)){
return
R
.
failed
(
"备注字段不能超过50"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_REMARK_SIZE_ERROR
);
}
else
{
insuranceEnclosure
.
setRemark
(
remark
);
}
...
...
@@ -93,14 +94,14 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
return
R
.
ok
(
"商险附件上传成功"
);
return
R
.
ok
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_UPLOAD_SUCCESS
);
}
else
{
return
R
.
failed
(
"failed:上传至存储空间失败"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_UPLOAD_FAIL
);
}
}
/**
* 获取
附件
列表
* 获取
电子保单
列表
*
* @author zhaji
* @param page 分页参数
...
...
@@ -113,7 +114,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
}
/**
* 获取
商险附件
地址
* 获取
电子保单
地址
*
* @author zhaji
* @param id 附件id
...
...
@@ -122,11 +123,11 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
@Override
public
R
getInsuranceEnclosureUrl
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"附件id为空"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_ID_IS_EMPTY
);
}
TInsuranceEnclosure
insuranceEnclosure
=
getById
(
id
);
if
(
null
==
insuranceEnclosure
)
{
return
R
.
failed
(
"无对应附件信息"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_IS_NOT_EXIST
);
}
String
enclosureAddress
=
insuranceEnclosure
.
getEnclosureAddress
();
log
.
info
(
"key:"
+
enclosureAddress
);
...
...
@@ -135,7 +136,7 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
}
/**
* 删除
商险附件
* 删除
电子保单
*
* @author zhaji
* @param id 附件id
...
...
@@ -144,21 +145,21 @@ public class TInsuranceEnclosureServiceImpl extends ServiceImpl<TInsuranceEnclos
@Override
public
R
deleteInsuranceEnclosure
(
String
id
)
{
if
(
Common
.
isEmpty
(
id
)){
return
R
.
failed
(
"附件id为空"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_ID_IS_EMPTY
);
}
TInsuranceEnclosure
insuranceEnclosure
=
getById
(
id
);
if
(
null
==
insuranceEnclosure
)
{
return
R
.
failed
(
"无对应附件信息"
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_IS_NOT_EXIST
);
}
try
{
if
(
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
insuranceEnclosure
.
getEnclosureAddress
());
return
R
.
ok
(
"删除成功!"
);
return
R
.
ok
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_DELETE_SUCCESS
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"
附件删除异常:"
+
e
.
getMessage
()
);
return
R
.
failed
(
"附件删除异常!"
);
log
.
error
(
"
电子保单删除异常:"
+
e
.
getMessage
()+
"电子保单id为:"
+
id
);
return
R
.
failed
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_DELETE_ABNORMAL
);
}
return
R
.
ok
(
"删除失败!"
);
return
R
.
ok
(
InsurancesConstants
.
INSURANCE_ENCLOSURE_DELETE_FAIL
);
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceTypeStandardServiceImpl.java
View file @
fc4fa1fc
...
...
@@ -37,9 +37,6 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
@Resource
private
TInsuranceTypeService
tInsuranceTypeService
;
@Resource
private
TInsuranceDetailService
tInsuranceDetailService
;
@Resource
private
TInsuranceOperateService
tInsuranceOperateService
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
fc4fa1fc
...
...
@@ -386,6 +386,12 @@
ORDER BY detail.CREATE_TIME DESC
</select>
<update
id=
"updatePolicyNoBatch"
>
<foreach
collection=
"details"
index=
"index"
item=
"item"
separator=
";"
>
update t_insurance_detail set POLICY_NO = #{item.policyNo} where ID = #{item.id}
</foreach>
</update>
<!-- ***********************减员办理******************************** -->
<!-- 已投保列表分页查询-->
<select
id=
"getInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredListVo"
>
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceEkpMapper.xml
View file @
fc4fa1fc
...
...
@@ -31,6 +31,8 @@
<result
property=
"resendFlag"
column=
"RESEND_FLAG"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"pushTime"
column=
"PUSH_TIME"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"pushType"
column=
"PUSH_TYPE"
jdbcType=
"TINYINT"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -42,8 +44,17 @@
POLICY_END,BUY_STANDARD,MEDICAL_QUOTA,
DIE_DISABLE_QUOTA,ACTUAL_PREMIUM,ESTIMATE_PREMIUM,
SETTLE_MONTH,INTERACTIVE_TYPE,RESEND_FLAG,
CREATE_TIME,PUSH_TIME
CREATE_TIME,PUSH_TIME
,PUSH_TYPE
</sql>
<select
id=
"getEkpRefundList"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from
t_insurance_ekp
where
RESEND_FLAG = 0
</select>
</mapper>
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceEnclosureMapper.xml
View file @
fc4fa1fc
...
...
@@ -49,6 +49,7 @@
<if
test=
"param.endTime != null and param.endTime.trim() != '' "
>
AND e.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endTime}, ' 23:59:59')
</if>
order by e.CREATE_TIME desc
</select>
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/SalaryUploadController.java
View file @
fc4fa1fc
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
import
io.swagger.v3.oas.annotations.Operation
;
...
...
@@ -66,4 +72,11 @@ public class SalaryUploadController {
return
salaryUploadService
.
getBill
(
salaryFormId
);
}
@Operation
(
description
=
"获取缴费库-测试使用"
)
@SysLog
(
"获取缴费库-测试使用"
)
@PostMapping
(
"/getForecast"
)
public
List
<
TPaymentBySalaryVo
>
openBill
(
@RequestParam
String
deptId
,
@RequestParam
String
createMonth
)
{
return
salaryUploadService
.
getForecast
(
deptId
,
createMonth
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/SalaryUploadService.java
View file @
fc4fa1fc
...
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryDetailVo
;
...
...
@@ -37,5 +38,6 @@ public interface SalaryUploadService extends IService<TSalaryStandard> {
R
<
TSalaryDetailVo
>
getBill
(
String
salaryFormId
);
List
<
TPaymentBySalaryVo
>
getForecast
(
String
deptId
,
String
createMonth
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
fc4fa1fc
...
...
@@ -24,6 +24,7 @@ import lombok.extern.log4j.Log4j2;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.math.BigDecimal
;
import
java.net.URLDecoder
;
...
...
@@ -81,6 +82,18 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
private
final
TApprovalRecordService
auditLogService
;
@Override
public
List
<
TPaymentBySalaryVo
>
getForecast
(
String
deptId
,
String
createMonth
)
{
TPaymentBySalaryVo
forecast
=
new
TPaymentBySalaryVo
();
forecast
.
setSettleDomainId
(
deptId
);
forecast
.
setSocialCreateMonth
(
createMonth
);
R
<
TPaymentVo
>
tPaymentVoR
=
HttpDaprUtil
.
invokeMethodPost
(
socialProperties
.
getAppUrl
(),
socialProperties
.
getAppId
()
,
"/tpaymentinfo/inner/selectTPaymentBySalaryVo"
,
forecast
,
TPaymentVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
tPaymentVoR
!=
null
&&
tPaymentVoR
.
getData
()
!=
null
&&
tPaymentVoR
.
getData
().
getPaymentList
()
!=
null
)
{
return
tPaymentVoR
.
getData
().
getPaymentList
();
}
return
null
;
}
/**
* @param jsonString 客户原表数据
* repeatFlag 默认 0:不允许重复导入已存在系统内的数据;1:允许重复导入
...
...
@@ -605,7 +618,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//工资应发
if
(
SalaryConstants
.
RELAY_SALARY_JAVA
.
equals
(
sai
.
getJavaFiedName
()))
{
relaySalary
=
sai
.
getSalaryMoney
();
relaySalarySum
=
relaySalarySum
.
add
(
sai
.
getSalaryMoney
());
}
//减除费用
if
(
SalaryConstants
.
COST_REDUCTION_JAVA
.
equals
(
sai
.
getJavaFiedName
()))
{
...
...
@@ -758,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 个人实发合计
this
.
saveNewItems
(
sai
,
saiList
,
SalaryConstants
.
ACTUAL_SALARY_SUM
,
SalaryConstants
.
ACTUAL_SALARY_SUM_JAVA
,
calculation
(
relaySalary
,
saiList
),
CommonConstants
.
ZERO_INT
);
calculation
(
a
,
relaySalary
,
saiList
),
CommonConstants
.
ZERO_INT
);
}
//计算个人社保、公积金欠款————工资不够扣缴社保的
if
(
relaySalary
.
compareTo
(
personalDebt
)
==
SalaryConstants
.
LESS_THAN
)
{
...
...
@@ -766,6 +778,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
SalaryConstants
.
PERSONAL_DEBT_JAVA
,
relaySalary
.
subtract
(
personalDebt
),
CommonConstants
.
ZERO_INT
);
}
a
.
setSaiList
(
saiList
);
relaySalarySum
=
relaySalarySum
.
add
(
a
.
getRelaySalary
());
aList
.
add
(
a
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -964,7 +977,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/10/9 15:14
* @return: java.math.BigDecimal
**/
private
static
BigDecimal
calculation
(
BigDecimal
realSalary
,
List
<
TSalaryAccountItem
>
saiList
)
{
private
static
BigDecimal
calculation
(
TSalaryAccount
a
,
BigDecimal
realSalary
,
List
<
TSalaryAccountItem
>
saiList
)
{
// 实际发放工资 = 应发工资合计-
// 个人社保扣缴 -个人公积金扣缴-薪资扣税-年终奖扣税-代扣风险抵押金
// -个人其他费用(就是工资表中的其他费用1+其他费用2+其他费用3) -前次个人待补足 -单位补足扣返
...
...
@@ -991,11 +1004,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
sum
=
realSalary
.
subtract
(
sum
).
setScale
(
SalaryConstants
.
PLACES
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
sum
.
compareTo
(
SalaryConstants
.
B_ZERO
)
==
SalaryConstants
.
LESS_THAN
)
{
return
SalaryConstants
.
B_ZERO
;
}
else
{
return
sum
;
if
(
sum
.
compareTo
(
SalaryConstants
.
B_ZERO
)
<
SalaryConstants
.
EQUAL
)
{
sum
=
SalaryConstants
.
B_ZERO
;
}
a
.
setActualSalary
(
sum
);
return
sum
;
}
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/util/SalaryAccountUtil.java
View file @
fc4fa1fc
...
...
@@ -332,12 +332,14 @@ public class SalaryAccountUtil implements Serializable {
+
CommonConstants
.
DOWN_LINE_STRING
+
salaryType
+
CommonConstants
.
DOWN_LINE_STRING
+
relaySalary
)
!=
null
)
{
entity
.
setIsRepeat
(
CommonConstants
.
ONE_INT
);
}
if
(!
CommonConstants
.
THREE_STRING
.
equals
(
salaryType
)
&&
!
CommonConstants
.
FOUR_STRING
.
equals
(
salaryType
))
{
relaySalarySum
=
BigDecimalUtils
.
safeAdd
(
relaySalary
,
specialMap
.
get
(
entity
.
getEmpIdcard
()));
if
(
money3500
.
compareTo
(
relaySalarySum
)
==
CommonConstants
.
ZERO_INT
||
money5000
.
compareTo
(
relaySalarySum
)
==
CommonConstants
.
ZERO_INT
)
{
entity
.
setHaveSpecialFlag
(
CommonConstants
.
ONE_INT
);
}
}
}
if
(
actualSalarySum
!=
null
)
{
actualSalarySum
=
actualSalarySum
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(!
checkMap
.
isEmpty
()
&&
checkMap
.
get
(
entity
.
getEmpIdcard
()
+
CommonConstants
.
DOWN_LINE_STRING
+
DateUtil
.
addMonth
(
configSalary
.
getSalaryMonth
())
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
fc4fa1fc
...
...
@@ -264,11 +264,13 @@
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
<select
id=
"getAccountSpecialList"
resultType=
"com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo"
>
select
a.EMP_IDCARD title,
ifnull(relaySalary.SALARY_MONEY,0
) relaySalary
a.EMP_IDCARD title,
sum(ifnull(relaySalary.SALARY_MONEY,0)
) relaySalary
from t_salary_account a
left join t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
where a.DELETE_FLAG = 0 and s.UNIT_ID = #{unitId} and a.SALARY_MONTH = #{salaryMonth}
where a.DELETE_FLAG = 0 and s.UNIT_ID = #{unitId} and a.SALARY_MONTH = #{salaryMonth} and a.INVOICE_TITLE = #{invoiceTitle}
and a.FORM_TYPE !='3' and a.FORM_TYPE !='4'
group by a.EMP_IDCARD
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
fc4fa1fc
...
...
@@ -1364,7 +1364,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
paymentInfo
.
setEmpId
(
fund
.
getEmpId
());
paymentInfo
.
setEmpIdcard
(
fund
.
getEmpIdcard
());
paymentInfo
.
setEmpName
(
fund
.
getEmpName
());
paymentInfo
.
setSettleDomainId
(
fund
.
getSettleDomain
Name
Fund
());
paymentInfo
.
setSettleDomainId
(
fund
.
getSettleDomainFund
());
paymentInfo
.
setSettleDomainName
(
fund
.
getSettleDomainNameFund
());
paymentInfo
.
setSettleDomainCode
(
fund
.
getSettleDomainCodeFund
());
paymentInfo
.
setUnitId
(
fund
.
getUnitIdFund
());
...
...
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