| | |
| | | ReturnResult result = new ReturnResult(); |
| | | try |
| | | { |
| | | Location startLoc = WMSHelper.GetoutStockStartLoc(model.itemCode , model.endLoc); |
| | | Location startLoc = WMSHelper.GetoutStockStartLoc(model.itemCode,model.trayCode , model.endLoc); |
| | | Location endLoc = LocationHelper.GetLoc(model.endLoc); |
| | | |
| | | if (startLoc != null) |
| | |
| | | ReturnResult result = new ReturnResult(); |
| | | try |
| | | { |
| | | Location startLoc = LocationHelper.GetLoc(Settings.baseTrayInBufferLoc); |
| | | Location startLoc = WMSHelper.GetEmptyTrayStartLoc(0, 1); |
| | | Location endLoc = LocationHelper.GetLoc(loc); |
| | | var agvJBLoc = Settings.getAgvJBLoc(loc); |
| | | |
| | | if (startLoc != null && startLoc.N_CURRENT_NUM == 1 && agvJBLoc.type == 1) |
| | | { |
| | | var locCntrRels = LocationHelper.GetLocCntrRel(startLoc.S_CODE); |
| | | if (locCntrRels.Count > 0) |
| | | { |
| | | var container = ContainerHelper.GetCntr(locCntrRels[0].S_CNTR_CODE); |
| | | if (container.N_TYPE != 0) |
| | | { |
| | | startLoc = null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(startLoc == null || startLoc.N_CURRENT_NUM != 1) |
| | | { |
| | | startLoc = WMSHelper.GetEmptyTrayStartLoc(0); |
| | | } |
| | | |
| | | if (startLoc != null) |
| | | { |
| | |
| | | var mst = WMSHelper.GetWmsTask(wmsTaskNo); |
| | | if (mst != null && mst.N_B_STATE < 2) |
| | | { |
| | | Location startLoc = WMSHelper.GetEmptyTrayStartLoc(0); |
| | | Location startLoc = WMSHelper.GetEmptyTrayStartLoc(0,0); |
| | | Location endLoc = LocationHelper.GetLoc(loc); |
| | | |
| | | if (startLoc != null) |
| | |
| | | if(mst.N_B_STATE != 2) |
| | | { |
| | | // 创建下个任务 |
| | | if (cst.S_TYPE.Contains("出库") && !cst.S_TYPE.Contains("母拖")) |
| | | if (cst.S_TYPE.Contains("出库") && !cst.S_TYPE.Contains("母拖") && !cst.S_TYPE.Contains("人工")) |
| | | { |
| | | WCSCore.createLastTask(cst.S_END_LOC, mst, 2); |
| | | } |
| | |
| | | public class CreateOutOrderModel |
| | | { |
| | | public string taskNo { get; set; } // 任务号 |
| | | public string trayCode { get; set; } // 任务号 |
| | | public string itemCode { get; set; } // 物料编码 |
| | | public string endLoc { get; set; } // 终点货位 |
| | | public int priority { get; set; } = 0; // 优先级 默认0 |