| | |
| | | import com.doumee.dao.business.model.Sites; |
| | | import com.doumee.dao.business.web.request.RepairRequest; |
| | | import org.apache.commons.codec.binary.Base64; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import javax.crypto.Mac; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | } |
| | | /** |
| | | * 钉钉通知 - 站点通信异常上报 |
| | | * @param ddUrl |
| | | * @throws Exception |
| | | */ |
| | | public static void siteNoLink(List<Sites> siteList,String token,String robotCode,String chatToken) throws Exception{ |
| | |
| | | } |
| | | |
| | | |
| | | public static void lowVoltageNotice(String bikeCode,String place,String siteName,String token,String robotCode,String chatToken)throws Exception{ |
| | | String desc = "【低电量提醒】车辆编号:{车辆编号},当前位置:{定位位置},当前站点:{站点名称}。"; |
| | | if(StringUtils.isBlank(bikeCode)){ |
| | | return; |
| | | } |
| | | desc= desc.replace("{车辆编号}",bikeCode); |
| | | if(StringUtils.isNotBlank(place)){ |
| | | desc= desc.replace("{定位位置}",place); |
| | | }else{ |
| | | desc=desc.replace("{定位位置}","未知"); |
| | | } |
| | | if(StringUtils.isNotBlank(siteName)){ |
| | | desc= desc.replace("{站点名称}",siteName); |
| | | }else{ |
| | | desc=desc.replace("{站点名称}","未知"); |
| | | } |
| | | sendNoticeNew(desc,token,robotCode,chatToken); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 钉钉通知 - 站点储车告警 |
| | | * @param siteName |