|
@@ -3497,7 +3497,23 @@ public class TFurnancePressureController extends BaseController {
|
|
|
@PreAuthorize("@ss.hasPermi('production:pressure:edit')")
|
|
|
@Log(title = "裂解炉炉管测压", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody TFurnancePressure tFurnancePressure) {
|
|
|
+ public AjaxResult edit(@RequestBody TFurnancePressure tFurnancePressure) throws PinyinException {
|
|
|
+ String pass1 = tFurnancePressure.getPass1();
|
|
|
+ String pass2 = tFurnancePressure.getPass2();
|
|
|
+ String pass3 = tFurnancePressure.getPass3();
|
|
|
+ String pass4 = tFurnancePressure.getPass4();
|
|
|
+ String pass5 = tFurnancePressure.getPass5();
|
|
|
+ String pass6 = tFurnancePressure.getPass6();
|
|
|
+ String pass7 = tFurnancePressure.getPass7();
|
|
|
+ String pass8 = tFurnancePressure.getPass8();
|
|
|
+ String pass9 = tFurnancePressure.getPass9();
|
|
|
+ String pass10 = tFurnancePressure.getPass10();
|
|
|
+ String pass11 = tFurnancePressure.getPass11();
|
|
|
+ String pass12 = tFurnancePressure.getPass12();
|
|
|
+ String pass13 = tFurnancePressure.getPass13();
|
|
|
+ String pass14 = tFurnancePressure.getPass14();
|
|
|
+ String pass15 = tFurnancePressure.getPass15();
|
|
|
+ String pass16 = tFurnancePressure.getPass16();
|
|
|
//更新
|
|
|
tFurnancePressureService.updateTFurnancePressure(tFurnancePressure);
|
|
|
//计算ratio
|
|
@@ -3505,54 +3521,95 @@ 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);
|
|
|
+ if ("".equals(msgA)) {
|
|
|
+ msg = "左侧" + msgA;
|
|
|
+ }
|
|
|
+ if ("".equals(msgB)) {
|
|
|
+ msg = "右侧" + 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.checkRatio130(furnancePressureFvpVO130, pressure);
|
|
|
break;
|
|
|
}
|
|
|
+ boolean isFull = false;
|
|
|
+ if ("H109".equals(furnanceName)) {
|
|
|
+ isFull = StringUtils.isNotNull(pass1) && StringUtils.isNotNull(pass2) && StringUtils.isNotNull(pass3) && StringUtils.isNotNull(pass4)
|
|
|
+ && StringUtils.isNotNull(pass5) && StringUtils.isNotNull(pass6) && StringUtils.isNotNull(pass7) && StringUtils.isNotNull(pass8)
|
|
|
+ && StringUtils.isNotNull(pass9) && StringUtils.isNotNull(pass10) && StringUtils.isNotNull(pass11) && StringUtils.isNotNull(pass12)
|
|
|
+ && StringUtils.isNotNull(pass13) && StringUtils.isNotNull(pass14) && StringUtils.isNotNull(pass15) && StringUtils.isNotNull(pass16)
|
|
|
+ && !"".equals(pass1) && !"".equals(pass2) && !"".equals(pass3) && !"".equals(pass4)
|
|
|
+ && !"".equals(pass5) && !"".equals(pass6) && !"".equals(pass7) && !"".equals(pass8)
|
|
|
+ && !"".equals(pass9) && !"".equals(pass10) && !"".equals(pass11) && !"".equals(pass12)
|
|
|
+ && !"".equals(pass13) && !"".equals(pass14) && !"".equals(pass15) && !"".equals(pass16);
|
|
|
+ } else if ("H130".equals(furnanceName)) {
|
|
|
+ isFull = StringUtils.isNotNull(pass1) && StringUtils.isNotNull(pass2) && StringUtils.isNotNull(pass3) && StringUtils.isNotNull(pass4)
|
|
|
+ && !"".equals(pass1) && !"".equals(pass2) && !"".equals(pass3) && !"".equals(pass4);
|
|
|
+ } else {
|
|
|
+ isFull = StringUtils.isNotNull(pass1) && StringUtils.isNotNull(pass2) && StringUtils.isNotNull(pass3) && StringUtils.isNotNull(pass4)
|
|
|
+ && StringUtils.isNotNull(pass5) && StringUtils.isNotNull(pass6) && StringUtils.isNotNull(pass7) && StringUtils.isNotNull(pass8)
|
|
|
+ && !"".equals(pass1) && !"".equals(pass2) && !"".equals(pass3) && !"".equals(pass4)
|
|
|
+ && !"".equals(pass5) && !"".equals(pass6) && !"".equals(pass7) && !"".equals(pass8);
|
|
|
+ }
|
|
|
+ if (isFull && !"".equals(msg)) {
|
|
|
+ msg = msg.substring(0, msg.length() - 1);
|
|
|
+ msg += "压差<0.45或>0.9,请注意处理。";
|
|
|
+ // 发邮件
|
|
|
+ String mailMsg = furnanceName + msg;
|
|
|
+ List<SysDictData> furnanceRecipientDict = iSysDictTypeService.selectDictDataByType("FURNANCE_RECIPIENT");
|
|
|
+ for (SysDictData sysDictData : furnanceRecipientDict) {
|
|
|
+ String dictValue = sysDictData.getDictValue();
|
|
|
+ TStaffmgr staffmgr = staffmgrService.selectTStaffmgrByStaffId(dictValue);
|
|
|
+ SysUser sysUser = userService.selectUserByStaffId(dictValue);
|
|
|
+ FurnancePressureThread mailThread = new FurnancePressureThread(mailService, staffmgr, sysUser.getUserName(), mailMsg + ",");
|
|
|
+ Thread thread = new Thread(mailThread);
|
|
|
+ thread.start();
|
|
|
+ }
|
|
|
+ }
|
|
|
//更新
|
|
|
int result = tFurnancePressureService.updateTFurnancePressure(pressure);
|
|
|
return AjaxResult.success(result + "", pressure);
|
|
@@ -3581,7 +3638,12 @@ public class TFurnancePressureController extends BaseController {
|
|
|
FurnancePressureFvpVO furnancePressureFvpVO109B = this.calcRatio109B(list);
|
|
|
String msgA = this.checkRatio(furnancePressureFvpVO109A, pressure);
|
|
|
String msgB = this.checkRatio(furnancePressureFvpVO109B, pressure);
|
|
|
- msg = "左侧" + msgA + "右侧" + msgB;
|
|
|
+ if ("".equals(msgA)) {
|
|
|
+ msg = "左侧" + msgA;
|
|
|
+ }
|
|
|
+ if ("".equals(msgB)) {
|
|
|
+ msg = "右侧" + msgB;
|
|
|
+ }
|
|
|
break;
|
|
|
case "H110":
|
|
|
FurnancePressureFvpVO furnancePressureFvpVO110 = this.calcRatio(list);
|