From 1daeb924fb62c47ae8fc4f9fed710d19b8ea113e Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周四, 12 12月 2024 14:48:34 +0800 Subject: [PATCH] 22 --- CC/iWareCC_ASRS/ThreadService/01_BZ01工位(清灰,洗板后工位)/DataProcess_BZ01.cs | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 43 insertions(+), 2 deletions(-) diff --git "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" index 8a205ea..3d3307b 100644 --- "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" @@ -119,8 +119,49 @@ } else { - qitaoReault = true; - upiObj.AreaCode = (int)AreaCodeEnum.鐮佸灈鍖哄煙; + //杩橀渶瑕侀獙璇佸湪杩欎簺鍖哄煙涓紝鏄惁姝g‘鎺掗槦锛屽鏋滄病鏈夋纭帓闃燂紝閭d箞灏辫涓轰笉榻愬 銆怑ditby shaocx,2024-12-12銆� + var queueList = wmsDB.mes_upi_linequeue.Where(x => x.PackageCode == upiObj.PackageCode && x.AreaCode == queryAreaCode) + .OrderBy(x => x.Id).ToList(); + var fisrtId = queueList.OrderBy(x => x.Id).First().Id; + var endId = queueList.OrderByDescending(x => x.Id).First().Id; + //缁х画鏌ヨ杩欎釜鏃堕棿娈靛唴鐨勯槦鍒楁暟鎹� + //閲嶅啓璇ラ槦鍒� + queueList = wmsDB.mes_upi_linequeue.Where(x => x.Id >= fisrtId && x.Id <= endId).OrderBy(x => x.Id).ToList(); + var syCount = allList.Where(x => x.Shelf >= upiObj.Shelf).Count(); + if (queueList.Count() != syCount) + { + qitaoReault = false; + upiObj.AreaCode = (int)AreaCodeEnum.缂撳瓨鍒嗘嫞鍖�; + } + else + { + //鍒ゆ柇鏄惁涔卞簭 + bool isLuanXuan = false; + int temp_shelf = 0; + for (int i = 0; i < queueList.Count; i++) + { + if (i == 0) + { + temp_shelf = queueList[i].Shelf; + } + else + { + if ((temp_shelf + 1) != queueList[i].Shelf) + {//璁や负涔卞簭浜� + qitaoReault = false; + isLuanXuan = true; + upiObj.AreaCode = (int)AreaCodeEnum.缂撳瓨鍒嗘嫞鍖�; + break;//璺冲嚭寰幆 + } + } + } + + if (isLuanXuan == false) + { + qitaoReault = true; + upiObj.AreaCode = (int)AreaCodeEnum.鐮佸灈鍖哄煙; + } + } } //娉ㄦ剰锛氳鍒犻櫎璇ラ槦鍒楁暟鎹摝 -- Gitblit v1.9.3