手动同步调整

pro
wj 2 years ago
parent 907d19d0d1
commit 9f436e8aa6

@ -117,10 +117,12 @@ public class SpsSyncDownloadController {
@AuthRuleAnnotation("")
@GetMapping("sps/sync/order")
public BaseResponse getOrder(SpsSyncDataRequest spsSyncDataRequest) {
BaseResponse<SpsSyncOrderResponse> baseResponse = spsSyncDownloadService.findOrder(spsSyncDataRequest);
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findByData(ConstantStatus.SYNC_SCAN_ORDER, 3);
String logs = "";
if (basicExportStatusEntity != null&&StrUtil.isBlank(basicExportStatusEntity.getCacheFilePath())) {
BaseResponse<SpsSyncOrderResponse> baseResponse = new BaseResponse<>();
if (basicExportStatusEntity != null) {
if (StrUtil.isBlank(basicExportStatusEntity.getCacheFilePath())) {
baseResponse = spsSyncDownloadService.findOrder(spsSyncDataRequest);
String fileFullPath = null;
try {
fileFullPath = writeFile(filePrefix, BasicProcessStatus.NEW_ALL_BUS_ORDER, JSONUtil.toJsonStr(baseResponse.getData()));
@ -130,6 +132,10 @@ public class SpsSyncDownloadController {
basicExportStatusEntity.setCacheFilePath(fileFullPath);
basicExportStatusEntity.setRemark(baseResponse.getData().getSyncRemark());
basicExportService.updateExportStatus(basicExportStatusEntity);
} else {
String content = readDataFile(basicExportStatusEntity.getCacheFilePath());
baseResponse.setData(JSONUtil.toBean(content, SpsSyncOrderResponse.class));
}
SpsSyncOrderResponse spsSyncOrderResponse = baseResponse.getData();
spsSyncOrderResponse.setTaskId(basicExportStatusEntity.getId());
baseResponse.setData(spsSyncOrderResponse);

Loading…
Cancel
Save