新增组织机构接口

This commit is contained in:
ly19960718 2021-06-10 10:27:14 +08:00
parent 6333165193
commit 1281f5d796

View File

@ -0,0 +1,55 @@
package com.tenlion.twoduty.controller.api.departmentbase;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.pos.DepartmentPO;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.service.department.service.IDepartmentService;
import io.swagger.annotations.*;
import org.apache.poi.hssf.record.ArrayRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
* 组织机构数据封装
* @author xwangs
* @create 2021-03-29 15:31
* @description
*/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "组织机构数据封装")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/departmentBase")
public class departmentBaseController extends DefaultBaseController {
@Autowired
private IDepartmentService departmentService;
private final static String GENGID = "0";
@ApiOperation(value = "组织机构列表", notes = "组织机构列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-jur")
public List<DepartmentPO> listJur(){
List<DepartmentPO> list = new ArrayList<>();
list = departmentService.listByParentId(GENGID);
return list;
}
}