Compare commits

...

3 Commits

Author SHA1 Message Date
黄海 3baaeb8117 'commit'
3 years ago
黄海 3f8139589e 'commit'
3 years ago
黄海 0377c29acd 'commit'
3 years ago

@ -24,7 +24,7 @@ public class OrganizationModel {
* @return
*/
public Record getOrgInfo(String org_id) {
String sql = "select t1.org_id,t1.org_name,t1.parent_id,(select count(1) from t_base_organization as t2 where t1.org_id=t2.parent_id) as cnt from t_base_organization as t1 where t1.org_id=?";
String sql = "select t1.org_id,t1.org_name,t1.school_type_id,t1.department_type_id,t1.parent_id,(select count(1) from t_base_organization as t2 where t1.org_id=t2.parent_id) as cnt from t_base_organization as t1 where t1.org_id=?";
return Db.findFirst(sql, org_id);
}
@ -522,7 +522,11 @@ public class OrganizationModel {
*/
public List<Record> getOrgTreeByBureauId(String bureau_id) {
String sql = Db.getSql("organization.getOrgTreeByBureauId");
return Db.find(sql, bureau_id);
List<Record> list = Db.find(sql, bureau_id);
Record r = getOrgInfo(bureau_id);
String school_type_id = r.getStr("school_type_id");
for (Record record : list) record.set("school_type_id", school_type_id);
return list;
}
/**

@ -84,7 +84,15 @@
-- 组织机构部门树
#sql("getOrgTreeByBureauId")
<<<<<<< HEAD
<<<<<<< HEAD
select org_id,org_name,(case when bureau_id=org_id then '-1' else parent_id end) as parent_id,bureau_id,school_type_id,department_type_id from t_base_organization where bureau_id=?
=======
select org_id,org_name,(case when bureau_id=org_id then '-1' else parent_id end) as parent_id,bureau_id,department_type_id from t_base_organization where bureau_id=?
>>>>>>> 32b4533146dc66248f1e7fdf81fe41bff017b94c
=======
select org_id,org_name,(case when bureau_id=org_id then '-1' else parent_id end) as parent_id,bureau_id,school_type_id,department_type_id from t_base_organization where bureau_id=?
>>>>>>> c1b567521dc3952024a8dff25a3cd953d8e7ce2a
and b_use=1 order by sort_id,update_ts
#end

Loading…
Cancel
Save