无关风月
2024-12-13 3eeb6f5962f114f9706d4150a121bd92f88d9126
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TFaultMessageController.java
@@ -14,6 +14,8 @@
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.log.enums.OperatorType;
import com.ruoyi.common.security.annotation.Logical;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@@ -58,6 +60,7 @@
     * @param basePage
     * @return
     */
    @RequiresPermissions(value = {"/faultInformationList"}, logical = Logical.OR)
    @ResponseBody
    @GetMapping("/getFaultMessageList")
    @ApiOperation(value = "获取故障信息列表数据", tags = {"管理后台-设备监控"})
@@ -69,18 +72,22 @@
    }
    
    
    @RequiresPermissions(value = {"/faultInformationList/add"}, logical = Logical.OR)
    @ResponseBody
    @PostMapping("/addFaultMessage")
    @ApiOperation(value = "添加故障信息", tags = {"管理后台-设备监控"})
    @Log(title = "【设备监控】添加故障信息", businessType = BusinessType.INSERT,operatorType = OperatorType.MANAGE)
    public AjaxResult addFaultMessage(@RequestBody TFaultMessage faultMessage){
        faultMessageService.save(faultMessage);
        return AjaxResult.success();
    }
    
    
    @RequiresPermissions(value = {"/faultInformationList/del"}, logical = Logical.OR)
    @ResponseBody
    @DeleteMapping("/delFaultMessage/{id}")
    @ApiOperation(value = "删除故障信息", tags = {"管理后台-设备监控"})
    @Log(title = "【设备监控】删除故障信息", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE)
    public AjaxResult delFaultMessage(@PathVariable Integer id){
        faultMessageService.removeById(id);
        return AjaxResult.success();
@@ -111,7 +118,7 @@
     * @param gunId
     * @return
     */
    @PostMapping("/t-fault-message/getFaultMessageByGunId/{gunId}")
    @PostMapping("/getFaultMessageByGunId/{gunId}")
    public R<TFaultMessage> getFaultMessageByGunId(@PathVariable("gunId") Integer gunId){
        return R.ok(faultMessageService.getOne(Wrappers.lambdaQuery(TFaultMessage.class)
                .eq(TFaultMessage::getChargingGunId,gunId)