|
@@ -14,6 +14,7 @@ import com.ruoyi.project.common.domain.TCommonfile;
|
|
import com.ruoyi.project.common.service.ITCommonfileService;
|
|
import com.ruoyi.project.common.service.ITCommonfileService;
|
|
import com.ruoyi.project.production.controller.vo.FurnancePressureFvpVO;
|
|
import com.ruoyi.project.production.controller.vo.FurnancePressureFvpVO;
|
|
import com.ruoyi.project.production.controller.vo.FurnancePressureVO;
|
|
import com.ruoyi.project.production.controller.vo.FurnancePressureVO;
|
|
|
|
+import com.ruoyi.project.production.controller.vo.FurnanceSummaryVO;
|
|
import com.ruoyi.project.production.controller.vo.FvpAnalysisQueryVO;
|
|
import com.ruoyi.project.production.controller.vo.FvpAnalysisQueryVO;
|
|
import com.ruoyi.project.production.domain.TFurnanceTemperature;
|
|
import com.ruoyi.project.production.domain.TFurnanceTemperature;
|
|
import com.ruoyi.project.production.mapper.TFurnancePressureMapper;
|
|
import com.ruoyi.project.production.mapper.TFurnancePressureMapper;
|
|
@@ -50,6 +51,227 @@ public class TFurnancePressureController extends BaseController
|
|
@Autowired
|
|
@Autowired
|
|
private ITCommonfileService tCommonfileService;
|
|
private ITCommonfileService tCommonfileService;
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 裂解炉测压列表Summary(APP)
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/summary")
|
|
|
|
+ public AjaxResult getPressureSummary() throws ParseException {
|
|
|
|
+ TFurnancePressure query = new TFurnancePressure();
|
|
|
|
+ Date date = new Date();
|
|
|
|
+ date.setHours(0);
|
|
|
|
+ date.setMinutes(0);
|
|
|
|
+ date.setSeconds(0);
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ Date parse = sdf.parse(sdf.format(date));
|
|
|
|
+ query.setRecordTime(parse);
|
|
|
|
+ List<TFurnancePressure> result = tFurnancePressureService.selectTFurnancePressureByDate(query);
|
|
|
|
+ List<TFurnancePressure> list = new ArrayList<>();
|
|
|
|
+ List<FurnanceSummaryVO> voList = new ArrayList<>();
|
|
|
|
+ double maxValue109 = 0;
|
|
|
|
+ double maxValue110 = 0;
|
|
|
|
+ double maxValue111 = 0;
|
|
|
|
+ double maxValue112 = 0;
|
|
|
|
+ double maxValue113 = 0;
|
|
|
|
+ double maxValue114 = 0;
|
|
|
|
+ double maxValue115 = 0;
|
|
|
|
+ double maxValue116 = 0;
|
|
|
|
+ double maxValue117 = 0;
|
|
|
|
+ double maxValue118 = 0;
|
|
|
|
+ double maxValue130 = 0;
|
|
|
|
+ for (TFurnancePressure pressure : result) {
|
|
|
|
+ String furnanceName = pressure.getFurnanceName();
|
|
|
|
+ switch (furnanceName) {
|
|
|
|
+ case "H109":
|
|
|
|
+ double maxValue1091 = this.getMaxValue109(pressure);
|
|
|
|
+ if (maxValue1091 > maxValue109) {
|
|
|
|
+ maxValue109 = maxValue1091;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H110":
|
|
|
|
+ double maxValue1101 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1101 > maxValue110) {
|
|
|
|
+ maxValue110 = maxValue1101;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H111":
|
|
|
|
+ double maxValue1111 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1111 > maxValue111) {
|
|
|
|
+ maxValue111 = maxValue1111;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H112":
|
|
|
|
+ double maxValue1121 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1121 > maxValue112) {
|
|
|
|
+ maxValue112 = maxValue1121;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H113":
|
|
|
|
+ double maxValue1131 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1131 > maxValue113) {
|
|
|
|
+ maxValue113 = maxValue1131;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H114":
|
|
|
|
+ double maxValue1141 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1141 > maxValue114) {
|
|
|
|
+ maxValue114 = maxValue1141;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H115":
|
|
|
|
+ double maxValue151 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue151 > maxValue115) {
|
|
|
|
+ maxValue115 = maxValue151;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H116":
|
|
|
|
+ double maxValue1161 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1161 > maxValue116) {
|
|
|
|
+ maxValue116 = maxValue1161;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H117":
|
|
|
|
+ double maxValue1171 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1171 > maxValue117) {
|
|
|
|
+ maxValue117 = maxValue1171;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H118":
|
|
|
|
+ double maxValue1181 = this.getMaxValue11x(pressure);
|
|
|
|
+ if (maxValue1181 > maxValue118) {
|
|
|
|
+ maxValue118 = maxValue1181;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ case "H130":
|
|
|
|
+ double maxValue1301 = this.getMaxValue130(pressure);
|
|
|
|
+ if (maxValue1301 > maxValue130) {
|
|
|
|
+ maxValue130 = maxValue1301;
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ Date recordTime = pressure.getRecordTime();
|
|
|
|
+ if (recordTime.getHours() == 20) {
|
|
|
|
+ list.add(pressure);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ for (TFurnancePressure pressure : list) {
|
|
|
|
+ String furnanceName = pressure.getFurnanceName();
|
|
|
|
+ String status = pressure.getStatus();
|
|
|
|
+ FurnanceSummaryVO vo = new FurnanceSummaryVO();
|
|
|
|
+ vo.setFurnanceName(furnanceName);
|
|
|
|
+ vo.setStatus(status);
|
|
|
|
+ switch (furnanceName) {
|
|
|
|
+ case "H109":
|
|
|
|
+ vo.setMaxValue(maxValue109);
|
|
|
|
+ break;
|
|
|
|
+ case "H110":
|
|
|
|
+ vo.setMaxValue(maxValue110);
|
|
|
|
+ break;
|
|
|
|
+ case "H111":
|
|
|
|
+ vo.setMaxValue(maxValue111);
|
|
|
|
+ break;
|
|
|
|
+ case "H112":
|
|
|
|
+ vo.setMaxValue(maxValue112);
|
|
|
|
+ break;
|
|
|
|
+ case "H113":
|
|
|
|
+ vo.setMaxValue(maxValue113);
|
|
|
|
+ break;
|
|
|
|
+ case "H114":
|
|
|
|
+ vo.setMaxValue(maxValue114);
|
|
|
|
+ break;
|
|
|
|
+ case "H115":
|
|
|
|
+ vo.setMaxValue(maxValue115);
|
|
|
|
+ break;
|
|
|
|
+ case "H116":
|
|
|
|
+ vo.setMaxValue(maxValue116);
|
|
|
|
+ break;
|
|
|
|
+ case "H117":
|
|
|
|
+ vo.setMaxValue(maxValue117);
|
|
|
|
+ break;
|
|
|
|
+ case "H118":
|
|
|
|
+ vo.setMaxValue(maxValue118);
|
|
|
|
+ break;
|
|
|
|
+ case "H130":
|
|
|
|
+ vo.setMaxValue(maxValue130);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ voList.add(vo);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(voList);
|
|
|
|
+ }
|
|
|
|
+ public double getMaxValue109(TFurnancePressure pressure) {
|
|
|
|
+ String pass1 = pressure.getPass1();
|
|
|
|
+ String pass2 = pressure.getPass2();
|
|
|
|
+ String pass3 = pressure.getPass3();
|
|
|
|
+ String pass4 = pressure.getPass4();
|
|
|
|
+ String pass5 = pressure.getPass5();
|
|
|
|
+ String pass6 = pressure.getPass6();
|
|
|
|
+ String pass7 = pressure.getPass7();
|
|
|
|
+ String pass8 = pressure.getPass8();
|
|
|
|
+ String pass9 = pressure.getPass9();
|
|
|
|
+ String pass10 = pressure.getPass10();
|
|
|
|
+ String pass11 = pressure.getPass11();
|
|
|
|
+ String pass12 = pressure.getPass12();
|
|
|
|
+ String pass13 = pressure.getPass13();
|
|
|
|
+ String pass14 = pressure.getPass14();
|
|
|
|
+ String pass15 = pressure.getPass15();
|
|
|
|
+ String pass16 = pressure.getPass16();
|
|
|
|
+ int maxValue1 = this.getMaxValue(pass1);
|
|
|
|
+ int maxValue2 = this.getMaxValue(pass2);
|
|
|
|
+ int maxValue3 = this.getMaxValue(pass3);
|
|
|
|
+ int maxValue4 = this.getMaxValue(pass4);
|
|
|
|
+ int maxValue5 = this.getMaxValue(pass5);
|
|
|
|
+ int maxValue6 = this.getMaxValue(pass6);
|
|
|
|
+ int maxValue7 = this.getMaxValue(pass7);
|
|
|
|
+ int maxValue8 = this.getMaxValue(pass8);
|
|
|
|
+ int maxValue9 = this.getMaxValue(pass9);
|
|
|
|
+ int maxValue10 = this.getMaxValue(pass10);
|
|
|
|
+ int maxValue11 = this.getMaxValue(pass11);
|
|
|
|
+ int maxValue12 = this.getMaxValue(pass12);
|
|
|
|
+ int maxValue13 = this.getMaxValue(pass13);
|
|
|
|
+ int maxValue14 = this.getMaxValue(pass14);
|
|
|
|
+ int maxValue15 = this.getMaxValue(pass15);
|
|
|
|
+ int maxValue16 = this.getMaxValue(pass16);
|
|
|
|
+ return this.getMaxValue(
|
|
|
|
+ maxValue1 + "," + maxValue2 + "," + maxValue3 + "," + maxValue4 + ","
|
|
|
|
+ + maxValue5 + "," + maxValue6 + "," + maxValue7 + "," + maxValue8 + ","
|
|
|
|
+ + maxValue9 + "," + maxValue10 + "," + maxValue11 + "," + maxValue12 + ","
|
|
|
|
+ + maxValue13 + "," + maxValue14 + "," + maxValue15 + "," + maxValue16 + ","
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ public double getMaxValue11x(TFurnancePressure pressure) {
|
|
|
|
+ String pass1 = pressure.getPass1();
|
|
|
|
+ String pass2 = pressure.getPass2();
|
|
|
|
+ String pass3 = pressure.getPass3();
|
|
|
|
+ String pass4 = pressure.getPass4();
|
|
|
|
+ String pass5 = pressure.getPass5();
|
|
|
|
+ String pass6 = pressure.getPass6();
|
|
|
|
+ String pass7 = pressure.getPass7();
|
|
|
|
+ String pass8 = pressure.getPass8();
|
|
|
|
+ int maxValue1 = this.getMaxValue(pass1);
|
|
|
|
+ int maxValue2 = this.getMaxValue(pass2);
|
|
|
|
+ int maxValue3 = this.getMaxValue(pass3);
|
|
|
|
+ int maxValue4 = this.getMaxValue(pass4);
|
|
|
|
+ int maxValue5 = this.getMaxValue(pass5);
|
|
|
|
+ int maxValue6 = this.getMaxValue(pass6);
|
|
|
|
+ int maxValue7 = this.getMaxValue(pass7);
|
|
|
|
+ int maxValue8 = this.getMaxValue(pass8);
|
|
|
|
+ return this.getMaxValue(
|
|
|
|
+ maxValue1 + "," + maxValue2 + "," + maxValue3 + "," + maxValue4 + ","
|
|
|
|
+ + maxValue5 + "," + maxValue6 + "," + maxValue7 + "," + maxValue8 + ","
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ public double getMaxValue130(TFurnancePressure pressure) {
|
|
|
|
+ String pass1 = pressure.getPass1();
|
|
|
|
+ String pass2 = pressure.getPass2();
|
|
|
|
+ String pass3 = pressure.getPass3();
|
|
|
|
+ String pass4 = pressure.getPass4();
|
|
|
|
+ int maxValue1 = this.getMaxValue(pass1);
|
|
|
|
+ int maxValue2 = this.getMaxValue(pass2);
|
|
|
|
+ int maxValue3 = this.getMaxValue(pass3);
|
|
|
|
+ int maxValue4 = this.getMaxValue(pass4);
|
|
|
|
+ return this.getMaxValue(maxValue1 + "," + maxValue2 + "," + maxValue3 + "," + maxValue4 + ",");
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 现场照片上传(APP)
|
|
* 现场照片上传(APP)
|
|
*/
|
|
*/
|
|
@@ -77,32 +299,6 @@ public class TFurnancePressureController extends BaseController
|
|
return AjaxResult.error("上传失败,请联系管理员");
|
|
return AjaxResult.error("上传失败,请联系管理员");
|
|
}
|
|
}
|
|
|
|
|
|
-// public AjaxResult getPressureSummary() {
|
|
|
|
-// TFurnancePressure query = new TFurnancePressure();
|
|
|
|
-// query.setRecordTime(new Date());
|
|
|
|
-// List<TFurnancePressure> result = tFurnancePressureService.selectTFurnancePressureList(query);
|
|
|
|
-// for (TFurnancePressure pressure : result) {
|
|
|
|
-// String furnanceName = pressure.getFurnanceName();
|
|
|
|
-// switch (furnanceName) {
|
|
|
|
-// case "H109":
|
|
|
|
-// break;
|
|
|
|
-// case "H110":
|
|
|
|
-// case "H111":
|
|
|
|
-// case "H112":
|
|
|
|
-// case "H113":
|
|
|
|
-// case "H114":
|
|
|
|
-// case "H115":
|
|
|
|
-// case "H116":
|
|
|
|
-// case "H117":
|
|
|
|
-// case "H118":
|
|
|
|
-// break;
|
|
|
|
-// case "H130":
|
|
|
|
-// break;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// return AjaxResult.success();
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 获取裂解炉炉管测压fvp分析数据
|
|
* 获取裂解炉炉管测压fvp分析数据
|
|
*/
|
|
*/
|