bug
This commit is contained in:
@@ -1615,6 +1615,12 @@ namespace Tnb.ProductionMgr
|
||||
EqpEquipment equip = await db.Queryable<EqpEquipment>().SingleAsync(x => x.id == prdMoTask.eqp_id);
|
||||
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdMoTask.material_id);
|
||||
PrdReport report = await db.Queryable<PrdReport>().FirstAsync(it => it.mo_task_id == input.mo_task_id);
|
||||
|
||||
if (basMaterial == null)
|
||||
{
|
||||
throw Oops.Bah($"未找到物料{prdMoTask.material_id}");
|
||||
}
|
||||
|
||||
Dictionary<String, String> dic = new Dictionary<string, string>()
|
||||
{
|
||||
["30019971917589"] = "外包装箱码垛线"
|
||||
@@ -1725,6 +1731,11 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
report.location_code = "ZZ-01-01";
|
||||
}
|
||||
location = await db.Queryable<BasLocation>().SingleAsync(x=>x.location_code==report.location_code);
|
||||
if (location == null)
|
||||
{
|
||||
throw Oops.Bah($"未找到库位编号{report.location_code}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1734,6 +1745,10 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah("设备未绑定下料库位");
|
||||
}
|
||||
location = await db.Queryable<BasLocation>().SingleAsync(x=>x.id==equip.downmat_location_id);
|
||||
if (location == null)
|
||||
{
|
||||
throw Oops.Bah($"未找到库位id{equip.downmat_location_id}");
|
||||
}
|
||||
report.location_code = location.location_code;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user