| | |
| | | BitPalletMark = "0", |
| | | InspectStatus = "1", |
| | | }; |
| | | Db.Insertable(stockDetailNew).ExecuteCommand(); |
| | | Db.Updateable(stockDetailNew).ExecuteCommand(); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | logTaskEntry.IsSuccess = 0; |
| | | logTaskEntry.Information = agvMsg; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | logTaskEntry.IsSuccess = 0; |
| | | logTaskEntry.Information = "货架与货位绑定失败,原因:"+agvBindMsg; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | } |
| | | |
| | | |
| | |
| | | //logTaskEntry.IsCancel = 0; |
| | | logTaskEntry.BackDate = DateTime.Now; |
| | | logTaskEntry.Status = "1";//正在执行 |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | //修改移出储位状态 |
| | | locatInfo.Status = "5";//移出中 |
| | |
| | | { |
| | | logTaskEntry.IsSuccess = 0; |
| | | logTaskEntry.Information = agvMsg; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | throw new Exception($"给小车下发移库任务失败,桶号:{palletInfoYi.PalletNo}"); |
| | | } |
| | |
| | | { |
| | | logTaskEntry.IsSuccess = 0; |
| | | logTaskEntry.Information = agvBindMsg; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | throw new Exception($"给小车下发移库任务失败,桶号:{palletInfoYi.PalletNo}"); |
| | | } |
| | |
| | | //logTaskEntry.IsCancel = 0; |
| | | logTaskInfoZ.BackDate = DateTime.Now; |
| | | logTaskInfoZ.Status = "1";//正在执行 |
| | | Db.Insertable(logTaskInfoZ).ExecuteCommand(); |
| | | Db.Updateable(logTaskInfoZ).ExecuteCommand(); |
| | | |
| | | //修改移出储位状态 |
| | | startLocatInfoZ.Status = "5";//移出中 |
| | |
| | | { |
| | | logTaskInfoZ.IsSuccess = 0; |
| | | logTaskInfoZ.Information = agvMsg; |
| | | Db.Insertable(logTaskInfoZ).ExecuteCommand(); |
| | | Db.Updateable(logTaskInfoZ).ExecuteCommand(); |
| | | |
| | | throw new Exception($"给小车下发移库任务失败,桶号:{logTaskInfoZ.PalletNo}"); |
| | | } |
| | |
| | | { |
| | | logTaskInfoZ.IsSuccess = 0; |
| | | logTaskInfoZ.Information = agvBindMsg; |
| | | Db.Insertable(logTaskInfoZ).ExecuteCommand(); |
| | | Db.Updateable(logTaskInfoZ).ExecuteCommand(); |
| | | |
| | | throw new Exception($"给小车下发移库任务失败,桶号:{logTaskInfoZ.PalletNo}"); |
| | | } |
| | |
| | | //logTaskEntry.IsCancel = 0; |
| | | logTaskEntry.BackDate = DateTime.Now; |
| | | logTaskEntry.Status = "1";//正在执行 |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | //修改移出储位状态 |
| | | locatModel.Status = "5";//移出中 |
| | |
| | | { |
| | | logTaskEntry.IsSuccess = 0; |
| | | logTaskEntry.Information = agvMsg; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | throw new Exception($"给小车下发移库任务失败,桶号:{detailInfo.PalletNo}"); |
| | | } |
| | |
| | | { |
| | | logTaskEntry.IsSuccess = 0; |
| | | logTaskEntry.Information = agvBindMsg; |
| | | Db.Insertable(logTaskEntry).ExecuteCommand(); |
| | | Db.Updateable(logTaskEntry).ExecuteCommand(); |
| | | |
| | | throw new Exception($"给小车下发移库任务失败,桶号:{detailInfo.PalletNo}"); |
| | | } |
| | |
| | | if (zonghong == "M12" || zonghong == "M13") |
| | | { |
| | | //先查到同物料的组 |
| | | string sql = $@"select Row from SysStorageLocat where LocatNo in( |
| | | string sql = $@"select Row,AreaNo from SysStorageLocat where LocatNo in( |
| | | select LocatNo from DataStockDetail where SkuNo='{skuNo}' and LotNo = '{lotNo}' and Standard='{standard}' |
| | | and AreaNo in ('C02','C25') |
| | | ) group by Row"; |
| | | ) group by Row,AreaNo"; |
| | | var RowList = Db.Ado.SqlQuery<TableMan>(sql).ToList(); |
| | | |
| | | List<int> RowList = Db.Ado.SqlQuery<int>(sql).ToList(); |
| | | foreach (var rowItem in RowList) |
| | | { |
| | | endLocatInfo = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Flag == "0" && w.Row == rowItem) |
| | | endLocatInfo = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Flag == "0" && w.Row == rowItem.Row && w.AreaNo == rowItem.AreaNo && (w.WareHouseNo == "M01"||w.WareHouseNo == "M16")) |
| | | .OrderByDescending(o => o.Column).First(); |
| | | if (endLocatInfo.LocatNo != null) |
| | | { |
| | |
| | | areaNo = Db.Queryable<SysStorageArea>().Where(w => w.IsDel == "0" && w.WareHouseNo == houseNo && w.Type == "1").Select(s => s.AreaNo).First(); |
| | | //分配储位 |
| | | //先查到同物料的组 |
| | | string sql = $@"select Row from SysStorageLocat where WareHouseNo='{houseNo}' and AreaNo='{areaNo}' and Status = '0' and LocatNo in( |
| | | string sql = $@"select Row,AreaNo from SysStorageLocat where WareHouseNo='{houseNo}' and AreaNo='{areaNo}' and Status = '0' and LocatNo in( |
| | | select LocatNo from DataStockDetail where SkuNo='{skuNo}' and LotNo = '{lotNo}' and Standard='{standard}' and WareHouseNo='{houseNo}' and AreaNo='{areaNo}' |
| | | ) group by Row"; |
| | | ) group by Row,AreaNo"; |
| | | |
| | | List<int> RowList = Db.Ado.SqlQuery<int>(sql).ToList(); |
| | | var RowList = Db.Ado.SqlQuery<TableMan>(sql).ToList(); |
| | | foreach (var rowItem in RowList) |
| | | { |
| | | endLocatInfo = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.Status == "0" && w.Flag == "0" |
| | | && w.WareHouseNo == houseNo && w.AreaNo == areaNo && w.Row == rowItem) |
| | | && w.WareHouseNo == houseNo && w.AreaNo == areaNo && w.Row == rowItem.Row && w.AreaNo == rowItem.AreaNo && (w.WareHouseNo == "M01" || w.WareHouseNo == "M16")) |
| | | .OrderByDescending(o => o.Column).First(); |
| | | |
| | | if (endLocatInfo.LocatNo != null) |
| | |
| | | //分配储位 |
| | | //料斗清洗暂存间 |
| | | endLocatInfo = ztLocat.Where(w => w.AreaNo == "C54").FirstOrDefault(); |
| | | if (string.IsNullOrEmpty(endLocatInfo.LocatNo)) |
| | | if (endLocatInfo == null) |
| | | { |
| | | endLocatInfo = ztLocat.Where(w => w.AreaNo == "C26").FirstOrDefault(); |
| | | if (string.IsNullOrEmpty(endLocatInfo.LocatNo)) |
| | | if (endLocatInfo == null) |
| | | { |
| | | endLocatInfo = ztLocat.Where(w => w.AreaNo == "C03").FirstOrDefault(); |
| | | if (string.IsNullOrEmpty(endLocatInfo.LocatNo)) |
| | | if (endLocatInfo == null) |
| | | { |
| | | throw new Exception("无可用脏桶库位"); |
| | | } |