生产工单 任务单 提报表 相关数量的类型 int 改成 decimal
This commit is contained in:
@@ -57,6 +57,7 @@ namespace Tnb.ProductionMgr
|
||||
Log.Information($"生产工单接收参数:{JsonConvert.SerializeObject(input)}");
|
||||
|
||||
List<PrdMo> moList = new List<PrdMo>();
|
||||
List<string> deleteMoList = new List<string>();
|
||||
List<ErpExtendField> extendFieldList = new List<ErpExtendField>();
|
||||
foreach (var item in input)
|
||||
{
|
||||
@@ -146,6 +147,11 @@ namespace Tnb.ProductionMgr
|
||||
Log.Error($"【SavePrdMo】生产工单{mocode}状态不是待下发无法覆盖");
|
||||
throw Oops.Bah($"【SavePrdMo】生产工单{mocode}状态不是待下发无法覆盖");
|
||||
}
|
||||
|
||||
if (existMo != null)
|
||||
{
|
||||
deleteMoList.Add(mocode);
|
||||
}
|
||||
|
||||
item.id = SnowflakeIdHelper.NextId();
|
||||
item.material_id = basMaterial.id;
|
||||
@@ -165,6 +171,10 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
DbResult<bool> result = await _db.Ado.UseTranAsync(async () =>
|
||||
{
|
||||
if (!deleteMoList.IsEmpty())
|
||||
{
|
||||
await _db.Deleteable<PrdMo>(x => deleteMoList.Contains(x.mo_code)).ExecuteCommandAsync();
|
||||
}
|
||||
await _db.Insertable(moList).ExecuteCommandAsync();
|
||||
});
|
||||
if (result.IsSuccess)
|
||||
|
||||
Reference in New Issue
Block a user