Commit e11af955 authored by zhaji's avatar zhaji

"feature-zhaJi:修改险种详情中的排序规则"

parent 629ca359
...@@ -409,14 +409,13 @@ public class TInsuranceDetailController { ...@@ -409,14 +409,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);
} }
/** /**
......
...@@ -280,11 +280,10 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -280,11 +280,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);
/** /**
* 根据身份证查询商险列表 * 根据身份证查询商险列表
......
...@@ -2900,13 +2900,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2900,13 +2900,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);
errorList.add(param);
continue;
}
successList.add(param); successList.add(param);
}
} }
map.put("successList",successList); map.put("successList",successList);
map.put("errorList",errorList); map.put("errorList",errorList);
...@@ -3177,7 +3173,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3177,7 +3173,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);
...@@ -3360,24 +3357,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3360,24 +3357,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setEstimatePremium(estimatePremium); param.setEstimatePremium(estimatePremium);
} }
} }
param.setOldSettleType(insuranceDetail.getSettleType()); //如果
param.setDefaultSettleId(insuranceDetail.getDefaultSettleId()); for (int j =0 ;j< deptChangeCheckList.size();j++) {
param.setId(insuranceDetail.getId()); DeptChangeCheckParam CheckParam = deptChangeCheckList.get(j);
boolean b = successList.stream().anyMatch( if(CheckParam.getEmpName().equals(param.getEmpName())
u -> u.getEmpName().equals(param.getEmpName()) &&CheckParam.getEmpIdCardNo().equals(param.getEmpIdCardNo())
&& u.getEmpIdCardNo().equals(param.getEmpIdCardNo()) &&CheckParam.getOldDeptNo().equals(param.getOldDeptNo())
&& u.getOldDeptNo().equals(param.getOldDeptNo()) &&CheckParam.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&& u.getInsuranceCompanyName().equals(param.getInsuranceCompanyName()) &&CheckParam.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())
&& u.getInsuranceTypeName().equals(param.getInsuranceTypeName()) &&CheckParam.getPolicyStart().equals(param.getPolicyStart())
&& u.getPolicyStart().equals(param.getPolicyStart()) &&CheckParam.getPolicyEnd().equals(param.getPolicyEnd())
&& u.getPolicyEnd().equals(param.getPolicyEnd()) && i!=j)
&& u.getBuyStandard().equals(param.getBuyStandard()) {
);
if(b){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR); param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param); errorList.add(param);
continue; //确定为重复数据则跳出循环
break;
}
} }
param.setOldSettleType(insuranceDetail.getSettleType());
param.setDefaultSettleId(insuranceDetail.getDefaultSettleId());
param.setId(insuranceDetail.getId());
successList.add(param); successList.add(param);
} }
map.put("errorList",errorList); map.put("errorList",errorList);
...@@ -3419,16 +3419,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3419,16 +3419,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