bug
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
public string parent_id { get; set; }
|
public string parent_id { get; set; }
|
||||||
public string material_id { get; set; }
|
public string material_id { get; set; }
|
||||||
public string material_code { get; set; }
|
public string material_code { get; set; }
|
||||||
|
public string workstation_id { get; set; }
|
||||||
public List<MaterialPreparationPlanDDOutput> children { get; set; } = new List<MaterialPreparationPlanDDOutput>();
|
public List<MaterialPreparationPlanDDOutput> children { get; set; } = new List<MaterialPreparationPlanDDOutput>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2700,8 +2700,14 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
string station_id = dic.ContainsKey("station_id") ? dic["station_id"] : "";
|
string station_id = dic.ContainsKey("station_id") ? dic["station_id"] : "";
|
||||||
if (string.IsNullOrEmpty(station_id)) throw Oops.Bah("工位错误");
|
if (string.IsNullOrEmpty(station_id)) throw Oops.Bah("工位错误");
|
||||||
|
var prdMoTask = await _db.Queryable<PrdMoTask>().Where(x => x.workstation_id == station_id && x.parent_id!=null && x.mo_task_status==DictConst.InProgressEnCode).FirstAsync();
|
||||||
|
if (prdMoTask != null)
|
||||||
|
{
|
||||||
|
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdMoTask.material_id);
|
||||||
|
prdMoTask.material_name = basMaterial.name;
|
||||||
|
}
|
||||||
|
|
||||||
return await _db.Queryable<PrdMoTask>().Where(x => x.workstation_id == station_id && x.parent_id!=null && x.mo_task_status==DictConst.InProgressEnCode).FirstAsync();
|
return prdMoTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user