| | |
| | | for (HiddenDangerCheckPoint dangerCheckPoint : resultList) { |
| | | PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(dangerCheckPoint.getId()); |
| | | if (ObjectUtils.isNotEmpty(dangerInfo)){ |
| | | if (ObjectUtils.isNotEmpty(dangerInfo.getDangerSrc())){ |
| | | dangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc()); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){ |
| | | dangerCheckPoint.setReportTime(dangerInfo.getReportTime()); |
| | | } |
| | |
| | | } |
| | | return ApiResult.success("隐患核查保存成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |
| | | return ApiResult.error(e.getMessage()); |
| | | } |
| | | } |
| | | /** |
| | |
| | | } |
| | | |
| | | hdcpService.updateHiddenDangerCheckPoint(hdcp); |
| | | |
| | | //此处插入隐患附属表 |
| | | int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); |
| | | if (result< 1){ |
| | | throw new RuntimeException("添加隐患附属信息失败"); |
| | | //20250623 修改此处 |
| | | PreventRiskDangerInfo dangerInfoByDangerCheckPointId = riskService.getDangerInfoByDangerCheckPointId(hdcp.getId()); |
| | | if (ObjectUtils.isNotEmpty(dangerInfoByDangerCheckPointId)){ |
| | | //此处插入隐患附属表 |
| | | int result = riskService.updateDangerInfo(hdcp); |
| | | if (result < 1){ |
| | | throw new RuntimeException("修改失败"); |
| | | } |
| | | }else { |
| | | //此处插入隐患附属表 |
| | | int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); |
| | | if (result < 1){ |
| | | throw new RuntimeException("添加隐患附属信息失败"); |
| | | } |
| | | } |
| | | // //此处插入隐患附属表 |
| | | // int result = riskService.updateCheckLog(hdcp.getId(), hdcp); |
| | | // if (result< 1){ |
| | | // throw new RuntimeException("添加隐患附属信息失败"); |
| | | // } |
| | | |
| | | |
| | | HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hdcp.getId()); |
| | | int confirmResult = confirmLogService.saveConfirmLog(hiddenDangerCheckPoint); |
| | |
| | | |
| | | return ApiResult.success("隐患核查保存成功"); |
| | | } catch (Exception e) { |
| | | return ApiResult.error("异常"); |
| | | return ApiResult.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | hdcp.setCompanyId(user.getCompanyId()); |
| | | i = hdcpService.insertHiddenDangerCheckPoint(hdcp); |
| | | //20250623增加此逻辑 |
| | | int result = riskService.insertDangerInfo(hdcp.getId(), hdcp); |
| | | if (result< 1){ |
| | | throw new RuntimeException("添加隐患附属信息失败"); |
| | | } |
| | | }else{ |
| | | hdcp.setUpdateBy(user.getLoginName()); |
| | | hdcp.setUpdateTime(DateUtils.getNowDate()); |
| | | i = hdcpService.updateHiddenDangerCheckPoint(hdcp); |
| | | //20250623增加此逻辑 |
| | | int result = riskService.updateDangerInfo(hdcp); |
| | | if (result < 1){ |
| | | throw new RuntimeException("修改失败"); |
| | | } |
| | | } |
| | | |
| | | hdcpService.getTaskCountTotal(Long.valueOf(header.userId));//查询未执行任务总数量并推送 |