Commit cae02065 authored by suhuiguang's avatar suhuiguang

1.增加发送规则代码

parent 7e73200d
...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.*; ...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.*;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.*; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.*;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderInfoMapper; import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.CylinderInfoMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderInfoService; import com.yeejoin.amos.boot.module.tzs.flc.api.service.ICylinderInfoService;
import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -88,6 +89,9 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -88,6 +89,9 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
@Autowired @Autowired
MsgLogServiceImpl msgLogService; MsgLogServiceImpl msgLogService;
@Autowired
private RuleTrigger ruleTrigger;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -599,7 +603,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -599,7 +603,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.getRecords().forEach(r -> { result.getRecords().forEach(r -> {
try { try {
int interval = DateUtils.dateBetweenIncludeToday(r.getNextInspectionDate(), now); int interval = DateUtils.dateBetweenIncludeToday(r.getNextInspectionDate(), now);
// TODO 循环调用规则 触发计算等级及发送消息 // TODO 循环调用规则 触发计算等级
// ruleTrigger.publish(equipmentInputItemRo, packageld, null);
} catch (ParseException e) { } catch (ParseException e) {
log.error(JSON.toJSONString(r) + "格式化失败"); log.error(JSON.toJSONString(r) + "格式化失败");
} }
...@@ -637,6 +642,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -637,6 +642,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
cylinderInfo.setNextInspectionDate(c.getNextInspectionDate()); cylinderInfo.setNextInspectionDate(c.getNextInspectionDate());
cylinderInfos.add(cylinderInfo); cylinderInfos.add(cylinderInfo);
// TODO 循环调用规则 触发计算等级及发送消息 // TODO 循环调用规则 触发计算等级及发送消息
// ruleTrigger.publish(equipmentInputItemRo, packageld, null);
}); });
if(!cylinderInfos.isEmpty()){ if(!cylinderInfos.isEmpty()){
this.updateBatchById(cylinderInfos); this.updateBatchById(cylinderInfos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment