Commit 392cf3c4 authored by 查济's avatar 查济

Merge branch 'feature-zhaji' into 'develop'

Feature zhaji

See merge request !252
parents a0f3dfad 444af7e0
......@@ -1102,12 +1102,12 @@ public class InsurancesConstants {
public static final String GET_DEPT_DETAIL_ERROR = "获取项目信息失败:";
/**
* 获取项目信息失败
* errorList
*/
public static final String ERROR_LIST = "errorList";
/**
* 获取项目信息失败
* successList
*/
public static final String SUCCESS_LIST = "successList";
......@@ -1116,6 +1116,43 @@ public class InsurancesConstants {
*/
public static final String OSS_ERROR = "OSS文件上传接口异常:";
/**EKP异常重发失败原因*/
/**
* 商险不存在或已被删除
*/
public static final String EKP_INSURANCE_IS_DELETE_OR_EMPTY = "商险不存在或已被删除";
/**
* 结算类型发生变更
*/
public static final String EKP_SETTLE_TYPE_IS_CHANGE = "结算类型发生变更";
/**
* 结算id发生变更
*/
public static final String EKP_SETTLE_ID_IS_CHANGE = "结算id发生变更";
/**
* 预估结算信息已发送
*/
public static final String EKP_ESTIMATE_IS_PUSH = "预估结算信息已发送";
/**
* 实缴结算信息已发送
*/
public static final String EKP_ACTUAL_IS_PUSH = "实缴结算信息已发送";
/**
* 预估费用已进行结算
*/
public static final String EKP_ESTIMATE_STATUS_ERROR = "预估费用已进行结算";
/**
* 实缴费用已进行结算
*/
public static final String EKP_ACTUAL_STATUS_ERROR = "实缴费用已进行结算";
......
......@@ -61,7 +61,15 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
List<TInsuranceEkp> ekpRefundList = this.baseMapper.getEkpRefundList();
if (CollectionUtils.isNotEmpty(ekpRefundList)){
for (TInsuranceEkp tInsuranceEkp : ekpRefundList) {
LambdaUpdateWrapper<TInsuranceEkp> ekpUpdate = new LambdaUpdateWrapper<>();
ekpUpdate.eq(TInsuranceEkp :: getId,tInsuranceEkp.getId());
TInsuranceDetail byId = tInsuranceDetailService.getById(tInsuranceEkp.getDetailId());
if(Common.isEmpty(byId)){
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_INSURANCE_IS_DELETE_OR_EMPTY);
update(ekpUpdate);
continue;
}
String defaultSettleId = byId.getDefaultSettleId();
String s = null;
String settleType = tInsuranceEkp.getSettleType();
......@@ -82,8 +90,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
settleUpdate.eq(TInsuranceSettle :: getId,tInsuranceEkp.getDefaultSettleId());
LambdaUpdateWrapper<TInsuranceDetail> detailUpdate = new LambdaUpdateWrapper<>();
detailUpdate.eq(TInsuranceDetail :: getId,tInsuranceEkp.getDetailId());
LambdaUpdateWrapper<TInsuranceEkp> ekpUpdate = new LambdaUpdateWrapper<>();
ekpUpdate.eq(TInsuranceEkp :: getId,tInsuranceEkp.getId());
//ekp结算信息
SettleVo settleVo = tInsuranceDetailService.getInsuranceDetailSettleStatus(tInsuranceEkp.getDetailId(), tInsuranceEkp.getDefaultSettleId());
if(settleType.equals(CommonConstants.ZERO_STRING)){
......@@ -96,13 +102,13 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
//如果结算类型不一致,预估已推送,结算id不一致,结算信息不为空
if(!settleTypeEquals || !settleIdEquals || !estimatePush){
if(!settleTypeEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,CommonConstants.TWO_INT);
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_SETTLE_TYPE_IS_CHANGE);
}
if(!settleIdEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,CommonConstants.TWO_INT);
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_SETTLE_ID_IS_CHANGE);
}
if(!estimatePush){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,CommonConstants.TWO_INT);
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_ESTIMATE_IS_PUSH);
}
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate);
......@@ -132,6 +138,15 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(CommonConstants.TWO_INT == pushType){
//如果结算类型不一致,实缴已推送,结算id不一致,则不再推送
if(!settleTypeEquals || !actualPush || !settleIdEquals){
if(!settleTypeEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_SETTLE_TYPE_IS_CHANGE);
}
if(!settleIdEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_SETTLE_ID_IS_CHANGE);
}
if(!actualPush){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_ACTUAL_IS_PUSH);
}
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate);
continue;
......@@ -165,6 +180,15 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
if(CommonConstants.THREE_INT == pushType){
//如果结算类型不一致,结算类型不为空且已发送,结算id不一致
if(!settleIdEquals || !eStatus || !aStatus){
if(!settleIdEquals){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_SETTLE_ID_IS_CHANGE);
}
if(!eStatus){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_ESTIMATE_STATUS_ERROR);
}
if(!aStatus){
ekpUpdate.set(TInsuranceEkp :: getNotResendMessage,InsurancesConstants.EKP_ACTUAL_STATUS_ERROR);
}
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate);
continue;
......@@ -225,10 +249,6 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
break;
}
}
}else{
ekpUpdate.set(TInsuranceEkp :: getResendFlag,CommonConstants.TWO_INT);
update(ekpUpdate);
continue;
}
}
//推送预估红冲信息
......@@ -258,9 +278,9 @@ public class TInsuranceEkpServiceImpl extends ServiceImpl<TInsuranceEkpMapper, T
}
}
}
return R.ok("发送成功");
return R.ok("EKP重发成功");
}else{
return R.failed("无需要发送的信息");
return R.failed("无需要重新发送的EKP结算信息");
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment