Compare commits
	
		
			3 Commits
		
	
	
		
			db2e131db6
			...
			15760b79b3
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 15760b79b3 | |
|  | 282b0ae460 | |
|  | 6ddd51ad0b | 
|  | @ -18,19 +18,19 @@ using System.Threading; | ||||||
| namespace DeiNiu.wms.Logical | namespace DeiNiu.wms.Logical | ||||||
| { | { | ||||||
|     [Serializable] |     [Serializable] | ||||||
|     public class lWmsPlate   :lbase |     public class lWmsPlate : lbase | ||||||
|     { |     { | ||||||
|         WmsPlate _obj; |         WmsPlate _obj; | ||||||
|         public lWmsPlate() |         public lWmsPlate() | ||||||
|         { |         { | ||||||
|              initialize(); |             initialize(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public  WmsPlate getWmsPlate |         public WmsPlate getWmsPlate | ||||||
|         { |         { | ||||||
|             get |             get | ||||||
|             { |             { | ||||||
|              if (_obj == null) |                 if (_obj == null) | ||||||
|                 { |                 { | ||||||
|                     _obj = new WmsPlate(); |                     _obj = new WmsPlate(); | ||||||
| 
 | 
 | ||||||
|  | @ -61,9 +61,9 @@ namespace DeiNiu.wms.Logical | ||||||
|         { |         { | ||||||
|             get |             get | ||||||
|             { |             { | ||||||
|                 if (_lop == null || _lop.operId!=operId) |                 if (_lop == null || _lop.operId != operId) | ||||||
|                 { |                 { | ||||||
|                  //   log.Debug(string.Format("_lop is null? {0},lop.operId {1}, operId {2}", _lop == null, lop.operId, operId)); |                     //   log.Debug(string.Format("_lop is null? {0},lop.operId {1}, operId {2}", _lop == null, lop.operId, operId)); | ||||||
|                     _lop = new lWmsOutPickRequest(operId); |                     _lop = new lWmsOutPickRequest(operId); | ||||||
| 
 | 
 | ||||||
|                 } |                 } | ||||||
|  | @ -79,12 +79,12 @@ namespace DeiNiu.wms.Logical | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 		/// <summary> |         /// <summary> | ||||||
| 		/// get all data |         /// get all data | ||||||
| 		/// </summary> |         /// </summary> | ||||||
|         public DataSet getAllData() |         public DataSet getAllData() | ||||||
|         { |         { | ||||||
|            return _obj.Query(); |             return _obj.Query(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|  | @ -97,13 +97,13 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 		/// <summary> |         /// <summary> | ||||||
| 		/// get a record by id |         /// get a record by id | ||||||
| 		/// </summary> |         /// </summary> | ||||||
|         public void initialize(int id) |         public void initialize(int id) | ||||||
| 		{ |         { | ||||||
|             _obj = id != 0 ? new WmsPlate(id) : new WmsPlate(); |             _obj = id != 0 ? new WmsPlate(id) : new WmsPlate(); | ||||||
| 		} |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
| 		/// get a record by id 0 | 		/// get a record by id 0 | ||||||
|  | @ -113,12 +113,12 @@ namespace DeiNiu.wms.Logical | ||||||
|             initialize(0); |             initialize(0); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|          /// <summary> |         /// <summary> | ||||||
|         /// get a record by id |         /// get a record by id | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         public void initialize(DataRow dr) |         public void initialize(DataRow dr) | ||||||
|         { |         { | ||||||
|             _obj =   new WmsPlate(dr); |             _obj = new WmsPlate(dr); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         protected override DeiNiu.Data.BaseObject.BaseModel getModel() |         protected override DeiNiu.Data.BaseObject.BaseModel getModel() | ||||||
|  | @ -128,7 +128,7 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|         //begin cust db operation, query, excute sql etc. |         //begin cust db operation, query, excute sql etc. | ||||||
| 
 | 
 | ||||||
|         internal int add(WmsPlate obj,int count) |         internal int add(WmsPlate obj, int count) | ||||||
|         { |         { | ||||||
|             for (int i = 0; i < count; i++) |             for (int i = 0; i < count; i++) | ||||||
|             { |             { | ||||||
|  | @ -147,7 +147,7 @@ namespace DeiNiu.wms.Logical | ||||||
|         /// put goods into a plate |         /// put goods into a plate | ||||||
|         /// </summary> |         /// </summary> | ||||||
| 
 | 
 | ||||||
|         public enumRegPlateResult inPlate(string plateId,enumPlateStatus type, string goodsId,string barcode,int skuId,decimal count,string orderNo) |         public enumRegPlateResult inPlate(string plateId, enumPlateStatus type, string goodsId, string barcode, int skuId, decimal count, string orderNo) | ||||||
|         { |         { | ||||||
|             /*if (valid(  plateId,  type,   goodsId,  skuId) == enumRegPlateResult.成功) |             /*if (valid(  plateId,  type,   goodsId,  skuId) == enumRegPlateResult.成功) | ||||||
|             { |             { | ||||||
|  | @ -229,7 +229,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                 WmsGoods wg = new WmsGoods(goodsId); |                 WmsGoods wg = new WmsGoods(goodsId); | ||||||
|                 foreach (DataRow dr in dt.Rows) |                 foreach (DataRow dr in dt.Rows) | ||||||
|                 { |                 { | ||||||
|                     if ( Convert.ToInt32(dr["goodsType"].ToString()) == wg.goodsType)//存在goods type |                     if (Convert.ToInt32(dr["goodsType"].ToString()) == wg.goodsType)//存在goods type | ||||||
|                     { |                     { | ||||||
|                         return enumRegPlateResult.成功; |                         return enumRegPlateResult.成功; | ||||||
|                     } |                     } | ||||||
|  | @ -242,7 +242,7 @@ namespace DeiNiu.wms.Logical | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|            return enumRegPlateResult.成功; |             return enumRegPlateResult.成功; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|  | @ -277,7 +277,7 @@ namespace DeiNiu.wms.Logical | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             WmsPlatePack wpp = new WmsPlatePack(); |             WmsPlatePack wpp = new WmsPlatePack(); | ||||||
|           //  wpp.getUpPlateId(fromPlate); |             //  wpp.getUpPlateId(fromPlate); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|             wpp.plateId = toPlate; |             wpp.plateId = toPlate; | ||||||
|  | @ -307,7 +307,7 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|                 List<WmsFlow> jflows = new List<WmsFlow>(); |                 List<WmsFlow> jflows = new List<WmsFlow>(); | ||||||
| 
 | 
 | ||||||
|                 foreach(WmsOutPickRequest wop in requests) |                 foreach (WmsOutPickRequest wop in requests) | ||||||
|                 { |                 { | ||||||
|                     jflows.Add(new WmsFlow(wop.pickOrderNo + fromPlate)); |                     jflows.Add(new WmsFlow(wop.pickOrderNo + fromPlate)); | ||||||
|                 } |                 } | ||||||
|  | @ -356,7 +356,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                             } |                             } | ||||||
|                             */ |                             */ | ||||||
| 
 | 
 | ||||||
|                             foreach(WmsFlow flow in jflows) |                             foreach (WmsFlow flow in jflows) | ||||||
|                             { |                             { | ||||||
|                                 flow.finishedTasksPlus(operId, 1); |                                 flow.finishedTasksPlus(operId, 1); | ||||||
|                             } |                             } | ||||||
|  | @ -420,8 +420,8 @@ namespace DeiNiu.wms.Logical | ||||||
|                         { |                         { | ||||||
|                             if (string.IsNullOrEmpty(req.loadTruckJob) && string.IsNullOrEmpty(toP.jobNo)) |                             if (string.IsNullOrEmpty(req.loadTruckJob) && string.IsNullOrEmpty(toP.jobNo)) | ||||||
|                             { |                             { | ||||||
|                                  req.loadTruckJob = toP.jobNo; |                                 req.loadTruckJob = toP.jobNo; | ||||||
|                                  req.Update(); |                                 req.Update(); | ||||||
|                             } |                             } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -535,7 +535,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                     toP.lineId = fromP.lineId; |                     toP.lineId = fromP.lineId; | ||||||
| 
 | 
 | ||||||
|                 } |                 } | ||||||
|                 else if (WmsConstants.IS_PLATE_IN_LINE &&  toP.lineId != (fromP.lineId) && fromP.lineId > 0) |                 else if (WmsConstants.IS_PLATE_IN_LINE && toP.lineId != (fromP.lineId) && fromP.lineId > 0) | ||||||
|                 { |                 { | ||||||
|                     return enumRegPlateResult.集货线路不同; |                     return enumRegPlateResult.集货线路不同; | ||||||
|                 } |                 } | ||||||
|  | @ -628,7 +628,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                     { |                     { | ||||||
|                         toP.transNo = Util.getOrderNo(enumCreateOrderType.transOrder, _obj.getNextSeq(enumCreateOrderType.transOrder)); |                         toP.transNo = Util.getOrderNo(enumCreateOrderType.transOrder, _obj.getNextSeq(enumCreateOrderType.transOrder)); | ||||||
|                         toP.Update(); |                         toP.Update(); | ||||||
|                         logPlate.Debug(string.Format("plate {0} start new trans {1}", toPlate, toP.transNo)); |                         logPlate.Debug(string.Format("1 plate {0} start new trans {1}", toPlate, toP.transNo)); | ||||||
|                         new lTmsTranRequest(operId).createSimpleTran(requests, toP);// req.transNo = toP.transNo; |                         new lTmsTranRequest(operId).createSimpleTran(requests, toP);// req.transNo = toP.transNo; | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|  | @ -746,15 +746,15 @@ namespace DeiNiu.wms.Logical | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             WmsPlateStock_tmp ptmp = new WmsPlateStock_tmp(); |             WmsPlateStock_tmp ptmp = new WmsPlateStock_tmp(); | ||||||
|            WmsFlow jflow = new WmsFlow(); |             WmsFlow jflow = new WmsFlow(); | ||||||
|           //  List<WmsFlow> jflows = new List<WmsFlow>(); |             //  List<WmsFlow> jflows = new List<WmsFlow>(); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|             WmsPlate toP = new WmsPlate(toPlate); |             WmsPlate toP = new WmsPlate(toPlate); | ||||||
|             int lineId = fromP.lineId; |             int lineId = fromP.lineId; | ||||||
|             if (fromP.ID == 0 || fromP.volume==0 ) //临时容器 |             if (fromP.ID == 0 || fromP.volume == 0) //临时容器 | ||||||
|             { |             { | ||||||
| 
 | 
 | ||||||
|                 DataTable dt2 = ptmp.getStockLst(fromPlate); |                 DataTable dt2 = ptmp.getStockLst(fromPlate); | ||||||
|  | @ -799,7 +799,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                 toP.lineId = lineId; |                 toP.lineId = lineId; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if(WmsConstants.IS_PLATE_IN_LINE && lineId>0 && lineId != toP.lineId) |             if (WmsConstants.IS_PLATE_IN_LINE && lineId > 0 && lineId != toP.lineId) | ||||||
|             { |             { | ||||||
| 
 | 
 | ||||||
|                 return enumRegPlateResult.集货线路不同; |                 return enumRegPlateResult.集货线路不同; | ||||||
|  | @ -826,12 +826,12 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|                 if (jflow.ID > 0) |                 if (jflow.ID > 0) | ||||||
|                 { |                 { | ||||||
|                     jflow.finishedTasksPlus(operId,1, false, true); |                     jflow.finishedTasksPlus(operId, 1, false, true); | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                  wpp.removeUp(); |                 wpp.removeUp(); | ||||||
| 
 | 
 | ||||||
|                  int id=  wpp.Add(); |                 int id = wpp.Add(); | ||||||
| 
 | 
 | ||||||
|                 log.Debug("load truck add plate pack id " + id); |                 log.Debug("load truck add plate pack id " + id); | ||||||
| 
 | 
 | ||||||
|  | @ -840,7 +840,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                 { |                 { | ||||||
|                     toP.transNo = Util.getOrderNo(enumCreateOrderType.transOrder, _obj.getNextSeq(enumCreateOrderType.transOrder)); |                     toP.transNo = Util.getOrderNo(enumCreateOrderType.transOrder, _obj.getNextSeq(enumCreateOrderType.transOrder)); | ||||||
| 
 | 
 | ||||||
|                     logPlate.Debug(string.Format("plate {0} start new trans {1}", toPlate, toP.transNo)); |                     logPlate.Debug(string.Format("2 plate {0} start new trans {1}, top.ID {2}", toPlate, toP.transNo, toP.ID)); | ||||||
|                     new lTmsTranRequest(operId).createSimpleTran(requests, toP);// req.transNo = toP.transNo; |                     new lTmsTranRequest(operId).createSimpleTran(requests, toP);// req.transNo = toP.transNo; | ||||||
| 
 | 
 | ||||||
|                     //  return enumRegPlateResult.完成装车集货后才能装车; |                     //  return enumRegPlateResult.完成装车集货后才能装车; | ||||||
|  | @ -889,6 +889,7 @@ namespace DeiNiu.wms.Logical | ||||||
|                 { |                 { | ||||||
|                     toP.Update(); |                     toP.Update(); | ||||||
|                 } |                 } | ||||||
|  |                 logPlate.Debug(string.Format("3  plate {0} start new trans {1}, top.ID {2}", toPlate, toP.transNo, toP.ID)); | ||||||
| 
 | 
 | ||||||
|                 foreach (WmsOutPickRequest req in requests) |                 foreach (WmsOutPickRequest req in requests) | ||||||
|                 { |                 { | ||||||
|  | @ -898,27 +899,30 @@ namespace DeiNiu.wms.Logical | ||||||
|                         req.Update(); |                         req.Update(); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
| 
 |                  //非自动装车时,释放已装车容器,自动装车时不能释放,会导致客户集货位释放从而失去客户和容器的对应关系限制 | ||||||
| 
 |                 if (WmsConstants.IS_PLATE_IN_LINE && !WmsConstants.AUTO_LOAD_TRUCK) | ||||||
|                 if (fromP.ID > 0) |  | ||||||
|                 { |                 { | ||||||
|                     //to release plates of customer type |                     if (fromP.ID > 0) | ||||||
|                     List<WmsPlate> lst = getWmsPlate.getSubPlates(fromPlate); |  | ||||||
| 
 |  | ||||||
|                     foreach (WmsPlate s in lst) |  | ||||||
|                     { |                     { | ||||||
|                         s.releaseSubPlate(s.plateId);  //to release customer and its subs |                         //to release plates of customer type | ||||||
|                                                        // log.Debug(string.Format("on truck load, released plate {0}, type{1}", s.plateId, (enumPlateLevel)s.type)); |                         List<WmsPlate> lst = getWmsPlate.getSubPlates(fromPlate); | ||||||
|  | 
 | ||||||
|  |                         foreach (WmsPlate s in lst) | ||||||
|  |                         { | ||||||
|  |                             s.releaseSubPlate(s.plateId);  //to release customer and its subs | ||||||
|  |                                                            // log.Debug(string.Format("on truck load, released plate {0}, type{1}", s.plateId, (enumPlateLevel)s.type)); | ||||||
|  |                         } | ||||||
|  |                         getWmsPlate.releaseSubPlate(fromPlate);  //to release custType type and its subs | ||||||
|  |                         log.Debug(string.Format("on truck load, released plate {0} ", fromPlate)); | ||||||
|                     } |                     } | ||||||
|                     getWmsPlate.releaseSubPlate(fromPlate);  //to release custType type and its subs |  | ||||||
|                     log.Debug(string.Format("on truck load, released plate {0} ", fromPlate)); |  | ||||||
|                 } |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                     //to release plate of Line |                     //to release plate of Line | ||||||
|                     // 线路码头容器里面的客户容器是否已经全部装车了,如果都已装车(释放),则释放线路容器 |                     // 线路码头容器里面的客户容器是否已经全部装车了,如果都已装车(释放),则释放线路容器 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|                     if (fromP.plateLevel == (int)enumPlateLevel.客户集货) |                     if (fromP.plateLevel == (int)enumPlateLevel.客户集货) | ||||||
|                     { |                     { | ||||||
|                         WmsPlate linePlate = new WmsPlate(fromP.inPlate); |                         WmsPlate linePlate = new WmsPlate(fromP.inPlate); | ||||||
|  | @ -932,11 +936,14 @@ namespace DeiNiu.wms.Logical | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
| 
 | 
 | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|                 string ldTask = fromP.jobNo; |                 string ldTask = fromP.jobNo; | ||||||
|               // if (string.IsNullOrEmpty(ldTask))  // 非固定容器、非客户集货类型的容器,容器没有装车任务信息 |                 // if (string.IsNullOrEmpty(ldTask))  // 非固定容器、非客户集货类型的容器,容器没有装车任务信息 | ||||||
|                 { |                 { | ||||||
|                     foreach (WmsOutPickRequest req in requests) //容器里可能有多个分拣单,多个装车任务 |                     foreach (WmsOutPickRequest req in requests) //容器里可能有多个分拣单,多个装车任务 | ||||||
|                     { |                     { | ||||||
|  | @ -963,7 +970,7 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|             if (plate.ID > 0 && plate.type != (int)enumPlateLevel.运输车) |             if (plate.ID > 0 && plate.type != (int)enumPlateLevel.运输车) | ||||||
|             { |             { | ||||||
|               //  return enumRegPlateResult.发车需要运输类型的容器; |                 //  return enumRegPlateResult.发车需要运输类型的容器; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -1041,22 +1048,22 @@ namespace DeiNiu.wms.Logical | ||||||
|                         { |                         { | ||||||
|                             wop = new WmsOutPickPort(dr); |                             wop = new WmsOutPickPort(dr); | ||||||
| 
 | 
 | ||||||
|                                 WmsStock st = new WmsStock(wop.locationId, Convert.ToInt32(dr["skuId"].ToString()), dr["goodsId"].ToString()); |                             WmsStock st = new WmsStock(wop.locationId, Convert.ToInt32(dr["skuId"].ToString()), dr["goodsId"].ToString()); | ||||||
| 
 | 
 | ||||||
|                                 if (wop.virtialCnt > 0) //还回未出库虚拟库存 |                             if (wop.virtialCnt > 0) //还回未出库虚拟库存 | ||||||
|                                 { |                             { | ||||||
|                                     st.virtialCount -= wop.virtialCnt; |                                 st.virtialCount -= wop.virtialCnt; | ||||||
|                                     st.virtialCount = st.virtialCount > 0 ? st.virtialCount : 0; |                                 st.virtialCount = st.virtialCount > 0 ? st.virtialCount : 0; | ||||||
| 
 | 
 | ||||||
|                                     WmsStock virSt = st.getVirStock(st.goodsId); |                                 WmsStock virSt = st.getVirStock(st.goodsId); | ||||||
|                                     virSt.countOuting -= wop.virtialCnt; |                                 virSt.countOuting -= wop.virtialCnt; | ||||||
|                                     virSt.updateCountOut(); |                                 virSt.updateCountOut(); | ||||||
|                                 } |                             } | ||||||
| 
 | 
 | ||||||
|                                 st.countOuting -= wop.count; |                             st.countOuting -= wop.count; | ||||||
|                                 st.countOuting = st.countOuting > 0 ? st.countOuting : 0; ; |                             st.countOuting = st.countOuting > 0 ? st.countOuting : 0; ; | ||||||
| 
 | 
 | ||||||
|                                 st.updateCountOut();  |                             st.updateCountOut(); | ||||||
| 
 | 
 | ||||||
|                         } |                         } | ||||||
|                         wop.closePickPorts(req.pickOrderNo); |                         wop.closePickPorts(req.pickOrderNo); | ||||||
|  | @ -1083,7 +1090,7 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|                     if (tranP.plateLevel == (int)enumPlateLevel.临时容器) |                     if (tranP.plateLevel == (int)enumPlateLevel.临时容器) | ||||||
|                     { |                     { | ||||||
|                       //  tranP.Delete(); |                         tranP.Delete(); | ||||||
|                     } |                     } | ||||||
| 
 | 
 | ||||||
|                     scope.Complete(); |                     scope.Complete(); | ||||||
|  | @ -1142,24 +1149,25 @@ namespace DeiNiu.wms.Logical | ||||||
|             return 0; |             return 0; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public void releasePlateStock(string plateId,decimal count, int inPortId =0,int outPortId =0) |         public void releasePlateStock(string plateId, decimal count, int inPortId = 0, int outPortId = 0) | ||||||
|         { |         { | ||||||
|             logPlate.Debug(string.Format("plateId {0},count {1},inPortId {2},outPortId {3}", plateId,   count,   inPortId,   outPortId)); |             logPlate.Debug(string.Format("plateId {0},count {1},inPortId {2},outPortId {3}", plateId, count, inPortId, outPortId)); | ||||||
|             WmsPlateStock_tmp plateStock = new WmsPlateStock_tmp(); |             WmsPlateStock_tmp plateStock = new WmsPlateStock_tmp(); | ||||||
|             if(count==0 && inPortId==0 && outPortId == 0) |             if (count == 0 && inPortId == 0 && outPortId == 0) | ||||||
|             { |             { | ||||||
|                  int cnt=   plateStock.releasePlate(plateId); |                 int cnt = plateStock.releasePlate(plateId); | ||||||
|                 logPlate.Debug(string.Format("release plate {0} ",plateId)); |                 logPlate.Debug(string.Format("release plate {0} ", plateId)); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             DataTable dt; |             DataTable dt; | ||||||
|             if (inPortId > 0) { |             if (inPortId > 0) | ||||||
|                   dt = plateStock.getPlateIn(plateId, inPortId);  |             { | ||||||
|  |                 dt = plateStock.getPlateIn(plateId, inPortId); | ||||||
|             } |             } | ||||||
|             else |             else | ||||||
| 
 | 
 | ||||||
|              dt = plateStock.getPlateOut(plateId, outPortId); |                 dt = plateStock.getPlateOut(plateId, outPortId); | ||||||
| 
 | 
 | ||||||
|             logPlate.Debug(string.Format(" stk items count {0} ", dt.Rows.Count)); |             logPlate.Debug(string.Format(" stk items count {0} ", dt.Rows.Count)); | ||||||
|             foreach (DataRow dr in dt.Rows) |             foreach (DataRow dr in dt.Rows) | ||||||
|  | @ -1182,16 +1190,16 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|       public DataTable getPateJobsDt(string plateId, bool showSub = false) |         public DataTable getPateJobsDt(string plateId, bool showSub = false) | ||||||
|         { |         { | ||||||
|             DataTable dt = getWmsPlate.getPateJobsDt(  plateId,   showSub  ); |             DataTable dt = getWmsPlate.getPateJobsDt(plateId, showSub); | ||||||
|             logTest.Debug(string.Format("plate {0} ,showSub {1}, all contents size {2}", plateId, showSub, dt.Rows.Count)); |             logTest.Debug(string.Format("plate {0} ,showSub {1}, all contents size {2}", plateId, showSub, dt.Rows.Count)); | ||||||
|             return dt; |             return dt; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         internal DataTable queryRegistedPlate(string flowNo) |         internal DataTable queryRegistedPlate(string flowNo) | ||||||
|         { |         { | ||||||
|              return getWmsPlate.queryRegistedPlate(flowNo); |             return getWmsPlate.queryRegistedPlate(flowNo); | ||||||
|         } |         } | ||||||
|         internal DataTable getFromPlate(string flowNo) |         internal DataTable getFromPlate(string flowNo) | ||||||
|         { |         { | ||||||
|  | @ -1202,7 +1210,7 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|         internal enumRegPlateResult takeOutPlate(string fromPlate, string plate) |         internal enumRegPlateResult takeOutPlate(string fromPlate, string plate) | ||||||
|         { |         { | ||||||
|             WmsPlatePack wpp = new WmsPlatePack(fromPlate,plate); |             WmsPlatePack wpp = new WmsPlatePack(fromPlate, plate); | ||||||
|             log.Debug(string.Format("fromPlate {0}, plate {1}", fromPlate, plate)); |             log.Debug(string.Format("fromPlate {0}, plate {1}", fromPlate, plate)); | ||||||
|             if (wpp.ID == 0) |             if (wpp.ID == 0) | ||||||
|             { |             { | ||||||
|  | @ -1237,18 +1245,18 @@ namespace DeiNiu.wms.Logical | ||||||
|         /// <param name="validReason"></param> |         /// <param name="validReason"></param> | ||||||
|         /// <param name="finialValidation">是否只纠正账目,品相正确只是数量差异,则按实际拿的发</param> |         /// <param name="finialValidation">是否只纠正账目,品相正确只是数量差异,则按实际拿的发</param> | ||||||
|         /// <returns></returns> |         /// <returns></returns> | ||||||
|         internal enumOutValidResult plateValidation(string plateId,int portId,int skuId,string productDate,string validDate,string batch, decimal validationCnt, string validReason,bool finialValidation=true) |         internal enumOutValidResult plateValidation(string plateId, int portId, int skuId, string productDate, string validDate, string batch, decimal validationCnt, string validReason, bool finialValidation = true) | ||||||
|         { |         { | ||||||
| 
 | 
 | ||||||
|             log.Debug(string.Format("容器复核。。。。   portId {0},  skuId {1},  productDate {2},  validDate {3},  batch {4},   validationCnt {5},   validReason {6},  finialValidation {7}", |             log.Debug(string.Format("容器复核。。。。   portId {0},  skuId {1},  productDate {2},  validDate {3},  batch {4},   validationCnt {5},   validReason {6},  finialValidation {7}", | ||||||
|                 portId,   skuId,   productDate,   validDate,   batch,   validationCnt,   validReason,   finialValidation)); |                 portId, skuId, productDate, validDate, batch, validationCnt, validReason, finialValidation)); | ||||||
|             WmsPlateStock_tmp wst = new WmsPlateStock_tmp().getModelByOutPort(plateId,portId); |             WmsPlateStock_tmp wst = new WmsPlateStock_tmp().getModelByOutPort(plateId, portId); | ||||||
| 
 | 
 | ||||||
|             WmsOutPickPort wpp = new WmsOutPickPort(portId); |             WmsOutPickPort wpp = new WmsOutPickPort(portId); | ||||||
|             WmsOutPickDetail wpd = new WmsOutPickDetail(wpp.pickDetailId); |             WmsOutPickDetail wpd = new WmsOutPickDetail(wpp.pickDetailId); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|           //  WmsOrderRequest wor = new WmsOrderRequest(); |             //  WmsOrderRequest wor = new WmsOrderRequest(); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|             wpp.validationCnt = validationCnt; |             wpp.validationCnt = validationCnt; | ||||||
|  | @ -1267,18 +1275,18 @@ namespace DeiNiu.wms.Logical | ||||||
|             log.Debug(string.Format("容器复核  原数量 {0}, 差异 {1} ", wst.count, diffCnt)); |             log.Debug(string.Format("容器复核  原数量 {0}, 差异 {1} ", wst.count, diffCnt)); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|              WmsStock stk = null; |             WmsStock stk = null; | ||||||
|             WmsStockRecord wsr = null; |             WmsStockRecord wsr = null; | ||||||
|             if (diffCnt != 0) |             if (diffCnt != 0) | ||||||
|             { |             { | ||||||
|                 wst.count = validationCnt; |                 wst.count = validationCnt; | ||||||
|                 wsr = new WmsStockRecord(wpp.recordId); |                 wsr = new WmsStockRecord(wpp.recordId); | ||||||
|                 stk = new WmsStock(wpp.locationId,  skuId); |                 stk = new WmsStock(wpp.locationId, skuId); | ||||||
|               //  stk.adjustingCnt += diffCnt; |                 //  stk.adjustingCnt += diffCnt; | ||||||
|                 stk.count += diffCnt; |                 stk.count += diffCnt; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|                 log.Debug(string.Format("容器复核  volType  {0}, 差异 {1}, pickdetail id {2} ,pick bulk cnt {3}, seeded cnt {4} pick batch cnt {5} ", wst.count, diffCnt,wpd.ID, wpd.bulkPicked,wpd.seeded,wpd.batchPicked)); |                 log.Debug(string.Format("容器复核  volType  {0}, 差异 {1}, pickdetail id {2} ,pick bulk cnt {3}, seeded cnt {4} pick batch cnt {5} ", wst.count, diffCnt, wpd.ID, wpd.bulkPicked, wpd.seeded, wpd.batchPicked)); | ||||||
| 
 | 
 | ||||||
|                 //少拿不补 |                 //少拿不补 | ||||||
|                 //多拿不退  |                 //多拿不退  | ||||||
|  | @ -1301,11 +1309,11 @@ namespace DeiNiu.wms.Logical | ||||||
|                 if (diffCnt != 0) |                 if (diffCnt != 0) | ||||||
|                 { |                 { | ||||||
|                     string description = string.Format("\n 业务类型:{0} {5},拣货任务{1},计划数量 {2}, 实际数量{3}, 备注:{4}", "容器复核", |                     string description = string.Format("\n 业务类型:{0} {5},拣货任务{1},计划数量 {2}, 实际数量{3}, 备注:{4}", "容器复核", | ||||||
|                         wpp.ID,wpp.count,validationCnt, validReason,  finialValidation ? " 按拣货数量发货" :" 实物多退少补,按需求发"   ); |                         wpp.ID, wpp.count, validationCnt, validReason, finialValidation ? " 按拣货数量发货" : " 实物多退少补,按需求发"); | ||||||
| 
 | 
 | ||||||
|                     log.Debug(description); |                     log.Debug(description); | ||||||
| 
 | 
 | ||||||
|                     int i =  wpd.Update(); |                     int i = wpd.Update(); | ||||||
| 
 | 
 | ||||||
|                     log.Debug(" pick detail count updated rows " + i); |                     log.Debug(" pick detail count updated rows " + i); | ||||||
| 
 | 
 | ||||||
|  | @ -1346,9 +1354,11 @@ namespace DeiNiu.wms.Logical | ||||||
|             return getWmsPlate.getLatestPlate(custId, goodsId).plateId; |             return getWmsPlate.getLatestPlate(custId, goodsId).plateId; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|        public DataTable getUnLoadTruckStks(string toPlate, int cnt) |         public DataTable getUnLoadTruckStks(string toPlate, int cnt) | ||||||
|         { |         { | ||||||
|             return plateStk.getUnLoadTruckStks(toPlate,cnt); |             log.Debug(string.Format("...... to getUnLoadTruckStks plateId {0}",toPlate)); | ||||||
|  |             WmsPlate toP = new WmsPlate(toPlate); | ||||||
|  |             return plateStk.getUnLoadTruckStks(toP.transNo,cnt); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public DataTable getLoadContent(string toPlate) |         public DataTable getLoadContent(string toPlate) | ||||||
|  | @ -1358,12 +1368,11 @@ namespace DeiNiu.wms.Logical | ||||||
| 
 | 
 | ||||||
|         internal string getGoodsById(string goodsId) |         internal string getGoodsById(string goodsId) | ||||||
|         { |         { | ||||||
|             WmsGoods goods = new WmsGoods(goodsId,0,""); |             WmsGoods goods = new WmsGoods(goodsId, 0, ""); | ||||||
|             return goods.stockAvCount+""; |             return goods.stockAvCount + ""; | ||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|   |  | ||||||
		Loading…
	
		Reference in New Issue