| | |
| | | return base.UpdateData(saveModel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥è¯¢å
¥åºåæ®ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="OrderNo"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetInboundOrderInfo(string OrderNo) |
| | | { |
| | | WebResponseContent content=new WebResponseContent(); |
| | |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå° |
| | | /// </summary> |
| | | /// <param name="keys"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent PrintOrder(int[] keys) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | inboundOrders.Add(InboundOrder); |
| | | } |
| | | } |
| | | content=PrintInbound(inboundOrders); |
| | | content = PrintInbound(inboundOrders); |
| | | return content; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 夿¬¡æå° |
| | | /// </summary> |
| | | /// <param name="keys"></param> |
| | | /// <param name="num"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent MultiplePrintOrder(int keys,int num) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_InboundOrder> inboundOrders = new List<Dt_InboundOrder>(); |
| | | var InboundOrder = BaseDal.QueryFirst(x => x.Id == keys); |
| | | for (int i = 0; i < num; i++) |
| | | { |
| | | if (InboundOrder != null) |
| | | { |
| | | inboundOrders.Add(InboundOrder); |
| | | } |
| | | } |
| | | |
| | | content = PrintInbound(inboundOrders); |
| | | return content; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error("æªç¥é误ï¼è¯·è系管çå"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æå |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <param name="num"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent SplitOrder(int id,int num) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | { |
| | | return content.Error("æªæ¾å°è¯¥å
¥åºåä¿¡æ¯"); |
| | | } |
| | | if(originalOrder.Quantity < num || num <= 0) |
| | | if(originalOrder.Quantity < num || num <= 0 || originalOrder.Quantity - num == 0) |
| | | { |
| | | return content.Error("æåæ°éä¸åæ³"); |
| | | } |
| | |
| | | Texture = originalOrder.Texture, |
| | | Quantity = num, |
| | | OrderStatus = originalOrder.OrderStatus, |
| | | |
| | | }; |
| | | originalOrder.Quantity = originalOrder.Quantity - num; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// æå°æçç |
| | | /// </summary> |
| | | /// <param name="num"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent PrintPalletCode(int num) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | return content.Error("æªç¥é误ï¼è¯·è系管çå"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å订åç¼å· |
| | | /// </summary> |
| | | /// <param name="printCode"></param> |
| | | /// <returns></returns> |
| | | public string GetOrderPintCode(string printCode) |
| | | { |
| | | string PrintCode = ""; |
| | |
| | | SqlSugarHelper.DbWMS.Updateable(PrintSetting).ExecuteCommand(); |
| | | return PrintCode; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°ç¨æå°æçç æ¥å£ |
| | | /// </summary> |
| | | /// <param name="palletCodes"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="InvalidOperationException"></exception> |
| | | public WebResponseContent PrintPallet(List<string> palletCodes) |
| | | { |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | |
| | | return JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è°ç¨æå°åæ®æ¥å£ |
| | | /// </summary> |
| | | /// <param name="orders"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="InvalidOperationException"></exception> |
| | | public WebResponseContent PrintInbound(List<Dt_InboundOrder> orders) |
| | | { |
| | | var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |