bug
This commit is contained in:
@@ -5,11 +5,13 @@ using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Message.Service;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.TaskScheduler;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData;
|
||||
using Tnb.BasicData.Entities;
|
||||
@@ -50,6 +52,8 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
if (input == null || input.IsEmpty())
|
||||
throw Oops.Bah("参数不能为空");
|
||||
|
||||
Log.Information($"生产工单接收参数:{JsonConvert.SerializeObject(input)}");
|
||||
|
||||
List<PrdMo> moList = new List<PrdMo>();
|
||||
List<ErpExtendField> extendFieldList = new List<ErpExtendField>();
|
||||
@@ -82,6 +86,12 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
if(!units.Contains(item.unit_id))
|
||||
throw Oops.Bah($"{basMaterial.name}不存在{item.unit_id}该单位");
|
||||
|
||||
if (!await _db.Queryable<BasEbomH>().AnyAsync(x => x.material_id == basMaterial.id && x.version == item.ebom_version))
|
||||
{
|
||||
throw Oops.Bah($"系统中无法找到物料清单{item.ebom_version}版本");
|
||||
}
|
||||
|
||||
|
||||
item.id = SnowflakeIdHelper.NextId();
|
||||
item.mo_source = "1";
|
||||
|
||||
Reference in New Issue
Block a user