已修改7个文件
57 ■■■■ 文件已修改
admin/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaDeviceDuanluqiWindow.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/meeting/meeting_service/src/main/java/com/doumee/core/wx/WxPlatNotice.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/JiandaoyunCloudController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/WXConstant.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.development
@@ -3,9 +3,9 @@
# 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'
admin/src/components/business/OperaDeviceDuanluqiWindow.vue
@@ -35,7 +35,8 @@
            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;">
server/meeting/meeting_service/src/main/java/com/doumee/core/wx/WxPlatNotice.java
@@ -9,6 +9,7 @@
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;
@@ -27,6 +28,12 @@
@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;
server/visits/dmvisit_admin/src/main/java/com/doumee/api/business/JiandaoyunCloudController.java
@@ -167,8 +167,8 @@
        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);
    }
server/visits/dmvisit_service/src/main/java/com/doumee/core/wx/WXConstant.java
@@ -11,6 +11,7 @@
    //获取公众号 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";
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceServiceImpl.java
@@ -118,7 +118,32 @@
        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
@@ -349,11 +374,12 @@
            //如果系统不用了,端口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());
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/InoutRecordServiceImpl.java
@@ -398,7 +398,7 @@
                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 {
            //日期