Commit e11af955 authored by zhaji's avatar zhaji

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

parent 629ca359
......@@ -409,14 +409,13 @@ public class TInsuranceDetailController {
* 出险
*
* @author zhaji
* @param userName 姓名
* @param empIdcardNo 身份证
* @return {@link R<List< RefundExportListVo >>}
*/
@Operation(summary = "紧急出险", description = "紧急出险")
@GetMapping("/urgentUpdateIsUse")
public R urgentUpdateIsUse(String userName,String empIdcardNo) {
return tInsuranceDetailService.urgentUpdateIsUse(userName,empIdcardNo);
public R urgentUpdateIsUse(String empIdcardNo) {
return tInsuranceDetailService.urgentUpdateIsUse(empIdcardNo);
}
/**
......
......@@ -280,11 +280,10 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* EKP紧急出险
*
* @author zhaji
* @param userName
* @param empIdcardNo
* @return {@link R}
*/
R urgentUpdateIsUse(String userName, String empIdcardNo);
R urgentUpdateIsUse(String empIdcardNo);
/**
* 根据身份证查询商险列表
......
......@@ -2900,13 +2900,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
&& u.getPolicyStart().equals(param.getPolicyStart())
&& u.getPolicyEnd().equals(param.getPolicyEnd())
);
if(b){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
continue;
if(!b){
successList.add(param);
}
successList.add(param);
}
map.put("successList",successList);
map.put("errorList",errorList);
......@@ -3177,7 +3173,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String,List<DeptChangeCheckParam>> map = new HashMap<>(16);
List<DeptChangeCheckParam> errorList = 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();
if(StringUtils.isBlank(newDeptNo)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_NOT_EMPTY);
......@@ -3360,24 +3357,27 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
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.setDefaultSettleId(insuranceDetail.getDefaultSettleId());
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);
}
map.put("errorList",errorList);
......@@ -3419,16 +3419,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
public R urgentUpdateIsUse(String userName, String empIdcardNo) {
//员工姓名
if(StringUtils.isBlank(userName)){
}
public R urgentUpdateIsUse(String empIdcardNo) {
//员工身份证
if(StringUtils.isBlank(empIdcardNo)){
return R.failed("身份证号为空");
}
//员工身份证
// 身份证号位数校验(18 位合法)
//员工身份 // 身份证号位数校验(18 位合法)
if (!ValidityUtil.validateIDCard(empIdcardNo)){
return R.failed("身份证格式不正确");
}
......
......@@ -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.security.util.SecurityUtils;
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.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.entity.*;
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.TInsuranceTypeRateService;
......@@ -58,6 +55,7 @@ public class TInsuranceTypeRateServiceImpl extends ServiceImpl<TInsuranceTypeRat
}
LambdaQueryWrapper<TInsuranceTypeRate> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeRate::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeRate::getInsuranceTypeId,id);
queryWrapper.orderByDesc(TInsuranceTypeRate::getCreateTime);
return R.ok(list(queryWrapper));
}
......
......@@ -61,6 +61,7 @@ public class TInsuranceTypeStandardServiceImpl extends ServiceImpl<TInsuranceTyp
}
LambdaQueryWrapper<TInsuranceTypeStandard> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceTypeStandard::getDeleteFlag, CommonConstants.ZERO_INT).eq(TInsuranceTypeStandard::getInsuranceTypeId,id);
queryWrapper.orderByDesc(TInsuranceTypeStandard ::getCreateTime);
return R.ok(list(queryWrapper));
}
......
......@@ -37,6 +37,7 @@
INSURANCE_TYPE_ID = #{id}
and
DELETE_FLAG = 0
ORDER BY CREATE_TIME DESC
</select>
<select id="selectInsuranceTypeStandardList" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeStandard">
......@@ -52,6 +53,7 @@
INSURANCE_TYPE_ID = #{id}
and
DELETE_FLAG = 0
ORDER BY CREATE_TIME DESC
</select>
<select id="selectInsuranceTypePage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo">
select
......@@ -69,7 +71,7 @@
a.INSURANCE_COMPANY_ID = b.ID
and
a.DELETE_FLAG = 0
ORDER BY a.create_time DESC
ORDER BY a.CREATE_TIME DESC
</select>
<select id="getInsuranceTypeDetailById" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceTypeVo">
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