From 89e2243271a81bd6a11612b95d986f0972b6a08e Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 24 十月 2025 20:04:50 +0800
Subject: [PATCH] 添加出入库退货单
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
index 0c0e69f..101709c 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs"
@@ -1,6 +1,7 @@
锘縰sing HslCommunication;
using MailKit.Search;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.Data.SqlClient;
using Newtonsoft.Json;
using SqlSugar;
using System;
@@ -40,11 +41,12 @@
private readonly IInventory_BatchServices _inventory_BatchServices;
private readonly IInventoryInfoService _inventoryInfoService;
private readonly ICabinOrderDetailServices _cabinOrderDetailServices;
+ private readonly IDeliveryOrderServices _eliveryOrderServices;
private readonly ISupplyTaskService _supplyTaskService;
private readonly ISupplyTaskHtyService _supplyTaskHtyService;
public IRepository<Dt_CabinOrder> Repository => BaseDal;
- public CabinOrderServices(IRepository<Dt_CabinOrder> BaseDal, IBasicService basicService, IMedicineGoodsServices medicineGoodsServices, IUnitOfWorkManage unitOfWorkManage, IInventory_BatchServices inventory_BatchServices, IInventoryInfoService inventoryInfoService, ICabinOrderDetailServices cabinOrderDetailServices, ICabinOrderHtyServices cabinOrderHtyServices, ICabinOrderDetailHtyServices cabinOrderDetailHtyServices, ISupplyTaskService supplyTaskService, ISupplyTaskHtyService supplyTaskHtyService) : base(BaseDal)
+ public CabinOrderServices(IRepository<Dt_CabinOrder> BaseDal, IBasicService basicService, IMedicineGoodsServices medicineGoodsServices, IUnitOfWorkManage unitOfWorkManage, IInventory_BatchServices inventory_BatchServices, IInventoryInfoService inventoryInfoService, ICabinOrderDetailServices cabinOrderDetailServices, ICabinOrderHtyServices cabinOrderHtyServices, ICabinOrderDetailHtyServices cabinOrderDetailHtyServices, ISupplyTaskService supplyTaskService, ISupplyTaskHtyService supplyTaskHtyService, IDeliveryOrderServices eliveryOrderServices) : base(BaseDal)
{
_basicService = basicService;
_medicineGoodsServices = medicineGoodsServices;
@@ -54,6 +56,7 @@
_cabinOrderDetailServices = cabinOrderDetailServices;
_supplyTaskService = supplyTaskService;
_supplyTaskHtyService = supplyTaskHtyService;
+ _eliveryOrderServices = eliveryOrderServices;
}
@@ -359,7 +362,27 @@
else
{
//鍒涘缓鍑哄簱鍗�
-
+ #region 杞崲涓哄嚭搴撳崟
+ UpstramOutOrderInfo upstramOutOrderInfo = new UpstramOutOrderInfo()
+ {
+ order_no = order.order_no,
+ order_type = order.order_type,
+ warehouse_no = order.warehouse_no,
+ details=new List<UpstreamOutOrderDetail>()
+ };
+ foreach (var item in order.details)
+ {
+ UpstreamOutOrderDetail detail = new UpstreamOutOrderDetail()
+ {
+ batch_num = item.batch_num,
+ goods_no = item.goods_no,
+ order_qty = item.order_qty,
+ exp_date = item.exp_date,
+ };
+ upstramOutOrderInfo.details.Add(detail);
+ }
+ _eliveryOrderServices.CreateOutboundOrder(upstramOutOrderInfo);
+ #endregion
}
};
BaseDal.Db.InsertNav(_CabinOrders).Include(x => x.Details).ExecuteCommand();
--
Gitblit v1.9.3