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