选入药品层级查询就不查询国家库了 本地查不到直接去阿里拉

dev_unify
qiuyt 3 months ago
parent 0e2cbbdf8e
commit 2a9bac0e79

@ -112,23 +112,25 @@ public class AlihealthBusController extends BaseController {
} }
List<ThirdAliDrug> thirdAliDrugsListGjk = null; List<ThirdAliDrug> thirdAliDrugsListGjk = null;
if(alihealthThirdAliDrugInsertReqeust.getGjkSwitch()){
try {
String response = HttpUtil.get(udiUrl + "/udiwms/aliDrug/getDrugLevelList", map);
BaseResponse<PageSimpleResponse<ThirdAliDrug>> udiDlDeviceResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<ThirdAliDrug>>>() {
});
if (udiDlDeviceResponse != null
) {
// 查询国家库是否有值 有值直接返回没值查询阿里接口
thirdAliDrugsListGjk = udiDlDeviceResponse.getData().getList();
}
} catch (Exception e) {
log.error("国家库查询阿里产品访问出现错误===" + e.getMessage());
try {
String response = HttpUtil.get(udiUrl + "/udiwms/aliDrug/getDrugLevelList", map);
BaseResponse<PageSimpleResponse<ThirdAliDrug>> udiDlDeviceResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<ThirdAliDrug>>>() {
});
if (udiDlDeviceResponse != null
) {
// 查询国家库是否有值 有值直接返回没值查询阿里接口
thirdAliDrugsListGjk = udiDlDeviceResponse.getData().getList();
} }
} catch (Exception e) {
log.error("国家库查询阿里产品访问出现错误===" + e.getMessage());
} }
if (thirdAliDrugsListGjk != null && thirdAliDrugsListGjk.size() > 0) { if (thirdAliDrugsListGjk != null && thirdAliDrugsListGjk.size() > 0) {
return ResultVOUtils.success(thirdAliDrugsListGjk); return ResultVOUtils.success(thirdAliDrugsListGjk);
} else { } else {

@ -100,6 +100,7 @@ public class ThirdAliDrugController extends BaseController {
alihealthThirdAliDrugInsertReqeust.setErpId(authAliUser.getErpid()); alihealthThirdAliDrugInsertReqeust.setErpId(authAliUser.getErpid());
alihealthThirdAliDrugInsertReqeust.setAppSecret(authAliUser.getAppsecret()); alihealthThirdAliDrugInsertReqeust.setAppSecret(authAliUser.getAppsecret());
alihealthThirdAliDrugInsertReqeust.setManufactory(thirdAliDrug.getManufacturer()); alihealthThirdAliDrugInsertReqeust.setManufactory(thirdAliDrug.getManufacturer());
alihealthThirdAliDrugInsertReqeust.setGjkSwitch(false);
AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust = new AlihealthKytDrugrescodeReqeust(); AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust = new AlihealthKytDrugrescodeReqeust();
alihealthKytDrugrescodeReqeust.setPhysic_name(thirdAliDrug.getCpmctymc()); alihealthKytDrugrescodeReqeust.setPhysic_name(thirdAliDrug.getCpmctymc());
alihealthKytDrugrescodeReqeust.setApproval_licence_no(thirdAliDrug.getApprovalNum()); alihealthKytDrugrescodeReqeust.setApproval_licence_no(thirdAliDrug.getApprovalNum());

@ -8,6 +8,7 @@ public class AlihealthThirdAliDrugInsertReqeust {
private String erpId; private String erpId;
private String appSecret; private String appSecret;
private String manufactory; private String manufactory;
private Boolean gjkSwitch = true;
private AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust; private AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust;
} }

Loading…
Cancel
Save