main
黄海 2 years ago
parent b985f63117
commit af861c8520

@ -31,4 +31,4 @@ http://10.10.21.20:9000/QingLong/collect/viewJobList?page=1&limit=12&keyword=&is
(1) 发布对象是人 target_type_id=2
(2) 这个任务是市装备中心丁老师发给我的, job_id 是丁老师给定义的,我转发的还没有进行,还没有进行转发给我单位的人员
(3) fill_type_id 基于 job_id+target_id比如丁老师要求只转不发 fill_type_id=1

@ -664,20 +664,10 @@ public class CollectController extends Controller {
/**
*
*
* @param self_or_next :1,:2
*/
@Before({GET.class})
@IsLoginInterface({})
@IsNumericInterface({"self_or_next"})
public void getJobList(String job_name, int self_or_next, int page, int limit) throws ParseException {
if (self_or_next != 1 && self_or_next != 2) {
Map<String, Object> map = new HashMap<>();
map.put("success", false);
map.put("message", "self_or_next只能是1或者2参数传入错误!");
renderJson(map);
return;
}
public void getJobList(String job_name, int page, int limit) throws ParseException {
//操作人员
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");
//检查当前登录人员是不是发布任务的角色
@ -693,7 +683,7 @@ public class CollectController extends Controller {
//获取登录人员第一个发布任务的角色是什么
int publish_role_id = kvCheck.getInt("publish_role_id");
Page<Record> list = cm.getJobList(bureau_id, publish_role_id, self_or_next, job_name, page, limit);
Page<Record> list = cm.getJobList(bureau_id, publish_role_id, job_name, page, limit);
renderJson(CommonUtil.renderJsonForLayUI(list));
}

@ -736,14 +736,12 @@ public class CollectModel {
*
*
* @param job_name
* @param self_or_next :1,:2
*/
public Page<Record> getJobList(String bureau_id, int publish_role_id, int self_or_next, String job_name, int page, int limit) throws ParseException {
public Page<Record> getJobList(String bureau_id, int publish_role_id, String job_name, int page, int limit) throws ParseException {
Kv kv = Kv.create();
kv.set("bureau_id", bureau_id);
kv.set("publish_role_id", publish_role_id);
if (!StrKit.isBlank(job_name)) kv.set("job_name", job_name);
kv.set("self_or_next", self_or_next);
SqlPara sqlPara = Db.getSqlPara("Collect.getJobList", kv);

@ -2,19 +2,17 @@
-- 获取任务列表
#sql("getJobList")
select t1.*,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.fill_type_id in (1,3) and t2.is_finish=1) as finish_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.fill_type_id in (1,3)) as total_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1111,2311)) as finish_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1110,1111,2310,2311)) as total_count,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1120,1121,1122,2120,2121,2122)) as forward_count, --
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1122,2122)) as forward_finish_count, --
(select count(1) from t_collect_job_sheet as t2 where t2.job_id=t1.job_id and t2.is_check=1) as already_check_sheet,
(select count(1) from t_collect_job_sheet as t2 where t2.job_id=t1.job_id) as all_sheet,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.fill_type_id in (2,3)) as forward_count, --
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and
((t2.forward_progress_xiaji=2) or(t2.forward_progress_bendanwei=2))) as forward_finish_count --
(select count(1) from t_collect_job_sheet as t2 where t2.job_id=t1.job_id) as all_sheet
from t_collect_job as t1
where t1.publish_role_id = #para(publish_role_id) and t1.parent_id=-1 and t1.bureau_id=#para(bureau_id)
where t1.publish_role_id = #para(publish_role_id) and t1.bureau_id=#para(bureau_id)
#if(job_name)
and t1.job_name like #para(job_name, "like")
#end
and self_or_next=#para(self_or_next)
order by t1.job_id desc
#end

Loading…
Cancel
Save