| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.security.ShiroUtils; |
| | | import com.ruoyi.doublePrevention.service.RiskService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | |
| | | import com.ruoyi.project.tr.riskEvaluationPlan.service.IRiskEvaluationPlanService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IRiskCheckPointService riskCheckPointService; |
| | | |
| | | @Autowired |
| | | private RiskService riskService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | |
| | | |
| | | /** |
| | | * 检查点隐患登记--保存 |
| | | * 检查点隐患登记--保存 na li lai de huo dong ,rang ye hen xin dong ,wojiu zhiji na zou le a |
| | | * todo-2022 手机端 |
| | | */ |
| | | @Log(title = "检查点隐患登记--保存", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/editPointDangerRegisterSave") |
| | | @ResponseBody |
| | | @Transactional |
| | | public AjaxResult editPointDangerRegisterSave(HiddenDangerCheckPoint hiddenDangerCheckPoint) { |
| | | hiddenDangerCheckPoint.setRegisterCreateTime(DateUtils.getNowDate());//设置隐患登记上报创建时间 |
| | | hiddenDangerCheckPoint.setRegisterUserId(getSysUser().getUserId());//设置隐患登记上报创建人ID |
| | |
| | | hiddenDangerCheckPoint.setStage(TrHiddenDangerCheckConstants.DANGER_STAGE_PLAN_EXAMINE);//隐患核查阶段(数据进入到隐患核查阶段) |
| | | |
| | | hiddenDangerCheckPoint.setDangerSources(TrHiddenDangerCheckConstants.DANGER_SOURCES_PLAN_PRODUCE); //隐患来源(隐患计划排查生成) |
| | | |
| | | |
| | | HiddenDangerCheckPoint queryExist = new HiddenDangerCheckPoint(); |
| | | queryExist.setWhetherDanger(TrHiddenDangerCheckConstants.WHETHER_DANGER_YES);//是否为隐患(是隐患) |
| | |
| | | hiddenDangerCheckPoint.setCreateTime(DateUtils.getNowDate()); |
| | | hiddenDangerCheckPoint.setCompanyId(getSysUser().getCompanyId()); |
| | | i = hiddenDangerCheckPointService.insertHiddenDangerCheckPoint(hiddenDangerCheckPoint); |
| | | |
| | | // // todo-2022 此处插入附属表 |
| | | // //获取Id返回值 |
| | | // hiddenDangerCheckPoint.getId(); |
| | | // int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint); |
| | | // if (result< 1){ |
| | | // throw new RuntimeException("添加隐患附属信息失败"); |
| | | // } |
| | | |
| | | } else { |
| | | hiddenDangerCheckPoint.setUpdateBy(getSysUser().getLoginName()); |
| | | hiddenDangerCheckPoint.setUpdateTime(DateUtils.getNowDate()); |
| | | i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint); |
| | | |
| | | // // todo-2022 此处修改附属表 |
| | | // int result = riskService.updateDangerInfo(hiddenDangerCheckPoint); |
| | | // if (result < 1){ |
| | | // throw new RuntimeException("修改失败"); |
| | | // } |
| | | } |
| | | hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送 |
| | | return toAjax(i); |