| | |
| | | if(eventVisitingTasksDO == null || eventVisitingTasksDO.getEventStatus() != EventTasksStatusEnum.DZF.getCode()){ |
| | | return R.fail("当前状态不可完成走访"); |
| | | } |
| | | |
| | | //查询当前人员是否是(精神障碍,吸毒,刑满释放,社区矫正),如果是这四种状态,option参数为必填参数 |
| | | String label = this.baseMapper.getPopulationLabel(eventVisitingTasksDO.getVisiterId()); |
| | | if(StringUtils.isNotEmpty(label)){ |
| | | if(label.contains("精神障碍") || label.contains("吸毒") || label.contains("刑满释放") || label.contains("社区矫正")){ |
| | | if(StringUtils.isNotEmpty(taskCompleteDTO.getOption())){ |
| | | return R.fail("请选择异常状态"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | EventVisitingTasksDO complete = new EventVisitingTasksDO(); |
| | | BeanUtils.copyProperties(taskCompleteDTO,complete); |
| | | if(taskCompleteDTO.getException().intValue() == 0){ |
| | | if(taskCompleteDTO.getException() == 0){ |
| | | complete.setEventStatus(EventTasksStatusEnum.ZJJJ.getCode()); |
| | | }else{ |
| | | complete.setEventStatus(EventTasksStatusEnum.YC.getCode()); |
| | | } |
| | | complete.setSubmitDate(DateUtil.parse(taskCompleteDTO.getSubmitDate(), DatePattern.NORM_DATETIME_FORMAT)); |
| | | JSONObject json = JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson()); |
| | | json.put("check",taskCompleteDTO.getOption()); |
| | | complete.setTableContentJson(json.toJSONString()); |
| | | if(StringUtils.isNotEmpty(eventVisitingTasksDO.getTableContentJson())){ |
| | | JSONObject json = JSONObject.parseObject(eventVisitingTasksDO.getTableContentJson()); |
| | | if(StringUtils.isNotEmpty(taskCompleteDTO.getOption())){ |
| | | json.put("check",taskCompleteDTO.getOption()); |
| | | } |
| | | complete.setTableContentJson(json.toJSONString()); |
| | | } |
| | | |
| | | if(!StringUtils.isEmpty(taskCompleteDTO.getImgList())){ |
| | | taskCompleteDTO.getImgList().forEach(e->{ |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |