schangxiang@126.com
2025-04-01 afc3ef31921d5ca812f7db92dfb107e2c25eff4c
CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/1¡¢DataProcess_BZ12.cs
@@ -69,10 +69,7 @@
                            }
                            var upiCode = result.Replace("/r", ""); ;
                            short lastnum = 0;//是否末板
                            //short isrotate = 0;//是否旋转
                            //short placeX = 0;
                            //short placeY = 0;
                            //short placeZ = 0;
                            string place = "";
                            using (WmsDBModel wmsDB = new WmsDBModel())
                            {
@@ -108,12 +105,23 @@
                                //placeZ = (short)upiObj.MachineZCenter;
                                if (upiObj.UpiStatus == (int)UpiStatusEnum.已码垛 || upiObj.UpiStatus == (int)UpiStatusEnum.码垛中)
                                {
                                    //写入报警信息
                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_3);
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},根据UPI:{upiCode}状态已是'已码垛'或'码垛中' ";
                                    MyExtendHelper.SetValueControlRequestDicts(PlcWarningAddressGloble.Num_BZ12_3, false, SystemWarningMsg._lbl_alert_DataProcess_BZ12);
                                    var isAllow = MyExtendHelper.ValidateIsAllowRequest(PlcWarningAddressGloble.Num_BZ12_3, LogType.DataProcess_BZ12);
                                    if (isAllow == false)
                                    {
                                        continue;
                                    }
                                    else
                                    {
                                        //写入报警信息
                                        await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_3);
                                    }
                                    continue;
                                }
                                MyExtendHelper.SetValueControlRequestDicts(PlcWarningAddressGloble.Num_BZ12_3, true, "");
                                upiObj.UpiStatus = (int)UpiStatusEnum.码垛中;
                                upiObj.AreaCode = (int)AreaCodeEnum.码垛区域;
                                //查处这包所有的数量
@@ -159,7 +167,6 @@
                                }
                                else
                                {//表示这是 åŒ…的第一块板
                                    lastnum = 1;
                                    palletizingUPI = upiObj.PackageCode;
                                    if (obj.R_PalletizingStation1 == 1)
                                    {
@@ -188,9 +195,17 @@
                                //如果次序等于当钱包总数量,是否末板置为true
                                if (upiObj.Shelf == upiList.Count())
                                {
                                    lastnum = 2;
                                    lastnum = 2;//(1首件,2末件,0为中间板)
                                    palletizingUPI = null;
                                    palletizingStation = 0;
                                }
                                else if (upiObj.Shelf == 1)
                                {
                                    lastnum = 1;//(1首件,2末件,0为中间板)
                                }
                                else
                                {
                                    lastnum = 0;//(1首件,2末件,0为中间板)
                                }
@@ -241,7 +256,7 @@
                                wmsDB.wms_rbline_task.Add(task);
                                //更新配置
                                sysConfig.Value = palletizingUPI + "|" + palletizingStation;
                                sysConfig.Value = palletizingUPI + "|" + palletizingStation + "|" + upiObj.UPI + "|第" + upiObj.Shelf + "块";
                                WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "BZ12站点", "码包");