22
schangxiang@126.com
2024-12-15 1f6ee76c23f0324dc744c78e5e428eda6604e0b6
CC/iWareCC_ASRS/ThreadService/05_BZ30(ÆëÌ×ÑéÖ¤)/DataProcess_ValidateQiTao.cs
@@ -35,7 +35,8 @@
                SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = string.Empty;
                try
                {
                    if (SystemValue.isAllowRuning_DataProcess_ValidateQiTao && SystemValue.isStartedModel)
                    //if (SystemValue.isAllowRuning_DataProcess_ValidateQiTao && SystemValue.isStartedModel)
                    if (SystemValue.isStartedModel)
                    {
                        var rgvLocation = StationLocationEnum.BZ30.ToString();
@@ -114,13 +115,20 @@
                            //新增下线记录
                            mes_package_unline_record record = new mes_package_unline_record();
                            record = ClassHelper.RotationMapping<mes_package_unline_record, mes_package_gather>(package);
                            record.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                            record.CreateTime = DateTime.Now;
                            record.UpdateTime = DateTime.Now;
                            record.OpRemark = "下线";
                            wmsDB.mes_package_unline_record.Add(record);
                            //判断如果包已经下线了,就不再写入下线记录了
                            var existPackObj = wmsDB.mes_package_unline_record.Where(x => x.PackageCode == package.PackageCode).FirstOrDefault();
                            if (existPackObj == null)
                            {
                                mes_package_unline_record record = new mes_package_unline_record();
                                record = ClassHelper.RotationMapping<mes_package_unline_record, mes_package_gather>(package);
                                record.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                                record.CreateTime = DateTime.Now;
                                record.UpdateTime = DateTime.Now;
                                record.OpRemark = "下线";
                                wmsDB.mes_package_unline_record.Add(record);
                            }
                            WmsRecordUpiProcessHandler.SaveWmsRecordPackageProcess(wmsDB, package, "BZ30", "齐套验证");
                            wmsDB.SaveChanges();
@@ -136,6 +144,6 @@
            }
        }
    }
}