22
schangxiang@126.com
2024-12-11 ce35b6cf3c6c35e485429c2a9d061e0fe2122151
CC/iWareCC_ASRS/ThreadService/03_BZ12(»úÆ÷ÈËÂë°ü¹¤Î»)/1¡¢DataProcess_BZ12.cs
@@ -1,4 +1,5 @@
using Admin.NET.Application;
using iWareCC.Common.Helper;
using iWareCC.StationService;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
@@ -16,7 +17,7 @@
{
    public class DataProcess_BZ12
    {
        public static void Hander()
        public static async void Hander()
        {
            var alertMsg = "";
            LogType logType = LogType.DataProcess_BZ12;
@@ -85,6 +86,9 @@
                                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                if (upiObj == null)
                                {
                                    //写入报警信息
                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_1);
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},根据UPI:{upiCode}没有找到对象 ";
                                    continue;
                                }
@@ -94,6 +98,9 @@
                                //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}状态已是'已码垛'或'码垛中' ";
                                    continue;
                                }
@@ -110,6 +117,9 @@
                                    {
                                        if (upiObj.PackageCode != wms_rbline_runmode.PalletizingUPI)
                                        {
                                            //写入报警信息
                                            await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_4);
                                            SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}码包部件混批 ";
                                            continue;
                                        }
@@ -134,6 +144,9 @@
                                        }
                                        else
                                        {
                                            //写入报警信息
                                            await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_6);
                                            SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}无可用码垛目标位 ";
                                            continue;
                                        }
@@ -152,6 +165,9 @@
                                var oldupi = upiList.Where(x => x.Shelf < upiObj.Shelf && (x.UpiStatus != (int)UpiStatusEnum.已码垛 && x.UpiStatus != (int)UpiStatusEnum.码垛中)).FirstOrDefault();
                                if (oldupi != null)
                                {
                                    //写入报警信息
                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_5);
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}码包顺序错误 ";
                                    continue;
                                }
@@ -167,7 +183,7 @@
                                    Length = upiObj.Length,
                                    Width = upiObj.Width,
                                    Thk = upiObj.Thk,
                                    IssueTime = DateTime.Now,
                                    PlanNo = upiObj.PlanNo,
                                    OrderId = upiObj.OrderId,
                                    PackageCode = upiObj.PackageCode,