Commit 5b814707 authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents c562be17 9623dcea
...@@ -436,6 +436,11 @@ public class InsurancesConstants { ...@@ -436,6 +436,11 @@ public class InsurancesConstants {
*/ */
public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更结算月"; public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更结算月";
/**
* 商险投保退回,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_FOUR_ERROR = "商险投保退回,无法变更结算月";
/** /**
* 商险已减员,无法变更结算月 * 商险已减员,无法变更结算月
*/ */
...@@ -493,11 +498,21 @@ public class InsurancesConstants { ...@@ -493,11 +498,21 @@ public class InsurancesConstants {
*/ */
public static final String DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更项目"; public static final String DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更项目";
/**
* 商险投保退回,无法变更项目
*/
public static final String DEPT_NO_CHANGE_BUY_STATUS_FOUR_ERROR = "商险投保退回,无法变更项目";
/** /**
* 商险已减员,无法变更项目 * 商险已减员,无法变更项目
*/ */
public static final String DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR = "商险已减员,无法变更项目"; public static final String DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR = "商险已减员,无法变更项目";
/**
* 商险已减员,无法变更项目
*/
public static final String DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR = "商险减员中,无法变更项目";
/** /**
* 商险结算中,无法变更项目 * 商险结算中,无法变更项目
*/ */
......
...@@ -426,14 +426,13 @@ public class TInsuranceDetailController { ...@@ -426,14 +426,13 @@ public class TInsuranceDetailController {
* 出险 * 出险
* *
* @author zhaji * @author zhaji
* @param userName 姓名
* @param empIdcardNo 身份证 * @param empIdcardNo 身份证
* @return {@link R<List< RefundExportListVo >>} * @return {@link R<List< RefundExportListVo >>}
*/ */
@Operation(summary = "紧急出险", description = "紧急出险") @Operation(summary = "紧急出险", description = "紧急出险")
@GetMapping("/urgentUpdateIsUse") @GetMapping("/urgentUpdateIsUse")
public R urgentUpdateIsUse(String userName,String empIdcardNo) { public R urgentUpdateIsUse(String empIdcardNo) {
return tInsuranceDetailService.urgentUpdateIsUse(userName,empIdcardNo); return tInsuranceDetailService.urgentUpdateIsUse(empIdcardNo);
} }
/** /**
......
...@@ -289,11 +289,10 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -289,11 +289,10 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* EKP紧急出险 * EKP紧急出险
* *
* @author zhaji * @author zhaji
* @param userName
* @param empIdcardNo * @param empIdcardNo
* @return {@link R} * @return {@link R}
*/ */
R urgentUpdateIsUse(String userName, String empIdcardNo); R urgentUpdateIsUse(String empIdcardNo);
/** /**
* 根据身份证查询商险列表 * 根据身份证查询商险列表
......
...@@ -2975,13 +2975,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2975,13 +2975,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
&& u.getPolicyStart().equals(param.getPolicyStart()) && u.getPolicyStart().equals(param.getPolicyStart())
&& u.getPolicyEnd().equals(param.getPolicyEnd()) && u.getPolicyEnd().equals(param.getPolicyEnd())
); );
if(b){ if(!b){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR); successList.add(param);
errorList.add(param);
continue;
} }
successList.add(param);
} }
map.put("successList",successList); map.put("successList",successList);
map.put("errorList",errorList); map.put("errorList",errorList);
...@@ -3172,22 +3168,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3172,22 +3168,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
Integer buyType = insuranceDetail.getBuyType(); Integer buyType = insuranceDetail.getBuyType();
//替换类型无法变更结算月
if (CommonConstants.FOUR_INT == buyType){ if (CommonConstants.FOUR_INT == buyType){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus(); Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus();
//商险待投保,无法变更结算月
if (CommonConstants.ONE_INT == buyHandleStatus){ if (CommonConstants.ONE_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_ONE_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_ONE_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//商险投保中,无法变更结算月
if (CommonConstants.TWO_INT == buyHandleStatus){ if (CommonConstants.TWO_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//商险投保退回,无法变更结算月
if (CommonConstants.FOUR_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_FOUR_ERROR);
errorList.add(param);
continue;
}
//如果结算月份相同 //如果结算月份相同
if (settleMonth.equals(insuranceDetail.getSettleMonth())){ if (settleMonth.equals(insuranceDetail.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_IDENTICAL); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_IDENTICAL);
...@@ -3222,13 +3227,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3222,13 +3227,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
//当前保单信息的为已减员时不能变更结算月 //当前保单信息的为已减员时不能变更结算月
if(null != insuranceDetail.getBuyHandleStatus()){ if(null != insuranceDetail.getReduceHandleStatus()){
if( CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){ if( CommonConstants.FOUR_INT == insuranceDetail.getReduceHandleStatus() ){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
if( CommonConstants.ONE_INT == insuranceDetail.getBuyHandleStatus() || CommonConstants.TWO_INT == insuranceDetail.getBuyHandleStatus()){ //减员流程中,无法变更结算月
if(CommonConstants.ONE_INT == insuranceDetail.getReduceHandleStatus()
|| CommonConstants.TWO_INT == insuranceDetail.getReduceHandleStatus()){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_ONE_ERROR); param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_ONE_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
...@@ -3252,7 +3259,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3252,7 +3259,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String,List<DeptChangeCheckParam>> map = new HashMap<>(16); Map<String,List<DeptChangeCheckParam>> map = new HashMap<>(16);
List<DeptChangeCheckParam> errorList = new ArrayList<>(); List<DeptChangeCheckParam> errorList = new ArrayList<>();
List<DeptChangeCheckParam> successList = new ArrayList<>(); List<DeptChangeCheckParam> successList = new ArrayList<>();
for (DeptChangeCheckParam param : deptChangeCheckList) { for (int i =0 ;i< deptChangeCheckList.size();i++) {
DeptChangeCheckParam param = deptChangeCheckList.get(i);
String newDeptNo = param.getNewDeptNo(); String newDeptNo = param.getNewDeptNo();
if(StringUtils.isBlank(newDeptNo)){ if(StringUtils.isBlank(newDeptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_NOT_EMPTY); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_NOT_EMPTY);
...@@ -3384,22 +3392,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3384,22 +3392,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus(); Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus();
//商险待投保,无法变更项目
if (CommonConstants.ONE_INT == buyHandleStatus){ if (CommonConstants.ONE_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_ONE_ERROR); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_ONE_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//商险投保中,无法变更项目
if (CommonConstants.TWO_INT == buyHandleStatus){ if (CommonConstants.TWO_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//当前保单信息的为已减员时,不能变更结算项目 //商险投保退回,无法变更项目
if( null != insuranceDetail.getBuyHandleStatus() && CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){ if (CommonConstants.FOUR_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR); param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_FOUR_ERROR);
errorList.add(param); errorList.add(param);
continue; continue;
} }
//当前保单信息的为已减员时,不能变更结算项目
if( null != insuranceDetail.getReduceHandleStatus()){
if (CommonConstants.FOUR_INT == insuranceDetail.getReduceHandleStatus()){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param);
continue;
}
if(CommonConstants.ONE_INT == insuranceDetail.getReduceHandleStatus() || CommonConstants.TWO_INT == insuranceDetail.getReduceHandleStatus()){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR);
errorList.add(param);
continue;
}
}
String defaultSettleId = insuranceDetail.getDefaultSettleId(); String defaultSettleId = insuranceDetail.getDefaultSettleId();
if (StringUtils.isNotBlank(defaultSettleId)){ if (StringUtils.isNotBlank(defaultSettleId)){
//查询结算状态 //查询结算状态
...@@ -3435,24 +3458,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3435,24 +3458,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setEstimatePremium(estimatePremium); param.setEstimatePremium(estimatePremium);
} }
} }
//如果
for (int j =0 ;j< deptChangeCheckList.size();j++) {
DeptChangeCheckParam CheckParam = deptChangeCheckList.get(j);
if(CheckParam.getEmpName().equals(param.getEmpName())
&&CheckParam.getEmpIdCardNo().equals(param.getEmpIdCardNo())
&&CheckParam.getOldDeptNo().equals(param.getOldDeptNo())
&&CheckParam.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&&CheckParam.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())
&&CheckParam.getPolicyStart().equals(param.getPolicyStart())
&&CheckParam.getPolicyEnd().equals(param.getPolicyEnd())
&& i!=j)
{
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
//确定为重复数据则跳出循环
break;
}
}
param.setOldSettleType(insuranceDetail.getSettleType()); param.setOldSettleType(insuranceDetail.getSettleType());
param.setDefaultSettleId(insuranceDetail.getDefaultSettleId()); param.setDefaultSettleId(insuranceDetail.getDefaultSettleId());
param.setId(insuranceDetail.getId()); param.setId(insuranceDetail.getId());
boolean b = successList.stream().anyMatch(
u -> u.getEmpName().equals(param.getEmpName())
&& u.getEmpIdCardNo().equals(param.getEmpIdCardNo())
&& u.getOldDeptNo().equals(param.getOldDeptNo())
&& u.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())
&& u.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&& u.getPolicyStart().equals(param.getPolicyStart())
&& u.getPolicyEnd().equals(param.getPolicyEnd())
&& u.getBuyStandard().equals(param.getBuyStandard())
);
if(b){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
continue;
}
successList.add(param); successList.add(param);
} }
map.put("errorList",errorList); map.put("errorList",errorList);
...@@ -3494,16 +3520,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3494,16 +3520,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R} * @return {@link R}
*/ */
@Override @Override
public R urgentUpdateIsUse(String userName, String empIdcardNo) { public R urgentUpdateIsUse(String empIdcardNo) {
//员工姓名
if(StringUtils.isBlank(userName)){
}
//员工身份证 //员工身份证
if(StringUtils.isBlank(empIdcardNo)){ if(StringUtils.isBlank(empIdcardNo)){
return R.failed("身份证号为空"); return R.failed("身份证号为空");
} }
//员工身份证 //员工身份 // 身份证号位数校验(18 位合法)
// 身份证号位数校验(18 位合法)
if (!ValidityUtil.validateIDCard(empIdcardNo)){ if (!ValidityUtil.validateIDCard(empIdcardNo)){
return R.failed("身份证格式不正确"); return R.failed("身份证格式不正确");
} }
......
...@@ -10,10 +10,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -10,10 +10,7 @@ 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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; 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.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceCompany; import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceType;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeRateMapper; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceTypeRateMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceOperateService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceTypeRateService;
...@@ -58,6 +55,7 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat ...@@ -58,6 +55,7 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
} }
LambdaQueryWrapper<TInsuranceTypeRate> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TInsuranceTypeRate> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeRate::getInsuranceTypeId,id); queryWrapper.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeRate::getInsuranceTypeId,id);
queryWrapper.orderByDesc(TInsuranceTypeRate::getCreateTime);
return R.ok(list(queryWrapper)); return R.ok(list(queryWrapper));
} }
......
...@@ -61,6 +61,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp ...@@ -61,6 +61,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
} }
LambdaQueryWrapper<TInsuranceTypeStandard> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TInsuranceTypeStandard> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeStandard::getInsuranceTypeId,id); queryWrapper.eq(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeStandard::getInsuranceTypeId,id);
queryWrapper.orderByDesc(TInsuranceTypeStandard ::getCreateTime);
return R.ok(list(queryWrapper)); return R.ok(list(queryWrapper));
} }
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
INSURANCE_TYPE_ID = #{id} INSURANCE_TYPE_ID = #{id}
and and
DELETE_FLAG = 0 DELETE_FLAG = 0
ORDER BY CREATE_TIME DESC
</select> </select>
<select id="selectInsuranceTypeStandardList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard"> <select id="selectInsuranceTypeStandardList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard">
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
INSURANCE_TYPE_ID = #{id} INSURANCE_TYPE_ID = #{id}
and and
DELETE_FLAG = 0 DELETE_FLAG = 0
ORDER BY CREATE_TIME DESC
</select> </select>
<select id="selectInsuranceTypePage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"> <select id="selectInsuranceTypePage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo">
select select
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
a.INSURANCE_COMPANY_ID = b.ID a.INSURANCE_COMPANY_ID = b.ID
and and
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
ORDER BY a.create_time DESC ORDER BY a.CREATE_TIME DESC
</select> </select>
<select id="getInsuranceTypeDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo"> <select id="getInsuranceTypeDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo">
select select
......
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