Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

ly vor 2 Jahren
Ursprung
Commit
127a83b719

+ 130 - 60
master/src/main/java/com/ruoyi/project/production/domain/TMonthlyProductionReport.java

@@ -9,7 +9,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
  * 每月生产报告对象 t_monthly_production_report
  *
  * @author ruoyi
- * @date 2022-11-04
+ * @date 2022-11-07
  */
 public class TMonthlyProductionReport extends BaseEntity
 {
@@ -90,58 +90,78 @@ public class TMonthlyProductionReport extends BaseEntity
     @Excel(name = "Cracker Raw Material Total feed")
     private String crackerRawFeed;
 
-    /** H2 */
-    @Excel(name = "H2")
+    /** Cracker Output Product H2 */
+    @Excel(name = "Cracker Output Product H2")
     private String h2Produced;
 
-    /** C2= */
-    @Excel(name = "C2=")
+    /** Cracker Output Product C2= */
+    @Excel(name = "Cracker Output Product C2=")
     private String ethylenProduced;
 
-    /** C3= */
-    @Excel(name = "C3=")
+    /** Cracker Output Product C3= */
+    @Excel(name = "Cracker Output Product C3=")
     private String propyleneProduced;
 
-    /** C3/C4 LPG */
-    @Excel(name = "C3/C4 LPG")
+    /** Cracker Output Product C3/C4 LPG */
+    @Excel(name = "Cracker Output Product C3/C4 LPG")
     private String c3C4LpgProduced;
 
-    /** C4S */
-    @Excel(name = "C4S")
+    /** Cracker Output Product C4S */
+    @Excel(name = "Cracker Output Product C4S")
     private String mixedC4sProduced;
 
-    /** RPG */
-    @Excel(name = "RPG")
+    /** Cracker Output Product RPG */
+    @Excel(name = "Cracker Output Product RPG")
     private String rpgProduced;
 
-    /** PO */
-    @Excel(name = "PO")
+    /** Cracker Output Product PO */
+    @Excel(name = "Cracker Output Product PO")
     private String poFluxOilProduced;
 
-    /** Naphthalene */
-    @Excel(name = "Naphthalene")
+    /** Cracker Output Product Naphthalene */
+    @Excel(name = "Cracker Output Product Naphthalene")
     private String naphthaleneProduced;
 
-    /** EBO */
-    @Excel(name = "EBO")
+    /** Cracker Output Product EBO */
+    @Excel(name = "Cracker Output Product EBO")
     private String eboProduced;
 
-    /** Cracker Residue */
-    @Excel(name = "Cracker Residue")
+    /** Cracker Output Product Cracker Residue */
+    @Excel(name = "Cracker Output Product Cracker Residue")
     private String residueOilProduced;
 
-    /** Methane */
-    @Excel(name = "Methane")
+    /** Cracker Output Product Methane */
+    @Excel(name = "Cracker Output Product Methane")
     private String methaneProduced;
 
-    /** OFFAGE */
-    @Excel(name = "OFFAGE")
+    /** Cracker Output Product OFFAGE */
+    @Excel(name = "Cracker Output Product OFFAGE")
     private String offgasProduced;
 
-    /** output total */
-    @Excel(name = "output total")
+    /** Cracker Output Product output total */
+    @Excel(name = "Cracker Output Product output total")
     private String crackerOutput;
 
+    /** Aromatics Raw Material RPG fr EU */
+    @Excel(name = "Aromatics Raw Material RPG fr EU")
+    private String pguRpg2;
+
+    /** Aromatics Raw Material H2 to PGU */
+    @Excel(name = "Aromatics Raw Material H2 to PGU")
+    private String pguH2;
+
+    /** Aromatics Raw Material Mix BTX Product */
+    @Excel(name = "Aromatics Raw Material Mix BTX Product")
+    private String pguBtxProduced;
+
+    /** Aromatics Raw Material Mix BTX to AEU */
+    @Excel(name = "Aromatics Raw Material Mix BTX to AEU")
+    private String pguBtxToAeu;
+
+    /** Aromatics Raw Material input total */
+    @Excel(name = "Aromatics Raw Material input total")
+    private String aromaticsRawInput;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -430,42 +450,92 @@ public class TMonthlyProductionReport extends BaseEntity
     {
         return crackerOutput;
     }
+    public void setPguRpg2(String pguRpg2)
+    {
+        this.pguRpg2 = pguRpg2;
+    }
+
+    public String getPguRpg2()
+    {
+        return pguRpg2;
+    }
+    public void setPguH2(String pguH2)
+    {
+        this.pguH2 = pguH2;
+    }
+
+    public String getPguH2()
+    {
+        return pguH2;
+    }
+    public void setPguBtxProduced(String pguBtxProduced)
+    {
+        this.pguBtxProduced = pguBtxProduced;
+    }
+
+    public String getPguBtxProduced()
+    {
+        return pguBtxProduced;
+    }
+    public void setPguBtxToAeu(String pguBtxToAeu)
+    {
+        this.pguBtxToAeu = pguBtxToAeu;
+    }
+
+    public String getPguBtxToAeu()
+    {
+        return pguBtxToAeu;
+    }
+    public void setAromaticsRawInput(String aromaticsRawInput)
+    {
+        this.aromaticsRawInput = aromaticsRawInput;
+    }
+
+    public String getAromaticsRawInput()
+    {
+        return aromaticsRawInput;
+    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-                .append("id", getId())
-                .append("reportMonth", getReportMonth())
-                .append("reportYear", getReportYear())
-                .append("nap", getNap())
-                .append("c5", getC5())
-                .append("c6C8Na", getC6C8Na())
-                .append("wisonEthane", getWisonEthane())
-                .append("lpgToFurnace", getLpgToFurnace())
-                .append("raff3FrBdAnd2ph", getRaff3FrBdAnd2ph())
-                .append("c2FrLdpe", getC2FrLdpe())
-                .append("c3FrOxo", getC3FrOxo())
-                .append("mixedC3C4", getMixedC3C4())
-                .append("hyC9", getHyC9())
-                .append("pguOffgas", getPguOffgas())
-                .append("washOil", getWashOil())
-                .append("toluene", getToluene())
-                .append("hyC4FrR800", getHyC4FrR800())
-                .append("crackerRawInput", getCrackerRawInput())
-                .append("crackerRawFeed", getCrackerRawFeed())
-                .append("h2Produced", getH2Produced())
-                .append("ethylenProduced", getEthylenProduced())
-                .append("propyleneProduced", getPropyleneProduced())
-                .append("c3C4LpgProduced", getC3C4LpgProduced())
-                .append("mixedC4sProduced", getMixedC4sProduced())
-                .append("rpgProduced", getRpgProduced())
-                .append("poFluxOilProduced", getPoFluxOilProduced())
-                .append("naphthaleneProduced", getNaphthaleneProduced())
-                .append("eboProduced", getEboProduced())
-                .append("residueOilProduced", getResidueOilProduced())
-                .append("methaneProduced", getMethaneProduced())
-                .append("offgasProduced", getOffgasProduced())
-                .append("crackerOutput", getCrackerOutput())
-                .toString();
+            .append("id", getId())
+            .append("reportMonth", getReportMonth())
+            .append("reportYear", getReportYear())
+            .append("nap", getNap())
+            .append("c5", getC5())
+            .append("c6C8Na", getC6C8Na())
+            .append("wisonEthane", getWisonEthane())
+            .append("lpgToFurnace", getLpgToFurnace())
+            .append("raff3FrBdAnd2ph", getRaff3FrBdAnd2ph())
+            .append("c2FrLdpe", getC2FrLdpe())
+            .append("c3FrOxo", getC3FrOxo())
+            .append("mixedC3C4", getMixedC3C4())
+            .append("hyC9", getHyC9())
+            .append("pguOffgas", getPguOffgas())
+            .append("washOil", getWashOil())
+            .append("toluene", getToluene())
+            .append("hyC4FrR800", getHyC4FrR800())
+            .append("crackerRawInput", getCrackerRawInput())
+            .append("crackerRawFeed", getCrackerRawFeed())
+            .append("h2Produced", getH2Produced())
+            .append("ethylenProduced", getEthylenProduced())
+            .append("propyleneProduced", getPropyleneProduced())
+            .append("c3C4LpgProduced", getC3C4LpgProduced())
+            .append("mixedC4sProduced", getMixedC4sProduced())
+            .append("rpgProduced", getRpgProduced())
+            .append("poFluxOilProduced", getPoFluxOilProduced())
+            .append("naphthaleneProduced", getNaphthaleneProduced())
+            .append("eboProduced", getEboProduced())
+            .append("residueOilProduced", getResidueOilProduced())
+            .append("methaneProduced", getMethaneProduced())
+            .append("offgasProduced", getOffgasProduced())
+            .append("crackerOutput", getCrackerOutput())
+            .append("pguRpg2", getPguRpg2())
+            .append("pguH2", getPguH2())
+            .append("pguBtxProduced", getPguBtxProduced())
+            .append("pguBtxToAeu", getPguBtxToAeu())
+            .append("aromaticsRawInput", getAromaticsRawInput())
+            .toString();
     }
 }

+ 0 - 4
master/src/main/java/com/ruoyi/project/production/mapper/TMonthlyProductionReportMapper.java

@@ -2,12 +2,8 @@ package com.ruoyi.project.production.mapper;
 
 import java.util.List;
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
-import com.ruoyi.project.production.controller.vo.DailyAnalysisQueryVO;
 import com.ruoyi.project.production.controller.vo.MonthlyAnalysisDataVO;
-import com.ruoyi.project.production.controller.vo.MonthlyAnalysisQueryVO;
-import com.ruoyi.project.production.domain.TDailyProductionReport;
 import com.ruoyi.project.production.domain.TMonthlyProductionReport;
-import com.ruoyi.project.production.service.impl.vo.CrackerRawMaterialVO;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 

+ 22 - 23
master/src/main/java/com/ruoyi/project/production/service/ITMonthlyProductionReportService.java

@@ -2,11 +2,10 @@ package com.ruoyi.project.production.service;
 
 import java.util.List;
 
-import com.ruoyi.project.production.controller.vo.DailyAnalysisQueryVO;
 import com.ruoyi.project.production.controller.vo.MonthlyAnalysisDataVO;
 import com.ruoyi.project.production.controller.vo.MonthlyAnalysisQueryVO;
 import com.ruoyi.project.production.domain.TMonthlyProductionReport;
-import com.ruoyi.project.production.service.impl.vo.CrackerRawMaterialVO;
+import com.ruoyi.project.production.service.impl.vo.MonthlyProductionReportVO;
 
 /**
  * 每月生产报告Service接口
@@ -64,27 +63,27 @@ public interface ITMonthlyProductionReportService
      */
     public int deleteTMonthlyProductionReportById(Long id);
 
-    public List<CrackerRawMaterialVO> selectCrackerRawMaterialByYear(Long year);
-    public List<CrackerRawMaterialVO> selectCrackerOutputProductByYear(Long year);
-    public List<CrackerRawMaterialVO> selectAromaticsRawMaterialByYear(Long year);
-    public List<CrackerRawMaterialVO> selectAromaticsOutputProductByYear(Long year);
-    public List<CrackerRawMaterialVO> selectEligibleProductRateByYear(Long year);
-    public List<CrackerRawMaterialVO> selectProductYieldByYear(Long year);
-    public List<CrackerRawMaterialVO> selectCrackerUtilityConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectCrackerEnergyConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectAromaticsUtilityConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectAromaticsEnergyConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectPlantLoadByYear(Long year);
-    public List<CrackerRawMaterialVO> selectCostFrEthyleneByYear(Long year);
-    public List<CrackerRawMaterialVO> selectRuningRateByYear(Long year);
-    public List<CrackerRawMaterialVO> selectShoudownHourByYear(Long year);
-    public List<CrackerRawMaterialVO> selectOthersideByYear(Long year);
-    public List<CrackerRawMaterialVO> selectChemicalConsumeByYear(Long year);
-    public List<CrackerRawMaterialVO> selectSCTUUtilityConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectSUBUtilityConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectSCTFUtilityConsumptionByYear(Long year);
-    public List<CrackerRawMaterialVO> selectKbiByYear(Long year);
-    public List<CrackerRawMaterialVO> selectSummaryByYear(Long year);
+    public List<MonthlyProductionReportVO> selectCrackerRawMaterialByYear(Long year);
+    public List<MonthlyProductionReportVO> selectCrackerOutputProductByYear(Long year);
+    public List<MonthlyProductionReportVO> selectAromaticsRawMaterialByYear(Long year);
+    public List<MonthlyProductionReportVO> selectAromaticsOutputProductByYear(Long year);
+    public List<MonthlyProductionReportVO> selectEligibleProductRateByYear(Long year);
+    public List<MonthlyProductionReportVO> selectProductYieldByYear(Long year);
+    public List<MonthlyProductionReportVO> selectCrackerUtilityConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectCrackerEnergyConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectAromaticsUtilityConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectAromaticsEnergyConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectPlantLoadByYear(Long year);
+    public List<MonthlyProductionReportVO> selectCostFrEthyleneByYear(Long year);
+    public List<MonthlyProductionReportVO> selectRuningRateByYear(Long year);
+    public List<MonthlyProductionReportVO> selectShoudownHourByYear(Long year);
+    public List<MonthlyProductionReportVO> selectOthersideByYear(Long year);
+    public List<MonthlyProductionReportVO> selectChemicalConsumeByYear(Long year);
+    public List<MonthlyProductionReportVO> selectSCTUUtilityConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectSUBUtilityConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectSCTFUtilityConsumptionByYear(Long year);
+    public List<MonthlyProductionReportVO> selectKbiByYear(Long year);
+    public List<MonthlyProductionReportVO> selectSummaryByYear(Long year);
 
     List<MonthlyAnalysisDataVO> selectAnalysisData(MonthlyAnalysisQueryVO monthlyAnalysisQueryVO);
 }

+ 273 - 157
master/src/main/java/com/ruoyi/project/production/service/impl/TMonthlyProductionReportServiceImpl.java

@@ -6,20 +6,15 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
-import com.ruoyi.project.production.controller.vo.DailyAnalysisQueryVO;
 import com.ruoyi.project.production.controller.vo.MonthlyAnalysisDataVO;
 import com.ruoyi.project.production.controller.vo.MonthlyAnalysisQueryVO;
-import com.ruoyi.project.production.service.impl.vo.CrackerRawMaterialVO;
-import org.junit.platform.commons.JUnitException;
+import com.ruoyi.project.production.service.impl.vo.MonthlyProductionReportVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.project.production.mapper.TMonthlyProductionReportMapper;
 import com.ruoyi.project.production.domain.TMonthlyProductionReport;
 import com.ruoyi.project.production.service.ITMonthlyProductionReportService;
 
-import javax.sound.midi.Soundbank;
-
 /**
  * 每月生产报告Service业务层处理
  *
@@ -105,7 +100,7 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
     }
 
     @Override
-    public List<CrackerRawMaterialVO> selectCrackerRawMaterialByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectCrackerRawMaterialByYear(Long year) {
         // 当前日期
         Date currentDate = new Date();
         // 当前年份
@@ -115,24 +110,24 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
         // 从数据库中查出的当前year的月报数据集合,每个元素对应当前year某个月的数据
         List<TMonthlyProductionReport> tMonthlyProductionReports = tMonthlyProductionReportMapper.selectCrackerRawMaterialByYear(year);
         // 前端月报数据集合,每个元素对应当前某个指标的title、unit、1~12月的数据以及年度汇总数据
-        List<CrackerRawMaterialVO> crackerRawMaterialVOs = new ArrayList<>();
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Cracker Raw Material", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("NAP", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C5", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("NA", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Wison Ethane", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("LPG to Furnace", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C4 Raff3 fr bd and 2ph", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C2 fr LDPE", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C3 fr OXO", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Mixed C3/C4 fr BD", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("HC9", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Offgas fr AEU", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("wash oil", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("toluene", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C4 Recycle(ton)", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("input total", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Total feed", "t"));
+        List<MonthlyProductionReportVO> monthlyProductionReportVOs = new ArrayList<>();
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("cracker_raw_input", "Cracker Raw Material", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("nap", "NAP", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("c5", "C5", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("c6_c8_na", "NA", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("wison_ethane", "Wison Ethane", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("lpg_to_furnace", "LPG to Furnace", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("raff3_fr_bd_and_2ph", "C4 Raff3 fr bd and 2ph", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("c2_fr_ldpe", "C2 fr LDPE", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("c3_fr_oxo", "C3 fr OXO", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("mixed_c3_c4", "Mixed C3/C4 fr BD", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("hy_c9", "HC9", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_offgas", "Offgas fr AEU", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("wash_oil", "wash oil", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("toluene", "toluene", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("hy_c4_fr_r800", "C4 Recycle(ton)", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("cracker_raw_input", "input total", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("cracker_raw_feed", "Total feed", "t"));
         // 遍历从数据库中查出的月报数据集合,结果为0~12条数据不等
         for (int i = 0; i < tMonthlyProductionReports.size(); i++) {
             TMonthlyProductionReport tMonthlyProductionReport = tMonthlyProductionReports.get(i);
@@ -159,7 +154,7 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
             try {
                 Long reportMonth = tMonthlyProductionReport.getReportMonth();   // 当前元素的所属月份
                 Long reportYear = tMonthlyProductionReport.getReportYear();     // 当前元素的所属年份
-                clazz = Class.forName("com.ruoyi.project.production.service.impl.vo.CrackerRawMaterialVO");
+                clazz = Class.forName("com.ruoyi.project.production.service.impl.vo.MonthlyProductionReportVO");
                 switch (reportMonth.toString()) {
                     case "1":   // 一月
                         method = clazz.getDeclaredMethod("setJan", String.class);
@@ -199,63 +194,63 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
                         break;
                 }
                 // 按照当前元素的所属月份调取相应set方法
-                method.invoke(crackerRawMaterialVOs.get(0), crackerRawInput);
-                method.invoke(crackerRawMaterialVOs.get(1), nap);
-                method.invoke(crackerRawMaterialVOs.get(2), c5);
-                method.invoke(crackerRawMaterialVOs.get(3), c6C8Na);
-                method.invoke(crackerRawMaterialVOs.get(4), wisonEthane);
-                method.invoke(crackerRawMaterialVOs.get(5), lpgToFurnace);
-                method.invoke(crackerRawMaterialVOs.get(6), raff3FrBdAnd2ph);
-                method.invoke(crackerRawMaterialVOs.get(7), c2FrLdpe);
-                method.invoke(crackerRawMaterialVOs.get(8), c3FrOxo);
-                method.invoke(crackerRawMaterialVOs.get(9), mixedC3C4);
-                method.invoke(crackerRawMaterialVOs.get(10), hyC9);
-                method.invoke(crackerRawMaterialVOs.get(11), pguOffgas);
-                method.invoke(crackerRawMaterialVOs.get(12), washOil);
-                method.invoke(crackerRawMaterialVOs.get(13), toluene);
-                method.invoke(crackerRawMaterialVOs.get(14), hyC4FrR800);
-                method.invoke(crackerRawMaterialVOs.get(15), crackerRawInput);
-                method.invoke(crackerRawMaterialVOs.get(16), crackerRawFeed);
+                method.invoke(monthlyProductionReportVOs.get(0), crackerRawInput);
+                method.invoke(monthlyProductionReportVOs.get(1), nap);
+                method.invoke(monthlyProductionReportVOs.get(2), c5);
+                method.invoke(monthlyProductionReportVOs.get(3), c6C8Na);
+                method.invoke(monthlyProductionReportVOs.get(4), wisonEthane);
+                method.invoke(monthlyProductionReportVOs.get(5), lpgToFurnace);
+                method.invoke(monthlyProductionReportVOs.get(6), raff3FrBdAnd2ph);
+                method.invoke(monthlyProductionReportVOs.get(7), c2FrLdpe);
+                method.invoke(monthlyProductionReportVOs.get(8), c3FrOxo);
+                method.invoke(monthlyProductionReportVOs.get(9), mixedC3C4);
+                method.invoke(monthlyProductionReportVOs.get(10), hyC9);
+                method.invoke(monthlyProductionReportVOs.get(11), pguOffgas);
+                method.invoke(monthlyProductionReportVOs.get(12), washOil);
+                method.invoke(monthlyProductionReportVOs.get(13), toluene);
+                method.invoke(monthlyProductionReportVOs.get(14), hyC4FrR800);
+                method.invoke(monthlyProductionReportVOs.get(15), crackerRawInput);
+                method.invoke(monthlyProductionReportVOs.get(16), crackerRawFeed);
                 // 当前年份=所属年份,当前月份=所属月份
                 if (currentMonth.equals(reportMonth) && currentYear.equals(reportYear)) {
-                    crackerRawMaterialVOs.get(0).setCurrently(crackerRawInput);
-                    crackerRawMaterialVOs.get(1).setCurrently(nap);
-                    crackerRawMaterialVOs.get(2).setCurrently(c5);
-                    crackerRawMaterialVOs.get(3).setCurrently(c6C8Na);
-                    crackerRawMaterialVOs.get(4).setCurrently(wisonEthane);
-                    crackerRawMaterialVOs.get(5).setCurrently(lpgToFurnace);
-                    crackerRawMaterialVOs.get(6).setCurrently(raff3FrBdAnd2ph);
-                    crackerRawMaterialVOs.get(7).setCurrently(c2FrLdpe);
-                    crackerRawMaterialVOs.get(8).setCurrently(c3FrOxo);
-                    crackerRawMaterialVOs.get(9).setCurrently(mixedC3C4);
-                    crackerRawMaterialVOs.get(10).setCurrently(hyC9);
-                    crackerRawMaterialVOs.get(11).setCurrently(pguOffgas);
-                    crackerRawMaterialVOs.get(12).setCurrently(washOil);
-                    crackerRawMaterialVOs.get(13).setCurrently(toluene);
-                    crackerRawMaterialVOs.get(14).setCurrently(hyC4FrR800);
-                    crackerRawMaterialVOs.get(15).setCurrently(crackerRawInput);
-                    crackerRawMaterialVOs.get(16).setCurrently(crackerRawFeed);
+                    monthlyProductionReportVOs.get(0).setCurrently(crackerRawInput);
+                    monthlyProductionReportVOs.get(1).setCurrently(nap);
+                    monthlyProductionReportVOs.get(2).setCurrently(c5);
+                    monthlyProductionReportVOs.get(3).setCurrently(c6C8Na);
+                    monthlyProductionReportVOs.get(4).setCurrently(wisonEthane);
+                    monthlyProductionReportVOs.get(5).setCurrently(lpgToFurnace);
+                    monthlyProductionReportVOs.get(6).setCurrently(raff3FrBdAnd2ph);
+                    monthlyProductionReportVOs.get(7).setCurrently(c2FrLdpe);
+                    monthlyProductionReportVOs.get(8).setCurrently(c3FrOxo);
+                    monthlyProductionReportVOs.get(9).setCurrently(mixedC3C4);
+                    monthlyProductionReportVOs.get(10).setCurrently(hyC9);
+                    monthlyProductionReportVOs.get(11).setCurrently(pguOffgas);
+                    monthlyProductionReportVOs.get(12).setCurrently(washOil);
+                    monthlyProductionReportVOs.get(13).setCurrently(toluene);
+                    monthlyProductionReportVOs.get(14).setCurrently(hyC4FrR800);
+                    monthlyProductionReportVOs.get(15).setCurrently(crackerRawInput);
+                    monthlyProductionReportVOs.get(16).setCurrently(crackerRawFeed);
                 }
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }
         // 遍历前端月报数据集合,计算total的值1~12月之和)
-        for (int i = 0; i < crackerRawMaterialVOs.size(); i++) {
-            CrackerRawMaterialVO crackerRawMaterialVO = crackerRawMaterialVOs.get(i);
+        for (int i = 0; i < monthlyProductionReportVOs.size(); i++) {
+            MonthlyProductionReportVO monthlyProductionReportVO = monthlyProductionReportVOs.get(i);
             BigDecimal total = new BigDecimal("0");
-            String janStr = crackerRawMaterialVO.getJan();
-            String febStr = crackerRawMaterialVO.getFeb();
-            String marStr = crackerRawMaterialVO.getMar();
-            String aprStr = crackerRawMaterialVO.getApr();
-            String mayStr = crackerRawMaterialVO.getMay();
-            String junStr = crackerRawMaterialVO.getJun();
-            String julStr = crackerRawMaterialVO.getJul();
-            String augStr = crackerRawMaterialVO.getAug();
-            String sepStr = crackerRawMaterialVO.getSep();
-            String octStr = crackerRawMaterialVO.getOct();
-            String novStr = crackerRawMaterialVO.getNov();
-            String decStr = crackerRawMaterialVO.getDec();
+            String janStr = monthlyProductionReportVO.getJan();
+            String febStr = monthlyProductionReportVO.getFeb();
+            String marStr = monthlyProductionReportVO.getMar();
+            String aprStr = monthlyProductionReportVO.getApr();
+            String mayStr = monthlyProductionReportVO.getMay();
+            String junStr = monthlyProductionReportVO.getJun();
+            String julStr = monthlyProductionReportVO.getJul();
+            String augStr = monthlyProductionReportVO.getAug();
+            String sepStr = monthlyProductionReportVO.getSep();
+            String octStr = monthlyProductionReportVO.getOct();
+            String novStr = monthlyProductionReportVO.getNov();
+            String decStr = monthlyProductionReportVO.getDec();
             BigDecimal jan = new BigDecimal(janStr == null ? "0" : janStr);
             BigDecimal feb = new BigDecimal(febStr == null ? "0" : febStr);
             BigDecimal mar = new BigDecimal(marStr == null ? "0" : marStr);
@@ -269,12 +264,12 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
             BigDecimal nov = new BigDecimal(novStr == null ? "0" : novStr);
             BigDecimal dec = new BigDecimal(decStr == null ? "0" : decStr);
             total = jan.add(feb).add(mar).add(apr).add(may).add(jun).add(jul).add(aug).add(sep).add(oct).add(nov).add(dec);
-            crackerRawMaterialVO.setTotal(total.toString());
+            monthlyProductionReportVO.setTotal(total.toString());
         }
-        return crackerRawMaterialVOs;
+        return monthlyProductionReportVOs;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectCrackerOutputProductByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectCrackerOutputProductByYear(Long year) {
         // 当前日期
         Date currentDate = new Date();
         // 当前年份
@@ -284,21 +279,21 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
         // 从数据库中查出的当前year的月报数据集合,每个元素对应当前year某个月的数据
         List<TMonthlyProductionReport> tMonthlyProductionReports = tMonthlyProductionReportMapper.selectCrackerOutputProductByYear(year);
         // 前端月报数据集合,每个元素对应当前某个指标的title、unit、1~12月的数据以及年度汇总数据
-        List<CrackerRawMaterialVO> crackerRawMaterialVOs = new ArrayList<>();
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Cracker Output Product", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("H2", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C2=", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C3=", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C3/C4 LPG", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("C4'S", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("RPG", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("PO", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Naphthalene", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("EBO", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Cracker Residue ", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("Methane", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("OFFAGE", "t"));
-        crackerRawMaterialVOs.add(new CrackerRawMaterialVO("output total", "t"));
+        List<MonthlyProductionReportVO> monthlyProductionReportVOs = new ArrayList<>();
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("cracker_output", "Cracker Output Product", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("h2_produced", "H2", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("ethylen_produced", "C2=", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("propylene_produced", "C3=", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("c3_c4_lpg_produced", "C3/C4 LPG", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("mixed_c4s_produced", "C4'S", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("rpg_produced", "RPG", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("po_flux_oil_produced", "PO", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("naphthalene_produced", "Naphthalene", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("ebo_produced", "EBO", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("residue_oil_produced", "Cracker Residue", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("methane_produced", "Methane", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("offgas_produced", "OFFAGE", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("cracker_output", "output total", "t"));
         // 遍历从数据库中查出的月报数据集合,结果为0~12条数据不等
         for (int i = 0; i < tMonthlyProductionReports.size(); i++) {
             TMonthlyProductionReport tMonthlyProductionReport = tMonthlyProductionReports.get(i);
@@ -322,7 +317,7 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
             try {
                 Long reportMonth = tMonthlyProductionReport.getReportMonth();   // 当前元素的所属月份
                 Long reportYear = tMonthlyProductionReport.getReportYear();     // 当前元素的所属年份
-                clazz = Class.forName("com.ruoyi.project.production.service.impl.vo.CrackerRawMaterialVO");
+                clazz = Class.forName("com.ruoyi.project.production.service.impl.vo.MonthlyProductionReportVO");
                 switch (reportMonth.toString()) {
                     case "1":   // 一月
                         method = clazz.getDeclaredMethod("setJan", String.class);
@@ -362,57 +357,57 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
                         break;
                 }
                 // 按照当前元素的所属月份调取相应set方法
-                method.invoke(crackerRawMaterialVOs.get(0), crackerOutput);
-                method.invoke(crackerRawMaterialVOs.get(1), h2Produced);
-                method.invoke(crackerRawMaterialVOs.get(2), ethylenProduced);
-                method.invoke(crackerRawMaterialVOs.get(3), propyleneProduced);
-                method.invoke(crackerRawMaterialVOs.get(4), c3C4LpgProduced);
-                method.invoke(crackerRawMaterialVOs.get(5), mixedC4sProduced);
-                method.invoke(crackerRawMaterialVOs.get(6), rpgProduced);
-                method.invoke(crackerRawMaterialVOs.get(7), poFluxOilProduced);
-                method.invoke(crackerRawMaterialVOs.get(8), naphthaleneProduced);
-                method.invoke(crackerRawMaterialVOs.get(9), eboProduced);
-                method.invoke(crackerRawMaterialVOs.get(10), residueOilProduced);
-                method.invoke(crackerRawMaterialVOs.get(11), methaneProduced);
-                method.invoke(crackerRawMaterialVOs.get(12), offgasProduced);
-                method.invoke(crackerRawMaterialVOs.get(13), crackerOutput);
+                method.invoke(monthlyProductionReportVOs.get(0), crackerOutput);
+                method.invoke(monthlyProductionReportVOs.get(1), h2Produced);
+                method.invoke(monthlyProductionReportVOs.get(2), ethylenProduced);
+                method.invoke(monthlyProductionReportVOs.get(3), propyleneProduced);
+                method.invoke(monthlyProductionReportVOs.get(4), c3C4LpgProduced);
+                method.invoke(monthlyProductionReportVOs.get(5), mixedC4sProduced);
+                method.invoke(monthlyProductionReportVOs.get(6), rpgProduced);
+                method.invoke(monthlyProductionReportVOs.get(7), poFluxOilProduced);
+                method.invoke(monthlyProductionReportVOs.get(8), naphthaleneProduced);
+                method.invoke(monthlyProductionReportVOs.get(9), eboProduced);
+                method.invoke(monthlyProductionReportVOs.get(10), residueOilProduced);
+                method.invoke(monthlyProductionReportVOs.get(11), methaneProduced);
+                method.invoke(monthlyProductionReportVOs.get(12), offgasProduced);
+                method.invoke(monthlyProductionReportVOs.get(13), crackerOutput);
                 // 当前年份=所属年份,当前月份=所属月份
                 if (currentMonth.equals(reportMonth) && currentYear.equals(reportYear)) {
-                    crackerRawMaterialVOs.get(0).setCurrently(crackerOutput);
-                    crackerRawMaterialVOs.get(1).setCurrently(h2Produced);
-                    crackerRawMaterialVOs.get(2).setCurrently(ethylenProduced);
-                    crackerRawMaterialVOs.get(3).setCurrently(propyleneProduced);
-                    crackerRawMaterialVOs.get(4).setCurrently(c3C4LpgProduced);
-                    crackerRawMaterialVOs.get(5).setCurrently(mixedC4sProduced);
-                    crackerRawMaterialVOs.get(6).setCurrently(rpgProduced);
-                    crackerRawMaterialVOs.get(7).setCurrently(poFluxOilProduced);
-                    crackerRawMaterialVOs.get(8).setCurrently(naphthaleneProduced);
-                    crackerRawMaterialVOs.get(9).setCurrently(eboProduced);
-                    crackerRawMaterialVOs.get(10).setCurrently(residueOilProduced);
-                    crackerRawMaterialVOs.get(11).setCurrently(methaneProduced);
-                    crackerRawMaterialVOs.get(12).setCurrently(offgasProduced);
-                    crackerRawMaterialVOs.get(13).setCurrently(crackerOutput);
+                    monthlyProductionReportVOs.get(0).setCurrently(crackerOutput);
+                    monthlyProductionReportVOs.get(1).setCurrently(h2Produced);
+                    monthlyProductionReportVOs.get(2).setCurrently(ethylenProduced);
+                    monthlyProductionReportVOs.get(3).setCurrently(propyleneProduced);
+                    monthlyProductionReportVOs.get(4).setCurrently(c3C4LpgProduced);
+                    monthlyProductionReportVOs.get(5).setCurrently(mixedC4sProduced);
+                    monthlyProductionReportVOs.get(6).setCurrently(rpgProduced);
+                    monthlyProductionReportVOs.get(7).setCurrently(poFluxOilProduced);
+                    monthlyProductionReportVOs.get(8).setCurrently(naphthaleneProduced);
+                    monthlyProductionReportVOs.get(9).setCurrently(eboProduced);
+                    monthlyProductionReportVOs.get(10).setCurrently(residueOilProduced);
+                    monthlyProductionReportVOs.get(11).setCurrently(methaneProduced);
+                    monthlyProductionReportVOs.get(12).setCurrently(offgasProduced);
+                    monthlyProductionReportVOs.get(13).setCurrently(crackerOutput);
                 }
             } catch (Exception e) {
                 e.printStackTrace();
             }
         }
         // 遍历前端月报数据集合,计算total的值1~12月之和)
-        for (int i = 0; i < crackerRawMaterialVOs.size(); i++) {
-            CrackerRawMaterialVO crackerRawMaterialVO = crackerRawMaterialVOs.get(i);
+        for (int i = 0; i < monthlyProductionReportVOs.size(); i++) {
+            MonthlyProductionReportVO monthlyProductionReportVO = monthlyProductionReportVOs.get(i);
             BigDecimal total = new BigDecimal("0");
-            String janStr = crackerRawMaterialVO.getJan();
-            String febStr = crackerRawMaterialVO.getFeb();
-            String marStr = crackerRawMaterialVO.getMar();
-            String aprStr = crackerRawMaterialVO.getApr();
-            String mayStr = crackerRawMaterialVO.getMay();
-            String junStr = crackerRawMaterialVO.getJun();
-            String julStr = crackerRawMaterialVO.getJul();
-            String augStr = crackerRawMaterialVO.getAug();
-            String sepStr = crackerRawMaterialVO.getSep();
-            String octStr = crackerRawMaterialVO.getOct();
-            String novStr = crackerRawMaterialVO.getNov();
-            String decStr = crackerRawMaterialVO.getDec();
+            String janStr = monthlyProductionReportVO.getJan();
+            String febStr = monthlyProductionReportVO.getFeb();
+            String marStr = monthlyProductionReportVO.getMar();
+            String aprStr = monthlyProductionReportVO.getApr();
+            String mayStr = monthlyProductionReportVO.getMay();
+            String junStr = monthlyProductionReportVO.getJun();
+            String julStr = monthlyProductionReportVO.getJul();
+            String augStr = monthlyProductionReportVO.getAug();
+            String sepStr = monthlyProductionReportVO.getSep();
+            String octStr = monthlyProductionReportVO.getOct();
+            String novStr = monthlyProductionReportVO.getNov();
+            String decStr = monthlyProductionReportVO.getDec();
             BigDecimal jan = new BigDecimal(janStr == null ? "0" : janStr);
             BigDecimal feb = new BigDecimal(febStr == null ? "0" : febStr);
             BigDecimal mar = new BigDecimal(marStr == null ? "0" : marStr);
@@ -426,84 +421,205 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
             BigDecimal nov = new BigDecimal(novStr == null ? "0" : novStr);
             BigDecimal dec = new BigDecimal(decStr == null ? "0" : decStr);
             total = jan.add(feb).add(mar).add(apr).add(may).add(jun).add(jul).add(aug).add(sep).add(oct).add(nov).add(dec);
-            crackerRawMaterialVO.setTotal(total.toString());
+            monthlyProductionReportVO.setTotal(total.toString());
         }
-        return crackerRawMaterialVOs;
+        return monthlyProductionReportVOs;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectAromaticsRawMaterialByYear(Long year) {
-        return  null;
+    public List<MonthlyProductionReportVO> selectAromaticsRawMaterialByYear(Long year) {
+        // 当前日期
+        Date currentDate = new Date();
+        // 当前年份
+        Long currentYear = Long.parseLong(currentDate.getYear() + 1900 + "");
+        // 当前月份
+        Long currentMonth = Long.parseLong(currentDate.getMonth() + 1 + "");
+        // 从数据库中查出的当前year的月报数据集合,每个元素对应当前year某个月的数据
+        List<TMonthlyProductionReport> tMonthlyProductionReports = tMonthlyProductionReportMapper.selectAromaticsRawMaterialByYear(year);
+        // 前端月报数据集合,每个元素对应当前某个指标的title、unit、1~12月的数据以及年度汇总数据
+        List<MonthlyProductionReportVO> monthlyProductionReportVOs = new ArrayList<>();
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aromatics_raw_input", "Aromatics Raw Material", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_rpg2", "RPG fr EU", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_h2", "H2 to PGU", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_btx_produced", "Mix BTX Product", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_btx_to_aeu", "Mix BTX to AEU", "t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aromatics_raw_input", "input total", "t"));
+        // 遍历从数据库中查出的月报数据集合,结果为0~12条数据不等
+        for (int i = 0; i < tMonthlyProductionReports.size(); i++) {
+            TMonthlyProductionReport tMonthlyProductionReport = tMonthlyProductionReports.get(i);
+            String pguRpg2 = tMonthlyProductionReport.getPguRpg2();
+            String pguH2 = tMonthlyProductionReport.getPguH2();
+            String pguBtxProduced = tMonthlyProductionReport.getPguBtxProduced();
+            String pguBtxToAeu = tMonthlyProductionReport.getPguBtxToAeu();
+            String aromaticsRawInput = tMonthlyProductionReport.getAromaticsRawInput();
+            // 前端数据集合的class
+            Class clazz = null;
+            // 当前元素调用的set方法
+            Method method = null;
+            try {
+                Long reportMonth = tMonthlyProductionReport.getReportMonth();   // 当前元素的所属月份
+                Long reportYear = tMonthlyProductionReport.getReportYear();     // 当前元素的所属年份
+                clazz = Class.forName("com.ruoyi.project.production.service.impl.vo.MonthlyProductionReportVO");
+                switch (reportMonth.toString()) {
+                    case "1":   // 一月
+                        method = clazz.getDeclaredMethod("setJan", String.class);
+                        break;
+                    case "2":   // 二月
+                        method = clazz.getDeclaredMethod("setFeb", String.class);
+                        break;
+                    case "3":   // 三月
+                        method = clazz.getDeclaredMethod("setMar", String.class);
+                        break;
+                    case "4":   // 四月
+                        method = clazz.getDeclaredMethod("setApr", String.class);
+                        break;
+                    case "5":   // 五月
+                        method = clazz.getDeclaredMethod("setMay", String.class);
+                        break;
+                    case "6":   // 六月
+                        method = clazz.getDeclaredMethod("setJun", String.class);
+                        break;
+                    case "7":   // 七月
+                        method = clazz.getDeclaredMethod("setJul", String.class);
+                        break;
+                    case "8":   // 八月
+                        method = clazz.getDeclaredMethod("setAug", String.class);
+                        break;
+                    case "9":   // 九月
+                        method = clazz.getDeclaredMethod("setSep", String.class);
+                        break;
+                    case "10":   // 十月
+                        method = clazz.getDeclaredMethod("setOct", String.class);
+                        break;
+                    case "11":   // 十一月
+                        method = clazz.getDeclaredMethod("setNov", String.class);
+                        break;
+                    case "12":   // 十二月
+                        method = clazz.getDeclaredMethod("setDec", String.class);
+                        break;
+                }
+                // 按照当前元素的所属月份调取相应set方法
+                method.invoke(monthlyProductionReportVOs.get(0), aromaticsRawInput);
+                method.invoke(monthlyProductionReportVOs.get(1), pguRpg2);
+                method.invoke(monthlyProductionReportVOs.get(2), pguH2);
+                method.invoke(monthlyProductionReportVOs.get(3), pguBtxProduced);
+                method.invoke(monthlyProductionReportVOs.get(4), pguBtxToAeu);
+                method.invoke(monthlyProductionReportVOs.get(5), aromaticsRawInput);
+                // 当前年份=所属年份,当前月份=所属月份
+                if (currentMonth.equals(reportMonth) && currentYear.equals(reportYear)) {
+                    monthlyProductionReportVOs.get(0).setCurrently(aromaticsRawInput);
+                    monthlyProductionReportVOs.get(1).setCurrently(pguRpg2);
+                    monthlyProductionReportVOs.get(2).setCurrently(pguH2);
+                    monthlyProductionReportVOs.get(3).setCurrently(pguBtxProduced);
+                    monthlyProductionReportVOs.get(4).setCurrently(pguBtxToAeu);
+                    monthlyProductionReportVOs.get(5).setCurrently(aromaticsRawInput);
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        // 遍历前端月报数据集合,计算total的值1~12月之和)
+        for (int i = 0; i < monthlyProductionReportVOs.size(); i++) {
+            MonthlyProductionReportVO monthlyProductionReportVO = monthlyProductionReportVOs.get(i);
+            BigDecimal total = new BigDecimal("0");
+            String janStr = monthlyProductionReportVO.getJan();
+            String febStr = monthlyProductionReportVO.getFeb();
+            String marStr = monthlyProductionReportVO.getMar();
+            String aprStr = monthlyProductionReportVO.getApr();
+            String mayStr = monthlyProductionReportVO.getMay();
+            String junStr = monthlyProductionReportVO.getJun();
+            String julStr = monthlyProductionReportVO.getJul();
+            String augStr = monthlyProductionReportVO.getAug();
+            String sepStr = monthlyProductionReportVO.getSep();
+            String octStr = monthlyProductionReportVO.getOct();
+            String novStr = monthlyProductionReportVO.getNov();
+            String decStr = monthlyProductionReportVO.getDec();
+            BigDecimal jan = new BigDecimal(janStr == null ? "0" : janStr);
+            BigDecimal feb = new BigDecimal(febStr == null ? "0" : febStr);
+            BigDecimal mar = new BigDecimal(marStr == null ? "0" : marStr);
+            BigDecimal apr = new BigDecimal(aprStr == null ? "0" : aprStr);
+            BigDecimal may = new BigDecimal(mayStr == null ? "0" : mayStr);
+            BigDecimal jun = new BigDecimal(junStr == null ? "0" : junStr);
+            BigDecimal jul = new BigDecimal(julStr == null ? "0" : julStr);
+            BigDecimal aug = new BigDecimal(augStr == null ? "0" : augStr);
+            BigDecimal sep = new BigDecimal(sepStr == null ? "0" : sepStr);
+            BigDecimal oct = new BigDecimal(octStr == null ? "0" : octStr);
+            BigDecimal nov = new BigDecimal(novStr == null ? "0" : novStr);
+            BigDecimal dec = new BigDecimal(decStr == null ? "0" : decStr);
+            total = jan.add(feb).add(mar).add(apr).add(may).add(jun).add(jul).add(aug).add(sep).add(oct).add(nov).add(dec);
+            monthlyProductionReportVO.setTotal(total.toString());
+        }
+        return monthlyProductionReportVOs;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectAromaticsOutputProductByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectAromaticsOutputProductByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectEligibleProductRateByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectEligibleProductRateByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectProductYieldByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectProductYieldByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectCrackerUtilityConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectCrackerUtilityConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectCrackerEnergyConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectCrackerEnergyConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectAromaticsUtilityConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectAromaticsUtilityConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectAromaticsEnergyConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectAromaticsEnergyConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectPlantLoadByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectPlantLoadByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectCostFrEthyleneByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectCostFrEthyleneByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectRuningRateByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectRuningRateByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectShoudownHourByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectShoudownHourByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectOthersideByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectOthersideByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectChemicalConsumeByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectChemicalConsumeByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectSCTUUtilityConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectSCTUUtilityConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectSUBUtilityConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectSUBUtilityConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectSCTFUtilityConsumptionByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectSCTFUtilityConsumptionByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectKbiByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectKbiByYear(Long year) {
         return  null;
     }
     @Override
-    public List<CrackerRawMaterialVO> selectSummaryByYear(Long year) {
+    public List<MonthlyProductionReportVO> selectSummaryByYear(Long year) {
         return  null;
     }
 

+ 16 - 0
master/src/main/java/com/ruoyi/project/production/service/impl/thread/SyncMonthlyThread.java

@@ -155,6 +155,22 @@ public class SyncMonthlyThread extends Thread {
                 .add(eboProduced).add(residueOilProduced).add(methaneProduced).add(offgasProduced);
         monthly.setCrackerOutput(crackerOutput.toString());
 
+        String pguRpg2Str = daily.getPguRpg2();
+        String pguH2Str = daily.getPguH2();
+        String pguBtxProducedStr = daily.getPguBtxProduced();
+        String pguBtxToAeuStr = daily.getPguBtxToAeu();
+        BigDecimal pguRpg2 = new BigDecimal(pguRpg2Str == null ? "0" : pguRpg2Str);
+        BigDecimal pguH2 = new BigDecimal(pguH2Str == null ? "0" : pguH2Str);
+        BigDecimal pguBtxProduced = new BigDecimal(pguBtxProducedStr == null ? "0" : pguBtxProducedStr);
+        BigDecimal pguBtxToAeu = new BigDecimal(pguBtxToAeuStr == null ? "0" : pguBtxToAeuStr);
+        monthly.setPguRpg2(pguRpg2.toString());
+        monthly.setPguH2(pguH2.toString());
+        monthly.setPguBtxProduced(pguBtxProduced.toString());
+        monthly.setPguBtxToAeu(pguBtxToAeu.toString());
+        BigDecimal aromaticsRawInput = new BigDecimal("0");
+        aromaticsRawInput = aromaticsRawInput.add(pguRpg2).add(pguH2);
+        monthly.setAromaticsRawInput(aromaticsRawInput.toString());
+
         // 查询年份=reportYear,月份=reportMonth的月报数据
         int count = tMonthlyProductionReportMapper.selectTMonthlyProductionReportCountByDate(reportYear, reportMonth);
         if (count == 0) {   // 新增月报数据

+ 19 - 6
master/src/main/java/com/ruoyi/project/production/service/impl/vo/CrackerRawMaterialVO.java → master/src/main/java/com/ruoyi/project/production/service/impl/vo/MonthlyProductionReportVO.java

@@ -5,8 +5,12 @@ package com.ruoyi.project.production.service.impl.vo;
  * @email: wangggziwen@163.com
  * @datetime: 2022/10/31 14:16
  */
-public class CrackerRawMaterialVO {
+public class MonthlyProductionReportVO {
 
+    /** 字典表dictLabel的值 */
+    private String dictLabel;
+
+    /** 前端表格最左列显示的文字 */
     private String title;
 
     private String unit;
@@ -39,6 +43,14 @@ public class CrackerRawMaterialVO {
 
     private String total;
 
+    public String getDictLabel() {
+        return dictLabel;
+    }
+
+    public void setDictLabel(String dictLabel) {
+        this.dictLabel = dictLabel;
+    }
+
     public String getTitle() {
         return title;
     }
@@ -167,11 +179,12 @@ public class CrackerRawMaterialVO {
         this.total = total;
     }
 
-    public CrackerRawMaterialVO() {
-    }
+    public MonthlyProductionReportVO() {
+        }
 
-    public CrackerRawMaterialVO(String title, String unit) {
-        this.title = title;
-        this.unit = unit;
+    public MonthlyProductionReportVO(String dictLabel, String title, String unit) {
+            this.dictLabel = dictLabel;
+            this.title = title;
+            this.unit = unit;
     }
 }

+ 5 - 1
master/src/main/resources/mybatis/production/TDailyProductionReportMapper.xml

@@ -654,7 +654,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         sum(d.EBO_PRODUCED) as eboProduced,
         sum(d.RESIDUE_OIL_PRODUCED) as residueOilProduced,
         sum(d.METHANE_PRODUCED) as methaneProduced,
-        sum(d.OFFGAS_PRODUCED) as offgasProduced
+        sum(d.OFFGAS_PRODUCED) as offgasProduced,
+        sum(d.pgu_rpg2) as pguRpg2,
+        sum(d.pgu_h2) as pguH2,
+        sum(d.pgu_btx_produced) as pguBtxProduced,
+        sum(d.pgu_btx_to_aeu) as pguBtxToAeu
         from T_DAILY_PRODUCTION_REPORT d
         where extract(year from d.REPORT_DATE) = #{reportYear}
         and extract(month from d.REPORT_DATE) = #{reportMonth}

+ 31 - 4
master/src/main/resources/mybatis/production/TMonthlyProductionReportMapper.xml

@@ -37,6 +37,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="methaneProduced"      column="methane_produced"    />
         <result property="offgasProduced"       column="offgas_produced"    />
         <result property="crackerOutput"        column="cracker_output"    />
+        <result property="pguRpg2"              column="pgu_rpg2"    />
+        <result property="pguH2"                column="pgu_h2"    />
+        <result property="pguBtxProduced"       column="pgu_btx_produced"    />
+        <result property="pguBtxToAeu"          column="pgu_btx_to_aeu"    />
+        <result property="aromaticsRawInput"    column="aromatics_raw_input"    />
     </resultMap>
 
     <select id="selectCrackerRawMaterialByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult">
@@ -50,14 +55,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
     <select id="selectCrackerOutputProductByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult">
         select
-            d.id, d.report_month, d.report_year, d.H2_PRODUCED, d.ETHYLEN_PRODUCED, d.PROPYLENE_PRODUCED, d.C3_C4_LPG_PRODUCED, d.MIXED_C4S_PRODUCED,
-            d.RPG_PRODUCED, d.PO_FLUX_OIL_PRODUCED, d.NAPHTHALENE_PRODUCED, d.EBO_PRODUCED, d.RESIDUE_OIL_PRODUCED,
-            d.METHANE_PRODUCED, d.OFFGAS_PRODUCED, d.CRACKER_OUTPUT
+            d.id, d.report_month, d.report_year, d.H2_PRODUCED, d.ETHYLEN_PRODUCED, d.PROPYLENE_PRODUCED,
+            d.C3_C4_LPG_PRODUCED, d.MIXED_C4S_PRODUCED, d.RPG_PRODUCED, d.PO_FLUX_OIL_PRODUCED, d.NAPHTHALENE_PRODUCED,
+            d.EBO_PRODUCED, d.RESIDUE_OIL_PRODUCED, d.METHANE_PRODUCED, d.OFFGAS_PRODUCED, d.CRACKER_OUTPUT
         from
             t_monthly_production_report d
         where d.report_year = #{year}
     </select>
-    <select id="selectAromaticsRawMaterialByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
+    <select id="selectAromaticsRawMaterialByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult">
+        select
+               d.id, d.report_month, d.report_year, d.pgu_rpg2, d.pgu_h2,
+               d.pgu_btx_produced, d.pgu_btx_to_aeu, d.aromatics_raw_input
+        from
+             t_monthly_production_report d
+        where d.report_year = #{year}
+    </select>
     <select id="selectAromaticsOutputProductByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
     <select id="selectEligibleProductRateByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
     <select id="selectProductYieldByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
@@ -121,6 +133,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="methaneProduced != null">methane_produced,</if>
             <if test="offgasProduced != null">offgas_produced,</if>
             <if test="crackerOutput != null">cracker_output,</if>
+            <if test="pguRpg2 != null">pgu_rpg2,</if>
+            <if test="pguH2 != null">pgu_h2,</if>
+            <if test="pguBtxProduced != null">pgu_btx_produced,</if>
+            <if test="pguBtxToAeu != null">pgu_btx_to_aeu,</if>
+            <if test="aromaticsRawInput != null">aromatics_raw_input,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -155,6 +172,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="methaneProduced != null">#{methaneProduced},</if>
             <if test="offgasProduced != null">#{offgasProduced},</if>
             <if test="crackerOutput != null">#{crackerOutput},</if>
+            <if test="pguRpg2 != null">#{pguRpg2},</if>
+            <if test="pguH2 != null">#{pguH2},</if>
+            <if test="pguBtxProduced != null">#{pguBtxProduced},</if>
+            <if test="pguBtxToAeu != null">#{pguBtxToAeu},</if>
+            <if test="aromaticsRawInput != null">#{aromaticsRawInput},</if>
         </trim>
     </insert>
 
@@ -190,6 +212,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="methaneProduced != null">methane_produced = #{methaneProduced},</if>
             <if test="offgasProduced != null">offgas_produced = #{offgasProduced},</if>
             <if test="crackerOutput != null">cracker_output = #{crackerOutput},</if>
+            <if test="pguRpg2 != null">pgu_rpg2 = #{pguRpg2},</if>
+            <if test="pguH2 != null">pgu_h2 = #{pguH2},</if>
+            <if test="pguBtxProduced != null">pgu_btx_produced = #{pguBtxProduced},</if>
+            <if test="pguBtxToAeu != null">pgu_btx_to_aeu = #{pguBtxToAeu},</if>
+            <if test="aromaticsRawInput != null">aromatics_raw_input = #{aromaticsRawInput},</if>
         </trim>
         where report_month = #{reportMonth} and report_year = #{reportYear}
     </update>

+ 9 - 25
ui/src/views/production/monthly/index.vue

@@ -479,7 +479,7 @@
       </el-table-column>
     </el-table>
     <el-table border :data="tableKBI" style="width: 100%;">
-      <el-table-column prop="kbi" label="KBI"></el-table-column>
+      <el-table-column prop="kbi" label="KBI" width="150"></el-table-column>
       <el-table-column prop="target" label="target"></el-table-column>
       <el-table-column prop="currently" label="currently"></el-table-column>
       <el-table-column prop="jan" :label="this.monthList[0]"></el-table-column>
@@ -498,7 +498,7 @@
     </el-table>
     <el-table border :data="tableSummary" style="width: 100%;">
       <el-table-column label="BCC装置主要原材料及公用工程消耗">
-        <el-table-column prop="item" label="项目"></el-table-column>
+        <el-table-column prop="item" label="项目" width="150"></el-table-column>
         <el-table-column prop="usage" label="年耗量"></el-table-column>
         <el-table-column prop="currently" label="currently"></el-table-column>
         <el-table-column prop="jan" :label="this.monthList[0]"></el-table-column>
@@ -569,8 +569,6 @@ export default {
   name: "Monthly",
   data() {
     return {
-      // 对比指标下拉框
-      chemicalsOptions: [],
       // 趋势图y轴数值
       valueList: [],
       // 趋势图x轴日期
@@ -614,14 +612,7 @@ export default {
       monthList: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
       tableCrackerRawMaterial: [],
       tableCrackerOutputProduct: [],
-      tableAromaticsRawMaterial: [
-        {title: "Aromatics Raw Material"},
-        {title: "RPG fr EU"},
-        {title: "H2 to PGU"},
-        {title: "Mix BTX Product"},
-        {title: "Mix BTX to AEU"},
-        {title: "input total"},
-      ],
+      tableAromaticsRawMaterial: [],
       tableAromaticsOutputProduct: [
         {title:"Aromatics Output Product"},
         {title:"Benzene"},
@@ -893,9 +884,6 @@ export default {
     }
   },
   created() {
-    this.getDicts("CHEMICALS").then(response => {
-      this.chemicalsOptions = response.data;
-    });
     // 加载时设置year为今年
     this.year = new Date();
     // 加载月报数据
@@ -908,16 +896,12 @@ export default {
     },
     /** 处理最左列指标点击事件 */
     columnOnclick(row) {
-      let title = row.title;
+      let dictLabel = row.dictLabel;
       let toYear = this.year.getFullYear();
       let toMonth = this.year.getMonth() + 1;
       let fromYear = toYear - 1;
       let fromMonth = toMonth;
-      for (let i = 0; i < this.chemicalsOptions.length; i++) {
-        if (this.chemicalsOptions[i].dictLabel == title) {
-          this.analysisQueryParams.item = this.chemicalsOptions[i].dictValue;
-        }
-      }
+      this.analysisQueryParams.item = dictLabel;
       this.analysisQueryParams.toYear = toYear;
       this.analysisQueryParams.toMonth = toMonth;
       this.analysisQueryParams.fromYear = fromYear;
@@ -935,7 +919,6 @@ export default {
     draw() {
       getAnalysisData(this.analysisQueryParams).then(response => {
         let data = response.data;
-        console.log(data);
         this.maxValue = 0;
         this.minValue = data[0].valueData;
         for (let i = 0; i < data.length; i++) {
@@ -1027,10 +1010,11 @@ export default {
       });
       getCrackerOutputProduct(year).then(response => {
         this.tableCrackerOutputProduct = response.data;
+        console.log(this.tableCrackerOutputProduct);
+      });
+      getAromaticsRawMaterial(year).then(response => {
+        this.tableAromaticsRawMaterial = response.data;
       });
-      // getAromaticsRawMaterial(year).then(response => {
-      //   this.tableAromaticsRawMaterial = response.data;
-      // });
       // getAromaticsOutputProduct(year).then(response => {
       //   this.tableAromaticsOutputProduct = response.data;
       // });