diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs index ddcef263..1797a714 100644 --- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs +++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs @@ -1,6 +1,7 @@ using JNPF.Common.Contracts; using JNPF.Common.Security; using SqlSugar; +using Yitter.IdGenerator; namespace Tnb.EquipMgr.Entities; diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs index c7e10b83..1898e13b 100644 --- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs +++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs @@ -12,7 +12,7 @@ public partial class ToolModelCheckPeriod : BaseEntity { public ToolModelCheckPeriod() { - id = YitIdHelper.NextId(); + id = Yitter.IdGenerator.YitIdHelper.NextId(); } /// /// TODO diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs index ee470768..eb9b1f2e 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskIssueService.cs @@ -70,7 +70,7 @@ namespace Tnb.ProductionMgr if (dic.ContainsKey("mold_id")) { var moldId = dic["mold_id"]?.ToString(); - var mold = await db.Queryable().FirstAsync(it => it.id == moldId); + var mold = await db.Queryable().FirstAsync(it => it.id == moldId); if (mold != null) { row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}"; diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 1c4d8abb..031e9f9a 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -104,7 +104,7 @@ namespace Tnb.ProductionMgr public async Task GetMoldListByItemId(string materialId) { var db = _repository.AsSugarClient(); - var list = await db.Queryable().InnerJoin((a, b) => a.material_id == b.id) + var list = await db.Queryable().InnerJoin((a, b) => a.material_id == b.id) .Where((a, b) => a.material_id == materialId) .Select((a, b) => new MoldListOutput { @@ -175,7 +175,7 @@ namespace Tnb.ProductionMgr var list = await _repository.AsSugarClient().Queryable() .LeftJoin((a, b) => a.mo_id == b.id) .LeftJoin((a, b, c) => a.material_id == c.id) - .LeftJoin((a, b, c, d) => a.mold_id == d.id) + .LeftJoin((a, b, c, d) => a.mold_id == d.id) .Where((a, b, c, d) => a.eqp_id == eqpId) .OrderBy((a, b, c, d) => a.estimated_start_date) .Select((a, b, c, d) => new PrdTaskSortOutput @@ -243,7 +243,7 @@ namespace Tnb.ProductionMgr if (prdTask != null) { var eqp = await db.Queryable().FirstAsync(it => it.id == prdTask.eqp_id); - var mold = await db.Queryable().FirstAsync(it => it.id == prdTask.mold_id); + var mold = await db.Queryable().FirstAsync(it => it.id == prdTask.mold_id); var material = await db.Queryable().FirstAsync(it => it.id == prdTask.material_id); eqpCode = eqp != null ? eqp.code : ""; moldCode = mold != null ? mold.mold_code : ""; @@ -354,7 +354,7 @@ namespace Tnb.ProductionMgr { result = await _db.Queryable().LeftJoin((a, b) => a.mo_id == b.id) .LeftJoin((a, b, c) => a.material_id == c.id) - .LeftJoin((a, b, c, d) => a.mold_id == d.id) + .LeftJoin((a, b, c, d) => a.mold_id == d.id) .LeftJoin((a, b, c, d, e) => a.eqp_id == e.id) .Where((a, b, c, d, e) => a.mo_id == moId) .Select((a, b, c, d, e) => new PrdMoTaskOutput @@ -557,7 +557,7 @@ namespace Tnb.ProductionMgr taskLog.id = SnowflakeIdHelper.NextId(); taskLog.mo_code = (await db.Queryable().FirstAsync(it => it.id == input.mo_id))?.mo_code!; taskLog.eqp_code = (await db.Queryable().FirstAsync(it => it.id == input.eqp_id))?.code!; - taskLog.mold_code = (await db.Queryable().FirstAsync(it => it.id == input.mold_id))?.mold_code!; + taskLog.mold_code = (await db.Queryable().FirstAsync(it => it.id == input.mold_id))?.mold_code!; taskLog.item_code = material?.code!; taskLog.item_standard = material?.material_standard!; taskLog.status = DictConst.ToBeScheduledEncode; @@ -574,7 +574,7 @@ namespace Tnb.ProductionMgr sacipRecord.material_code = material?.code!; sacipRecord.material_name = material?.name!; sacipRecord.eqp_code = (await db.Queryable().FirstAsync(it => it.id == moTask.eqp_id))?.code!; - sacipRecord.mold_name = (await db.Queryable().FirstAsync(it => it.id == moTask.mold_id))?.mold_name!; + sacipRecord.mold_name = (await db.Queryable().FirstAsync(it => it.id == moTask.mold_id))?.mold_name!; sacipRecord.estimated_start_date = moTask.plan_start_date; sacipRecord.estimated_end_date = moTask.plan_end_date; sacipRecord.plan_qty = moTask.plan_qty; @@ -894,7 +894,7 @@ namespace Tnb.ProductionMgr } if (taskItem.mold_id!.IsNotEmptyOrNull()) { - taskLog.mold_code = (await db.Queryable().FirstAsync(it => it.id == taskItem.mold_id))?.mold_code!; + taskLog.mold_code = (await db.Queryable().FirstAsync(it => it.id == taskItem.mold_id))?.mold_code!; } if (taskItem.material_id!.IsNotEmptyOrNull()) { @@ -962,7 +962,7 @@ namespace Tnb.ProductionMgr case 2: //模具 if (icmoItem != null) { - var moldItem = await db.Queryable().FirstAsync(it => it.id == icmoItem.mold_id); + var moldItem = await db.Queryable().FirstAsync(it => it.id == icmoItem.mold_id); icmoItem.mold_id = moldItem.id; icmoItem.mold_code = moldItem.mold_code; icmoItem.mold_name = moldItem.mold_name; @@ -1113,7 +1113,7 @@ namespace Tnb.ProductionMgr if (dic.ContainsKey("mold_id")) { var moldId = dic["mold_id"]?.ToString(); - var mold = await db.Queryable().FirstAsync(it => it.id == moldId); + var mold = await db.Queryable().FirstAsync(it => it.id == moldId); if (mold != null) { row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}"; diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdTaskManageService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdTaskManageService.cs index 5de9180b..f654c1eb 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdTaskManageService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdTaskManageService.cs @@ -77,7 +77,7 @@ namespace Tnb.ProductionMgr if (dic.ContainsKey("mold_id")) { var moldId = dic["mold_id"]?.ToString(); - var mold = await db.Queryable().FirstAsync(it => it.id == moldId); + var mold = await db.Queryable().FirstAsync(it => it.id == moldId); if (mold != null) { row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";