main
HuangHai 3 months ago
parent b748d12f96
commit 12644c2fb1

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.dsideal.base.Util.RemoteDbInit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import java.util.List;
@ -17,9 +18,8 @@ public class CompanyUserModel {
*/
public JSONArray getTreeData() {
// 1、获取所有父节点
String parentSql = "select distinct wx_user_id,wx_person_name from yltcharge.t_ext_company_user where wx_user_id not in (" +
"select child_person_id from yltcharge.t_ext_pm_parent) and wx_user_id is not null";
List<Record> listParent = Db.find(parentSql);
SqlPara sqlPara = Db.getSqlPara("CompanyUser.getMasterPmList");
List<Record> listParent = Db.find(sqlPara);
// 2、获取所有子节点
String childrenSql = "select t1.*,t2.person_name as child_person_name from yltcharge.t_ext_pm_parent as t1 " +

@ -0,0 +1,12 @@
#namespace("CompanyUser")
-- 获取所有项目经理列表
#sql("getMasterPmList")
select t1.person_id,t2.person_name,t2.telephone from ds_db.t_person_duty_charge as t1
inner join ds_db.t_sys_loginperson as t2 on t1.person_id=t2.person_id
where t1.duties_id in
(select duties_id from ds_db.t_base_principalship_menu where menu_id in (select menu_id from ds_db.t_base_menu where menu_name = '企业用户管理'))
and t1.b_use=1
and t1.person_id not in (select child_person_id from yltcharge.t_ext_pm_parent)
order by t2.person_name
#end
#end

@ -0,0 +1,12 @@
#namespace("CompanyUser")
-- 获取所有项目经理列表
#sql("getMasterPmList")
select t1.person_id,t2.person_name,t2.telephone from ds_db.t_person_duty_charge as t1
inner join ds_db.t_sys_loginperson as t2 on t1.person_id=t2.person_id
where t1.duties_id in
(select duties_id from ds_db.t_base_principalship_menu where menu_id in (select menu_id from ds_db.t_base_menu where menu_name = '企业用户管理'))
and t1.b_use=1
and t1.person_id not in (select child_person_id from yltcharge.t_ext_pm_parent)
order by t2.person_name
#end
#end
Loading…
Cancel
Save