diff --git a/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java b/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java index 548fa45f..3e8c78c8 100644 --- a/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java +++ b/src/main/java/com/glxp/api/service/alihealth/impl/AlihealthBusServiceImpl.java @@ -28,6 +28,7 @@ import com.glxp.api.req.inout.AddOrderRequest; import com.glxp.api.req.inout.FilterOrderRequest; import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.service.alihealth.AlihealthBusService; +import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.basic.UdiRelevanceService; import com.glxp.api.service.inout.IoCodeLostService; import com.glxp.api.service.inout.IoOrderDetailBizService; @@ -196,7 +197,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { @Resource private UdiRelevanceService udiRelevanceService; - @Resource + @Resource private IoOrderDetailBizService orderDetailBizService; @Override @@ -204,7 +205,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { public BaseResponse ycOrderFileUpload(String billNoJson, MultipartFile file) { // 解析请求参数 AddBizProductReqeust bizProductRequest = JSONObject.parseObject(billNoJson, AddBizProductReqeust.class); - + // 校验上传文件 validateUploadFile(file); @@ -218,7 +219,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { IoOrderEntity orderEntity = bizProductRequest.getOrderEntity(); bizProductRequest.setProductType(2); bizProductRequest.setOrderEntity(orderEntity); - + // 处理每条订单数据 List productRequests = new ArrayList<>(); for (YcFileOrderUploadVo orderUploadVo : orderList) { @@ -245,9 +246,12 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { } } + @Resource + CustomerService customerService; + private AddBizProductReqeust buildProductRequest(YcFileOrderUploadVo orderUploadVo, IoOrderEntity orderEntity, String fromCorp) { orderEntity.setYcBillNo(orderUploadVo.getYcBillNo()); - + UdiRelevanceResponse udiRelevance = udiRelevanceService.selectByMainIdOne(orderUploadVo.getDrugUnifiedCode()); if (udiRelevance == null) { throw new JsonException(500, "未通过药品标识获取详情信息!"); @@ -255,9 +259,10 @@ public class AlihealthBusServiceImpl implements AlihealthBusService { Long id = udiRelevance.getId(); String supId = udiRelevance.getSupId(); + String userId = customerService.getCustomerId(); List companyProductRelevanceEntities = companyProductRelevanceDao.selectList(new LambdaQueryWrapper() .eq(CompanyProductRelevanceEntity::getUdiRlIdFk, id) - .eq(CompanyProductRelevanceEntity::getCustomerId, supId)); + .eq(CompanyProductRelevanceEntity::getCustomerId, userId)); if (CollUtil.isEmpty(companyProductRelevanceEntities)){ throw new JsonException(500, "当前产品标识:【"+ udiRelevance.getNameCode()+"】未添加文件中供应商配送服务!"); }