Bläddra i källkod

无人机总数量

lchao 3 veckor sedan
förälder
incheckning
78642dd1fe

+ 12 - 0
src/main/java/com/sooka/sponest/monitor/uav/controller/CentermonitorTUavController.java

@@ -9,6 +9,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.TableDataInfo;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
+import com.sooka.sponest.monitor.camera.domain.CentermonitorTCamera;
 import com.sooka.sponest.monitor.remoteapi.service.center.system.RemoteService;
 import com.sooka.sponest.monitor.uav.domain.CentermonitorTUav;
 import com.sooka.sponest.monitor.uav.domain.dto.CentermonitorTUavDTO;
@@ -914,4 +915,15 @@ public class CentermonitorTUavController extends BaseController {
         return AjaxResult.success(centermonitorTUavService.selectUavByUavSn(uavSn,isCommandCenter));
     }
 
+
+
+    /**
+     * 获取无人机数量
+     */
+    @GetMapping("/selectCentermonitorTUavByCount")
+    public AjaxResult selectCentermonitorTUavByCount( ) {
+        int totalCount = centermonitorTUavService.selectCentermonitorTUavByCount();
+        return AjaxResult.success(totalCount);
+    }
+
 }

+ 2 - 0
src/main/java/com/sooka/sponest/monitor/uav/mapper/CentermonitorTUavMapper.java

@@ -68,4 +68,6 @@ public interface CentermonitorTUavMapper {
     List<CentermonitorTUav> selectCentermonitorTUavByDeptId(@Param("deptId") String deptId);
 
     CentermonitorTUav selectUavByUavSn(@Param("uavSn") String uavSn);
+
+    int selectCentermonitorTUavByCount();
 }

+ 2 - 0
src/main/java/com/sooka/sponest/monitor/uav/service/ICentermonitorTUavService.java

@@ -67,4 +67,6 @@ public interface ICentermonitorTUavService {
     List<CentermonitorTUav> selectCentermonitorTUavByDeptId();
 
     CentermonitorTUav selectUavByUavSn(String uavSn, Integer isCommandCenter);
+
+    public int selectCentermonitorTUavByCount();
 }

+ 5 - 0
src/main/java/com/sooka/sponest/monitor/uav/service/impl/CentermonitorTUavServiceImpl.java

@@ -117,4 +117,9 @@ public class CentermonitorTUavServiceImpl implements ICentermonitorTUavService {
         }
         return centermonitorTUav;
     }
+
+    @Override
+    public int selectCentermonitorTUavByCount() {
+        return centermonitorTUavMapper.selectCentermonitorTUavByCount();
+    }
 }

+ 4 - 0
src/main/resources/mapper/monitor/uav/CentermonitorTUavMapper.xml

@@ -125,4 +125,8 @@
         where ctu.uav_sn = #{uavSn}
         group by ctu.uav_id
     </select>
+
+    <select id="selectCentermonitorTUavByCount" resultType="int">
+        select count(*) id from centermonitor_t_uav
+    </select>
 </mapper>