| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |  | 
					
						
							|  |  |  |  | /// <summary> | 
					
						
							|  |  |  |  | ///INTERFACE CLASS FOR TABLE t_wmsOutPickRequest | 
					
						
							|  |  |  |  | ///By wm with codesmith.  | 
					
						
							|  |  |  |  | ///on 05/22/2017 | 
					
						
							|  |  |  |  | /// </summary> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Text; | 
					
						
							|  |  |  |  | using System.Data; | 
					
						
							|  |  |  |  | using DeiNiu.Utils; | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  | using System.Transactions; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace DeiNiu.wms.Data.Model | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     [Serializable] | 
					
						
							|  |  |  |  |     public class WmsOutPickRequest : WmsOutPickRequest_base | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         public WmsOutPickRequest() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public WmsOutPickRequest(int id): base(id) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public WmsOutPickRequest(DataRow dr): base(dr) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public WmsOutPickRequest(string orderNo) | 
					
						
							|  |  |  |  |         {  | 
					
						
							|  |  |  |  |             cmdParameters[0] = orderNo; | 
					
						
							|  |  |  |  |             getModel(100); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public WmsOutPickRequest(int pickGroup, int pickStartOn, string dueDate) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickGroup; | 
					
						
							|  |  |  |  |             cmdParameters[1] = pickStartOn; | 
					
						
							|  |  |  |  |             cmdParameters[2] = dueDate; | 
					
						
							|  |  |  |  |             getModel(101); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         protected override void getImp() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             model_imp = new WmsOutPickRequest_Imp(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         | 
					
						
							|  |  |  |  |         //begin cust db operation, query, excute sql etc. | 
					
						
							|  |  |  |  |         public DataSet QueryByName(string name) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = name; | 
					
						
							|  |  |  |  |             return  CustQuery(100); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 出库单详情(根据customer合并订单明细)   | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getOutDetail() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = this._pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(200); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 出库单详情(根据货物id,批号合并原始单明细) | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getOutDetailMerged() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = this._pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(210); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         private List<WmsOutPickDetail> _outDetails; | 
					
						
							|  |  |  |  |         private string orderNo; | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 查询订单出库详情 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         public List<WmsOutPickDetail> outDetails | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             get | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 if (_outDetails == null && !string.IsNullOrEmpty(_pickOrderNo)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     _outDetails = new List<WmsOutPickDetail>(); | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |                     cmdParameters[0] = this._pickOrderNo; | 
					
						
							|  |  |  |  |                     DataTable dt = CustQuery(201).Tables[0]; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |                     foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         _outDetails.Add(new WmsOutPickDetail(dr)); | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 return _outDetails; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 查询订单出库详情 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         public List<WmsOutPickDetail> outDetailsMergedByOrderNo | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             get | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 if (_outDetails == null && !string.IsNullOrEmpty(_pickOrderNo)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     _outDetails = new List<WmsOutPickDetail>(); | 
					
						
							|  |  |  |  |                     DataTable dt = getOutDetail().Tables[0]; | 
					
						
							|  |  |  |  |                     foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         _outDetails.Add(new WmsOutPickDetail(dr)); | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 return _outDetails; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 获取出库订单 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="orderType">订单类型</param> | 
					
						
							|  |  |  |  |         /// <param name="orderStatus">订单状态</param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getRequests(/*DeiNiu.Utils.enumOutStoreType orderType,*/DeiNiu.Utils.enumOutStockRequestStatus orderStatus) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |           //  cmdParameters[0] = (int)orderType; | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)orderStatus; | 
					
						
							|  |  |  |  |             return CustQuery(300); | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getRequests( DeiNiu.Utils.enumOutStoreType orderType, DeiNiu.Utils.enumOutStockRequestStatus orderStatus) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)orderType; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)orderStatus; | 
					
						
							|  |  |  |  |             return CustQuery(3001).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getRequests(DeiNiu.Utils.enumOutStoreType orderType, int daysAfter ) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)orderType; | 
					
						
							|  |  |  |  |             cmdParameters[1] = daysAfter; | 
					
						
							|  |  |  |  |             return CustQuery(3002).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// 获取波次出库单 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="lines"></param> | 
					
						
							|  |  |  |  |         /// <param name="sales"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         public List<WmsOutPickRequest> getRequests4Wave(  ) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             /*if (WmsConstants.WAVE_LINE == -1 && string.IsNullOrEmpty(WmsConstants.WAVE_SALE)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 return getRequestObjects(enumOutOrderType.拣货单, enumOutStockRequestStatus.等待波次); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             */ | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             List<WmsOutPickRequest> lst = new List<WmsOutPickRequest>(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |              cmdParameters[1] = (int)enumOrderType.销售出库; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |             // cmdParameters[2] = (int)enumOutStockRequestStatus.等待波次; | 
					
						
							|  |  |  |  |             WaveRule wr = new WaveRule().getCurrentActiveRule(enumWaveRuleType.DPS灯光波次); | 
					
						
							|  |  |  |  |             cmdParameters[0] = wr; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             DataTable dt; | 
					
						
							|  |  |  |  |             if(WmsConstants.OUT_STOCK_BULK_PDA_SCAN) // t_wmsoutpickport 生成零货任务 | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 dt = CustQuery(3011).Tables[0]; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else | 
					
						
							|  |  |  |  |             {// t_wmsoutpickport 不生成零货任务 | 
					
						
							|  |  |  |  |                 dt = CustQuery(301).Tables[0]; | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |             return getObjs(dt); | 
					
						
							|  |  |  |  |   | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |         public DataSet getRequests4DpsWave(enumOrderType orderType, WaveRule wr) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         {  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = wr;  | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)orderType;   | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  |             if (WmsConstants.OUT_STOCK_BULK_PDA_SCAN) // t_wmsoutpickport 生成零货任务 | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 return CustQuery(3011) ; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else | 
					
						
							|  |  |  |  |             {// t_wmsoutpickport 不生成零货任务 | 
					
						
							|  |  |  |  |                 return CustQuery(3012);   | 
					
						
							|  |  |  |  |             }  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 获取分区出库单 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |         public List<WmsOutPickRequest> getRequests4PartWave(enumOrderType orderType,int part) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |               | 
					
						
							|  |  |  |  |             List<WmsOutPickRequest> lst = new List<WmsOutPickRequest>(); | 
					
						
							|  |  |  |  |             WaveRule wr = new WaveRule().getCurrentActiveRule(enumWaveRuleType.DPS灯光波次);   | 
					
						
							|  |  |  |  |             cmdParameters[2] = wr; | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)orderType; | 
					
						
							|  |  |  |  |             cmdParameters[1] = part; | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             DataTable dt = CustQuery(303).Tables[0]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |             return getObjs(dt); | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |          public List<DataTable> getRecords4PartWave(enumOrderType orderType) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             List<DataTable> lst = new List<DataTable>(); | 
					
						
							|  |  |  |  |             DataTable dt0 =getFreeParts(); | 
					
						
							|  |  |  |  |             WaveRule wr = new WaveRule().getCurrentActiveRule(enumWaveRuleType.DPS灯光波次); | 
					
						
							|  |  |  |  |             foreach (DataRow dr0 in dt0.Rows) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 cmdParameters[0] = (int)orderType; | 
					
						
							|  |  |  |  |                 cmdParameters[1] = dr0["id"].ToString(); | 
					
						
							|  |  |  |  |                 cmdParameters[2] = wr; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 lst.Add(CustQuery(305).Tables[0].Copy()); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             return lst;  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |          public  DataTable getRecords4PickOrder(string pikciOrderNo,int partion) | 
					
						
							|  |  |  |  |          { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             // List<DataTable> lst = new List<DataTable>(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                  cmdParameters[0] = pikciOrderNo; | 
					
						
							|  |  |  |  |                  cmdParameters[1] = partion; | 
					
						
							|  |  |  |  |                   | 
					
						
							|  |  |  |  |                   | 
					
						
							|  |  |  |  |                  return CustQuery(308).Tables[0] ; | 
					
						
							|  |  |  |  |               | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |          } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |          public List<WmsOutPickRequest> getRequests4PartWave(enumOrderType orderType) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             List<WmsOutPickRequest> lst = new List<WmsOutPickRequest>(); | 
					
						
							|  |  |  |  |             DataTable dt0 =getFreeParts(); | 
					
						
							|  |  |  |  |             WaveRule wr = new WaveRule().getCurrentActiveRule(enumWaveRuleType.DPS灯光波次); | 
					
						
							|  |  |  |  |             foreach (DataRow dr0 in dt0.Rows) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 cmdParameters[0] = orderType; | 
					
						
							|  |  |  |  |                 cmdParameters[1] = dr0["id"].ToString(); | 
					
						
							|  |  |  |  |                 cmdParameters[2] = wr ; | 
					
						
							|  |  |  |  |                 DataTable dt = CustQuery(303).Tables[0]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |                 {  | 
					
						
							|  |  |  |  |                     lst.Add(new WmsOutPickRequest(dr)); | 
					
						
							|  |  |  |  |                       | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             return lst;  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataTable getFreeParts() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return CustQuery(304).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary>        | 
					
						
							|  |  |  |  |         /// 获取出库订单 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="orderType">订单类型</param> | 
					
						
							|  |  |  |  |         /// <param name="orderStatus">订单状态</param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public List<WmsOutPickRequest> getRequestObjects(/*DeiNiu.Utils.enumOutStoreType orderType,*/ DeiNiu.Utils.enumOutStockRequestStatus orderStatus)  | 
					
						
							|  |  |  |  |           // , int lines=-1,string sales="") | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         {  | 
					
						
							|  |  |  |  |             return getObjs( getRequests(/*orderType,*/orderStatus).Tables[0]); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public List<WmsOutPickRequest> getRequestObjects( DeiNiu.Utils.enumOutStoreType orderType,  DeiNiu.Utils.enumOutStockRequestStatus orderStatus)  | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |             return getObjs(getRequests( orderType, orderStatus) ); | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |       | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |         public List<WmsOutPickRequest> getObjs(DataTable dtPickOrders) | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |             List<WmsOutPickRequest> lst = new List<WmsOutPickRequest>();             | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             foreach (DataRow dr in dtPickOrders.Rows) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 lst.Add(new WmsOutPickRequest(dr)); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             return lst; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 进入波次,更新零货捡货状态 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="state"></param> | 
					
						
							|  |  |  |  |         public void updateBulkPickStatus(string pickOrderNo,enumOutStockPickStatus state,int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)state; | 
					
						
							|  |  |  |  |             cmdParameters[2] = operater; | 
					
						
							|  |  |  |  |             CustOper(410); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 进入分区波次,更新零货捡货状态 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="state"></param> | 
					
						
							|  |  |  |  |         /// <param name="operater"></param> | 
					
						
							|  |  |  |  |         public void updatePartBulkPickStatus(string pickOrderNo,int part, enumOutStockPickStatus state, int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = part; | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)state; | 
					
						
							|  |  |  |  |             cmdParameters[3] = operater; | 
					
						
							|  |  |  |  |             CustOper(411); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 更新整货捡货状态 | 
					
						
							|  |  |  |  |         /// 需要事物 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="state"></param> | 
					
						
							|  |  |  |  |         public int updateBatchPickStatus(string pickOrderNo, enumOutStockPickStatus state,int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)state; | 
					
						
							|  |  |  |  |             cmdParameters[2] = operater; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |           return  CustOper(420); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 更新整货捡货、复核状态 | 
					
						
							|  |  |  |  |         /// 完成订单明细的全部拣货、复核动作时执行此方法 | 
					
						
							|  |  |  |  |         /// 需要事物 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="orderState"></param> | 
					
						
							|  |  |  |  |         /// <param name="detailState"></param> | 
					
						
							|  |  |  |  |         /// <param name="pickState"></param> | 
					
						
							|  |  |  |  |         /// <param name="operater"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public int updateBatchOrderStatus(string pickOrderNo, enumOutStockRequestStatus orderState, enumOutStockDetailStatus detailState, int operater) | 
					
						
							|  |  |  |  |         {  | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)orderState; | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)detailState;  | 
					
						
							|  |  |  |  |             cmdParameters[3] = operater; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustOper(430); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 波次完成,更新bulkPickState | 
					
						
							|  |  |  |  |         /// 全是零货的订单状态 state一并更新 | 
					
						
							|  |  |  |  |         /// 有整货的,待整货完成分拣后再更新 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveNo"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public bool completeWaveBulkPickStatus(string waveNo, int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = waveNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = operater; | 
					
						
							|  |  |  |  |             CustOper(400); | 
					
						
							|  |  |  |  |             CustOper(399); | 
					
						
							|  |  |  |  |             return true; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public int fixMore() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |           return  CustOper(399); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 分区分拣结束,判断分区的订单不存在未拣的部分,则更新pickdetail 和pickrequest bulkPikckStatus | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="part"></param> | 
					
						
							|  |  |  |  |         /// <param name="operater"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public bool completePartBulkPickStatus(int part, int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = part; | 
					
						
							|  |  |  |  |             cmdParameters[1] = operater; | 
					
						
							|  |  |  |  |             CustOper(400); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return true; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 单个订单零货分拣完成 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="operater"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public bool completeBulkPickStatus(string pickRequestNo, int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickRequestNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = operater; | 
					
						
							|  |  |  |  |             CustOper(400); | 
					
						
							|  |  |  |  |             | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return true; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public bool canNewWave() { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             //int cnt1 = CustQuery(500).Tables[0].Rows.Count; //判断是否有正在拣选数据 | 
					
						
							|  |  |  |  |             //int cnt2 = CustQuery(550).Tables[0].Rows.Count;//判断是否有待拣选数据 | 
					
						
							|  |  |  |  |             return CustQuery(500).Tables[0].Rows.Count == 0 && CustQuery(550).Tables[0].Rows.Count > 0;  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataSet getPickDetailByOrder(string orderNo, bool isPickDetail) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = isPickDetail ; | 
					
						
							|  |  |  |  |             cmdParameters[1] = orderNo; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(600); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// pick details by wave order | 
					
						
							|  |  |  |  |         /// including batch and bulk | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveOrder"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getPickDetailByWaveOrder(string waveOrder) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = waveOrder;   | 
					
						
							|  |  |  |  |             return CustQuery(700); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// current bulk details | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBulkDetailInCurrentWave() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  |             return CustQuery(710); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// partion bulk details | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getPartionBulkDetailInCurrentWave() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(720).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         ///  pick details by wave order | 
					
						
							|  |  |  |  |         ///  including bulk details in current wave  | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveOrder"></param> | 
					
						
							|  |  |  |  |         /// <returns>2 tables, first for  pick details , second for current bulk detail </returns> | 
					
						
							|  |  |  |  |         public DataSet getPickDetailByWaveOrderWithCurrentBulks(string waveOrder) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             DataSet ds = getPickDetailByWaveOrder(waveOrder); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             ds.Tables.Add(getBulkDetailInCurrentWave().Tables[0]); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return ds; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 取待审核、播种订单列表 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="desk"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getPickRequest4BulkVailidate(object desk) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = desk;   | 
					
						
							|  |  |  |  |             return CustQuery(800); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataSet getPickRequest4BulkSeedsVailidate(int desk,enumOutStockRequestStatus seedsStatus,string seedsNo="") | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             | 
					
						
							|  |  |  |  |             cmdParameters[0] = desk; | 
					
						
							|  |  |  |  |             cmdParameters[1] = seedsStatus; | 
					
						
							|  |  |  |  |             cmdParameters[2] = seedsNo; | 
					
						
							|  |  |  |  |             return CustQuery(820); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataSet getOutRequestDetail(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(810); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataTable getSeedsGoods(string seedsNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsNo; | 
					
						
							|  |  |  |  |             return CustQuery(830).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 生成波次后,保存相关出库单的明细到临时表 for 复核 | 
					
						
							|  |  |  |  |         ///  | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveNo"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public int saveTempData4Validation(string waveNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = waveNo;   | 
					
						
							|  |  |  |  |             return CustOper(900); | 
					
						
							|  |  |  |  |            // return 1; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public int saveTempData4Validation(string waveNo,string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = waveNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustOper(9001); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         public List<WmsOutPickRequest> getRequest4StockOut(enumOutStockRequestStatus status = enumOutStockRequestStatus.待定位) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = status; | 
					
						
							|  |  |  |  |             return getObjs(CustQuery(30001).Tables[0]); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 生成分区波次后,保存相关出库单的明细到临时表 for 复核 | 
					
						
							|  |  |  |  |         ///  | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveNo"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public int savePartionTempData4Validation(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustOper(901); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         ///  | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrder"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getValidationDetail(string pickOrder) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrder; | 
					
						
							|  |  |  |  |             return CustQuery(1000).Tables[0];  | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// pick details by pickOrderNo | 
					
						
							|  |  |  |  |         /// including batch and bulk | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveOrder"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getPickDetailByPickOrderNo(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(1100); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataSet getPickDetailBySeedsPickOrderNo(string seedsPickNo,int skuId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsPickNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = skuId; | 
					
						
							|  |  |  |  |             return CustQuery(11001); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |      /// <summary> | 
					
						
							|  |  |  |  |         /// to light labels for pick orders by seedPickNo ,goodsId, batch  | 
					
						
							|  |  |  |  |      /// </summary> | 
					
						
							|  |  |  |  |      /// <param name="seedsPickNo"></param> | 
					
						
							|  |  |  |  |      /// <param name="goodsId"></param> | 
					
						
							|  |  |  |  |      /// <param name="batch"></param> | 
					
						
							|  |  |  |  |      /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getSeedsLightData(string seedsPickNo,string goodsId,string batch) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsPickNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[2] = batch; | 
					
						
							|  |  |  |  |             return CustQuery(1101); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |   | 
					
						
							|  |  |  |  |         public int getUnSeedsCnt(string seedsPickNo, string goodsId, string batch) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsPickNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[2] = batch; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             string tmp = CustQuery(1102).Tables[0].Rows[0][0].ToString(); | 
					
						
							|  |  |  |  |             return tmp != string.Empty | 
					
						
							|  |  |  |  |                        ? Convert.ToInt32(tmp) | 
					
						
							|  |  |  |  |                        : 0; | 
					
						
							|  |  |  |  |              | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public int getUnSeedsCnt(string seedsPickNo,int labId ) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsPickNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = labId; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             string tmp = CustQuery(1103).Tables[0].Rows[0][0].ToString(); | 
					
						
							|  |  |  |  |             return tmp != string.Empty | 
					
						
							|  |  |  |  |                        ? Convert.ToInt32(tmp) | 
					
						
							|  |  |  |  |                        : 0; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public int getUnSeedsCnt(string seedsPickNo ) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsPickNo; | 
					
						
							|  |  |  |  |              | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             string tmp = CustQuery(1105).Tables[0].Rows[0][0].ToString(); | 
					
						
							|  |  |  |  |             return tmp != string.Empty | 
					
						
							|  |  |  |  |                        ? Convert.ToInt32(tmp) | 
					
						
							|  |  |  |  |                        : 0; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getNewSeedDetails(int groupMark) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = groupMark; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)enumOutStockRequestStatus.待定位; | 
					
						
							|  |  |  |  |             return CustQuery(2600).Tables[0]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         public DataTable getSeedsData(string seedsPickNo, int labId ) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = seedsPickNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = labId;  | 
					
						
							|  |  |  |  |             return CustQuery(1104).Tables[0] ; | 
					
						
							|  |  |  |  |             | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// delete the tmp data by pickOrderNo | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         public void deleteTempValidationData(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             CustOper(1200);  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 待处理零货复核异常 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveOrder"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBulkValidationException(enumOutStockPickStatus status) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)status; | 
					
						
							|  |  |  |  |             return CustQuery(1300); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         ///已处理收货异常 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="waveOrder"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBulkValidationExceptionSolutions(object desk =null) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = desk; | 
					
						
							|  |  |  |  |             return CustQuery(1400); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// get batch pickorders | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="status"></param> | 
					
						
							|  |  |  |  |         /// <param name="batchPickStatus"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBatchOutPickOrders(enumOutStockRequestStatus status,enumOutStockPickStatus batchPickStatus1 ,enumOutStockPickStatus batchPickStatus2) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)status; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)batchPickStatus1; | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)batchPickStatus2; | 
					
						
							|  |  |  |  |             return CustQuery(1500); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 查当日(未完成补货的)补库单 | 
					
						
							|  |  |  |  |         /// 补货还未入零库(enumOutStockPickStatus.复核完成) | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="orderType"></param> | 
					
						
							|  |  |  |  |         /// <param name="orderDate"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getRepRequestDetailsLessThan(enumOutStockPickStatus pickStatus = enumOutStockPickStatus.复核完成) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             List<WmsOutPickDetail> requests = new List<WmsOutPickDetail>(); | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)pickStatus; | 
					
						
							|  |  |  |  |             DataTable dt = CustQuery(1510).Tables[0]; | 
					
						
							|  |  |  |  |             return dt; | 
					
						
							|  |  |  |  |             //foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |             //{ | 
					
						
							|  |  |  |  |             //    requests.Add(new WmsOutPickDetail(dr)); | 
					
						
							|  |  |  |  |             //} | 
					
						
							|  |  |  |  |             //return requests; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// get batch pickorder details | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="status"></param> | 
					
						
							|  |  |  |  |         /// <param name="batchPickStatus"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBatchOutPickOrderDetails(string pickOrderNo, enumOutStockDetailStatus status, enumOutStockPickStatus batchPickStatus) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)status; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)batchPickStatus; | 
					
						
							|  |  |  |  |             cmdParameters[2] =  pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(1700); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// pick details for batch pick order | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <param name="status"></param> | 
					
						
							|  |  |  |  |         /// <param name="batchPickStatus"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBatchOutPickOrderPickDetails(string pickOrderNo, enumOutStockRequestStatus status, enumOutStockPickStatus batchPickStatus) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)status; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)batchPickStatus; | 
					
						
							|  |  |  |  |             cmdParameters[2] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(1600); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// pick details for batch pick order by pickorderNo | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="pickOrderNo"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getBatchOutPickOrderPickDetails(string pickOrderNo) | 
					
						
							|  |  |  |  |         {  | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(1610); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataTable getPickOrderTmsInfo(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo;  | 
					
						
							|  |  |  |  |             return CustQuery(1620).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 取出库货位、数量详细 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="stockRecordId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getPickDetail (int stockRecordId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = stockRecordId;  | 
					
						
							|  |  |  |  |             return CustQuery(1900).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |        /// <summary> | 
					
						
							|  |  |  |  |        /// 根据捡货状态取捡货明细 | 
					
						
							|  |  |  |  |        /// </summary> | 
					
						
							|  |  |  |  |        /// <param name="state"></param> | 
					
						
							|  |  |  |  |        /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getBatchPickDetails(enumPickState state) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)state; | 
					
						
							|  |  |  |  |             return CustQuery(2000).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// pickorders that ready for validation  | 
					
						
							|  |  |  |  |         /// for wince Only | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="state"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getBatchPickOrders4Validation() | 
					
						
							|  |  |  |  |         {       | 
					
						
							|  |  |  |  |             return CustQuery(2100).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// batch pickorder detail  | 
					
						
							|  |  |  |  |         /// for wince Only | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="state"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getBatchPickOrderDetail4Wince(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             return CustQuery(2200).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 取整货补货出库分拣明细 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="orderType"></param> | 
					
						
							|  |  |  |  |         /// <param name="pickState"></param> | 
					
						
							|  |  |  |  |         /// <param name="orderDate">默认当天和昨天两天的</param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |         public DataTable getBatchPickOrderRepDetail(string flowNo,enumOrderType orderType, enumPickState pickState,string orderDate = "",int operId=0) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)orderType; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)pickState; | 
					
						
							|  |  |  |  |             cmdParameters[2] = orderDate; | 
					
						
							|  |  |  |  |             cmdParameters[3] = flowNo; | 
					
						
							|  |  |  |  |             cmdParameters[4] = operId; | 
					
						
							|  |  |  |  |             return CustQuery(2300).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public bool updatePriority(string orders, int priority,int operId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = orders; | 
					
						
							|  |  |  |  |             cmdParameters[1] = priority; | 
					
						
							|  |  |  |  |             cmdParameters[2] = operId; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustOper(2400) > 0; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 分区完成器id列表 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getPartsFinishIds() | 
					
						
							|  |  |  |  |         {  | 
					
						
							|  |  |  |  |             return CustQuery(306).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 所有可用分区列表 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getLightPartions() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return CustQuery(307).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getOrderPickList(string orderNo, int partion) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = orderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = partion;  | 
					
						
							|  |  |  |  |             return CustQuery(309).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getBatchOnlyRequests(enumOutStockPickStatus batchPickState) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)batchPickState; | 
					
						
							|  |  |  |  |             return CustQuery(2500).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public void updateErpSale_deng(bool isOn) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo;  | 
					
						
							|  |  |  |  |             DataTable dt = CustQuery(2600).Tables[0]; | 
					
						
							|  |  |  |  |             foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 int id = Convert.ToInt32(dr["id"].ToString()); | 
					
						
							|  |  |  |  |                 Erp_sale esd = new Erp_sale(id); | 
					
						
							|  |  |  |  |                 if (isOn) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     esd.liangdeng = true; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 esd.Update(); | 
					
						
							|  |  |  |  |                 break; | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public bool setSeedsNo(string seedsPickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = seedsPickOrderNo; | 
					
						
							|  |  |  |  |              return  CustOper(2700)>0; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public bool updateOrderStatus(string pickOrderNo, enumOutStockRequestStatus orderState, enumOutStockDetailStatus detailState, int operater) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)orderState; | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)detailState; | 
					
						
							|  |  |  |  |             cmdParameters[3] = operater; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustOper(431)>0; | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         public List<WmsOutPickRequest> getRequestsReady4Validation() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return getObjs(CustQuery(2800).Tables[0]); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public List<WmsOutPickRequest> getRequestsByTransNo(string transNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  |             return getObjs(getReqDtByTransNo(  transNo)); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getReqDtByTransNo( string transNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = transNo; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return  CustQuery(2900).Tables[0] ; | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         public string createLoadTruckJob(int operId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             if (!string.IsNullOrEmpty(loadTruckJob)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 return loadTruckJob; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             WmsFlow wmsflow = new WmsFlow();  | 
					
						
							|  |  |  |  |             wmsflow.operater = operId; | 
					
						
							|  |  |  |  |             wmsflow.orderNo = pickOrderNo; | 
					
						
							|  |  |  |  |             wmsflow.flowNo = pickOrderNo; | 
					
						
							|  |  |  |  |             wmsflow.type = (int)EnumFlowTaskType.装车运输; | 
					
						
							|  |  |  |  |             wmsflow.typeName = EnumFlowTaskType.装车运输.ToString(); | 
					
						
							|  |  |  |  |             wmsflow.task = Util.getOrderNo(enumCreateOrderType.pickJobNo, getNextSeq(enumCreateOrderType.pickJobNo)); | 
					
						
							|  |  |  |  |             wmsflow.taskCnt = 0;  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             using (TransactionScope scope = new TransactionScope()) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 wmsflow.Add(); | 
					
						
							|  |  |  |  |                 loadTruckJob = wmsflow.task; | 
					
						
							|  |  |  |  |                 operater = operId; | 
					
						
							|  |  |  |  |                 Update(); | 
					
						
							|  |  |  |  |                 scope.Complete(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return wmsflow.task; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public void finishAllFlowTasks(string pickOrderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = pickOrderNo; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             CustOper(3000); | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |     } | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  |   |