From 1f455e5cda9016054c531bbae6b1639fe646628f Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 27 十一月 2025 19:36:37 +0800
Subject: [PATCH] 框架调整,及库区切换

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java |  101 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java b/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
new file mode 100644
index 0000000..2f15b40
--- /dev/null
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotPR.java
@@ -0,0 +1,101 @@
+package com.fzzy.igds;
+
+import com.bstek.dorado.annotation.DataProvider;
+import com.bstek.dorado.annotation.DataResolver;
+import com.bstek.dorado.annotation.Expose;
+import com.fzzy.igds.domain.Depot;
+import com.fzzy.igds.service.DepotService;
+import com.fzzy.igds.utils.ContextUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @Description
+ * @Author CZT
+ * @Date 2025/11/27 13:57
+ */
+@Slf4j
+@Component
+public class DepotPR {
+
+    @Resource
+    private DepotService depotService;
+
+    /**
+     * depotPR#getData
+     * @return
+     */
+    @DataProvider
+    public List<Depot> getData(){
+        return depotService.getData(null, null);
+    }
+
+    /**
+     * depotPR#saveOrUpdate
+     * @param data
+     * @return
+     */
+    @DataResolver
+    @Transactional
+    public String saveOrUpdate(Depot data) {
+
+        Depot depot = new Depot();
+        BeanUtils.copyProperties(data, depot);
+        depotService.saveDepot(depot);
+        return null;
+    }
+
+    /**
+     * depotPR#deleteDepot
+     * @param data
+     */
+    @Expose
+    @Transactional
+    public void deleteDepot(Depot data)  {
+        Depot depot = new Depot();
+        BeanUtils.copyProperties(data, depot);
+        depotService.deleteDepot(depot);
+    }
+
+    /**
+     * depotPR#flushCache
+     */
+    @Expose
+    public void flushCache() {
+        depotService.flushCache(null);
+    }
+
+    /**
+     * ${dorado.getDataProvider("depotPR#getAllCache").getResult()}
+     * @return
+     */
+    @DataProvider
+    public List<Depot> getAllCache() {
+        return depotService.getCacheDepotList(null, ContextUtil.subDeptId(null));
+    }
+
+    /**
+     * depotPR#ajaxGetAllCache
+     * @return
+     */
+    @Expose
+    public List<Depot> ajaxGetAllCache() {
+        return depotService.getCacheDepotList(null, ContextUtil.subDeptId(null));
+    }
+
+    /**
+     * depotPR#getDepot 鑾峰彇浠撳簱淇℃伅
+     *
+     * @param depotId
+     * @return
+     */
+    @Expose
+    public Depot getDepot(String depotId) {
+        return depotService.getCacheDepot(null, depotId);
+    }
+
+}

--
Gitblit v1.9.3