| | |
| | | using HH.WCS.DaYang.util; |
| | | using HH.WCS.DaYang.wms; |
| | | using Opc.Ua; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | var OutLoc = db.Queryable<Location>().Where(b => b.S_AREA_CODE == StartLoc.S_AREA_CODE && b.N_LAYER == StartLoc.N_LAYER && b.N_POS == 1 && b.N_CURRENT_NUM == 1 && b.N_LOCK_STATE == 0).First(); |
| | | if (OutLoc != null) |
| | | { |
| | | var YiKuLoc = LocationHelper.InStorage(OutLoc); |
| | | //根据起点获取托盘和托盘物料绑定关系 |
| | | string itemCode = ""; |
| | | var cntrLoc = LocationHelper.GetLocCntr(OutLoc.S_CODE).FirstOrDefault(); |
| | | if (cntrLoc != null) |
| | | { |
| | | //获取托盘物料绑定关系 |
| | | var cntrItem = db.Queryable<CntrItemDetail>().Where(b => b.S_CNTR_CODE == cntrLoc.S_CNTR_CODE).First(); |
| | | if (cntrItem != null) |
| | | { |
| | | itemCode = cntrItem.S_ITEM_CODE; |
| | | } |
| | | } |
| | | |
| | | var YiKuLoc = LocationHelper.InStorage(itemCode); |
| | | if (YiKuLoc != null) |
| | | { |
| | | var wcsTask = new WCSTask |