/// <summary> /// 获取初步评审结果 政务版 默认一个评审人员 /// </summary> /// <param name="projectId"></param> /// <returns></returns> private async Task <ProjectAuditResultInfoOutput> GetProjectFirstAuditResult(Guid projectId) { var auditRoleId = (int)AuditRoleEnum.工程评审; var ret = new ProjectAuditResultInfoOutput(); var query = from p in _projectBaseRepository.GetAll() join member in _projectAuditMemberRepository.GetAll() on p.Id equals member.ProjectBaseId join allot in _projectPersentFinishAllotRepository.GetAll() on member.Id equals allot.AuditMembeId join allotResult in _projectPersentFinishResultRepository.GetAll() on allot.Id equals allotResult.AllotId where p.Id == projectId && member.UserAuditRole == auditRoleId select allotResult; var data = await query.FirstOrDefaultAsync(); if (data != null) { ret.AuditAmount = data.AuditAmount; ret.AuditRoleId = (int)AuditRoleEnum.工程评审; ret.AuditRoleName = AuditRoleEnum.工程评审.ToString(); ret.UserId = data.UserId; ret.UserName = (await _userRepository.GetAsync(data.UserId)).Name; ret.Files = await _abpFileRelationAppService.GetListAsync(new GetAbpFilesInput() { BusinessId = data.Id.ToString(), BusinessType = (int)AbpFileBusinessType.工程评审结果 }); ret.CjzFile = await _abpFileRelationAppService.GetAsync(new GetAbpFilesInput() { BusinessId = data.Id.ToString(), BusinessType = (int)AbpFileBusinessType.工程评审CJZ结果 }); } return(ret); }
public GetProjectReviewResultOutput() { this.LeaderResult = new ProjectAuditResultInfoOutput(); this.Finishs = new List <CreateOrUpdateFinishOutput>(); this.ReviewResult = new ProjectAuditResultInfoOutput(); this.ReviewResult2 = new ProjectAuditResultInfoOutput(); this.ReviewResult3 = new ProjectAuditResultInfoOutput(); this.FinanceResult1 = new ProjectAuditResultInfoOutput(); this.FinanceResult2 = new ProjectAuditResultInfoOutput(); }
public GetProjectAuditResultBaseOutput() { this.ProjectInfo = new GetProjectBudgetForEditOutput(); this.Result = new ProjectAuditResultInfoOutput(); }
public GetProjectCWEResultOutput() { this.CWFResult = new ProjectAuditResultInfoOutput(); }
public async Task <ProjectAuditResultInfoOutput> GetAuditMemberResult(Guid projectId, int roleId, long?userId = null) { var ret = new ProjectAuditResultInfoOutput(); if (roleId == (int)AuditRoleEnum.工程评审) { return(await GetProjectFirstAuditResult(projectId)); } var auditResult_query = from a in _projectAuditMemberResultRepository.GetAll() join b in _projectAuditMemberRepository.GetAll() on a.Pid equals b.Id where b.UserAuditRole == roleId && b.ProjectBaseId == projectId && (!userId.HasValue || (userId.HasValue && b.UserId == userId.Value)) select new { a, b }; var auditResult = await auditResult_query.FirstOrDefaultAsync(); if (auditResult == null) { return(new ProjectAuditResultInfoOutput()); } ret.Id = auditResult.a.Id; var fileBusinessType = 0; var fileBusinessType2 = 0; if (roleId == (int)AuditRoleEnum.项目负责人) { fileBusinessType = (int)AbpFileBusinessType.项目负责人汇总结果; fileBusinessType2 = (int)AbpFileBusinessType.项目负责人汇总CJZ结果; } else if (roleId == (int)AuditRoleEnum.财务评审) { fileBusinessType = (int)AbpFileBusinessType.财务评审; } else if (roleId == (int)AuditRoleEnum.核人) { fileBusinessType = (int)AbpFileBusinessType.核结果; fileBusinessType2 = (int)AbpFileBusinessType.核CJZ结果; } else if (roleId == (int)AuditRoleEnum.财务初审) { fileBusinessType = (int)AbpFileBusinessType.财务初审; } else if (roleId == (int)AuditRoleEnum.核人二) { fileBusinessType2 = (int)AbpFileBusinessType.二级复核CJZ结果; fileBusinessType = (int)AbpFileBusinessType.二级复核结果; } else if (roleId == (int)AuditRoleEnum.核人三) { fileBusinessType2 = (int)AbpFileBusinessType.级复核CJZ结果; fileBusinessType = (int)AbpFileBusinessType.级复核结果; } else if (roleId == (int)AuditRoleEnum.工程评审) { } else if (roleId == (int)AuditRoleEnum.联系人一) { fileBusinessType = (int)AbpFileBusinessType.联系人初审结果汇总; fileBusinessType2 = (int)AbpFileBusinessType.联系人初审结果汇总CJZ; } ret.Files = await _abpFileRelationAppService.GetListAsync(new GetAbpFilesInput() { BusinessId = ret.Id.ToString(), BusinessType = fileBusinessType }); if (fileBusinessType2 > 0) { ret.CjzFile = await _abpFileRelationAppService.GetAsync(new GetAbpFilesInput() { BusinessId = ret.Id.ToString(), BusinessType = fileBusinessType2 }); } ret.AuditAmount = auditResult.a.AuditAmount; ret.Remark = auditResult.a.Remark; ret.Id = auditResult.a.Id; ret.SurePersent = ret.UserId = auditResult.b.UserId; ret.UserName = (await _userRepository.GetAsync(ret.UserId)).Name; ret.AuditRoleId = auditResult.b.UserAuditRole; ret.AuditRoleName = ((AuditRoleEnum)ret.AuditRoleId).ToString(); return(ret); }
public CreateOrUpdateFinishAllotOutput() { this.Result = new ProjectAuditResultInfoOutput(); }
public CreateOrUpdateFinishOutput() { this.FinishMembers = new List <CreateOrUpdateFinishAllotOutput>(); this.GatherResult = new ProjectAuditResultInfoOutput(); }