| | |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.eq(UnionChange::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getSolutionsName() != null) { |
| | | queryWrapper.eq(Solutions::getName, pageWrap.getModel().getSolutionsName()); |
| | | } |
| | | |
| | | if (pageWrap.getModel().getQueryStartTime() != null) { |
| | | queryWrapper.ge(UnionChange::getCreateDate, pageWrap.getModel().getQueryStartTime() +" 00:00:00" ); |
| | |
| | | if(!(Constants.equalsInteger(user.getType(),Constants.ZERO) || Constants.equalsInteger(user.getType(),Constants.TWO))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户平台用户,无法进行该操作"); |
| | | } |
| | | if(saveUnionChangeDTO.getBusinessType().equals(Constants.ZERO)||Objects.isNull(saveUnionChangeDTO.getApplyDate())){ |
| | | //2024年5月9日14:59:24 修改 默认入当前天 |
| | | saveUnionChangeDTO.setApplyDate(DateUtil.getMontageDate(new Date(),1)); |
| | | } |
| | | // if(saveUnionChangeDTO.getBusinessType().equals(Constants.ZERO)||Objects.isNull(saveUnionChangeDTO.getApplyDate())){ |
| | | // //2024年5月9日14:59:24 修改 默认入当前天 |
| | | // saveUnionChangeDTO.setApplyDate(DateUtil.getMontageDate(new Date(),1)); |
| | | // } |
| | | if(Objects.isNull(saveUnionChangeDTO) |
| | | || Objects.isNull(saveUnionChangeDTO.getApplyIds()) |
| | | || Objects.isNull(saveUnionChangeDTO.getApplyDate()) |
| | |
| | | String companyName = ""; |
| | | String creditCode = ""; |
| | | String email = ""; |
| | | String signId = ""; |
| | | if(Constants.equalsInteger(user.getType(),Constants.TWO)){ |
| | | if(!unionChange.getShopId().equals(user.getCompanyId())){ |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"对不起非您的合并单,您无法进行操作!"); |
| | |
| | | companyName = company.getName(); |
| | | creditCode = company.getCode(); |
| | | email = company.getEmail(); |
| | | signId = company.getSignId(); |
| | | }else{ |
| | | companyName = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.PLAT_COMPANY_NAME).getCode(); |
| | | creditCode = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.PLAT_CREDIT_CODE).getCode(); |
| | |
| | | |
| | | |
| | | String fileUrl = null; |
| | | // if(Constants.equalsObject(unionChange.getType(), Constants.ONE)){ |
| | | // fileUrl = ExcelExporter.build(UnionChange.class).exportUnionChangeOtherUnitExcelToPdf(unionChange,"换厂申请表"); |
| | | // }else{ |
| | | // fileUrl = ExcelExporter.build(UnionChange.class).exportUnionChangeExcelToPdf(unionChange,"加减保申请表"); |
| | | // } |
| | | if(Constants.equalsObject(unionChange.getType(), Constants.ONE)){ |
| | | fileUrl = ExcelExporter.build(UnionChange.class).exportUnionChangeOtherUnitExcelToPdf(unionChange,"换厂申请表"); |
| | | }else{ |
| | | fileUrl = ExcelExporter.build(UnionChange.class).exportUnionChangeExcelToPdf(unionChange,"加减保申请表"); |
| | | } |
| | | String notifyUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SIGN_DONE_NOTIFY_URL).getCode(); |
| | | notifyUrl = notifyUrl.replace("${type}","0").replace("${id}",unionChange.getId().toString()); |
| | | // String applyNo = signService.applySignLocalFile(company.getName(),company.getName(),fileUrl,company.getCode(),company.getEmail(),"合并单(加减保/换厂)申请签署",company.getSignId(),notifyUrl); |
| | | String applyNo = signService.applySignLocalFileByParam(companyName,companyName,fileUrl,creditCode,email,"合并单(加减保/换厂)申请签署",null,notifyUrl,new Float(0.7)); |
| | | //临时使用 |
| | | fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf"; |
| | | String applyNo = signService.applySignWidthQifengSet(companyName,fileUrl,companyName,creditCode,email,"人员名单签章",null,notifyUrl,new Float(0.7)); |
| | | // fileUrl = "https://yybred.oss-cn-hangzhou.aliyuncs.com/apply/20241230/a0d128f2-ba6c-4ad4-b86b-b2610a513d41.pdf"; |
| | | // String applyNo = signService.applySignWidthQifengSet(companyName,fileUrl,companyName,creditCode,email,"人员名单签章",null,notifyUrl,new Float(0.7)); |
| | | if(StringUtils.isBlank(applyNo) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,获取在线签章地址失败,请稍后重试!"); |
| | | } |
| | |
| | | BigDecimal reduceFee = BigDecimal.ZERO; |
| | | |
| | | //如果批单日期 大于 员工保单的开始日期 |
| | | if(applyChange.getDelValidTime().getTime() > oldModel.getStartTime().getTime()){ |
| | | if(reduceDate.getTime()>oldModel.getStartTime().getTime()){ |
| | | reduceDate = DateUtil.getMontageDate(oldModel.getStartTime(), 3); |
| | | }else{ |
| | | reduceDate = DateUtil.getMontageDate(applyChange.getDelValidTime(), 3); |
| | | } |
| | | //减保记录操作后的总费用 |
| | | reduceFee = Constants.reduceFee( |
| | | solutions,fee,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(),oldModel.getStartTime(),reduceDate) ; |
| | | if(reduceDate.getTime() > oldModel.getStartTime().getTime()){ |
| | | reduceDate = DateUtil.getMontageDate(applyChange.getDelValidTime(), 3); |
| | | // if(reduceDate.getTime()<oldModel.getStartTime().getTime()){ |
| | | // reduceDate = DateUtil.getMontageDate(oldModel.getStartTime(), 3); |
| | | // }else{ |
| | | // reduceDate = DateUtil.getMontageDate(applyChange.getDelValidTime(), 3); |
| | | // } |
| | | }else{ |
| | | reduceDate = DateUtil.getMontageDate(oldModel.getStartTime(), 3); |
| | | } |
| | | |
| | | //减保记录操作后的总费用 |
| | | reduceFee = Constants.reduceFee( |
| | | solutions,fee,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(),oldModel.getStartTime(),reduceDate) ; |
| | | |
| | | BigDecimal pullFee = BigDecimal.ZERO; |
| | | if (oldModel.getStartTime().getTime() < System.currentTimeMillis()) { |