1/14 参数优化1.1

Lhxyy
wangwei 3 months ago
parent 409f441a07
commit 49b4527ecb

@ -235,39 +235,6 @@ public class CtqyyClient extends CommonHttpClient {
*/
@Override
public BaseResponse getProducts(UdiwmsProductRequest udiwmsProductRequest) {
if (udiwmsProductRequest.getProductType().equals(Constants.PRODUCT_TYPE_DEVICE)) {
CtqyyRequest ctqyyRequest = new CtqyyRequest();
ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialDict"));
ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsProductRequest));
String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_PI_QUERY_URL), ctqyyRequest);
response = parserResult(response);
try {
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
Map map = (Map) baseResponse.getData();
List<ZzzyyProductsResponse> zzzyyProductsResponse = JSON.parseArray(map.get("list") + "", ZzzyyProductsResponse.class);
for (ZzzyyProductsResponse productsResponse : zzzyyProductsResponse) {
//判断要是规格和型号一致就是取规格 不一致就合并
if (StrUtil.isNotEmpty(productsResponse.getModel_number()) && StrUtil.isNotEmpty(productsResponse.getStandard())) {
if (productsResponse.getModel_number().equals(productsResponse.getStandard())) {
productsResponse.setStandard(productsResponse.getStandard());
} else {
productsResponse.setStandard(productsResponse.getStandard() + productsResponse.getModel_number());
}
} else if (StrUtil.isNotEmpty(productsResponse.getModel_number()) && StrUtil.isBlank(productsResponse.getStandard())) {
productsResponse.setStandard(productsResponse.getModel_number());
}
productsResponse.setProductType(1);
}
map.put("list", JSON.toJSON(zzzyyProductsResponse));
baseResponse.setData("");
baseResponse.setData(map);
return baseResponse;
} catch (Exception e) {
log.error("解析长泰区医院智业接口返回产品信息字典数据异常,返回结果:{}", response);
log.error("异常信息:{}", e);
return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
}
} else if (udiwmsProductRequest.getProductType().equals(Constants.PRODUCT_TYPE_DRUG)) {
LambdaQueryWrapper<VYpzsPhysicDict> wrapper = new LambdaQueryWrapper();
//补充其他查询条件
wrapper.eq(StrUtil.isNotBlank(udiwmsProductRequest.getCode()), VYpzsPhysicDict::getPHYSIC_CODE, udiwmsProductRequest.getCode());
@ -311,9 +278,6 @@ public class CtqyyClient extends CommonHttpClient {
pageSimpleResponse.setTotal(page.getTotal());
pageSimpleResponse.setList(thrProductsEntityList);
return ResultVOUtils.success(pageSimpleResponse);
}
log.error("解析长泰区医院医疗类型,返回结果:{}", udiwmsProductRequest.getProductType());
return ResultVOUtils.error(500, "医疗类型不正确productType" + udiwmsProductRequest.getProductType());
}
@Override

@ -141,7 +141,6 @@ public class UdiwmsOrderDetailRequest {
private String cplb;
private String diCode;
private String hslb;
private String ybbm;
/**
*

@ -67,20 +67,7 @@ public class UdiwmsProductRequest extends ListPageRequest {
*/
private String remark3;
/**
* 1 2
*/
private Integer productType;
/**
* 1
* @return
*/
public Integer getProductType() {
if(productType == null){
return Constants.PRODUCT_TYPE_DEVICE;
}
return productType;
}
}

@ -152,11 +152,11 @@ public class SubmitOrderUtil {
item.setRemark3(detailBizEntity.getRemark3());
}
if (StrUtil.isEmpty(basicProducts.getYbbm())){
item.setYbbm("");
}else {
item.setYbbm(basicProducts.getYbbm());
}
// if (StrUtil.isEmpty(basicProducts.getYbbm())){
// item.setYbbm("");
// }else {
// item.setYbbm(basicProducts.getYbbm());
// }
// item.setAllowNoBatch(IntUtil.value(basicProducts.getAllowNoBatch())); //是否允许无批次号
// item.setManufactoryCode(thrProductsEntity.getManufactoryCode());

Loading…
Cancel
Save