diff --git a/BasicData/Tnb.BasicData.Entitys/Consts/DictConst.cs b/BasicData/Tnb.BasicData.Entitys/Consts/DictConst.cs index 5d4f3bb9..66363946 100644 --- a/BasicData/Tnb.BasicData.Entitys/Consts/DictConst.cs +++ b/BasicData/Tnb.BasicData.Entitys/Consts/DictConst.cs @@ -15,6 +15,18 @@ public static class DictConst /// 生产任务状态TypeId /// public const string PrdTaskStatusTypeId = "25572555259157"; + + + /// + /// 工单状态-已排产 + /// + public const string AlreadyId = "25019252113685"; + /// + /// 工单状态-待排产 + /// + public const string WaitProductId = "25019244276501"; + + /// /// 工单状态 已下发字典Id /// diff --git a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/BasItem.cs b/BasicData/Tnb.BasicData.Entitys/Entity/BasItem.cs similarity index 98% rename from ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/BasItem.cs rename to BasicData/Tnb.BasicData.Entitys/Entity/BasItem.cs index 89152d3c..5a4d5621 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/BasItem.cs +++ b/BasicData/Tnb.BasicData.Entitys/Entity/BasItem.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Text; using SqlSugar; -namespace Tnb.ProductionMgr.Entitys.Entity +namespace Tnb.BasicData.Entitys.Entity { /// ///产品信息 diff --git a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/EqpEquipment.cs b/BasicData/Tnb.BasicData.Entitys/Entity/EqpEquipment.cs similarity index 99% rename from ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/EqpEquipment.cs rename to BasicData/Tnb.BasicData.Entitys/Entity/EqpEquipment.cs index d98420a2..4c2de0dd 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/EqpEquipment.cs +++ b/BasicData/Tnb.BasicData.Entitys/Entity/EqpEquipment.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Text; using SqlSugar; -namespace Tnb.ProductionMgr.Entitys.Entity +namespace Tnb.BasicData.Entitys.Entity { /// ///设备登记 diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs index d2515302..6fbfd651 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs @@ -9,9 +9,8 @@ using Mapster; using Microsoft.AspNetCore.Mvc; using SqlSugar; using Tnb.BasicData.Entitys; -using Tnb.ProductionMgr.Entitys; -using Tnb.ProductionMgr.Entitys.Dto.PrdManage; -using Tnb.ProductionMgr.Entitys.Dto.WorkOrder; +using Tnb.BasicData.Entitys.Entity; +using Tnb.ProductionMgr.Entitys.Dto; using Tnb.ProductionMgr.Entitys.Entity; using Tnb.ProductionMgr.Interfaces; @@ -284,7 +283,7 @@ namespace Tnb.ProductionMgr { input.id ??= SnowflakeIdHelper.NextId(); var entity = input.Adapt(); - entity.status = DictionaryConstants.ToBeStartedEnCode; //任务单状态默认,待排产 + entity.status = DictConst.ToBeStartedEnCode; //任务单状态默认,待排产 entity.create_id = _userManager.UserId; entity.create_time = DateTime.Now; entity.prd_task_id = input.id; @@ -307,7 +306,7 @@ namespace Tnb.ProductionMgr icmoEntities.ForEach(x => { x.id = SnowflakeIdHelper.NextId(); - x.status = DictionaryConstants.ToBeStartedEnCode; //任务单状态默认,待排产 + x.status = DictConst.ToBeStartedEnCode; //任务单状态默认,待排产 x.create_id = _userManager.UserId; x.create_time = DateTime.Now; x.prd_task_id = input.id; @@ -364,7 +363,7 @@ namespace Tnb.ProductionMgr if (item != null) { item.input_qty += x.scheduled_qty; - item.mo_status = MoStatus.WaitProductId; + item.mo_status = DictConst.WaitProductId; } }); } @@ -379,7 +378,7 @@ namespace Tnb.ProductionMgr if (item != null) { item.input_qty += x.scheduled_qty; - item.mo_status = MoStatus.AlreadyId; + item.mo_status = DictConst.AlreadyId; } }); } @@ -395,12 +394,12 @@ namespace Tnb.ProductionMgr //判断,已排产数量>=计划数量时将状态改为 已排产 if (obj.input_qty >= obj.plan_qty) { - moStatus = MoStatus.AlreadyId; + moStatus = DictConst.AlreadyId; } else { //修改工单状态为待排产,同事修改已排产数量 - moStatus = MoStatus.WaitProductId; + moStatus = DictConst.WaitProductId; } row = await db.Updateable().SetColumns(it => new PrdMo { diff --git a/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj b/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj index ca94d7da..5295a18b 100644 --- a/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj +++ b/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj @@ -9,6 +9,8 @@ + +