From 43ce77a85d8297a53dc25430fff10ead57296167 Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期六, 04 十一月 2023 15:43:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java b/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
index 73a816d..293b6fe 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
+++ b/igds-inout/src/main/java/com/ld/igds/m/service/HInoutNoticeService.java
@@ -27,23 +27,18 @@
     public void pageQueryIn(Page<InoutNoticeIn> page, Map<String, Object> param) throws Exception {
 
         String hql = " from " + InoutNoticeIn.class.getName()
-                + " where companyId =:companyId";
+                + " where companyId =:companyId and deptId =:deptId";
 
         Map<String, Object> args = new HashMap<String, Object>();
         args.put("companyId", ContextUtil.getCompanyId());
+        args.put("deptId", ContextUtil.subDeptId(null));
 
         Object year = param.get("year");
         if (year == null) {
             param.put("year", DateFormatUtils.format(new Date(), "yyyy"));
         }
 
-        String str = (String) param.get("deptId");
-        if (StringUtils.isNotEmpty(str)) {
-            hql += " and deptId =:deptId";
-            args.put("deptId", str);
-        }
-
-        str = (String) param.get("id");
+        String str = (String) param.get("id");
         if (StringUtils.isNotEmpty(str)) {
             hql += " and id=:id";
             args.put("id", str);
@@ -143,23 +138,18 @@
     public void pageQueryOut(Page<InoutNoticeOut> page, Map<String, Object> param) throws Exception {
 
         String hql = " from " + InoutNoticeOut.class.getName()
-                + " where companyId =:companyId";
+                + " where companyId =:companyId and deptId =:deptId";
 
         Map<String, Object> args = new HashMap<String, Object>();
         args.put("companyId", ContextUtil.getCompanyId());
+        args.put("deptId", ContextUtil.subDeptId(null));
 
         Object year = param.get("year");
         if (year == null) {
             param.put("year", DateFormatUtils.format(new Date(), "yyyy"));
         }
 
-        String str = (String) param.get("deptId");
-        if (StringUtils.isNotEmpty(str)) {
-            hql += " and deptId =:deptId";
-            args.put("deptId", str);
-        }
-
-        str = (String) param.get("id");
+        String str = (String) param.get("id");
         if (StringUtils.isNotEmpty(str)) {
             hql += " and id =:id";
             args.put("id", str);

--
Gitblit v1.9.3