组织架构

This commit is contained in:
liuliang 2025-09-11 16:18:48 +08:00
parent 069d9c0e2d
commit 76ee35bdb4
5 changed files with 39 additions and 0 deletions

View File

@ -169,4 +169,19 @@ public class ChangeOrganzationController extends BaseCommonController {
return WeaResult.success(resultMap);
}
/**
* 获取同步部门token
* @return
*/
@WeaPermission(publicPermission = true)
@PostMapping("/getDepartmentTree")
@ResponseBody
public WeaResult<List<Map<String, Object>>> getDepartmentTree(@RequestParam Map<String, String> params){
Gson gson = new Gson();
log.error("*********getDepartmentTree********");
log.error(gson.toJson(params));
List<Map<String, Object>> resultList = organaztionService.getDepartmentTree(params);
return WeaResult.success(resultList);
}
}

View File

@ -6,4 +6,5 @@ import java.util.Map;
public interface AuthorizedStrengthService {
List<Map<String, Object>> getDepartmentAuthorizedStrength(Map<String,String> params);
}

View File

@ -27,5 +27,11 @@ public interface OrganaztionService {
Map<String,Object> getDepartmentChangeToken(Map<String, Object> params);
/**
* 获取原组织组织树变更
* @param params
* @return
*/
List<Map<String, Object>> getDepartmentTree(Map<String,String> params);
}

View File

@ -188,4 +188,5 @@ public class AuthorizedStrengthServiceImpl implements AuthorizedStrengthService
return resultList;
}
}

View File

@ -1,5 +1,6 @@
package com.weaver.seconddev.jcl.organization.service.impl;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.Gson;
import com.weaver.common.component.table.AbstractWeaTable;
@ -239,4 +240,19 @@ public class OrganaztionSeviceImpl implements OrganaztionService {
return resultMap;
}
@Override
public List<Map<String, Object>> getDepartmentTree(Map<String, String> params) {
String id = params.get("id");
String sql = "select zz id,sjzz parentId,zzmc content from uf_organization_zzsj where form_data_id=?";
List<Map<String, Object>> dataList = databaseUtils.getSqlList(sql,CommonUtils.getParamList(id));
for (Map<String, Object> map:dataList){
map.put("type","department");
map.put("leaf",true);
map.put("children", Lists.newArrayList());
map.put("dataStatus","exist");
}
return dataList;
}
}