From a42e0989485009e7196a8e8a7d25473b3d827cff Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 02 九月 2024 17:36:25 +0800
Subject: [PATCH] 插队操作+用户列表

---
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
index 3734f7e..abf4187 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -21,6 +21,7 @@
 import com.yuanchu.mom.mapper.UserMapper;
 import com.yuanchu.mom.pojo.InsOrder;
 import com.yuanchu.mom.pojo.InsReport;
+import com.yuanchu.mom.pojo.User;
 import com.yuanchu.mom.service.InsReportService;
 import com.yuanchu.mom.utils.QueryWrappers;
 import com.yuanchu.mom.vo.Result;
@@ -81,7 +82,19 @@
         map.put("head", PrintChina.printChina(ReportPageDto.class));
         Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageInsReport");
         if (map1.get("look") == 1) reportPageDto.setCreateUser(map1.get("userId"));
-        map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto)));
+        User user = userMapper.selectById(map1.get("userId"));//褰撳墠鐧诲綍鐨勪汉
+        //鑾峰彇褰撳墠浜烘墍灞炲疄楠屽id
+        String departLimsId = user.getDepartLimsId();
+        String laboratory = null;
+        if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) {
+            String[] split = departLimsId.split(",");
+            //鏌ヨ瀵瑰簲鏋舵瀯鍚嶇О(閫氫俊瀹為獙瀹�,鐢靛姏瀹為獙瀹�,妫�娴嬪姙)
+            String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1]));
+            if (departLims.contains("瀹為獙瀹�")) {
+                laboratory = departLims;
+            }
+        }
+        map.put("body", insReportMapper.pageInsReport(page, QueryWrappers.queryWrappers(reportPageDto),laboratory));
         return map;
     }
 
@@ -158,7 +171,7 @@
     //鎵瑰噯
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) {
+    public int ratifyReport(Integer id, Integer isRatify, String ratifyTell,String sealUrl) {
         InsReport insReport = insReportMapper.selectById(id);
         insReport.setIsRatify(isRatify);
         if (ObjectUtils.isNotEmpty(ratifyTell)) {
@@ -179,14 +192,14 @@
             throw new ErrorException("鎵句笉鍒版壒鍑嗕汉鐨勭鍚�");
         }
         //鑾峰彇鍦烘墍鐨勬姤鍛婁笓鐢ㄧ珷
-        String sealUrl;
+       /* String sealUrl;
         try {
             String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory();
             sealUrl = insReportMapper.getLaboratoryByName(laboratory);
         } catch (Exception e) {
             throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
         }
-        if (sealUrl == null) throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
+        if (sealUrl == null) throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");*/
         //绯荤粺鐢熸垚鎶ュ憡鍦板潃
         String url = insReport.getUrl();
         //鎵嬪姩涓婁紶鎶ュ憡鍦板潃

--
Gitblit v1.9.3