1
This commit is contained in:
@@ -15,6 +15,18 @@ public static class DictConst
|
||||
/// 生产任务状态TypeId
|
||||
/// </summary>
|
||||
public const string PrdTaskStatusTypeId = "25572555259157";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工单状态-已排产
|
||||
/// </summary>
|
||||
public const string AlreadyId = "25019252113685";
|
||||
/// <summary>
|
||||
/// 工单状态-待排产
|
||||
/// </summary>
|
||||
public const string WaitProductId = "25019244276501";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工单状态 已下发字典Id
|
||||
/// </summary>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Tnb.ProductionMgr.Entitys.Entity
|
||||
namespace Tnb.BasicData.Entitys.Entity
|
||||
{
|
||||
///<summary>
|
||||
///产品信息
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Tnb.ProductionMgr.Entitys.Entity
|
||||
namespace Tnb.BasicData.Entitys.Entity
|
||||
{
|
||||
///<summary>
|
||||
///设备登记
|
||||
@@ -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<PrdTask>();
|
||||
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<PrdMo>().SetColumns(it => new PrdMo
|
||||
{
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\BasicData\Tnb.BasicData.Entitys\Tnb.BasicData.Entitys.csproj" />
|
||||
<ProjectReference Include="..\..\BasicData\Tnb.BasicData\Tnb.BasicData.csproj" />
|
||||
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
||||
<ProjectReference Include="..\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user