This commit is contained in:
高飞 2025-11-04 15:33:42 +08:00
parent 2cb6138258
commit 85bd989ba6
2 changed files with 28 additions and 0 deletions

View File

@ -68,6 +68,20 @@
// 要执行的代码 // 要执行的代码
var welders = from x in Funs.DB.OAM_User where (x.IsSync == null || x.IsSync == false) && x.MID_Code != null && x.MID_Code != string.Empty select x; var welders = from x in Funs.DB.OAM_User where (x.IsSync == null || x.IsSync == false) && x.MID_Code != null && x.MID_Code != string.Empty select x;
var quas = from x in Funs.DB.OAM_UesrQualified where (x.IsSync == null || x.IsSync == false) && (x.IsDelete == false || x.IsDelete == null) select x; var quas = from x in Funs.DB.OAM_UesrQualified where (x.IsSync == null || x.IsSync == false) && (x.IsDelete == false || x.IsDelete == null) select x;
var units = (from x in Funs.DB.OAM_User where !x.MID_Unit.Contains("-") select x.MID_Unit).Distinct().ToList();
var allUnits = from x in Funs.DB.Base_Unit select x;
foreach (var unit in units)
{
if (!allUnits.Any(x => x.UnitId == unit || x.UnitName == unit))
{
Model.Base_Unit u = new Model.Base_Unit();
u.UnitId = SQLHelper.GetNewID();
u.UnitName = unit;
u.IsMain = true;
u.IsSubUnit = false;
BLL.Base_UnitService.AddUnit(u);
}
}
foreach (var q in welders) foreach (var q in welders)
{ {

View File

@ -164,6 +164,20 @@ namespace FineUIPro.Web.Welder
{ {
var welders = from x in Funs.DB.OAM_User where (x.IsSync == null || x.IsSync == false) && x.MID_Code != null && x.MID_Code != string.Empty select x; var welders = from x in Funs.DB.OAM_User where (x.IsSync == null || x.IsSync == false) && x.MID_Code != null && x.MID_Code != string.Empty select x;
var quas = from x in Funs.DB.OAM_UesrQualified where (x.IsSync == null || x.IsSync == false) && (x.IsDelete == false || x.IsDelete == null) select x; var quas = from x in Funs.DB.OAM_UesrQualified where (x.IsSync == null || x.IsSync == false) && (x.IsDelete == false || x.IsDelete == null) select x;
var units = (from x in Funs.DB.OAM_User where !x.MID_Unit.Contains("-") select x.MID_Unit).Distinct().ToList();
var allUnits = from x in Funs.DB.Base_Unit select x;
foreach (var unit in units)
{
if (!allUnits.Any(x => x.UnitId == unit || x.UnitName == unit))
{
Model.Base_Unit u = new Model.Base_Unit();
u.UnitId = SQLHelper.GetNewID();
u.UnitName = unit;
u.IsMain = true;
u.IsSubUnit = false;
BLL.Base_UnitService.AddUnit(u);
}
}
int a = 0; int a = 0;
int b = 0; int b = 0;
int m = 0; int m = 0;