feat: 阳采

dev_2.5_inv
chenhc 3 months ago
parent ecb3110b1e
commit 0526213b63

@ -3,6 +3,9 @@ package com.glxp.api.controller.thrsys;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.common.enums.ResultEnum;
@ -90,9 +93,15 @@ public class ThirdAliDrugController extends BaseController {
try {
BaseResponse<PageSimpleResponse<ThirdAliDrug>> baseResponse = spGetHttpClient.thirdAliDrugList(alihealthThirdAliDrugInsertReqeust);
if (baseResponse.getCode() == 20000) {
if (!CollUtil.isEmpty(baseResponse.getData().getList())){
list = baseResponse.getData().getList();
total = baseResponse.getData().getTotal();
// 正确的类型转换使用FastJSON的parseObject方法
PageSimpleResponse<ThirdAliDrug> data = JSON.parseObject(
JSON.toJSONString(baseResponse.getData()),
new TypeReference<PageSimpleResponse<ThirdAliDrug>>() {}
);
if (data != null) {
list = data.getList();
total = data.getTotal();
}
} else {
log.error("获取阿里和国家库码段信息出现错误===" + baseResponse.getMessage());

@ -253,25 +253,21 @@ 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, "未通过药品标识获取详情信息!");
throw new JsonException(500, "文件中的药品统一编码:【"+orderUploadVo.getDrugUnifiedCode() + "】" +"没有维护产品信息!");
}
Long id = udiRelevance.getId();
String supId = udiRelevance.getSupId();
String userId = customerService.getCustomerId();
List<CompanyProductRelevanceEntity> companyProductRelevanceEntities = companyProductRelevanceDao.selectList(new LambdaQueryWrapper<CompanyProductRelevanceEntity>()
.eq(CompanyProductRelevanceEntity::getUdiRlIdFk, id)
.eq(CompanyProductRelevanceEntity::getCustomerId, userId));
.eq(CompanyProductRelevanceEntity::getCustomerId, fromCorp));
if (CollUtil.isEmpty(companyProductRelevanceEntities)) {
throw new JsonException(500, "当前产品标识:【" + udiRelevance.getNameCode() + "】未添加文件中供应商配送服务!");
throw new JsonException(500, "文件中的药品统一编码:【"+orderUploadVo.getDrugUnifiedCode() + "】 产品标识:【" + udiRelevance.getNameCode() + "】未添加文件中供应商配送服务!");
}
AddBizProductReqeust productRequest = new AddBizProductReqeust();

Loading…
Cancel
Save