| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()))){ |
| | | if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~"); |
| | | } |
| | | |
| | |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey()))){ |
| | | if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~"); |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | /** |
| | | * 理赔结案提交 |
| | | * 理赔备注标签 |
| | | * @param param |
| | | * @return |
| | | */ |
| | |
| | | ||StringUtils.isBlank( param.getCheckInfo()) ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | |
| | | SettleClaims model = settleClaimsMapper.selectById(param.getId()); |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | /* |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){ |
| | | if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~"); |
| | | } |
| | | */ |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | SettleClaims update = new SettleClaims(); |
| | | update.setEditDate(new Date()); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | //受理中和已确认资料可以进行理赔处理 |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){ |
| | | if((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~"); |
| | | } |
| | | |
| | |
| | | ||StringUtils.isBlank( param.getCheckInfo()) ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | |
| | | SettleClaims model = settleClaimsMapper.selectById(param.getId()); |
| | | if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | //受理中和已确认资料可以进行理赔处理 |
| | | if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.DEAL_ING.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey()))){ |
| | | if( Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey()) |
| | | ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起,该申请当前不支持该操作~"); |
| | | } |
| | | |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | SettleClaims update = new SettleClaims(); |
| | | update.setEditDate(new Date()); |
| | |
| | | response.setContentType("application/octet-stream"); |
| | | response.setHeader("eva-opera-type", "download"); |
| | | response.setHeader("eva-download-filename", encodeFileName); |
| | | packFilesToZip(fileList,response.getOutputStream()); |
| | | Constants.packFilesToZip(fileList,response.getOutputStream()); |
| | | } catch (IOException e) { |
| | | throw new BusinessException(ResponseStatus.EXPORT_EXCEL_ERROR, e); |
| | | } |
| | | } |
| | | |
| | | |
| | | public static void packFilesToZip(List<File> files, ServletOutputStream os) throws IOException { |
| | | try (ZipArchiveOutputStream zipOutputStream = new ZipArchiveOutputStream(os)) { |
| | | for (File file : files) { |
| | | ZipArchiveEntry entry = new ZipArchiveEntry(file.getName()); |
| | | zipOutputStream.putArchiveEntry(entry); |
| | | try (FileInputStream fileInputStream = new FileInputStream(file)) { |
| | | byte[] buffer = new byte[1024]; |
| | | int length; |
| | | while ((length = fileInputStream.read(buffer)) > 0) { |
| | | zipOutputStream.write(buffer, 0, length); |
| | | } |
| | | } |
| | | zipOutputStream.closeArchiveEntry(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public SettleClaims getSettleClaimsDetail(Integer id){ |