jiangping
2024-11-14 ca46aed30739be09fbbdb413ff7d2f843934efda
最新版本541200007
已添加9个文件
已修改17个文件
467 ■■■■■ 文件已修改
server/meeting/meeting_service/src/main/resources/application-dev.yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/system_gateway/src/main/resources/application-dev.yml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/ChangNeiDiaoduController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/SecurityController.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/RuleEventFiledOptionsRequest.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/RuleEventSearchRequest.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/SecureDevStatusListRequest.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/SecureDevStatusTotalRequest.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/PageRegionInfoResponse.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RuleEventSearchDataResponse.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RuleEventSearchResponse.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/SecureDevStatusListResponse.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/SecureDevStatusTotalResponse.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformGroupMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/RegionTreeVO.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WaningEventDataVO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/resources/application-dev.yml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/meeting/meeting_service/src/main/resources/application-dev.yml
@@ -29,7 +29,6 @@
#    password: 111111
debug_model: true
captcha_check: false
# Swagger配置
server/system_gateway/src/main/resources/application-dev.yml
@@ -1,12 +1,12 @@
spring:
  # æ•°æ®æºé…ç½®
  datasource:
    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: doumee
    password: rtjgfEr@&0c0m
#    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
#    username: root
#    password: Atwl@2024
#    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
#    username: doumee
#    password: rtjgfEr@&0c0m
    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: Atwl@2024
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/ChangNeiDiaoduController.java
@@ -85,6 +85,8 @@
    public ApiResponse<List<PlatformWarnEvent>> warningList(@RequestParam Integer  size) {
        int limit = Constants.formatIntegerNum(size)>0?size:7;
        List<PlatformWarnEvent> data = boardService.warningList(limit);
        if(data ==null || data.size()==0){
        }
        return ApiResponse.success(data);
    }
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/board/SecurityController.java
@@ -3,6 +3,7 @@
import com.doumee.api.BaseController;
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse;
import com.doumee.core.haikang.model.param.respose.RuleEventSearchResponse;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
import com.doumee.dao.web.response.platformReport.*;
@@ -73,7 +74,8 @@
    @ApiOperation("园区安防设备")
    @GetMapping("/securityDeviceData")
    public ApiResponse<List<SecurityDeviceDataVO>> securityDeviceData() {
        List<SecurityDeviceDataVO> list = new ArrayList<>();
        List<SecurityDeviceDataVO> list = boardService.securityDeviceData();
        /*
        Random random = new Random();
        for (int i = 1; i <= 3; i++) {
            SecurityDeviceDataVO data = new SecurityDeviceDataVO();
@@ -82,7 +84,27 @@
            data.setOfflineDeviceNum(random.nextInt(10));
            data.setTotalNum(data.getOnlineNum() + data.getOfflineDeviceNum() );
            list.add(data);
        }*/
        return ApiResponse.success(list);
        }
    @LoginNoRequired
    @ApiOperation("安防告警接口")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "类型 0全部 1区域告警 2行为告警", required = false)
    })
    @GetMapping("/warningEventData")
    public ApiResponse<List<WaningEventDataVO>> warningEventData(Integer type) {
        List<WaningEventDataVO> list = boardService.warningEventData(type);
        /*
        Random random = new Random();
        for (int i = 1; i <= 3; i++) {
            SecurityDeviceDataVO data = new SecurityDeviceDataVO();
            data.setDeviceType("设备类型_"+i);
            data.setOnlineNum(random.nextInt(10));
            data.setOfflineDeviceNum(random.nextInt(10));
            data.setTotalNum(data.getOnlineNum() + data.getOfflineDeviceNum() );
            list.add(data);
        }*/
        return ApiResponse.success(list);
    }
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
  profiles:
    active: pro
    active: dev
  application:
    name: visitsAdmin
    # å®‰å…¨é…ç½®
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -146,11 +146,14 @@
        String[] cameraPreviewURLs= new String[]{"/api/video/v1/cameras/previewURLs","获取监控点预览取流URL"};//获取监控点预览取流URL
        String[] pageFireChannel= new String[]{"/api/resource/v1/fireChannel/get","分页获取消防传感器列表"};//分页获取消防传感器列表
        String[] pageSensorStatus= new String[]{"/api/fpnms/v2/sensor/status/search","分页查询消防传感器部件状态v2"};//分页查询消防传感器部件状态v2
        String[] ruleEventSearch= new String[]{"/api/v2/ruleEvent/search","安防看板-今日告警事件-根据eventType字段3"};//安防看板-今日告警事件-根据eventType字段3[图片]
        String[] getSecureDevStatusList= new String[]{"/api/secureDataService/v2/getSecureDevStatusList","安防看板-园区安防设备-各类型设备状态数据列表"};//安防看板-园区安防设备-各类型设备状态数据列表
        String[] getSecureDevStatusTotal= new String[]{"/api/secureDataService/v2/getSecureDevStatusTotal","统计园区总体的安防设备数量,在线数、在线率、离线数、离线率"};//统计园区总体的安防设备数量,在线数、在线率、离线数、离线率
    }
    /**
     * é™„录A.55消防设备类型
     */
    public interface  XiaofangCGQType{
        String[] hzbjzj = new String[]{"1020001" ,    "火灾报警主机"     }     ;
        String[] gycgq = new String[]{"1020002" ,    "感烟传感器"     }     ;
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -759,6 +759,30 @@
        return startDoPostStringArtemis(HKConstants.InterfacePath.pageSensorStatus,body);
    }
    /**
     * å®‰é˜²çœ‹æ¿-今日告警事件-根据eventType字段3
     * @param body
     * @return
     */
    public static String ruleEventSearch(String body) {
        return startDoPostStringArtemis(HKConstants.InterfacePath.ruleEventSearch,body);
    }
    /**
     * å®‰é˜²çœ‹æ¿-园区安防设备-各类型设备状态数据列表
     * @param body
     * @return
     */
    public static String getSecureDevStatusList(String body) {
        return startDoPostStringArtemis(HKConstants.InterfacePath.getSecureDevStatusList,body);
    }
    /**
     * ç»Ÿè®¡å›­åŒºæ€»ä½“的安防设备数量,在线数、在线率、离线数、离线率
     * @param body
     * @return
     */
    public static String getSecureDevStatusTotal(String body) {
        return startDoPostStringArtemis(HKConstants.InterfacePath.getSecureDevStatusTotal,body);
    }
    /**
     * èŽ·å–æœˆå°çŠ¶æ€
     * @return
     */
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/RuleEventFiledOptionsRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package com.doumee.core.haikang.model.param.request;
import lombok.Data;
import java.util.List;
@Data
public class RuleEventFiledOptionsRequest {
  private String fieldName;//    String    false    å­—段名称
private String fieldValue    ;//String    false    å­—段值
private String type;//    String    false    æŸ¥è¯¢ç±»åž‹ï¼Œå¯é€‰èŒƒå›´ï¼šeq(相等)、neq(不相等)、like(类似)、lt(小于)、gt(大于)、lte(小于等于)、gte(大于等于)、in(范围)、notIn(范围之外)、in:fieldValue的值可以填多个,用英文逗号分隔、notNull(不为空)、isNull(为空)、recently(最近)、
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/RuleEventSearchRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
package com.doumee.core.haikang.model.param.request;
import com.doumee.core.haikang.model.param.BaseListPageRequest;
import lombok.Data;
import java.util.List;
@Data
public class RuleEventSearchRequest extends BaseListPageRequest {
   private String[] regionIds;//    Array    false    å›­åŒºå¯¹åº”区域id信息,item ç±»åž‹: string,传空list查全部
    private String includeBool;//    Number    false    æ˜¯å¦åŒ…含下级子节点,0-不包含,1-包含
    private List<RuleEventFiledOptionsRequest > filedOptions;//    Array    false    ç­›é€‰å­—段列表>
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/SecureDevStatusListRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package com.doumee.core.haikang.model.param.request;
import lombok.Data;
@Data
public class SecureDevStatusListRequest {
   private String[] regionIds;//    Array    false    å›­åŒºå¯¹åº”区域id信息,item ç±»åž‹: string,传空list查全部
    private String includeBool;//    Number    false    æ˜¯å¦åŒ…含下级子节点,0-不包含,1-包含
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/SecureDevStatusTotalRequest.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
package com.doumee.core.haikang.model.param.request;
import lombok.Data;
@Data
public class SecureDevStatusTotalRequest {
   private String[] regionIds;//    Array    false    å›­åŒºå¯¹åº”区域id信息,item ç±»åž‹: string,传空list查全部
    private String includeBool;//    Number    false    æ˜¯å¦åŒ…含下级子节点,0-不包含,1-包含
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/PageRegionInfoResponse.java
@@ -11,10 +11,10 @@
public class PageRegionInfoResponse {
     @ApiModelProperty(value = "区域唯一标识码")
     private String regionIndexCode;//     Body      String      false      åŒºåŸŸå”¯ä¸€æ ‡è¯†ç 
     private String indexCode;//     Body      String      false      åŒºåŸŸå”¯ä¸€æ ‡è¯†ç 
     @ApiModelProperty(value = "区域名称")
     private String regionName     ;// Body      String      false      åŒºåŸŸåç§°
     private String name     ;// Body      String      false      åŒºåŸŸåç§°
     @ApiModelProperty(value = "父区域唯一标识码")
     private String parentIndexCode ;//     Body      String      false      çˆ¶åŒºåŸŸå”¯ä¸€æ ‡è¯†ç 
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RuleEventSearchDataResponse.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.doumee.core.haikang.model.param.respose;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
@Data
public class RuleEventSearchDataResponse {
   private String model_data_id;//    String    false    id
   private String update_time;//    String    false    æ›´æ–°æ—¶é—´
   private String create_time;//    String    false    åˆ›å»ºæ—¶é—´
   private String biz_id;//    String    false    biz_id
   private String event_id;//    String    false    event_id
   private String rule_event_id;//    String    false    rule_event_id
   private String rule_event_type;//    Number    false    rule_event_type
   private String rule_event_category;//    String    false    rule_event_category
   private String rule_event_name;//    String    false    åç§°
   private String src_index_code;//    String    false    ç¼–码
   private String src_type;//    String    false    è®¾å¤‡ç±»åž‹
   private String src_name;//    String    false    è®¾å¤‡åç§°
   private String ability;//    String    false    ability
   private String level;//    Number    false    ç­‰çº§
   private String level_name;//    String    false    ç™»è®°åç§°
   private String event_type;//    String    false    äº‹ä»¶ç 
   private String event_type_name;//    String    false    äº‹ä»¶åç§°
   private String region_index_code;//    String    false    åŒºåŸŸç¼–码
   private String region_name;//    String    false    åŒºåŸŸåç§°
   private String happen_time;//    String    false    å‘生时间
   private String handle_status;//    Number    false    å¤„置状态
   private String handle_status_name;//    String    false    å¤„状态名称
   private String rule_id;//    String    false    rule_id
   private String rule_name;//    String    false    å‘¨ç•Œå…¥ä¾µé€šçŸ¥ç›‘控中心
   private String status;//    Number    false    çŠ¶æ€
   private String linkage_other_info;//    String    false    linkage_other_info
   private String report_from;//    Number    false    report_from
   private String report_from_name;//    String    false    è®¾å¤‡
   private String plan_execute_status;//    Number    false    plan_execute_status
   private String image_server_code;//    String    false    image_server_code
   private String image_url;//    String    false    å›¾ç‰‡
   private String app_id;//    String    false    app_id
   private String flow_id;//    Number    false    flow_id
   private String flow_name;//    String    false    é¢„置流程
   private String node_id;//    String    false    node_id
   private String node_name;//    String    false    äº‹ä»¶ç ”判
   private String from_cascade;//    Number    false    from_cascade
   private String level_color;//    String    false    level_color
   private String plan_exec_status;//    String    false    plan_exec_status
   @JsonProperty(value = "_image_url")
   private String imgurl;//    String    false    æœ‰æ•ˆå›¾ç‰‡åœ°å€
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/RuleEventSearchResponse.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
package com.doumee.core.haikang.model.param.respose;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
@Data
public class RuleEventSearchResponse {
   private String hasNext;//    String    false    id
   private List<RuleEventSearchDataResponse> list;
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/SecureDevStatusListResponse.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
package com.doumee.core.haikang.model.param.respose;
import lombok.Data;
@Data
public class SecureDevStatusListResponse {
   private String devType    ;//String    false    è®¾å¤‡ç±»åž‹
   private String devTypeName;//    String    false    è®¾å¤‡åç§°
   private Integer onlineCount    ;//Number    false    åœ¨çº¿æ•°
   private Integer offlineCount    ;//Number    false    ç¦»çº¿æ•°
   private String onlinePercent    ;//String    false    åœ¨çº¿çއ
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/SecureDevStatusTotalResponse.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
package com.doumee.core.haikang.model.param.respose;
import lombok.Data;
@Data
public class SecureDevStatusTotalResponse {
   private String name    ;//String    false    åœ¨çº¿/离线
private String value    ;//    String    false    æ•°é‡
private String valueColor    ;//    String    false    é¢œè‰²
}
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -1524,6 +1524,60 @@
        return  null;
    }
    /**
     *安防看板-今日告警事件-根据eventType字段3
     * @return
     */
    public  static  BaseResponse< RuleEventSearchResponse>   ruleEventSearch(RuleEventSearchRequest param){
        log.info("【海康安防看板-今日告警事件-根据eventType字段3】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.ruleEventSearch(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<RuleEventSearchResponse> >(){};
            BaseResponse<RuleEventSearchResponse>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康安防看板-今日告警事件-根据eventType字段3");
            return  result;
        }catch (Exception e){
            log.error("【海康安防看板-今日告警事件-根据eventType字段3】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *统计园区总体的安防设备数量,在线数、在线率、离线数、离线率
     * @return
     */
    public  static  BaseResponse<List<SecureDevStatusTotalResponse>>   getSecureDevStatusTotal(SecureDevStatusTotalRequest param){
        log.info("【海康统计园区总体的安防设备数量,在线数、在线率、离线数、离线率】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.getSecureDevStatusTotal(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<List<SecureDevStatusTotalResponse>> >(){};
            BaseResponse<List<SecureDevStatusTotalResponse>>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康统计园区总体的安防设备数量,在线数、在线率、离线数、离线率");
            return  result;
        }catch (Exception e){
            log.error("【海康统计园区总体的安防设备数量,在线数、在线率、离线数、离线率】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *安防看板-园区安防设备-各类型设备状态数据列表
     * @return
     */
    public  static  BaseResponse<List<SecureDevStatusListResponse>>   getSecureDevStatusList(SecureDevStatusTotalRequest param){
        log.info("【海康安防看板-园区安防设备-各类型设备状态数据列表】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.getSecureDevStatusList(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<List<SecureDevStatusListResponse>> >(){};
            BaseResponse<List<SecureDevStatusListResponse>>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康安防看板-园区安防设备-各类型设备状态数据列表");
            return  result;
        }catch (Exception e){
            log.error("【海康安防看板-园区安防设备-各类型设备状态数据列表】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *根据用户标识获取客户端TGC接口
     * @return
     */
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/PlatformGroupMapper.java
@@ -2,11 +2,12 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.PlatformGroup;
import com.github.yulichang.base.MPJBaseMapper;
/**
 * @author æ±Ÿè¹„蹄
 * @date 2024/06/28 10:03
 */
public interface PlatformGroupMapper extends BaseMapper<PlatformGroup> {
public interface PlatformGroupMapper extends MPJBaseMapper<PlatformGroup> {
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformGroup.java
@@ -10,6 +10,8 @@
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@@ -90,4 +92,10 @@
    @ApiModelProperty(value = "已签到排队车辆", example = "1")
    @TableField(exist = false)
    private List<PlatformJob> signJobList;
    @ApiModelProperty(value = "计划收货数量(wms)", example = "1")
    @TableField(exist = false)
    private BigDecimal totalNum;
    @ApiModelProperty(value = "计划收货数量(非wms)", example = "1")
    @TableField(exist = false)
    private BigDecimal ortherTotalNum;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
@@ -92,7 +92,13 @@
    @ApiModelProperty(value = "月分组名称" ,hidden = true)
    @TableField(exist = false)
    private String groupName ;
    @ApiModelProperty(value = "月分组编码" ,hidden = true)
    @TableField(exist = false)
    private Integer groupId ;
    @ApiModelProperty(value = "作业完成时间(最终时间)")
    @TableField(exist = false)
    private Date doneDate;
    @ApiModelProperty(value = "计划收货数量(非wms)", example = "1")
    @TableField(exist = false)
    private BigDecimal ortherIoQty;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/RegionTreeVO.java
@@ -42,13 +42,25 @@
        for (PageRegionInfoResponse treeNode : nodeList){
            // åˆ¤æ–­å½“前节点是否为根节点,此处注意:若parentId类型是String,则要采用equals()方法判断。
            if (Objects.isNull(treeNode.getParentIndexCode())
                    || StringUtils.equals(treeNode.getParentIndexCode(),"null")) {
                    || StringUtils.equals(treeNode.getParentIndexCode(),"null")
                    || !isValidParentCode(treeNode.getParentIndexCode(),nodeList)) {
                // æ˜¯ï¼Œæ·»åŠ 
                rootNodeList.add(treeNode);
            }
        }
        return rootNodeList;
    }
    private boolean isValidParentCode(String parentIndexCode, List<PageRegionInfoResponse> nodeList) {
        for (PageRegionInfoResponse treeNode : nodeList){
            // åˆ¤æ–­å½“前节点是否为根节点,此处注意:若parentId类型是String,则要采用equals()方法判断。
            if ( StringUtils.equals(treeNode.getIndexCode(),parentIndexCode)) {
                return true;
            }
        }
        return false;
    }
@@ -59,7 +71,7 @@
    public List<PageRegionInfoResponse> buildTree(){
        // treeNodes:保存一个顶级节点所构建出来的完整树形
        List<PageRegionInfoResponse> treeNodes = new ArrayList<PageRegionInfoResponse>();
        // getRootNode():获取所有的根节点
         getRootNode();//:获取所有的根节点
        for (PageRegionInfoResponse treeRootNode : getRootNode()) {
            // å°†é¡¶çº§èŠ‚ç‚¹è¿›è¡Œæž„å»ºå­æ ‘
            treeRootNode = buildChildTree(treeRootNode);
@@ -79,7 +91,7 @@
        // nodeList:所有节点集合(所有数据)
        for (PageRegionInfoResponse treeNode : nodeList) {
            // åˆ¤æ–­å½“前节点的父节点ID是否等于根节点的ID,即当前节点为其下的子节点
                if (!Objects.isNull(treeNode.getParentIndexCode())&&treeNode.getParentIndexCode().equals(pNode.getRegionIndexCode())) {
                if (!Objects.isNull(treeNode.getParentIndexCode())&&treeNode.getParentIndexCode().equals(pNode.getIndexCode())) {
                    // å†é€’归进行判断当前节点的情况,调用自身方法
                    childTree.add(buildChildTree(treeNode));
                }
server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WaningEventDataVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.doumee.dao.web.response.platformReport;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * å›­åŒºå®‰é˜²è®¾å¤‡
 *
 * @Author : Rk
 * @create 2024/10/25 10:59
 */
@Data
public class WaningEventDataVO {
    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty(value = "图片地址")
    private String img;
    @ApiModelProperty(value = "时间")
    private String createDate;
    @ApiModelProperty(value = "发生地点")
    private String  addr;
    @ApiModelProperty(value = "内容")
    private String  content;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -799,7 +799,7 @@
                    .last(" limit 1 ")
            );
            if(Objects.nonNull(lastBeginPlatform)){
                String v = Long.toString(System.currentTimeMillis() - lastBeginPlatform.getCreateDate().getTime() / 1000) ;
                String v = Long.toString((System.currentTimeMillis() - lastBeginPlatform.getCreateDate().getTime() )/ 1000) ;
                optTime = optTime + Long.valueOf(v);
            }
        }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -8,11 +8,11 @@
import com.doumee.core.haikang.model.param.BaseListPageResponse;
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.BaseListPageRequest;
import com.doumee.core.haikang.model.param.request.RuleEventFiledOptionsRequest;
import com.doumee.core.haikang.model.param.request.RuleEventSearchRequest;
import com.doumee.core.haikang.model.param.request.SecureDevStatusTotalRequest;
import com.doumee.core.haikang.model.param.request.SensorStatusListRequest;
import com.doumee.core.haikang.model.param.respose.PageCameraInfoResponse;
import com.doumee.core.haikang.model.param.respose.PageFireChannelInfoResponse;
import com.doumee.core.haikang.model.param.respose.PageRegionInfoResponse;
import com.doumee.core.haikang.model.param.respose.PageSensorStatusResponse;
import com.doumee.core.haikang.model.param.respose.*;
import com.doumee.core.haikang.service.HKService;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
@@ -52,6 +52,8 @@
    private PlatformWmsDetailMapper platformWmsDetailMapper;
    @Autowired
    private PlatformMapper platformMapper;
    @Autowired
    private PlatformGroupMapper platformGroupMapper;
    /**
     * èŽ·å–åŒºåŸŸæ ‘å½¢ç»“æž„æ•°æ®
     * @return
@@ -95,7 +97,7 @@
        if(carmeraListVOList!=null && carmeraListVOList.size()>0){
            for(PageRegionInfoResponse p : allList){
                for(CarmeraListVO c : carmeraListVOList){
                    if(StringUtils.equals(p.getRegionIndexCode(),c.getReginCode())
                    if(StringUtils.equals(p.getIndexCode(),c.getReginCode())
                            && (StringUtils.contains(c.getName(),name) ||StringUtils.isBlank(name))){
                        if(p.getCarmeraList()==null){
                            p.setCarmeraList(new ArrayList<>());
@@ -248,28 +250,42 @@
    @Override
    public  List<PlatformGroupFinishVO> platformGroupFinish(){
        List<PlatformGroupFinishVO> data = new ArrayList<>();
        List<PlatformGroup> groups = platformGroupMapper.selectJoinList(PlatformGroup.class, new MPJLambdaWrapper<PlatformGroup>()
                .select("(select sum(a.TOTAL_NUM) from platform_job a where a.PLATFORM_GROUP_ID=t.id and a.isdeleted=0   and a.status in(6,9,10) and to_days(a.done_date) = to_days(now()))",PlatformGroup::getOrtherTotalNum)
                .selectAll(PlatformGroup.class)
                .eq(PlatformGroup::getIsdeleted,Constants.ZERO)
        );
        if(groups!=null && groups.size()>0){
        List<PlatformWmsDetail> jobList = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class, new MPJLambdaWrapper<PlatformWmsDetail>()
                .selectSum( PlatformWmsDetail::getIoQty)
                .selectAs(PlatformGroup::getName, PlatformWmsDetail::getGroupName)
                    .selectAs(PlatformGroup::getId, PlatformWmsDetail::getGroupId)
                .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformWmsDetail::getJobId)
                .rightJoin(PlatformGroup.class,PlatformGroup::getId,PlatformJob::getPlatformGroupId)
                .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)
                .eq(PlatformJob::getIsdeleted, Constants.ZERO)
                .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
                        , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                        , Constants.PlatformJobStatus.LEAVED.getKey())
                .apply("to_days(t1.create_date) = to_days(now())")
                .groupBy(PlatformGroup::getId)
                    .groupBy(PlatformJob::getPlatformGroupId)
        );
        if(jobList!=null){
            for(PlatformWmsDetail d : jobList){
            for(PlatformGroup d : groups){
                PlatformGroupFinishVO t = new PlatformGroupFinishVO();
                t.setFinishData(Constants.formatBigdecimal(d.getIoQty()).intValue());
                t.setPlatformGroupName(d.getGroupName());
                if(jobList!=null){
                    for(PlatformWmsDetail dd : jobList){
                      if(Constants.equalsInteger(dd.getGroupId(),d.getId())){
                          d.setTotalNum(dd.getIoQty());
            }
        }
                }
                t.setFinishData(Constants.formatBigdecimal(d.getTotalNum()).intValue()+Constants.formatBigdecimal(d.getOrtherTotalNum()).intValue());
                t.setPlatformGroupName(d.getName());
                data.add(t);
            }
        }
        return data;
    }
    @Override
    public  CarWorkSituationVO carWorkSituation(int limit){
        CarWorkSituationVO carWorkSituationVO = new CarWorkSituationVO();
@@ -279,6 +295,61 @@
        );
        carWorkSituationVO.setPlatformLogList(platformLogList);
        return carWorkSituationVO;
    }
    @Override
    public  List<SecurityDeviceDataVO> securityDeviceData(){
        List<SecurityDeviceDataVO> list = new ArrayList<>();
        BaseResponse<List<SecureDevStatusListResponse>> result = HKService.getSecureDevStatusList(new SecureDevStatusTotalRequest()) ;
        if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) && result.getData()!=null){
            List<SecureDevStatusListResponse> rlist = result.getData();
            for(SecureDevStatusListResponse r :rlist){
                SecurityDeviceDataVO data = new SecurityDeviceDataVO();
                data.setDeviceType(r.getDevTypeName());
                data.setOnlineNum(r.getOnlineCount());
                data.setOfflineDeviceNum(r.getOfflineCount());
                data.setTotalNum(data.getOnlineNum() + data.getOfflineDeviceNum() );
                list.add(data);
            }
        }
        /*
        Random random = new Random();
        for (int i = 1; i <= 3; i++) {
            SecurityDeviceDataVO data = new SecurityDeviceDataVO();
            data.setDeviceType("设备类型_"+i);
            data.setOnlineNum(random.nextInt(10));
            data.setOfflineDeviceNum(random.nextInt(10));
            data.setTotalNum(data.getOnlineNum() + data.getOfflineDeviceNum() );
            list.add(data);
        }*/
        return list;
    }
    @Override
    public  List<WaningEventDataVO> warningEventData(Integer type){
        List<WaningEventDataVO> list = new ArrayList<>();
        RuleEventSearchRequest request = new RuleEventSearchRequest();
        request.setFiledOptions(new ArrayList<>());
        RuleEventFiledOptionsRequest file = new RuleEventFiledOptionsRequest();
        file.setFieldName("event_type");
        file.setFieldValue("131588");//安防告警
        file.setType("eq");
        request.getFiledOptions().add(file);
        BaseResponse< RuleEventSearchResponse> result = HKService.ruleEventSearch(request);
        if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) && result.getData()!=null){
            List<RuleEventSearchDataResponse> rlist = result.getData().getList();
            if(rlist!=null){
                for(RuleEventSearchDataResponse r :rlist){
                    WaningEventDataVO data = new WaningEventDataVO();
                    data.setAddr(r.getSrc_name());
                    data.setImg(r.getImage_url());
                    data.setTitle(r.getEvent_type_name());
                    data.setCreateDate(r.getCreate_time());
//                data.setContent(r.get);
                    list.add(data);
                }
            }
        }
        return list;
    }
    @Override
@@ -328,7 +399,7 @@
                    }else{
                        platformDurationVO.setWorkType(Constants.ZERO);//如果是卸货
                    }
                    Integer workMinute = job.getWorkNum().multiply(new BigDecimal(60)).divide(model.getWorkRate(),0,BigDecimal.ROUND_HALF_UP).intValue();
                    Integer workMinute = Constants.formatBigdecimal(job.getWorkNum()).multiply(new BigDecimal(60)).divide(model.getWorkRate(),0,BigDecimal.ROUND_HALF_UP).intValue();
                    Date overDate = DateUtil.getXMinuteAfterDate(job.getNewStartDate(),workMinute + model.getWorkTimeoutAlarmTime());//预计完成时间
                    platformDurationVO.setFinishTimeStr(DateUtil.DateToStr(overDate,"HH:mm"));
@@ -374,7 +445,22 @@
    public   List<WorkEfficiencyVO> workEfficiency(Integer type){
        //作业类型 0自有车卸货 1自有车装货 2外协车卸货 3外协车装货 4市公司外协车卸货
        List<WorkEfficiencyVO> workEfficiencyVOList = new ArrayList<>();
        List<PlatformWmsDetail> jobList = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class, new MPJLambdaWrapper<PlatformWmsDetail>()
        List<PlatformJob> jobList = platformJobMapper.selectJoinList(PlatformJob.class, new MPJLambdaWrapper<PlatformJob>()
                .selectAll( PlatformJob.class)
                .select("(select sum(ifnull(a.io_qty,0)) from platform_wms_detail a where a.isdeleted=0 and a.job_id =t.id )", PlatformJob::getIoQty)
                .apply("to_days(t.create_date) = to_days(now())")
                .eq(Platform::getIsdeleted, Constants.ZERO)
                .in(PlatformJob::getStatus, Constants.PlatformJobStatus.DONE.getKey()
                        , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                        , Constants.PlatformJobStatus.LEAVED.getKey())
                .in(Constants.equalsInteger(type,Constants.ZERO),PlatformJob::getType,new Integer[]{0,2,4})
                .in(Constants.equalsInteger(type,Constants.ONE),PlatformJob::getType,new Integer[]{1,3})
        );
        if(jobList==null || jobList.size()==0){
            return workEfficiencyVOList;
        }
  /*      List<PlatformWmsDetail> jobList = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class, new MPJLambdaWrapper<PlatformWmsDetail>()
                .selectAll( PlatformWmsDetail.class)
                .selectAs( PlatformJob::getDoneDate,PlatformWmsDetail::getDoneDate)
                .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformWmsDetail::getJobId)
@@ -386,28 +472,30 @@
                        , Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()
                        , Constants.PlatformJobStatus.LEAVED.getKey())
                .apply("to_days(t1.create_date) = to_days(now())")
        );
        );*/
        int curtotalNum = 0;
        Date today =  Utils.Date.getStart(new Date());
        long curTime=0, lastTime=0;
        for (int i = 0; i < 8; i++) {
            lastTime = curTime;//上次的时间
            int curHour = 8+(i*2);
            long time = curHour*60*60*1000 + today.getTime();
            curTime = curHour*60*60*1000 + today.getTime();
            WorkEfficiencyVO workEfficiencyVO = new WorkEfficiencyVO();
            workEfficiencyVO.setWorkTime(curHour+":00");
            workEfficiencyVO.setTotalWorkNum(0);
            workEfficiencyVO.setWorkNum(0);
            if(jobList!=null && jobList.size()>0){
                for(PlatformWmsDetail detail : jobList){
                    if(detail.getDoneDate()!=null && detail.getDoneDate().getTime()<= time){
                for(PlatformJob detail : jobList){
                    if(detail.getDoneDate()!=null && detail.getDoneDate().getTime()<= curTime){
                        //当前量
                        if(detail.getDoneDate()!=null && detail.getDoneDate().getTime() > lastTime){
                            //区间值 å–实近2小时内的累计值
                            workEfficiencyVO.setWorkNum(Constants.formatIntegerNum(workEfficiencyVO.getWorkNum())+Constants.formatBigdecimal(detail.getIoQty()).intValue());
                        }
                            workEfficiencyVO.setWorkNum(Constants.formatIntegerNum(workEfficiencyVO.getWorkNum())+Constants.formatBigdecimal(detail.getIoQty()).intValue() +Constants.formatBigdecimal(detail.getTotalNum()).intValue());
                        //累积量
                        curtotalNum += Constants.formatBigdecimal(detail.getIoQty()).intValue();
                    }
                }
                }
                curtotalNum += Constants.formatIntegerNum(workEfficiencyVO.getWorkNum()) ;
            }
            workEfficiencyVO.setTotalWorkNum(curtotalNum);//累计值
            workEfficiencyVOList.add(workEfficiencyVO);
@@ -419,7 +507,7 @@
        List<PlatformDurationVO> platformDurationList = new ArrayList<>();
        List<Platform> jobList = platformMapper.selectJoinList(Platform.class, new MPJLambdaWrapper<Platform>()
                .selectAll( Platform.class)
                .select(" ( select ROUND( ifnull(SUM(pl.PARAM3),0)/60  , 2 )   from platform_log pl  where   pl.remark = t.id and to_days(pl.CREATE_DATE) =to_days  now())",Platform::getWorkCountTime)
                .select(" (select ROUND( SUM(ifnull(pl.PARAM3,0)/60 ) , 2 )   from platform_log pl  where   pl.remark = t.id and to_days(pl.CREATE_DATE) =to_days(now()))",Platform::getWorkCountTime)
                .eq(Platform::getIsdeleted, Constants.ZERO)
        );
        if(jobList!=null){
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/third/BoardService.java
@@ -48,4 +48,8 @@
    List<WorkEfficiencyVO> workEfficiency(Integer type);
    List<PlatformWorkDataVO> platformWorkData();
    List<SecurityDeviceDataVO> securityDeviceData();
    List<WaningEventDataVO> warningEventData(Integer type);
}
server/visits/dmvisit_service/src/main/resources/application-dev.yml
@@ -1,9 +1,12 @@
spring:
  # æ•°æ®æºé…ç½®
  datasource:
    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: doumee
    password: rtjgfEr@&0c0m
#    url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
#    username: doumee
#    password: rtjgfEr@&0c0m
    url: jdbc:mysql://10.50.250.253:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
    username: root
    password: Atwl@2024
    driver-class-name: com.mysql.cj.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
  redis: