Переглянути джерело

裂解炉炉管测压 - 超压提示信息定位到具体PASS口

wangggziwen 1 рік тому
батько
коміт
0b8b3c9c57

+ 70 - 22
master/src/main/java/com/ruoyi/project/production/controller/TFurnancePressureController.java

@@ -3456,63 +3456,70 @@ public class TFurnancePressureController extends BaseController
             String furnanceName = pressure.getFurnanceName();
             List<TFurnancePressure> list = new ArrayList();
             list.add(pressure);
+            String msg = "";
             switch (furnanceName) {
                 case "H109":
                     FurnancePressureFvpVO furnancePressureFvpVO109A = this.calcRatio109A(list);
                     FurnancePressureFvpVO furnancePressureFvpVO109B = this.calcRatio109B(list);
-                    this.checkRatio(furnancePressureFvpVO109A, pressure);
-                    this.checkRatio(furnancePressureFvpVO109B, pressure);
+                    String msgA = this.checkRatio(furnancePressureFvpVO109A, pressure);
+                    String msgB = this.checkRatio(furnancePressureFvpVO109B, pressure);
+                    msg = "左侧" + msgA + "右侧" + msgB;
                     break;
                 case "H110":
                     FurnancePressureFvpVO furnancePressureFvpVO110 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO110, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO110, pressure);
                     break;
                 case "H111":
                     FurnancePressureFvpVO furnancePressureFvpVO111 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO111, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO111, pressure);
                     break;
                 case "H112":
                     FurnancePressureFvpVO furnancePressureFvpVO112 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO112, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO112, pressure);
                     break;
                 case "H113":
                     FurnancePressureFvpVO furnancePressureFvpVO113 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO113, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO113, pressure);
                     break;
                 case "H114":
                     FurnancePressureFvpVO furnancePressureFvpVO114 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO114, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO114, pressure);
                     break;
                 case "H115":
                     FurnancePressureFvpVO furnancePressureFvpVO115 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO115, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO115, pressure);
                     break;
                 case "H116":
                     FurnancePressureFvpVO furnancePressureFvpVO116 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO116, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO116, pressure);
                     break;
                 case "H117":
                     FurnancePressureFvpVO furnancePressureFvpVO117 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO117, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO117, pressure);
                     break;
                 case "H118":
                     FurnancePressureFvpVO furnancePressureFvpVO118 = this.calcRatio(list);
-                    this.checkRatio(furnancePressureFvpVO118, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO118, pressure);
                     break;
                 case "H130":
                     FurnancePressureFvpVO furnancePressureFvpVO130 = this.calcRatio130(list);
-                    this.checkRatio(furnancePressureFvpVO130, pressure);
+                    msg = this.checkRatio(furnancePressureFvpVO130, pressure);
                     break;
             }
+            if (!"".equals(msg.length())) {
+                msg = msg.substring(0, msg.length() - 1);
+                msg += "压差过高,请注意处理。";
+            }
             //更新
             int result = tFurnancePressureService.updateTFurnancePressure(pressure);
-            return AjaxResult.success(result+"", pressure);
+            return AjaxResult.success(msg, pressure);
         } else {
             return AjaxResult.error("提交失败,数据必须>=0!");
         }
     }
 
-    public void checkRatio(FurnancePressureFvpVO vo, TFurnancePressure pressure) {
+    public String checkRatio(FurnancePressureFvpVO vo, TFurnancePressure pressure) {
+        String msg = "";
         double pass1Ratio = vo.getPass1Ratio();
         double pass2Ratio = vo.getPass2Ratio();
         double pass3Ratio = vo.getPass3Ratio();
@@ -3521,14 +3528,55 @@ public class TFurnancePressureController extends BaseController
         double pass6Ratio = vo.getPass6Ratio();
         double pass7Ratio = vo.getPass7Ratio();
         double pass8Ratio = vo.getPass8Ratio();
-        if (pass1Ratio > 0.9) { pressure.setPass1RatioExceeded(true); } else { pressure.setPass1RatioExceeded(false); }
-        if (pass2Ratio > 0.9) { pressure.setPass2RatioExceeded(true); } else { pressure.setPass2RatioExceeded(false); }
-        if (pass3Ratio > 0.9) { pressure.setPass3RatioExceeded(true); } else { pressure.setPass3RatioExceeded(false); }
-        if (pass4Ratio > 0.9) { pressure.setPass4RatioExceeded(true); } else { pressure.setPass4RatioExceeded(false); }
-        if (pass5Ratio > 0.9) { pressure.setPass5RatioExceeded(true); } else { pressure.setPass5RatioExceeded(false); }
-        if (pass6Ratio > 0.9) { pressure.setPass6RatioExceeded(true); } else { pressure.setPass6RatioExceeded(false); }
-        if (pass7Ratio > 0.9) { pressure.setPass7RatioExceeded(true); } else { pressure.setPass7RatioExceeded(false); }
-        if (pass8Ratio > 0.9) { pressure.setPass8RatioExceeded(true); } else { pressure.setPass8RatioExceeded(false); }
+        if (pass1Ratio > 0.9) {
+            pressure.setPass1RatioExceeded(true);
+            msg += "PASS 1、";
+        } else {
+            pressure.setPass1RatioExceeded(false);
+        }
+        if (pass2Ratio > 0.9) {
+            pressure.setPass2RatioExceeded(true);
+            msg += "PASS 2、";
+        } else {
+            pressure.setPass2RatioExceeded(false);
+        }
+        if (pass3Ratio > 0.9) {
+            msg += "PASS 3、";
+            pressure.setPass3RatioExceeded(true);
+        } else {
+            pressure.setPass3RatioExceeded(false);
+        }
+        if (pass4Ratio > 0.9) {
+            msg += "PASS 4、";
+            pressure.setPass4RatioExceeded(true);
+        } else {
+            pressure.setPass4RatioExceeded(false);
+        }
+        if (pass5Ratio > 0.9) {
+            msg += "PASS 5、";
+            pressure.setPass5RatioExceeded(true);
+        } else {
+            pressure.setPass5RatioExceeded(false);
+        }
+        if (pass6Ratio > 0.9) {
+            msg += "PASS 6、";
+            pressure.setPass6RatioExceeded(true);
+        } else {
+            pressure.setPass6RatioExceeded(false);
+        }
+        if (pass7Ratio > 0.9) {
+            msg += "PASS 7、";
+            pressure.setPass7RatioExceeded(true);
+        } else {
+            pressure.setPass7RatioExceeded(false);
+        }
+        if (pass8Ratio > 0.9) {
+            msg += "PASS 8、";
+            pressure.setPass8RatioExceeded(true);
+        } else {
+            pressure.setPass8RatioExceeded(false);
+        }
+        return msg;
     }
 
     /**

+ 5 - 1
ui/src/views/production/pressure/h109.vue

@@ -2152,7 +2152,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h110.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h111.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h112.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h113.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h114.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h115.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h116.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h117.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h118.vue

@@ -1412,7 +1412,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {

+ 5 - 1
ui/src/views/production/pressure/h130.vue

@@ -1233,7 +1233,11 @@
             if (this.form.id != null) {
               updatePressure(this.form).then(response => {
                 if (response.code == 200) {
-                  this.msgSuccess("修改成功");
+                  if (response.msg == "") {
+                    this.msgSuccess("修改成功");
+                  } else {
+                    this.msgInfo("修改成功," + response.msg);
+                  }
                   this.open = false;
                   this.getList();
                 } else {