| | |
| | | |
| | | # VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface' |
| | | |
| | | VUE_APP_API_URL = 'http://192.168.1.45:10010' |
| | | #VUE_APP_API_URL = 'http://192.168.1.82:10010' |
| | | |
| | | #VUE_APP_API_URL = 'http://192.168.0.7/system_gateway' |
| | | VUE_APP_API_URL = 'http://192.168.0.7/system_gateway' |
| | | |
| | | VUE_APP_API_URL = 'http://localhost:10010' |
| | | |
| | |
| | | 2.控制开关序号:系统根据配置规则,判断开关当前空闲中进行【自动分闸】,多个用英文逗号隔开,如 1,2;<br> |
| | | 3.自动分闸规则:针对控制开关序号的配置,定时检测【空闲时长】内满足开关电流值都在【空闲电流阈值】范围内,则进行自动分闸控制;<br> |
| | | 4.空闲时长: 请设置至少空闲时长大于等于300秒(5分钟)。<br> |
| | | 5.如需远程控制开关,请正确填写下述全部参数信息。 |
| | | 5.修改重启: 修改配置参数后,返回列表页,点击重启【启用】,是参数生效!<br> |
| | | 6.如需远程控制开关,请正确填写下述全部参数信息。 |
| | | </p> |
| | | <div style="display: flex"> |
| | | <el-form-item label="全部开关序号" prop="channelNo" style="display: inline-block;width:300px;"> |
| | |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.business.model.SmsEmail; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Component |
| | | public class WxPlatNotice { |
| | | |
| | | public String getAccessToken(String appid,String secret) { |
| | | String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+appid+"&secret="+secret; |
| | | String response = HttpsUtil.get(url,false); |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | return json.getString("access_token"); |
| | | } |
| | | public void testSendNotice(List<String> openIds,String token){ |
| | | if(CollectionUtils.isNotEmpty(openIds)){ |
| | | String postUrL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token; |
| | |
| | | String url = "https://lcdp.ahyc.com.cn:30443/api/v1/automation/tenant/61b6fb6080e9de2aa1df94d7/hooks/6954aca3cdf86954d2657433fb470ca1aabd108246925eca"; |
| | | JSONObject object = new JSONObject(); |
| | | object.put("status",0); |
| | | object.put("username","20251104160000" ); |
| | | object.put("info", "这是备注"); |
| | | object.put("username","15345690849" ); |
| | | object.put("info", "这是备注111"); |
| | | String result = HttpsUtil.postJson(url,JSONObject.toJSONString(object)); |
| | | System.out.println(result); |
| | | } |
| | |
| | | //获取公众号 access_token |
| | | public static final String GET_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET"; |
| | | |
| | | |
| | | //获取用户信息 |
| | | public static final String GET_USER_INFO_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code"; |
| | | |
| | |
| | | if(device.getDoorNameObj()!=null && Constants.equalsInteger(device.getType(),Constants.DEVICE_TYPE.duanluqi)){ |
| | | device.setDoorName(JSONObject.toJSONString(device.getDoorNameObj())); |
| | | } |
| | | Device model = deviceMapper.selectById(device.getId()); |
| | | if(model ==null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(model.getType(),Constants.DEVICE_TYPE.duanluqi)){ |
| | | //如果是斷路器 |
| | | if( Constants.equalsInteger(model.getIsUsed(),Constants.ZERO) |
| | | && StringUtils.equals(device.getDoorName(),model.getDoorName())){ |
| | | //如果配置参数发生了变化,设置状态未启用 |
| | | device.setIsUsed(Constants.ONE); |
| | | try { |
| | | MqttClient mqttClient = MqttClientCache.clientMapCache.get("device"+device.getId()); |
| | | if(mqttClient !=null){ |
| | | if(mqttClient.isConnected()){ |
| | | mqttClient.disconnect(); |
| | | } |
| | | mqttClient.close(); |
| | | MqttClientCache.clientMapCache.remove("device"+device.getId()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("==============端口mqtt链接失败:"+model.getName()+e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | deviceMapper.updateById(device); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | //如果系统不用了,端口mqtt连接 |
| | | try { |
| | | mqttClient = mqttBizService.unsubscribe(mqttClient,config ,topics); |
| | | if(mqttClient ==null){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"建立连接失败!"); |
| | | } |
| | | if(mqttClient.isConnected()){ |
| | | mqttClient.disconnect(); |
| | | if(mqttClient !=null){ |
| | | if(mqttClient.isConnected()){ |
| | | mqttClient.disconnect(); |
| | | } |
| | | mqttClient.close(); |
| | | MqttClientCache.clientMapCache.remove("device"+param.getId()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("==============端口mqtt链接失败:"+model.getName()+e.getMessage()); |
| | |
| | | maxMonth = DateUtil.getNowMonthNum(); |
| | | } |
| | | for (int i = maxMonth; i >0 ; i--) { |
| | | dateList.add(DateUtil.getNowYearNum()+"-"+ StringUtils.leftPad(i+"",2,"0")); |
| | | dateList.add(inParkDataDTO.getDateStr()+"-"+ StringUtils.leftPad(i+"",2,"0")); |
| | | } |
| | | }else { |
| | | //日期 |