bug修复
parent
2521ccf737
commit
c998e2ebb0
|
@ -10,6 +10,7 @@ import java.util.Map;
|
||||||
import com.zcloud.service.bus.CorpInfoRelatedService;
|
import com.zcloud.service.bus.CorpInfoRelatedService;
|
||||||
import com.zcloud.service.system.DictionariesService;
|
import com.zcloud.service.system.DictionariesService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
@ -583,4 +584,23 @@ public class CorpInfoController extends BaseController {
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示列表ztree(只查企业端部门) 有排序
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/listTreeManageAndCorpHasOrder")
|
||||||
|
@ResponseBody
|
||||||
|
public Object listTreeManageAndCorpHasOrder() throws Exception {
|
||||||
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
|
String errInfo = "success";
|
||||||
|
PageData pd = new PageData();
|
||||||
|
pd.put("DEPARTMENT_ID", "0"); //查询父节点为0的根节点数据
|
||||||
|
List<PageData> rootList = departmentService.listTreeManageAndCorpHasOrder(pd);
|
||||||
|
JSONArray arr = JSONArray.fromObject(rootList);
|
||||||
|
map.put("zTreeNodes", arr.toString());
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.zcloud.util.ObjectExcelView;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.checkerframework.checker.units.qual.A;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
|
@ -175,5 +175,7 @@ public interface DepartmentMapper{
|
||||||
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd);
|
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd);
|
||||||
|
|
||||||
PageData getInfo(PageData pd) throws Exception;
|
PageData getInfo(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
List<PageData> listTreeManageAndCorpHasOrder(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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<PageData> 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<Department> listSubDepartmentByParentId(String parentId) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID获取其子级列表
|
||||||
|
* @param parentId
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<Department> listByCorpInfoId(String parentId,String CORPINFO_ID) throws Exception;
|
||||||
|
List<PageData> deptinformation(PageData pageData) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有数据并填充每条数据的子级列表(递归处理)
|
||||||
|
* @param MENU_ID
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<Department> listAllDepartment(String parentId) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有数据并填充每条数据的子级列表(递归处理)下拉ztree用
|
||||||
|
* @param MENU_ID
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<PageData> listAllDepartmentToSelect(String parentId, List<PageData> zdepartmentPdList) throws Exception;
|
||||||
|
|
||||||
|
/**获取某个部门所有下级部门ID(返回拼接字符串 in的形式)
|
||||||
|
* @param DEPARTMENT_ID
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public String getDEPARTMENT_IDS(String DEPARTMENT_ID) throws Exception;
|
||||||
|
|
||||||
|
public List<PageData> listAll(PageData pd);
|
||||||
|
|
||||||
|
public List<PageData> listAllMent (PageData pd);
|
||||||
|
|
||||||
|
public List<Department> listAllDepartmentByType(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
void saveCorpdept(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> saftpersonlist(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
List<PageData> saftmanagelist(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> findbyCorpIdtoDeptlistPage(Page page);
|
||||||
|
|
||||||
|
List<PageData> findByDeptIdlistPage(Page page);
|
||||||
|
|
||||||
|
public PageData findCorpDeptDetail(PageData pd);
|
||||||
|
|
||||||
|
void editNameBDId(PageData deptPageData);
|
||||||
|
|
||||||
|
//从管理端修改部门 新
|
||||||
|
void editCorpdeptNew(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> listTreeCorpDept(PageData pd);
|
||||||
|
}
|
||||||
|
|
|
@ -225,5 +225,7 @@ public interface DepartmentService{
|
||||||
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception;
|
List<PageData> listTreeManageAndCorpForPcPunishThePerson(PageData pd) throws Exception;
|
||||||
|
|
||||||
PageData getDepartmentInfo(PageData pd) throws Exception;
|
PageData getDepartmentInfo(PageData pd) throws Exception;
|
||||||
|
|
||||||
|
List<PageData> listTreeManageAndCorpHasOrder(PageData pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -414,5 +414,10 @@ public class DepartmentServiceImpl implements DepartmentService{
|
||||||
public PageData getDepartmentInfo(PageData pd) throws Exception {
|
public PageData getDepartmentInfo(PageData pd) throws Exception {
|
||||||
return departmentMapper.getInfo(pd);
|
return departmentMapper.getInfo(pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> listTreeManageAndCorpHasOrder(PageData pd) {
|
||||||
|
return departmentMapper.listTreeManageAndCorpHasOrder(pd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -553,4 +553,30 @@
|
||||||
<select id="getInfo" resultType="com.zcloud.entity.PageData">
|
<select id="getInfo" resultType="com.zcloud.entity.PageData">
|
||||||
select * from vi_department_all where DEPARTMENT_ID = #{DEPARTMENT_ID}
|
select * from vi_department_all where DEPARTMENT_ID = #{DEPARTMENT_ID}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="listTreeManageAndCorpHasOrder" resultType="com.zcloud.entity.PageData">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
DEP_ORDER,
|
||||||
|
DEPARTMENT_ID id,
|
||||||
|
NAME name,
|
||||||
|
PARENT_ID pId,
|
||||||
|
f.CORPINFO_ID,
|
||||||
|
c.COR_ORDER
|
||||||
|
FROM
|
||||||
|
OA_DEPARTMENT f
|
||||||
|
LEFT JOIN bus_corp_info c ON f.CORPINFO_ID = c.CORPINFO_ID
|
||||||
|
WHERE
|
||||||
|
c.ISDELETE = '0'
|
||||||
|
ORDER BY
|
||||||
|
name,
|
||||||
|
DEP_ORDER ASC
|
||||||
|
) t
|
||||||
|
ORDER BY
|
||||||
|
( COR_ORDER + 0 ) ASC,
|
||||||
|
DEP_ORDER ASC,
|
||||||
|
name
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue