瀏覽代碼

王子文 月报 Aromatics Output Product

wangggziwen 2 年之前
父節點
當前提交
27464813eb

+ 154 - 0
master/src/main/java/com/ruoyi/project/production/domain/TMonthlyProductionReport.java

@@ -162,6 +162,50 @@ public class TMonthlyProductionReport extends BaseEntity
     @Excel(name = "Aromatics Raw Material input total")
     private String aromaticsRawInput;
 
+    /** Aromatics Output Product Benzene */
+    @Excel(name = "Aromatics Output Product Benzene")
+    private String aeuBenzeneProduced;
+
+    /** Aromatics Output Product Toluene */
+    @Excel(name = "Aromatics Output Product Toluene")
+    private String aeuTolueneProduced;
+
+    /** Aromatics Output Product Xylene */
+    @Excel(name = "Aromatics Output Product Xylene")
+    private String aeuXyleneProduced;
+
+    /** Aromatics Output Product C6-C8 NA */
+    @Excel(name = "Aromatics Output Product C6-C8 NA")
+    private String aeuC6C8NaProduced;
+
+    /** Aromatics Output Product C5 */
+    @Excel(name = "Aromatics Output Product C5")
+    private String pguC5Produced;
+
+    /** Aromatics Output Product C9 */
+    @Excel(name = "Aromatics Output Product C9")
+    private String pguC9Produced;
+
+    /** Aromatics Output Product Wash oil */
+    @Excel(name = "Aromatics Output Product Wash oil")
+    private String pguWashoilProduced;
+
+    /** Aromatics Output Product offags */
+    @Excel(name = "Aromatics Output Product offags")
+    private String pguOffgasProduced;
+
+    /** Aromatics Output Product MIX BTX change */
+    @Excel(name = "Aromatics Output Product MIX BTX change")
+    private String pguBtxChange;
+
+    /** Aromatics Output Product Toluene Product(- EU) */
+    @Excel(name = "Aromatics Output Product Toluene Product(- EU)")
+    private String aeuTolueneProducedMEu;
+
+    /** Aromatics Output Product output total */
+    @Excel(name = "Aromatics Output Product output total")
+    private String aromaticsOutput;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -495,6 +539,105 @@ public class TMonthlyProductionReport extends BaseEntity
     {
         return aromaticsRawInput;
     }
+    public void setAeuBenzeneProduced(String aeuBenzeneProduced)
+    {
+        this.aeuBenzeneProduced = aeuBenzeneProduced;
+    }
+
+    public String getAeuBenzeneProduced()
+    {
+        return aeuBenzeneProduced;
+    }
+    public void setAeuTolueneProduced(String aeuTolueneProduced)
+    {
+        this.aeuTolueneProduced = aeuTolueneProduced;
+    }
+
+    public String getAeuTolueneProduced()
+    {
+        return aeuTolueneProduced;
+    }
+    public void setAeuXyleneProduced(String aeuXyleneProduced)
+    {
+        this.aeuXyleneProduced = aeuXyleneProduced;
+    }
+
+    public String getAeuXyleneProduced()
+    {
+        return aeuXyleneProduced;
+    }
+    public void setAeuC6C8NaProduced(String aeuC6C8NaProduced)
+    {
+        this.aeuC6C8NaProduced = aeuC6C8NaProduced;
+    }
+
+    public String getAeuC6C8NaProduced()
+    {
+        return aeuC6C8NaProduced;
+    }
+    public void setPguC5Produced(String pguC5Produced)
+    {
+        this.pguC5Produced = pguC5Produced;
+    }
+
+    public String getPguC5Produced()
+    {
+        return pguC5Produced;
+    }
+    public void setPguC9Produced(String pguC9Produced)
+    {
+        this.pguC9Produced = pguC9Produced;
+    }
+
+    public String getPguC9Produced()
+    {
+        return pguC9Produced;
+    }
+    public void setPguWashoilProduced(String pguWashoilProduced)
+    {
+        this.pguWashoilProduced = pguWashoilProduced;
+    }
+
+    public String getPguWashoilProduced()
+    {
+        return pguWashoilProduced;
+    }
+    public void setPguOffgasProduced(String pguOffgasProduced)
+    {
+        this.pguOffgasProduced = pguOffgasProduced;
+    }
+
+    public String getPguOffgasProduced()
+    {
+        return pguOffgasProduced;
+    }
+    public void setPguBtxChange(String pguBtxChange)
+    {
+        this.pguBtxChange = pguBtxChange;
+    }
+
+    public String getPguBtxChange()
+    {
+        return pguBtxChange;
+    }
+    public void setAeuTolueneProducedMEu(String aeuTolueneProducedMEu)
+    {
+        this.aeuTolueneProducedMEu = aeuTolueneProducedMEu;
+    }
+
+    public String getAeuTolueneProducedMEu()
+    {
+        return aeuTolueneProducedMEu;
+    }
+    public void setAromaticsOutput(String aromaticsOutput)
+    {
+        this.aromaticsOutput = aromaticsOutput;
+    }
+
+    public String getAromaticsOutput()
+    {
+        return aromaticsOutput;
+    }
 
     @Override
     public String toString() {
@@ -536,6 +679,17 @@ public class TMonthlyProductionReport extends BaseEntity
             .append("pguBtxProduced", getPguBtxProduced())
             .append("pguBtxToAeu", getPguBtxToAeu())
             .append("aromaticsRawInput", getAromaticsRawInput())
+            .append("aeuBenzeneProduced", getAeuBenzeneProduced())
+            .append("aeuTolueneProduced", getAeuTolueneProduced())
+            .append("aeuXyleneProduced", getAeuXyleneProduced())
+            .append("aeuC6C8NaProduced", getAeuC6C8NaProduced())
+            .append("pguC5Produced", getPguC5Produced())
+            .append("pguC9Produced", getPguC9Produced())
+            .append("pguWashoilProduced", getPguWashoilProduced())
+            .append("pguOffgasProduced", getPguOffgasProduced())
+            .append("pguBtxChange", getPguBtxChange())
+            .append("aeuTolueneProducedMEu", getAeuTolueneProducedMEu())
+            .append("aromaticsOutput", getAromaticsOutput())
             .toString();
     }
 }

+ 150 - 1
master/src/main/java/com/ruoyi/project/production/service/impl/TMonthlyProductionReportServiceImpl.java

@@ -552,7 +552,156 @@ public class TMonthlyProductionReportServiceImpl implements ITMonthlyProductionR
     }
     @Override
     public List<MonthlyProductionReportVO> selectAromaticsOutputProductByYear(Long year) {
-        return  null;
+        // 当前日期
+        Date currentDate = new Date();
+        // 当前年份
+        Long currentYear = Long.parseLong(currentDate.getYear() + 1900 + "");
+        // 当前月份
+        Long currentMonth = Long.parseLong(currentDate.getMonth() + 1 + "");
+        // 从数据库中查出的当前year的月报数据集合,每个元素对应当前year某个月的数据
+        List<TMonthlyProductionReport> tMonthlyProductionReports = tMonthlyProductionReportMapper.selectAromaticsOutputProductByYear(year);
+        // 前端月报数据集合,每个元素对应当前某个指标的title、unit、1~12月的数据以及年度汇总数据
+        List<MonthlyProductionReportVO> monthlyProductionReportVOs = new ArrayList<>();
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aromatics_output","Aromatics Output Product","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aeu_benzene_produced","Benzene","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aeu_toluene_produced","Toluene","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aeu_xylene_produced","Xylene","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aeu_c6_c8_na_produced","C6-C8 NA","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_c5_produced","C5","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_c9_produced","C9","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_washoil_produced","Wash oil","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_offgas_produced","offags","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_btx_change","MIX BTX change","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("pgu_btx_produced","BTX Product","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aeu_toluene_produced_m_eu","Toluene Product(- EU)","t"));
+        monthlyProductionReportVOs.add(new MonthlyProductionReportVO("aromatics_output","output total","t"));
+        // 遍历从数据库中查出的月报数据集合,结果为0~12条数据不等
+        for (int i = 0; i < tMonthlyProductionReports.size(); i++) {
+            TMonthlyProductionReport tMonthlyProductionReport = tMonthlyProductionReports.get(i);
+            String aeuBenzeneProduced = tMonthlyProductionReport.getAeuBenzeneProduced();
+            String aeuTolueneProduced = tMonthlyProductionReport.getAeuTolueneProduced();
+            String aeuXyleneProduced = tMonthlyProductionReport.getAeuXyleneProduced();
+            String aeuC6C8NaProduced = tMonthlyProductionReport.getAeuC6C8NaProduced();
+            String pguC5Produced = tMonthlyProductionReport.getPguC5Produced();
+            String pguC9Produced = tMonthlyProductionReport.getPguC9Produced();
+            String pguWashoilProduced = tMonthlyProductionReport.getPguWashoilProduced();
+            String pguOffgasProduced = tMonthlyProductionReport.getPguOffgasProduced();
+            String pguBtxChange = tMonthlyProductionReport.getPguBtxChange();
+            String pguBtxProduced = tMonthlyProductionReport.getPguBtxProduced();
+            String aeuTolueneProducedMEu = tMonthlyProductionReport.getAeuTolueneProducedMEu();
+            String aromaticsOutput = tMonthlyProductionReport.getAromaticsOutput();
+            // 前端数据集合的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), aromaticsOutput);
+                method.invoke(monthlyProductionReportVOs.get(1), aeuBenzeneProduced);
+                method.invoke(monthlyProductionReportVOs.get(2), aeuTolueneProduced);
+                method.invoke(monthlyProductionReportVOs.get(3), aeuXyleneProduced);
+                method.invoke(monthlyProductionReportVOs.get(4), aeuC6C8NaProduced);
+                method.invoke(monthlyProductionReportVOs.get(5), pguC5Produced);
+                method.invoke(monthlyProductionReportVOs.get(6), pguC9Produced);
+                method.invoke(monthlyProductionReportVOs.get(7), pguWashoilProduced);
+                method.invoke(monthlyProductionReportVOs.get(8), pguOffgasProduced);
+                method.invoke(monthlyProductionReportVOs.get(9), pguBtxChange);
+                method.invoke(monthlyProductionReportVOs.get(10), pguBtxProduced);
+                method.invoke(monthlyProductionReportVOs.get(11), aeuTolueneProducedMEu);
+                method.invoke(monthlyProductionReportVOs.get(12), aromaticsOutput);
+                // 当前年份=所属年份,当前月份=所属月份
+                if (currentMonth.equals(reportMonth) && currentYear.equals(reportYear)) {
+                    monthlyProductionReportVOs.get(0).setCurrently(aromaticsOutput);
+                    monthlyProductionReportVOs.get(1).setCurrently(aeuBenzeneProduced);
+                    monthlyProductionReportVOs.get(2).setCurrently(aeuTolueneProduced);
+                    monthlyProductionReportVOs.get(3).setCurrently(aeuXyleneProduced);
+                    monthlyProductionReportVOs.get(4).setCurrently(aeuC6C8NaProduced);
+                    monthlyProductionReportVOs.get(5).setCurrently(pguC5Produced);
+                    monthlyProductionReportVOs.get(6).setCurrently(pguC9Produced);
+                    monthlyProductionReportVOs.get(7).setCurrently(pguWashoilProduced);
+                    monthlyProductionReportVOs.get(8).setCurrently(pguOffgasProduced);
+                    monthlyProductionReportVOs.get(9).setCurrently(pguBtxChange);
+                    monthlyProductionReportVOs.get(10).setCurrently(pguBtxProduced);
+                    monthlyProductionReportVOs.get(11).setCurrently(aeuTolueneProducedMEu);
+                    monthlyProductionReportVOs.get(12).setCurrently(aromaticsOutput);
+                }
+            } 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<MonthlyProductionReportVO> selectEligibleProductRateByYear(Long year) {

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

@@ -171,6 +171,45 @@ public class SyncMonthlyThread extends Thread {
         aromaticsRawInput = aromaticsRawInput.add(pguRpg2).add(pguH2);
         monthly.setAromaticsRawInput(aromaticsRawInput.toString());
 
+        String aeuBenzeneProducedStr = daily.getAeuBenzeneProduced();
+        String aeuTolueneProducedStr = daily.getAeuTolueneProduced();
+        String aeuXyleneProducedStr = daily.getAeuXyleneProduced();
+        String aeuC6C8NaProducedStr = daily.getAeuC6C8NaProduced();
+        String pguC5ProducedStr = daily.getPguC5Produced();
+        String pguC9ProducedStr = daily.getPguC9Produced();
+        String pguWashoilProducedStr = daily.getPguWashoilProduced();
+        String pguOffgasProducedStr = daily.getPguOffgasProduced();
+        String pguBtxChangeStr = daily.getPguBtxChange();
+        String aeuTolueneToEuStr = daily.getAeuTolueneToEu();
+        BigDecimal aeuBenzeneProduced = new BigDecimal(aeuBenzeneProducedStr == null ? "0" : aeuBenzeneProducedStr);
+        BigDecimal aeuTolueneProduced = new BigDecimal(aeuTolueneProducedStr == null ? "0" : aeuTolueneProducedStr);
+        BigDecimal aeuXyleneProduced = new BigDecimal(aeuXyleneProducedStr == null ? "0" : aeuXyleneProducedStr);
+        BigDecimal aeuC6C8NaProduced = new BigDecimal(aeuC6C8NaProducedStr == null ? "0" : aeuC6C8NaProducedStr);
+        BigDecimal pguC5Produced = new BigDecimal(pguC5ProducedStr == null ? "0" : pguC5ProducedStr);
+        BigDecimal pguC9Produced = new BigDecimal(pguC9ProducedStr == null ? "0" : pguC9ProducedStr);
+        BigDecimal pguWashoilProduced = new BigDecimal(pguWashoilProducedStr == null ? "0" : pguWashoilProducedStr);
+        BigDecimal pguOffgasProduced = new BigDecimal(pguOffgasProducedStr == null ? "0" : pguOffgasProducedStr);
+        BigDecimal pguBtxChange = new BigDecimal(pguBtxChangeStr == null ? "0" : pguBtxChangeStr);
+        monthly.setAeuBenzeneProduced(aeuBenzeneProduced.toString());
+        monthly.setAeuTolueneProduced(aeuTolueneProduced.toString());
+        monthly.setAeuXyleneProduced(aeuXyleneProduced.toString());
+        monthly.setAeuC6C8NaProduced(aeuC6C8NaProduced.toString());
+        monthly.setPguC5Produced(pguC5Produced.toString());
+        monthly.setPguC9Produced(pguC9Produced.toString());
+        monthly.setPguWashoilProduced(pguWashoilProduced.toString());
+        monthly.setPguOffgasProduced(pguOffgasProduced.toString());
+        monthly.setPguBtxChange(pguBtxChange.toString());
+        monthly.setPguBtxProduced(pguBtxProduced.toString());
+        BigDecimal aeuTolueneToEu = new BigDecimal(aeuTolueneToEuStr == null ? "0" : aeuTolueneToEuStr);
+        BigDecimal aeuTolueneProducedMEu = new BigDecimal("0");
+        aeuTolueneProducedMEu = aeuTolueneProducedMEu.subtract(aeuTolueneToEu);
+        monthly.setAeuTolueneProducedMEu(aeuTolueneProducedMEu.toString());
+        BigDecimal aromaticsOutput = new BigDecimal("0");
+        aromaticsOutput = aromaticsOutput.add(aeuBenzeneProduced).add(aeuTolueneProduced).add(aeuXyleneProduced)
+                .add(aeuC6C8NaProduced).add(pguC5Produced).add(pguC9Produced).add(pguWashoilProduced)
+                .add(pguOffgasProduced).add(pguBtxChange);
+        monthly.setAromaticsOutput(aromaticsOutput.toString());
+
         // 查询年份=reportYear,月份=reportMonth的月报数据
         int count = tMonthlyProductionReportMapper.selectTMonthlyProductionReportCountByDate(reportYear, reportMonth);
         if (count == 0) {   // 新增月报数据

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

@@ -658,7 +658,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         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
+        sum(d.pgu_btx_to_aeu) as pguBtxToAeu,
+        sum(d.aeu_benzene_produced) as aeuBenzeneProduced,
+        sum(d.aeu_toluene_produced) as aeuTolueneProduced,
+        sum(d.aeu_xylene_produced) as aeuXyleneProduced,
+        sum(d.aeu_c6_c8_na_produced) as aeuC6C8NaProduced,
+        sum(d.pgu_c5_produced) as pguC5Produced,
+        sum(d.pgu_c9_produced) as pguC9Produced,
+        sum(d.pgu_washoil_produced) as pguWashoilProduced,
+        sum(d.pgu_offgas_produced) as pguOffgasProduced,
+        sum(d.pgu_btx_change) as pguBtxChange,
+        sum(d.aeu_toluene_produced) as aeuTolueneProduced,
+        sum(d.aeu_toluene_to_eu) as aeuTolueneToEu
         from T_DAILY_PRODUCTION_REPORT d
         where extract(year from d.REPORT_DATE) = #{reportYear}
         and extract(month from d.REPORT_DATE) = #{reportMonth}

+ 91 - 38
master/src/main/resources/mybatis/production/TMonthlyProductionReportMapper.xml

@@ -5,43 +5,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.ruoyi.project.production.mapper.TMonthlyProductionReportMapper">
     
     <resultMap type="TMonthlyProductionReport" id="TMonthlyProductionReportResult">
-        <result property="id"                   column="id"    />
-        <result property="reportMonth"          column="report_month"    />
-        <result property="reportYear"           column="report_year"    />
-        <result property="nap"                  column="nap"    />
-        <result property="c5"                   column="c5"    />
-        <result property="c6C8Na"               column="c6_c8_na"    />
-        <result property="wisonEthane"          column="wison_ethane"    />
-        <result property="lpgToFurnace"         column="lpg_to_furnace"    />
-        <result property="raff3FrBdAnd2ph"      column="raff3_fr_bd_and_2ph"    />
-        <result property="c2FrLdpe"             column="c2_fr_ldpe"    />
-        <result property="c3FrOxo"              column="c3_fr_oxo"    />
-        <result property="mixedC3C4"            column="mixed_c3_c4"    />
-        <result property="hyC9"                 column="hy_c9"    />
-        <result property="pguOffgas"            column="pgu_offgas"    />
-        <result property="washOil"              column="wash_oil"    />
-        <result property="toluene"              column="toluene"    />
-        <result property="hyC4FrR800"           column="hy_c4_fr_r800"    />
-        <result property="crackerRawInput"      column="cracker_raw_input"    />
-        <result property="crackerRawFeed"       column="cracker_raw_feed"    />
-        <result property="h2Produced"           column="h2_produced"    />
-        <result property="ethylenProduced"      column="ethylen_produced"    />
-        <result property="propyleneProduced"    column="propylene_produced"    />
-        <result property="c3C4LpgProduced"      column="c3_c4_lpg_produced"    />
-        <result property="mixedC4sProduced"     column="mixed_c4s_produced"    />
-        <result property="rpgProduced"          column="rpg_produced"    />
-        <result property="poFluxOilProduced"    column="po_flux_oil_produced"    />
-        <result property="naphthaleneProduced"  column="naphthalene_produced"    />
-        <result property="eboProduced"          column="ebo_produced"    />
-        <result property="residueOilProduced"   column="residue_oil_produced"    />
-        <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"    />
+        <result property="id"                       column="id"    />
+        <result property="reportMonth"              column="report_month"    />
+        <result property="reportYear"               column="report_year"    />
+        <result property="nap"                      column="nap"    />
+        <result property="c5"                       column="c5"    />
+        <result property="c6C8Na"                   column="c6_c8_na"    />
+        <result property="wisonEthane"              column="wison_ethane"    />
+        <result property="lpgToFurnace"             column="lpg_to_furnace"    />
+        <result property="raff3FrBdAnd2ph"          column="raff3_fr_bd_and_2ph"    />
+        <result property="c2FrLdpe"                 column="c2_fr_ldpe"    />
+        <result property="c3FrOxo"                  column="c3_fr_oxo"    />
+        <result property="mixedC3C4"                column="mixed_c3_c4"    />
+        <result property="hyC9"                     column="hy_c9"    />
+        <result property="pguOffgas"                column="pgu_offgas"    />
+        <result property="washOil"                  column="wash_oil"    />
+        <result property="toluene"                  column="toluene"    />
+        <result property="hyC4FrR800"               column="hy_c4_fr_r800"    />
+        <result property="crackerRawInput"          column="cracker_raw_input"    />
+        <result property="crackerRawFeed"           column="cracker_raw_feed"    />
+        <result property="h2Produced"               column="h2_produced"    />
+        <result property="ethylenProduced"          column="ethylen_produced"    />
+        <result property="propyleneProduced"        column="propylene_produced"    />
+        <result property="c3C4LpgProduced"          column="c3_c4_lpg_produced"    />
+        <result property="mixedC4sProduced"         column="mixed_c4s_produced"    />
+        <result property="rpgProduced"              column="rpg_produced"    />
+        <result property="poFluxOilProduced"        column="po_flux_oil_produced"    />
+        <result property="naphthaleneProduced"      column="naphthalene_produced"    />
+        <result property="eboProduced"              column="ebo_produced"    />
+        <result property="residueOilProduced"       column="residue_oil_produced"    />
+        <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"    />
+        <result property="aeuBenzeneProduced"       column="aeu_benzene_produced"    />
+        <result property="aeuTolueneProduced"       column="aeu_toluene_produced"    />
+        <result property="aeuXyleneProduced"        column="aeu_xylene_produced"    />
+        <result property="aeuC6C8NaProduced"        column="aeu_c6_c8_na_produced"    />
+        <result property="pguC5Produced"            column="pgu_c5_produced"    />
+        <result property="pguC9Produced"            column="pgu_c9_produced"    />
+        <result property="pguWashoilProduced"       column="pgu_washoil_produced"    />
+        <result property="pguOffgasProduced"        column="pgu_offgas_produced"    />
+        <result property="pguBtxChange"             column="pgu_btx_change"    />
+        <result property="aeuTolueneProducedMEu"    column="aeu_toluene_produced_m_eu"    />
+        <result property="aromaticsOutput"          column="aromatics_output"    />
     </resultMap>
 
     <select id="selectCrackerRawMaterialByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult">
@@ -70,7 +81,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
              t_monthly_production_report d
         where d.report_year = #{year}
     </select>
-    <select id="selectAromaticsOutputProductByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
+    <select id="selectAromaticsOutputProductByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult">
+        select
+               d.id, d.report_month, d.report_year, d.aeu_benzene_produced, d.aeu_toluene_produced,
+               d.aeu_xylene_produced, d.aeu_c6_c8_na_produced, d.pgu_c5_produced, d.pgu_c9_produced,
+               d.pgu_washoil_produced, d.pgu_offgas_produced, d.pgu_btx_change, d.aeu_toluene_produced_m_eu,
+               d.aromatics_output, d.PGU_BTX_PRODUCED
+        from
+             t_monthly_production_report d
+        where d.report_year = #{year}
+    </select>
     <select id="selectEligibleProductRateByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
     <select id="selectProductYieldByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
     <select id="selectCrackerUtilityConsumptionByYear" parameterType="Long" resultMap="TMonthlyProductionReportResult"></select>
@@ -138,6 +158,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="aeuBenzeneProduced != null">aeu_benzene_produced,</if>
+            <if test="aeuTolueneProduced != null">aeu_toluene_produced,</if>
+            <if test="aeuXyleneProduced != null">aeu_xylene_produced,</if>
+            <if test="aeuC6C8NaProduced != null">aeu_c6_c8_na_produced,</if>
+            <if test="pguC5Produced != null">pgu_c5_produced,</if>
+            <if test="pguC9Produced != null">pgu_c9_produced,</if>
+            <if test="pguWashoilProduced != null">pgu_washoil_produced,</if>
+            <if test="pguOffgasProduced != null">pgu_offgas_produced,</if>
+            <if test="pguBtxChange != null">pgu_btx_change,</if>
+            <if test="aeuTolueneProducedMEu != null">aeu_toluene_produced_m_eu,</if>
+            <if test="aromaticsOutput != null">aromatics_output,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -177,6 +208,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="pguBtxProduced != null">#{pguBtxProduced},</if>
             <if test="pguBtxToAeu != null">#{pguBtxToAeu},</if>
             <if test="aromaticsRawInput != null">#{aromaticsRawInput},</if>
+            <if test="aeuBenzeneProduced != null">#{aeuBenzeneProduced},</if>
+            <if test="aeuTolueneProduced != null">#{aeuTolueneProduced},</if>
+            <if test="aeuXyleneProduced != null">#{aeuXyleneProduced},</if>
+            <if test="aeuC6C8NaProduced != null">#{aeuC6C8NaProduced},</if>
+            <if test="pguC5Produced != null">#{pguC5Produced},</if>
+            <if test="pguC9Produced != null">#{pguC9Produced},</if>
+            <if test="pguWashoilProduced != null">#{pguWashoilProduced},</if>
+            <if test="pguOffgasProduced != null">#{pguOffgasProduced},</if>
+            <if test="pguBtxChange != null">#{pguBtxChange},</if>
+            <if test="aeuTolueneProducedMEu != null">#{aeuTolueneProducedMEu},</if>
+            <if test="aromaticsOutput != null">#{aromaticsOutput},</if>
         </trim>
     </insert>
 
@@ -217,6 +259,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="aeuBenzeneProduced != null">aeu_benzene_produced = #{aeuBenzeneProduced},</if>
+            <if test="aeuTolueneProduced != null">aeu_toluene_produced = #{aeuTolueneProduced},</if>
+            <if test="aeuXyleneProduced != null">aeu_xylene_produced = #{aeuXyleneProduced},</if>
+            <if test="aeuC6C8NaProduced != null">aeu_c6_c8_na_produced = #{aeuC6C8NaProduced},</if>
+            <if test="pguC5Produced != null">pgu_c5_produced = #{pguC5Produced},</if>
+            <if test="pguC9Produced != null">pgu_c9_produced = #{pguC9Produced},</if>
+            <if test="pguWashoilProduced != null">pgu_washoil_produced = #{pguWashoilProduced},</if>
+            <if test="pguOffgasProduced != null">pgu_offgas_produced = #{pguOffgasProduced},</if>
+            <if test="pguBtxChange != null">pgu_btx_change = #{pguBtxChange},</if>
+            <if test="aeuTolueneProducedMEu != null">aeu_toluene_produced_m_eu = #{aeuTolueneProducedMEu},</if>
+            <if test="aromaticsOutput != null">aromatics_output = #{aromaticsOutput},</if>
         </trim>
         where report_month = #{reportMonth} and report_year = #{reportYear}
     </update>

+ 4 - 18
ui/src/views/production/monthly/index.vue

@@ -613,21 +613,7 @@ export default {
       tableCrackerRawMaterial: [],
       tableCrackerOutputProduct: [],
       tableAromaticsRawMaterial: [],
-      tableAromaticsOutputProduct: [
-        {title:"Aromatics Output Product"},
-        {title:"Benzene"},
-        {title:"Toluene"},
-        {title:"Xylene"},
-        {title:"C6-C8 NA"},
-        {title:"C5"},
-        {title:"C9"},
-        {title:"Wash oil"},
-        {title:"offags"},
-        {title:"MIX BTX change"},
-        {title:"BTX Product"},
-        {title:"Toluene Product(- EU)"},
-        {title:"output total"},
-      ],
+      tableAromaticsOutputProduct: [],
       tableEligibleProductRate: [
         {title: "C2="},
         {title: "C3="},
@@ -1015,9 +1001,9 @@ export default {
       getAromaticsRawMaterial(year).then(response => {
         this.tableAromaticsRawMaterial = response.data;
       });
-      // getAromaticsOutputProduct(year).then(response => {
-      //   this.tableAromaticsOutputProduct = response.data;
-      // });
+      getAromaticsOutputProduct(year).then(response => {
+        this.tableAromaticsOutputProduct = response.data;
+      });
       // getEligibleProductRate(year).then(response => {
       //   this.tableEligibleProductRate = response.data;
       // });