|
|
|
@ -74,37 +74,37 @@ public class BasicDownloadController {
|
|
|
|
|
@PostMapping("/spssync/basic/udiinfo/downloadByStatus")
|
|
|
|
|
public BaseResponse downloadByStatus(@RequestBody BasicExportStatusRequest basicExportStatusRequest) {
|
|
|
|
|
log.info("查询下载未更新信息");
|
|
|
|
|
if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_UDI) {//基础信息下载
|
|
|
|
|
if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_UDI)) {//基础信息下载
|
|
|
|
|
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
UdiRelevanceExportJsonResponse udiRelevanceExportJsonResponse = JSONObject.parseObject(data, new TypeReference<UdiRelevanceExportJsonResponse>() {
|
|
|
|
|
});
|
|
|
|
|
basicExportService.finished(basicExportStatusRequest.getId());
|
|
|
|
|
return ResultVOUtils.success(udiRelevanceExportJsonResponse);
|
|
|
|
|
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_CORP) {//基础信息下载
|
|
|
|
|
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_CORP)) {//基础信息下载
|
|
|
|
|
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
BasicUnitMaintainExportResponse basicUnitMaintainExportResponse = JSONObject.parseObject(data, new TypeReference<BasicUnitMaintainExportResponse>() {
|
|
|
|
|
});
|
|
|
|
|
basicExportService.finished(basicExportStatusRequest.getId());
|
|
|
|
|
return ResultVOUtils.success(basicUnitMaintainExportResponse);
|
|
|
|
|
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_INV) {//基础信息下载
|
|
|
|
|
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_INV)) {//基础信息下载
|
|
|
|
|
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
InvWarehouseExportResponse invWarehouseExportResponse = JSONObject.parseObject(data, new TypeReference<InvWarehouseExportResponse>() {
|
|
|
|
|
});
|
|
|
|
|
basicExportService.finished(basicExportStatusRequest.getId());
|
|
|
|
|
return ResultVOUtils.success(invWarehouseExportResponse);
|
|
|
|
|
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_DATA) {//基础信息下载
|
|
|
|
|
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_DATA)) {//基础信息下载
|
|
|
|
|
SpsSyncDataResponse spsSyncDataResponse = (SpsSyncDataResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
basicExportService.finished(basicExportStatusRequest.getId());
|
|
|
|
|
return ResultVOUtils.success(spsSyncDataResponse);
|
|
|
|
|
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_BUS) {//单据类型
|
|
|
|
|
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_BUS)) {//单据类型
|
|
|
|
|
SpsSyncBusResponse spsSyncDataResponse = (SpsSyncBusResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
basicExportService.finished(basicExportStatusRequest.getId());
|
|
|
|
|
return ResultVOUtils.success(spsSyncDataResponse);
|
|
|
|
|
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_ORDER) {//单据
|
|
|
|
|
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_ORDER)) {//单据
|
|
|
|
|
SpsSyncOrderResponse spsSyncDataResponse = (SpsSyncOrderResponse) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
basicExportService.finished(basicExportStatusRequest.getId());
|
|
|
|
|
return ResultVOUtils.success(spsSyncDataResponse);
|
|
|
|
|
} else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_UDIS) {//国家库信息
|
|
|
|
|
} else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_UDIS)) {//国家库信息
|
|
|
|
|
BasicExportStatusEntity basicExportStatusEntity = basicExportService.findById(basicExportStatusRequest.getId());
|
|
|
|
|
String data = (String) redisUtil.get(basicExportStatusRequest.getId() + "");
|
|
|
|
|
SpSyncUdiResponse spSyncUdiResponse = null;
|
|
|
|
@ -131,4 +131,4 @@ public class BasicDownloadController {
|
|
|
|
|
return ResultVOUtils.error(500, "更新成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|