获取模具列表新增模具Id

This commit is contained in:
DEVICE8\12494
2023-05-05 18:20:52 +08:00
parent fa4d9be965
commit 40bca59440
2 changed files with 6 additions and 7 deletions

View File

@@ -16,5 +16,6 @@ namespace Tnb.ProductionMgr.Entities.Dto
/// 产品 名称 /// 产品 名称
/// </summary> /// </summary>
public string item_name { get; set; } public string item_name { get; set; }
public string mold_id { get; set;}
} }
} }

View File

@@ -82,7 +82,7 @@ namespace Tnb.ProductionMgr
.Where((a, b) => a.item_id == itemId) .Where((a, b) => a.item_id == itemId)
.Select((a, b) => new MoldListOutput .Select((a, b) => new MoldListOutput
{ {
id = a.id, mold_id = a.id,
mold_code = a.mold_code, mold_code = a.mold_code,
mold_name = a.mold_name, mold_name = a.mold_name,
item_name = b.product_name, item_name = b.product_name,
@@ -390,7 +390,7 @@ namespace Tnb.ProductionMgr
var combineScheduledQty = icmoEntities?.Sum(x => x.scheduled_qty); //合并后的已排产数量 var combineScheduledQty = icmoEntities?.Sum(x => x.scheduled_qty); //合并后的已排产数量
if (combineScheduledQty < combinePlanQty) if (combineScheduledQty < combinePlanQty)
{ {
icmoEntities.ForEach(x => icmoEntities!.ForEach(x =>
{ {
var item = moList.Find(xx => xx.id == x.mo_id); var item = moList.Find(xx => xx.id == x.mo_id);
if (item != null) if (item != null)
@@ -405,7 +405,7 @@ namespace Tnb.ProductionMgr
//如果已排产数量大于计划数量,修改工单状态为,待开工 //如果已排产数量大于计划数量,修改工单状态为,待开工
if (combineScheduledQty >= combinePlanQty) if (combineScheduledQty >= combinePlanQty)
{ {
icmoEntities.ForEach(x => icmoEntities!.ForEach(x =>
{ {
var item = moList.Find(xx => xx.id == x.mo_id); var item = moList.Find(xx => xx.id == x.mo_id);
if (item != null) if (item != null)
@@ -486,6 +486,8 @@ namespace Tnb.ProductionMgr
{ {
var row = -1; var row = -1;
var db = _repository.AsSugarClient(); var db = _repository.AsSugarClient();
if(input.icmo_id.IsNullOrWhiteSpace())
throw new ArgumentNullException(nameof(input.icmo_id));
var icmoItem = await db.Queryable<PrdTask>().FirstAsync(it => it.id == input.icmo_id); var icmoItem = await db.Queryable<PrdTask>().FirstAsync(it => it.id == input.icmo_id);
switch (input.category) switch (input.category)
{ {
@@ -513,10 +515,6 @@ namespace Tnb.ProductionMgr
#endregion #endregion
//public async Task<dynamic> GetList(VisualDevModelListQueryInput input)
//{
// return null;
//}
/// <summary> /// <summary>
/// 删除 /// 删除