| | |
| | | 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.doublePrevention.service.baseService.PreventRiskDangerConfirmLogService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private PreventRiskDangerConfirmLogService confirmLogService; |
| | | |
| | | @Autowired |
| | | private RiskService riskService; |
| | | |
| | | /** |
| | | * 获取隐患上报列表 |
| | |
| | | /** |
| | | * 新增保存隐患上报------登记隐患 |
| | | */ |
| | | @Transactional |
| | | public ApiResult addDangerReportSave(String str, ApiRequestHeader header) { |
| | | //验证userId,loginName,token,deviceType,deviceId,appType 是否一致 |
| | | ApiRequestHeader requestHeader = getHeader(header); |
| | |
| | | } |
| | | if (ObjectUtils.isEmpty(hdcp.getFindTime())){ |
| | | throw new RuntimeException("发现时间不能为空"); |
| | | } |
| | | if (ObjectUtils.isEmpty(hdcp.getDangerSrc())){ |
| | | throw new RuntimeException("隐患来源不能为空"); |
| | | } |
| | | hdc.setCreateBy(header.loginName);//创建者 |
| | | hdc.setCreateTime(DateUtils.getNowDate());//获取创建时间 |
| | |
| | | |
| | | hdcp.setCompanyId(user.getCompanyId()); |
| | | int result = hdcpService.insertHiddenDangerCheckPoint(hdcp); |
| | | //20250623增加此逻辑 |
| | | int result1 = riskService.insertDangerInfo(hdcp.getId(), hdcp); |
| | | if (result1< 1){ |
| | | throw new RuntimeException("添加隐患附属信息失败"); |
| | | } |
| | | |
| | | hdcpService.getTaskCountTotal(Long.valueOf(header.userId));//查询未执行任务总数量并推送 |
| | | |