From c998e2ebb036d86ca593e15a60cbaa578fcb890e Mon Sep 17 00:00:00 2001 From: liujun Date: Tue, 12 Dec 2023 19:16:04 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/bus/CorpInfoController.java | 20 +++ .../system/DepartmentController.java | 1 + .../datasource/system/DepartmentMapper.java | 2 + .../dsno2/system/Department2Mapper.java | 117 ++++++++++++++++++ .../service/system/DepartmentService.java | 2 + .../system/impl/DepartmentServiceImpl.java | 5 + .../datasource/system/DepartmentMapper.xml | 26 ++++ 7 files changed, 173 insertions(+) create mode 100644 src/main/java/com/zcloud/mapper/dsno2/system/Department2Mapper.java diff --git a/src/main/java/com/zcloud/controller/bus/CorpInfoController.java b/src/main/java/com/zcloud/controller/bus/CorpInfoController.java index 9c96a3ea..a66edc34 100644 --- a/src/main/java/com/zcloud/controller/bus/CorpInfoController.java +++ b/src/main/java/com/zcloud/controller/bus/CorpInfoController.java @@ -10,6 +10,7 @@ import java.util.Map; import com.zcloud.service.bus.CorpInfoRelatedService; import com.zcloud.service.system.DictionariesService; import com.zcloud.util.*; +import net.sf.json.JSONArray; import org.apache.commons.io.FileUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -583,4 +584,23 @@ public class CorpInfoController extends BaseController { map.put("result", errInfo); return map; } + + /** + * 显示列表ztree(只查企业端部门) 有排序 + * + * @return + */ + @RequestMapping(value = "/listTreeManageAndCorpHasOrder") + @ResponseBody + public Object listTreeManageAndCorpHasOrder() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd.put("DEPARTMENT_ID", "0"); //查询父节点为0的根节点数据 + List rootList = departmentService.listTreeManageAndCorpHasOrder(pd); + JSONArray arr = JSONArray.fromObject(rootList); + map.put("zTreeNodes", arr.toString()); + map.put("result", errInfo); + return map; + } } diff --git a/src/main/java/com/zcloud/controller/system/DepartmentController.java b/src/main/java/com/zcloud/controller/system/DepartmentController.java index c749fdbe..9cd23a10 100644 --- a/src/main/java/com/zcloud/controller/system/DepartmentController.java +++ b/src/main/java/com/zcloud/controller/system/DepartmentController.java @@ -11,6 +11,7 @@ import com.zcloud.util.ObjectExcelView; import net.sf.json.JSONArray; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.checkerframework.checker.units.qual.A; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java index c35c14e6..5b9f4d3d 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/DepartmentMapper.java @@ -175,5 +175,7 @@ public interface DepartmentMapper{ List listTreeManageAndCorpForPcPunishThePerson(PageData pd); PageData getInfo(PageData pd) throws Exception; + + List listTreeManageAndCorpHasOrder(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/dsno2/system/Department2Mapper.java b/src/main/java/com/zcloud/mapper/dsno2/system/Department2Mapper.java new file mode 100644 index 00000000..8bc15d35 --- /dev/null +++ b/src/main/java/com/zcloud/mapper/dsno2/system/Department2Mapper.java @@ -0,0 +1,117 @@ +package com.zcloud.mapper.dsno2.system; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.entity.system.Department; + +import java.util.List; + +/** + * 说明: 组织机构接Mapper + * 作者:luoxiaobao + * 官网:www.qdkjchina.com + */ +public interface Department2Mapper { + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表 + * @param page + * @throws Exception + */ + public List datalistPage(Page page)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**通过编码获取数据 + * @param pd + * @throws Exception + */ + public PageData findByBianma(PageData pd)throws Exception; + + /** + * 通过ID获取其子级列表 + * @param parentId + * @return + * @throws Exception + */ + public List listSubDepartmentByParentId(String parentId) throws Exception; + + /** + * 通过ID获取其子级列表 + * @param parentId + * @return + * @throws Exception + */ + public List listByCorpInfoId(String parentId,String CORPINFO_ID) throws Exception; + List deptinformation(PageData pageData) throws Exception; + + /** + * 获取所有数据并填充每条数据的子级列表(递归处理) + * @param MENU_ID + * @return + * @throws Exception + */ + public List listAllDepartment(String parentId) throws Exception; + + /** + * 获取所有数据并填充每条数据的子级列表(递归处理)下拉ztree用 + * @param MENU_ID + * @return + * @throws Exception + */ + public List listAllDepartmentToSelect(String parentId, List zdepartmentPdList) throws Exception; + + /**获取某个部门所有下级部门ID(返回拼接字符串 in的形式) + * @param DEPARTMENT_ID + * @return + * @throws Exception + */ + public String getDEPARTMENT_IDS(String DEPARTMENT_ID) throws Exception; + + public List listAll(PageData pd); + + public List listAllMent (PageData pd); + + public List listAllDepartmentByType(PageData pd) throws Exception; + + void saveCorpdept(PageData pd); + + List saftpersonlist(PageData pd) throws Exception; + + List saftmanagelist(PageData pd); + + List findbyCorpIdtoDeptlistPage(Page page); + + List findByDeptIdlistPage(Page page); + + public PageData findCorpDeptDetail(PageData pd); + + void editNameBDId(PageData deptPageData); + + //从管理端修改部门 新 + void editCorpdeptNew(PageData pd); + + List listTreeCorpDept(PageData pd); +} + diff --git a/src/main/java/com/zcloud/service/system/DepartmentService.java b/src/main/java/com/zcloud/service/system/DepartmentService.java index b863fdab..a79792c5 100644 --- a/src/main/java/com/zcloud/service/system/DepartmentService.java +++ b/src/main/java/com/zcloud/service/system/DepartmentService.java @@ -225,5 +225,7 @@ public interface DepartmentService{ List listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception; PageData getDepartmentInfo(PageData pd) throws Exception; + + List listTreeManageAndCorpHasOrder(PageData pd); } diff --git a/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java index 7ed7767a..13c86e06 100644 --- a/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/DepartmentServiceImpl.java @@ -414,5 +414,10 @@ public class DepartmentServiceImpl implements DepartmentService{ public PageData getDepartmentInfo(PageData pd) throws Exception { return departmentMapper.getInfo(pd); } + + @Override + public List listTreeManageAndCorpHasOrder(PageData pd) { + return departmentMapper.listTreeManageAndCorpHasOrder(pd); + } } diff --git a/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml b/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml index f4ffc72b..2215e418 100644 --- a/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml +++ b/src/main/resources/mybatis/datasource/system/DepartmentMapper.xml @@ -553,4 +553,30 @@ +