kazelee
2025-05-13 38a8b2931abd72ee04285794aacbea7ed7c49228
Controllers/DebugController.cs
@@ -105,13 +105,13 @@
                        }
                    }
                    var cgDetail = db.Queryable<TN_CG_Detail>().First(a => a.S_CNTR_CODE == model.CntId && a.S_CG_ID == model.CgId);
                    var cgDetail = db.Queryable<TN_CG_Detail>().First(a => a.S_CNTR_CODE == model.CntId && a.S_ITEM_CODE == model.ItemCode);
                    if (cgDetail == null) {
                        var locList = new List<TN_CG_Detail>();
                        locList.Add(new TN_CG_Detail { S_CNTR_CODE = model.CntId, S_CG_ID = model.CntId });
                        locList.Add(new TN_CG_Detail { S_CNTR_CODE = model.CntId, S_ITEM_CODE = model.ItemCode });
                        if (db.Insertable<TN_CG_Detail>(locList).ExecuteCommand() <= 0) {
                            tran.RollbackTran();
                            return $"插入托盘物料关系{model.CntId}-{model.CgId}失败";
                            return $"插入托盘物料关系{model.CntId}-{model.ItemCode}失败";
                        }
                    }
@@ -127,7 +127,7 @@
    }
    public class CgInfo {
        public string CgId { get; set; }
        public string ItemCode { get; set; }
        public string CntId { get; set; }
        public string LocId { get; set; }
    }