| | |
| | | package com.ruoyi.project.tr.riskEvent.controller; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Random; |
| | | import java.util.UUID; |
| | | |
| | |
| | | @Log(title = "风险单元类型", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @ResponseBody |
| | | public AjaxResult addSave(PreventRiskEventSaveReqDTO riskEventSaveReqDTO) |
| | | //public AjaxResult addSave(PreventRiskEventSaveReqDTO riskEventSaveReqDTO) |
| | | public AjaxResult addSave(@RequestParam Map<String, Object> params) |
| | | { |
| | | PreventRiskEventSaveReqDTO riskEventSaveReqDTO = new PreventRiskEventSaveReqDTO(); |
| | | riskEventSaveReqDTO.setRiskEventName((String) params.get("riskEventName")); |
| | | riskEventSaveReqDTO.setEventResult((String) params.get("eventResult")); |
| | | riskEventSaveReqDTO.setRiskUnitId((Long) params.get("riskUnitId")); |
| | | ResultVO<PreventRiskEvent> resultVO = riskService.saveRiskEvent(riskEventSaveReqDTO); |
| | | String code = resultVO.getCode(); |
| | | if ("200".equals(code)){ |
| | |
| | | @ResponseBody |
| | | public AjaxResult editSave(PreventRiskEventUpdateReqDTO riskEventUpdateReqDTO) |
| | | { |
| | | System.out.println(riskEventUpdateReqDTO); |
| | | ResultVO<PreventRiskEvent> resultVO = riskService.updateRiskEvent(riskEventUpdateReqDTO); |
| | | String code = resultVO.getCode(); |
| | | if ("200".equals(code)){ |