| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |  | 
					
						
							|  |  |  |  | /// <summary> | 
					
						
							|  |  |  |  | ///INTERFACE CLASS FOR TABLE t_wmsStock | 
					
						
							|  |  |  |  | ///By wm with codesmith.  | 
					
						
							|  |  |  |  | ///on 05/14/2017 | 
					
						
							|  |  |  |  | /// </summary> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Text; | 
					
						
							|  |  |  |  | using System.Data; | 
					
						
							|  |  |  |  | using DeiNiu.Utils; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace DeiNiu.wms.Data.Model | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     [Serializable] | 
					
						
							|  |  |  |  |     public class WmsStock : WmsStock_base | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         public WmsStock() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public WmsStock(int id): base(id) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |          public WmsStock(DataRow dr): base(dr) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |            | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /*public WmsStock(string goodsId, string batch, string locationId)  | 
					
						
							|  |  |  |  |          { | 
					
						
							|  |  |  |  |              cmdParameters[0] = goodsId; | 
					
						
							|  |  |  |  |              cmdParameters[1] = batch; | 
					
						
							|  |  |  |  |              cmdParameters[2] = locationId; | 
					
						
							|  |  |  |  |              this._goodsId = goodsId; | 
					
						
							|  |  |  |  |              this._batch = batch; | 
					
						
							|  |  |  |  |              this._locationId = locationId; | 
					
						
							|  |  |  |  |              getModel(100); | 
					
						
							|  |  |  |  |          } | 
					
						
							|  |  |  |  |          * */ | 
					
						
							| 
									
										
										
										
											2023-12-03 22:13:49 +08:00
										 |  |  |  |         public WmsStock(string locationId, int skuId, string goodsId = null,string batch=null) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |             cmdParameters[0] = locationId; | 
					
						
							|  |  |  |  |             if (skuId == 0 && !string.IsNullOrEmpty(goodsId)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 cmdParameters[1] = goodsId; | 
					
						
							| 
									
										
										
										
											2023-12-03 22:13:49 +08:00
										 |  |  |  |                 cmdParameters[2] = batch; | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |                 getModel(104); | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             else if(skuId >0) | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |             { | 
					
						
							|  |  |  |  |                 cmdParameters[1] = skuId; | 
					
						
							|  |  |  |  |                 getModel(103); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |   | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /* | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  | public WmsStock( string locationId) | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     cmdParameters[0] = locationId; | 
					
						
							|  |  |  |  |     getModel(110); | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  | * */ | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         protected override void getImp() | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |          { | 
					
						
							|  |  |  |  |              model_imp = new WmsStock_Imp(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |          } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public List<WmsStock> getStockObjs(string locationId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             DataTable dt = getStocks(locationId); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             List<WmsStock> lst = new List<WmsStock>(); | 
					
						
							|  |  |  |  |             foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 lst.Add(new WmsStock(dr)); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return lst; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public List<WmsStock> getLackStockObjs() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             DataTable dt = CustQuery(1900).Tables[0]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             List<WmsStock> lst = new List<WmsStock>(); | 
					
						
							|  |  |  |  |             foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 lst.Add(new WmsStock(dr)); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return lst; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public WmsStock getVirStock(string goodsId,int skuId=0) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             WmsGoods wg = new WmsGoods(goodsId); | 
					
						
							|  |  |  |  |             WmsLocation loc = new WmsLocation(); | 
					
						
							|  |  |  |  |             return new WmsStock(  loc.getVirLocations(wg.part).locationId,skuId,goodsId); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public decimal getAvCount() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             decimal cnt = count - countOut + adjustingCnt +virtialCount; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             if (WmsConstants.OUT_STOCK_DEDUCT) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 cnt = cnt - countOuting; | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-04-12 09:43:41 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             return cnt; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-12 09:43:41 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         /// query same goods locations,存储整货位只含同品同批的情况  ( VOLTYPE=0 OR STORETYPE =0 ) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="skuId"></param> | 
					
						
							|  |  |  |  |         /// <param name="skuCode"></param> | 
					
						
							|  |  |  |  |         /// <param name="goodsId"></param> | 
					
						
							|  |  |  |  |         /// <param name="batch"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public DataTable querySameGoodsLocations(string goodsId, enumWhLocVol volType, int skuId = 0, string batch = "", enumWhType whType = enumWhType.合格库,int recommandWareHouse=0) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         {  | 
					
						
							|  |  |  |  |            if (skuId > 0) | 
					
						
							|  |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |                 return queryBySku(skuId, volType,whType); | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |             }  | 
					
						
							|  |  |  |  |             cmdParameters[0] = goodsId; | 
					
						
							|  |  |  |  |             if (!String.IsNullOrEmpty(batch)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 cmdParameters[1] = batch; | 
					
						
							|  |  |  |  |                 cmdParameters[2] =(int)whType; | 
					
						
							|  |  |  |  |                 return CustQuery(200).Tables[0]; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 cmdParameters[1] = (int)whType; | 
					
						
							|  |  |  |  |                 return CustQuery(203).Tables[0]; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// //query sharing locations,不包括同品同批的情况 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="skuId"></param> | 
					
						
							|  |  |  |  |         /// <param name="batch"></param> | 
					
						
							|  |  |  |  |         /// <param name="goods"></param> | 
					
						
							|  |  |  |  |         /// <param name="volType"></param> | 
					
						
							|  |  |  |  |         /// <param name="locCnt"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable queryOtherSharingLocations(WmsGoods goods, int volType, int locCnt, enumWhType whType = enumWhType.合格库) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  |             cmdParameters[1] = goods;  | 
					
						
							|  |  |  |  |             cmdParameters[3] = volType; | 
					
						
							|  |  |  |  |             cmdParameters[4] = locCnt; | 
					
						
							|  |  |  |  |             cmdParameters[5] = (int)whType;  | 
					
						
							|  |  |  |  |             return CustQuery(204).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         public DataTable queryBySku(int skuId, enumWhLocVol volType, enumWhType whType = enumWhType.合格库) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = skuId; | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |             cmdParameters[1] = (int)whType; | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)volType; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |             return CustQuery(2011).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataTable queryBySku(string skuCode, enumWhType whType = enumWhType.合格库) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = skuCode; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)whType;  | 
					
						
							|  |  |  |  |             return CustQuery(202).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |      | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 根据商品编号和货位容量类别查询 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="goodsId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable queryByGoodsIdVolType(int skuId,string skuCode,string goodsId, string batch, | 
					
						
							|  |  |  |  |             enumWhLocVol locVolType, enumWhType whType) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             if (skuId > 0) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 return queryBySkuVolType(skuId, locVolType, whType); | 
					
						
							|  |  |  |  |             }  | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             if (!string.IsNullOrEmpty( skuCode)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 return queryBySkuVolType(skuCode, locVolType, whType); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             cmdParameters[0] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)locVolType; | 
					
						
							|  |  |  |  |             cmdParameters[2] = batch; | 
					
						
							|  |  |  |  |             cmdParameters[3] = (int)whType; | 
					
						
							|  |  |  |  |             return CustQuery(500).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 根据商品编号和货位容量类别查询 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="goodsId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable queryBySkuVolType(int skuId, enumWhLocVol locVolType, enumWhType whType) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = skuId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)locVolType;   | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)whType; | 
					
						
							|  |  |  |  |             return CustQuery(501).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataTable queryBySkuVolType(string skuCode, enumWhLocVol locVolType, enumWhType whType) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = skuCode; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)locVolType;  | 
					
						
							|  |  |  |  |             cmdParameters[2] = (int)whType; | 
					
						
							|  |  |  |  |             return CustQuery(502).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataSet QueryByName(string namelike,enumWhType whType) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = namelike; | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)whType; | 
					
						
							|  |  |  |  |             | 
					
						
							|  |  |  |  |             return CustQuery(300); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getStockRecord(string orderNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = orderNo; | 
					
						
							|  |  |  |  |             return CustQuery(400).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         private WmsLocation _location; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public WmsLocation location | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             get { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 if (_location == null || _location.locationId != _locationId) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     _location = new WmsLocation(locationId); | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 return _location; | 
					
						
							|  |  |  |  |              | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |               | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public bool isCanDelete() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return countIn == 0  //无待上架库存 | 
					
						
							|  |  |  |  |                     && count - countOut == 0 //架上库存 | 
					
						
							|  |  |  |  |                     && adjustingCnt == 0 | 
					
						
							|  |  |  |  |                     && countOuting == 0 | 
					
						
							| 
									
										
										
										
											2024-03-22 09:59:23 +08:00
										 |  |  |  |                    //            && plateCount <= 0 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |                      && virtialCount == 0; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// // 更新库存出库信息,库存扣完,则删除记录 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public int updateCountOut() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             if (String.IsNullOrEmpty(plateId)) | 
					
						
							|  |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-04-12 09:43:41 +08:00
										 |  |  |  |                 if(ID == 0) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     return 0; | 
					
						
							|  |  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |               //  if (countIn <= 0 && count - countOut <= 0 && countOuting <= 0) //负库存 允许存在 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |                 if (isCanDelete()) //待下架库存 | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |                     { | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |                     LogHelper.debug(typeof(WmsStock), | 
					
						
							| 
									
										
										
										
											2024-04-12 09:43:41 +08:00
										 |  |  |  |                         string.Format("stk id {7}:  locationid {6}, goodsId {0}, 库存扣完删除库存记录,countIn: {1} ,count: {2},countOut: {3} ,countIn: {4},plateCount {5}", | 
					
						
							|  |  |  |  |                         goodsId, countIn, count, countOut, countIn,plateCount,locationId,ID) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |                         ); | 
					
						
							|  |  |  |  |                     return Delete(); // 库存扣完,删除记录 | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 else | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     return base.Update(); | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else //托盘,可能多货品、多批次  | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 WmsPlateStock wps = new WmsPlateStock(skuId,plateId); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 if (countIn <= 0 && count - countOut <= 0 && countOuting <= 0) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     LogHelper.debug(typeof(WmsStock), | 
					
						
							|  |  |  |  |                         string.Format("{0} 库存扣完删除库存记录,countIn: {1} ,count: {2},countOut: {3} ,countIn: {4}", | 
					
						
							|  |  |  |  |                         goodsId, countIn, count, countOut, countIn) | 
					
						
							|  |  |  |  |                         ); | 
					
						
							|  |  |  |  |                     int cnt =wps.Delete(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     DataTable dt = wps.getPlateStock(plateId); | 
					
						
							|  |  |  |  |                     if (dt.Rows.Count == 0) | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         wps.clearPlate(plateId); | 
					
						
							|  |  |  |  |                          | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                     return cnt; | 
					
						
							|  |  |  |  |                     // 库存扣完,删除记录 | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 else | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     wps.countOut = countOut; | 
					
						
							|  |  |  |  |                     wps.countOuting = countOuting; | 
					
						
							|  |  |  |  |                    return wps.Update(); | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             //return 0; | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 删除盘点库位等指定库位类型的库存 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="locType"></param> | 
					
						
							|  |  |  |  |         public void deleteLocByType(enumWhLocVol locType) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = (int)locType; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             CustOper(1600) ; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |        /// <summary> | 
					
						
							|  |  |  |  |        /// 删除指定sku的库存记录 | 
					
						
							|  |  |  |  |        /// 全仓盘点时清除skuId 为0的库存 | 
					
						
							|  |  |  |  |        /// </summary> | 
					
						
							|  |  |  |  |        /// <param name="skuId"></param> | 
					
						
							|  |  |  |  |         public void deleteLocBySkuId(int skuId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = skuId; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             CustOper(1610); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// get location data by locid | 
					
						
							|  |  |  |  |         /// for wince | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="locId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public DataTable getStockLocation(string locId,string goodsId =null) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = locId; | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             cmdParameters[1] = goodsId; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(600).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// stock records | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="locId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getStocks(string locId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = locId; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(620).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         public DataSet queryByGoodsBarcode(string barcode) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = barcode;            | 
					
						
							|  |  |  |  |             return CustQuery(605); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |      | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// get locations by goodsid | 
					
						
							|  |  |  |  |         /// for wince with ch title | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="locId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getGoodsStockLocations(string barcode) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = barcode; | 
					
						
							| 
									
										
										
										
											2023-06-04 12:58:50 +08:00
										 |  |  |  |             return CustQuery(605).Tables[0]; | 
					
						
							|  |  |  |  |            // return CustQuery(610).Tables[0]; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 根据商品比较wms和erp库存 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="locId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getStockLocationCompareErp(string goodsId,string barcode) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = barcode; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(700).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 已下架商品待上架商品列表 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="operId"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataTable getLocationDownList4Up(int operId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = operId; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(800).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |         public DataTable getLocationDownList4UpFlow(int operId,string flowNo) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             if (string.IsNullOrEmpty(flowNo)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 return getLocationDownList4Up(operId); | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             if (WmsConstants.UP_DOWN_SELF_RECS) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 cmdParameters[0] = operId; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |             cmdParameters[1] = flowNo; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(810).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         public DataTable getGoodsERPStoreByBarcode(string barcode) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = barcode; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             return CustQuery(900).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |           | 
					
						
							| 
									
										
										
										
											2023-05-23 23:33:56 +08:00
										 |  |  |  |         public int maintainIssue(int skuId ,enumStockLocationStatus state, int operId) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = skuId;  | 
					
						
							|  |  |  |  |             cmdParameters[1] = (int)state;   | 
					
						
							|  |  |  |  |             cmdParameters[2] = operId; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |           return  CustOper(1000) ; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public void recordMaintain(string locId, int operId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = locId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = operId;         | 
					
						
							|  |  |  |  |             CustOper(1100); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 比较wms erp库存 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="querystr"></param> | 
					
						
							|  |  |  |  |         /// <param name="rownumStart"></param> | 
					
						
							|  |  |  |  |         /// <param name="rownumEnd"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet getStockDiff(string querystr, int rownumStart, int rownumEnd) | 
					
						
							|  |  |  |  |         {              | 
					
						
							|  |  |  |  |             if (rownumEnd > rownumStart && rownumStart > 0) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 this.rownumStart = rownumStart; | 
					
						
							|  |  |  |  |                this.rownumEnd = rownumEnd; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             //  DataSet ds = string.IsNullOrEmpty(querystr) ? _obj.Query() : _obj.Query(querystr); | 
					
						
							|  |  |  |  |         | 
					
						
							|  |  |  |  |             if (string.IsNullOrEmpty(querystr)) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 cmdParameters[0] = querystr; | 
					
						
							|  |  |  |  |                 return CustQuery(199) ; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |               | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr);  | 
					
						
							|  |  |  |  |             return CustQuery(199) ; | 
					
						
							|  |  |  |  |             | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |        | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |         public DataTable getWmsStockDetails(string goodsId, int skuId,string extrQuery) | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2023-11-21 19:18:23 +08:00
										 |  |  |  |             cmdParameters[0] = skuId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[2] = getCondition(extrQuery);  | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |             return CustQuery(1200).Tables[0]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-12 09:43:41 +08:00
										 |  |  |  |         public void cleanPandiane() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             CustOper(2300); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |         public DataTable getFreeStockLocations(string goodsId, int count) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = count; | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  |             return CustQuery(1300).Tables[0]; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |           | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 库存汇总  | 
					
						
							|  |  |  |  |         /// sum by goodsId, batch | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="queryStr"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet QuerySum(string querystr, int rownumStart, int rownumEnd) | 
					
						
							|  |  |  |  |         {  | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr, rownumStart, rownumEnd);  | 
					
						
							|  |  |  |  |             return CustQuery(101) ; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 库存汇总  | 
					
						
							|  |  |  |  |         /// sum by goodsId  | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="queryStr"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet QuerySumNoBatch(string querystr, int rownumStart, int rownumEnd) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr, rownumStart, rownumEnd); | 
					
						
							|  |  |  |  |             return CustQuery(98); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 零库查询,补货参考 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="queryStr"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet QueryBulkRep(string querystr, int rownumStart, int rownumEnd) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr, rownumStart, rownumEnd);  | 
					
						
							|  |  |  |  |             return CustQuery(102); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |       /// <summary> | 
					
						
							|  |  |  |  |       /// 查询库存变动记录 | 
					
						
							|  |  |  |  |       /// </summary> | 
					
						
							|  |  |  |  |       /// <param name="querystr"></param> | 
					
						
							|  |  |  |  |       /// <param name="rownumStart"></param> | 
					
						
							|  |  |  |  |       /// <param name="rownumEnd"></param> | 
					
						
							|  |  |  |  |       /// <returns></returns> | 
					
						
							|  |  |  |  |         public DataSet queryStockRecords(string querystr, int rownumStart, int rownumEnd) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr, rownumStart, rownumEnd); | 
					
						
							|  |  |  |  |             return CustQuery(1400); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public DataTable getStockInfo(string goodsId,int skuId=0,string batch="",  enumWhType whType = enumWhType.合格库) | 
					
						
							|  |  |  |  |         {  | 
					
						
							|  |  |  |  |            // Sku sku = skuId > 0 ? new Sku(skuId) : new Sku(skuCode);  | 
					
						
							|  |  |  |  |          //   int SKUID = sku.ID;  | 
					
						
							|  |  |  |  |             cmdParameters[0] = goodsId; | 
					
						
							|  |  |  |  |             cmdParameters[1] = skuId;// batch; | 
					
						
							|  |  |  |  |             cmdParameters[2] = batch;// batch; | 
					
						
							|  |  |  |  |             cmdParameters[3] = (int)whType; | 
					
						
							|  |  |  |  |             return CustQuery(401).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public decimal getUsedPercent(string locationId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             /* | 
					
						
							|  |  |  |  |             WmsStock stock; | 
					
						
							|  |  |  |  |             WmsGoods goods; | 
					
						
							|  |  |  |  |             decimal maxcnt = 0; | 
					
						
							|  |  |  |  |             decimal percent=0; | 
					
						
							|  |  |  |  |             Wmslocation loc = new Wmslocation(locationId); | 
					
						
							|  |  |  |  |             DataTable dt = getStocks(locationId); | 
					
						
							|  |  |  |  |             foreach (DataRow dr in dt.Rows) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 stock = new WmsStock(dr); | 
					
						
							|  |  |  |  |                 goods = new WmsGoods(stock.goodsId); | 
					
						
							|  |  |  |  |                 decimal cnt = stock.count - stock.countOut + stock.countIn;//- stock.countOuting; //see v_stockGoods   (dbo.v_stockGoodsBasic.countIn + dbo.v_stockGoodsBasic.countOut + dbo.v_stockGoodsBasic.count)  / dbo.v_stockGoodsBasic.maxCount AS usedPercent, | 
					
						
							|  |  |  |  |                  | 
					
						
							|  |  |  |  |                 maxcnt = goods.getMaxCount(loc.volType); | 
					
						
							|  |  |  |  |                 maxcnt = maxcnt > 0 ? maxcnt : 1; | 
					
						
							|  |  |  |  |                 percent += cnt / maxcnt; | 
					
						
							|  |  |  |  |                | 
					
						
							|  |  |  |  |             }*/ | 
					
						
							|  |  |  |  |             cmdParameters[0] = locationId; | 
					
						
							|  |  |  |  |             DataTable dt = CustQuery(1500).Tables[0]; | 
					
						
							|  |  |  |  |             try | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 if (dt.Rows.Count > 0) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     return Convert.ToDecimal(dt.Rows[0][0].ToString()); | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             catch { } | 
					
						
							|  |  |  |  |             return 0; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |        | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public DataSet queryPlateStock(string querystr, int rownumStart, int rownumEnd) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr, rownumStart, rownumEnd); | 
					
						
							|  |  |  |  |             return CustQuery(1700); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         public DataTable queryPerformanceKPI(string querystr,bool isSum) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = getCondition(querystr, rownumStart, rownumEnd); | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             if(isSum) | 
					
						
							|  |  |  |  |                 return CustQuery(1810).Tables[0]; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             return CustQuery(1820).Tables[0]; | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public DataTable getElbPartStks(int part) | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |             cmdParameters[0] = part; | 
					
						
							|  |  |  |  |             return CustQuery(2000).Tables[0]; | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public DataTable getElbPartTasksSum(int part) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             cmdParameters[0] = part; | 
					
						
							|  |  |  |  |             return CustQuery(2100).Tables[0]; | 
					
						
							| 
									
										
										
										
											2023-09-04 22:41:19 +08:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-06 19:36:47 +08:00
										 |  |  |  |         public DataSet queryTmps() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             return CustQuery(2200) ; | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2023-05-23 16:13:17 +08:00
										 |  |  |  |     } | 
					
						
							|  |  |  |  | } | 
					
						
							|  |  |  |  |   |