11
cjs
2025-07-04 c258d3f29d6849270460f50de01af36aca8c2225
HH.WCS.Mobox3.NongFuLinZhi/process/TaskProcess.cs
@@ -1865,7 +1865,23 @@
                    {
                        var cir = new LocCntrRel { S_LOC_CODE = loc, S_CNTR_CODE = cntrCode, S_SRC = deviceName };
                        if (db.Insertable<LocCntrRel>(cir).ExecuteCommand() > 0) LogHelper.Info($"货位容器表绑定成功,货位号:{loc},托盘号:{cntrCode}");
                        BindCntrItem(cntrCode, itemCode, batchNo, itemlayer);
                        var Con = db.Queryable<Container>().Where(a => a.S_CODE == cntrCode).First();
                        if(Con == null)
                        {
                            if(db.Insertable<Container>(new Container
                            {
                                S_CODE = cntrCode,
                                N_TYPE = 1,
                                N_DETAIL_COUNT = 1
                            }).ExecuteCommand() > 0)
                            {
                                LogHelper.Info($"容器表绑定成功,托盘号:{cntrCode}");
                            }
                        }
                        if (!string.IsNullOrEmpty(itemCode))
                        {
                            BindCntrItem(cntrCode, itemCode, batchNo, itemlayer);
                        }
                    }
                }
            });