选入阳采,选入阿里

dev_unify
yewj 3 months ago
parent 9a5efc897b
commit 50a6e79798

@ -140,13 +140,6 @@
<version>3.9.1</version> <version>3.9.1</version>
</dependency> </dependency>
<!--自动生成 GET SET-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!--JWT--> <!--JWT-->
<dependency> <dependency>
<groupId>io.jsonwebtoken</groupId> <groupId>io.jsonwebtoken</groupId>
@ -400,12 +393,12 @@
<!-- <scope>system</scope>--> <!-- <scope>system</scope>-->
<!-- <systemPath>${pom.basedir}/src/main/resources/lib/alicode-1.0.jar</systemPath>--> <!-- <systemPath>${pom.basedir}/src/main/resources/lib/alicode-1.0.jar</systemPath>-->
<!-- </dependency>--> <!-- </dependency>-->
<!-- javassist --> <!-- &lt;!&ndash; javassist &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>org.javassist</groupId> <!-- <groupId>org.javassist</groupId>-->
<artifactId>javassist</artifactId> <!-- <artifactId>javassist</artifactId>-->
<version>3.28.0-GA</version> <!-- <version>3.28.0-GA</version>-->
</dependency> <!-- </dependency>-->
</dependencies> </dependencies>
@ -431,13 +424,13 @@
</configuration> </configuration>
</plugin> </plugin>
<plugin> <!-- <plugin>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-maven-plugin</artifactId> <!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<configuration> <!-- <configuration>-->
<fork>true</fork><!-- 如果没有该项配置肯呢个devtools不会起作用即应用不会restart --> <!-- <fork>true</fork>&lt;!&ndash; 如果没有该项配置肯呢个devtools不会起作用即应用不会restart &ndash;&gt;-->
</configuration> <!-- </configuration>-->
</plugin> <!-- </plugin>-->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>

@ -679,7 +679,7 @@ public class IoOrderDetailBizController extends BaseController {
for (IoOrderInvoiceEntity orderInvoiceEntity : orderInvoiceEntities) { for (IoOrderInvoiceEntity orderInvoiceEntity : orderInvoiceEntities) {
if (StrUtil.trimToEmpty(orderInvoiceEntity.getBatchNo()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBatchNo())) if (StrUtil.trimToEmpty(orderInvoiceEntity.getBatchNo()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBatchNo()))
&& StrUtil.trimToEmpty(orderInvoiceEntity.getBindRlFk()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBindRlFk() + ""))) { && StrUtil.trimToEmpty(orderInvoiceEntity.getBindRlFk()).equals(StrUtil.trimToEmpty(orderDetailCodeEntity.getBindRlFk() + ""))) {
if (StrUtil.isNotEmpty(orderInvoiceEntity.getPrice())){ if (StrUtil.isNotEmpty(orderInvoiceEntity.getPrice())) {
BigDecimal price = new BigDecimal(orderInvoiceEntity.getPrice()); BigDecimal price = new BigDecimal(orderInvoiceEntity.getPrice());
invoiceAmount = invoiceAmount.add(price); invoiceAmount = invoiceAmount.add(price);
} }
@ -772,7 +772,7 @@ public class IoOrderDetailBizController extends BaseController {
filterUdiRelRequest.setNameCode(nameCode); filterUdiRelRequest.setNameCode(nameCode);
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest); List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest);
if (CollUtil.isEmpty(udiRelevanceResponses)) { if (CollUtil.isEmpty(udiRelevanceResponses)) {
return ResultVOUtils.error("未通过药品标识【"+aliYljgBillDetailDrug.getProdName()+nameCode+"】获取详情信息!"); return ResultVOUtils.error("未通过药品标识【" + aliYljgBillDetailDrug.getProdName() + nameCode + "】获取详情信息!");
} }
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceResponses.get(0); UdiRelevanceResponse udiRelevanceResponse = udiRelevanceResponses.get(0);
List<AliYljgBillDetailDrugCode> aliYljgBillDetailDrugCodeList1 = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList(); List<AliYljgBillDetailDrugCode> aliYljgBillDetailDrugCodeList1 = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList();
@ -795,15 +795,14 @@ public class IoOrderDetailBizController extends BaseController {
addBizProductReqeust.setOrderEntity(ioOrderEntity); addBizProductReqeust.setOrderEntity(ioOrderEntity);
} }
addBizProductReqeust.setProductType(udiRelevanceResponse.getProductType()); addBizProductReqeust.setProductType(udiRelevanceResponse.getProductType());
BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust); // BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust);
if (response.getCode() != 20000) { // if (response.getCode() != 20000) {
return response; // return response;
} // }
if (i == 0) { // if (i == 0) {
ioOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(response.getData()), IoOrderEntity.class); // ioOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(response.getData()), IoOrderEntity.class);
addBizProductReqeust.setOrderEntity(ioOrderEntity); // addBizProductReqeust.setOrderEntity(ioOrderEntity);
} // }
AddOrderRequest addOrderRequest = new AddOrderRequest(); AddOrderRequest addOrderRequest = new AddOrderRequest();
BeanUtils.copyProperties(ioOrderEntity, addOrderRequest); BeanUtils.copyProperties(ioOrderEntity, addOrderRequest);
@ -835,7 +834,7 @@ public class IoOrderDetailBizController extends BaseController {
codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", "")); codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
} }
Long id = codeLostEntity.getId(); Long id = codeLostEntity.getId();
if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId()); if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId());
} }
ioCodeLostService.insertOrUpdate(codeLostEntity); ioCodeLostService.insertOrUpdate(codeLostEntity);
@ -850,12 +849,11 @@ public class IoOrderDetailBizController extends BaseController {
} }
//录入阳光采购的追溯码 //录入阳光采购的追溯码
@PostMapping("/udiwms/inout/order/yc/fileUpload") @PostMapping("/udiwms/inout/order/yc/fileUpload")
@CusRedissonAnnotation(cacheName = RedissonCacheKey.XML_UPLOAD, key = {"#billNo"}, timeOutMsg = "系统正在处理,请勿重复上传") @CusRedissonAnnotation(cacheName = RedissonCacheKey.XML_UPLOAD, key = {"#billNo"}, timeOutMsg = "系统正在处理,请勿重复上传")
public BaseResponse ycFileUpload(@RequestParam("billNo") String billNo, @RequestParam("file") MultipartFile file) { public BaseResponse ycFileUpload(@RequestParam("billNo") String billNo, @RequestParam("file") MultipartFile file) {
alihealthBusService.ycFileUpload(billNo,file); alihealthBusService.ycFileUpload(billNo, file);
return ResultVOUtils.successMsg("上传成功!"); return ResultVOUtils.successMsg("上传成功!");
} }
@ -864,8 +862,7 @@ public class IoOrderDetailBizController extends BaseController {
@PostMapping("/udiwms/inout/order/yc/orderFileUpload") @PostMapping("/udiwms/inout/order/yc/orderFileUpload")
@CusRedissonAnnotation(cacheName = RedissonCacheKey.XML_UPLOAD, key = {"#billNoJson"}, timeOutMsg = "系统正在处理,请勿重复上传") @CusRedissonAnnotation(cacheName = RedissonCacheKey.XML_UPLOAD, key = {"#billNoJson"}, timeOutMsg = "系统正在处理,请勿重复上传")
public BaseResponse ycOrderFileUpload(@RequestParam("billNoJson") String billNoJson, @RequestParam("file") MultipartFile file) { public BaseResponse ycOrderFileUpload(@RequestParam("billNoJson") String billNoJson, @RequestParam("file") MultipartFile file) {
IoOrderEntity ioOrderEntity = alihealthBusService.ycOrderFileUpload(billNoJson,file); return alihealthBusService.ycOrderFileUpload(billNoJson, file);
return ResultVOUtils.success(ioOrderEntity);
} }
} }

@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
@Data @Data
public class YcFileOrderUploadVo { public class YcFileOrderUploadVo {
@ -55,7 +57,7 @@ public class YcFileOrderUploadVo {
@ExcelProperty("采购价格(元)") @ExcelProperty("采购价格(元)")
@ColumnWidth(20) @ColumnWidth(20)
private String purchasePrice; private BigDecimal purchasePrice;
@ExcelProperty("挂网价(元)") @ExcelProperty("挂网价(元)")
@ColumnWidth(20) @ColumnWidth(20)

@ -283,4 +283,12 @@ public class IoOrderEntity {
*/ */
@TableField(value = "aliOrderBillNo") @TableField(value = "aliOrderBillNo")
private String aliOrderBillNo; private String aliOrderBillNo;
/**
*
*/
@TableField(value = "ycBillNo")
private String ycBillNo;
} }

@ -6,6 +6,7 @@ import com.glxp.api.entity.alihealth.AliYljgSearchbill;
import com.glxp.api.entity.inout.IoOrderEntity; import com.glxp.api.entity.inout.IoOrderEntity;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Data @Data
@ -24,6 +25,11 @@ public class AddBizProductReqeust {
private Integer count; private Integer count;
private Integer productType; private Integer productType;
private String aliOrderBillNo; private String aliOrderBillNo;
private BigDecimal price;
private String ycBillNo;
private String ycBizNo;
private String fromCorp;
List<AddBizProductReqeust> datas; //多选添加 List<AddBizProductReqeust> datas; //多选添加
AliYljgSearchbill aliData; //多选添加 AliYljgSearchbill aliData; //多选添加

@ -1,5 +1,6 @@
package com.glxp.api.service.alihealth; package com.glxp.api.service.alihealth;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.entity.alihealth.AliYljgBillDetail; import com.glxp.api.entity.alihealth.AliYljgBillDetail;
import com.glxp.api.entity.alihealth.AliYljgBillDetailDrug; import com.glxp.api.entity.alihealth.AliYljgBillDetailDrug;
import com.glxp.api.entity.alihealth.AliYljgBillDetailDrugCode; import com.glxp.api.entity.alihealth.AliYljgBillDetailDrugCode;
@ -16,7 +17,7 @@ public interface AlihealthBusService {
AliYljgBillDetail aliYljgBillDetail(AliYljgSearchbillReqeust aliYljgSearchbillReqeust); AliYljgBillDetail aliYljgBillDetail(AliYljgSearchbillReqeust aliYljgSearchbillReqeust);
void ycFileUpload(String billNo,MultipartFile file); void ycFileUpload(String billNo, MultipartFile file);
IoOrderEntity ycOrderFileUpload(String billNoJson, MultipartFile file); BaseResponse ycOrderFileUpload(String billNoJson, MultipartFile file);
} }

@ -25,9 +25,12 @@ 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.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.IoOrderService; import com.glxp.api.service.inout.IoOrderService;
import com.glxp.api.service.inout.impl.IoCodeTempService; import com.glxp.api.service.inout.impl.IoCodeTempService;
import com.glxp.api.util.IntUtil;
import com.glxp.api.util.StringUtils; import com.glxp.api.util.StringUtils;
import com.glxp.api.util.alihealth.AlihealthYljgUtils; import com.glxp.api.util.alihealth.AlihealthYljgUtils;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
@ -39,6 +42,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element; import org.w3c.dom.Element;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -65,23 +69,23 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
AlihealthYljgListupoutReqeust alihealthYljgListupoutReqeust1 = new AlihealthYljgListupoutReqeust(); AlihealthYljgListupoutReqeust alihealthYljgListupoutReqeust1 = new AlihealthYljgListupoutReqeust();
alihealthYljgListupoutReqeust1.setBegin_date(aliYljgSearchbillReqeust.getBeginDate()); alihealthYljgListupoutReqeust1.setBegin_date(aliYljgSearchbillReqeust.getBeginDate());
alihealthYljgListupoutReqeust1.setEnd_date(aliYljgSearchbillReqeust.getEnsDate()); alihealthYljgListupoutReqeust1.setEnd_date(aliYljgSearchbillReqeust.getEnsDate());
if(StringUtils.isNotEmpty(aliYljgSearchbillReqeust.getBillCode())){ if (StringUtils.isNotEmpty(aliYljgSearchbillReqeust.getBillCode())) {
alihealthYljgListupoutReqeust1.setBill_code(aliYljgSearchbillReqeust.getBillCode()); alihealthYljgListupoutReqeust1.setBill_code(aliYljgSearchbillReqeust.getBillCode());
} }
if (aliYljgSearchbillReqeust.getPage() != null) { if (aliYljgSearchbillReqeust.getPage() != null) {
alihealthYljgListupoutReqeust1.setPage(aliYljgSearchbillReqeust.getPage()); alihealthYljgListupoutReqeust1.setPage(aliYljgSearchbillReqeust.getPage());
alihealthYljgListupoutReqeust1.setPage_size(aliYljgSearchbillReqeust.getLimit()); alihealthYljgListupoutReqeust1.setPage_size(aliYljgSearchbillReqeust.getLimit());
}else { } else {
alihealthYljgListupoutReqeust1.setPage(1); alihealthYljgListupoutReqeust1.setPage(1);
alihealthYljgListupoutReqeust1.setPage_size(20); alihealthYljgListupoutReqeust1.setPage_size(20);
} }
BaseResponse<List<AliYljgSearchbill>> listBaseResponse = alihealthYljgUtils.listupout(alihealthYljgListupoutReqeust1, aliYljgSearchbillReqeust.getErpId()); BaseResponse<List<AliYljgSearchbill>> listBaseResponse = alihealthYljgUtils.listupout(alihealthYljgListupoutReqeust1, aliYljgSearchbillReqeust.getErpId());
if (listBaseResponse.getCode() == 20000){ if (listBaseResponse.getCode() == 20000) {
List<AliYljgSearchbill> data = listBaseResponse.getData(); List<AliYljgSearchbill> data = listBaseResponse.getData();
return data; return data;
}else { } else {
throw new JsonException(listBaseResponse.getMessage()); throw new JsonException(listBaseResponse.getMessage());
} }
} }
@ -93,10 +97,10 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
alihealthYljgListupoutDetailReqeust.setFrom_ref_user_id(aliYljgSearchbillReqeust.getFromRefUserId()); alihealthYljgListupoutDetailReqeust.setFrom_ref_user_id(aliYljgSearchbillReqeust.getFromRefUserId());
BaseResponse<AliYljgBillDetail> aliYljgBillDetailBaseResponse = alihealthYljgUtils.listupoutDetail(alihealthYljgListupoutDetailReqeust); BaseResponse<AliYljgBillDetail> aliYljgBillDetailBaseResponse = alihealthYljgUtils.listupoutDetail(alihealthYljgListupoutDetailReqeust);
if (aliYljgBillDetailBaseResponse.getCode() == 20000){ if (aliYljgBillDetailBaseResponse.getCode() == 20000) {
AliYljgBillDetail data = aliYljgBillDetailBaseResponse.getData(); AliYljgBillDetail data = aliYljgBillDetailBaseResponse.getData();
return data; return data;
}else { } else {
throw new JsonException(aliYljgBillDetailBaseResponse.getMessage()); throw new JsonException(aliYljgBillDetailBaseResponse.getMessage());
} }
@ -110,7 +114,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void ycFileUpload(String billNo,MultipartFile file) { public void ycFileUpload(String billNo, MultipartFile file) {
try { try {
String fileName = file.getOriginalFilename(); String fileName = file.getOriginalFilename();
String suffix = FileUtil.getSuffix(fileName); String suffix = FileUtil.getSuffix(fileName);
@ -125,14 +129,14 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
} }
List<YcFileCodeUploadVo> list = getList(file); List<YcFileCodeUploadVo> list = getList(file);
if (CollUtil.isEmpty(list)){ if (CollUtil.isEmpty(list)) {
throw new JsonException("文件数据为空"); throw new JsonException("文件数据为空");
} }
FilterOrderRequest request = new FilterOrderRequest(); FilterOrderRequest request = new FilterOrderRequest();
request.setBillNo(billNo); request.setBillNo(billNo);
List<IoOrderEntity> ioOrderEntities = ioOrderService.filterOrderList(request); List<IoOrderEntity> ioOrderEntities = ioOrderService.filterOrderList(request);
if (CollUtil.isEmpty(ioOrderEntities)){ if (CollUtil.isEmpty(ioOrderEntities)) {
throw new JsonException("单据编号未找到信息"); throw new JsonException("单据编号未找到信息");
} }
IoOrderEntity ioOrderEntity = ioOrderEntities.get(0); IoOrderEntity ioOrderEntity = ioOrderEntities.get(0);
@ -146,8 +150,8 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
addOrderRequest.setCode(code); addOrderRequest.setCode(code);
UdiEntity udiEntity = FilterUdiUtils.getUdi(code); UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (udiEntity == null){ if (udiEntity == null) {
throw new JsonException("追溯码解析错误:【"+code+"】"); throw new JsonException("追溯码解析错误:【" + code + "】");
} }
IoCodeLostEntity codeLostEntity = ioCodeLostService.findByCode(ycFileCodeUploadVo.getCode()); IoCodeLostEntity codeLostEntity = ioCodeLostService.findByCode(ycFileCodeUploadVo.getCode());
@ -174,7 +178,7 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
codeLostEntity.setExpireDate(udiEntity.getExpireDate()); codeLostEntity.setExpireDate(udiEntity.getExpireDate());
} }
Long id = codeLostEntity.getId(); Long id = codeLostEntity.getId();
if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId()); if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId());
} }
ioCodeLostService.insertOrUpdate(codeLostEntity); ioCodeLostService.insertOrUpdate(codeLostEntity);
@ -185,11 +189,43 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
} }
} }
@Resource
private UdiRelevanceService udiRelevanceService;
@Resource
private IoOrderDetailBizService orderDetailBizService;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public IoOrderEntity ycOrderFileUpload(String billNoJson, MultipartFile file) { public BaseResponse ycOrderFileUpload(String billNoJson, MultipartFile file) {
// 解析请求参数
AddBizProductReqeust bizProductRequest = JSONObject.parseObject(billNoJson, AddBizProductReqeust.class);
// 校验上传文件
validateUploadFile(file);
// 解析Excel文件数据
List<YcFileOrderUploadVo> orderList = getOrderList(file);
if (CollUtil.isEmpty(orderList)) {
throw new JsonException("文件数据为空");
}
// 构建业务请求参数
IoOrderEntity orderEntity = bizProductRequest.getOrderEntity();
bizProductRequest.setProductType(2);
bizProductRequest.setOrderEntity(orderEntity);
// 处理每条订单数据
List<AddBizProductReqeust> productRequests = new ArrayList<>();
for (YcFileOrderUploadVo orderUploadVo : orderList) {
AddBizProductReqeust productRequest = buildProductRequest(orderUploadVo, orderEntity, bizProductRequest.getFromCorp());
productRequests.add(productRequest);
}
AddBizProductReqeust addBizProductReqeust = JSONObject.parseObject(billNoJson, AddBizProductReqeust.class); bizProductRequest.setDatas(productRequests);
return orderDetailBizService.addBizProduct(bizProductRequest);
}
private void validateUploadFile(MultipartFile file) {
try { try {
String fileName = file.getOriginalFilename(); String fileName = file.getOriginalFilename();
String suffix = FileUtil.getSuffix(fileName); String suffix = FileUtil.getSuffix(fileName);
@ -202,75 +238,29 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
} catch (Exception e) { } catch (Exception e) {
throw new JsonException("上传失败:" + e.getMessage()); throw new JsonException("上传失败:" + e.getMessage());
} }
}
List<YcFileOrderUploadVo> list = getOrderList(file); private AddBizProductReqeust buildProductRequest(YcFileOrderUploadVo orderUploadVo, IoOrderEntity orderEntity, String fromCorp) {
if (CollUtil.isEmpty(list)){ orderEntity.setYcBillNo(orderUploadVo.getYcBillNo());
throw new JsonException("文件数据为空");
UdiRelevanceResponse udiRelevance = udiRelevanceService.selectByMainIdOne(orderUploadVo.getDrugUnifiedCode());
if (udiRelevance == null) {
throw new JsonException(500, "未通过药品标识获取详情信息!");
} }
IoOrderEntity ioOrderEntity = addBizProductReqeust.getOrderEntity(); AddBizProductReqeust productRequest = new AddBizProductReqeust();
// TODO: 2024/12/25 阳采导入业务明细功能 1、参考阿里的业务导入下方注释的代码搜索 addAliBizProduct 参考 需要考虑 发票的问题 和 后续导出 阳采的单号 和 明细 需要先做存储 有单号追加 productRequest.setProductId(String.valueOf(udiRelevance.getProductId()));
return ioOrderEntity; productRequest.setRelId(udiRelevance.getRelId());
// productRequest.setZczbhhzbapzbh(udiRelevance.getZczbhhzbapzbh());
// IoOrderEntity ioOrderEntity = addBizProductReqeust.getOrderEntity(); productRequest.setDatas(null);
// addBizProductReqeust.setAliOrderBillNo(billCode); productRequest.setCount(IntUtil.value(orderUploadVo.getShipmentQuantity()));
// ioOrderEntity.setAliOrderBillNo(billCode); productRequest.setBatchNo(orderUploadVo.getBatchNumber());
// for (int i = 0; i < aliYljgBillDetailDrugList.size(); i++) { productRequest.setProductType(udiRelevance.getProductType());
// AliYljgBillDetailDrug aliYljgBillDetailDrug = aliYljgBillDetailDrugList.get(i); productRequest.setYcBizNo(orderUploadVo.getShipmentDetailId());
// productRequest.setPrice(orderUploadVo.getPurchasePrice());
// productRequest.setSupId(fromCorp);
// String code = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList().get(0).getCode();
// if (StrUtil.isEmpty(code)) { return productRequest;
// return ResultVOUtils.error("单据码为空!");
// }
//
// UdiEntity drugInfo = FilterUdiUtils.getDrugInfo(code);
// if (drugInfo == null) {
// return ResultVOUtils.error("单据码解析药品信息错误!");
// }
//
// //获取药品信息
// String nameCode = drugInfo.getUdi();
// if (StrUtil.isEmpty(nameCode)) {
// return ResultVOUtils.error("单据码解析药品标识错误!");
// }
// FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
// filterUdiRelRequest.setNameCode(nameCode);
// List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest);
// if (CollUtil.isEmpty(udiRelevanceResponses)) {
// return ResultVOUtils.error("未通过药品标识获取详情信息!");
// }
// UdiRelevanceResponse udiRelevanceResponse = udiRelevanceResponses.get(0);
// List<AliYljgBillDetailDrugCode> aliYljgBillDetailDrugCodeList1 = aliYljgBillDetailDrug.getAliYljgBillDetailDrugCodeList();
// //1、直接模拟增加biz一行
// addBizProductReqeust.setProductId(String.valueOf(udiRelevanceResponse.getProductId()));
// addBizProductReqeust.setRelId(udiRelevanceResponse.getRelId());
// addBizProductReqeust.setZczbhhzbapzbh(udiRelevanceResponse.getZczbhhzbapzbh());
// addBizProductReqeust.setSupId(udiRelevanceResponse.getSupId());
// addBizProductReqeust.setDatas(null);
// addBizProductReqeust.setCount(aliYljgBillDetailDrugCodeList1.size() * udiCalCountUtil.getCirActCount(udiRelevanceResponse));
//
// addBizProductReqeust.setBatchNo(aliYljgBillDetailDrug.getProduceBatchNo());
// if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getProduceDate())) {
// addBizProductReqeust.setProductDate(aliYljgBillDetailDrug.getProduceDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
// }
// if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) {
// addBizProductReqeust.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
// }
// if (i == 0) {
// addBizProductReqeust.setOrderEntity(ioOrderEntity);
// }
// addBizProductReqeust.setProductType(udiRelevanceResponse.getProductType());
// BaseResponse response = orderDetailBizService.addBizProduct(addBizProductReqeust);
// if (response.getCode() != 20000) {
// return response;
// }
// if (i == 0) {
// ioOrderEntity = JSONObject.parseObject(JSONObject.toJSONString(response.getData()), IoOrderEntity.class);
// addBizProductReqeust.setOrderEntity(ioOrderEntity);
// }
} }
public List<YcFileCodeUploadVo> getList(MultipartFile file) { public List<YcFileCodeUploadVo> getList(MultipartFile file) {

@ -66,6 +66,8 @@ public interface UdiRelevanceService extends IService<UdiRelevanceEntity> {
List<UdiRelevanceResponse> selectByMainId(String mainId); List<UdiRelevanceResponse> selectByMainId(String mainId);
UdiRelevanceResponse selectByMainIdOne(String mainId);
UdiRelevanceEntity selectUpteaByAll(String uuid, String thirdId); UdiRelevanceEntity selectUpteaByAll(String uuid, String thirdId);
UdiRelevanceEntity selectByThirdId(String thirdId, String thirdSys); UdiRelevanceEntity selectByThirdId(String thirdId, String thirdSys);

@ -275,6 +275,14 @@ public class UdiRelevanceServiceImpl extends ServiceImpl<UdiRelevanceDao, UdiRel
return udiRelevanceResponses; return udiRelevanceResponses;
} }
@Override
public UdiRelevanceResponse selectByMainIdOne(String mainId) {
List<UdiRelevanceResponse> udiRelevanceResponses = selectByMainId(mainId);
if (udiRelevanceResponses != null && udiRelevanceResponses.size() > 0)
return udiRelevanceResponses.get(0);
return null;
}
@Override @Override
public UdiRelevanceEntity selectUpteaByAll(String uuid, String thirdId) { public UdiRelevanceEntity selectUpteaByAll(String uuid, String thirdId) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest(); FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();

@ -438,7 +438,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
ioOrderDetailBizEntity.setManufacturer(udiRelevanceResponse.getManufactory()); ioOrderDetailBizEntity.setManufacturer(udiRelevanceResponse.getManufactory());
ioOrderDetailBizEntity.setMeasname(udiRelevanceResponse.getMeasname()); ioOrderDetailBizEntity.setMeasname(udiRelevanceResponse.getMeasname());
ioOrderDetailBizEntity.setSpec(udiRelevanceResponse.getGgxh()); ioOrderDetailBizEntity.setSpec(udiRelevanceResponse.getGgxh());
ioOrderDetailBizEntity.setPrice(udiRelevanceResponse.getPrice()); ioOrderDetailBizEntity.setPrice(item.getPrice());
ioOrderDetailBizEntity.setProductDate(item.getProductDate()); ioOrderDetailBizEntity.setProductDate(item.getProductDate());
ioOrderDetailBizEntity.setExpireDate(item.getExpireDate()); ioOrderDetailBizEntity.setExpireDate(item.getExpireDate());
ioOrderDetailBizEntity.setBatchNo(item.getBatchNo()); ioOrderDetailBizEntity.setBatchNo(item.getBatchNo());

@ -1255,11 +1255,15 @@ CALL Pro_Temp_ColumnWork('io_order', 'aliOrderBillNo',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里来源单号''', ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里来源单号''',
1); 1);
CALL Pro_Temp_ColumnWork('io_order', 'ycBillNo',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''来源阳采单号''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'detailSort', ' tinyint DEFAULT NULL', 1); CALL Pro_Temp_ColumnWork('basic_udirel', 'detailSort', ' tinyint DEFAULT NULL', 1);
CALL Pro_Temp_ColumnWork('basic_corp', 'adSickNum', ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL', 1); CALL Pro_Temp_ColumnWork('basic_corp', 'adSickNum',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL', 1);

Loading…
Cancel
Save