| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.WxMiniUtilService; |
| | | import com.doumee.dao.business.LocksMapper; |
| | | import com.doumee.dao.business.SitesMapper; |
| | | import com.doumee.dao.business.model.Locks; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @Override |
| | | public String create(Sites sites) { |
| | |
| | | BigDecimal rata = new BigDecimal(s.getBikeCount()).divide(new BigDecimal(s.getAllLockNum()),2,BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100L)); |
| | | if(rata.compareTo(warnMax)>Constants.ZERO){ |
| | | //发送钉钉通知 |
| | | DingDingNotice.reservesNotice(s.getName(), |
| | | DingDingNotice.reservesNotice(StringUtils.isBlank(s.getName())?s.getId() + " - 未知" :s.getId() + " - " + s.getName(), |
| | | systemDictDataBiz.queryByCode(Constants.DINGDING,Constants.DINGDING_URL).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.DINGDING,Constants.DINGDING_SECRET).getCode(),Constants.ZERO,warnMax); |
| | | }else if(rata.compareTo(warnMin)<Constants.ZERO){ |
| | | //发送钉钉通知 |
| | | DingDingNotice.reservesNotice(s.getName(), |
| | | DingDingNotice.reservesNotice(StringUtils.isBlank(s.getName())?s.getId() + " - 未知" :s.getId() + " - " + s.getName(), |
| | | systemDictDataBiz.queryByCode(Constants.DINGDING,Constants.DINGDING_URL).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.DINGDING,Constants.DINGDING_SECRET).getCode(),Constants.ONE,warnMin); |
| | | } |