现场维修

This commit is contained in:
jiang 2025-06-25 16:24:33 +08:00
parent a9267824fd
commit c9d75ee967
1 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,74 @@
package com.bonus.material.codeCollection.controller;
import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.codeCollection.domain.WsMaInfo;
import com.bonus.material.codeCollection.service.WsMaInfoService;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 机具信息控制器
* 提供机具信息的 RESTful API 接口实现增删改查功能
*/
@RestController
@RequestMapping("/wsMaInfo")
public class WsMaInfoController extends BaseController {
@Resource
private WsMaInfoService service;
@ApiOperation(value = "根据ID获取机具信息")
@PreventRepeatSubmit
@SysLog(title = "机具信息查询", businessType = OperaType.QUERY, logType = 1, module = "机具管理->查询")
@GetMapping("/{id}")
public AjaxResult getById(@PathVariable Integer id) {
return service.getById(id);
}
@ApiOperation(value = "查询所有机具信息列表")
@PreventRepeatSubmit
@SysLog(title = "机具信息列表查询", businessType = OperaType.QUERY, logType = 1, module = "机具管理->查询")
@GetMapping("/list")
public AjaxResult getAll() {
List<WsMaInfo> list = service.getAll();
return AjaxResult.success(list);
}
@ApiOperation(value = "新增机具信息")
@PreventRepeatSubmit
@SysLog(title = "机具信息新增", businessType = OperaType.INSERT, logType = 1, module = "机具管理->新增")
@PostMapping("/addWsMaInfo")
public AjaxResult save(@RequestBody WsMaInfo info) {
return service.save(info);
}
@ApiOperation(value = "更新机具信息")
@PreventRepeatSubmit
@SysLog(title = "机具信息更新", businessType = OperaType.UPDATE, logType = 1, module = "机具管理->更新")
@PostMapping("/updateWsMaInfo")
public AjaxResult update(@RequestBody WsMaInfo info) {
return service.update(info);
}
@ApiOperation(value = "删除机具信息")
@PreventRepeatSubmit
@SysLog(title = "机具信息删除", businessType = OperaType.DELETE, logType = 1, module = "机具管理->删除")
@PostMapping("/{id}")
public AjaxResult delete(@PathVariable Integer id) {
return service.delete(id);
}
@ApiOperation(value = "获取机具类型")
@PreventRepeatSubmit
@SysLog(title = "获取机具类型", businessType = OperaType.DELETE, logType = 1, module = "获取机具类型")
@PostMapping("/getMaTypeData")
public AjaxResult getMaTypeData() {
return service.getMaTypeData();
}
}