From c206acfaedc69c390fb67daa81bc686f58a212ef Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期一, 27 十一月 2023 16:12:11 +0800
Subject: [PATCH] 提交配置信息2

---
 igds-manager/src/main/java/com/ld/igds/oa/service/HStaffService.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/igds-manager/src/main/java/com/ld/igds/oa/service/HStaffService.java b/igds-manager/src/main/java/com/ld/igds/oa/service/HStaffService.java
index a867e98..9ede4ec 100644
--- a/igds-manager/src/main/java/com/ld/igds/oa/service/HStaffService.java
+++ b/igds-manager/src/main/java/com/ld/igds/oa/service/HStaffService.java
@@ -25,10 +25,11 @@
 
     public void pageData(Page<OAStaff> page, Map<String, Object> param)
             throws Exception {
-        String hql = " from " + OAStaff.class.getName() + " where companyId=:companyId";
+        String hql = " from " + OAStaff.class.getName() + " where companyId =:companyId and deptId =:deptId";
 
         Map<String, Object> args = new HashMap<>();
         args.put("companyId", ContextUtil.getCompanyId());
+        args.put("deptId", ContextUtil.subDeptId(null));
 
         if (null != param) {
 
@@ -68,13 +69,13 @@
     }
 
     public String saveOrUpdate(OAStaff data) {
-
+        //鍒ゆ柇缁勭粐缂栫爜
+        if (StringUtils.isEmpty(data.getCompanyId())) {
+            data.setCompanyId(data.getCompanyId());
+        }
         Session session = this.getSessionFactory().openSession();
         try {
             data.setCompanyId(ContextUtil.getCompanyId());
-            if (null == data.getId()) {
-                data.setId(ContextUtil.getUUID());
-            }
             session.saveOrUpdate(data);
         } finally {
             session.flush();

--
Gitblit v1.9.3