kazelee
2025-05-30 6b43055b5aa32dbea0dacee5a0235b0d5a76c293
wms/SYSHelper.cs
@@ -27,38 +27,8 @@
                    sId.CN_T_LAST = DateTime.Now;
                    if (db.Ado.ExecuteCommand($"update OI_SYS_MAXID set CN_N_MAX={sId.CN_N_MAX}, CN_T_LAST='{sId.CN_T_LAST}' where CN_S_TYPE='{snType}' and CN_S_PRE='{prefix}' ") > 0) {
                        //LogHelper.Info($"set cn_n_max {sId.CN_N_MAX}");
                        result = sId.CN_N_MAX;
                    }
                    //if (db.Updateable<OI_SYS_MAXID>(sId).UpdateColumns(it => new { it.CN_N_MAX, it.CN_T_LAST}).ExecuteCommand() > 0) {
                    //    result = sId.CN_N_MAX;
                    //}
                    //if (db.Updateable<OI_SYS_MAXID>()
                    //    .SetColumns(it => it.CN_N_MAX == sId.CN_N_MAX && it.CN_T_LAST == sId.CN_T_LAST)
                    //    .Where(it => it.CN_S_TYPE == sId.CN_S_TYPE && it.CN_S_PRE == sId.CN_S_TYPE)
                    //    .ExecuteCommand() > 0) {
                    //    result = sId.CN_N_MAX;
                    //}
                    //var parameters = new[] {
                    //    new SugarParameter("@CN_N_MAX", sId.CN_N_MAX),
                    //    new SugarParameter("@CN_T_LAST", sId.CN_T_LAST),
                    //    new SugarParameter("@CN_S_TYPE", sId.CN_S_TYPE),
                    //    new SugarParameter("@CN_S_PRE", sId.CN_S_TYPE)
                    //};
                    //var sql = @"UPDATE OI_SYS_MAXID
                    //    SET CN_N_MAX = @CN_N_MAX, CN_T_LAST = @CN_T_LAST
                    //    WHERE CN_S_TYPE = @CN_S_TYPE AND CN_S_PRE = @CN_S_PRE";
                    //if (db.Ado.ExecuteCommand(sql, parameters) > 0) {
                    //    result = sId.CN_N_MAX;
                    //    LogHelper.Info($"set cn_n_max {sId.CN_N_MAX}");
                    //}
                }
                else {
                    //插入表