main
黄海 2 years ago
parent b5b7fba5d7
commit 298ea222d9

@ -1903,6 +1903,7 @@ public class CollectController extends Controller {
/**
*
* http://10.10.21.20:9000/QingLong/collect/getTyAllBureau
*
* @throws InterruptedException
*/
@Before({GET.class, RepeatIntercetpor.class})
@ -1931,9 +1932,22 @@ public class CollectController extends Controller {
for (int i = 0; i < ja.size(); i++) list.add(ja.getJSONObject(i));
}
//resultA是拼装好的List集合
SortClass sort = new SortClass();
Collections.sort(list, sort);
//我们系统中的所有单位
Map<String, Record> map = cm.getAllMatchBureau();
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);
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);
}
renderJson(list);
}
}

@ -2544,4 +2544,24 @@ public class CollectModel {
String sql = "select duties_id from t_person_duty_charge where person_id=? and duties_id in (select distinct publish_role_id from t_collect_role_map where receive_role_id>0)";
return Db.find(sql, person_id).size() > 0;
}
/**
*
*
* @return
*/
public Map<String, Record> getAllMatchBureau() {
GlobalModel gm = new GlobalModel();
String city_id = gm.getGlobalValueByKey("install_area");
String sql = "select org_id,org_name,third_party_id from t_base_organization where city_id=? and bureau_id=org_id";
List<Record> list = Db.find(sql, city_id);
Map<String, Record> _map = new HashMap<>();
for (Record record : list) {
String third_party_id = record.getStr("third_party_id");
if (StrKit.isBlank(third_party_id)) continue;
_map.put(third_party_id, record);
}
return _map;
}
}
Loading…
Cancel
Save