|
|
|
@ -259,29 +259,31 @@ public class DlAllDataService {
|
|
|
|
|
String dataStr = obj.getStr("data");
|
|
|
|
|
if (StrUtil.isNotBlank(dataStr)) {
|
|
|
|
|
RelaySyncDto bean = JSONUtil.toBean(dataStr, RelaySyncDto.class);
|
|
|
|
|
// 将数据写入文件
|
|
|
|
|
try {
|
|
|
|
|
this.writeFile(bean.getFilePath(), bean.getFileContent());
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
log.error("从UDI自助平台拉取基础数据 文件写入异常----{}", e.getMessage());
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isNotBlank(bean.getTaskId())) {
|
|
|
|
|
// 将数据写入文件
|
|
|
|
|
try {
|
|
|
|
|
this.writeFile(bean.getFilePath(), bean.getFileContent());
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
log.error("从UDI自助平台拉取基础数据 文件写入异常----{}", e.getMessage());
|
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BasicExportStatusEntity exportStatusEntity = BasicExportStatusEntity.builder()
|
|
|
|
|
.id(bean.getTaskId())
|
|
|
|
|
.taskId(bean.getTaskId())
|
|
|
|
|
.status(BasicExportStatusEnum.WAIT_SYNC.getCode())
|
|
|
|
|
.type(exportType.getRemark())
|
|
|
|
|
.transportType(1)
|
|
|
|
|
.scheduleType(0)
|
|
|
|
|
.fromType(1)
|
|
|
|
|
.startTime(DateUtil.getDateTime())
|
|
|
|
|
.updateTime(new Date())
|
|
|
|
|
.cacheFilePath(bean.getFilePath())
|
|
|
|
|
.build();
|
|
|
|
|
basicExportService.insertExportStatus(exportStatusEntity);
|
|
|
|
|
//通知自助平台任务已完成
|
|
|
|
|
spGetHttp.finishTask(bean.getTaskId());
|
|
|
|
|
BasicExportStatusEntity exportStatusEntity = BasicExportStatusEntity.builder()
|
|
|
|
|
.id(bean.getTaskId())
|
|
|
|
|
.taskId(bean.getTaskId())
|
|
|
|
|
.status(BasicExportStatusEnum.WAIT_SYNC.getCode())
|
|
|
|
|
.type(exportType.getRemark())
|
|
|
|
|
.transportType(1)
|
|
|
|
|
.scheduleType(0)
|
|
|
|
|
.fromType(1)
|
|
|
|
|
.startTime(DateUtil.getDateTime())
|
|
|
|
|
.updateTime(new Date())
|
|
|
|
|
.cacheFilePath(bean.getFilePath())
|
|
|
|
|
.build();
|
|
|
|
|
basicExportService.insertExportStatus(exportStatusEntity);
|
|
|
|
|
//通知自助平台任务已完成
|
|
|
|
|
spGetHttp.finishTask(bean.getTaskId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|