From 17c9f30f710ac49363435c1e62d58a9117b7b80d Mon Sep 17 00:00:00 2001 From: Yangk Date: Thu, 12 Mar 2026 09:37:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(oa):=20=E9=A1=B9=E7=9B=AE=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E6=8A=A5=E8=A1=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../erp/domain/vo/ProjectLedgerReportVo.java | 108 +++++++++++++++++ .../oa/erp/ProjectLedgerReportMapper.xml | 110 +++++++++++++++++- 2 files changed, 217 insertions(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ProjectLedgerReportVo.java b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ProjectLedgerReportVo.java index a49c43f2..bd05910a 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ProjectLedgerReportVo.java +++ b/ruoyi-modules/ruoyi-oa/src/main/java/org/dromara/oa/erp/domain/vo/ProjectLedgerReportVo.java @@ -113,6 +113,114 @@ public class ProjectLedgerReportVo implements Serializable { @ExcelProperty(value = "累计工时") private BigDecimal totalHours; + // --- 启动阶段 --- + @ExcelProperty(value = "启动计划开始时间") + private String startupPlanStartTime; + @ExcelProperty(value = "启动计划结束时间") + private String startupPlanEndTime; + @ExcelProperty(value = "启动实际开始时间") + private String startupRealStartTime; + @ExcelProperty(value = "启动实际结束时间") + private String startupRealEndTime; + @ExcelProperty(value = "启动原因说明") + private String startupReasonsExplanation; + + // --- 设计阶段 --- + @ExcelProperty(value = "设计计划开始时间") + private String designPlanStartTime; + @ExcelProperty(value = "设计计划结束时间") + private String designPlanEndTime; + @ExcelProperty(value = "设计实际开始时间") + private String designRealStartTime; + @ExcelProperty(value = "设计实际结束时间") + private String designRealEndTime; + @ExcelProperty(value = "设计原因说明") + private String designReasonsExplanation; + + // --- 采购阶段 --- + @ExcelProperty(value = "采购计划开始时间") + private String purchasePlanStartTime; + @ExcelProperty(value = "采购计划结束时间") + private String purchasePlanEndTime; + @ExcelProperty(value = "采购实际开始时间") + private String purchaseRealStartTime; + @ExcelProperty(value = "采购实际结束时间") + private String purchaseRealEndTime; + @ExcelProperty(value = "采购原因说明") + private String purchaseReasonsExplanation; + + // --- 发货阶段 --- + @ExcelProperty(value = "发货计划开始时间") + private String shipmentPlanStartTime; + @ExcelProperty(value = "发货计划结束时间") + private String shipmentPlanEndTime; + @ExcelProperty(value = "发货实际开始时间") + private String shipmentRealStartTime; + @ExcelProperty(value = "发货实际结束时间") + private String shipmentRealEndTime; + @ExcelProperty(value = "发货原因说明") + private String shipmentReasonsExplanation; + + // --- 实施阶段 --- + @ExcelProperty(value = "实施计划开始时间") + private String implementPlanStartTime; + @ExcelProperty(value = "实施计划结束时间") + private String implementPlanEndTime; + @ExcelProperty(value = "实施实际开始时间") + private String implementRealStartTime; + @ExcelProperty(value = "实施实际结束时间") + private String implementRealEndTime; + @ExcelProperty(value = "实施原因说明") + private String implementReasonsExplanation; + + // --- 调试阶段 --- + @ExcelProperty(value = "调试计划开始时间") + private String debugPlanStartTime; + @ExcelProperty(value = "调试计划结束时间") + private String debugPlanEndTime; + @ExcelProperty(value = "调试实际开始时间") + private String debugRealStartTime; + @ExcelProperty(value = "调试实际结束时间") + private String debugRealEndTime; + @ExcelProperty(value = "调试原因说明") + private String debugReasonsExplanation; + + // --- 试运行阶段 --- + @ExcelProperty(value = "试运行计划开始时间") + private String pilotRunPlanStartTime; + @ExcelProperty(value = "试运行计划结束时间") + private String pilotRunPlanEndTime; + @ExcelProperty(value = "试运行实际开始时间") + private String pilotRunRealStartTime; + @ExcelProperty(value = "试运行实际结束时间") + private String pilotRunRealEndTime; + @ExcelProperty(value = "试运行原因说明") + private String pilotRunReasonsExplanation; + + // --- 验收阶段 --- + @ExcelProperty(value = "验收计划开始时间") + private String acceptancePlanStartTime; + @ExcelProperty(value = "验收计划结束时间") + private String acceptancePlanEndTime; + @ExcelProperty(value = "验收实际开始时间") + private String acceptanceRealStartTime; + @ExcelProperty(value = "验收实际结束时间") + private String acceptanceRealEndTime; + @ExcelProperty(value = "验收原因说明") + private String acceptanceReasonsExplanation; + + // --- 质保阶段 --- + @ExcelProperty(value = "质保计划开始时间") + private String warrantyPlanStartTime; + @ExcelProperty(value = "质保计划结束时间") + private String warrantyPlanEndTime; + @ExcelProperty(value = "质保实际开始时间") + private String warrantyRealStartTime; + @ExcelProperty(value = "质保实际结束时间") + private String warrantyRealEndTime; + @ExcelProperty(value = "质保原因说明") + private String warrantyReasonsExplanation; + /** 业务方向(查询条件用) */ private String businessDirection; diff --git a/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ProjectLedgerReportMapper.xml b/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ProjectLedgerReportMapper.xml index 87351078..eb43a59d 100644 --- a/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ProjectLedgerReportMapper.xml +++ b/ruoyi-modules/ruoyi-oa/src/main/resources/mapper/oa/erp/ProjectLedgerReportMapper.xml @@ -32,7 +32,53 @@ hours_sub.total_hours, - mat_sub.product_amount + mat_sub.product_amount, + + stages_sub.startup_plan_start_time, + stages_sub.startup_plan_end_time, + stages_sub.startup_real_start_time, + stages_sub.startup_real_end_time, + stages_sub.startup_reasons_explanation, + stages_sub.design_plan_start_time, + stages_sub.design_plan_end_time, + stages_sub.design_real_start_time, + stages_sub.design_real_end_time, + stages_sub.design_reasons_explanation, + stages_sub.purchase_plan_start_time, + stages_sub.purchase_plan_end_time, + stages_sub.purchase_real_start_time, + stages_sub.purchase_real_end_time, + stages_sub.purchase_reasons_explanation, + stages_sub.shipment_plan_start_time, + stages_sub.shipment_plan_end_time, + stages_sub.shipment_real_start_time, + stages_sub.shipment_real_end_time, + stages_sub.shipment_reasons_explanation, + stages_sub.implement_plan_start_time, + stages_sub.implement_plan_end_time, + stages_sub.implement_real_start_time, + stages_sub.implement_real_end_time, + stages_sub.implement_reasons_explanation, + stages_sub.debug_plan_start_time, + stages_sub.debug_plan_end_time, + stages_sub.debug_real_start_time, + stages_sub.debug_real_end_time, + stages_sub.debug_reasons_explanation, + stages_sub.pilot_run_plan_start_time, + stages_sub.pilot_run_plan_end_time, + stages_sub.pilot_run_real_start_time, + stages_sub.pilot_run_real_end_time, + stages_sub.pilot_run_reasons_explanation, + stages_sub.acceptance_plan_start_time, + stages_sub.acceptance_plan_end_time, + stages_sub.acceptance_real_start_time, + stages_sub.acceptance_real_end_time, + stages_sub.acceptance_reasons_explanation, + stages_sub.warranty_plan_start_time, + stages_sub.warranty_plan_end_time, + stages_sub.warranty_real_start_time, + stages_sub.warranty_real_end_time, + stages_sub.warranty_reasons_explanation FROM erp_project_info p LEFT JOIN erp_project_type t1 ON t1.project_type_id = p.project_type_id @@ -67,6 +113,68 @@ WHERE del_flag = '0' GROUP BY contract_id ) mat_sub ON p.contract_id = mat_sub.contract_id + + LEFT JOIN ( + SELECT + s.project_id, + MAX(CASE WHEN d.dict_label = '启动' THEN s.plan_start_time END) AS startup_plan_start_time, + MAX(CASE WHEN d.dict_label = '启动' THEN s.plan_end_time END) AS startup_plan_end_time, + MAX(CASE WHEN d.dict_label = '启动' THEN s.real_start_time END) AS startup_real_start_time, + MAX(CASE WHEN d.dict_label = '启动' THEN s.real_end_time END) AS startup_real_end_time, + MAX(CASE WHEN d.dict_label = '启动' THEN s.reasons_explanation END) AS startup_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '设计' THEN s.plan_start_time END) AS design_plan_start_time, + MAX(CASE WHEN d.dict_label = '设计' THEN s.plan_end_time END) AS design_plan_end_time, + MAX(CASE WHEN d.dict_label = '设计' THEN s.real_start_time END) AS design_real_start_time, + MAX(CASE WHEN d.dict_label = '设计' THEN s.real_end_time END) AS design_real_end_time, + MAX(CASE WHEN d.dict_label = '设计' THEN s.reasons_explanation END) AS design_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '采购' THEN s.plan_start_time END) AS purchase_plan_start_time, + MAX(CASE WHEN d.dict_label = '采购' THEN s.plan_end_time END) AS purchase_plan_end_time, + MAX(CASE WHEN d.dict_label = '采购' THEN s.real_start_time END) AS purchase_real_start_time, + MAX(CASE WHEN d.dict_label = '采购' THEN s.real_end_time END) AS purchase_real_end_time, + MAX(CASE WHEN d.dict_label = '采购' THEN s.reasons_explanation END) AS purchase_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '发货' THEN s.plan_start_time END) AS shipment_plan_start_time, + MAX(CASE WHEN d.dict_label = '发货' THEN s.plan_end_time END) AS shipment_plan_end_time, + MAX(CASE WHEN d.dict_label = '发货' THEN s.real_start_time END) AS shipment_real_start_time, + MAX(CASE WHEN d.dict_label = '发货' THEN s.real_end_time END) AS shipment_real_end_time, + MAX(CASE WHEN d.dict_label = '发货' THEN s.reasons_explanation END) AS shipment_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '实施' THEN s.plan_start_time END) AS implement_plan_start_time, + MAX(CASE WHEN d.dict_label = '实施' THEN s.plan_end_time END) AS implement_plan_end_time, + MAX(CASE WHEN d.dict_label = '实施' THEN s.real_start_time END) AS implement_real_start_time, + MAX(CASE WHEN d.dict_label = '实施' THEN s.real_end_time END) AS implement_real_end_time, + MAX(CASE WHEN d.dict_label = '实施' THEN s.reasons_explanation END) AS implement_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '调试' THEN s.plan_start_time END) AS debug_plan_start_time, + MAX(CASE WHEN d.dict_label = '调试' THEN s.plan_end_time END) AS debug_plan_end_time, + MAX(CASE WHEN d.dict_label = '调试' THEN s.real_start_time END) AS debug_real_start_time, + MAX(CASE WHEN d.dict_label = '调试' THEN s.real_end_time END) AS debug_real_end_time, + MAX(CASE WHEN d.dict_label = '调试' THEN s.reasons_explanation END) AS debug_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '试运行' THEN s.plan_start_time END) AS pilot_run_plan_start_time, + MAX(CASE WHEN d.dict_label = '试运行' THEN s.plan_end_time END) AS pilot_run_plan_end_time, + MAX(CASE WHEN d.dict_label = '试运行' THEN s.real_start_time END) AS pilot_run_real_start_time, + MAX(CASE WHEN d.dict_label = '试运行' THEN s.real_end_time END) AS pilot_run_real_end_time, + MAX(CASE WHEN d.dict_label = '试运行' THEN s.reasons_explanation END) AS pilot_run_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '验收' THEN s.plan_start_time END) AS acceptance_plan_start_time, + MAX(CASE WHEN d.dict_label = '验收' THEN s.plan_end_time END) AS acceptance_plan_end_time, + MAX(CASE WHEN d.dict_label = '验收' THEN s.real_start_time END) AS acceptance_real_start_time, + MAX(CASE WHEN d.dict_label = '验收' THEN s.real_end_time END) AS acceptance_real_end_time, + MAX(CASE WHEN d.dict_label = '验收' THEN s.reasons_explanation END) AS acceptance_reasons_explanation, + + MAX(CASE WHEN d.dict_label = '质保' THEN s.plan_start_time END) AS warranty_plan_start_time, + MAX(CASE WHEN d.dict_label = '质保' THEN s.plan_end_time END) AS warranty_plan_end_time, + MAX(CASE WHEN d.dict_label = '质保' THEN s.real_start_time END) AS warranty_real_start_time, + MAX(CASE WHEN d.dict_label = '质保' THEN s.real_end_time END) AS warranty_real_end_time, + MAX(CASE WHEN d.dict_label = '质保' THEN s.reasons_explanation END) AS warranty_reasons_explanation + FROM erp_project_plan_stage s + LEFT JOIN sys_dict_data d ON s.project_phases = d.dict_value AND d.dict_type = 'project_phases' + WHERE s.del_flag = '0' + GROUP BY s.project_id + ) stages_sub ON p.project_id = stages_sub.project_id p.del_flag = '0' AND p.project_category <> '9'