From b030109e665301e7edd6ad0fe5c832ee10fe39b4 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期六, 13 七月 2024 16:48:14 +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