同步设置--其他数据

master
wj 2 years ago
parent d946ab1b47
commit 9bffff5f6f

@ -443,7 +443,7 @@ public class SpsSyncDownloadService {
return true; return true;
} }
try { try {
String fileFullPath = writeFile(filePath, BasicExportTypeEnum.BASIC_DATA.getRemark(), JsonUtils.toJsonString(jsonMap)); String fileFullPath = writeFile(filePath, BasicExportTypeEnum.OTHER_DATA.getRemark(), JsonUtils.toJsonString(jsonMap));
//计算总数 //计算总数
int total = 0; int total = 0;
for (List l : jsonMap.values()) { for (List l : jsonMap.values()) {
@ -455,21 +455,21 @@ public class SpsSyncDownloadService {
.set(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_SYNC.getCode()) .set(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_SYNC.getCode())
.set(BasicExportStatusEntity::getUpdateTime, new Date()) .set(BasicExportStatusEntity::getUpdateTime, new Date())
.set(BasicExportStatusEntity::getCacheFilePath, fileFullPath) .set(BasicExportStatusEntity::getCacheFilePath, fileFullPath)
.set(BasicExportStatusEntity::getRemark, String.format("%s: %s条", BasicExportTypeEnum.BASIC_DATA.getRemark(), total)) .set(BasicExportStatusEntity::getRemark, String.format("%s: %s条", BasicExportTypeEnum.OTHER_DATA.getRemark(), total))
.eq(BasicExportStatusEntity::getType, BasicExportTypeEnum.BASIC_DATA.getRemark()) .eq(BasicExportStatusEntity::getType, BasicExportTypeEnum.OTHER_DATA.getRemark())
.eq(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_BUILT.getCode()) .eq(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_BUILT.getCode())
.isNull(BasicExportStatusEntity::getCacheFilePath) .isNull(BasicExportStatusEntity::getCacheFilePath)
); );
} catch (Exception e) { } catch (Exception e) {
// 异常回滚 // 异常回滚
this.exportTimeRollback(totalTimeMap, BasicExportTypeEnum.BASIC_DATA, fileFullPath); this.exportTimeRollback(totalTimeMap, BasicExportTypeEnum.OTHER_DATA, fileFullPath);
} }
return true; return true;
} catch (IOException e) { } catch (IOException e) {
logger.error(String.format("syncIdcSps----process------------生成[%s]文件及更改库操作异常,异常信息<%s>" logger.error(String.format("syncIdcSps----process------------生成[%s]文件及更改库操作异常,异常信息<%s>"
, BasicExportTypeEnum.BASIC_DATA.getRemark(), e.getMessage())); , BasicExportTypeEnum.OTHER_DATA.getRemark(), e.getMessage()));
// 异常回滚 // 异常回滚
this.exportTimeRollback(totalTimeMap, BasicExportTypeEnum.BASIC_DATA, null); this.exportTimeRollback(totalTimeMap, BasicExportTypeEnum.OTHER_DATA, null);
} }
} }
return false; return false;

Loading…
Cancel
Save