main
黄海 10 months ago
parent 4ca95e2ef4
commit b0cebbecb3

@ -1,4 +1,4 @@
(一中)老师 yizhong Y8z3BFS
(装备中心)董建华 djh 123456
(专家)明守刚 mingshougang JLyBn20
(专家)黄海 huanghai 227687
(监理)长春弘扬建设监理有限公司 jianli w9f2AqC

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 MiB

@ -41,6 +41,7 @@ public class FillSubject {
public static HashMap<String, String> _subjectTypeMap = new HashMap<>();
//根据单位名称获取单位代码
public static HashMap<String, String> _schoolCodeMap = new HashMap<>();
/**
* HashSet
*
@ -209,7 +210,7 @@ public class FillSubject {
}
//只有t_pro_task这张表落盘其它两张表不落盘
if (writeList.size() > 0) {
if (!writeList.isEmpty()) {
CommonUtil.log("表:" + table_name + "数据条数:" + writeList.size());
//清表
PgSqlUtil.Truncate(table_name);
@ -301,6 +302,13 @@ public class FillSubject {
if (finish_scan == 0) {
c1 = c1 + 1;
CommonUtil.log("成功插入表t_gtzz_subject" + c1 + "条记录!");
String install_area="064BB3C9-E8DB-45ED-B0C1-6ABC5EA3B667";//长春市
//新增加的项目数据需要根据全局变量ZhuanJiaCheck=1还是ZhuanJiaCheck=0来决定是不是生成这个项目的评审专家和专家组组长
sql = "select global_value from t_base_global where install_area=? and global_code=?";
String global_value=Db.findFirst(sql, install_area, "ZhuanJiaCheck").getStr("global_value");
if(global_value.equals("1")){
//subject_id
}
} else {
c2 = c2 + 1;
CommonUtil.log("成功更新表t_gtzz_subject" + c2 + "条记录!");
@ -359,6 +367,17 @@ public class FillSubject {
gm.delTjCache();
}
public static void syncSubject() throws URISyntaxException, IOException {
//初始化
init();
//将财务审批的数据全部导入到数据库的表中
loadJson();
//对导入的数据进行处理
syncData();
CommonUtil.log("恭喜,所有操作成功完成!");
}
public static void main(String[] args) throws URISyntaxException, IOException {
//告之配置文件位置
PropKit.use("application.properties");
@ -378,14 +397,6 @@ public class FillSubject {
//启动redis组件
redis.start();
//初始化
init();
//将财务审批的数据全部导入到数据库的表中
loadJson();
//对导入的数据进行处理
syncData();
CommonUtil.log("恭喜,所有操作成功完成!");
syncSubject();
}
}

@ -0,0 +1,16 @@
package com.dsideal.QingLong.Cron4j;
import com.jfinal.plugin.cron4j.ITask;
import lombok.SneakyThrows;
public class FillSubjectTask implements ITask {
@SneakyThrows
public void run() {
// 这里放被执行的调试任务代码
Tools.FillSubject.syncSubject();
}
public void stop() {
// 这里的代码会在 task 被关闭前调用
}
}

@ -85,8 +85,10 @@ public class GlobalModel {
* 2018-11-21
*/
public void addGlobal(String global_type_id, String global_code, String global_value, String global_name, int sort_id) {
String sql = Db.getSql("global.addGlobal");
Db.update(sql, Integer.parseInt(global_type_id), global_code, global_value, global_name, sort_id);
String sql = "select max(global_id) from t_base_global";
int global_id = Db.queryInt(sql) + 1;
sql = Db.getSql("global.addGlobal");
Db.update(sql, global_id,Integer.parseInt(global_type_id), global_code, global_value, global_name, sort_id);
}
/**

@ -36,6 +36,7 @@ import com.jfinal.kit.PropKit;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.activerecord.dialect.PostgreSqlDialect;
import com.jfinal.plugin.cron4j.Cron4jPlugin;
import com.jfinal.plugin.hikaricp.HikariCpPlugin;
import com.jfinal.plugin.redis.RedisPlugin;
import com.jfinal.server.undertow.UndertowServer;
@ -175,6 +176,8 @@ public class Start extends JFinalConfig {
RedisPlugin pika = new RedisPlugin("Pika", PropKit.get("pika_ip"), PropKit.getInt("pika_port"), 10000);
me.add(pika);
}
//加载定时器
me.add(new Cron4jPlugin(PropKit.use("cron4j.properties")));
}
/**

@ -8,12 +8,13 @@
-- 获取所有分类
#sql("getGlobalList")
select global_id,global_type_id,global_code,global_value,global_name,sort_id from t_base_global where global_id=1 or install_area=#para(install_area) order by sort_id
select global_id,global_type_id,global_code,global_value,global_name,sort_id from t_base_global
where global_id=1 or install_area=#para(install_area) order by sort_id
#end
-- 增加一个全局变量设置
#sql("addGlobal")
insert into t_base_global(global_type_id,global_code,global_value,global_name,sort_id) values(?,?,?,?,?)
insert into t_base_global(global_id,global_type_id,global_code,global_value,global_name,sort_id) values(?,?,?,?,?,?)
#end
-- 修改一个全局变量设置

@ -7,12 +7,12 @@
# 星号 *:表示每一个时间点,例如 * * * * * 表示每分钟执行
# 除号 /:表示指定一个值的增加幅度。例如 n/m表示从 n 开始,每次增加 m 的时间点执行
# cron4j 集成cron 只有 分 时 天 月 周 没有秒
cron4j=clearRubbish
# 每天凌晨2点执行一次
clearRubbish.cron=0 2 * * *
clearRubbish.class=com.dsideal.QingLong.clearRubbish.clearRubbishAction
clearRubbish.daemon=true
clearRubbish.enable=true
cron4j=syncSubject
# 每天凌晨0点执行一次
syncSubject.cron=0 0 * * *
syncSubject.class=com.dsideal.QingLong.Cron4j.FillSubjectTask
syncSubject.daemon=true
syncSubject.enable=true

@ -9,4 +9,6 @@ t_gtzz_subject_jianli
t_gtzz_subject_zhuanjia
t_gtzz_yanshou
t_gtzz_sync_log
t_gtzz_ys
t_gtzz_ys
t_gtzz_ys_subject
t_gtzz_ys_expert
Loading…
Cancel
Save