lchao vor 1 Jahr
Ursprung
Commit
342b1e773b

+ 11 - 6
zhsq_qk-admin/src/main/java/zhsq_qk/web/controller/system/SysCameraController.java

@@ -35,11 +35,11 @@ public class SysCameraController extends BaseController {
     @Autowired
     private ISysCameraService sysCameraService;
 
-/**
- * 查询摄像头列表
- */
-@PreAuthorize("@ss.hasPermi('system:camera:list')")
-@GetMapping("/list")
+    /**
+     * 查询摄像头列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:camera:list')")
+    @GetMapping("/list")
     public TableDataInfo list(SysCameraPolice sysCamera) {
         startPage();
         List<SysCameraPolice> list = sysCameraService.selectSysCameraList(sysCamera);
@@ -54,7 +54,7 @@ public class SysCameraController extends BaseController {
     @PostMapping("/export")
     public void export(HttpServletResponse response, SysCameraPolice sysCamera) {
         List<SysCameraPolice> list = sysCameraService.selectSysCameraList(sysCamera);
-        ExcelUtil<SysCameraPolice> util = new ExcelUtil<SysCameraPolice>(SysCameraPolice. class);
+        ExcelUtil<SysCameraPolice> util = new ExcelUtil<SysCameraPolice>(SysCameraPolice.class);
         util.exportExcel(response, list, "摄像头数据");
     }
 
@@ -96,4 +96,9 @@ public class SysCameraController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(sysCameraService.deleteSysCameraByIds(ids));
     }
+
+    @GetMapping("/selectCameraList")
+    public AjaxResult selectParkData(SysCameraPolice sysCamera) {
+        return success(sysCameraService.selectSysCameraList(sysCamera));
+    }
 }

+ 15 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/domain/SysCamera.java

@@ -25,6 +25,20 @@ public class SysCamera extends BaseEntity {
     @Excel(name = "归属派出所")
     private String ascriptionStation;
 
+    public String getCameraName() {
+        return cameraName;
+    }
+
+    public void setCameraName(String cameraName) {
+        this.cameraName = cameraName;
+    }
+
+    /**
+     * 摄像头名称
+     */
+    @Excel(name = "摄像头名称")
+    private String cameraName;
+
     /**
      * 点位具体位置
      */
@@ -118,6 +132,7 @@ public class SysCamera extends BaseEntity {
                 .append("latitude", getLatitude())
                 .append("buildType", getBuildType())
                 .append("policeId", getPoliceId())
+                .append("cameraName", getCameraName())
                 .toString();
     }
 }

+ 15 - 0
zhsq_qk-system/src/main/java/zhsq_qk/system/domain/SysCameraPolice.java

@@ -25,6 +25,20 @@ public class SysCameraPolice extends BaseEntity {
     @Excel(name = "归属派出所")
     private String ascriptionStation;
 
+    public String getCameraName() {
+        return cameraName;
+    }
+
+    public void setCameraName(String cameraName) {
+        this.cameraName = cameraName;
+    }
+
+    /**
+     * 摄像头名称
+     */
+    @Excel(name = "摄像头名称")
+    private String cameraName;
+
     /**
      * 点位具体位置
      */
@@ -139,6 +153,7 @@ public class SysCameraPolice extends BaseEntity {
                 .append("policeName", getPoliceName())
                 .append("position", getPosition())
                 .append("policeId", getPoliceId())
+                .append("cameraName", getCameraName())
                 .toString();
     }
 }

+ 11 - 11
zhsq_qk-system/src/main/resources/mapper/system/SysCameraMapper.xml

@@ -6,7 +6,7 @@
 
     <resultMap type="SysCamera" id="SysCameraResult">
             <result property="id" column="id"/>
-            <result property="ascriptionStation" column="ascription_station"/>
+            <result property="cameraName" column="camera_name"/>
             <result property="policeId" column="police_id"/>
             <result property="address" column="address"/>
             <result property="longitude" column="longitude"/>
@@ -19,7 +19,7 @@
         <result property="policeId" column="police_id"/>
         <result property="policeName" column="police_name"/>
         <result property="position" column="position"/>
-        <result property="ascriptionStation" column="ascription_station"/>
+        <result property="cameraName" column="camera_name"/>
         <result property="address" column="address"/>
         <result property="longitude" column="longitude"/>
         <result property="latitude" column="latitude"/>
@@ -27,7 +27,7 @@
     </resultMap>
 
     <sql id="selectSysCameraVo">
-        select id, ascription_station, address, longitude, latitude, build_type
+        select id, cameraName, address, longitude, latitude, build_type
         from sys_camera
     </sql>
 
@@ -35,7 +35,7 @@
         SELECT
         a.id,
         b.police_name,
-        a.ascription_station,
+        a.camera_name,
         a.address,
         a.longitude,
         a.latitude,
@@ -44,8 +44,8 @@
         sys_camera a
         left join sys_police_station b on a.police_id = b.id
         <where>
-            <if test="ascriptionStation != null  and ascriptionStation != ''">
-                and ascription_station = #{ascriptionStation}
+            <if test="cameraName != null  and cameraName != ''">
+                and camera_name = #{cameraName}
             </if>
             <if test="policeName != null ">and b.police_name = #{policeName}</if>
             <if test="longitude != null  and longitude != ''">
@@ -64,7 +64,7 @@
         SELECT
             a.id,
             b.police_name,
-            a.ascription_station,
+            a.camera_name,
             a.address,
             a.longitude,
             a.latitude,
@@ -82,7 +82,7 @@
             </if>
             <if test="policeId != null">police_id,
             </if>
-            <if test="ascriptionStation != null">ascription_station,
+            <if test="cameraName != null">camera_name,
             </if>
             <if test="address != null">address,
             </if>
@@ -98,7 +98,7 @@
             </if>
             <if test="policeId != null">#{policeId},
             </if>
-            <if test="ascriptionStation != null">#{ascriptionStation},
+            <if test="cameraName != null">#{cameraName},
             </if>
             <if test="address != null">#{address},
             </if>
@@ -115,8 +115,8 @@
         update sys_camera
         <trim prefix="SET" suffixOverrides=",">
             <if test="policeId != null">police_id = #{policeId},</if>
-            <if test="ascriptionStation != null">ascription_station =
-                #{ascriptionStation},
+            <if test="cameraName != null">camera_name =
+                #{cameraName},
             </if>
             <if test="address != null">address =
                 #{address},