diff --git a/policeSecurityServer/src/main/java/com/changhu/common/pojo/params/MapVisionParams.java b/policeSecurityServer/src/main/java/com/changhu/common/pojo/params/MapVisionParams.java new file mode 100644 index 0000000..4842296 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/common/pojo/params/MapVisionParams.java @@ -0,0 +1,22 @@ +package com.changhu.common.pojo.params; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import org.locationtech.jts.geom.Point; + +/** + * @author 20252 + * @createTime 2024/11/21 上午11:18 + * @desc MapVisionParams... + */ +@Data +public class MapVisionParams { + @Schema(description = "左上角") + private Point upperLeft; + @Schema(description = "右上角") + private Point upperRight; + @Schema(description = "左下角") + private Point lowerLeft; + @Schema(description = "右下角") + private Point lowerRight; +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java index 54ea62d..0159312 100644 --- a/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java +++ b/policeSecurityServer/src/main/java/com/changhu/module/management/controller/EnterprisesUnitController.java @@ -6,7 +6,6 @@ import com.changhu.common.annotation.JsonBody; import com.changhu.common.db.enums.UserType; import com.changhu.common.exception.MessageException; import com.changhu.common.pojo.vo.SelectNodeVo; -import com.changhu.module.management.pojo.entity.EnterprisesUnit; import com.changhu.module.management.pojo.params.EnterprisesUnitSaveOrUpdateParams; import com.changhu.module.management.pojo.queryParams.EnterprisesUnitPagerQueryParams; import com.changhu.module.management.pojo.vo.EnterprisesUnitPagerVo; @@ -64,10 +63,4 @@ public class EnterprisesUnitController { return enterprisesUnitService.queryListByAdministrativeDivisionCodes(administrativeDivisionCodes); } - @Operation(summary = "企事业单位地图点位") - @GetMapping("/mapPoint") - public List mapPoint() { - return enterprisesUnitService.list(); - } - } diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java new file mode 100644 index 0000000..46193f1 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/controller/SuperIndexController.java @@ -0,0 +1,34 @@ +package com.changhu.module.superManagement.controller; + +import com.baomidou.mybatisplus.extension.toolkit.Db; +import com.changhu.common.annotation.JsonBody; +import com.changhu.module.management.pojo.entity.EnterprisesUnit; +import com.changhu.module.superManagement.service.SuperIndexService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +import java.util.List; + +/** + * @author 20252 + * @createTime 2024/11/21 上午11:31 + * @desc SuperIndexController... + */ +@JsonBody +@Tag(name = "超级后台首页") +@RequestMapping("/super/index") +public class SuperIndexController { + + @Autowired + private SuperIndexService superIndexService; + + @Operation(summary = "企事业单位地图点位") + @GetMapping("/mapPoint") + public List mapPoint() { + return Db.lambdaQuery(EnterprisesUnit.class).list(); + } + +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/SuperIndexMapper.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/SuperIndexMapper.java new file mode 100644 index 0000000..02d546e --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/mapper/SuperIndexMapper.java @@ -0,0 +1,12 @@ +package com.changhu.module.superManagement.mapper; + +import org.apache.ibatis.annotations.Mapper; + +/** + * @author 20252 + * @createTime 2024/11/21 上午11:32 + * @desc SuperIndexMapper... + */ +@Mapper +public interface SuperIndexMapper { +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java new file mode 100644 index 0000000..acd631a --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/SuperIndexService.java @@ -0,0 +1,9 @@ +package com.changhu.module.superManagement.service; + +/** + * @author 20252 + * @createTime 2024/11/21 上午11:31 + * @desc SuperIndexService... + */ +public interface SuperIndexService { +} diff --git a/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java new file mode 100644 index 0000000..ba7c7b4 --- /dev/null +++ b/policeSecurityServer/src/main/java/com/changhu/module/superManagement/service/impl/SuperIndexServiceImpl.java @@ -0,0 +1,13 @@ +package com.changhu.module.superManagement.service.impl; + +import com.changhu.module.superManagement.service.SuperIndexService; +import org.springframework.stereotype.Service; + +/** + * @author 20252 + * @createTime 2024/11/21 上午11:31 + * @desc SuperIndexServiceImpl... + */ +@Service +public class SuperIndexServiceImpl implements SuperIndexService { +} diff --git a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java index ad95b65..edea21e 100644 --- a/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java +++ b/policeSecurityServer/src/main/java/com/changhu/pojo/dto/SecurityUnitUseStatisticsDTO.java @@ -20,12 +20,20 @@ public class SecurityUnitUseStatisticsDTO { private Long enterprisesUnitId; @Schema(description = "事业单位名称") private String enterprisesUnitName; + @Schema(description = "省编码") + private String province; @Schema(description = "省") private String provinceName; + @Schema(description = "市编码") + private String city; @Schema(description = "市") private String cityName; + @Schema(description = "区/县编码") + private String districts; @Schema(description = "区/县") private String districtsName; + @Schema(description = "街道编码") + private String street; @Schema(description = "街道") private String streetName; @Schema(description = "事业单位详细地址") diff --git a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java b/policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java index 5b668bd..ec6be4b 100644 --- a/policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java +++ b/policeSecurityServer/src/main/java/com/changhu/support/interceptor/SignInterceptor.java @@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.URLUtil; import cn.hutool.crypto.digest.MD5; import cn.hutool.http.HttpUtil; -import com.alibaba.fastjson2.TypeReference; +import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.extension.toolkit.Db; import com.changhu.common.db.enums.IsEnable; import com.changhu.common.exception.MessageException; @@ -67,7 +67,7 @@ public class SignInterceptor implements HandlerInterceptor { .orElseThrow(() -> new MessageException("无效的accessKey")); if (IsEnable.FALSE.equals(accessKeyEntity.getIsEnable())) { - throw new MessageException("无效的accessKey"); + throw new MessageException("accessKey已禁用"); } if (accessKeyEntity.getEffectiveTime() > 0 && System.currentTimeMillis() - Long.parseLong(timestamp) > accessKeyEntity.getEffectiveTime()) { @@ -80,20 +80,17 @@ public class SignInterceptor implements HandlerInterceptor { } Map hashMap = new HashMap<>(); - //添加请求url参数 - Map map = HttpUtil.decodeParamMap(request.getQueryString(), StandardCharsets.UTF_8); - if (!map.isEmpty()) { - hashMap.putAll(map); - } - hashMap.put(ACCESS_KEY, accessKey); hashMap.put(TIMESTAMP, timestamp); + //添加请求url参数 + Optional.ofNullable(HttpUtil.decodeParamMap(request.getQueryString(), StandardCharsets.UTF_8)) + .ifPresent(hashMap::putAll); //添加body参数 - CustomHttpServletRequestWrapper c = (CustomHttpServletRequestWrapper) request; - Optional.ofNullable(new TypeReference>() { - }.parseObject(c.getBody())).ifPresent(hashMap::putAll); - + Optional.ofNullable(JSON.>parseObject(((CustomHttpServletRequestWrapper) request).getBody(), Map.class)) + .ifPresent(hashMap::putAll); + //生成签名 String nowSign = generatedSign(hashMap, accessKeyEntity.getSecretKey()); + //比对签名 if (!sign.equals(nowSign)) { throw new MessageException("签名错误"); } @@ -118,9 +115,4 @@ public class SignInterceptor implements HandlerInterceptor { return MD5.create().digestHex(str).toUpperCase(); } - public static void main(String[] args) { - String str1 = "Access-Key=w2wzi0wefmmo6s735z2el8tfzitya5gj&addr=%E6%B9%96%E5%8D%97%E7%9C%81%E9%95%BF%E6%B2%99%E5%B8%82&age=14&name=zhangsan&Time-Stamp=1732084303463&Secret-Key=db1b5214-02ee-497f-957c-88323b4351bf"; - String str2 = "Access-Key=w2wzi0wefmmo6s735z2el8tfzitya5gj&addr=%E6%B9%96%E5%8D%97%E7%9C%81%E9%95%BF%E6%B2%99%E5%B8%82&age=14&name=zhangsan&Time-Stamp=1732084303463&Secret-Key=db1b5214-02ee-497f-957c-88323b4351bf"; - } - } diff --git a/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml b/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml index bd2c55f..a15893a 100644 --- a/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/CkAssessmentRecordMapper.xml @@ -14,8 +14,8 @@ from ck_assessment_record car left join enterprises_unit eu on car.enterprises_unit_id = eu.snow_flake_id and eu.delete_flag = 0 left join ck_project cp on car.ck_project_id = cp.snow_flake_id and cp.delete_flag = 0 - left join mini_program_user mpu on mpu.identity = 'police' and car.create_by = mpu.snow_flake_id and mpu.delete_flag = 0 - left join police_unit pu on mpu.unit_id = pu.snow_flake_id and pu.delete_flag = 0 + left join mini_program_user mpu on mpu.identity = 'police' and car.create_by = mpu.snow_flake_id + left join police_unit pu on mpu.unit_id = pu.snow_flake_id left join ck_assessment_record_details card on car.snow_flake_id = card.ck_assessment_record_id and card.delete_flag = 0 left join ck_standard cs on card.ck_standard_id = cs.snow_flake_id where car.delete_flag = 0 diff --git a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml index 5727ae3..4cfb5da 100644 --- a/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml +++ b/policeSecurityServer/src/main/resources/mapper/OpenApiMapper.xml @@ -47,6 +47,10 @@ select eu.snow_flake_id as 'enterprisesUnitId', eu.name as 'enterprisesUnitName', + eu.province, + eu.city, + eu.districts, + eu.street, ad1.name as 'provinceName', ad2.name as 'cityName', ad3.name as 'districtsName', diff --git a/superManagement/src/components/aMap/MapContainer.vue b/superManagement/src/components/aMap/MapContainer.vue index a945b0b..a7a5dd9 100644 --- a/superManagement/src/components/aMap/MapContainer.vue +++ b/superManagement/src/components/aMap/MapContainer.vue @@ -19,7 +19,6 @@ const props = withDefaults(defineProps(), { viewMode: "3D", // 初始化地图级别 zoom: 11, - mapStyle: 'amap://styles/darkblue' } } }) diff --git a/superManagement/src/config/index.ts b/superManagement/src/config/index.ts index 6a32f84..25b5a20 100644 --- a/superManagement/src/config/index.ts +++ b/superManagement/src/config/index.ts @@ -52,13 +52,6 @@ export const SYSTEM_MENUS: SystemMenu[] = [ component: () => import('@/views/unitManage/securityUnit/index.vue') } ] - }, { - title: '数据总览', - name: 'dataOverview', - path: '/dataOverview', - type: 'menu', - isFull: true, - component: () => import('@/views/data/dataOverview.vue') }, { title: '开放平台', name: 'openPlatform', diff --git a/superManagement/src/types/views/data/dataOverview.ts b/superManagement/src/types/views/index.ts similarity index 100% rename from superManagement/src/types/views/data/dataOverview.ts rename to superManagement/src/types/views/index.ts diff --git a/superManagement/src/views/data/components/EnterprisesUnitInfoWindowContent.vue b/superManagement/src/views/components/EnterprisesUnitInfoWindowContent.vue similarity index 94% rename from superManagement/src/views/data/components/EnterprisesUnitInfoWindowContent.vue rename to superManagement/src/views/components/EnterprisesUnitInfoWindowContent.vue index f43361a..92225d6 100644 --- a/superManagement/src/views/data/components/EnterprisesUnitInfoWindowContent.vue +++ b/superManagement/src/views/components/EnterprisesUnitInfoWindowContent.vue @@ -11,7 +11,7 @@ - - diff --git a/superManagement/src/views/index.vue b/superManagement/src/views/index.vue index 9c1e237..db20aa5 100644 --- a/superManagement/src/views/index.vue +++ b/superManagement/src/views/index.vue @@ -1,13 +1,112 @@ diff --git a/superManagement/src/views/openPlatform/index.vue b/superManagement/src/views/openPlatform/index.vue index d9320f0..1dbc3aa 100644 --- a/superManagement/src/views/openPlatform/index.vue +++ b/superManagement/src/views/openPlatform/index.vue @@ -129,8 +129,8 @@ const a = () => { const secretKey = "db1b5214-02ee-497f-957c-88323b4351bf" const now = Date.now() const params = { - code: 'SSP001', - level: 5 + id: "1855852231820054528", + type: 'ENTERPRISES_UNIT' } const sign = generatedSign(params, now, accessKey, secretKey) const headers2 = {