ソースを参照

质量月报
- 急冷系统关键控制指标
- S2007新增字段汽油终馏点、汽油段压差、HVGO产量
- S2007查询和导入等功能相应修改
- S2007导入模板修改

wangggziwen 2 年 前
コミット
cf7faf7e6f

+ 6 - 0
master/src/main/java/com/ruoyi/project/production/controller/TMonthlyQualityReportController.java

@@ -409,6 +409,12 @@ public class TMonthlyQualityReportController extends BaseController
                         entity.setSampleName(cellValue);
                     } else if (j == 4) {
                         entity.setViscosity(cellValue);
+                    } else if (j == 5) {
+                        entity.setEndPoint(cellValue);
+                    } else if (j == 6) {
+                        entity.setPressureDifference(cellValue);
+                    } else if (j == 7) {
+                        entity.setProduction(cellValue);
                     }
                 }
                 tMonthlyQualityReportS2007Service.insertTMonthlyQualityReportS2007(entity);

+ 33 - 0
master/src/main/java/com/ruoyi/project/production/domain/TMonthlyQualityReportS2007.java

@@ -58,6 +58,39 @@ public class TMonthlyQualityReportS2007 extends BaseEntity
 
     private String deptName;
 
+    /** 汽油终馏点 */
+    private String endPoint;
+
+    /** 汽油段压差 */
+    private String pressureDifference;
+
+    /** HVGO产量 */
+    private String production;
+
+    public String getEndPoint() {
+        return endPoint;
+    }
+
+    public void setEndPoint(String endPoint) {
+        this.endPoint = endPoint;
+    }
+
+    public String getPressureDifference() {
+        return pressureDifference;
+    }
+
+    public void setPressureDifference(String pressureDifference) {
+        this.pressureDifference = pressureDifference;
+    }
+
+    public String getProduction() {
+        return production;
+    }
+
+    public void setProduction(String production) {
+        this.production = production;
+    }
+
     public String getDeptName() {
         return deptName;
     }

+ 16 - 1
master/src/main/resources/mybatis/production/TMonthlyQualityReportS2007Mapper.xml

@@ -20,10 +20,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptName" column="dept_name" />
         <result property="startDate" column="start_date" />
         <result property="endDate" column="end_date" />
+        <result property="endPoint" column="end_point" />
+        <result property="pressureDifference" column="pressure_difference" />
+        <result property="production" column="production" />
     </resultMap>
 
     <sql id="selectTMonthlyQualityReportS2007Vo">
-        select d.id, d.location_name, d.sample_point, d.sample_date, d.sample_name, d.viscosity, d.dept_id, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time ,s.dept_name from t_monthly_quality_report_s2007 d
+        select d.id, d.end_point, d.pressure_difference, d.production, d.location_name, d.sample_point, d.sample_date, d.sample_name, d.viscosity, d.dept_id, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time ,s.dept_name from t_monthly_quality_report_s2007 d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -38,6 +41,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sampleName != null  and sampleName != ''"> and sample_name like concat(concat('%', #{sampleName}), '%')</if>
             <if test="viscosity != null  and viscosity != ''"> and viscosity = #{viscosity}</if>
             <if test="deptId != null "> and dept_id = #{deptId}</if>
+            <if test="endPoint != null "> and end_point = #{endPoint}</if>
+            <if test="pressureDifference != null "> and pressure_difference = #{pressureDifference}</if>
+            <if test="production != null "> and production = #{production}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -67,6 +73,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="endPoint != null">end_point,</if>
+            <if test="pressureDifference != null">pressure_difference,</if>
+            <if test="production != null">production,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -81,6 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="endPoint != null">#{endPoint},</if>
+            <if test="pressureDifference != null">#{pressureDifference},</if>
+            <if test="production != null">#{production},</if>
          </trim>
     </insert>
 
@@ -98,6 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="endPoint != null">end_point = #{endPoint},</if>
+            <if test="pressureDifference != null">pressure_difference = #{pressureDifference},</if>
+            <if test="production != null">production = #{production},</if>
         </trim>
         where id = #{id}
     </update>

BIN
master/src/main/resources/static/template/production/quality.xlsx


+ 81 - 1
ui/src/views/production/quality/index.vue

@@ -194,6 +194,9 @@
       </el-table-column>
       <el-table-column label="样品名称" width="100" align="center" prop="sampleName" :show-overflow-tooltip="true"/>
       <el-table-column label="运动粘度,50℃" align="center" prop="viscosity" :show-overflow-tooltip="true"/>
+      <el-table-column label="汽油终馏点" align="center" prop="endPoint" :show-overflow-tooltip="true"/>
+      <el-table-column label="汽油段压差" align="center" prop="pressureDifference" :show-overflow-tooltip="true"/>
+      <el-table-column label="HVGO产量" align="center" prop="production" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -3558,9 +3561,86 @@ export default {
           });
           break;
         case "4":
+          this.disposeChart();
           listS2007(this.analysisQueryParams).then(response => {
             let data = response.data;
-            console.log(data)
+            let viscosityArray = [];
+            let endPointArray = [];
+            let pressureDifferenceArray = [];
+            let productionArray = [];
+            let sampleDateArray = [];
+            for(let i = 0 ; i < data.length; i++){
+              viscosityArray.push(data[i].viscosity);
+              endPointArray.push(data[i].endPoint);
+              pressureDifferenceArray.push(data[i].pressureDifference);
+              productionArray.push(data[i].production);
+              sampleDateArray.push(data[i].sampleDate);
+            }
+            let option = {
+              title: {
+                text: dictLabel,
+                left: 'center',
+                textStyle: {
+                  fontSize: 16
+                }
+              },
+              tooltip: {
+                trigger: 'axis'
+              },
+              legend: {
+                x: 'center',
+                y: 'bottom',
+                data: ['QO粘度', '汽油终馏点', '汽油段压差', 'HVGO产量']
+              },
+              grid: {
+                top: '10%',
+                left: '3%',
+                right: '4%',
+                bottom: '10%',
+                containLabel: true
+              },
+              toolbox: {
+                feature: {
+                  saveAsImage: {}
+                }
+              },
+              xAxis: {
+                type: 'category',
+                boundaryGap: false,
+                data: sampleDateArray,
+                axisLabel: {
+                  interval: 0,
+                  rotate: 45
+                }
+              },
+              yAxis: {
+                type: 'value'
+              },
+              series: [
+                {
+                  name: 'QO粘度',
+                  type: 'line',
+                  data: viscosityArray
+                },
+                {
+                  name: '汽油终馏点',
+                  type: 'line',
+                  data: endPointArray
+                },
+                {
+                  name: '汽油段压差',
+                  type: 'line',
+                  data: pressureDifferenceArray
+                },
+                {
+                  name: 'HVGO产量',
+                  type: 'line',
+                  data: productionArray
+                }
+              ]
+            };
+            this.chart = this.echarts.init(document.getElementById('chart'));
+            this.chart.setOption(option);
           });
           break;
         case "5":