|
|
|
@ -42,30 +42,26 @@ public class DlUploadService {
|
|
|
|
|
|
|
|
|
|
//定时从上游下载数据----下载基础信息
|
|
|
|
|
public void dlBasicUdiInfo() {
|
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("dl_basic_udiinfo_status");
|
|
|
|
|
long timeInterval = Long.parseLong(systemParamConfigEntity.getParamValue()) * 60 * 1000;
|
|
|
|
|
long curTime = System.currentTimeMillis();
|
|
|
|
|
Long lastTime = (Long) redisUtil.get("DL_BASIC_UDIINFO_STATUS");
|
|
|
|
|
dlBasicService.dlAllData();
|
|
|
|
|
dlBasicService.dlAllBus();
|
|
|
|
|
dlBasicService.dlAllOrder();
|
|
|
|
|
dlBasicService.dlScheduleStatus();
|
|
|
|
|
dlBasicService.dlAllUDI();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// try {
|
|
|
|
|
// logger.error("--------执行下载操作");
|
|
|
|
|
// Thread.sleep(15 * 1000);
|
|
|
|
|
// } catch (InterruptedException e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// logger.error("--------下载失败");
|
|
|
|
|
// SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("dl_basic_udiinfo_status");
|
|
|
|
|
// long timeInterval = Long.parseLong(systemParamConfigEntity.getParamValue()) * 60 * 1000;
|
|
|
|
|
// long curTime = System.currentTimeMillis();
|
|
|
|
|
// Long lastTime = (Long) redisUtil.get("DL_BASIC_UDIINFO_STATUS");
|
|
|
|
|
// if (lastTime == null) {
|
|
|
|
|
// lastTime = System.currentTimeMillis();
|
|
|
|
|
// redisUtil.set("DL_BASIC_UDIINFO_STATUS", lastTime);
|
|
|
|
|
// } else if (curTime - lastTime > timeInterval) {
|
|
|
|
|
// logger.info("每分钟执行一次基础信息下载");
|
|
|
|
|
// redisUtil.set("DL_BASIC_UDIINFO_STATUS", curTime);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
if (lastTime == null) {
|
|
|
|
|
lastTime = System.currentTimeMillis();
|
|
|
|
|
redisUtil.set("DL_BASIC_UDIINFO_STATUS", lastTime);
|
|
|
|
|
} else if (curTime - lastTime > timeInterval) {
|
|
|
|
|
logger.info("每分钟执行一次基础信息下载");
|
|
|
|
|
redisUtil.set("DL_BASIC_UDIINFO_STATUS", curTime);
|
|
|
|
|
dlBasicService.dlAllData();
|
|
|
|
|
dlBasicService.dlAllBus();
|
|
|
|
|
dlBasicService.dlAllOrder();
|
|
|
|
|
dlBasicService.dlScheduleStatus();
|
|
|
|
|
dlBasicService.dlAllUDI();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|