| | |
| | | import com.ruoyi.framework.web.page.TableDataInfo; |
| | | 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.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增风险管控措施 - 最大风险源 |
| | | */ |
| | | @GetMapping("/addOne") |
| | | public String addOne(ModelMap mmap) |
| | | { |
| | | ResultVO<List<PreventRiskEventListQueryRespDTO>> resultVO = riskService.listRiskEvent(); |
| | | Object data = resultVO.getData(); |
| | | mmap.put("riskEvents", data); |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | | /** |
| | | * 新增保存 |
| | | */ |
| | | @Log(title = "风险单元类型", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOne") |
| | | @ResponseBody |
| | | public AjaxResult addSaveOne(PreventRiskControlMeasureSaveReqDTO measureSaveReqDTO) |
| | | { |
| | | |
| | | ResultVO<PreventRiskControlMeasure> resultVO = riskService.saveRiskControlMeasure(measureSaveReqDTO); |
| | | String code = resultVO.getCode(); |
| | | if ("200".equals(code)){ |
| | | return toAjax(1); |
| | | }else { |
| | | return AjaxResult.error(resultVO.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |