| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- package com.dk.mdm.controller.mst;
- import com.dk.common.model.pojo.PageList;
- import com.dk.common.response.ResponseResultVO;
- import com.dk.mdm.model.pojo.mst.Org;
- import com.dk.common.service.BaseService;
- import com.dk.mdm.model.query.mst.OrgQuery;
- import com.dk.common.model.response.mst.OrgResponse;
- import com.dk.common.model.vo.mst.OrgVO;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.transaction.annotation.Transactional;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.beans.factory.annotation.Autowired;
- import io.swagger.annotations.Api;
- import com.dk.mdm.service.mst.OrgService;
- import java.util.List;
- @Api(tags = "组织机构API接口")
- @RestController
- @RequestMapping("/mst/org")
- public class OrgController{
- public BaseService<Org> getService() {
- return orgService;
- }
- @Autowired
- private OrgService orgService;
- /**
- * @desc : 条件查询
- * @author : 王英杰
- * @date : 2024/2/26 14:02
- */
- @ApiOperation( value = "分页、关联、条件查询", notes = "分页、关联、条件查询" )
- @PostMapping({"list_by"})
- public ResponseResultVO<PageList<OrgResponse>> selectByCond(@RequestBody OrgQuery orgQuery) {
- return orgService.selectByCond(orgQuery);
- }
- /**
- * @desc : 条件查询
- * @author : 王英杰
- * @date : 2024/2/26 14:02
- */
- @ApiOperation( value = "分页、关联、条件查询", notes = "分页、关联、条件查询" )
- @PostMapping({"list_by_tree"})
- public ResponseResultVO<PageList<OrgResponse>> selectByCondTree(@RequestBody OrgQuery orgQuery) {
- return orgService.selectByCondTree(orgQuery);
- }
- /**
- * @desc : 新建组织部门
- * @author : 王英杰
- * @date : 2024/2/27 9:13
- */
- @ApiOperation( value = "新建组织部门", notes = "新建组织部门" )
- @PostMapping({"insert"})
- public ResponseResultVO<?> insert(@RequestBody OrgVO orgVO) {
- return orgService.insert(orgVO);
- }
- /**
- * @desc : 新建组织部门--注册顶级部门
- * @author : 姜永辉
- * @date : 2024/2/27 9:13
- */
- @ApiOperation( value = "新建组织部门", notes = "新建组织部门" )
- @PostMapping({"insert_feign_org"})
- public ResponseResultVO<?> insertFeignOrg(@RequestBody OrgVO orgVO) {
- return orgService.insertFeignOrg(orgVO);
- }
- /**
- * @desc : 通过ID查询
- * @author : 宋扬
- * @date : 2024/3/1 16:01
- */
- @PostMapping({"/{id}"})
- public ResponseResultVO selectById(@PathVariable String id) {
- return orgService.selectById(id);
- }
- /**
- * @desc : 通过ID查询 带出对应的 组织资金账户 以及组织仓库
- * @author : 王英杰
- * @date : 2024/3/1 16:01
- */
- @PostMapping({"get_by_id/{id}"})
- public ResponseResultVO getById(@PathVariable String id) {
- return orgService.getById(id);
- }
- /**
- * @desc : 编辑组织机构
- * @author : 宋扬
- * @date : 2024/3/22 17:14
- */
- @ApiOperation(value = "编辑组织机构", notes = "编辑组织机构")
- @PostMapping({"update"})
- public ResponseResultVO<Boolean> update(@RequestBody OrgVO orgVO) {
- return orgService.update(orgVO);
- }
- /**
- * @desc : 微信小程序 查询选择部门数据
- * @author : 王英杰
- * @date : 2024/3/1 16:01
- */
- @PostMapping({"select_choose_org"})
- public ResponseResultVO<List<OrgResponse>> selectChooseOrg(@RequestBody OrgQuery orgQuery) {
- return orgService.selectChooseOrg(orgQuery);
- }
- }
|