| | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Resource |
| | | BaseCaseMapper baseCaseMapper; |
| | | |
| | | @Resource |
| | | DisposeRecordMapper disposeRecordMapper; |
| | | @Resource |
| | | WorkflowConfigStepMapper workflowConfigStepMapper; |
| | | |
| | | @Autowired |
| | | IInvestigationService iInvestigationService; |
| | | @Autowired |
| | |
| | | IDisposeRecordService iDisposeRecordService; |
| | | @Autowired |
| | | IImageResourcesService iImageResourcesService; |
| | | public final static Short LAST_WEEK = 0; |
| | | public final static Short LAST_MONTH = 1; |
| | | public final static Short LAST_THREEMONTH = 2; |
| | | |
| | | @Override |
| | | public Page<MyBacklogVO> listMyTask(Page<MyBacklogVO> page, String num, Long userId) { |
| | | return disposeRecordMapper.selectMyBackList(page,userId, num); |
| | | public Page<MyBacklogVO> listMyTask(Page<MyBacklogVO> page, String num, Long userId, Short type, Short source, Short time) { |
| | | LocalDateTime alarmTimeStart = null; |
| | | LocalDateTime alarmTimeEnd = null; |
| | | if (Objects.equals(time, LAST_WEEK)) { |
| | | alarmTimeStart = LocalDateTime.now().minusDays(7); |
| | | alarmTimeEnd = LocalDateTime.now(); |
| | | } else if (Objects.equals(time, LAST_MONTH)) { |
| | | alarmTimeStart = LocalDateTime.now().minusMonths(1); |
| | | alarmTimeEnd = LocalDateTime.now(); |
| | | } else if (Objects.equals(time, LAST_THREEMONTH)) { |
| | | alarmTimeStart = LocalDateTime.now().minusMonths(3); |
| | | alarmTimeEnd = LocalDateTime.now(); |
| | | } |
| | | //TODO:出现过一次重复数据 |
| | | return disposeRecordMapper.selectMyBackList(page, userId, num, alarmTimeStart, alarmTimeEnd, source, type); |
| | | } |
| | | |
| | | @Override |
| | |
| | | AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | List<ArrivalSituation> list = iArrivalSituationService.list(new LambdaQueryWrapper<ArrivalSituation>().eq(ArrivalSituation::getBaseCaseId, uploadDisposingResultParam.getCaseId())); |
| | | if (!list.isEmpty()) { |
| | | //TODO:违规没有当事人ID,违建才有 |
| | | if (uploadDisposingResultParam.getPartyInfoId() != null) { |
| | | //当事人 |
| | | PartyInfo partyInfo = new PartyInfo(); |
| | | BeanUtils.copyProperties(uploadDisposingResultParam, partyInfo); |
| | |
| | | BeanUtils.copyProperties(uploadDisposingResultParam, investigation); |
| | | investigation.setBaseCaseId(uploadDisposingResultParam.getCaseId()); |
| | | investigation.setPartyId(partyInfo.getId()); |
| | | investigation.setInvestigationTime(LocalDateTime.parse(uploadDisposingResultParam.getInvestigationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | //TODO:改为集合的字符串形式 |
| | | investigation.setPic(uploadDisposingResultParam.getPic().toString()); |
| | | //TODO:小程序前端页面没有调查时间,暂时不填 |
| | | //investigation.setInvestigationTime(LocalDateTime.parse(uploadDisposingResultParam.getInvestigationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | investigation.setId(uploadDisposingResultParam.getInvestigationId()); |
| | | iInvestigationService.updateById(investigation); |
| | | } |
| | | //到达 |
| | | ArrivalSituation arrivalSituation = new ArrivalSituation(); |
| | | BeanUtils.copyProperties(uploadDisposingResultParam, arrivalSituation); |
| | | arrivalSituation.setBaseCaseId(uploadDisposingResultParam.getCaseId()); |
| | | arrivalSituation.setArrivalTime(LocalDateTime.parse(uploadDisposingResultParam.getArrivalTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | arrivalSituation.setId(uploadDisposingResultParam.getArrivalSituationId()); |
| | | //TODO:改为集合的字符串形式 |
| | | arrivalSituation.setSituationPic(uploadDisposingResultParam.getSituationPic().toString()); |
| | | iArrivalSituationService.updateById(arrivalSituation); |
| | | //文书 |
| | | String handType = "02"; |
| | | ImageResources imageResources = new ImageResources(); |
| | | imageResources.setType(handType); |
| | | imageResources.setBelongToId(uploadDisposingResultParam.getCaseId()); |
| | | imageResources.setUrl(StringUtils.joinWith(",", uploadDisposingResultParam.getPic(), uploadDisposingResultParam.getSituationPic())); |
| | | imageResources.setUrl(StringUtils.joinWith(",", uploadDisposingResultParam.getPic().toString(), uploadDisposingResultParam.getSituationPic().toString())); |
| | | imageResources.setId(uploadDisposingResultParam.getImageResourcesId()); |
| | | iImageResourcesService.updateById(imageResources); |
| | | if (uploadDisposingResultParam.getWritCode() != null && uploadDisposingResultParam.getWritType() != null) { |
| | |
| | | BeanUtils.copyProperties(uploadDisposingResultParam, investigation); |
| | | investigation.setBaseCaseId(uploadDisposingResultParam.getCaseId()); |
| | | investigation.setCreateTime(LocalDateTime.now()); |
| | | //TODO:改为集合的字符串形式 |
| | | investigation.setPic(uploadDisposingResultParam.getPic().toString()); |
| | | investigation.setCreateUser(user.getUserId()); |
| | | investigation.setPartyId(partyInfo.getId()); |
| | | investigation.setInvestigationTime(LocalDateTime.parse(uploadDisposingResultParam.getInvestigationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | |
| | | //TODO:前端页面没有调查时间,暂时不填 |
| | | // investigation.setInvestigationTime(LocalDateTime.parse(uploadDisposingResultParam.getInvestigationTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | iInvestigationService.save(investigation); |
| | | //到达 |
| | | ArrivalSituation arrivalSituation = new ArrivalSituation(); |
| | |
| | | arrivalSituation.setBaseCaseId(uploadDisposingResultParam.getCaseId()); |
| | | arrivalSituation.setCreateTime(LocalDateTime.now()); |
| | | arrivalSituation.setCreateUser(user.getUserId()); |
| | | //TODO:改为集合的字符串形式 |
| | | arrivalSituation.setSituationPic(uploadDisposingResultParam.getSituationPic().toString()); |
| | | arrivalSituation.setArrivalTime(LocalDateTime.parse(uploadDisposingResultParam.getArrivalTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | iArrivalSituationService.save(arrivalSituation); |
| | | //文书 |
| | |
| | | imageResources.setBelongToId(uploadDisposingResultParam.getCaseId()); |
| | | imageResources.setCreateTime(LocalDateTime.now()); |
| | | imageResources.setCreateUser(user.getUserId()); |
| | | imageResources.setUrl(StringUtils.joinWith(",", uploadDisposingResultParam.getPic(), uploadDisposingResultParam.getSituationPic())); |
| | | imageResources.setUrl(StringUtils.joinWith(",", uploadDisposingResultParam.getPic().toString(), uploadDisposingResultParam.getSituationPic().toString())); |
| | | iImageResourcesService.save(imageResources); |
| | | if (uploadDisposingResultParam.getWritCode() != null && uploadDisposingResultParam.getWritType() != null) { |
| | | Writ writ = new Writ(); |
| | |
| | | writ.setSendTime(LocalDateTime.parse(uploadDisposingResultParam.getSendTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | iWritService.save(writ); |
| | | imageResources.setUrl(StringUtils |
| | | .joinWith(",", uploadDisposingResultParam.getPic() |
| | | , uploadDisposingResultParam.getSituationPic() |
| | | .joinWith(",", uploadDisposingResultParam.getPic().toString() |
| | | , uploadDisposingResultParam.getSituationPic().toString() |
| | | , uploadDisposingResultParam.getOriginalPic() |
| | | , uploadDisposingResultParam.getOtherPic() |
| | | , uploadDisposingResultParam.getRectifiedPic() |
| | |
| | | } |
| | | |
| | | baseCaseService.update(new LambdaUpdateWrapper<BaseCase>().eq(BaseCase::getId, uploadDisposingResultParam.getCaseId()).set(BaseCase::getState, BaseCaseStatus.DISPOSE)); |
| | | |
| | | |
| | | } |
| | | String stepName = StepName.CHECK.getName(); |
| | | DisposeRecord disposeRecord = new DisposeRecord(); |