| | |
| | | using HslCommunication; |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Data.SqlClient; |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using System; |
| | |
| | | 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; |
| | |
| | | _cabinOrderDetailServices = cabinOrderDetailServices; |
| | | _supplyTaskService = supplyTaskService; |
| | | _supplyTaskHtyService = supplyTaskHtyService; |
| | | _eliveryOrderServices = eliveryOrderServices; |
| | | } |
| | | |
| | | |
| | |
| | | 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(); |