From 4de0fb84ef81e08b507409c46607ea158b233195 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期三, 12 七月 2023 17:05:33 +0800 Subject: [PATCH] 停用检修记录 --- src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java | 30 +++++++++++++++++++++++++++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java b/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java index 4880cf3..e149e73 100644 --- a/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java +++ b/src/main/java/com/ruoyi/project/tr/OverhaulLog/controller/OverhaulLogController.java @@ -6,6 +6,8 @@ import com.ruoyi.doublePrevention.entity.dto.resp.PreventOverhaulLogRespDTO; import com.ruoyi.doublePrevention.entity.dto.resp.PreventRiskControlMeasureRespDTO; import com.ruoyi.doublePrevention.entity.dto.resp.PreventRiskEventListQueryRespDTO; +import com.ruoyi.doublePrevention.entity.dto.resp.PreventRiskUnitCodeAndNameListQueryRespDTO; +import com.ruoyi.doublePrevention.service.RiskService; import com.ruoyi.doublePrevention.service.baseService.PreventOverhaulLogService; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.framework.aspectj.lang.annotation.Log; @@ -32,15 +34,28 @@ @Autowired private PreventOverhaulLogService overhaulLogService; + @Autowired + private RiskService riskService; + + +// @GetMapping() +// public String overhaulLog() +// { +// return prefix + "/overhaulLog"; +// } @GetMapping() - public String overhaulLog() + public String overhaulLog(ModelMap mmap) { + List<PreventRiskUnitCodeAndNameListQueryRespDTO> respDTOS = riskService.listRiskUnitCodeAndName(); + mmap.put("riskUnits", respDTOS); return prefix + "/overhaulLog"; } /** * 查询 * */ + @PostMapping("/list") + @ResponseBody public TableDataInfo selectOverhaulLogPage(PreventOverhaulLogReqBO overhaulLogReqBO, ModelMap mmap){ ResultVO<PreventOverhaulLogRespDTO> result = overhaulLogService.selectOverhaulLogPage(overhaulLogReqBO); @@ -54,12 +69,19 @@ /** * 新增检修记录 */ +// @GetMapping("/add") +// public String add() +// { +// return prefix + "/add"; +// } + @GetMapping("/add") - public String add() + public String add(ModelMap mmap) { + List<PreventRiskUnitCodeAndNameListQueryRespDTO> respDTOS = riskService.listRiskUnitCodeAndName(); + mmap.put("riskUnits", respDTOS); return prefix + "/add"; } - /** * 新增保存检修记录 @@ -86,6 +108,8 @@ { PreventOverhaulLog overhaulLogById = overhaulLogService.getOverhaulLogById(id); mmap.put("overhaulLogById",overhaulLogById); + List<PreventRiskUnitCodeAndNameListQueryRespDTO> respDTOS = riskService.listRiskUnitCodeAndName(); + mmap.put("riskUnits", respDTOS); return prefix + "/edit"; } -- Gitblit v1.9.2