Alertrule2sService.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.gyee.healthmodel.service;
  2. import com.gyee.healthmodel.model.auto.Alertrule2;
  3. import com.gyee.healthmodel.service.auto.IAlertrule2Service;
  4. import org.springframework.stereotype.Service;
  5. import javax.annotation.Resource;
  6. import java.util.ArrayList;
  7. import java.util.List;
  8. /**
  9. * @ClassName : Alertrule2sService
  10. * @Description : 自定义报警规则service
  11. */
  12. @Service
  13. public class Alertrule2sService {
  14. private final int DIGIT=2;
  15. @Resource
  16. private IAlertrule2Service alertrule2Service;
  17. public List<Alertrule2> findAlertRuleList(String station, String modelid) {
  18. List<Alertrule2> snapls = alertrule2Service.findAlertRuleList(station,modelid);
  19. if (!snapls.isEmpty()) {
  20. return snapls;
  21. }
  22. return new ArrayList<>();
  23. }
  24. public String getAlertRuleIdByName(String station, String modelid,String name) {
  25. List<Alertrule2> snapls = alertrule2Service.getAlertRuleIdByName(station,modelid,name);
  26. if (snapls != null && snapls.size() > 0) {
  27. return snapls.get(0).getId();
  28. }
  29. return null;
  30. }
  31. }