| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.MultifileMapper; |
| | | import com.doumee.dao.business.SolutionsMapper; |
| | | import com.doumee.dao.business.UnionApplyMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.*; |
| | | import com.doumee.dao.business.join.ApplyDetailJoinMapper; |
| | | import com.doumee.dao.business.join.InsuranceApplyJoinMapper; |
| | |
| | | |
| | | @Autowired |
| | | private SmsEmailService smsEmailService; |
| | | @Autowired |
| | | private ApplyLogMapper applyLogMapper; |
| | | |
| | | @Value("${debug_model}") |
| | | private boolean debugModel; |
| | |
| | | } |
| | | |
| | | PageData<UnionApply> pageData = PageData.from(unionApplyJoinMapper.selectJoinPage(page,UnionApply.class, queryWrapper)); |
| | | if(pageData!=null && pageData.getRecords()!=null){ |
| | | for(UnionApply model : pageData.getRecords()){ |
| | | initStatusInfo(model); |
| | | } |
| | | } |
| | | return pageData; |
| | | } |
| | | |
| | | private void initStatusInfo(UnionApply model) { |
| | | model.setStatusInfo(Constants.UnionApplyStatus.getName(Constants.formatIntegerNum(model.getStatus()))); |
| | | } |
| | | |
| | | @Override |
| | |
| | | unionApply.setServiceDays(DateUtil.daysBetweenDates(new Date(),unionApply.getStartTime())+1); |
| | | } |
| | | } |
| | | initStatusInfo(unionApply); |
| | | return unionApply; |
| | | } |
| | | |
| | |
| | | .set(ApplyDetail::getUnionApplyId,unionApply.getId()) |
| | | .in(ApplyDetail::getApplyId,saveUnionApplyDTO.getApplyIds())); |
| | | |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_UPLOAD; |
| | | ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), null |
| | | ,unionApply.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionApply)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | return unionApply.getId(); |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 取消保单合并 |
| | | * @param id |
| | | * @param closeDTO |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void cancelMerge(Integer id){ |
| | | public void cancelMerge(CloseDTO closeDTO){ |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!user.getType().equals(Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"非商户用户,无法进行该操作!"); |
| | | } |
| | | UnionApply unionApply = unionApplyMapper.selectById(id); |
| | | if(Objects.isNull(closeDTO)||Objects.isNull(closeDTO.getId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | UnionApply unionApply = unionApplyMapper.selectById(closeDTO.getId()); |
| | | if(Objects.isNull(unionApply)||!Constants.equalsInteger(unionApply.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | |
| | | .set(UnionApply::getStatus,Constants.UnionApplyStatus.CLOSE.getKey()) |
| | | .eq(UnionApply::getId,unionApply.getId()) |
| | | ); |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_CLOSE; |
| | | String info =applyLogType.getInfo(); |
| | | info = info.replace("${param}", closeDTO.getReason()); |
| | | ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), info |
| | | ,unionApply.getId(),applyLogType.getKey(),null, null); |
| | | applyLogMapper.insert(log); |
| | | |
| | | applyLogMapper.insert(log); |
| | | } |
| | | |
| | | |
| | |
| | | multifile.setName(unionApplyBXDDTO.getFileName()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | |
| | | Constants.ApplyLogType applyLogType = Constants.ApplyLogType.IA_HBD_UPLOAD_TBD; |
| | | ApplyLog log = new ApplyLog(unionApply,applyLogType.getName(), null |
| | | ,unionApply.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionApply)); |
| | | applyLogMapper.insert(log); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |