抛光,后道,GP12质量报表逻辑变动,看板逻辑变动

This commit is contained in:
2024-10-24 10:31:37 +08:00
parent 38c7c4ff83
commit 0f3232d32b
7 changed files with 105 additions and 25 deletions

View File

@@ -119,6 +119,8 @@ namespace ZR.Service.mes.wms
throw new Exception("投入数与合格数,抛光总数,打磨数,报废数不符合,请检查");
}
model.Id = SnowFlakeSingle.instance.NextId().ToString();
// 抛光品标记
if (model.IsPolish)
{
model.Type = 1;
@@ -127,6 +129,7 @@ namespace ZR.Service.mes.wms
{
model.Type = 0;
}
// 抛光合格率计算
decimal qualifiedRate = 0.0m;
if (model.QualifiedNumber != 0)
{
@@ -140,6 +143,10 @@ namespace ZR.Service.mes.wms
Context.Ado.RollbackTran();
throw new Exception("插入GP12检测结果记录失败");
}
// TODO 20241023 不再变动抛光仓库盘点数据
Context.Ado.CommitTran();
return res0;
WmOneTimeInventoryService oneTimeService = new();
WmPolishInventoryService inventoryService = new();
//抛光品重新进入抛光仓库
@@ -248,6 +255,15 @@ namespace ZR.Service.mes.wms
(decimal)model.QualifiedNumber / model.RequireNumber * 100 ?? 0.0m;
}
model.QualifiedRate = qualifiedRate;
if (model.IsPolish)
{
model.Type = 1;
}
else
{
model.Type = 0;
}
return Update(model, true);
}
catch (Exception e)