From 954480166aad6d24c9e9889906a0edf762f0da2a Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期一, 10 二月 2025 16:32:56 +0800
Subject: [PATCH] 优化库存同步

---
 src/main/java/com/fzzy/async/fzzy35/repository/Fzzy35Sync1202Rep.java |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/fzzy/async/fzzy35/repository/Fzzy35Sync1202Rep.java b/src/main/java/com/fzzy/async/fzzy35/repository/Fzzy35Sync1202Rep.java
index f22eba3..a4a078b 100644
--- a/src/main/java/com/fzzy/async/fzzy35/repository/Fzzy35Sync1202Rep.java
+++ b/src/main/java/com/fzzy/async/fzzy35/repository/Fzzy35Sync1202Rep.java
@@ -1,6 +1,6 @@
 package com.fzzy.async.fzzy35.repository;
 
-import com.fzzy.async.fzzy35.entity.InoutRecord;
+import com.fzzy.async.fzzy35.entity.Fz35InoutRecord;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
@@ -14,7 +14,7 @@
  * @author chen
  * @date 2022-09-23 17:10
  */
-public interface Fzzy35Sync1202Rep extends JpaRepository<InoutRecord, String> {
+public interface Fzzy35Sync1202Rep extends JpaRepository<Fz35InoutRecord, String> {
 
     /**
      * 鏍规嵁淇℃伅鑾峰彇鍑哄叆搴撲俊鎭�
@@ -24,15 +24,29 @@
      * @param end
      * @return
      */
-    @Query("from InoutRecord where deptId=:deptId and type=:type and completeTime >=:start and completeTime <:end order by completeTime ")
-    List<InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("type") String type, @Param("start") Date start, @Param("end") Date end);
+    @Query("from Fz35InoutRecord where deptId=:deptId and type=:type and completeTime >=:start and completeTime <:end order by completeTime ")
+    List<Fz35InoutRecord> listInoutRecord(@Param("deptId") String deptId, @Param("type") String type, @Param("start") Date start, @Param("end") Date end);
+
+    /**
+     * 鏍规嵁淇℃伅鑾峰彇鍑哄叆搴撲俊鎭�
+     * @param type
+     * @param start
+     * @param end
+     * @return
+     */
+    @Query("from Fz35InoutRecord where type=:type and completeTime >=:start and completeTime <:end order by completeTime ")
+    List<Fz35InoutRecord> listInoutRecord(@Param("type") String type, @Param("start") Date start, @Param("end") Date end);
 
     /**
      * 鏍规嵁id鑾峰彇绮鍑哄叆搴撲俊鎭�
      * @param id
      * @return
      */
-    @Query("from InoutRecord where id=:id order by completeTime ")
-    List<InoutRecord> listInoutRecordById(@Param("id") String id);
+    @Query("from Fz35InoutRecord where id=:id order by completeTime ")
+    List<Fz35InoutRecord> listInoutRecordById(@Param("id") String id);
+
+    @Query("from Fz35InoutRecord where deptId=:deptId and (type=:type1 or type=:type2) and completeTime >=:start and completeTime <=:end order by id ")
+    List<Fz35InoutRecord> listInAndOutRecord(@Param("deptId") String deptId, @Param("type1") String type1, @Param("type2") String type2, @Param("start") Date start, @Param("end") Date end);
+
 
 }

--
Gitblit v1.9.3