| | |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.api.R; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | |
| | | .eq(ApplyDetail::getMemberId, detail.getMemberId()) |
| | | .orderByDesc(ApplyDetail::getCreateDate) |
| | | .last("limit 1")); |
| | | if (oldModel == null || oldModel.getStartTime() == null || oldModel.getStartTime().getTime() > update.getApplyStartTime().getTime()) { |
| | | // if (oldModel == null || oldModel.getStartTime() == null || oldModel.getStartTime().getTime() > update.getApplyStartTime().getTime()) { |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,用户【" + detail.getMemberName() + "】原保单信息有误,当前申请不支持减保处理!"); |
| | | // } |
| | | // if(!(oldModel.getStartTime().getTime()<=update.getDelValidTime().getTime()&& oldModel.getEndTime().getTime()>=update.getDelValidTime().getTime())){ |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,用户【" + detail.getMemberName() + "】减保日期未在保单记录日期中!"); |
| | | // } |
| | | if (oldModel == null || oldModel.getEndTime() == null || oldModel.getEndTime().getTime() < update.getDelValidTime().getTime()) { |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,用户【" + detail.getMemberName() + "】原保单信息有误,当前申请不支持减保处理!"); |
| | | } |
| | | if(!(oldModel.getStartTime().getTime()<=update.getDelValidTime().getTime()&& oldModel.getEndTime().getTime()>=update.getDelValidTime().getTime())){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,用户【" + detail.getMemberName() + "】减保日期未在保单记录日期中!"); |
| | | } |
| | | BigDecimal sumFee = Objects.isNull(insuranceApply.getServerCost())? |
| | | solutions.getPrice(): |
| | |
| | | sumFee |
| | | ,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(),oldModel.getStartTime(),delValidTime |
| | | ) ; |
| | | }else{ |
| | | delValidTime = oldModel.getStartTime(); |
| | | updateFee = BigDecimal.ZERO; |
| | | } |
| | | if (oldModel.getStartTime().getTime() < System.currentTimeMillis()) { |
| | | //// 2024年5月8日17:37:23 修改 计算产生费用 |
| | |
| | | if(!Constants.equalsInteger(applyDetail.getChangeStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"减保人员【" + applyChagneDetail.getMemberName() + "】保单信息异常,数据已被减保无法再次减保"); |
| | | } |
| | | applyChagneDetail.setPrice(applyDetail.getPrice()); |
| | | applyChagneDetail.setCreateDate(new Date()); |
| | | applyChagneDetail.setCreator(loginUserInfo.getId()); |
| | | applyChagneDetail.setIsdeleted(Constants.ZERO); |
| | |
| | | applyChagneDetail.setReduceMoney(solutions.getPrice().multiply(new BigDecimal(-1))); |
| | | applyChagneDetail.setFee(BigDecimal.ZERO); |
| | | } |
| | | applyChagneDetail.setId(null); |
| | | applyChagneDetailJoinMapper.insert(applyChagneDetail); |
| | | } |
| | | } |
| | |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",model.getId().toString()); |
| | | |
| | | //临时使用 |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241120/1c80f0d7-ab35-4355-b9fe-944464643115.pdf"; |
| | | String applyNo = signService.applySign(company.getName(),fileUrl,company.getName(),company.getCode(),company.getEmail(),"人员名单签章",company.getSignId(),notifyUrl); |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf"; |
| | | String applyNo = signService.applySignDoByParam(company.getName(),fileUrl,company.getName(),company.getCode(),company.getEmail(),"人员名单签章",company.getSignId(),notifyUrl,new Float(0.7)); |
| | | |
| | | // String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"人员名单签章",company.getSignId(),notifyUrl); |
| | | if(StringUtils.isBlank(applyNo) ){ |