移动端注塑挤出任务管理相关接口

This commit is contained in:
2023-08-30 16:51:31 +08:00
parent 52b0eb1762
commit 2d6e2a56fc
5 changed files with 189 additions and 5 deletions

View File

@@ -2062,7 +2062,7 @@ namespace Tnb.ProductionMgr
});
if (!result.IsSuccess) throw Oops.Bah(result.ErrorMessage);
return result.IsSuccess ? "延期成功" : result.ErrorMessage;
return result.IsSuccess ? "更换成功" : result.ErrorMessage;
}
@@ -2109,7 +2109,7 @@ namespace Tnb.ProductionMgr
});
if (!result.IsSuccess) throw Oops.Bah(result.ErrorMessage);
return result.IsSuccess ? "延期成功" : result.ErrorMessage;
return result.IsSuccess ? "更换成功" : result.ErrorMessage;
}
@@ -2156,9 +2156,43 @@ namespace Tnb.ProductionMgr
});
if (!result.IsSuccess) throw Oops.Bah(result.ErrorMessage);
return result.IsSuccess ? "延期成功" : result.ErrorMessage;
return result.IsSuccess ? "更换成功" : result.ErrorMessage;
}
/// <summary>
/// 根据id获取任务单相关信息
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<dynamic> GetPrdMoTaskInfoById(Dictionary<string,string> dic)
{
string id = dic.ContainsKey("id") ? dic["id"] : "";
if (string.IsNullOrEmpty(id)) return null;
var db = _repository.AsSugarClient();
return await db.Queryable<PrdMoTask>()
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
.LeftJoin<ToolMolds>((a, b, c) => a.mold_id == c.id)
.LeftJoin<EqpEquipment>((a, b, c, d) => a.eqp_id == d.id)
.LeftJoin<DictionaryDataEntity>((a,b,c,d,e)=>e.EnCode==a.mo_task_status && e.DictionaryTypeId==DictConst.PrdTaskStatusTypeId)
.Where((a, b, c, d) => a.id == id)
.Select((a, b, c, d,e) => new
{
id = a.id,
mo_task_code = a.mo_task_code,
mo_task_status = e.FullName,
material_id = a.material_id,
material_code = b.code,
material_name = b.name,
mold_id = a.mold_id,
mold_code = c.mold_code,
equip_code = d.code,
scheduled_qty = a.scheduled_qty,
reported_work_qty = a.reported_work_qty,
scrap_qty = a.scrap_qty,
}).FirstAsync();
}
}
}