| | |
| | | { |
| | | try |
| | | { |
| | | string type = "2";//模板类型 |
| | | #region 判断 |
| | | |
| | | if (string.IsNullOrWhiteSpace(areaNo) || string.IsNullOrWhiteSpace(endLocate) || string.IsNullOrWhiteSpace(plnStatus) ) |
| | |
| | | else if (plnStatus == "2") |
| | | { |
| | | stockDetail = stockDetail.Where(m => m.PalletStatus == "2" && m.SkuNo == skuNo && m.LotNo == lotNo && m.InspectStatus == "1").OrderBy(m => m.LocatNo).ToList(); |
| | | |
| | | |
| | | } |
| | | else |
| | |
| | | CreateTime = DateTime.Now |
| | | }; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | var endtype = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == endLocate); |
| | | if (plnStatus == "2" && endtype.Layer == 3) |
| | | { |
| | | type = "1"; //不记货架模板 |
| | | } |
| | | |
| | | //没有产生移库任务就直接给小车下发出库任务,若产生移库任务等小车把移库的桶抬起时再下发出库任务 |
| | | if (!resultYi) |
| | |
| | | Startport = palletModel.LocatNo,//起始位置 |
| | | Endport = endLocate,//目标位置 |
| | | Pallno = palletModel.PalletNo,//桶号 |
| | | Crtype = "1",//叫桶 |
| | | Crtype = type,//叫桶 |
| | | }; |
| | | |
| | | string agvMsg = string.Empty; |
| | |
| | | { |
| | | try |
| | | { |
| | | string type = "1";//叫料模板 |
| | | |
| | | #region 判断 |
| | | if (string.IsNullOrWhiteSpace(areaNo) || string.IsNullOrWhiteSpace(StartLocate) || string.IsNullOrWhiteSpace(plnStatus)) |
| | | { |
| | |
| | | //目标楼层 |
| | | var layer = startLoction.Layer; |
| | | var houseStr = layer == 3 ? "3楼中间站" : layer == 4 ? "4楼中间站" : ""; |
| | | if (layer == 3 && plnStatus == "2") |
| | | { |
| | | type = "2"; |
| | | } |
| | | //通过仓库名称查询仓库信息 |
| | | var house = Db.Queryable<SysWareHouse>().First(m => m.IsDel == "0" && m.WareHouseName == houseStr); |
| | | if (house == null) |
| | |
| | | Startport = StartLocate,//起始位置 |
| | | Endport = endLocatInfo.LocatNo,//目标位置 |
| | | Pallno = plnNo,//桶号 |
| | | Crtype = type,//叫车模板 |
| | | Crtype = "2",//叫车模板 |
| | | }; |
| | | //调用AGV接口下发任务 |
| | | string agvMsg = string.Empty; |