Pu Zhibing
2024-12-30 f9e8fafc10ccd1c2e5f6060b4cdc29559927aa16
修改bug
5个文件已修改
28 ■■■■■ 已修改文件
guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/imageModel/ImageModelUtil.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-admin/src/main/resources/application.yml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TaskDetailMapper.xml
@@ -19,6 +19,7 @@
        <if test="null != item.status">
            and a.status = #{item.status}
        </if>
        order by a.execution_time desc
    </select>
    
    
guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java
@@ -193,7 +193,8 @@
                Integer vehicleId = taskDetailVehicle.getVehicleId();
                VehicleOnline vehicleOnline1 = null;
                for (VehicleOnline vehicleOnline : vehicleOnlines2018) {
                    if(vehicleOnline.getVehicleId().equals(vehicleId) && vehicleOnline.getVehicleType().equals(vehicleType)){
                    if(null != vehicleOnline.getVehicleId() && vehicleOnline.getVehicleId().equals(vehicleId) &&
                            null != vehicleOnline.getVehicleType() && vehicleOnline.getVehicleType().equals(vehicleType)){
                        vehicleOnline1 = vehicleOnline;
                        String vehicleGpsProtocol = vehicleOnline.getVehicleGpsProtocol();
                        vehicleOnline1.setVehicleGpsProtocol("808-guangzhou".equals(vehicleGpsProtocol) ? "1" : "2");
@@ -202,7 +203,8 @@
                }
                if(null == vehicleOnline1){
                    for (VehicleOnline vehicleOnline : vehicleOnlines203) {
                        if(vehicleOnline.getVehicleId().equals(vehicleId) && vehicleOnline.getVehicleType().equals(vehicleType)){
                        if(null != vehicleOnline.getVehicleId() && vehicleOnline.getVehicleId().equals(vehicleId) &&
                                null != vehicleOnline.getVehicleType() && vehicleOnline.getVehicleType().equals(vehicleType)){
                            vehicleOnline1 = vehicleOnline;
                            vehicleOnline1.setVehicleGpsProtocol(vehicleOnline.getVehicleGpsProtocol());
                            break;
@@ -234,7 +236,7 @@
                            throw new RuntimeException();
                        }else{
                            //等待15秒
                            Thread.sleep(15000);
                            Thread.sleep(30000);
                            
                            String fileUrl = VideoGateway.getCameraShotByFileId2018(terminalId, fileId, 0);
                            if(null == fileUrl){
@@ -246,7 +248,7 @@
                                    throw new Exception();
                                }else{
                                    //等待15秒
                                    Thread.sleep(15000);
                                    Thread.sleep(30000);
                                    
                                    fileUrl = VideoGateway.getCameraShotByFileId2018(terminalId, fileId, 0);
                                    if(null == fileUrl){
@@ -280,7 +282,7 @@
                            throw new Exception();
                        }else{
                            //等待15秒
                            Thread.sleep(15000);
                            Thread.sleep(30000);
                            
                            String fileUrl = VideoGateway.getCameraShotByFileId2023(fileId, 0);
                            if(null == fileUrl){
@@ -292,7 +294,7 @@
                                    throw new Exception();
                                }else{
                                    //等待15秒
                                    Thread.sleep(15000);
                                    Thread.sleep(30000);
                                    
                                    fileUrl = VideoGateway.getCameraShotByFileId2023(fileId, 0);
                                    if(null == fileUrl){
guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/imageModel/ImageModelUtil.java
@@ -12,6 +12,7 @@
import com.stylefeng.guns.modular.system.util.UUIDUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.File;
import java.io.IOException;
@@ -32,8 +33,8 @@
    /**
     * 本地存储图片地址
     */
    @Value("${filePath}")
    private static String filePath;
    private static String filePath = "/home/file/image/";
//    private static String filePath = "d:/file/";
    
    
    /**
guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java
@@ -286,6 +286,7 @@
        HttpRequest post = HttpUtil.createPost("https://zhyn.cg.gz.gov.cn/map/web/vehicleCtrl/" + terminalId + "/cameraShot");
        post.header("operate-terminal", "4");
        post.header("token", accountLogin.getToken());
        log.info("【2018年协议发送拍摄指令接口】请求地址:" + post.getUrl());
        Map<String, Object> body = new HashMap<>();
        body.put("channelId", channelId);
        log.info("【2018年协议发送拍摄指令接口】请求参数:" + JSON.toJSONString(body));
@@ -328,7 +329,6 @@
        HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/api/cws-business/biz-device-send-records/v1/cameraShot?vehicleId=" + vehicleId + "&vehicleType=" + vehicleType + "&terminalId=" + terminalId + "&channelId=" + channelId);
        get.header("operate-terminal", "4");
        get.header("token", accountLogin.getToken());
        Map<String, Object> body = new HashMap<>();
        log.info("【2023年协议发送拍摄指令接口】请求参数:" + get.getUrl());
        HttpResponse execute = get.execute();
        if(401 == execute.getStatus()){
@@ -390,6 +390,7 @@
        if(null == data){
            return null;
        }
        data = data.replaceAll(";", "");
        return "https://zhyn-pic.cg.gz.gov.cn" + data;
    }
    
@@ -430,6 +431,7 @@
        if(null == data){
            return null;
        }
        data = data.replaceAll(";", "");
        return "https://zhyn-pic.cg.gz.gov.cn" + data;
    }
    
guns-admin/src/main/resources/application.yml
@@ -41,7 +41,7 @@
#    url: jdbc:mysql://127.0.0.1:3306/vehicle_inspection?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai
#    username: root
#    password: 123456
#    db-name: guns #用来搜集数据库的所有表
#    db-name: vehicle_inspection #用来搜集数据库的所有表
#    filters: wall,mergeStat
#线上环境
@@ -98,5 +98,3 @@
            threadPriority: 5
            threadsInheritContextClassLoaderOfInitializingThread: true
            
---
filePath: /home/file/image/