|  | @@ -7,9 +7,16 @@ import com.ruoyi.sim.domain.vo.FaultTree;
 | 
											
												
													
														|  |  import io.swagger.annotations.ApiOperation;
 |  |  import io.swagger.annotations.ApiOperation;
 | 
											
												
													
														|  |  import org.slf4j.Logger;
 |  |  import org.slf4j.Logger;
 | 
											
												
													
														|  |  import org.slf4j.LoggerFactory;
 |  |  import org.slf4j.LoggerFactory;
 | 
											
												
													
														|  | -import org.springframework.beans.factory.annotation.Autowired;
 |  | 
 | 
											
												
													
														|  |  import org.springframework.security.access.prepost.PreAuthorize;
 |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
											
												
													
														|  | -import org.springframework.web.bind.annotation.*;
 |  | 
 | 
											
												
													
														|  | 
 |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.GetMapping;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.PostMapping;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.PutMapping;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.DeleteMapping;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.PathVariable;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.RequestBody;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.RequestMapping;
 | 
											
												
													
														|  | 
 |  | +import org.springframework.web.bind.annotation.RestController;
 | 
											
												
													
														|  |  import com.ruoyi.common.annotation.Log;
 |  |  import com.ruoyi.common.annotation.Log;
 | 
											
												
													
														|  |  import com.ruoyi.common.core.controller.BaseController;
 |  |  import com.ruoyi.common.core.controller.BaseController;
 | 
											
												
													
														|  |  import com.ruoyi.common.core.domain.AjaxResult;
 |  |  import com.ruoyi.common.core.domain.AjaxResult;
 | 
											
										
											
												
													
														|  | @@ -23,7 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 | 
											
												
													
														|  |   * 故障Controller
 |  |   * 故障Controller
 | 
											
												
													
														|  |   *
 |  |   *
 | 
											
												
													
														|  |   * @author tom
 |  |   * @author tom
 | 
											
												
													
														|  | - * @date 2024-12-13
 |  | 
 | 
											
												
													
														|  | 
 |  | + * @date 2024-12-15
 | 
											
												
													
														|  |   */
 |  |   */
 | 
											
												
													
														|  |  @RestController
 |  |  @RestController
 | 
											
												
													
														|  |  @RequestMapping("/sim/fault")
 |  |  @RequestMapping("/sim/fault")
 | 
											
										
											
												
													
														|  | @@ -45,9 +52,9 @@ public class FaultController extends BaseController {
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
												
													
														|  |       * 导出故障列表
 |  |       * 导出故障列表
 | 
											
												
													
														|  |       */
 |  |       */
 | 
											
												
													
														|  | -    @PreAuthorize("@ss.hasPermi('sim:fault:export')")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PreAuthorize("@ss.hasPermi('sim:fault:export')")
 | 
											
												
													
														|  |      @Log(title = "故障", businessType = BusinessType.EXPORT)
 |  |      @Log(title = "故障", businessType = BusinessType.EXPORT)
 | 
											
												
													
														|  | -    @PostMapping("/export")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PostMapping("/export")
 | 
											
												
													
														|  |      public void export(HttpServletResponse response, Fault fault) {
 |  |      public void export(HttpServletResponse response, Fault fault) {
 | 
											
												
													
														|  |          List<Fault> list = faultService.selectFaultList(fault);
 |  |          List<Fault> list = faultService.selectFaultList(fault);
 | 
											
												
													
														|  |          ExcelUtil<Fault> util = new ExcelUtil<Fault>(Fault.class);
 |  |          ExcelUtil<Fault> util = new ExcelUtil<Fault>(Fault.class);
 | 
											
										
											
												
													
														|  | @@ -66,9 +73,9 @@ public class FaultController extends BaseController {
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
												
													
														|  |       * 新增故障
 |  |       * 新增故障
 | 
											
												
													
														|  |       */
 |  |       */
 | 
											
												
													
														|  | -    @PreAuthorize("@ss.hasPermi('sim:fault:add')")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PreAuthorize("@ss.hasPermi('sim:fault:add')")
 | 
											
												
													
														|  |      @Log(title = "故障", businessType = BusinessType.INSERT)
 |  |      @Log(title = "故障", businessType = BusinessType.INSERT)
 | 
											
												
													
														|  | -    @PostMapping
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PostMapping
 | 
											
												
													
														|  |      public AjaxResult add(@RequestBody Fault fault) {
 |  |      public AjaxResult add(@RequestBody Fault fault) {
 | 
											
												
													
														|  |          return toAjax(faultService.insertFault(fault));
 |  |          return toAjax(faultService.insertFault(fault));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
										
											
												
													
														|  | @@ -76,9 +83,9 @@ public class FaultController extends BaseController {
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
												
													
														|  |       * 修改故障
 |  |       * 修改故障
 | 
											
												
													
														|  |       */
 |  |       */
 | 
											
												
													
														|  | -    @PreAuthorize("@ss.hasPermi('sim:fault:edit')")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PreAuthorize("@ss.hasPermi('sim:fault:edit')")
 | 
											
												
													
														|  |      @Log(title = "故障", businessType = BusinessType.UPDATE)
 |  |      @Log(title = "故障", businessType = BusinessType.UPDATE)
 | 
											
												
													
														|  | -    @PutMapping
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PutMapping
 | 
											
												
													
														|  |      public AjaxResult edit(@RequestBody Fault fault) {
 |  |      public AjaxResult edit(@RequestBody Fault fault) {
 | 
											
												
													
														|  |          return toAjax(faultService.updateFault(fault));
 |  |          return toAjax(faultService.updateFault(fault));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
										
											
												
													
														|  | @@ -86,9 +93,9 @@ public class FaultController extends BaseController {
 | 
											
												
													
														|  |      /**
 |  |      /**
 | 
											
												
													
														|  |       * 删除故障
 |  |       * 删除故障
 | 
											
												
													
														|  |       */
 |  |       */
 | 
											
												
													
														|  | -    @PreAuthorize("@ss.hasPermi('sim:fault:remove')")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PreAuthorize("@ss.hasPermi('sim:fault:remove')")
 | 
											
												
													
														|  |      @Log(title = "故障", businessType = BusinessType.DELETE)
 |  |      @Log(title = "故障", businessType = BusinessType.DELETE)
 | 
											
												
													
														|  | -    @DeleteMapping("/{faultIds}")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @DeleteMapping("/{faultIds}")
 | 
											
												
													
														|  |      public AjaxResult remove(@PathVariable String[] faultIds) {
 |  |      public AjaxResult remove(@PathVariable String[] faultIds) {
 | 
											
												
													
														|  |          return toAjax(faultService.deleteFaultByFaultIds(faultIds));
 |  |          return toAjax(faultService.deleteFaultByFaultIds(faultIds));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
										
											
												
													
														|  | @@ -96,12 +103,9 @@ public class FaultController extends BaseController {
 | 
											
												
													
														|  |      // -------------------------------- tom add  --------------------------------
 |  |      // -------------------------------- tom add  --------------------------------
 | 
											
												
													
														|  |      private static final Logger logger = LoggerFactory.getLogger(FaultController.class);
 |  |      private static final Logger logger = LoggerFactory.getLogger(FaultController.class);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    /**
 |  | 
 | 
											
												
													
														|  | -     * 查询故障列表
 |  | 
 | 
											
												
													
														|  | -     */
 |  | 
 | 
											
												
													
														|  | -    // @PreAuthorize("@ss.hasPermi('sim:fault:list')")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    // @PreAuthorize("@ss.hasPermi('sim:fault:listAllTreeViaSimType')")
 | 
											
												
													
														|  |      @GetMapping("/listAllTreeViaSimType/{simType}")
 |  |      @GetMapping("/listAllTreeViaSimType/{simType}")
 | 
											
												
													
														|  | -    @ApiOperation("通过模拟器类型,查询故障列表")
 |  | 
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation("通过模拟器类型,查询故障列表。")
 | 
											
												
													
														|  |      public TableDataInfo listAllTreeViaSimType(@PathVariable(value = "simType") String simType) {
 |  |      public TableDataInfo listAllTreeViaSimType(@PathVariable(value = "simType") String simType) {
 | 
											
												
													
														|  |          Fault fault = new Fault();
 |  |          Fault fault = new Fault();
 | 
											
												
													
														|  |          fault.setSimType(simType);
 |  |          fault.setSimType(simType);
 |