main
黄海 2 years ago
parent 12a87ba416
commit d0138ce7e5

@ -30,4 +30,12 @@ t_importexcel_role_map
truncate table t_collect_job restart identity;
truncate table t_collect_job_sheet 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;
# 处理序列
-- 查看所有序列
SELECT relname,pg_sequence_last_value(relname ::text) AS seq_last_value FROM pg_class
WHERE relkind = 'S' AND relowner = (SELECT usesysid FROM pg_user WHERE usename = (SELECT CURRENT_USER));
-- 修改序列名称
ALTER SEQUENCE t_importexcel_process_id_seq RENAME TO t_collect_process_id_seq;

@ -199,7 +199,11 @@ public class CollectController extends Controller {
@Before({POST.class})
@IsLoginInterface({})
public void checkSheet(int job_id, int sheet_index) {
cm.checkSheet(job_id,sheet_index);
Map map = new HashMap();
map.put("success", true);
map.put("message", "保存成功!");
renderJson(map);
}
/**

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateTime;
import com.dsideal.QingLong.Interceptor.IsLoginInterface;
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.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
@ -148,4 +149,15 @@ public class CollectModel {
Db.batchSave("t_collect_job_sheet_col", writeList, 100);
}
/**
* job_id+sheet_index
*
* @param job_id
* @param sheet_index
*/
public void checkSheet(int job_id, int sheet_index) {
String sql = "update t_collect_job_sheet set is_check=1,check_time=? where job_id=? and sheet_index=?";
Db.update(sql, DateTime.now(), job_id, sheet_index);
}
}
Loading…
Cancel
Save