diff --git a/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java b/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java index 2d14282..fd90fe5 100644 --- a/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java +++ b/src/main/java/cn/com/tenlion/controller/api/worktype/WorkTypeController.java @@ -40,14 +40,13 @@ public class WorkTypeController extends DefaultBaseController { -// @ApiOperation(value = "工种类型树形列表", notes = "工种类型树形列表") -// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) -// @GetMapping("listztree") -// public List listZTree() { -// Map params = requestParams(); -// //return workTypeService.list(params); -// -// } + @ApiOperation(value = "工种类型树形列表", notes = "工种类型树形列表") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listztree") + public List listZTree() { + Map params = requestParams(); + return workTypeService.listZTree(params); + } diff --git a/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java b/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java index 0c7b34c..a34d2ba 100644 --- a/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java +++ b/src/main/java/cn/com/tenlion/service/worktype/IWorkTypeService.java @@ -1,5 +1,6 @@ package cn.com.tenlion.service.worktype; +import cn.com.tenlion.pojo.dtos.worktype.WorkTypeZTreeDTO; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResultList; import cn.com.tenlion.pojo.dtos.worktype.WorkTypeDTO; @@ -19,6 +20,14 @@ import java.util.Map; **/ public interface IWorkTypeService { + + /** + * 工种类型树形列表 + * @param params + * @return + */ + List listZTree(Map params); + /** * 新增工种类型 * diff --git a/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml b/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml index 1d58cfe..5fb1fff 100644 --- a/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml +++ b/src/main/resources/mybatis/mapper/worktype/work-type-mapper.xml @@ -40,7 +40,7 @@ - +