类型管理

This commit is contained in:
sxu 2024-11-27 17:12:07 +08:00
parent 73463689be
commit f52fae9613
1 changed files with 7 additions and 6 deletions

View File

@ -5,13 +5,14 @@ import com.bonus.common.biz.config.ListPagingUtil;
import com.bonus.common.core.utils.ServletUtils; import com.bonus.common.core.utils.ServletUtils;
import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult; 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.ma.mapper.MaTypeMapper; import com.bonus.material.ma.mapper.MaTypeMapper;
import com.bonus.material.ma.service.ITypeService; import com.bonus.material.ma.service.ITypeService;
import com.bonus.material.ma.vo.MaType; import com.bonus.material.ma.vo.MaType;
import com.bonus.material.ma.vo.TreeSelect; import com.bonus.material.ma.vo.TreeSelect;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -26,7 +27,7 @@ import static com.bonus.common.core.constant.Constants.PAGE_SIZE;
* 工机具类型管理控制层 * 工机具类型管理控制层
*/ */
@RestController @RestController
@Api(value = "工机具类型管理控制层") @Api(value = "工机具类型管理", tags = {"工机具类型管理"})
@RequestMapping("/type") @RequestMapping("/type")
public class MaTypeController extends BaseController { public class MaTypeController extends BaseController {
@ -217,7 +218,7 @@ public class MaTypeController extends BaseController {
* @param typeId * @param typeId
* @return * @return
*/ */
@ApiOperation(value = "根据左列表类型id查询右表格") @ApiOperation(value = "根据左列表类型id查询")
@GetMapping("/getListByMaTypePid") @GetMapping("/getListByMaTypePid")
public AjaxResult getListByMaTypePid(Long typeId, @RequestParam(required = false) String typeName) { public AjaxResult getListByMaTypePid(Long typeId, @RequestParam(required = false) String typeName) {
List<MaType> listByParentId = iTypeService.getListByParentId(typeId, typeName); List<MaType> listByParentId = iTypeService.getListByParentId(typeId, typeName);
@ -264,7 +265,7 @@ public class MaTypeController extends BaseController {
* 新增机具类型管理ma_type * 新增机具类型管理ma_type
*/ */
@ApiOperation(value = "新增机具类型管理ma_type") @ApiOperation(value = "新增机具类型管理ma_type")
//@Log(title = "机具类型管理ma_type", businessType = BusinessType.INSERT) @SysLog(title = "入库记录", businessType = OperaType.INSERT, logType = 1,module = "新增机具类型管理ma_type")
@PostMapping @PostMapping
public AjaxResult add(@RequestBody MaType maType) { public AjaxResult add(@RequestBody MaType maType) {
int result = iTypeService.insertMaType(maType); int result = iTypeService.insertMaType(maType);
@ -279,7 +280,7 @@ public class MaTypeController extends BaseController {
* 修改机具类型管理ma_type * 修改机具类型管理ma_type
*/ */
@ApiOperation(value = "修改机具类型管理ma_type") @ApiOperation(value = "修改机具类型管理ma_type")
//@Log(title = "机具类型管理ma_type", businessType = BusinessType.UPDATE) @SysLog(title = "入库记录", businessType = OperaType.UPDATE, logType = 1,module = "修改机具类型管理ma_type")
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody MaType maType) { public AjaxResult edit(@RequestBody MaType maType) {
Long parentId = maType.getParentId(); Long parentId = maType.getParentId();
@ -299,7 +300,7 @@ public class MaTypeController extends BaseController {
* 删除机具类型管理ma_type * 删除机具类型管理ma_type
*/ */
@ApiOperation(value = "删除机具类型管理ma_type") @ApiOperation(value = "删除机具类型管理ma_type")
//@Log(title = "机具类型管理ma_type", businessType = BusinessType.DELETE) @SysLog(title = "入库记录", businessType = OperaType.DELETE, logType = 1,module = "删除机具类型管理ma_type")
@DeleteMapping("/{typeId}") @DeleteMapping("/{typeId}")
public AjaxResult remove(@PathVariable Long typeId) throws Exception { public AjaxResult remove(@PathVariable Long typeId) throws Exception {
return toAjax(iTypeService.deleteMaTypeByTypeId(typeId)); return toAjax(iTypeService.deleteMaTypeByTypeId(typeId));