main
黄海 2 years ago
parent cbf75fa50a
commit 17e43d61e9

@ -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<>();
@ -1942,13 +1944,19 @@ public class CollectController extends Controller {
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);
} 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);
}
}

Loading…
Cancel
Save