This commit is contained in:
parent
2cb6138258
commit
85bd989ba6
|
|
@ -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 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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 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 b = 0;
|
||||
int m = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue