选入di国家库查询

dev
郑明梁 2 years ago
parent 4aaad76fe9
commit 14c5e9a65c

@ -150,7 +150,31 @@ public class UdiSyncController {
productInfoFilterRequest.setNameCode(filterUdiInfoRequest.getNameCode());
productInfoFilterRequest.setPage(filterUdiInfoRequest.getPage());
productInfoFilterRequest.setLimit(filterUdiInfoRequest.getLimit());
return spGetHttpClient.getSyncDi(productInfoFilterRequest);
try {
BaseResponse<PageSimpleResponse<ProductInfoEntity>> udiDlDeviceResponse = syncUdiService.filterUdi(productInfoFilterRequest);
if (udiDlDeviceResponse.getCode() != 20000) {
return udiDlDeviceResponse;
}
if (CollUtil.isEmpty(udiDlDeviceResponse.getData().getList())) {
BaseResponse<List<ProductInfoEntity>> listBaseResponse = asyncDiDlHelper.dlByDiRes(filterUdiInfoRequest.getNameCode());
if (listBaseResponse.getCode() == 20000) {
List<ProductInfoEntity> productInfoEntityList = listBaseResponse.getData();
if (CollUtil.isNotEmpty(productInfoEntityList)) {
productInfoService.insertProductInfos(productInfoEntityList);
udiDlDeviceResponse = syncUdiService.filterUdi(productInfoFilterRequest);
} else {
ResultVOUtils.error(500, "未查询到该产品DI");
}
} else {
return listBaseResponse;
}
}
return udiDlDeviceResponse;
} catch (Exception e) {
e.printStackTrace();
return ResultVOUtils.error(500, "连接UDI数据下载服务出错");
}
}
@AuthRuleAnnotation("")

Loading…
Cancel
Save