From 33dda680df7a4bd99a8db1b0e1fac2ebefc97a73 Mon Sep 17 00:00:00 2001 From: Mlin Date: Wed, 2 Aug 2023 10:03:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=8B=96=E6=8B=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/service/impl/DepartmentServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java index fde416c0..2c513b23 100644 --- a/src/com/engine/organization/service/impl/DepartmentServiceImpl.java +++ b/src/com/engine/organization/service/impl/DepartmentServiceImpl.java @@ -694,7 +694,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService }else { querySupIdSql = "select subcompanyid1 as supComId,supdepid as supId from hrmdepartment where id = ?"; } - if ("1".equals(dragPostion)) { + if ("-1".equals(dragPostion)) { + OrganizationAssert.isFalse( true,"分部、部门不能转移至与集团平级"); + }else if ("1".equals(dragPostion)) { recordSet.executeQuery(querySupIdSql, targetId); if (recordSet.next()) { supId = Util.null2String(recordSet.getString("supId")); @@ -702,7 +704,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService } if ("s".equals(targetType)) { - OrganizationAssert.isFalse("0".equals(supId), "部门不能直接拖拽至集团下"); + OrganizationAssert.isFalse("0".equals(supId), "部门不能拖拽至集团下"); // 转移到分部外 deptById.setSubCompanyId1(Util.getIntValue(supId)); deptById.setSupDepId(null); @@ -728,6 +730,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService params.put("supsubcomid",targetId); new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync(); } else if ("c".equals(targetType)) { + OrganizationAssert.isFalse("d".equals(sourceType),"部门不能拖拽到集团下"); Map params = new HashMap<>(); params.put("id",sourceId); params.put("supsubcomid","0");