| | |
| | | using MailKit.Search; |
| | | using Masuit.Tools; |
| | | using Newtonsoft.Json; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | |
| | | inboundOrders.Add(InboundOrder); |
| | | } |
| | | } |
| | | PrintInbound(inboundOrders); |
| | | return content.OK("æå"); |
| | | content=PrintInbound(inboundOrders); |
| | | return content; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | return content.Error("æªç¥é误ï¼è¯·è系管çå"); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | PalletCodes.Add(GetOrderPintCode("PalletCodes")); |
| | | } |
| | | PrintPallet(PalletCodes); |
| | | content= PrintPallet(PalletCodes); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | return content.Error("æªç¥é误ï¼è¯·è系管çå"); |
| | | } |
| | | } |
| | | public string GetOrderPintCode(string printCode) |
| | |
| | | SqlSugarHelper.DbWMS.Updateable(PrintSetting).ExecuteCommand(); |
| | | return PrintCode; |
| | | } |
| | | public void PrintPallet(List<string> palletCodes) |
| | | public WebResponseContent PrintPallet(List<string> palletCodes) |
| | | { |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | var Base = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.PrintIPAddress)?.ConfigValue; |
| | |
| | | } |
| | | var IpAddress = Base + ipAddress; |
| | | var result = HttpsClient.PostAsync(IpAddress, palletCodes.ToJsonString()).Result; |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | } |
| | | |
| | | public void PrintInbound(List<Dt_InboundOrder> orders) |
| | | public WebResponseContent PrintInbound(List<Dt_InboundOrder> orders) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | var Base = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.PrintIPAddress)?.ConfigValue; |
| | | var ipAddress = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.PrintInboundOrder)?.ConfigValue; |
| | |
| | | } |
| | | var IpAddress = Base + ipAddress; |
| | | var result = HttpsClient.PostAsync(IpAddress, orders.ToJsonString()).Result; |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | } |
| | | } |
| | | } |