public PagedListModel <FlowChartDetailGet> QueryFLDetailWUXI_MList(int id, int Version) { var totalCount = 0; var masterItem = flowChartMasterRepository.GetById(id); if (masterItem != null) { IList <FlowChartDetailGet> importList = new List <FlowChartDetailGet>(); var flChartList = flowChartMasterRepository.QueryFLDetailWUXI_MList(id, Version, out totalCount); //importItem.FlowChartMasterDTO = AutoMapper.Mapper.Map<FlowChartMasterDTO>(masterItem); foreach (var flChartItem in flChartList) { FlowChartDetailGet importDetailItem = new FlowChartDetailGet(); importDetailItem.FlowChartDetailDTO = AutoMapper.Mapper.Map <FlowChartDetailDTO>(flChartItem); //没合并前注释掉 //importDetailItem.FlowChartDetailDTO.Process_Seq = flChartItem.ItemNo; if (flChartItem.FatherProcess_UID != null) { var process = flChartList.Where(m => m.FlowChart_Detail_UID == flChartItem.FatherProcess_UID).Select(m => m.Process).First(); importDetailItem.FlowChartDetailDTO.FatherProcess = process; } switch (flChartItem.IsQAProcess) { case StructConstants.IsQAProcessType.InspectKey: //IPQC全检 importDetailItem.FlowChartDetailDTO.IsQAProcessName = StructConstants.IsQAProcessType.InspectText; break; case StructConstants.IsQAProcessType.PollingKey: //IPQC巡检 importDetailItem.FlowChartDetailDTO.IsQAProcessName = StructConstants.IsQAProcessType.PollingText; break; case StructConstants.IsQAProcessType.InspectOQCKey: //OQC检测 importDetailItem.FlowChartDetailDTO.IsQAProcessName = StructConstants.IsQAProcessType.InspectOQCText; break; case StructConstants.IsQAProcessType.InspectAssembleKey: //组装检测 importDetailItem.FlowChartDetailDTO.IsQAProcessName = StructConstants.IsQAProcessType.InspectAssembleText; break; case StructConstants.IsQAProcessType.AssembleOQCKey: //组装&OQC检测 importDetailItem.FlowChartDetailDTO.IsQAProcessName = StructConstants.IsQAProcessType.AssembleOQCText; break; default: importDetailItem.FlowChartDetailDTO.IsQAProcessName = string.Empty; break; } //importDetailItem.FlowChartMgDataDTO = AutoMapper.Mapper.Map<FlowChartMgDataDTO>(flChartItem.FlowChart_MgData.FirstOrDefault()); importDetailItem.SystemUserDTO = AutoMapper.Mapper.Map <SystemUserDTO>(flChartItem.System_Users); importDetailItem.FunPlant = flChartItem.System_Function_Plant.FunPlant; importList.Add(importDetailItem); } return(new PagedListModel <FlowChartDetailGet>(0, importList)); } else { return(null); } }