改bug
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
@@ -177,34 +179,40 @@ namespace Tnb.BasicData
|
||||
|
||||
});
|
||||
|
||||
foreach (var input in process.inputs)
|
||||
if (process.inputs != null)
|
||||
{
|
||||
string inputId = SnowflakeIdHelper.NextId();
|
||||
inputs.Add(new BasMbomInput()
|
||||
foreach (var input in process.inputs)
|
||||
{
|
||||
id = inputId,
|
||||
mbom_id = mbomId,
|
||||
mbom_process_id = mbomProcessId,
|
||||
process_id = process.process_id,
|
||||
material_id = input.material_id,
|
||||
num = input.num,
|
||||
org_id = orgId,
|
||||
});
|
||||
string inputId = SnowflakeIdHelper.NextId();
|
||||
inputs.Add(new BasMbomInput()
|
||||
{
|
||||
id = inputId,
|
||||
mbom_id = mbomId,
|
||||
mbom_process_id = mbomProcessId,
|
||||
process_id = process.process_id,
|
||||
material_id = input.material_id,
|
||||
num = input.num,
|
||||
org_id = orgId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var output in process.outputs)
|
||||
|
||||
if (process.outputs != null)
|
||||
{
|
||||
string outputId = SnowflakeIdHelper.NextId();
|
||||
outputs.Add(new BasMbomOutput()
|
||||
foreach (var output in process.outputs)
|
||||
{
|
||||
id = outputId,
|
||||
mbom_id = mbomId,
|
||||
mbom_process_id = mbomProcessId,
|
||||
process_id = process.process_id,
|
||||
material_id = output.material_id,
|
||||
num = output.num,
|
||||
org_id = orgId,
|
||||
});
|
||||
string outputId = SnowflakeIdHelper.NextId();
|
||||
outputs.Add(new BasMbomOutput()
|
||||
{
|
||||
id = outputId,
|
||||
mbom_id = mbomId,
|
||||
mbom_process_id = mbomProcessId,
|
||||
process_id = process.process_id,
|
||||
material_id = output.material_id,
|
||||
num = output.num,
|
||||
org_id = orgId,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,6 +330,18 @@ namespace Tnb.BasicData
|
||||
|
||||
});
|
||||
|
||||
if (!result.IsSuccess)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(mbomSaveDataInput.id))
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.COM1000);
|
||||
}
|
||||
|
||||
}
|
||||
return result.IsSuccess ? "保存成功" : result.ErrorMessage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user