部门拖拽优化
This commit is contained in:
parent
123f7eaea6
commit
33dda680df
|
|
@ -694,7 +694,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
}else {
|
}else {
|
||||||
querySupIdSql = "select subcompanyid1 as supComId,supdepid as supId from hrmdepartment where id = ?";
|
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);
|
recordSet.executeQuery(querySupIdSql, targetId);
|
||||||
if (recordSet.next()) {
|
if (recordSet.next()) {
|
||||||
supId = Util.null2String(recordSet.getString("supId"));
|
supId = Util.null2String(recordSet.getString("supId"));
|
||||||
|
|
@ -702,7 +704,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("s".equals(targetType)) {
|
if ("s".equals(targetType)) {
|
||||||
OrganizationAssert.isFalse("0".equals(supId), "部门不能直接拖拽至集团下");
|
OrganizationAssert.isFalse("0".equals(supId), "部门不能拖拽至集团下");
|
||||||
// 转移到分部外
|
// 转移到分部外
|
||||||
deptById.setSubCompanyId1(Util.getIntValue(supId));
|
deptById.setSubCompanyId1(Util.getIntValue(supId));
|
||||||
deptById.setSupDepId(null);
|
deptById.setSupDepId(null);
|
||||||
|
|
@ -728,6 +730,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
||||||
params.put("supsubcomid",targetId);
|
params.put("supsubcomid",targetId);
|
||||||
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
|
||||||
} else if ("c".equals(targetType)) {
|
} else if ("c".equals(targetType)) {
|
||||||
|
OrganizationAssert.isFalse("d".equals(sourceType),"部门不能拖拽到集团下");
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("id",sourceId);
|
params.put("id",sourceId);
|
||||||
params.put("supsubcomid","0");
|
params.put("supsubcomid","0");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue