| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.security.ShiroUtils; |
| | | import com.ruoyi.doublePrevention.service.RiskService; |
| | | import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerCheckAndMeasureService; |
| | | import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerConfirmLogService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.mobile.domain.ApiRequestHeader; |
| | |
| | | |
| | | @Autowired |
| | | IHiddenDangerCheckPointService hdcpService;//隐患检查点Service |
| | | |
| | | @Autowired |
| | | private PreventRiskDangerCheckAndMeasureService riskDangerCheckAndMeasureService;//隐患检查点Service |
| | | |
| | | @Autowired |
| | | IUserService userService;//用户Service |
| | |
| | | HiddenDangerCheckPoint hdcp = new ObjectMapper().readValue(str, HiddenDangerCheckPoint.class); |
| | | hdcp.setUpdateBy(header.loginName); |
| | | hdcp.setUpdateTime(DateUtils.getNowDate()); |
| | | if (ObjectUtils.isEmpty(hdcp.getAcceptCreateTime())){ |
| | | throw new RuntimeException("请填写验收时间"); |
| | | } |
| | | if (!StringUtils.isEmpty(hdcp.getAcceptResult())) { |
| | | //验收结果 (0不通过 打回上一级整改阶段 1通过) |
| | | if ("0".equals(hdcp.getAcceptResult())) { |
| | |
| | | |
| | | |
| | | /** |
| | | * 隐患计划执行中---设置为记录正常 // todo |
| | | * 隐患计划执行中---设置为记录正常 |
| | | */ |
| | | public ApiResult editPointSetNormal(String str, ApiRequestHeader header) { |
| | | //验证userId,loginName,token,deviceType,deviceId,appType 是否一致 |
| | |
| | | } |
| | | try { |
| | | HiddenDangerCheckPoint hdcp = new ObjectMapper().readValue(str, HiddenDangerCheckPoint.class); |
| | | if (ObjectUtils.isEmpty(hdcp.getCheckPerson())){ |
| | | throw new RuntimeException("检查人不能为空"); |
| | | } |
| | | if (ObjectUtils.isEmpty(hdcp.getFindTime())){ |
| | | throw new RuntimeException("发现时间不能为空"); |
| | | } |
| | | hdcp.setRegisterCreateTime(DateUtils.getNowDate());//设置隐患登记上报创建时间 |
| | | hdcp.setRegisterUserId(Long.valueOf(header.userId));//设置隐患登记上报创建人ID |
| | | User user = userService.selectUserById(Long.valueOf(header.userId)); |