| | |
| | | using Furion.DatabaseAccessor; |
| | | using Furion.FriendlyException; |
| | | using iWare.Wms.Core.Util; |
| | | using iWare.Wms.Core; |
| | | using Mapster; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Furion.DependencyInjection; |
| | | using Furion.DynamicApiController; |
| | | using System.Text; |
| | | using Furion.FriendlyException; |
| | | using iWare.Wms.Core; |
| | | using iWare.Wms.Core.Enum; |
| | | using iWare.Wms.Core.Util; |
| | | using Mapster; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Internal; |
| | | using System.Text; |
| | | |
| | | namespace iWare.Wms.Application.Service.Pda |
| | | { |
| | |
| | | { |
| | | var workPieceProcesss = await _workPieceProcessRep.DetachedEntities |
| | | .Join(_equipmentBaseInfoRep.DetachedEntities, a => a.EquipmentID, b => b.EquipmentId, (a, b) => new { a, b }) |
| | | // 新增 Left Join 到 _workPieceInfo 表 |
| | | .Join(_workPieceInfoRep.DetachedEntities, |
| | | temp => temp.a.WorkPieceID, // 使用之前 Join 结果的 a.WorkPieceID |
| | | c => c.WorkPieceID, // _workPieceInfo 表的 WorkPieceID |
| | | (temp, c) => new { temp.a, temp.b, workPieceInfo = c }) // 创建新的匿名类型包含三个实体 |
| | | |
| | | .Where(!string.IsNullOrEmpty(input.WorkPieceID), u => u.a.WorkPieceID.Equals(input.WorkPieceID)) |
| | | .Where(o => !string.IsNullOrEmpty(o.a.WorkPieceID)) |
| | | .Select(s => new WorkPieceProcessOutput |
| | |
| | | UpdatedUserName = s.a.UpdatedUserName, |
| | | |
| | | WorkPieceID = s.a.WorkPieceID, |
| | | OP80NewCode = s.workPieceInfo.OP80NewCode,//成品码 |
| | | |
| | | WorkingProcedureCurrent = s.a.WorkingProcedureCurrent, |
| | | EquipmentID = s.a.EquipmentID, |
| | | EquipmentName = s.b.EquipmentName, |