12/26 youhau

dev_unify
wangwei 3 months ago
parent 59bf6cd536
commit b870f76e4a

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

Loading…
Cancel
Save