| | |
| | | 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; |
| | |
| | | * @param basePage |
| | | * @return |
| | | */ |
| | | @RequiresPermissions(value = {"/faultInformationList"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @GetMapping("/getFaultMessageList") |
| | | @ApiOperation(value = "获取故障信息列表数据", tags = {"管理后台-设备监控"}) |
| | |
| | | } |
| | | |
| | | |
| | | @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(); |
| | |
| | | * @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) |