|
|
|
@ -1903,11 +1903,13 @@ public class CollectController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 功能:获取天喻的所有单位列表
|
|
|
|
|
* http://10.10.21.20:9000/QingLong/collect/getTyAllBureau
|
|
|
|
|
* type_id: 1:已匹配,0:未匹配,-1:全部
|
|
|
|
|
*
|
|
|
|
|
* @throws InterruptedException
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
public void getTyAllBureau() throws InterruptedException {
|
|
|
|
|
@IsNumericInterface({"type_id"})
|
|
|
|
|
public void getTyAllBureau(int type_id) throws InterruptedException {
|
|
|
|
|
String KEY = "TY_BUREAU";
|
|
|
|
|
//从天喻获取所有单位名单
|
|
|
|
|
List<JSONObject> list = new ArrayList<>();
|
|
|
|
@ -1937,18 +1939,24 @@ public class CollectController extends Controller {
|
|
|
|
|
|
|
|
|
|
for (JSONObject jo : list) {
|
|
|
|
|
if (map.containsKey(jo.getString("org_id"))) {
|
|
|
|
|
String third_party_org_id=jo.getString("org_id");
|
|
|
|
|
Record record=map.get(third_party_org_id);
|
|
|
|
|
String third_party_org_id = jo.getString("org_id");
|
|
|
|
|
Record record = map.get(third_party_org_id);
|
|
|
|
|
jo.put("is_match", 1);
|
|
|
|
|
jo.put("match_org_id",record.getStr("org_id"));
|
|
|
|
|
jo.put("match_org_name",record.getStr("org_name"));
|
|
|
|
|
}
|
|
|
|
|
else jo.put("is_match", 0);
|
|
|
|
|
jo.put("match_org_id", record.getStr("org_id"));
|
|
|
|
|
jo.put("match_org_name", record.getStr("org_name"));
|
|
|
|
|
} else jo.put("is_match", 0);
|
|
|
|
|
}
|
|
|
|
|
SortClass sort = new SortClass();
|
|
|
|
|
Collections.sort(list, sort);
|
|
|
|
|
|
|
|
|
|
renderJson(list);
|
|
|
|
|
List<JSONObject> res = new ArrayList<>();
|
|
|
|
|
for (JSONObject jsonObject : list) {
|
|
|
|
|
int is_match = jsonObject.getInteger("is_match");
|
|
|
|
|
if (type_id == 1 && is_match == 1) res.add(jsonObject);
|
|
|
|
|
if (type_id == 0 && is_match == 0) res.add(jsonObject);
|
|
|
|
|
if (type_id == -1) res.add(jsonObject);
|
|
|
|
|
}
|
|
|
|
|
renderJson(res);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|