| | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.security.ShiroUtils; |
| | | import com.ruoyi.doublePrevention.service.RiskService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.mobile.domain.ApiRequestHeader; |
| | | import com.ruoyi.project.mobile.domain.ApiResult; |
| | |
| | | |
| | | @Autowired |
| | | IUserService userService;//用户Service |
| | | |
| | | @Autowired |
| | | private RiskService riskService; |
| | | |
| | | /** |
| | | * 获取隐患列表 |
| | |
| | | |
| | | hdcpService.getTaskCountTotal(Long.valueOf(header.userId));//查询未执行任务总数量并推送 |
| | | |
| | | // todo-2022 此处插入附属表 |
| | | // HiddenDangerCheckPoint hiddenDangerCheckPointById = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hiddenDangerCheckPoint.getId()); |
| | | int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); |
| | | if (result< 1){ |
| | | throw new RuntimeException("添加隐患附属信息失败"); |
| | | } |
| | | |
| | | |
| | | return ApiResult.success("隐患核查保存成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |
| | |
| | | |
| | | hdcpService.getTaskCountTotal(Long.valueOf(header.userId));//查询未执行任务总数量并推送 |
| | | |
| | | // todo-2022 隐患信息附属表 |
| | | int result = riskService.updateDangerInfoRectify(hdcp); |
| | | if (result < 1){ |
| | | throw new RuntimeException("整改信息保存失败"); |
| | | } |
| | | return ApiResult.success("隐患整改保存成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |
| | |
| | | |
| | | hdcpService.getTaskCountTotal(Long.valueOf(header.userId));//查询未执行任务总数量并推送 |
| | | |
| | | // todo-2022 验收通过,修改为已验收状态 |
| | | int result = riskService.updateDangerInfoAccept(hdcp); |
| | | if (result < 1){ |
| | | throw new RuntimeException("隐患验收信息保存失败"); |
| | | } |
| | | |
| | | return ApiResult.success("隐患验收保存成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |