1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- package com.gyee.healthmodel.service;
- import com.gyee.healthmodel.model.auto.Alertrule2;
- import com.gyee.healthmodel.service.auto.IAlertrule2Service;
- import org.springframework.stereotype.Service;
- import javax.annotation.Resource;
- import java.util.ArrayList;
- import java.util.List;
- /**
- * @ClassName : Alertrule2sService
- * @Description : 自定义报警规则service
- */
- @Service
- public class Alertrule2sService {
- private final int DIGIT=2;
- @Resource
- private IAlertrule2Service alertrule2Service;
- public List<Alertrule2> findAlertRuleList(String station, String modelid) {
- List<Alertrule2> snapls = alertrule2Service.findAlertRuleList(station,modelid);
- if (!snapls.isEmpty()) {
- return snapls;
- }
- return new ArrayList<>();
- }
- public String getAlertRuleIdByName(String station, String modelid,String name) {
- List<Alertrule2> snapls = alertrule2Service.getAlertRuleIdByName(station,modelid,name);
- if (snapls != null && snapls.size() > 0) {
- return snapls.get(0).getId();
- }
- return null;
- }
- }
|