main
黄海 2 years ago
parent ec3e1b7c27
commit 70f37a212c

@ -45,7 +45,7 @@ truncate table t_collect_job restart identity;
truncate table t_collect_job_sheet restart identity; truncate table t_collect_job_sheet restart identity;
truncate table t_collect_job_sheet_col restart identity; truncate table t_collect_job_sheet_col restart identity;
truncate table t_collect_mapping restart identity; truncate table t_collect_mapping restart identity;
truncate table t_collect_job_bureau restart identity; truncate table t_collect_job_target restart identity;
truncate table t_collect_group restart identity; truncate table t_collect_group restart identity;
-- 删除所有以ds_job开头的表 -- 删除所有以ds_job开头的表

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -264,7 +264,7 @@ public class CollectModel {
* @return * @return
*/ */
public List<Record> getJobFill(int job_id) { public List<Record> getJobFill(int job_id) {
String sql = "select * from t_collect_job_bureau where job_id=?"; String sql = "select * from t_collect_job_target where job_id=?";
return Db.find(sql, job_id); return Db.find(sql, job_id);
} }
@ -677,7 +677,7 @@ public class CollectModel {
* @param upload_excel_filename_user * @param upload_excel_filename_user
*/ */
public void writeJobFinish(int job_id, String bureau_id, String upload_excel_filename_user) { public void writeJobFinish(int job_id, String bureau_id, String upload_excel_filename_user) {
String sql = "update t_collect_job_bureau set fill_time=now(),is_finish=1,upload_excel_filename_user=? where job_id=? and bureau_id=?"; String sql = "update t_collect_job_target set fill_time=now(),is_finish=1,upload_excel_filename_user=? where job_id=? and bureau_id=?";
Db.update(sql, upload_excel_filename_user, job_id, bureau_id); Db.update(sql, upload_excel_filename_user, job_id, bureau_id);
} }
@ -689,7 +689,7 @@ public class CollectModel {
* @return * @return
*/ */
public Record viewFilledJob(int job_id, String bureau_id) { public Record viewFilledJob(int job_id, String bureau_id) {
String sql = "select * from t_collect_job_bureau where job_id=? and bureau_id=?"; String sql = "select * from t_collect_job_target where job_id=? and bureau_id=?";
return Db.findFirst(sql, job_id, bureau_id); return Db.findFirst(sql, job_id, bureau_id);
} }
@ -842,7 +842,7 @@ public class CollectModel {
Date date = dateFormat.parse(deadline_time); Date date = dateFormat.parse(deadline_time);
String sql = "update t_collect_job set publish_time=now(),publish_state=1,deadline_time=? where job_id=?"; String sql = "update t_collect_job set publish_time=now(),publish_state=1,deadline_time=? where job_id=?";
Db.update(sql, date, job_id); Db.update(sql, date, job_id);
sql = "delete from t_collect_job_bureau where job_id=?"; sql = "delete from t_collect_job_target where job_id=?";
Db.update(sql, job_id); Db.update(sql, job_id);
//写任务分派表 //写任务分派表
List<Record> list = new ArrayList<>(); List<Record> list = new ArrayList<>();
@ -853,7 +853,7 @@ public class CollectModel {
record.set("is_finish", 0); record.set("is_finish", 0);
list.add(record); list.add(record);
} }
Db.batchSave("t_collect_job_bureau", list, 100); Db.batchSave("t_collect_job_target", list, 100);
} }
/** /**
@ -896,7 +896,7 @@ public class CollectModel {
sql = "delete from t_collect_job where job_id=?"; sql = "delete from t_collect_job where job_id=?";
Db.update(sql, job_id); Db.update(sql, job_id);
sql = "delete from t_collect_job_bureau where job_id=?"; sql = "delete from t_collect_job_target where job_id=?";
Db.update(sql, job_id); Db.update(sql, job_id);
sql = "delete from t_collect_job_sheet where job_id=?"; sql = "delete from t_collect_job_sheet where job_id=?";
@ -1174,11 +1174,15 @@ public class CollectModel {
record.set(key, v1); record.set(key, v1);
break; break;
case 2://数字 case 2://数字
int v2 = Integer.parseInt(entry.getValue().toString()); int v2;
if (StrKit.isBlank(entry.getValue().toString())) v2 = 0;
else v2 = Integer.parseInt(entry.getValue().toString());
record.set(key, v2); record.set(key, v2);
break; break;
case 3://小数 case 3://小数
double v3 = Double.parseDouble(entry.getValue().toString()); double v3;
if (StrKit.isBlank(entry.getValue().toString())) v3 = 0;
else v3 = Double.parseDouble(entry.getValue().toString());
record.set(key, v3); record.set(key, v3);
break; break;
case 4: //日期 case 4: //日期
@ -1191,7 +1195,7 @@ public class CollectModel {
} }
Db.save(table_name, "id", record); Db.save(table_name, "id", record);
//保存原始JSON数据 //保存原始JSON数据
sql = "update t_collect_job_bureau set form_fill_json=? where job_id=? and bureau_id=?"; sql = "update t_collect_job_target set form_fill_json=? where job_id=? and bureau_id=?";
Db.update(sql, json, job_id, bureau_id); Db.update(sql, json, job_id, bureau_id);
//保存多选结果 //保存多选结果
@ -1224,7 +1228,7 @@ public class CollectModel {
* @param bureau_id * @param bureau_id
*/ */
public String getFormFillJob(int job_id, String bureau_id) { public String getFormFillJob(int job_id, String bureau_id) {
String sql = "select form_fill_json from t_collect_job_bureau where bureau_id=? and job_id=?"; String sql = "select form_fill_json from t_collect_job_target where bureau_id=? and job_id=?";
return Db.findFirst(sql, bureau_id, job_id).getStr("form_fill_json"); return Db.findFirst(sql, bureau_id, job_id).getStr("form_fill_json");
} }

@ -2,8 +2,8 @@
-- 获取任务列表 -- 获取任务列表
#sql("getJobList") #sql("getJobList")
select t1.*, select t1.*,
(select count(1) from t_collect_job_bureau as t2 where t2.job_id=t1.job_id 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.is_finish=1) as finish_count,
(select count(1) from t_collect_job_bureau as t2 where t2.job_id=t1.job_id ) as total_count, (select count(1) from t_collect_job_target as t2 where t2.job_id=t1.job_id ) as total_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 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_sheet as t2 where t2.job_id=t1.job_id) as all_sheet
from t_collect_job as t1 where publish_role_id = #para(publish_role_id) from t_collect_job as t1 where publish_role_id = #para(publish_role_id)
@ -36,7 +36,7 @@
#end #end
-- 任务列表 -- 任务列表
#sql("viewJobList") #sql("viewJobList")
select t1.*,t2.is_finish from t_collect_job as t1 inner join t_collect_job_bureau as t2 on t1.job_id=t2.job_id select t1.*,t2.is_finish from t_collect_job as t1 inner join t_collect_job_target as t2 on t1.job_id=t2.job_id
where t2.bureau_id = #para(bureau_id) where t2.bureau_id = #para(bureau_id)
#if(is_finish) #if(is_finish)
and t2.is_finish= #para(is_finish) and t2.is_finish= #para(is_finish)
@ -52,7 +52,7 @@
t3.person_name as person_name, t3.person_name as person_name,
t3.telephone as telephone, t3.telephone as telephone,
t3.email as email t3.email as email
from t_collect_job_bureau as t1 from t_collect_job_target as t1
inner join t_base_organization as t2 on t1.bureau_id=t2.org_id inner join t_base_organization as t2 on t1.bureau_id=t2.org_id
left join v_collect_xbgs as t3 on t1.bureau_id=t3.bureau_id left join v_collect_xbgs as t3 on t1.bureau_id=t3.bureau_id
where t1.job_id=#para(job_id) where t1.job_id=#para(job_id)

Loading…
Cancel
Save