阳采上传问题

dev_drug_dmyh250207
yewj 4 days ago
parent 311e2e8193
commit 3f0dd8d59f

@ -399,7 +399,7 @@ public class IoOrderController extends BaseController {
if (checkInoutService.checkManual(addOrderRequest.getBillNo())) {
if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
if (IntUtil.value(bussinessTypeEntity.getCheckWebNew()) == 3 && IntUtil.value(bussinessTypeEntity.getCheckWebNewType()) == 3) {
if ((IntUtil.value(bussinessTypeEntity.getCheckWebNew()) == 3 || IntUtil.value(bussinessTypeEntity.getCheckWebNew()) == 2) && IntUtil.value(bussinessTypeEntity.getCheckWebNewType()) == 3) {
String errMsg = checkInoutService.bizOrderCheckPass(orderDetailBizEntities, orderDetailCodeEntities);
if (StrUtil.isNotEmpty(errMsg)) {
return ResultVOUtils.error(500, errMsg);

@ -562,7 +562,7 @@ public class IoOrderDetailBizController extends BaseController {
public BaseResponse insertInvoice(@RequestBody IoOrderInvoiceEntity ioOrderInvoice) {
String billNo = null;
for (IoOrderDetailBizEntity ioOrderDetailBizEntity : ioOrderInvoice.getList()) {
if(StringUtils.isEmpty(ioOrderDetailBizEntity.getOrderIdFk())){
if (StringUtils.isEmpty(ioOrderDetailBizEntity.getOrderIdFk())) {
ioOrderDetailBizEntity.setOrderIdFk(ioOrderDetailBizEntity.getBillNo());
}
IoOrderInvoiceEntity ioOrderInvoiceEntity = new IoOrderInvoiceEntity();
@ -612,7 +612,7 @@ public class IoOrderDetailBizController extends BaseController {
public BaseResponse updateorderBiz(@RequestBody InvoiceRequest invoiceRequest) {
String billNo = null;
for (IoOrderDetailCodeEntity ioOrderDetailBizEntity : invoiceRequest.getList()) {
if(StringUtils.isEmpty(ioOrderDetailBizEntity.getOrderIdFk())){
if (StringUtils.isEmpty(ioOrderDetailBizEntity.getOrderIdFk())) {
ioOrderDetailBizEntity.setOrderIdFk(ioOrderDetailBizEntity.getBillNo());
}
ioOrderInvoiceService.updateRegStatus(ioOrderDetailBizEntity);
@ -763,10 +763,10 @@ public class IoOrderDetailBizController extends BaseController {
// }
AddOrderRequest addOrderRequest = new AddOrderRequest();
BeanUtils.copyProperties(ioOrderEntity, addOrderRequest);
if (StrUtil.isNotEmpty(ioOrderEntity.getBillNo())){
if (StrUtil.isNotEmpty(ioOrderEntity.getBillNo())) {
String billNo = ioOrderEntity.getBillNo();
IoOrderEntity beanIoOrder = orderService.findByBillNo(billNo);
if (beanIoOrder != null){
if (beanIoOrder != null) {
beanIoOrder.setAliOrderBillNo(billCode);
orderService.update(beanIoOrder);
}

@ -261,7 +261,6 @@ public class AlihealthBusServiceImpl implements AlihealthBusService {
throw new JsonException(500, "文件中的药品统一编码:【"+orderUploadVo.getDrugUnifiedCode() + "】" +"没有维护产品信息!");
}
Long id = udiRelevance.getId();
String supId = udiRelevance.getSupId();
String userId = customerService.getCustomerId();

@ -298,11 +298,11 @@ public class IoCheckInoutService {
curCount = codeEntity.getMyReCount();
}
// TODO 药品单据临时数量超出不做校验(为了湖里妇幼)
if (!codeEntity.getProductType().equals(2)) {
if (curCount > bizEntity.getCount()) {
return "当前产品" + bizEntity.getCoName() + "数量超出!";
}
if (!codeEntity.getProductType().equals(2)) {
if (curCount > bizEntity.getCount()) {
return "" + bizEntity.getCoName() + "数量超出!";
}
}
if (bizEntity.getPrice() != null)
codeEntity.setPrice(bizEntity.getPrice());
if (StrUtil.isNotEmpty(codeEntity.getProduceDate()) && StrUtil.isEmpty(bizEntity.getProductDate())) {
@ -332,7 +332,7 @@ public class IoCheckInoutService {
curCount = codeTempEntity.getMyReCount();
}
if (curCount > bizEntity.getCount()) {
return "当前产品数量超出!";
return "产品" + bizEntity.getCoName() + "数量超出!";
}
if (bizEntity.getPrice() != null)
codeTempEntity.setPrice(bizEntity.getPrice());
@ -357,7 +357,7 @@ public class IoCheckInoutService {
curCount = codeTempEntity.getMyReCount();
}
if (curCount > bizEntity.getCount()) {
return "当前产品数量超出!";
return "" + bizEntity.getCoName() + "数量超出!";
}
if (bizEntity.getPrice() != null) {
codeTempEntity.setPrice(bizEntity.getPrice());
@ -460,7 +460,7 @@ public class IoCheckInoutService {
String errMsg = "";
BasicBussinessTypeEntity businessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (IntUtil.value(businessTypeEntity.getCheckWebNew()) != 3 || IntUtil.value(businessTypeEntity.getCheckWebNewType()) != 3) {
if (IntUtil.value(businessTypeEntity.getCheckWebNew()) != 3 && IntUtil.value(businessTypeEntity.getCheckWebNewType()) != 3) {
//正向校验
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
String msg = "";
@ -577,12 +577,12 @@ public class IoCheckInoutService {
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
String msg = "";
int count = IntUtil.value(orderDetailCodeService.findByRelIdCount(orderEntity.getBillNo(), bizEntity.getBindRlFk()));
if (bizEntity.getCount() == count) {
if (bizEntity.getCount() <= count) {
bizEntity.setCheckSuccess(true);
bizEntity.setScanCount(count);
bizEntity.setScanCount(bizEntity.getCount());
} else {
msg = "数量不匹配";
bizEntity.setScanCount(count);
bizEntity.setScanCount(bizEntity.getScanCount() + count);
bizEntity.setCheckSuccess(false);
}
bizEntity.setErrMsg(msg);
@ -1133,6 +1133,7 @@ public class IoCheckInoutService {
}
// 预验收使用出库处理1.不带回扣库存;2.带回时生成退货出库单
@Resource
GennerOrderUtils gennerOrderUtils;

@ -250,6 +250,7 @@ public class IoCodeTempService {
AlihealthYljgUtils alihealthYljgUtils;
@Resource
AuthCompanyMapper authCompanyMapper;
public BaseResponse addDrugOrderWeb(AddOrderRequest addOrderRequest) {
AddCodeResult addCodeResult = new AddCodeResult();
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(addOrderRequest.getAction());
@ -284,37 +285,37 @@ public class IoCodeTempService {
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
} else {
if (relCodeDetailResponse != null) {
udiEntity.setBatchNo(relCodeDetailResponse.getBatchNo());
udiEntity.setProduceDate(DateUtil.formatDate(relCodeDetailResponse.getMadeDate(), "yyMMdd"));
udiEntity.setExpireDate(DateUtil.formatDate(relCodeDetailResponse.getValidateDate(), "yyMMdd"));
} else {
// 还是为空就调用查码明细的结构
AuthCompany authCompany = authCompanyMapper.selectOne(
new QueryWrapper<AuthCompany>().last("limit 1")
);
if (authCompany != null) {
AlihealthYljgCodedetailReqeust alihealthYljgCodedetailReqeust = new AlihealthYljgCodedetailReqeust();
alihealthYljgCodedetailReqeust.setCodes(code);
BaseResponse<List<IoCodeLostEntity>> response = alihealthYljgUtils.codedetail(alihealthYljgCodedetailReqeust);
if (response.getCode() == 20000) {
List<IoCodeLostEntity> ioCodeLostEntityList = response.getData();
if (ioCodeLostEntityList != null && ioCodeLostEntityList.size() > 0) {
IoCodeLostEntity ioCodeLostEntity = ioCodeLostEntityList.get(0);
codeLostService.saveOrUpdate(ioCodeLostEntity);
udiEntity.setBatchNo(ioCodeLostEntity.getBatchNo());
udiEntity.setProduceDate(ioCodeLostEntity.getProduceDate());
udiEntity.setExpireDate(ioCodeLostEntity.getExpireDate());
}
} else {
log.error("拉取阿里码明细访问失败===" + response.getMessage());
}
}
}
// if (relCodeDetailResponse != null) {
// udiEntity.setBatchNo(relCodeDetailResponse.getBatchNo());
// udiEntity.setProduceDate(DateUtil.formatDate(relCodeDetailResponse.getMadeDate(), "yyMMdd"));
// udiEntity.setExpireDate(DateUtil.formatDate(relCodeDetailResponse.getValidateDate(), "yyMMdd"));
// } else {
// // 还是为空就调用查码明细的结构
// AuthCompany authCompany = authCompanyMapper.selectOne(
// new QueryWrapper<AuthCompany>().last("limit 1")
// );
// if (authCompany != null) {
// AlihealthYljgCodedetailReqeust alihealthYljgCodedetailReqeust = new AlihealthYljgCodedetailReqeust();
// alihealthYljgCodedetailReqeust.setCodes(code);
// BaseResponse<List<IoCodeLostEntity>> response = alihealthYljgUtils.codedetail(alihealthYljgCodedetailReqeust);
// if (response.getCode() == 20000) {
// List<IoCodeLostEntity> ioCodeLostEntityList = response.getData();
// if (ioCodeLostEntityList != null && ioCodeLostEntityList.size() > 0) {
// IoCodeLostEntity ioCodeLostEntity = ioCodeLostEntityList.get(0);
//
//
// codeLostService.saveOrUpdate(ioCodeLostEntity);
// udiEntity.setBatchNo(ioCodeLostEntity.getBatchNo());
// udiEntity.setProduceDate(ioCodeLostEntity.getProduceDate());
// udiEntity.setExpireDate(ioCodeLostEntity.getExpireDate());
// }
// } else {
// log.error("拉取阿里码明细访问失败===" + response.getMessage());
// }
// }
//
//
// }
}
}
@ -349,7 +350,7 @@ public class IoCodeTempService {
}
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectByNameCode(udiEntity.getUdi());
if (udiRelevanceResponse == null){
if (udiRelevanceResponse == null) {
return ResultVOUtils.error(604, "当前产品未维护!");
}
long recent = 0;
@ -636,7 +637,13 @@ public class IoCodeTempService {
codeEnttity.setInBatchNo(inBatch);
//是否边扫边校验
if (addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable()) {
String errMsg = ioCheckInoutService.checkCode(codeEnttity);
String errMsg = "";
if (bussinessTypeEntity.getCheckWebNew() == 2) {
errMsg = ioCheckInoutService.checkDrugNoPiCode(codeEnttity);
} else {
errMsg = ioCheckInoutService.checkCode(codeEnttity);
}
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else

@ -129,9 +129,17 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
public IoOrderDetailBizEntity findByRelId(String orderId, Long relId) {
if (relId == null)
return null;
int count = 0;
List<IoOrderDetailBizEntity> orderDetailBizEntities = ioOrderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderId).eq("bindRlFk", relId));
if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
return orderDetailBizEntities.get(0);
for (IoOrderDetailBizEntity orderDetailBizEntity : orderDetailBizEntities) {
count = count + orderDetailBizEntity.getCount();
}
IoOrderDetailBizEntity orderDetailBizEntity = orderDetailBizEntities.get(0);
orderDetailBizEntity.setCount(count);
return orderDetailBizEntity;
}
return null;
}
@ -196,17 +204,18 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public List<IoOrderDetailBizEntity> checkOrderList(String orderId) {
IoOrderEntity orderEntity = orderService.findByBillNo(orderId);
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
List<IoOrderDetailBizEntity> orderDetailBizEntities = findByOrderId(orderId);
for (IoOrderDetailBizEntity orderDetailBizEntity : orderDetailBizEntities) {
if (orderDetailBizEntity.getBzgg() == null) {
UdiProductEntity product = udiProductService.findByNameCode(orderDetailBizEntity.getNameCode());
if ( product.getProductsType() == 2) {
if (product.getProductsType() == 2) {
orderDetailBizEntity.setBzgg(product.getBzgg());
orderDetailBizEntity.setPrepnSpec(product.getPrepnSpec());
}
}
}
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_ALLOCATE) {
if (bussinessTypeEntity.getCheckWebNew() == 2 || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_ALLOCATE) {
checkInoutService.bizNoPiCheck(orderDetailBizEntities, orderEntity);
} else {
List<IoOrderDetailCodeEntity> codeEntities = orderDetailCodeService.findByOrderId(orderId);
@ -225,6 +234,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
orderDetailBizRequest.pageDispose();
return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest);
}
@Override
public IoOrderInvoiceResponse selectByinvoiceId(Long id) {
return ioOrderDetailBizDao.selectByinvoiceId(id);

Loading…
Cancel
Save