فهرست منبع

一标六实及人员管理接口完善、agbox对接

hanzhengyi 4 روز پیش
والد
کامیت
544115171d
85فایلهای تغییر یافته به همراه2378 افزوده شده و 201 حذف شده
  1. 6 0
      service-sas/service-sas-biz/pom.xml
  2. 4 4
      service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasActivationController.java
  3. 5 5
      service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasNetworkConfigController.java
  4. 3 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasOneStandardSixRealitiesController.java
  5. 5 5
      service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasSystemConfigController.java
  6. 2 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasBuilding.java
  7. 24 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasCredentialTypeCode.java
  8. 39 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasEntrance.java
  9. 42 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasEquip.java
  10. 24 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasEquipCode.java
  11. 2 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasFollowPerson.java
  12. 32 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasGis.java
  13. 2 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasHouse.java
  14. 24 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasPeopleTypeCode.java
  15. 2 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasPerson.java
  16. 24 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasPoliceStation.java
  17. 24 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSysArea.java
  18. 2 3
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystemActivation.java
  19. 2 3
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystemConfig.java
  20. 2 3
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystemWlanConfig.java
  21. 2 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasVillage.java
  22. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasCredentialTypeCodeMapper.java
  23. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasEntranceMapper.java
  24. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasEquipCodeMapper.java
  25. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasEquipMapper.java
  26. 18 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasGisMapper.java
  27. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasPeopleTypeCodeMapper.java
  28. 18 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasPoliceStationMapper.java
  29. 18 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSysAreaMapper.java
  30. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystemActivationMapper.java
  31. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystemConfigMapper.java
  32. 10 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystemWlanConfigMapper.java
  33. 0 11
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystesasActivationMapper.java
  34. 0 11
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystesasConfigMapper.java
  35. 0 11
      service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystesasWlanConfigMapper.java
  36. 2 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasOneStandardSixRealitiesService.java
  37. 4 5
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystemActivationService.java
  38. 4 5
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystemConfigService.java
  39. 20 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystemWlanConfigService.java
  40. 0 21
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystesasWlanConfigService.java
  41. 46 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/BuildingVO.java
  42. 51 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/EntranceVo.java
  43. 52 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/EquipVo.java
  44. 75 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/HouseVo.java
  45. 30 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/JsonRpcRequest.java
  46. 49 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/PersonBlackListVO.java
  47. 62 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/PersonVo.java
  48. 51 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/PowerVo.java
  49. 59 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/VillageInfoVO.java
  50. 41 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/VillageListVO.java
  51. 1 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasAlarsasGroupTypeServiceImpl.java
  52. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasDeviceServiceImpl.java
  53. 1 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasEventTypeGroupServiceImpl.java
  54. 5 4
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasHomepageServiceImpl.java
  55. 5 5
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasIntelligentServiceImpl.java
  56. 1 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasMapServiceImpl.java
  57. 886 24
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasOneStandardSixRealitiesServiceImpl.java
  58. 309 8
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasPersonnelServiceImpl.java
  59. 9 10
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemActivationServiceImpl.java
  60. 9 10
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemConfigServiceImpl.java
  61. 1 1
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemServiceImpl.java
  62. 9 10
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemWlanConfigServiceImpl.java
  63. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/AlarmGroupPageRequest.java
  64. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/BackupListPageRequest.java
  65. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/DeviceConfigPageRequest.java
  66. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/DeviceHeartbeatRequest.java
  67. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/EventGroupPageRequest.java
  68. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/HomepageAlertHistoryRequest.java
  69. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/IntelligentEventPageRequest.java
  70. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/MapPageRequest.java
  71. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/OneStandardSixRealitiesPageRequest.java
  72. 12 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/PersonnelDetailResponse.java
  73. 2 2
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/PersonnelPageRequest.java
  74. 30 0
      service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/VillageListItem.java
  75. 10 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasCredentialTypeCodeMapper.xml
  76. 16 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasEntranceMapper.xml
  77. 10 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasEquipCodeMapper.xml
  78. 18 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasEquipMapper.xml
  79. 20 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasGisMapper.xml
  80. 10 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasPeopleTypeCodeMapper.xml
  81. 18 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasPoliceStationMapper.xml
  82. 18 0
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSysAreaMapper.xml
  83. 2 3
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystemActivationMapper.xml
  84. 2 3
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystemConfigMapper.xml
  85. 2 3
      service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystemWlanConfigMapper.xml

+ 6 - 0
service-sas/service-sas-biz/pom.xml

@@ -55,6 +55,12 @@
             <artifactId>ruoyi-common-swagger</artifactId>
         </dependency>
 
+        <!-- Hutool 用于 AG 接口 HTTP 请求 -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 4 - 4
service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasActivationController.java

@@ -1,8 +1,8 @@
 package com.usky.sas.controller.web;
 
 import com.usky.common.core.bean.ApiResult;
-import com.usky.sas.domain.SasSystesasActivation;
-import com.usky.sas.service.SasSystesasActivationService;
+import com.usky.sas.domain.SasSystemActivation;
+import com.usky.sas.service.SasSystemActivationService;
 import lombok.Data;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -20,11 +20,11 @@ import org.springframework.web.bind.annotation.RestController;
 public class SasActivationController {
 
     @Autowired
-    private SasSystesasActivationService activationService;
+    private SasSystemActivationService activationService;
 
     @PostMapping("/activate")
     public ApiResult<ActivationResponse> activate(@RequestBody ActivationRequest request) {
-        SasSystesasActivation activation = activationService.activate(request.getLicenseKey());
+        SasSystemActivation activation = activationService.activate(request.getLicenseKey());
         ActivationResponse resp = new ActivationResponse();
         resp.setIsPerpetual(Boolean.TRUE.equals(activation.getIsPerpetual()));
         resp.setValidityTime(activation.getValidityTime());

+ 5 - 5
service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasNetworkConfigController.java

@@ -1,8 +1,8 @@
 package com.usky.sas.controller.web;
 
 import com.usky.common.core.bean.ApiResult;
-import com.usky.sas.domain.SasSystesasWlanConfig;
-import com.usky.sas.service.SasSystesasWlanConfigService;
+import com.usky.sas.domain.SasSystemWlanConfig;
+import com.usky.sas.service.SasSystemWlanConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PutMapping;
@@ -22,13 +22,13 @@ import org.springframework.web.bind.annotation.RestController;
 public class SasNetworkConfigController {
 
     @Autowired
-    private SasSystesasWlanConfigService wlanConfigService;
+    private SasSystemWlanConfigService wlanConfigService;
 
     /**
      * 查询网络配置
      */
     @GetMapping("/config")
-    public ApiResult<SasSystesasWlanConfig> getConfig() {
+    public ApiResult<SasSystemWlanConfig> getConfig() {
         return ApiResult.success(wlanConfigService.getConfig());
     }
 
@@ -36,7 +36,7 @@ public class SasNetworkConfigController {
      * 编辑网络配置
      */
     @PutMapping("/config")
-    public ApiResult<Void> updateConfig(@RequestBody SasSystesasWlanConfig config) {
+    public ApiResult<Void> updateConfig(@RequestBody SasSystemWlanConfig config) {
         wlanConfigService.updateConfig(config);
         return ApiResult.success();
     }

+ 3 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasOneStandardSixRealitiesController.java

@@ -94,10 +94,11 @@ public class SasOneStandardSixRealitiesController {
 
     /**
      * 5.2 同步房屋信息
+     * @param buildingCode 区域编码(楼栋编码),可选,传入时仅同步该楼栋下的房屋
      */
     @PostMapping("/houseSync")
-    public ApiResult<Integer> houseSync() {
-        return ApiResult.success(sasOneStandardSixRealitiesService.syncHouse());
+    public ApiResult<Integer> houseSync(@RequestParam(required = false) String buildingCode) {
+        return ApiResult.success(sasOneStandardSixRealitiesService.syncHouse(buildingCode));
     }
 
     /**

+ 5 - 5
service-sas/service-sas-biz/src/main/java/com/usky/sas/controller/web/SasSystemConfigController.java

@@ -1,8 +1,8 @@
 package com.usky.sas.controller.web;
 
 import com.usky.common.core.bean.ApiResult;
-import com.usky.sas.domain.SasSystesasConfig;
-import com.usky.sas.service.SasSystesasConfigService;
+import com.usky.sas.domain.SasSystemConfig;
+import com.usky.sas.service.SasSystemConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PutMapping;
@@ -22,13 +22,13 @@ import org.springframework.web.bind.annotation.RestController;
 public class SasSystemConfigController {
 
     @Autowired
-    private SasSystesasConfigService systesasConfigService;
+    private SasSystemConfigService systesasConfigService;
 
     /**
      * 查询系统配置
      */
     @GetMapping("/config")
-    public ApiResult<SasSystesasConfig> getConfig() {
+    public ApiResult<SasSystemConfig> getConfig() {
         return ApiResult.success(systesasConfigService.getConfig());
     }
 
@@ -36,7 +36,7 @@ public class SasSystemConfigController {
      * 编辑系统配置
      */
     @PutMapping("/config")
-    public ApiResult<Void> updateConfig(@RequestBody SasSystesasConfig config) {
+    public ApiResult<Void> updateConfig(@RequestBody SasSystemConfig config) {
         systesasConfigService.updateConfig(config);
         return ApiResult.success();
     }

+ 2 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasBuilding.java

@@ -1,5 +1,6 @@
 package com.usky.sas.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -18,7 +19,7 @@ public class SasBuilding implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId(value = "building_code")
+    @TableId(value = "building_code", type = IdType.INPUT)
     private String buildingCode;
 
     private String buildingNo;

+ 24 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasCredentialTypeCode.java

@@ -0,0 +1,24 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 证件类型表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_credential_type_code")
+public class SasCredentialTypeCode implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "code")
+    private Integer code;
+
+    private String name;
+}

+ 39 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasEntrance.java

@@ -0,0 +1,39 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 出入口信息表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_entrance")
+public class SasEntrance implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "entrance_code", type = IdType.INPUT)
+    private String entranceCode;
+
+    private String name;
+
+    private String villageCode;
+
+    private String address;
+
+    /** 设备id列表,逗号分隔 */
+    private String deviceIds;
+
+    private String picId;
+
+    private LocalDateTime createTime;
+
+    private LocalDateTime updateTime;
+}

+ 42 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasEquip.java

@@ -0,0 +1,42 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 实有装备信息表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_equip")
+public class SasEquip implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "code", type = IdType.INPUT)
+    private String code;
+
+    private String villageCode;
+
+    private String urlId;
+
+    private String gisId;
+
+    private LocalDateTime createTime;
+
+    private LocalDateTime updateTime;
+
+    private String equipName;
+
+    private Integer equipType;
+
+    private String remark;
+
+    private Integer floor;
+}

+ 24 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasEquipCode.java

@@ -0,0 +1,24 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 实有装备分类编码表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_equip_code")
+public class SasEquipCode implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "code")
+    private Integer code;
+
+    private String name;
+}

+ 2 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasFollowPerson.java

@@ -1,5 +1,6 @@
 package com.usky.sas.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -18,7 +19,7 @@ public class SasFollowPerson implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId(value = "person_code")
+    @TableId(value = "person_code", type = IdType.INPUT)
     private String personCode;
 
     private Integer followPeopleType;

+ 32 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasGis.java

@@ -0,0 +1,32 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 经纬度信息表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_gis")
+public class SasGis implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id")
+    private String id;
+
+    /** 经度 */
+    private BigDecimal lon;
+
+    /** 纬度 */
+    private BigDecimal lat;
+
+    /** 高度 */
+    private BigDecimal alt;
+}

+ 2 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasHouse.java

@@ -1,5 +1,6 @@
 package com.usky.sas.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -18,7 +19,7 @@ public class SasHouse implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId(value = "house_code")
+    @TableId(value = "house_code", type = IdType.INPUT)
     private String houseCode;
 
     private Integer floor;

+ 24 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasPeopleTypeCode.java

@@ -0,0 +1,24 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 人员类型编码表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_people_type_code")
+public class SasPeopleTypeCode implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "code")
+    private String code;
+
+    private String name;
+}

+ 2 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasPerson.java

@@ -1,5 +1,6 @@
 package com.usky.sas.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -18,7 +19,7 @@ public class SasPerson implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId(value = "person_code")
+    @TableId(value = "person_code", type = IdType.INPUT)
     private String personCode;
 
     private String cardNumber;

+ 24 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasPoliceStation.java

@@ -0,0 +1,24 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 派出所信息表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_police_station")
+public class SasPoliceStation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "code")
+    private String code;
+
+    private String name;
+}

+ 24 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSysArea.java

@@ -0,0 +1,24 @@
+package com.usky.sas.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+
+/**
+ * 行政编码表
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("sas_sys_area")
+public class SasSysArea implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "code")
+    private String code;
+
+    private String name;
+}

+ 2 - 3
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystesasActivation.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystemActivation.java

@@ -14,8 +14,8 @@ import java.time.LocalDateTime;
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
-@TableName("sas_systesas_activation")
-public class SasSystesasActivation implements Serializable {
+@TableName("sas_system_activation")
+public class SasSystemActivation implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -70,4 +70,3 @@ public class SasSystesasActivation implements Serializable {
      */
     private LocalDateTime updateTime;
 }
-

+ 2 - 3
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystesasConfig.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystemConfig.java

@@ -14,8 +14,8 @@ import java.time.LocalDateTime;
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
-@TableName("sas_systesas_config")
-public class SasSystesasConfig implements Serializable {
+@TableName("sas_system_config")
+public class SasSystemConfig implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -67,4 +67,3 @@ public class SasSystesasConfig implements Serializable {
      */
     private LocalDateTime updateTime;
 }
-

+ 2 - 3
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystesasWlanConfig.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasSystemWlanConfig.java

@@ -14,8 +14,8 @@ import java.time.LocalDateTime;
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
-@TableName("sas_systesas_wlan_config")
-public class SasSystesasWlanConfig implements Serializable {
+@TableName("sas_system_wlan_config")
+public class SasSystemWlanConfig implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
@@ -62,4 +62,3 @@ public class SasSystesasWlanConfig implements Serializable {
      */
     private LocalDateTime updateTime;
 }
-

+ 2 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/domain/SasVillage.java

@@ -1,5 +1,6 @@
 package com.usky.sas.domain;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
@@ -18,7 +19,7 @@ public class SasVillage implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId(value = "village_code")
+    @TableId(value = "village_code", type = IdType.INPUT)
     private String villageCode;
 
     private String villageName;

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasCredentialTypeCodeMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasCredentialTypeCode;
+
+/**
+ * 证件类型 Mapper 接口
+ */
+public interface SasCredentialTypeCodeMapper extends CrudMapper<SasCredentialTypeCode> {
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasEntranceMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasEntrance;
+
+/**
+ * 出入口信息 Mapper 接口
+ */
+public interface SasEntranceMapper extends CrudMapper<SasEntrance> {
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasEquipCodeMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasEquipCode;
+
+/**
+ * 实有装备分类编码 Mapper 接口
+ */
+public interface SasEquipCodeMapper extends CrudMapper<SasEquipCode> {
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasEquipMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasEquip;
+
+/**
+ * 实有装备信息 Mapper 接口
+ */
+public interface SasEquipMapper extends CrudMapper<SasEquip> {
+}

+ 18 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasGisMapper.java

@@ -0,0 +1,18 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasGis;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 经纬度信息 Mapper 接口
+ */
+public interface SasGisMapper extends CrudMapper<SasGis> {
+
+    /**
+     * 根据 id 列表批量查询
+     */
+    List<SasGis> selectByIds(@Param("ids") List<String> ids);
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasPeopleTypeCodeMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasPeopleTypeCode;
+
+/**
+ * 人员类型编码 Mapper 接口
+ */
+public interface SasPeopleTypeCodeMapper extends CrudMapper<SasPeopleTypeCode> {
+}

+ 18 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasPoliceStationMapper.java

@@ -0,0 +1,18 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasPoliceStation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 派出所信息 Mapper 接口
+ */
+public interface SasPoliceStationMapper extends CrudMapper<SasPoliceStation> {
+
+    /**
+     * 根据编码列表批量查询
+     */
+    List<SasPoliceStation> selectByCodes(@Param("codes") List<String> codes);
+}

+ 18 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSysAreaMapper.java

@@ -0,0 +1,18 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasSysArea;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 行政编码 Mapper 接口
+ */
+public interface SasSysAreaMapper extends CrudMapper<SasSysArea> {
+
+    /**
+     * 根据编码列表批量查询
+     */
+    List<SasSysArea> selectByCodes(@Param("codes") List<String> codes);
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystemActivationMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasSystemActivation;
+
+/**
+ * 系统激活信息 Mapper 接口
+ */
+public interface SasSystemActivationMapper extends CrudMapper<SasSystemActivation> {
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystemConfigMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasSystemConfig;
+
+/**
+ * 系统配置 Mapper 接口
+ */
+public interface SasSystemConfigMapper extends CrudMapper<SasSystemConfig> {
+}

+ 10 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystemWlanConfigMapper.java

@@ -0,0 +1,10 @@
+package com.usky.sas.mapper;
+
+import com.usky.common.mybatis.core.CrudMapper;
+import com.usky.sas.domain.SasSystemWlanConfig;
+
+/**
+ * 网络配置 Mapper 接口
+ */
+public interface SasSystemWlanConfigMapper extends CrudMapper<SasSystemWlanConfig> {
+}

+ 0 - 11
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystesasActivationMapper.java

@@ -1,11 +0,0 @@
-package com.usky.sas.mapper;
-
-import com.usky.common.mybatis.core.CrudMapper;
-import com.usky.sas.domain.SasSystesasActivation;
-
-/**
- * 系统激活信息 Mapper 接口
- */
-public interface SasSystesasActivationMapper extends CrudMapper<SasSystesasActivation> {
-}
-

+ 0 - 11
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystesasConfigMapper.java

@@ -1,11 +0,0 @@
-package com.usky.sas.mapper;
-
-import com.usky.common.mybatis.core.CrudMapper;
-import com.usky.sas.domain.SasSystesasConfig;
-
-/**
- * 系统配置 Mapper 接口
- */
-public interface SasSystesasConfigMapper extends CrudMapper<SasSystesasConfig> {
-}
-

+ 0 - 11
service-sas/service-sas-biz/src/main/java/com/usky/sas/mapper/SasSystesasWlanConfigMapper.java

@@ -1,11 +0,0 @@
-package com.usky.sas.mapper;
-
-import com.usky.common.mybatis.core.CrudMapper;
-import com.usky.sas.domain.SasSystesasWlanConfig;
-
-/**
- * 网络配置 Mapper 接口
- */
-public interface SasSystesasWlanConfigMapper extends CrudMapper<SasSystesasWlanConfig> {
-}
-

+ 2 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasOneStandardSixRealitiesService.java

@@ -55,8 +55,9 @@ public interface SasOneStandardSixRealitiesService {
 
     /**
      * 5.2 同步房屋信息
+     * @param buildingCode 区域编码(楼栋编码),可选,传入时请求 AG 仅返回该楼栋下的房屋
      */
-    int syncHouse();
+    int syncHouse(String buildingCode);
 
     /**
      * 6.1 地块信息分页查询

+ 4 - 5
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystesasActivationService.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystemActivationService.java

@@ -1,12 +1,12 @@
 package com.usky.sas.service;
 
 import com.usky.common.mybatis.core.CrudService;
-import com.usky.sas.domain.SasSystesasActivation;
+import com.usky.sas.domain.SasSystemActivation;
 
 /**
  * 系统激活 服务接口
  */
-public interface SasSystesasActivationService extends CrudService<SasSystesasActivation> {
+public interface SasSystemActivationService extends CrudService<SasSystemActivation> {
 
     /**
      * 激活系统
@@ -14,11 +14,10 @@ public interface SasSystesasActivationService extends CrudService<SasSystesasAct
      * @param licenseKey 激活码
      * @return 激活信息
      */
-    SasSystesasActivation activate(String licenseKey);
+    SasSystemActivation activate(String licenseKey);
 
     /**
      * 查询当前激活信息
      */
-    SasSystesasActivation currentActivation();
+    SasSystemActivation currentActivation();
 }
-

+ 4 - 5
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystesasConfigService.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystemConfigService.java

@@ -1,21 +1,20 @@
 package com.usky.sas.service;
 
 import com.usky.common.mybatis.core.CrudService;
-import com.usky.sas.domain.SasSystesasConfig;
+import com.usky.sas.domain.SasSystemConfig;
 
 /**
  * 系统配置 服务接口
  */
-public interface SasSystesasConfigService extends CrudService<SasSystesasConfig> {
+public interface SasSystemConfigService extends CrudService<SasSystemConfig> {
 
     /**
      * 查询系统配置(单条)
      */
-    SasSystesasConfig getConfig();
+    SasSystemConfig getConfig();
 
     /**
      * 更新系统配置
      */
-    void updateConfig(SasSystesasConfig config);
+    void updateConfig(SasSystemConfig config);
 }
-

+ 20 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystemWlanConfigService.java

@@ -0,0 +1,20 @@
+package com.usky.sas.service;
+
+import com.usky.common.mybatis.core.CrudService;
+import com.usky.sas.domain.SasSystemWlanConfig;
+
+/**
+ * 网络配置 服务接口
+ */
+public interface SasSystemWlanConfigService extends CrudService<SasSystemWlanConfig> {
+
+    /**
+     * 查询网络配置(单条)
+     */
+    SasSystemWlanConfig getConfig();
+
+    /**
+     * 更新网络配置
+     */
+    void updateConfig(SasSystemWlanConfig config);
+}

+ 0 - 21
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/SasSystesasWlanConfigService.java

@@ -1,21 +0,0 @@
-package com.usky.sas.service;
-
-import com.usky.common.mybatis.core.CrudService;
-import com.usky.sas.domain.SasSystesasWlanConfig;
-
-/**
- * 网络配置 服务接口
- */
-public interface SasSystesasWlanConfigService extends CrudService<SasSystesasWlanConfig> {
-
-    /**
-     * 查询网络配置(单条)
-     */
-    SasSystesasWlanConfig getConfig();
-
-    /**
-     * 更新网络配置
-     */
-    void updateConfig(SasSystesasWlanConfig config);
-}
-

+ 46 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/BuildingVO.java

@@ -0,0 +1,46 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getBuilding 响应 - 区域信息(楼栋)分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class BuildingVO {
+
+    private BuildingListResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class BuildingListResult {
+        /** 楼栋列表 */
+        private List<BuildingList> buildingList;
+        /** 当前页数量 */
+        private Long count;
+        /** 当前页码 */
+        private Integer page;
+        /** 每页数量 */
+        private Integer pageSize;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class BuildingList {
+        private String buildingCode;
+        private String buildingNo;
+        private Integer floorTotal;
+        private Integer houseTotal;
+        private String note;
+        private String gisId;
+        private String villageCode;
+        private Integer placeType;
+        private String updateTime;
+        private String createTime;
+    }
+}

+ 51 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/EntranceVo.java

@@ -0,0 +1,51 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getEntrance 响应 - 出入口分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class EntranceVo {
+
+    private EntranceResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class EntranceResult {
+        /** 出入口列表 */
+        private List<EntranceList> entranceList;
+        /** 当前页数量 */
+        private Long count;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class EntranceList {
+        /** 出入口编码(主键) */
+        private String entranceCode;
+        private String name;
+        private String villageCode;
+        private String address;
+        /** 设备id列表 */
+        private List<String> deviceIds;
+        private String picId;
+        private String updateTime;
+        private String createTime;
+        /** 出入口图片 */
+        private EntrancePicUrl entrancePicUrl;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class EntrancePicUrl {
+        private String url;
+        private String path;
+    }
+}

+ 52 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/EquipVo.java

@@ -0,0 +1,52 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getEquip 响应 - 实有设施/装备分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class EquipVo {
+
+    private EquipResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class EquipResult {
+        /** 装备列表 */
+        private List<EquipMsg> equipList;
+        /** 当前页数量 */
+        private Long count;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class EquipMsg {
+        /** 装备编码(主键) */
+        private String code;
+        private String equipName;
+        private Integer equipType;
+        private String villageCode;
+        private Integer floor;
+        private String urlId;
+        private String gisId;
+        private String remark;
+        private String updateTime;
+        private String createTime;
+        /** 装备图片 */
+        private EquipPicUrl equipPicUrl;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class EquipPicUrl {
+        private String url;
+        private String path;
+    }
+}

+ 75 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/HouseVo.java

@@ -0,0 +1,75 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.databind.JsonNode;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getHouse 响应 - 房屋信息分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class HouseVo {
+
+    private HouseResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class HouseResult {
+        /** 房屋列表 */
+        private List<HouseList> houseList;
+        /** 当前页数量 */
+        private Long count;
+        /** 当前页码 */
+        private Integer page;
+        /** 每页数量 */
+        private Integer pageSize;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class HouseList {
+        private String houseCode;
+        private Integer floor;
+        private String houseNo;
+        private String houseLabel;
+        private Integer houseLabelCode;
+        private Integer housePurposeCode;
+        private String housePurpose;
+        private String note;
+        private Boolean isPublic;
+        private Boolean isAction;
+        private Integer systesasTypeCode;
+        private String buildingCode;
+        private String gisId;
+        private Integer personNumber;
+        private Integer houseArea;
+        private String villageCode;
+        /** tags 可能为字符串或数组 */
+        private JsonNode tags;
+        private Integer placeTypeId;
+        private String houseName;
+        private String updateTime;
+        private String createTime;
+
+        /** 转为字符串:数组则逗号拼接或 JSON,字符串则原样返回 */
+        public String getTagsAsString() {
+            if (tags == null) return null;
+            if (tags.isTextual()) return tags.asText();
+            if (tags.isArray()) {
+                StringBuilder sb = new StringBuilder();
+                for (int i = 0; i < tags.size(); i++) {
+                    if (i > 0) sb.append(',');
+                    JsonNode e = tags.get(i);
+                    sb.append(e.isTextual() ? e.asText() : e.toString());
+                }
+                return sb.toString();
+            }
+            return tags.toString();
+        }
+    }
+}

+ 30 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/JsonRpcRequest.java

@@ -0,0 +1,30 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+import java.util.Map;
+
+/**
+ * AG 接口 JsonRpc 请求体
+ */
+@Data
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class JsonRpcRequest {
+
+    private static final String JSONRPC = "2.0";
+
+    private String jsonrpc = JSONRPC;
+
+    private String method;
+
+    private Map<String, Object> params;
+
+    private Long id;
+
+    public JsonRpcRequest(String method, Map<String, Object> params, Long id) {
+        this.method = method;
+        this.params = params;
+        this.id = id;
+    }
+}

+ 49 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/PersonBlackListVO.java

@@ -0,0 +1,49 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getBlackList 响应 - 关注人员/黑名单分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class PersonBlackListVO {
+
+    private PersonBlackResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PersonBlackResult {
+        /** 关注人员/黑名单列表 */
+        private List<PersonBlackList> blackList;
+        /** 当前页数量 */
+        private Long count;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PersonBlackList {
+        /** 人员编码(主键) */
+        private String personCode;
+        /** 备注/姓名(AG 可能用 note 表示) */
+        private String note;
+        /** 关注类型/事件编码(对应 sas_follow_person.follow_people_type) */
+        private Integer eventCode;
+        /** 人脸图片 */
+        private PicVo picUrl;
+        private String updateTime;
+        private String createTime;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PicVo {
+        private String url;
+        private String path;
+    }
+}

+ 62 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/PersonVo.java

@@ -0,0 +1,62 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getPerson 响应 - 在册人员分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class PersonVo {
+
+    private PersonResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PersonResult {
+        /** 人员列表 */
+        private List<PersonMsg> person;
+        /** 当前页数量 */
+        private Long count;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PersonMsg {
+        private String personCode;
+        private String name;
+        private Integer credentialType;
+        private String credentialNo;
+        private String phone1;
+        private String phone2;
+        private String phone3;
+        /** 人员类型编码(对应 sas_person.people_type_code) */
+        private Integer personTypeCode;
+        /** 出入类型编码(对应 sas_person.person_entrance_type_code) */
+        private Integer personEntranceTypeCode;
+        private Integer entranceTypeCode;
+        private String picId;
+        /** 人脸图片(AG 可能返回 url/path 结构) */
+        private FacePicUrl facePicUrl;
+        private String updateTime;
+        private String createTime;
+        private String companyCode;
+        private String origin;
+        private String placeOfBirth;
+        private Integer educationCode;
+        private Integer maritalStatusCode;
+        private String nationalityCode;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class FacePicUrl {
+        private String url;
+        private String path;
+    }
+}

+ 51 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/PowerVo.java

@@ -0,0 +1,51 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AG 接口 getPower 响应 - 实有力量分页
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class PowerVo {
+
+    private PowerResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class PowerResult {
+        /** 实有力量列表 */
+        private List<Power> powerList;
+        /** 当前页数量 */
+        private Long count;
+        /** 总页数 */
+        private Integer totalPage;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class Power {
+        private String personCode;
+        private String name;
+        private Integer credentialType;
+        private String credentialNo;
+        /** 电话列表,依次为 phone1、phone2、phone3 */
+        private List<String> phone;
+        /** 实有力量分类编码(对应 sas_person.power_code) */
+        private String powerCode;
+        private String securityCardNo;
+        private Integer securityDutiesCode;
+        private String picId;
+        private String updateTime;
+        private String createTime;
+        private String companyCode;
+        private String origin;
+        private String placeOfBirth;
+        private Integer educationCode;
+        private Integer maritalStatusCode;
+        private String nationalityCode;
+    }
+}

+ 59 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/VillageInfoVO.java

@@ -0,0 +1,59 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.databind.JsonNode;
+import lombok.Data;
+
+/**
+ * AG 接口 getInfo 响应 - 地块详情(含地块和单位信息)
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VillageInfoVO {
+
+    private VillageInfoResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class VillageInfoResult {
+        private VillageResultInfo village;
+        private CompanyResultInfo company;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class VillageResultInfo {
+        private String villageCode;
+        private String villageName;
+        private String address;
+        private Long provinceCode;
+        private Long cityCode;
+        private Long districtCode;
+        private Long streetCode;
+        private String roadCode;
+        private String policeStationCode;
+        /** gis 可能为字符串或 GeoJSON 对象 */
+        private JsonNode gis;
+
+        public String getGisAsString() {
+            if (gis == null) return null;
+            return gis.isTextual() ? gis.asText() : gis.toString();
+        }
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class CompanyResultInfo {
+        private String companyCode;
+        private String companyName;
+        private Long provinceCode;
+        private Long cityCode;
+        private Long districtCode;
+        private Long streetCode;
+        private String roadCode;
+        private String policeStationCode;
+        private String address;
+        /** gis 可能为字符串或 GeoJSON 对象 */
+        private JsonNode gis;
+    }
+}

+ 41 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/dto/agbox/VillageListVO.java

@@ -0,0 +1,41 @@
+package com.usky.sas.service.dto.agbox;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import lombok.Data;
+
+/**
+ * AG 接口 getList 响应 - 地块列表
+ */
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class VillageListVO {
+
+    private VillageListResult result;
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class VillageListResult {
+        private java.util.List<VillageListItem> villageList;
+    }
+
+    @Data
+    @JsonIgnoreProperties(ignoreUnknown = true)
+    public static class VillageListItem {
+        private String villageCode;
+        private String villageName;
+        private String address;
+        private Long provinceCode;
+        private Long cityCode;
+        private Long districtCode;
+        private Long streetCode;
+        private String roadCode;
+        private String policeStationCode;
+        private String companyCode;
+        private String companyName;
+        private String picUrlId;
+        private String gisId;
+        private String gisAreaId;
+        private String areaGis;
+        private Boolean isDefault;
+    }
+}

+ 1 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasAlarsasGroupTypeServiceImpl.java

@@ -27,7 +27,7 @@ public class SasAlarsasGroupTypeServiceImpl extends AbstractCrudService<SasAlars
 
     @Override
     public CommonPage<SasAlarsasGroupType> page(AlarmGroupPageRequest request) {
-        IPage<SasAlarsasGroupType> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasAlarsasGroupType> page = new Page<>(request.getCurrent(), request.getSize());
         page = this.page(page);
         return new CommonPage<>(page.getRecords(), page.getTotal(), page.getCurrent(), page.getSize());
     }

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasDeviceServiceImpl.java

@@ -30,7 +30,7 @@ public class SasDeviceServiceImpl extends AbstractCrudService<SasDeviceMapper, S
 
     @Override
     public CommonPage<DeviceHeartbeatResponse> heartbeatPage(DeviceHeartbeatRequest request) {
-        IPage<SasDevice> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasDevice> page = new Page<>(request.getCurrent(), request.getSize());
         QueryWrapper<SasDevice> wrapper = new QueryWrapper<>();
         if (request.getDeviceId() != null && !request.getDeviceId().isEmpty()) {
             wrapper.lambda().eq(SasDevice::getDeviceId, request.getDeviceId());
@@ -63,7 +63,7 @@ public class SasDeviceServiceImpl extends AbstractCrudService<SasDeviceMapper, S
 
     @Override
     public CommonPage<DeviceConfigVO> configPage(DeviceConfigPageRequest request) {
-        IPage<SasDevice> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasDevice> page = new Page<>(request.getCurrent(), request.getSize());
         QueryWrapper<SasDevice> wrapper = new QueryWrapper<>();
         if (request.getAlarmGroupType() != null && !request.getAlarmGroupType().isEmpty()) {
             wrapper.lambda().eq(SasDevice::getAlarsasGroupType, request.getAlarmGroupType());

+ 1 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasEventTypeGroupServiceImpl.java

@@ -22,7 +22,7 @@ public class SasEventTypeGroupServiceImpl extends AbstractCrudService<SasEventTy
 
     @Override
     public CommonPage<SasEventTypeGroup> page(EventGroupPageRequest request) {
-        IPage<SasEventTypeGroup> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasEventTypeGroup> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasEventTypeGroup> wrapper = new LambdaQueryWrapper<>();
         if (request.getDeviceType() != null) {
             wrapper.eq(SasEventTypeGroup::getDeviceType, request.getDeviceType());

+ 5 - 4
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasHomepageServiceImpl.java

@@ -12,6 +12,7 @@ import com.usky.sas.mapper.SasSnapEventMapper;
 import com.usky.sas.service.SasHomepageService;
 import com.usky.sas.service.SasIntelligentService;
 import com.usky.sas.service.vo.HomepageInfoResponse;
+import com.usky.sas.service.vo.HomepageAlertHistoryRequest;
 import com.usky.sas.service.vo.IntelligentEventItem;
 import com.usky.sas.service.vo.IntelligentEventPageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -128,16 +129,16 @@ public class SasHomepageServiceImpl implements SasHomepageService {
     @Override
     public CommonPage<IntelligentEventItem> getAlertHistory(HomepageAlertHistoryRequest request) {
         if (!"snap".equals(request.getEventType())) {
-            return new CommonPage<>(Collections.emptyList(), 0L, request.getPage().longValue(), request.getPageSize().longValue());
+            return new CommonPage<>(Collections.emptyList(), 0L, request.getCurrent().longValue(), request.getSize().longValue());
         }
         com.baomidou.mybatisplus.extension.plugins.pagination.Page<SasSnapEvent> page =
-                new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(request.getPage(), request.getPageSize());
+                new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasSnapEvent> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(SasSnapEvent::getNotify, true);
         wrapper.orderByDesc(SasSnapEvent::getTriggerTime);
         page = sasSnapEventMapper.selectPage(page, wrapper);
-        List<IntelligentEventItem> list = (page.getRecords() == null ? Collections.emptyList() : page.getRecords())
-                .stream().map(this::snapToEventItem).collect(Collectors.toList());
+        List<SasSnapEvent> records = page.getRecords() == null ? Collections.emptyList() : page.getRecords();
+        List<IntelligentEventItem> list = records.stream().map(this::snapToEventItem).collect(Collectors.toList());
         return new CommonPage<>(list, page.getTotal(), page.getCurrent(), page.getSize());
     }
 

+ 5 - 5
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasIntelligentServiceImpl.java

@@ -62,7 +62,7 @@ public class SasIntelligentServiceImpl implements SasIntelligentService {
 
     @Override
     public CommonPage<IntelligentEventItem> querySnap(IntelligentEventPageRequest request) {
-        IPage<SasSnapEvent> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasSnapEvent> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasSnapEvent> wrapper = buildSnapWrapper(request);
         page = sasSnapEventMapper.selectPage(page, wrapper);
         List<IntelligentEventItem> list = page.getRecords().stream().map(this::fromSnap).collect(Collectors.toList());
@@ -71,7 +71,7 @@ public class SasIntelligentServiceImpl implements SasIntelligentService {
 
     @Override
     public CommonPage<IntelligentEventItem> queryAlarm(IntelligentEventPageRequest request) {
-        IPage<SasAlarsasEvent> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasAlarsasEvent> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasAlarsasEvent> wrapper = buildAlarmWrapper(request);
         page = sasAlarsasEventMapper.selectPage(page, wrapper);
         List<IntelligentEventItem> list = page.getRecords().stream().map(this::fromAlarm).collect(Collectors.toList());
@@ -80,7 +80,7 @@ public class SasIntelligentServiceImpl implements SasIntelligentService {
 
     @Override
     public CommonPage<IntelligentEventItem> queryEntrance(IntelligentEventPageRequest request) {
-        IPage<SasEntranceEvent> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasEntranceEvent> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasEntranceEvent> wrapper = buildEntranceWrapper(request);
         page = sasEntranceEventMapper.selectPage(page, wrapper);
         List<IntelligentEventItem> list = page.getRecords().stream().map(this::fromEntrance).collect(Collectors.toList());
@@ -89,7 +89,7 @@ public class SasIntelligentServiceImpl implements SasIntelligentService {
 
     @Override
     public CommonPage<IntelligentEventItem> queryParking(IntelligentEventPageRequest request) {
-        IPage<SasParkingEvent> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasParkingEvent> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasParkingEvent> wrapper = buildParkingWrapper(request);
         page = sasParkingEventMapper.selectPage(page, wrapper);
         List<IntelligentEventItem> list = page.getRecords().stream().map(this::fromParking).collect(Collectors.toList());
@@ -98,7 +98,7 @@ public class SasIntelligentServiceImpl implements SasIntelligentService {
 
     @Override
     public CommonPage<IntelligentEventItem> queryPatrol(IntelligentEventPageRequest request) {
-        IPage<SasPatrolEvent> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasPatrolEvent> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasPatrolEvent> wrapper = buildPatrolWrapper(request);
         page = sasPatrolEventMapper.selectPage(page, wrapper);
         List<IntelligentEventItem> list = page.getRecords().stream().map(this::fromPatrol).collect(Collectors.toList());

+ 1 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasMapServiceImpl.java

@@ -29,7 +29,7 @@ public class SasMapServiceImpl extends AbstractCrudService<SasMapsMapper, SasMap
 
     @Override
     public CommonPage<SasMaps> page(MapPageRequest request) {
-        IPage<SasMaps> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasMaps> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasMaps> wrapper = new LambdaQueryWrapper<>();
         if (request.getParentId() != null) {
             wrapper.eq(SasMaps::getParentId, request.getParentId());

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 886 - 24
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasOneStandardSixRealitiesServiceImpl.java


+ 309 - 8
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasPersonnelServiceImpl.java

@@ -3,31 +3,69 @@ package com.usky.sas.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.usky.common.core.bean.CommonPage;
 import com.usky.sas.domain.SasFollowPerson;
 import com.usky.sas.domain.SasPerson;
+import com.usky.sas.domain.SasCredentialTypeCode;
+import com.usky.sas.domain.SasPeopleTypeCode;
 import com.usky.sas.mapper.SasFollowPersonMapper;
 import com.usky.sas.mapper.SasPersonMapper;
+import com.usky.sas.mapper.SasCredentialTypeCodeMapper;
+import com.usky.sas.mapper.SasPeopleTypeCodeMapper;
+import com.usky.sas.mapper.SasVillageMapper;
+import com.usky.sas.domain.SasVillage;
 import com.usky.sas.service.SasPersonnelService;
+import com.usky.sas.service.SasConfigService;
+import com.usky.sas.service.dto.agbox.JsonRpcRequest;
+import com.usky.sas.service.dto.agbox.PersonVo;
+import com.usky.sas.service.dto.agbox.PersonBlackListVO;
 import com.usky.sas.service.vo.PersonnelDetailResponse;
 import com.usky.sas.service.vo.PersonnelListItem;
 import com.usky.sas.service.vo.PersonnelPageRequest;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.json.JSONUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Collections;
-import java.util.List;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
 import java.util.stream.Collectors;
 
+@Slf4j
 @Service
 public class SasPersonnelServiceImpl implements SasPersonnelService {
 
+    /** 关注人员/黑名单 AG 路径 */
+    private static final String AGBOX_PERSON_PATH = "/agbox/person";
+    private static final String AGBOX_VILLAGE_PATH = "/agbox/village";
+    /** getBlackList 请求中写死的 eventCode(关注类型) */
+    private static final int FOLLOW_EVENT_CODE = 904;
+    private static final int PERSON_PAGE_SIZE = 100;
+    private static final int HTTP_TIMEOUT_MS = 90000;
+    private static final int MAX_RETRIES = 5;
+    private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+
     @Autowired
     private SasPersonMapper sasPersonMapper;
 
+    @Autowired
+    private SasConfigService sasConfigService;
+
     @Autowired
     private SasFollowPersonMapper sasFollowPersonMapper;
 
+    @Autowired
+    private SasCredentialTypeCodeMapper sasCredentialTypeCodeMapper;
+
+    @Autowired
+    private SasPeopleTypeCodeMapper sasPeopleTypeCodeMapper;
+
+    @Autowired
+    private SasVillageMapper sasVillageMapper;
+
     @Override
     public CommonPage<PersonnelListItem> whitelistPage(PersonnelPageRequest request) {
         // 目前按人员表简单分页,后续可根据白名单标识补充筛选条件
@@ -70,8 +108,169 @@ public class SasPersonnelServiceImpl implements SasPersonnelService {
 
     @Override
     public int syncRegistered() {
-        // 预留与 agbox 同步实现
-        return 0;
+        com.usky.sas.domain.SasConfig config = sasConfigService.getConfig();
+        if (config == null || config.getKeyds() == null || config.getHost() == null) {
+            log.warn("同步在册人员失败:未配置 AG 接口(key/host)");
+            return 0;
+        }
+        String villageCode = getVillageCodeForSync();
+        if (villageCode == null || villageCode.isEmpty()) {
+            log.warn("同步在册人员失败:地块信息表中无可用地块(请先同步地块或设置默认地块)");
+            return 0;
+        }
+        String baseUrl = buildAgboxBaseUrl(config.getHost(), config.getPort());
+        String villageUrl = baseUrl + AGBOX_VILLAGE_PATH;
+        String key = config.getKeyds();
+        ObjectMapper mapper = new ObjectMapper();
+        int totalSynced = 0;
+        int page = 1;
+
+        try {
+            while (true) {
+                Map<String, Object> params = new HashMap<>();
+                params.put("page", page);
+                params.put("pageSize", PERSON_PAGE_SIZE);
+                params.put("villageCode", villageCode);
+                JsonRpcRequest getPersonJson = new JsonRpcRequest("getPerson", params, null);
+                Map<String, Object> requestBody = new HashMap<>();
+                requestBody.put("key", key);
+                requestBody.put("json", JSONUtil.toJsonStr(getPersonJson));
+                log.info("请求AG在册人员,page={}:{}", page, JSONUtil.toJsonStr(getPersonJson));
+
+                String resultStr = postWithRetry(villageUrl, requestBody);
+                log.info("AG在册人员响应 page={}:{}", page, resultStr);
+
+                PersonVo personVo = mapper.readValue(resultStr, PersonVo.class);
+                PersonVo.PersonResult result = personVo != null ? personVo.getResult() : null;
+                List<PersonVo.PersonMsg> personList = (result != null && result.getPerson() != null) ? result.getPerson() : Collections.emptyList();
+
+                if (personList.isEmpty()) {
+                    break;
+                }
+
+                for (PersonVo.PersonMsg msg : personList) {
+                    if (msg.getPersonCode() == null || msg.getPersonCode().isEmpty()) {
+                        continue;
+                    }
+                    try {
+                        SasPerson entity = personMsgToSasPerson(msg);
+                        SasPerson exist = sasPersonMapper.selectById(msg.getPersonCode());
+                        LocalDateTime now = LocalDateTime.now();
+                        if (exist != null) {
+                            entity.setCreateTime(exist.getCreateTime());
+                            entity.setUpdateTime(now);
+                            sasPersonMapper.updateById(entity);
+                        } else {
+                            entity.setCreateTime(now);
+                            entity.setUpdateTime(now);
+                            sasPersonMapper.insert(entity);
+                        }
+                        totalSynced++;
+                    } catch (Exception e) {
+                        log.error("同步在册人员 {} 失败:{}", msg.getPersonCode(), e.getMessage(), e);
+                    }
+                }
+
+                if (personList.size() < PERSON_PAGE_SIZE) {
+                    break;
+                }
+                page++;
+            }
+        } catch (Exception e) {
+            log.error("同步在册人员失败:{}", e.getMessage(), e);
+        }
+        log.info("在册人员同步完成,共同步 {} 条", totalSynced);
+        return totalSynced;
+    }
+
+    private SasPerson personMsgToSasPerson(PersonVo.PersonMsg msg) {
+        SasPerson entity = new SasPerson();
+        entity.setPersonCode(msg.getPersonCode());
+        entity.setName(msg.getName());
+        entity.setCredentialType(msg.getCredentialType());
+        entity.setCredentialNo(msg.getCredentialNo());
+        entity.setPhone1(msg.getPhone1());
+        entity.setPhone2(msg.getPhone2());
+        entity.setPhone3(msg.getPhone3());
+        entity.setPeopleTypeCode(msg.getPersonTypeCode());
+        entity.setPersonEntranceTypeCode(msg.getPersonEntranceTypeCode());
+        entity.setEntranceTypeCode(msg.getEntranceTypeCode());
+        entity.setCompanyCode(msg.getCompanyCode());
+        entity.setOrigin(msg.getOrigin());
+        entity.setPlaceOfBirth(msg.getPlaceOfBirth());
+        entity.setEducationCode(msg.getEducationCode());
+        entity.setMaritalStatusCode(msg.getMaritalStatusCode());
+        entity.setNationalityCode(msg.getNationalityCode());
+        if (msg.getPicId() != null && !msg.getPicId().isEmpty()) {
+            entity.setPicId(msg.getPicId());
+        } else if (msg.getFacePicUrl() != null) {
+            String url = msg.getFacePicUrl().getUrl();
+            String path = msg.getFacePicUrl().getPath();
+            if (url != null && path != null) {
+                entity.setPicId(url + path);
+            }
+        }
+        if (msg.getUpdateTime() != null && !msg.getUpdateTime().isEmpty()) {
+            try {
+                entity.setUpdateTime(LocalDateTime.parse(msg.getUpdateTime(), DATE_TIME_FORMATTER));
+            } catch (Exception ignored) {
+                entity.setUpdateTime(LocalDateTime.now());
+            }
+        }
+        return entity;
+    }
+
+    private String buildAgboxBaseUrl(String host, String port) {
+        if (host == null || host.isEmpty()) {
+            return "";
+        }
+        if (host.startsWith("http://") || host.startsWith("https://")) {
+            return host;
+        }
+        return "http://" + host;
+    }
+
+    /**
+     * 从地块信息表动态获取用于同步的 villageCode:优先取默认地块(is_default=true),若无则取第一条。
+     */
+    private String getVillageCodeForSync() {
+        LambdaQueryWrapper<SasVillage> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(SasVillage::getIsDefault, true).last("limit 1");
+        List<SasVillage> list = sasVillageMapper.selectList(wrapper);
+        if (list != null && !list.isEmpty()) {
+            return list.get(0).getVillageCode();
+        }
+        wrapper = new LambdaQueryWrapper<>();
+        wrapper.last("limit 1");
+        list = sasVillageMapper.selectList(wrapper);
+        return (list != null && !list.isEmpty()) ? list.get(0).getVillageCode() : null;
+    }
+
+    private String postWithRetry(String url, Map<String, Object> requestBody) {
+        Exception lastEx = null;
+        for (int i = 0; i < MAX_RETRIES; i++) {
+            try {
+                return HttpRequest.post(url)
+                        .form(requestBody)
+                        .timeout(HTTP_TIMEOUT_MS)
+                        .execute()
+                        .body();
+            } catch (Exception e) {
+                lastEx = e;
+                if (i < MAX_RETRIES - 1) {
+                    long delayMs = 2000L * (i + 1);
+                    log.warn("AG 接口请求失败,第 {} 次重试({}ms 后):{}", i + 1, delayMs, e.getMessage());
+                    try {
+                        Thread.sleep(delayMs);
+                    } catch (InterruptedException ie) {
+                        Thread.currentThread().interrupt();
+                        throw new RuntimeException("重试被中断", ie);
+                    }
+                }
+            }
+        }
+        String causeMsg = lastEx != null ? lastEx.getMessage() : "";
+        throw new RuntimeException("AG 接口请求失败,重试 " + MAX_RETRIES + " 次后仍失败:" + causeMsg, lastEx);
     }
 
     @Override
@@ -81,7 +280,7 @@ public class SasPersonnelServiceImpl implements SasPersonnelService {
 
     @Override
     public CommonPage<PersonnelListItem> followPage(PersonnelPageRequest request) {
-        IPage<SasFollowPerson> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasFollowPerson> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasFollowPerson> wrapper = new LambdaQueryWrapper<>();
         if (request.getName() != null && !request.getName().isEmpty()) {
             wrapper.like(SasFollowPerson::getName, request.getName());
@@ -98,8 +297,96 @@ public class SasPersonnelServiceImpl implements SasPersonnelService {
 
     @Override
     public int syncFollow() {
-        // 预留与 agbox 同步实现
-        return 0;
+        com.usky.sas.domain.SasConfig config = sasConfigService.getConfig();
+        if (config == null || config.getKeyds() == null || config.getHost() == null) {
+            log.warn("同步关注人员失败:未配置 AG 接口(key/host)");
+            return 0;
+        }
+        String baseUrl = buildAgboxBaseUrl(config.getHost(), config.getPort());
+        String personUrl = baseUrl + AGBOX_PERSON_PATH;
+        String key = config.getKeyds();
+        ObjectMapper mapper = new ObjectMapper();
+        int totalSynced = 0;
+        int page = 1;
+
+        try {
+            while (true) {
+                Map<String, Object> params = new HashMap<>();
+                params.put("page", page);
+                params.put("pageSize", PERSON_PAGE_SIZE);
+                params.put("eventCode", FOLLOW_EVENT_CODE);
+                JsonRpcRequest getBlackListJson = new JsonRpcRequest("getBlackList", params, null);
+                Map<String, Object> requestBody = new HashMap<>();
+                requestBody.put("key", key);
+                requestBody.put("json", JSONUtil.toJsonStr(getBlackListJson));
+                log.info("请求AG关注人员(getBlackList),page={}:{}", page, JSONUtil.toJsonStr(getBlackListJson));
+
+                String resultStr = postWithRetry(personUrl, requestBody);
+                log.info("AG关注人员响应 page={}:{}", page, resultStr);
+
+                PersonBlackListVO vo = mapper.readValue(resultStr, PersonBlackListVO.class);
+                PersonBlackListVO.PersonBlackResult result = vo != null ? vo.getResult() : null;
+                List<PersonBlackListVO.PersonBlackList> blackList = (result != null && result.getBlackList() != null) ? result.getBlackList() : Collections.emptyList();
+
+                if (blackList.isEmpty()) {
+                    break;
+                }
+
+                int indexInPage = 0;
+                for (PersonBlackListVO.PersonBlackList item : blackList) {
+                    String personCode = item.getPersonCode();
+                    if (personCode == null || personCode.isEmpty()) {
+                        personCode = "follow_" + FOLLOW_EVENT_CODE + "_" + page + "_" + indexInPage;
+                    }
+                    indexInPage++;
+                    try {
+                        SasFollowPerson entity = blackListItemToFollowPerson(personCode, item);
+                        SasFollowPerson exist = sasFollowPersonMapper.selectById(entity.getPersonCode());
+                        LocalDateTime now = LocalDateTime.now();
+                        if (exist != null) {
+                            entity.setCreateTime(exist.getCreateTime());
+                            entity.setUpdateTime(now);
+                            sasFollowPersonMapper.updateById(entity);
+                        } else {
+                            entity.setCreateTime(now);
+                            entity.setUpdateTime(now);
+                            sasFollowPersonMapper.insert(entity);
+                        }
+                        totalSynced++;
+                    } catch (Exception e) {
+                        log.error("同步关注人员 {} 失败:{}", personCode, e.getMessage(), e);
+                    }
+                }
+
+                if (blackList.size() < PERSON_PAGE_SIZE) {
+                    break;
+                }
+                page++;
+            }
+        } catch (Exception e) {
+            log.error("同步关注人员失败:{}", e.getMessage(), e);
+        }
+        log.info("关注人员同步完成,共同步 {} 条", totalSynced);
+        return totalSynced;
+    }
+
+    private SasFollowPerson blackListItemToFollowPerson(String personCode, PersonBlackListVO.PersonBlackList item) {
+        SasFollowPerson entity = new SasFollowPerson();
+        entity.setPersonCode(personCode);
+        entity.setName(item.getNote() != null ? item.getNote() : item.getPersonCode());
+        entity.setFollowPeopleType(item.getEventCode());
+        if (item.getPicUrl() != null) {
+            String url = item.getPicUrl().getUrl();
+            String path = item.getPicUrl().getPath();
+            if (url != null && path != null) {
+                entity.setPicId(url + path);
+            } else if (path != null) {
+                entity.setPicId(path);
+            } else if (url != null) {
+                entity.setPicId(url);
+            }
+        }
+        return entity;
     }
 
     @Override
@@ -117,7 +404,7 @@ public class SasPersonnelServiceImpl implements SasPersonnelService {
     }
 
     private CommonPage<PersonnelListItem> buildPersonPage(PersonnelPageRequest request) {
-        IPage<SasPerson> page = new Page<>(request.getPage(), request.getPageSize());
+        IPage<SasPerson> page = new Page<>(request.getCurrent(), request.getSize());
         LambdaQueryWrapper<SasPerson> wrapper = new LambdaQueryWrapper<>();
         if (request.getName() != null && !request.getName().isEmpty()) {
             wrapper.like(SasPerson::getName, request.getName());
@@ -147,10 +434,24 @@ public class SasPersonnelServiceImpl implements SasPersonnelService {
         detail.setName(person.getName());
         detail.setCredentialType(person.getCredentialType());
         detail.setCredentialNo(person.getCredentialNo());
+        // 证件类型名称:从 sas_credential_type_code 查询
+        if (person.getCredentialType() != null) {
+            SasCredentialTypeCode ct = sasCredentialTypeCodeMapper.selectById(person.getCredentialType());
+            detail.setCredentialTypeName(ct != null ? ct.getName() : null);
+        }
         detail.setPicId(person.getPicId());
         detail.setPhone1(person.getPhone1());
         detail.setPhone2(person.getPhone2());
+        detail.setPhone3(person.getPhone3());
+        detail.setRemark(null); // sas_person 表无备注字段,可后续扩展
         detail.setPeopleTypeCode(person.getPeopleTypeCode());
+        // 人员类型名称:从 sas_people_type_code 查询(code 为字符串)
+        if (person.getPeopleTypeCode() != null) {
+            SasPeopleTypeCode pt = sasPeopleTypeCodeMapper.selectById(String.valueOf(person.getPeopleTypeCode()));
+            detail.setPeopleTypeName(pt != null ? pt.getName() : null);
+        }
+        detail.setEntranceTypeCode(person.getEntranceTypeCode());
+        detail.setEntranceTypeName(null); // 暂无出入类型编码表,可后续扩展
         detail.setEducationCode(person.getEducationCode());
         detail.setMaritalStatusCode(person.getMaritalStatusCode());
         detail.setNationalityCode(person.getNationalityCode());

+ 9 - 10
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystesasActivationServiceImpl.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemActivationServiceImpl.java

@@ -1,9 +1,9 @@
 package com.usky.sas.service.impl;
 
 import com.usky.common.mybatis.core.AbstractCrudService;
-import com.usky.sas.domain.SasSystesasActivation;
-import com.usky.sas.mapper.SasSystesasActivationMapper;
-import com.usky.sas.service.SasSystesasActivationService;
+import com.usky.sas.domain.SasSystemActivation;
+import com.usky.sas.mapper.SasSystemActivationMapper;
+import com.usky.sas.service.SasSystemActivationService;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
@@ -12,17 +12,17 @@ import java.time.LocalDateTime;
  * 系统激活 服务实现
  */
 @Service
-public class SasSystesasActivationServiceImpl extends AbstractCrudService<SasSystesasActivationMapper, SasSystesasActivation>
-        implements SasSystesasActivationService {
+public class SasSystemActivationServiceImpl extends AbstractCrudService<SasSystemActivationMapper, SasSystemActivation>
+        implements SasSystemActivationService {
 
     private static final Integer DEFAULT_ID = 1;
 
     @Override
-    public SasSystesasActivation activate(String licenseKey) {
-        SasSystesasActivation activation = this.getById(DEFAULT_ID);
+    public SasSystemActivation activate(String licenseKey) {
+        SasSystemActivation activation = this.getById(DEFAULT_ID);
         LocalDateTime now = LocalDateTime.now();
         if (activation == null) {
-            activation = new SasSystesasActivation();
+            activation = new SasSystemActivation();
             activation.setId(DEFAULT_ID);
             activation.setCreateTime(now);
         }
@@ -44,8 +44,7 @@ public class SasSystesasActivationServiceImpl extends AbstractCrudService<SasSys
     }
 
     @Override
-    public SasSystesasActivation currentActivation() {
+    public SasSystemActivation currentActivation() {
         return this.getById(DEFAULT_ID);
     }
 }
-

+ 9 - 10
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystesasConfigServiceImpl.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemConfigServiceImpl.java

@@ -2,9 +2,9 @@ package com.usky.sas.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.usky.common.mybatis.core.AbstractCrudService;
-import com.usky.sas.domain.SasSystesasConfig;
-import com.usky.sas.mapper.SasSystesasConfigMapper;
-import com.usky.sas.service.SasSystesasConfigService;
+import com.usky.sas.domain.SasSystemConfig;
+import com.usky.sas.mapper.SasSystemConfigMapper;
+import com.usky.sas.service.SasSystemConfigService;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
@@ -13,20 +13,20 @@ import java.time.LocalDateTime;
  * 系统配置 服务实现
  */
 @Service
-public class SasSystesasConfigServiceImpl extends AbstractCrudService<SasSystesasConfigMapper, SasSystesasConfig>
-        implements SasSystesasConfigService {
+public class SasSystemConfigServiceImpl extends AbstractCrudService<SasSystemConfigMapper, SasSystemConfig>
+        implements SasSystemConfigService {
 
     @Override
-    public SasSystesasConfig getConfig() {
-        LambdaQueryWrapper<SasSystesasConfig> wrapper = new LambdaQueryWrapper<>();
+    public SasSystemConfig getConfig() {
+        LambdaQueryWrapper<SasSystemConfig> wrapper = new LambdaQueryWrapper<>();
         wrapper.last("limit 1");
         return this.getOne(wrapper, false);
     }
 
     @Override
-    public void updateConfig(SasSystesasConfig config) {
+    public void updateConfig(SasSystemConfig config) {
         LocalDateTime now = LocalDateTime.now();
-        SasSystesasConfig exist = null;
+        SasSystemConfig exist = null;
         if (config.getId() != null) {
             exist = this.getById(config.getId());
         } else {
@@ -44,4 +44,3 @@ public class SasSystesasConfigServiceImpl extends AbstractCrudService<SasSystesa
         }
     }
 }
-

+ 1 - 1
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemServiceImpl.java

@@ -109,7 +109,7 @@ public class SasSystemServiceImpl implements SasSystemService {
     public CommonPage<BackupFileItem> backupList(BackupListPageRequest request) {
         // 占位实现:返回空列表
         List<BackupFileItem> list = Collections.emptyList();
-        return new CommonPage<>(list, 0L, request.getPage().longValue(), request.getPageSize().longValue());
+        return new CommonPage<>(list, 0L, request.getCurrent().longValue(), request.getSize().longValue());
     }
 
     @Override

+ 9 - 10
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystesasWlanConfigServiceImpl.java → service-sas/service-sas-biz/src/main/java/com/usky/sas/service/impl/SasSystemWlanConfigServiceImpl.java

@@ -2,9 +2,9 @@ package com.usky.sas.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.usky.common.mybatis.core.AbstractCrudService;
-import com.usky.sas.domain.SasSystesasWlanConfig;
-import com.usky.sas.mapper.SasSystesasWlanConfigMapper;
-import com.usky.sas.service.SasSystesasWlanConfigService;
+import com.usky.sas.domain.SasSystemWlanConfig;
+import com.usky.sas.mapper.SasSystemWlanConfigMapper;
+import com.usky.sas.service.SasSystemWlanConfigService;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDateTime;
@@ -13,20 +13,20 @@ import java.time.LocalDateTime;
  * 网络配置 服务实现
  */
 @Service
-public class SasSystesasWlanConfigServiceImpl extends AbstractCrudService<SasSystesasWlanConfigMapper, SasSystesasWlanConfig>
-        implements SasSystesasWlanConfigService {
+public class SasSystemWlanConfigServiceImpl extends AbstractCrudService<SasSystemWlanConfigMapper, SasSystemWlanConfig>
+        implements SasSystemWlanConfigService {
 
     @Override
-    public SasSystesasWlanConfig getConfig() {
-        LambdaQueryWrapper<SasSystesasWlanConfig> wrapper = new LambdaQueryWrapper<>();
+    public SasSystemWlanConfig getConfig() {
+        LambdaQueryWrapper<SasSystemWlanConfig> wrapper = new LambdaQueryWrapper<>();
         wrapper.last("limit 1");
         return this.getOne(wrapper, false);
     }
 
     @Override
-    public void updateConfig(SasSystesasWlanConfig config) {
+    public void updateConfig(SasSystemWlanConfig config) {
         LocalDateTime now = LocalDateTime.now();
-        SasSystesasWlanConfig exist = null;
+        SasSystemWlanConfig exist = null;
         if (config.getId() != null) {
             exist = this.getById(config.getId());
         } else {
@@ -44,4 +44,3 @@ public class SasSystesasWlanConfigServiceImpl extends AbstractCrudService<SasSys
         }
     }
 }
-

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/AlarmGroupPageRequest.java

@@ -5,8 +5,8 @@ import lombok.Data;
 @Data
 public class AlarmGroupPageRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 }
 

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/BackupListPageRequest.java

@@ -8,8 +8,8 @@ import lombok.Data;
 @Data
 public class BackupListPageRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 }
 

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/DeviceConfigPageRequest.java

@@ -5,9 +5,9 @@ import lombok.Data;
 @Data
 public class DeviceConfigPageRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     private String alarmGroupType;
 

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/DeviceHeartbeatRequest.java

@@ -5,9 +5,9 @@ import lombok.Data;
 @Data
 public class DeviceHeartbeatRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     private String deviceId;
 

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/EventGroupPageRequest.java

@@ -5,9 +5,9 @@ import lombok.Data;
 @Data
 public class EventGroupPageRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     /**
      * 设备事件类型

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/HomepageAlertHistoryRequest.java

@@ -8,9 +8,9 @@ import lombok.Data;
 @Data
 public class HomepageAlertHistoryRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     /**
      * 事件类型(当前仅 snap 支持开启通知的预警)

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/IntelligentEventPageRequest.java

@@ -9,9 +9,9 @@ public class IntelligentEventPageRequest {
 
     private String eventType;
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     private LocalDateTime startTime;
 

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/MapPageRequest.java

@@ -5,9 +5,9 @@ import lombok.Data;
 @Data
 public class MapPageRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     private String parentId;
 }

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/OneStandardSixRealitiesPageRequest.java

@@ -8,9 +8,9 @@ import lombok.Data;
 @Data
 public class OneStandardSixRealitiesPageRequest {
 
-    private Integer page = 1;
+    private Integer current = 1;
 
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     /**
      * 地块编码(部分接口使用)

+ 12 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/PersonnelDetailResponse.java

@@ -18,6 +18,9 @@ public class PersonnelDetailResponse {
 
     private String credentialNo;
 
+    /** 证件类型名称(如:身份证) */
+    private String credentialTypeName;
+
     private String picId;
 
     private String picUrl;
@@ -26,12 +29,21 @@ public class PersonnelDetailResponse {
 
     private String phone2;
 
+    /** 电话3 */
+    private String phone3;
+
     private String remark;
 
     private Integer peopleTypeCode;
 
     private String peopleTypeName;
 
+    /** 出入类型编码 */
+    private Integer entranceTypeCode;
+
+    /** 出入类型名称 */
+    private String entranceTypeName;
+
     private Integer educationCode;
 
     private Integer maritalStatusCode;

+ 2 - 2
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/PersonnelPageRequest.java

@@ -11,12 +11,12 @@ public class PersonnelPageRequest {
     /**
      * 页码
      */
-    private Integer page = 1;
+    private Integer current = 1;
 
     /**
      * 每页数量
      */
-    private Integer pageSize = 10;
+    private Integer size = 10;
 
     /**
      * 姓名(模糊查询)

+ 30 - 0
service-sas/service-sas-biz/src/main/java/com/usky/sas/service/vo/VillageListItem.java

@@ -26,6 +26,36 @@ public class VillageListItem {
 
     private String policeStationCode;
 
+    /** 省名称 */
+    private String provinceName;
+
+    /** 市名称 */
+    private String cityName;
+
+    /** 区县名称 */
+    private String districtName;
+
+    /** 街道名称 */
+    private String streetName;
+
+    /** 派出所名称 */
+    private String policeStationName;
+
+    /** 道路编码 */
+    private String roadCode;
+
+    /** 道路名称 */
+    private String roadName;
+
+    /** 纬度 */
+    private Double latitude;
+
+    /** 经度 */
+    private Double longitude;
+
+    /** 高度 */
+    private Double altitude;
+
     private String companyCode;
 
     private String companyName;

+ 10 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasCredentialTypeCodeMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasCredentialTypeCodeMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasCredentialTypeCode">
+        <id column="code" property="code"/>
+        <result column="name" property="name"/>
+    </resultMap>
+
+</mapper>

+ 16 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasEntranceMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasEntranceMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasEntrance">
+        <id column="entrance_code" property="entranceCode"/>
+        <result column="name" property="name"/>
+        <result column="village_code" property="villageCode"/>
+        <result column="address" property="address"/>
+        <result column="device_ids" property="deviceIds"/>
+        <result column="pic_id" property="picId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+    </resultMap>
+
+</mapper>

+ 10 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasEquipCodeMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasEquipCodeMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasEquipCode">
+        <id column="code" property="code"/>
+        <result column="name" property="name"/>
+    </resultMap>
+
+</mapper>

+ 18 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasEquipMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasEquipMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasEquip">
+        <id column="code" property="code"/>
+        <result column="village_code" property="villageCode"/>
+        <result column="url_id" property="urlId"/>
+        <result column="gis_id" property="gisId"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="equip_name" property="equipName"/>
+        <result column="equip_type" property="equipType"/>
+        <result column="remark" property="remark"/>
+        <result column="floor" property="floor"/>
+    </resultMap>
+
+</mapper>

+ 20 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasGisMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasGisMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasGis">
+        <id column="id" property="id"/>
+        <result column="lon" property="lon"/>
+        <result column="lat" property="lat"/>
+        <result column="alt" property="alt"/>
+    </resultMap>
+
+    <select id="selectByIds" resultMap="BaseResultMap">
+        SELECT id, lon, lat, alt FROM sas_gis
+        WHERE id IN
+        <foreach collection="ids" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </select>
+
+</mapper>

+ 10 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasPeopleTypeCodeMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasPeopleTypeCodeMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasPeopleTypeCode">
+        <id column="code" property="code"/>
+        <result column="name" property="name"/>
+    </resultMap>
+
+</mapper>

+ 18 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasPoliceStationMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasPoliceStationMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasPoliceStation">
+        <id column="code" property="code"/>
+        <result column="name" property="name"/>
+    </resultMap>
+
+    <select id="selectByCodes" resultMap="BaseResultMap">
+        SELECT code, name FROM sas_police_station
+        WHERE code IN
+        <foreach collection="codes" item="code" open="(" separator="," close=")">
+            #{code}
+        </foreach>
+    </select>
+
+</mapper>

+ 18 - 0
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSysAreaMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usky.sas.mapper.SasSysAreaMapper">
+
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSysArea">
+        <id column="code" property="code"/>
+        <result column="name" property="name"/>
+    </resultMap>
+
+    <select id="selectByCodes" resultMap="BaseResultMap">
+        SELECT code, name FROM sas_sys_area
+        WHERE code IN
+        <foreach collection="codes" item="code" open="(" separator="," close=")">
+            #{code}
+        </foreach>
+    </select>
+
+</mapper>

+ 2 - 3
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystesasActivationMapper.xml → service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystemActivationMapper.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.usky.sas.mapper.SasSystesasActivationMapper">
+<mapper namespace="com.usky.sas.mapper.SasSystemActivationMapper">
 
-    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSystesasActivation">
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSystemActivation">
         <id column="id" property="id"/>
         <result column="license_key" property="licenseKey"/>
         <result column="is_perpetual" property="isPerpetual"/>
@@ -16,4 +16,3 @@
     </resultMap>
 
 </mapper>
-

+ 2 - 3
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystesasConfigMapper.xml → service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystemConfigMapper.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.usky.sas.mapper.SasSystesasConfigMapper">
+<mapper namespace="com.usky.sas.mapper.SasSystemConfigMapper">
 
-    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSystesasConfig">
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSystemConfig">
         <id column="id" property="id"/>
         <result column="owl_agent_host" property="owlAgentHost"/>
         <result column="systesas_host" property="systesasHost"/>
@@ -16,4 +16,3 @@
     </resultMap>
 
 </mapper>
-

+ 2 - 3
service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystesasWlanConfigMapper.xml → service-sas/service-sas-biz/src/main/resources/mapper/sas/SasSystemWlanConfigMapper.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.usky.sas.mapper.SasSystesasWlanConfigMapper">
+<mapper namespace="com.usky.sas.mapper.SasSystemWlanConfigMapper">
 
-    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSystesasWlanConfig">
+    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasSystemWlanConfig">
         <id column="id" property="id"/>
         <result column="name" property="name"/>
         <result column="ip_addr" property="ipAddr"/>
@@ -15,4 +15,3 @@
     </resultMap>
 
 </mapper>
-

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است