xiaojiao
2025-12-28 44b83f33ff3a35edced78d89927a734f19de81ba
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs
@@ -73,8 +73,24 @@
                //没有组盘信息,说明该重量是空托盘的重量
                if (null == boxHead)
                {
                    Dt_EmptyPallet dt_Empty= Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode);
                    if (null == dt_Empty)
                    {
                        Dt_EmptyPallet dt_Empty1=new Dt_EmptyPallet();
                        dt_Empty1.EmptyPallet_name = barcode;
                        dt_Empty1.EmptyPallet_palletweight = weight;
                        dt_Empty1.EmptyPallet_creator = "WMS";
                        dt_Empty1.EmptyPallet_createtime = DateTime.Now;
                        dt_Empty1.EmptyPallet_modifier = "WMS";
                        dt_Empty1.EmptyPallet_modifiertime = DateTime.Now;
                        Dt_EmptyPalletRepository.Instance.Add(dt_Empty1,true);
                    }
                    else
                    {
                        taskInfo.task_weight = dt_Empty.EmptyPallet_palletweight;
                    }
                    taskInfo.task_weight = weight;
                    Dt_taskinfoRepository.Instance.Update(taskInfo, true);
                }
                else//有组盘信息,说明该重量是轴承实托的重量
@@ -121,7 +137,7 @@
                Dt_taskinfo task = Dt_taskinfoRepository.Instance.FindFirst(r => LayerToStation.inboundStations.Contains(r.task_endstation)
                || LayerToStation.outboundStations.Contains(r.task_beginstation));
                if (null != task)
                    return content.Error("切换应急模式请清理入库区现有任务.");
                    return content.Error("请清理入库区现有任务.");
                content = WCSApi.ChangeLineModel(saveModel);
                if (content.Status)
@@ -131,8 +147,6 @@
                    string model = string.Empty;
                    if (modelValue == "normal")
                        model = "正常模式";
                    else if (modelValue == "emerge")
                        model = "应急模式";
                    if (general_Info.general_inline_current_model != model)
                    {
                        general_Info.general_inline_current_model = model;
@@ -434,14 +448,12 @@
                Dt_container_head head = Dt_container_headRepository.Instance.FindFirst(r => r.containerhead_barcode == barcode);
                if (null != head)
                    return content.Error("当前托盘号已存在库里,请检查:" + barcode);
                Dt_container_head_hty container_Head_Hty = Dt_container_head_htyRepository.Instance.Find(x => x.containerhead_barcode == barcode
               && x.containerhead_operatetype == "empty" && x.containerhead_creator != "WCS")
               .OrderByDescending(x => x.containerhead_finishtime).First();
                Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.Find(x => x.EmptyPallet_name == barcode).FirstOrDefault();
                decimal weight = 0;
                if (null != container_Head_Hty)
                if (null != dt_Empty)
                {
                    weight = string.IsNullOrEmpty(container_Head_Hty.containerhead_palletweight) ? 0 : decimal.Parse(container_Head_Hty.containerhead_palletweight);
                    weight = string.IsNullOrEmpty(dt_Empty.EmptyPallet_palletweight) ? 0 : decimal.Parse(dt_Empty.EmptyPallet_palletweight);
                }
                content = Dt_taskinfoRepository.Instance.DbContextBeginTransaction(() =>
                {