|
|
|
@ -3,11 +3,14 @@ package com.dsideal.QingLong.Collect.Model;
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
|
import com.dsideal.QingLong.Collect.Const.DataTypeConst;
|
|
|
|
|
import com.dsideal.QingLong.Interceptor.EmptyInterface;
|
|
|
|
|
import com.dsideal.QingLong.Interceptor.IsLoginInterface;
|
|
|
|
|
import com.dsideal.QingLong.Interceptor.IsNumericInterface;
|
|
|
|
|
import com.dsideal.QingLong.Util.ChineseCharacterUtil;
|
|
|
|
|
import com.dsideal.QingLong.Util.CommonUtil;
|
|
|
|
|
import com.jfinal.aop.Before;
|
|
|
|
|
import com.jfinal.ext.interceptor.GET;
|
|
|
|
|
import com.jfinal.ext.interceptor.POST;
|
|
|
|
|
import com.jfinal.kit.Kv;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
|
@ -1024,4 +1027,49 @@ public class CollectModel {
|
|
|
|
|
}
|
|
|
|
|
Db.batchSave("t_collect_job_bureau", list, 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:重命名任务
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
* @param job_name
|
|
|
|
|
*/
|
|
|
|
|
public void renameJob(int job_id, String job_name) {
|
|
|
|
|
String sql = "update t_collect_job set job_name=? where job_id=?";
|
|
|
|
|
Db.update(sql, job_name, job_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:删除任务
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
*/
|
|
|
|
|
public void delJob(int job_id) {
|
|
|
|
|
String sql = "delete from t_collect_job where job_id=?";
|
|
|
|
|
Db.update(sql, job_id);
|
|
|
|
|
sql = "delete from t_collect_job_bureau where job_id=?";
|
|
|
|
|
Db.update(sql, job_id);
|
|
|
|
|
|
|
|
|
|
sql = "delete from t_collect_job_sheet where job_id=?";
|
|
|
|
|
Db.update(sql, job_id);
|
|
|
|
|
|
|
|
|
|
sql = "delete from t_collect_job_sheet_col where job_id=?";
|
|
|
|
|
Db.update(sql, job_id);
|
|
|
|
|
|
|
|
|
|
sql = "delete from t_collect_mapping where job_id=?";
|
|
|
|
|
Db.update(sql, job_id);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:延期任务
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
*/
|
|
|
|
|
public void extensionJob(int job_id, String deadline_time) throws ParseException {
|
|
|
|
|
String sql = "update t_collect_job set deadline_time=? where job_id=?";
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
Date date = dateFormat.parse(deadline_time);
|
|
|
|
|
Db.update(sql, date, job_id);
|
|
|
|
|
}
|
|
|
|
|
}
|