From 2f432f52c1cfb1567dadcf6e040c5d38b0a26a79 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 28 十一月 2025 17:31:49 +0800
Subject: [PATCH] 数量检测配置页面
---
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/SecCameraRepository.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/SecCameraRepository.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/SecCameraRepository.java
new file mode 100644
index 0000000..4b5ab43
--- /dev/null
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/SecCameraRepository.java
@@ -0,0 +1,51 @@
+package com.fzzy.igds.repository;
+
+import com.fzzy.igds.domain.Camera;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.query.Param;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Description
+ * @Author CZT
+ * @Date 2025/11/28 10:48
+ */
+@Service
+public interface SecCameraRepository extends JpaRepository<Camera, String> , JpaSpecificationExecutor<Camera> {
+
+ /**
+ * 鏍规嵁缁勭粐缂栫爜鍜屽簱鍖虹紪鐮佽幏鍙栦俊鎭�
+ *
+ * @param companyId
+ * @param deptId
+ * @return
+ */
+ @Query("from Camera where companyId =:companyId and deptId =:deptId order by orderNum")
+ List<Camera> listCamera(@Param("companyId") String companyId, @Param("deptId") String deptId);
+
+ /**
+ * 鏍规嵁缁勭粐缂栫爜鍜屽簱鍖虹紪鐮佽幏鍙栦俊鎭�
+ *
+ * @param companyId
+ * @return
+ */
+ @Query("from Camera where companyId =:companyId order by orderNum")
+ List<Camera> listCameraByCompanyId(@Param("companyId") String companyId);
+
+ /**
+ * 鏇存柊璁惧浣嶇疆
+ * @param id
+ * @param posX
+ * @param posY
+ */
+ @Transactional
+ @Modifying
+ @Query("update Camera set posX =:posX,posY =:posY where id =:id")
+ void updatePosById(@Param("id") String id, @Param("posX") Double posX, @Param("posY") Double posY);
+}
--
Gitblit v1.9.3