main
黄海 2 years ago
parent 6a77bcdaa7
commit 7f7fdf9268

@ -675,7 +675,8 @@ public class CollectController extends Controller {
*/
@Before({GET.class})
@IsLoginInterface({})
public void getJobList(String job_name, int page, int limit) throws ParseException {
@IsNumericInterface({"self_or_next"})
public void getJobList(String job_name, int self_or_next, int page, int limit) throws ParseException {
//操作人员
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");
//检查当前登录人员是不是发布任务的角色
@ -691,7 +692,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, job_name, page, limit);
Page<Record> list = cm.getJobList(bureau_id, publish_role_id, job_name,self_or_next, page, limit);
renderJson(CommonUtil.renderJsonForLayUI(list));
}
@ -1227,7 +1228,7 @@ public class CollectController extends Controller {
target_id = person_id;
}
//否则的话,就是传啥查啥,传单位查单位,传人查人
String json = cm.getFormFillJob(job_id, target_id,status_code);
String json = cm.getFormFillJob(job_id, target_id, status_code);
renderJson(json);
}

@ -745,11 +745,19 @@ public class CollectModel {
*
* @param job_name
*/
public Page<Record> getJobList(String bureau_id, int publish_role_id, String job_name, int page, int limit) throws ParseException {
public Page<Record> getJobList(String bureau_id, int publish_role_id, String job_name, int self_or_next, 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);
/**
1111,1211,2311 finish_count
1110,1111,1210,1211,2310,2311 total_count,
1120,1121,1122,2120,2121,2122 forward_count
1122,2122 forward_finish_count
*/
if (self_or_next == 1) kv.set("self", 1);
else kv.set("next", 2);
SqlPara sqlPara = Db.getSqlPara("Collect.getJobList", kv);

@ -2,10 +2,19 @@
-- 获取任务列表
#sql("getJobList")
select t1.*,
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1111,1211,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,1210,1211,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, --
#if(self)
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (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 (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 (0)) 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 (0)) as forward_finish_count, --
#end
#if(next)
(select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id and t2.status_code in (1111,1211,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,1210,1211,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, --
#end
(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
from t_collect_job as t1

Loading…
Cancel
Save