main
黄海 2 years ago
parent 2094bb7110
commit aeda3f4c88

@ -1776,6 +1776,18 @@ public class CollectModel {
return Db.findFirst(sql, file_id);
}
/**
*
*
* @param job_id
* @param target_id
* @return
*/
public Record getJobTarget(int job_id, String target_id) {
String sql = "select * from t_collect_target where job_id=? and target_id=?";
return Db.findFirst(sql, job_id, target_id);
}
/**
*
* 268
@ -1914,16 +1926,14 @@ public class CollectModel {
sql = "update t_collect_job set publish_time=now(),publish_state=1,deadline_time=? where job_id=?";
Db.update(sql, dateFormat.parse(deadline_time), child_job_id);
sql = "delete from t_collect_job_target where job_id=?";
Db.update(sql, child_job_id);
//写任务分派表
List<Record> list = new ArrayList<>();
int fill_type_id = 1;
if (forPerson) fill_type_id = 1;//到人,肯定是填报
else {
int fill_type_id;
if (forPerson) {
fill_type_id = 1;//到人,肯定是填报
} else {
//否则继承原来的fill_type_id
sql = "select * from t_collect_target where job_id=? and target_id=?";
fill_type_id = Db.findFirst(sql, job_id, bureau_id).getInt("fill_type_id");
fill_type_id = getJobTarget(job_id, bureau_id).getInt("fill_type_id");
}
for (String s : targetSet) {
Record record = new Record();
@ -1982,17 +1992,19 @@ public class CollectModel {
*/
public void setForwardFinish(int job_id, String bureau_id) {
/**
*
*
*
*/
String sql = "select target_type_id from t_collect_job_target where job_id=? and bureau_id=?";
int target_type_id = Db.findFirst(sql, job_id, bureau_id).getInt("target_type_id");
String updateColumnName = "forward_progress_xiaji";
if (target_type_id == 1) {
sql = "update t_collect_job_target set forward_progress_xiaji=2,forward_finish_time=now() where job_id=? and target_id=?";
Db.update(sql, job_id, bureau_id);
updateColumnName = "forward_progress_xiaji";
} else if (target_type_id == 2) {
sql = "update t_collect_job_target set forward_progress_bendanwei=2,forward_finish_time=now() where job_id=? and target_id=?";
Db.update(sql, job_id, bureau_id);
updateColumnName = "forward_progress_bendanwei";
}
sql = "update t_collect_job_target set " + updateColumnName + "=2,forward_finish_time=now() where job_id=? and target_id=?";
Db.update(sql, job_id, bureau_id);
}
/**

Loading…
Cancel
Save