pc端生产领料 齐套出库 物料签收 生产入库 的工位由用户选择的工位带出来导致的逻辑变更
This commit is contained in:
@@ -888,8 +888,8 @@ namespace Tnb.ProductionMgr
|
||||
.Where((a, b) => a.barcode == barcode).SumAsync((a, b) => b.num);
|
||||
output.list[0].material_name = basMaterial.name;
|
||||
output.list[0].material_standard = basMaterial.material_standard;
|
||||
output.list[0].supplier_name = basSupplier.supplier_name;
|
||||
output.list[0].unit_name = unit.FullName;
|
||||
output.list[0].supplier_name = basSupplier?.supplier_name ?? "";
|
||||
output.list[0].unit_name = unit?.FullName ?? "";
|
||||
|
||||
return output.list[0];
|
||||
}
|
||||
@@ -913,11 +913,11 @@ namespace Tnb.ProductionMgr
|
||||
.LeftJoin<PrdFeedingH>((a, b, c) => b.feeding_id == c.id)
|
||||
.Where(a => a.barcode == barcode)
|
||||
.Select((a, b, c) => c.mo_task_id).ToListAsync();
|
||||
|
||||
return await _db.Queryable<PrdMoTask>()
|
||||
|
||||
var result = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
||||
.LeftJoin<BasMaterial>((a,b,c)=>a.material_id==c.id)
|
||||
.Where((a,b,c)=>ids.Contains(a.id))
|
||||
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
||||
.Where((a, b, c) => ids.Contains(a.id))
|
||||
.Select((a, b, c) => new PrdMoReverseFromFeedingOutput
|
||||
{
|
||||
mo_task_id = a.id,
|
||||
@@ -927,22 +927,28 @@ namespace Tnb.ProductionMgr
|
||||
material_name = c.name,
|
||||
material_standard = c.material_standard,
|
||||
children = SqlFunc.Subqueryable<PrdFeedingD>()
|
||||
.LeftJoin<PrdFeedingH>((x,y)=>x.feeding_id==y.id)
|
||||
.LeftJoin<UserEntity>((x,y,z)=>y.create_id==z.Id)
|
||||
.LeftJoin<OrganizeEntity>((x,y,z,org)=>y.station_id==org.Id)
|
||||
.LeftJoin<BasProcess>((x,y,z,org,process)=>y.process_id==process.id)
|
||||
.LeftJoin<PrdMaterialReceiptD>((x,y,z,org,process,mp)=>x.material_receipt_detail_id==mp.id)
|
||||
.Where((x,y,z)=>y.mo_task_id==a.id).ToList((x,y,z,org,process,mp)=>new PrdMoReverseFromFeedingDetailOutput
|
||||
{
|
||||
feeding_detail_id = x.id,
|
||||
feeding_time = y.create_time==null ? "" : y.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
num = x.num,
|
||||
check_conclusion = mp.check_conclusion,
|
||||
feeding_name = z.RealName,
|
||||
station_name = org.FullName,
|
||||
process_name = process.process_name
|
||||
}),
|
||||
.LeftJoin<PrdFeedingH>((x, y) => x.feeding_id == y.id)
|
||||
.LeftJoin<UserEntity>((x, y, z) => y.create_id == z.Id)
|
||||
.LeftJoin<OrganizeEntity>((x, y, z, org) => y.station_id == org.Id)
|
||||
.LeftJoin<BasProcess>((x, y, z, org, process) => y.process_id == process.id)
|
||||
.LeftJoin<PrdMaterialReceiptD>((x, y, z, org, process, mp) =>
|
||||
x.material_receipt_detail_id == mp.id)
|
||||
.Where((x, y, z) => y.mo_task_id == a.id).ToList((x, y, z, org, process, mp) =>
|
||||
new PrdMoReverseFromFeedingDetailOutput
|
||||
{
|
||||
feeding_detail_id = x.id,
|
||||
feeding_time = y.create_time == null
|
||||
? ""
|
||||
: y.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
num = x.num,
|
||||
check_conclusion = mp.check_conclusion,
|
||||
feeding_name = z.RealName,
|
||||
station_name = org.FullName,
|
||||
process_name = process.process_name
|
||||
}),
|
||||
}).ToListAsync();
|
||||
return result;
|
||||
// return PageResult<PrdMoReverseFromFeedingOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user