添加合计、考核产值预算表、专业间年度季度记取表、工程负责人记取表预览
This commit is contained in:
@@ -47,7 +47,7 @@ public class ProjectOutputReportController {
|
||||
}
|
||||
|
||||
@GetMapping("/project-quarter-output/export-excel")
|
||||
@Operation(summary = "导出项目级年度季度计取表")
|
||||
@Operation(summary = "导出专业间年度表")
|
||||
@PreAuthorize("@ss.hasPermission('tjt:report-project-quarter:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportProjectQuarterOutputExcel(HttpServletResponse response,
|
||||
@@ -55,9 +55,17 @@ public class ProjectOutputReportController {
|
||||
projectOutputReportService.exportProjectQuarterOutputExcel(response, reqVO);
|
||||
}
|
||||
|
||||
@GetMapping("/project-quarter-output/preview")
|
||||
@Operation(summary = "预览专业间年度表")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('tjt:report-project-quarter:query', 'tjt:report-project-quarter:export')")
|
||||
public CommonResult<ProjectQuarterOutputPreviewRespVO> getProjectQuarterOutputPreview(
|
||||
@Valid ProjectQuarterOutputExportReqVO reqVO) {
|
||||
return success(projectOutputReportService.getProjectQuarterOutputPreview(reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/project-lead-quarter-output/export-excel")
|
||||
@Operation(summary = "导出工程负责人年度季度计取表")
|
||||
@PreAuthorize("@ss.hasPermission('tjt:report-project-quarter:export')")
|
||||
@Operation(summary = "导出工程负责人年度表")
|
||||
@PreAuthorize("@ss.hasPermission('tjt:report-project-lead-quarter:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportProjectLeadQuarterOutputExcel(HttpServletResponse response,
|
||||
@Valid ProjectLeadQuarterOutputExportReqVO reqVO)
|
||||
@@ -65,6 +73,14 @@ public class ProjectOutputReportController {
|
||||
projectOutputReportService.exportProjectLeadQuarterOutputExcel(response, reqVO);
|
||||
}
|
||||
|
||||
@GetMapping("/project-lead-quarter-output/preview")
|
||||
@Operation(summary = "预览工程负责人年度表")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('tjt:report-project-lead-quarter:query', 'tjt:report-project-lead-quarter:export')")
|
||||
public CommonResult<ProjectLeadQuarterOutputPreviewRespVO> getProjectLeadQuarterOutputPreview(
|
||||
@Valid ProjectLeadQuarterOutputExportReqVO reqVO) {
|
||||
return success(projectOutputReportService.getProjectLeadQuarterOutputPreview(reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/specialty-person-output/export-excel")
|
||||
@Operation(summary = "导出专业内人员年度季度计取表")
|
||||
@PreAuthorize("@ss.hasPermission('tjt:report-specialty-person:export')")
|
||||
|
||||
@@ -5,13 +5,13 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 工程负责人年度季度计取表导出 Request VO")
|
||||
@Schema(description = "管理后台 - 工程负责人年度表导出 Request VO")
|
||||
@Data
|
||||
public class ProjectLeadQuarterOutputExportReqVO {
|
||||
|
||||
@Schema(description = "合约规划 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "合约规划 ID 不能为空")
|
||||
private Long planningId;
|
||||
@Schema(description = "项目 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "项目 ID 不能为空")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "导出年度", example = "2026")
|
||||
private Integer year;
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.controller.admin.report.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 工程负责人年度表预览 Response VO")
|
||||
@Data
|
||||
public class ProjectLeadQuarterOutputPreviewRespVO {
|
||||
|
||||
@Schema(description = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "预览年度")
|
||||
private Integer year;
|
||||
|
||||
@Schema(description = "项目经理人员名称,多个使用 / 分隔")
|
||||
private String projectManagerNames;
|
||||
|
||||
@Schema(description = "工程负责人人员名称,多个使用 / 分隔")
|
||||
private String engineeringPrincipalNames;
|
||||
|
||||
@Schema(description = "预览行")
|
||||
private List<LeadQuarterRow> rows = Collections.emptyList();
|
||||
|
||||
@Schema(description = "工程负责人年度表预览行")
|
||||
@Data
|
||||
public static class LeadQuarterRow {
|
||||
|
||||
@Schema(description = "序号")
|
||||
private Integer serialNo;
|
||||
|
||||
@Schema(description = "产值类型")
|
||||
private String outputType;
|
||||
|
||||
@Schema(description = "设计内容")
|
||||
private String designContent;
|
||||
|
||||
@Schema(description = "是否小计行")
|
||||
private Boolean subtotalRow;
|
||||
|
||||
@Schema(description = "项目经理人员名称")
|
||||
private String projectManagerNames;
|
||||
|
||||
@Schema(description = "项目经理工作比例")
|
||||
private BigDecimal projectManagerRatio;
|
||||
|
||||
@Schema(description = "工程负责人人员名称")
|
||||
private String engineeringPrincipalNames;
|
||||
|
||||
@Schema(description = "工程负责人工作比例")
|
||||
private BigDecimal engineeringPrincipalRatio;
|
||||
|
||||
@Schema(description = "项目经理一季度金额,万元")
|
||||
private BigDecimal projectManagerQuarterOneAmountWan;
|
||||
|
||||
@Schema(description = "项目经理二季度金额,万元")
|
||||
private BigDecimal projectManagerQuarterTwoAmountWan;
|
||||
|
||||
@Schema(description = "项目经理三季度金额,万元")
|
||||
private BigDecimal projectManagerQuarterThreeAmountWan;
|
||||
|
||||
@Schema(description = "项目经理四季度金额,万元")
|
||||
private BigDecimal projectManagerQuarterFourAmountWan;
|
||||
|
||||
@Schema(description = "项目经理本年度小计,万元")
|
||||
private BigDecimal projectManagerYearTotalAmountWan;
|
||||
|
||||
@Schema(description = "工程负责人一季度金额,万元")
|
||||
private BigDecimal engineeringPrincipalQuarterOneAmountWan;
|
||||
|
||||
@Schema(description = "工程负责人二季度金额,万元")
|
||||
private BigDecimal engineeringPrincipalQuarterTwoAmountWan;
|
||||
|
||||
@Schema(description = "工程负责人三季度金额,万元")
|
||||
private BigDecimal engineeringPrincipalQuarterThreeAmountWan;
|
||||
|
||||
@Schema(description = "工程负责人四季度金额,万元")
|
||||
private BigDecimal engineeringPrincipalQuarterFourAmountWan;
|
||||
|
||||
@Schema(description = "工程负责人本年度小计,万元")
|
||||
private BigDecimal engineeringPrincipalYearTotalAmountWan;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,13 +5,13 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 项目级年度季度计取表导出 Request VO")
|
||||
@Schema(description = "管理后台 - 专业间年度表导出 Request VO")
|
||||
@Data
|
||||
public class ProjectQuarterOutputExportReqVO {
|
||||
|
||||
@Schema(description = "合约规划 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "合约规划 ID 不能为空")
|
||||
private Long planningId;
|
||||
@Schema(description = "项目 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "项目 ID 不能为空")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "导出年度", example = "2026")
|
||||
private Integer year;
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.controller.admin.report.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 专业间年度表预览 Response VO")
|
||||
@Data
|
||||
public class ProjectQuarterOutputPreviewRespVO {
|
||||
|
||||
@Schema(description = "工程编号")
|
||||
private String projectCode;
|
||||
|
||||
@Schema(description = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "预览年度")
|
||||
private Integer year;
|
||||
|
||||
@Schema(description = "预览行")
|
||||
private List<QuarterRow> rows = Collections.emptyList();
|
||||
|
||||
@Schema(description = "专业间年度表预览行")
|
||||
@Data
|
||||
public static class QuarterRow {
|
||||
|
||||
@Schema(description = "序号")
|
||||
private Integer serialNo;
|
||||
|
||||
@Schema(description = "是否合计行")
|
||||
private Boolean totalRow;
|
||||
|
||||
@Schema(description = "是否占位行")
|
||||
private Boolean placeholderRow;
|
||||
|
||||
@Schema(description = "产值类型")
|
||||
private String outputType;
|
||||
|
||||
@Schema(description = "设计内容")
|
||||
private String designContent;
|
||||
|
||||
@Schema(description = "一季度金额,万元")
|
||||
private BigDecimal quarterOneAmountWan;
|
||||
|
||||
@Schema(description = "二季度金额,万元")
|
||||
private BigDecimal quarterTwoAmountWan;
|
||||
|
||||
@Schema(description = "三季度金额,万元")
|
||||
private BigDecimal quarterThreeAmountWan;
|
||||
|
||||
@Schema(description = "四季度金额,万元")
|
||||
private BigDecimal quarterFourAmountWan;
|
||||
|
||||
@Schema(description = "本年度小计,万元")
|
||||
private BigDecimal yearTotalAmountWan;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人占比")
|
||||
private BigDecimal projectLeadRatio;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人总考核产值,万元")
|
||||
private BigDecimal projectLeadAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人一季度金额,万元")
|
||||
private BigDecimal projectLeadQuarterOneAmountWan;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人二季度金额,万元")
|
||||
private BigDecimal projectLeadQuarterTwoAmountWan;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人三季度金额,万元")
|
||||
private BigDecimal projectLeadQuarterThreeAmountWan;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人四季度金额,万元")
|
||||
private BigDecimal projectLeadQuarterFourAmountWan;
|
||||
|
||||
@Schema(description = "项目经理/工程负责人本年度总计,万元")
|
||||
private BigDecimal projectLeadYearTotalAmountWan;
|
||||
|
||||
@Schema(description = "专业所占比")
|
||||
private BigDecimal officeRatio;
|
||||
|
||||
@Schema(description = "专业所总考核产值,万元")
|
||||
private BigDecimal officeAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "专业所一季度金额,万元")
|
||||
private BigDecimal officeQuarterOneAmountWan;
|
||||
|
||||
@Schema(description = "专业所二季度金额,万元")
|
||||
private BigDecimal officeQuarterTwoAmountWan;
|
||||
|
||||
@Schema(description = "专业所三季度金额,万元")
|
||||
private BigDecimal officeQuarterThreeAmountWan;
|
||||
|
||||
@Schema(description = "专业所四季度金额,万元")
|
||||
private BigDecimal officeQuarterFourAmountWan;
|
||||
|
||||
@Schema(description = "专业所本年度总计,万元")
|
||||
private BigDecimal officeYearTotalAmountWan;
|
||||
|
||||
@Schema(description = "建筑专业占比")
|
||||
private BigDecimal archRatio;
|
||||
|
||||
@Schema(description = "精装专业占比")
|
||||
private BigDecimal decorRatio;
|
||||
|
||||
@Schema(description = "结构专业占比")
|
||||
private BigDecimal structRatio;
|
||||
|
||||
@Schema(description = "给排水专业占比")
|
||||
private BigDecimal waterRatio;
|
||||
|
||||
@Schema(description = "暖通专业占比")
|
||||
private BigDecimal hvacRatio;
|
||||
|
||||
@Schema(description = "电气专业占比")
|
||||
private BigDecimal elecRatio;
|
||||
|
||||
@Schema(description = "数字化设计专业占比")
|
||||
private BigDecimal digitalRatio;
|
||||
|
||||
@Schema(description = "建筑专业考核产值,万元")
|
||||
private BigDecimal archAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "精装专业考核产值,万元")
|
||||
private BigDecimal decorAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "结构专业考核产值,万元")
|
||||
private BigDecimal structAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "给排水专业考核产值,万元")
|
||||
private BigDecimal waterAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "暖通专业考核产值,万元")
|
||||
private BigDecimal hvacAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "电气专业考核产值,万元")
|
||||
private BigDecimal elecAssessmentOutputWan;
|
||||
|
||||
@Schema(description = "数字化设计专业考核产值,万元")
|
||||
private BigDecimal digitalAssessmentOutputWan;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,10 +15,14 @@ public interface ProjectOutputReportService {
|
||||
void exportProjectQuarterOutputExcel(HttpServletResponse response, ProjectQuarterOutputExportReqVO reqVO)
|
||||
throws IOException;
|
||||
|
||||
ProjectQuarterOutputPreviewRespVO getProjectQuarterOutputPreview(ProjectQuarterOutputExportReqVO reqVO);
|
||||
|
||||
void exportProjectLeadQuarterOutputExcel(HttpServletResponse response,
|
||||
ProjectLeadQuarterOutputExportReqVO reqVO)
|
||||
throws IOException;
|
||||
|
||||
ProjectLeadQuarterOutputPreviewRespVO getProjectLeadQuarterOutputPreview(ProjectLeadQuarterOutputExportReqVO reqVO);
|
||||
|
||||
void exportSpecialtyPersonOutputExcel(HttpServletResponse response, SpecialtyPersonOutputExportReqVO reqVO)
|
||||
throws IOException;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.iocoder.lyzsys.module.tjt.service.report;
|
||||
|
||||
import cn.iocoder.lyzsys.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.lyzsys.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.lyzsys.module.tjt.controller.admin.report.vo.*;
|
||||
import cn.iocoder.lyzsys.module.tjt.controller.admin.specialtyrolesplit.vo.SpecialtyRolePersonRespVO;
|
||||
import cn.iocoder.lyzsys.module.tjt.controller.admin.specialtyrolesplit.vo.SpecialtyRoleSplitRespVO;
|
||||
@@ -232,9 +233,43 @@ public class ProjectOutputReportServiceImpl implements ProjectOutputReportServic
|
||||
@Override
|
||||
public void exportProjectQuarterOutputExcel(HttpServletResponse response, ProjectQuarterOutputExportReqVO reqVO)
|
||||
throws IOException {
|
||||
ProjectPlanningDO anchorPlanning = validatePlanningExists(reqVO.getPlanningId());
|
||||
ProjectDO project = validateProjectExists(anchorPlanning.getProjectId());
|
||||
ProjectDO project = validateProjectExists(reqVO.getProjectId());
|
||||
Integer reportYear = resolveExportYear(reqVO.getYear());
|
||||
ProjectQuarterOutputExcelBuilder.ExportData data = buildProjectQuarterOutputExportData(project, reportYear);
|
||||
|
||||
projectQuarterOutputExcelBuilder.writeWorkbook(response,
|
||||
buildFileName(project.getProjectName(), reportYear, "专业间年度表"),
|
||||
projectQuarterOutputExcelBuilder.build(data));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectQuarterOutputPreviewRespVO getProjectQuarterOutputPreview(ProjectQuarterOutputExportReqVO reqVO) {
|
||||
ProjectDO project = validateProjectExists(reqVO.getProjectId());
|
||||
Integer reportYear = resolveExportYear(reqVO.getYear());
|
||||
return buildProjectQuarterOutputPreviewRespVO(buildProjectQuarterOutputExportData(project, reportYear));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportProjectLeadQuarterOutputExcel(HttpServletResponse response,
|
||||
ProjectLeadQuarterOutputExportReqVO reqVO)
|
||||
throws IOException {
|
||||
ProjectDO project = validateProjectExists(reqVO.getProjectId());
|
||||
Integer reportYear = resolveExportYear(reqVO.getYear());
|
||||
ProjectLeadQuarterOutputExcelBuilder.ExportData data = buildProjectLeadQuarterOutputExportData(project, reportYear);
|
||||
|
||||
projectLeadQuarterOutputExcelBuilder.writeWorkbook(response,
|
||||
buildFileName(project.getProjectName(), reportYear, "工程负责人年度表"),
|
||||
projectLeadQuarterOutputExcelBuilder.build(data));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectLeadQuarterOutputPreviewRespVO getProjectLeadQuarterOutputPreview(ProjectLeadQuarterOutputExportReqVO reqVO) {
|
||||
ProjectDO project = validateProjectExists(reqVO.getProjectId());
|
||||
Integer reportYear = resolveExportYear(reqVO.getYear());
|
||||
return buildProjectLeadQuarterOutputPreviewRespVO(buildProjectLeadQuarterOutputExportData(project, reportYear));
|
||||
}
|
||||
|
||||
private ProjectQuarterOutputExcelBuilder.ExportData buildProjectQuarterOutputExportData(ProjectDO project, Integer reportYear) {
|
||||
List<ProjectPlanningDO> planningList = sortPlanningList(projectPlanningMapper.selectListByProjectId(project.getId()));
|
||||
Map<Long, List<ProjectPlanningQuarterDO>> quarterMap = getQuarterMap(planningList);
|
||||
Map<Long, ProjectOutputSplitDO> outputSplitMap = getExistingOutputSplitMap(planningList);
|
||||
@@ -246,23 +281,27 @@ public class ProjectOutputReportServiceImpl implements ProjectOutputReportServic
|
||||
data.setCenterSignerLabel("设计中心相关负责人(签名):");
|
||||
data.setProjectSignerLabel("项目经理/工程负责人(签名):");
|
||||
data.setRows(buildProjectQuarterOutputRows(planningList, quarterMap, outputSplitMap, reportYear));
|
||||
|
||||
projectQuarterOutputExcelBuilder.writeWorkbook(response,
|
||||
buildFileName(project.getProjectName(), reportYear, "专业间项目考核产值年度季度计取表"),
|
||||
projectQuarterOutputExcelBuilder.build(data));
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportProjectLeadQuarterOutputExcel(HttpServletResponse response,
|
||||
ProjectLeadQuarterOutputExportReqVO reqVO)
|
||||
throws IOException {
|
||||
ProjectPlanningDO anchorPlanning = validatePlanningExists(reqVO.getPlanningId());
|
||||
ProjectDO project = validateProjectExists(anchorPlanning.getProjectId());
|
||||
Integer reportYear = resolveExportYear(reqVO.getYear());
|
||||
private ProjectQuarterOutputPreviewRespVO buildProjectQuarterOutputPreviewRespVO(
|
||||
ProjectQuarterOutputExcelBuilder.ExportData data) {
|
||||
ProjectQuarterOutputPreviewRespVO respVO = new ProjectQuarterOutputPreviewRespVO();
|
||||
respVO.setProjectCode(data.getProjectCode());
|
||||
respVO.setProjectName(data.getProjectName());
|
||||
respVO.setYear(data.getYear());
|
||||
respVO.setRows(BeanUtils.toBean(
|
||||
data.getRows() == null ? Collections.emptyList() : data.getRows(),
|
||||
ProjectQuarterOutputPreviewRespVO.QuarterRow.class));
|
||||
return respVO;
|
||||
}
|
||||
|
||||
private ProjectLeadQuarterOutputExcelBuilder.ExportData buildProjectLeadQuarterOutputExportData(ProjectDO project,
|
||||
Integer reportYear) {
|
||||
List<ProjectPlanningDO> planningList = sortPlanningList(projectPlanningMapper.selectListByProjectId(project.getId()));
|
||||
List<ProjectRolePersonDO> projectRolePersons = projectRolePersonMapper.selectListByProjectId(project.getId());
|
||||
Map<Long, List<ProjectPlanningQuarterDO>> quarterMap = getQuarterMap(planningList);
|
||||
Map<Long, ProjectOutputSplitDO> outputSplitMap = getOutputSplitMap(planningList);
|
||||
Map<Long, ProjectOutputSplitDO> outputSplitMap = getExistingOutputSplitMap(planningList);
|
||||
Map<Long, List<SpecialtyRoleSplitRespVO>> roleSplitMap = getRoleSplitMap(planningList);
|
||||
|
||||
ProjectLeadQuarterOutputExcelBuilder.ExportData data = new ProjectLeadQuarterOutputExcelBuilder.ExportData();
|
||||
@@ -274,7 +313,16 @@ public class ProjectOutputReportServiceImpl implements ProjectOutputReportServic
|
||||
OutputSplitBizConstants.ROLE_ENGINEERING_PRINCIPAL, "/"));
|
||||
data.setCenterSignerLabel("设计中心相关负责人(签名):");
|
||||
data.setProjectSignerLabel("项目经理/工程负责人(签名):");
|
||||
data.setRows(buildProjectLeadQuarterOutputRows(planningList, quarterMap, outputSplitMap, roleSplitMap, reportYear));
|
||||
return data;
|
||||
}
|
||||
|
||||
private List<ProjectLeadQuarterOutputExcelBuilder.LeadQuarterRow> buildProjectLeadQuarterOutputRows(
|
||||
List<ProjectPlanningDO> planningList,
|
||||
Map<Long, List<ProjectPlanningQuarterDO>> quarterMap,
|
||||
Map<Long, ProjectOutputSplitDO> outputSplitMap,
|
||||
Map<Long, List<SpecialtyRoleSplitRespVO>> roleSplitMap,
|
||||
Integer reportYear) {
|
||||
List<ProjectLeadQuarterOutputExcelBuilder.LeadQuarterRow> rows = new ArrayList<>();
|
||||
for (ProjectPlanningDO planning : planningList) {
|
||||
ProjectOutputSplitDO outputSplit = resolveQuarterOutputSplit(planning, outputSplitMap);
|
||||
@@ -321,11 +369,20 @@ public class ProjectOutputReportServiceImpl implements ProjectOutputReportServic
|
||||
projectLeadRatio, engineeringPrincipalRatio)));
|
||||
rows.add(row);
|
||||
}
|
||||
data.setRows(rows);
|
||||
return rows;
|
||||
}
|
||||
|
||||
projectLeadQuarterOutputExcelBuilder.writeWorkbook(response,
|
||||
buildFileName(project.getProjectName(), reportYear, "项目经理工程负责人工作量及考核产值表"),
|
||||
projectLeadQuarterOutputExcelBuilder.build(data));
|
||||
private ProjectLeadQuarterOutputPreviewRespVO buildProjectLeadQuarterOutputPreviewRespVO(
|
||||
ProjectLeadQuarterOutputExcelBuilder.ExportData data) {
|
||||
ProjectLeadQuarterOutputPreviewRespVO respVO = new ProjectLeadQuarterOutputPreviewRespVO();
|
||||
respVO.setProjectName(data.getProjectName());
|
||||
respVO.setYear(data.getYear());
|
||||
respVO.setProjectManagerNames(data.getProjectManagerNames());
|
||||
respVO.setEngineeringPrincipalNames(data.getEngineeringPrincipalNames());
|
||||
respVO.setRows(BeanUtils.toBean(
|
||||
data.getRows() == null ? Collections.emptyList() : data.getRows(),
|
||||
ProjectLeadQuarterOutputPreviewRespVO.LeadQuarterRow.class));
|
||||
return respVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1767,7 +1824,7 @@ public class ProjectOutputReportServiceImpl implements ProjectOutputReportServic
|
||||
.map(ProjectPlanningDO::getId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
return specialtyRoleSplitService.getSpecialtyRoleSplitListMapByPlanningIds(planningIds);
|
||||
return specialtyRoleSplitService.getExistingSpecialtyRoleSplitListMapByPlanningIds(planningIds);
|
||||
}
|
||||
|
||||
private Map<Long, ProjectDO> getProjectMap(Collection<ProjectPlanningDO> planningList) {
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ProjectLeadQuarterOutputExcelBuilder extends AbstractProjectOutputE
|
||||
private static final String SHEET1_NAME = "工作量分配";
|
||||
private static final String SHEET2_NAME = "季度考核产值";
|
||||
private static final String SHEET1_TITLE = "项目经理/专业负责人人员工作量分配";
|
||||
private static final String SHEET2_TITLE = "项目经理/工程负责人年度/季度项目考核产值";
|
||||
private static final String SHEET2_TITLE = "工程负责人年度表";
|
||||
private static final String DEFAULT_PROJECT_MANAGER_HEADER = "项目经理人员";
|
||||
private static final String DEFAULT_ENGINEERING_HEADER = "工程负责人人员";
|
||||
private static final String DEFAULT_CENTER_SIGNER = "设计中心相关负责人(签名):";
|
||||
|
||||
@@ -22,8 +22,8 @@ import java.util.Map;
|
||||
@Component
|
||||
public class ProjectQuarterOutputExcelBuilder extends AbstractProjectOutputExcelBuilder {
|
||||
|
||||
private static final String SHEET1_NAME = "专业间项目考核产值年度季度计取表";
|
||||
private static final String SHEET1_FALLBACK_NAME = "项目级年度季度计取表";
|
||||
private static final String SHEET1_NAME = "专业间年度表";
|
||||
private static final String SHEET1_FALLBACK_NAME = "专业间年度表";
|
||||
|
||||
private static final String SHEET2_NAME = "专业维度统计表";
|
||||
private static final String SHEET2_FALLBACK_NAME = "专业维度统计";
|
||||
|
||||
@@ -18,6 +18,8 @@ public interface SpecialtyRoleSplitService {
|
||||
|
||||
Map<Long, List<SpecialtyRoleSplitRespVO>> getSpecialtyRoleSplitListMapByPlanningIds(Collection<Long> planningIds);
|
||||
|
||||
Map<Long, List<SpecialtyRoleSplitRespVO>> getExistingSpecialtyRoleSplitListMapByPlanningIds(Collection<Long> planningIds);
|
||||
|
||||
void saveSpecialtyRoleSplitBatch(SpecialtyRoleSplitBatchSaveReqVO reqVO);
|
||||
|
||||
void deleteByOutputSplitId(Long outputSplitId);
|
||||
|
||||
@@ -66,6 +66,16 @@ public class SpecialtyRoleSplitServiceImpl implements SpecialtyRoleSplitService
|
||||
|
||||
@Override
|
||||
public Map<Long, List<SpecialtyRoleSplitRespVO>> getSpecialtyRoleSplitListMapByPlanningIds(Collection<Long> planningIds) {
|
||||
return getSpecialtyRoleSplitListMapByPlanningIds(planningIds, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, List<SpecialtyRoleSplitRespVO>> getExistingSpecialtyRoleSplitListMapByPlanningIds(Collection<Long> planningIds) {
|
||||
return getSpecialtyRoleSplitListMapByPlanningIds(planningIds, false);
|
||||
}
|
||||
|
||||
private Map<Long, List<SpecialtyRoleSplitRespVO>> getSpecialtyRoleSplitListMapByPlanningIds(
|
||||
Collection<Long> planningIds, boolean createMissingOutputSplit) {
|
||||
if (planningIds == null || planningIds.isEmpty()) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
@@ -95,10 +105,12 @@ public class SpecialtyRoleSplitServiceImpl implements SpecialtyRoleSplitService
|
||||
|
||||
Map<Long, ProjectOutputSplitDO> outputSplitMap = new LinkedHashMap<>(
|
||||
projectOutputSplitService.getProjectOutputSplitMap(planningMap.keySet()));
|
||||
for (ProjectPlanningDO planning : planningMap.values()) {
|
||||
if (!outputSplitMap.containsKey(planning.getId())) {
|
||||
outputSplitMap.put(planning.getId(),
|
||||
projectOutputSplitService.getOrCreateProjectOutputSplit(planning.getId()));
|
||||
if (createMissingOutputSplit) {
|
||||
for (ProjectPlanningDO planning : planningMap.values()) {
|
||||
if (!outputSplitMap.containsKey(planning.getId())) {
|
||||
outputSplitMap.put(planning.getId(),
|
||||
projectOutputSplitService.getOrCreateProjectOutputSplit(planning.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user