33
schangxiang@126.com
2024-12-08 68214ef234e825f50ccadeb56fb6893c4262b6cd
CC/iWareCC_ASRS/ThreadService/00_269¹¤Î»/DataProcess_269.cs
@@ -62,6 +62,24 @@
                                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                if (upiObj == null)
                                {
                                    //推送plc äººå·¥æ”¾è¡Œ
                                    using (StationServiceClient client = new StationServiceClient())
                                    {
                                        var res = await client.WriteStation_PersonAllowAsync((int)EDevice.Station, false, rgvLocation);
                                        if (!res.result)
                                        {
                                            SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}- æŽ¨é€plc äººå·¥æ”¾è¡Œ å¤±è´¥,WriteStation_PersonAllowAsync è¿”回:{res.resMsg}";
                                            continue;
                                        }
                                        else
                                        {
                                            Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-推送plc äººå·¥æ”¾è¡Œ æˆåŠŸ,WriteStation_PersonAllowAsync,参数: ç«™ç‚¹{rgvLocation}");
                                        }
                                    }
                                    //写入报警信息
                                    await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_269_1);
                                    SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()},根据UPI:{upiCode}没有找到对象 ";
                                    continue;
                                    //*/
@@ -73,7 +91,7 @@
                                    var res = await client.WriteQiTaoInfoAsync((int)EDevice.Station, rgvLocation, true);
                                    if (!res.result)
                                    {
                                        SystemWarningMsg._lbl_alert_DataProcess_BZ01 = $"{rgvLocation.ToString()}- æŽ¨é€plc解析完成 å¤±è´¥,WriteQiTaoInfoAsync返回:{res.resMsg}";
                                        SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}- æŽ¨é€plc解析完成 å¤±è´¥,WriteQiTaoInfoAsync返回:{res.resMsg}";
                                        continue;
                                    }
                                    else
@@ -84,6 +102,23 @@
                                upiObj.AreaCode = (int)AreaCodeEnum.待缓存分拣区;
                                //记录板件队列表
                                var queueData = wmsDB.mes_upi_linequeue.Where(x => x.Upi == upiObj.UPI).FirstOrDefault();
                                if (queueData != null)
                                {
                                    wmsDB.mes_upi_linequeue.Remove(queueData);
                                }
                                mes_upi_linequeue addUpiLineQueue = ClassHelper.RotationMapping<mes_upi_linequeue, mes_batchOrderUPI_new>(upiObj);
                                addUpiLineQueue.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                                addUpiLineQueue.Location = "269";
                                addUpiLineQueue.AreaCode = (int)AreaCodeEnum.待缓存分拣区;
                                addUpiLineQueue.Upi = upiObj.UPI;
                                addUpiLineQueue.UpiFlag = (int)UpiFlagEnum.正常;
                                addUpiLineQueue.UpiStatus = (int)UpiStatusEnum.初始;
                                addUpiLineQueue.CreateTime = DateTime.Now;
                                addUpiLineQueue.CreateUserName = SysGloble.WCSSystem;
                                wmsDB.mes_upi_linequeue.Add(addUpiLineQueue);
                                WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "269", "首次扫码");
                                wmsDB.SaveChanges();