物料出库申请 + bug
This commit is contained in:
@@ -1444,6 +1444,7 @@ namespace Tnb.ProductionMgr
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
PrdMoTask? prdMoTask = await db.Queryable<PrdMoTask>().SingleAsync(x => x.id == input.mo_task_id);
|
||||
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);
|
||||
DbResult<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||
{
|
||||
@@ -1709,10 +1710,14 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
if (equip.tube == "1")
|
||||
if (!string.IsNullOrEmpty(basMaterial.category_id))
|
||||
{
|
||||
string resultMsg = await _prdInstockService.InstockTubeOne(report);
|
||||
return resultMsg == "true" ? (dynamic)true : throw Oops.Bah(resultMsg);
|
||||
string[] arr = JsonConvert.DeserializeObject<string[]>(basMaterial.category_id);
|
||||
if (arr.Length > 0 && arr.Contains("DGJCJ"))//短管挤出件入库申请
|
||||
{
|
||||
string resultMsg = await _prdInstockService.InstockTubeOne(report);
|
||||
return resultMsg == "true" ? (dynamic)true : throw Oops.Bah(resultMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user