| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_IOrderRepository; |
| | | using WIDESEA_IServices; |
| | | using WIDESEA_IStorageBasicServices.Stock; |
| | | using WIDESEA_Model.Models.ERP; |
| | | using WIDESEA_Model.Models.Order; |
| | | using WIDESEA_OrderRepository; |
| | | |
| | | namespace WIDESEA_StorageBasicServices |
| | | { |
| | |
| | | { |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly ISys_ConfigService _configService; |
| | | public ERPInboundOrderService(IUnitOfWorkManage unitOfWorkManage, ISys_ConfigService configService) |
| | | private readonly IDt_InboundOrderRepository _inboundOrderRepository; |
| | | public ERPInboundOrderService(IUnitOfWorkManage unitOfWorkManage, ISys_ConfigService configService,IDt_InboundOrderRepository inboundOrderRepository) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _configService = configService; |
| | | _inboundOrderRepository = inboundOrderRepository; |
| | | } |
| | | public virtual PageGridData<WMS_éè´åæåå
¥åºæ¸
å_ST> GetPageData(PageDataOptions options) |
| | | { |
| | |
| | | new PageGridData<WMS_éè´åæåå
¥åºæ¸
å_ST>(totalCount, data); |
| | | return new PageGridData<WMS_éè´åæåå
¥åºæ¸
å_ST>(totalCount, data); |
| | | } |
| | | |
| | | public WebResponseContent Print(List<WMS_éè´åæåå
¥åºæ¸
å_ST> wMSs) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_InboundOrder> orderinbound=new List<Dt_InboundOrder>(); |
| | | foreach (var wMS in wMSs) |
| | | { |
| | | Dt_InboundOrder Print = new Dt_InboundOrder() |
| | | { |
| | | OrderNo = GetOrderPintCode("OrderNoIn"), |
| | | UpperOrderNo = wMS.åå·, |
| | | DemandClassification = wMS.éæ±åç±», |
| | | OrderType = wMS.åæ®ç±»å, |
| | | WarehouseName = wMS.å
¥åºä»åºåç§°, |
| | | Datetime = wMS.æ¥æ.ToString(), |
| | | LineNumber = wMS.è¡å·, |
| | | ProductDrawingNumber = wMS.产åå¾å·, |
| | | MaterialNo = wMS.æå·, |
| | | MaterialName = wMS.åå, |
| | | Weight = wMS.åé, |
| | | WareHouseId = wMS.å
¥åºä»åºç¼ç , |
| | | Specs = wMS.è§æ ¼, |
| | | Unit = wMS.åä½, |
| | | Texture = wMS.ç¨åæè´¨, |
| | | Quantity = wMS.å
¥åºæ°é, |
| | | OrderStatus = wMS.åæ®ç¶æ |
| | | }; |
| | | orderinbound.Add(Print); |
| | | } |
| | | _inboundOrderRepository.AddData(orderinbound); |
| | | PrintInbound(orderinbound); |
| | | return content.OK("æå°æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | public void PrintInbound(List<Dt_InboundOrder> orders) |
| | | { |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |