|
|
@@ -4010,14 +4010,17 @@ public class TFurnancePressureController extends BaseController {
|
|
|
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();
|
|
|
+ String status = tFurnancePressure.getStatus();//裂解炉状态
|
|
|
+ if ("1".equals(status)) {///停炉不发邮件
|
|
|
+ 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();
|
|
|
+ }
|
|
|
}
|
|
|
// APP推送
|
|
|
String pushList = configService.selectConfigByKey("production.furnance.pushList");
|
|
|
@@ -4109,15 +4112,18 @@ public class TFurnancePressureController extends BaseController {
|
|
|
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();
|
|
|
+ String status = tFurnancePressure.getStatus();//裂解炉状态
|
|
|
+ if ("1".equals(status)) {///停炉不发邮件
|
|
|
+ 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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//更新
|