main
黄海 2 years ago
parent 94005f5775
commit 80148ce929

@ -708,11 +708,20 @@ public class CollectController extends Controller {
@Before({GET.class})
@IsLoginInterface({})
public void isExistXianQuJiaoYuJu(String bureauIds, String groupIds) {
if (StrKit.isBlank(bureauIds) && StrKit.isBlank(groupIds)) {
Map<String, Object> map = new HashMap<>();
map.put("success", false);
map.put("message", "bureauIds与groupIds同时为空需要前端判断进行拦截");
renderJson(map);
return;
}
List<Record> list = cm.getXianQuJiaoYuJu(bureauIds, groupIds);
boolean exist = list.size() > 0;
boolean exist = false;
if(list!=null && list.size() > 0) exist=true;
Map<String, Object> map = new HashMap<>();
map.put("success", true);
map.put("exist", exist);
map.put("list",list);
if (exist) map.put("message", "存在县区教育局!");
else map.put("message", "不存在县区教育局!");
renderJson(map);
@ -1045,7 +1054,7 @@ public class CollectController extends Controller {
}
//通过检查
int job_id = cm.addFormJob(bureau_id,person_id, publish_role_id, job_name, table_name, json);
int job_id = cm.addFormJob(bureau_id, person_id, publish_role_id, job_name, table_name, json);
Map<String, Object> map = new HashMap<>();
map.put("success", true);
map.put("message", "保存成功!");
@ -1458,7 +1467,7 @@ public class CollectController extends Controller {
String bureau_id = rs.get("bureau_id");
//转发任务
int child_job_id = cm.ForwardJob(job_id, deadline_time, allSchool, allJiaoFu, bureauIds, groupIds, bureau_id,person_id);
int child_job_id = cm.ForwardJob(job_id, deadline_time, allSchool, allJiaoFu, bureauIds, groupIds, bureau_id, person_id);
//返回
Map<String, Object> map = new HashMap<>();
map.put("success", true);

@ -1316,6 +1316,7 @@ public class CollectModel {
*/
public List<Record> getGroup(int group_id) {
Record record = Db.findById("t_collect_group", "group_id", group_id);
if (record == null) return null;
String bureauIds = record.getStr("bureauIds");
List<String> idList = new ArrayList<>();
@ -1481,6 +1482,7 @@ public class CollectModel {
if (!StrKit.isBlank(groupIds)) {
for (String group_id : groupIds.split(",")) {
List<Record> list = getGroup(Integer.parseInt(group_id));
if (list == null) continue;
for (Record record : list) {
bureauSet.add(record.getStr("bureau_id"));
}
@ -1489,10 +1491,14 @@ public class CollectModel {
//检查这些单位ID是不是有县区教育局
List<String> idList = new ArrayList<>();
for (String s : bureauSet) idList.add(s);
Kv kv = Kv.by("idList", idList);
SqlPara sqlPara = Db.getSqlPara("Collect.getXianQuJiaoYuJu", kv);
List<Record> list = Db.find(sqlPara);
return list;
if (idList.size() > 0) {
Kv kv = Kv.by("idList", idList);
SqlPara sqlPara = Db.getSqlPara("Collect.getXianQuJiaoYuJu", kv);
List<Record> list = Db.find(sqlPara);
return list;
}
return null;
}
/**

@ -90,6 +90,6 @@
#end
-- 给定的单位列表中,有多少个县区教育局
#sql("getXianQuJiaoYuJu")
select * from t_base_organization where org_type=11 and org_id in #para(idList, "in")
select * from t_base_organization where org_type_id=11 and org_id in #para(idList, "in")
#end
#end

Loading…
Cancel
Save