改bug
This commit is contained in:
@@ -334,5 +334,12 @@ namespace Tnb.BasicData.Entities
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string descrip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否包含入库数 0 包含 1 不包含
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int is_contain_into_num {get;set;}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ namespace Tnb.BasicData.Entities
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public int num { get; set; }
|
||||
public decimal? num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:所属组织id
|
||||
|
||||
@@ -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.Entitys.System;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -69,11 +71,12 @@ namespace Tnb.BasicData
|
||||
await _repository.AsSugarClient().Insertable<BasMaterialIntoFactorySpecifications>(materialIntoFactorySpecifications).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "复制成功" : result.ErrorMessage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取物料清单所有子集物料信息
|
||||
/// 获取本物料清单及其所有子集物料信息
|
||||
/// </summary>
|
||||
/// <param name="queryInput"></param>
|
||||
/// <returns></returns>
|
||||
@@ -82,6 +85,8 @@ namespace Tnb.BasicData
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
List<string> ids = await GetAllChildrenMaterialId(queryInput.ebom_id);
|
||||
BasEbomH ebom = await db.Queryable<BasEbomH>().Where(x => x.id == queryInput.ebom_id).SingleAsync();
|
||||
ids.Add(ebom.material_id);
|
||||
var result = await db.Queryable<BasMaterial>()
|
||||
.LeftJoin<DictionaryDataEntity>((a, b) => a.unit_id == b.EnCode)
|
||||
.LeftJoin<DictionaryTypeEntity>((a, b, c) => b.DictionaryTypeId == c.Id && c.EnCode == DictConst.MeasurementUnit && c.DeleteMark == null)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using Aop.Api.Domain;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
@@ -137,6 +139,7 @@ namespace Tnb.BasicData
|
||||
await _repository.AsSugarClient().Insertable<BasProcessStation>(list).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "保存成功" : result.ErrorMessage;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
@@ -72,6 +74,7 @@ namespace Tnb.BasicData
|
||||
await _repository.AsSugarClient().Insertable<BasRouteD>(basRouteDs).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
return result.IsSuccess ? "复制成功" : result.ErrorMessage;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user