Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邬友楠
test
Commits
eb412f8f
Commit
eb412f8f
authored
Jan 08, 2020
by
雍欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复MySQL数据库下无法正常删除组织和清除回收站
parent
dfd95268
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
91 deletions
+110
-91
OrgApplicationImpl.java
...java/com/huigou/uasp/bmp/opm/impl/OrgApplicationImpl.java
+92
-91
opm.xml
...sp/src/main/resources/config/uasp/query/bmp/mysql/opm.xml
+18
-0
No files found.
huigou-core-impl/src/main/java/com/huigou/uasp/bmp/opm/impl/OrgApplicationImpl.java
View file @
eb412f8f
...
@@ -7,8 +7,10 @@ import java.util.Date;
...
@@ -7,8 +7,10 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.cache.SystemCache
;
...
@@ -181,18 +183,12 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -181,18 +183,12 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 更新组织状态
* 更新组织状态
*
*
* @param id
* @param id 组织ID
* 组织ID
* @param version 版本号
* @param version
* @param fromStatuses 前驱状态
* 版本号
* @param toStatus 修改组织状态
* @param fromStatuses
* @param operateKind 操作类型
* 前驱状态
* @param isEnableSubordinatePsm 是否更新从属人员状态
* @param toStatus
* 修改组织状态
* @param operateKind
* 操作类型
* @param isEnableSubordinatePsm
* 是否更新从属人员状态
*/
*/
private
void
updateOrgStatus
(
String
id
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
,
String
operateKind
,
boolean
isEnableSubordinatePsm
)
{
private
void
updateOrgStatus
(
String
id
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
,
String
operateKind
,
boolean
isEnableSubordinatePsm
)
{
// 1、验证是否存在组织
// 1、验证是否存在组织
...
@@ -222,11 +218,11 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -222,11 +218,11 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
// 4、启用人员成员 需要验证人员的状态
// 4、启用人员成员 需要验证人员的状态
if
(
OrgNodeKind
.
PSM
.
equals
(
org
.
getOrgKind
()))
{
if
(
OrgNodeKind
.
PSM
.
equals
(
org
.
getOrgKind
()))
{
if
(!
org
.
getParentId
().
equalsIgnoreCase
(
org
.
getPerson
().
getMainOrgId
()))
{
if
(!
org
.
getParentId
().
equalsIgnoreCase
(
org
.
getPerson
().
getMainOrgId
()))
{
Util
.
check
(
toStatus
.
getId
()
<=
org
.
getPerson
().
getValidStatus
().
getId
(),
"%s失败,人员“%s”的状态是“%s”。"
,
new
Object
[]
{
Util
.
check
(
toStatus
.
getId
()
<=
org
.
getPerson
().
getValidStatus
().
getId
(),
"%s失败,人员“%s”的状态是“%s”。"
,
new
Object
[]{
operateKind
,
operateKind
,
org
.
getPerson
().
getName
(),
org
.
getPerson
().
getName
(),
org
.
getPerson
().
getValidStatus
()
org
.
getPerson
().
getValidStatus
()
.
getDisplayName
()
});
.
getDisplayName
()
});
}
}
}
}
...
@@ -237,8 +233,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -237,8 +233,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
}
}
updateChildrenStatus
(
org
.
getFullId
(),
fromStatuses
,
toStatus
);
updateChildrenStatus
(
org
.
getFullId
(),
fromStatuses
,
toStatus
);
}
else
{
}
else
{
Util
.
check
(
org
.
getValidStatus
().
equals
(
toStatus
),
"%s失败,“%s”当前的状态是“%s”。"
,
new
Object
[]
{
operateKind
,
org
.
getName
(),
Util
.
check
(
org
.
getValidStatus
().
equals
(
toStatus
),
"%s失败,“%s”当前的状态是“%s”。"
,
new
Object
[]
{
operateKind
,
org
.
getName
(),
org
.
getValidStatus
().
getDisplayName
()
});
org
.
getValidStatus
().
getDisplayName
()
});
}
}
}
}
...
@@ -254,15 +250,34 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -254,15 +250,34 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
}
}
private
void
updateSubordinatePsmStatus
(
String
orgFullId
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
)
{
private
void
updateSubordinatePsmStatus
(
String
orgFullId
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
)
{
String
jpql
=
this
.
getQuerySqlByName
(
"updateSubordinatePsmStatus"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
3
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>(
3
);
params
.
put
(
"newStatus"
,
toStatus
.
getId
());
params
.
put
(
"newStatus"
,
toStatus
.
getId
());
params
.
put
(
"oldStatus"
,
ValidStatus
.
toList
(
fromStatuses
));
params
.
put
(
"oldStatus"
,
ValidStatus
.
toList
(
fromStatuses
));
params
.
put
(
"fullId"
,
String
.
format
(
"%s%%"
,
orgFullId
));
params
.
put
(
"fullId"
,
String
.
format
(
"%s%%"
,
orgFullId
));
String
sql
=
null
;
try
{
sql
=
this
.
getQuerySqlByName
(
"subordinatePsm"
);
}
catch
(
Exception
ignored
)
{
}
if
(
StringUtils
.
isNotBlank
(
sql
))
{
// @since 1.3.3
List
<
String
>
psmIds
=
this
.
generalRepository
.
queryByNativeSql
(
sql
,
params
)
.
stream
()
.
map
(
Map
.
class
::
cast
)
.
map
(
row
->
(
String
)
row
.
get
(
"id"
))
.
collect
(
Collectors
.
toList
());
for
(
String
psmId
:
psmIds
)
{
Org
psm
=
orgRepository
.
findOne
(
psmId
);
psm
.
setStatus
(
toStatus
.
getId
());
psm
.
setVersion
(
generalRepository
.
getVersionNextId
());
orgRepository
.
save
(
psm
);
}
}
else
{
String
jpql
=
this
.
getQuerySqlByName
(
"updateSubordinatePsmStatus"
);
this
.
generalRepository
.
updateByNativeSql
(
jpql
,
params
);
this
.
generalRepository
.
updateByNativeSql
(
jpql
,
params
);
}
}
}
private
void
updateMainOrgPersonStatus
(
String
orgFullId
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
)
{
private
void
updateMainOrgPersonStatus
(
String
orgFullId
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
)
{
String
jpql
=
this
.
getQuerySqlByName
(
"updateMainOrgPersonStatus"
);
String
jpql
=
this
.
getQuerySqlByName
(
"updateMainOrgPersonStatus"
);
...
@@ -654,10 +669,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -654,10 +669,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 删除业务管理权限
* 删除业务管理权限
*
*
* @param orgFullId
* @param orgFullId 组织id全路径
* 组织id全路径
* @param isDeletePerson 是否删除人员
* @param isDeletePerson
* 是否删除人员
*/
*/
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
private
void
deleteBizManagement
(
String
orgFullId
,
boolean
isDeletePerson
)
{
private
void
deleteBizManagement
(
String
orgFullId
,
boolean
isDeletePerson
)
{
...
@@ -691,10 +704,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -691,10 +704,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 删除授权
* 删除授权
*
*
* @param orgFullId
* @param orgFullId 组织ID全路径
* 组织ID全路径
* @param isDeletePerson 是否删除人员
* @param isDeletePerson
* 是否删除人员
*/
*/
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
private
void
deleteAuthorize
(
String
orgFullId
,
boolean
isDeletePerson
)
{
private
void
deleteAuthorize
(
String
orgFullId
,
boolean
isDeletePerson
)
{
...
@@ -725,10 +736,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -725,10 +736,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 删除代理
* 删除代理
*
*
* @param orgFullId
* @param orgFullId 组织ID全路径
* 组织ID全路径
* @param isDeletePerson 是否删除人员
* @param isDeletePerson
* 是否删除人员
*/
*/
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
private
void
deleteAgent
(
String
orgFullId
,
boolean
isDeletePerson
)
{
private
void
deleteAgent
(
String
orgFullId
,
boolean
isDeletePerson
)
{
...
@@ -794,34 +803,35 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -794,34 +803,35 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 删除人员
* 删除人员
*
*
* @param orgFullId
* @param orgFullId 组织ID全路径
* 组织ID全路径
*/
*/
private
void
deletePerson
(
String
orgFullId
)
{
private
void
deletePerson
(
String
orgFullId
)
{
String
orgFullIdCriteria
=
String
.
format
(
"%s%%"
,
orgFullId
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
1
);
StringBuilder
sb
=
new
StringBuilder
();
params
.
put
(
"fullId"
,
String
.
format
(
"%s%%"
,
orgFullId
));
StringBuilder
jpql
=
new
StringBuilder
();
// 删除一人多岗的人员数据
// 删除一人多岗的人员数据
sb
.
append
(
"delete from SA_OP
Org t"
);
jpql
.
append
(
"from
Org t"
);
sb
.
append
(
" where Org_Kind_ID
= 'psm'"
);
jpql
.
append
(
" where orgKindId
= 'psm'"
);
sb
.
append
(
" and exists (select 1"
);
jpql
.
append
(
" and exists (select 1"
);
sb
.
append
(
" from SA_OPPerson person, SA_OP
Org org"
);
jpql
.
append
(
" from Person person,
Org org"
);
sb
.
append
(
" where person.ID = t.Person_ID
"
);
jpql
.
append
(
" where person.id = t.person.id
"
);
sb
.
append
(
" and person.Main_Org_ID <> t.Parent_ID
"
);
jpql
.
append
(
" and person.mainOrgId != t.parentId
"
);
sb
.
append
(
" and org.Org_Kind_ID
= 'psm'"
);
jpql
.
append
(
" and org.orgKindId
= 'psm'"
);
sb
.
append
(
" and person.Main_Org_ID = org.Parent_ID
"
);
jpql
.
append
(
" and person.mainOrgId = org.parentId
"
);
sb
.
append
(
" and person.ID = org.Person_ID
"
);
jpql
.
append
(
" and person.id = org.person.id
"
);
sb
.
append
(
" and org.Full_ID like ?
)"
);
jpql
.
append
(
" and org.fullId like :fullId
)"
);
// 删除人员
// 删除人员
this
.
sqlExecutorDao
.
executeUpdate
(
sb
.
toString
(),
orgFullIdCriteria
);
List
<
Org
>
persons
=
generalRepository
.
query
(
jpql
.
toString
(),
params
);
sb
.
delete
(
0
,
sb
.
length
());
orgRepository
.
deleteInBatch
(
persons
);
sb
.
append
(
"delete from SA_OPPerson person"
);
jpql
.
delete
(
0
,
jpql
.
length
());
sb
.
append
(
" where exists (select 1"
);
jpql
.
append
(
"delete Person person"
);
sb
.
append
(
" from SA_OPOrg org"
);
jpql
.
append
(
" where exists (select 1"
);
sb
.
append
(
" where org.Org_Kind_ID = 'psm'"
);
jpql
.
append
(
" from Org org"
);
sb
.
append
(
" and person.Main_Org_ID = org.Parent_ID"
);
jpql
.
append
(
" where org.orgKindId = 'psm'"
);
sb
.
append
(
" and person.ID = org.Person_ID"
);
jpql
.
append
(
" and person.mainOrgId = org.parentId"
);
sb
.
append
(
" and Full_ID like ?)"
);
jpql
.
append
(
" and person.id = org.person.id"
);
this
.
sqlExecutorDao
.
executeUpdate
(
sb
.
toString
(),
orgFullIdCriteria
);
jpql
.
append
(
" and fullId like :fullId)"
);
generalRepository
.
update
(
jpql
.
toString
(),
params
);
}
}
@Override
@Override
...
@@ -871,8 +881,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -871,8 +881,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
psmStatus
=
ValidStatus
.
fromId
(
Math
.
min
(
person
.
getValidStatus
().
getId
(),
position
.
getValidStatus
().
getId
()));
psmStatus
=
ValidStatus
.
fromId
(
Math
.
min
(
person
.
getValidStatus
().
getId
(),
position
.
getValidStatus
().
getId
()));
}
}
Util
.
check
(
psmStatus
.
getId
()
<=
person
.
getStatus
(),
"新建人员成员失败,人员“%s”的状态是“%s”。"
,
new
Object
[]
{
person
.
getName
(),
Util
.
check
(
psmStatus
.
getId
()
<=
person
.
getStatus
(),
"新建人员成员失败,人员“%s”的状态是“%s”。"
,
new
Object
[]
{
person
.
getName
(),
person
.
getValidStatus
().
getDisplayName
()
});
person
.
getValidStatus
().
getDisplayName
()
});
String
personMemberId
=
OpmUtil
.
formatPersonMemberId
(
person
.
getId
(),
position
.
getId
());
String
personMemberId
=
OpmUtil
.
formatPersonMemberId
(
person
.
getId
(),
position
.
getId
());
...
@@ -1084,12 +1094,9 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -1084,12 +1094,9 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 获取父节点的最大序列号
* 获取父节点的最大序列号
*
*
* @param parentId
* @param parentId 父节点ID
* 父节点ID
* @param orgKind 节点类型
* @param orgKind
* @param isExcludeDiabled 是否排除停用的组织
* 节点类型
* @param isExcludeDiabled
* 是否排除停用的组织
* @return
* @return
*/
*/
private
Integer
getMaxSequence
(
String
parentId
,
OrgKind
orgKind
,
boolean
isExcludeDiabled
)
{
private
Integer
getMaxSequence
(
String
parentId
,
OrgKind
orgKind
,
boolean
isExcludeDiabled
)
{
...
@@ -1230,11 +1237,11 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -1230,11 +1237,11 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
Person
existPerson
=
personList
.
get
(
0
);
Person
existPerson
=
personList
.
get
(
0
);
Util
.
check
(!
person
.
getCode
().
equalsIgnoreCase
(
existPerson
.
getCode
()),
"人员编码“%s”与“%s”的编码重复。"
,
Util
.
check
(!
person
.
getCode
().
equalsIgnoreCase
(
existPerson
.
getCode
()),
"人员编码“%s”与“%s”的编码重复。"
,
new
Object
[]
{
person
.
getCode
(),
existPerson
.
getName
()
});
new
Object
[]{
person
.
getCode
(),
existPerson
.
getName
()
});
Util
.
check
(!
loginName
.
equalsIgnoreCase
(
existPerson
.
getLoginName
()),
"人员登录名“%s”与“%s”的登录名或编码重复。"
,
new
Object
[]
{
loginName
,
existPerson
.
getName
()
});
Util
.
check
(!
loginName
.
equalsIgnoreCase
(
existPerson
.
getLoginName
()),
"人员登录名“%s”与“%s”的登录名或编码重复。"
,
new
Object
[]
{
loginName
,
existPerson
.
getName
()
});
if
(
Util
.
isNotEmptyString
(
person
.
getCertificateNo
()))
{
if
(
Util
.
isNotEmptyString
(
person
.
getCertificateNo
()))
{
Util
.
check
(!
person
.
getCertificateNo
().
equalsIgnoreCase
(
existPerson
.
getCertificateNo
()),
"人员证件号“%s”与“%s”的证件号重复。"
,
Util
.
check
(!
person
.
getCertificateNo
().
equalsIgnoreCase
(
existPerson
.
getCertificateNo
()),
"人员证件号“%s”与“%s”的证件号重复。"
,
new
Object
[]
{
person
.
getCertificateNo
(),
existPerson
.
getName
()
});
new
Object
[]{
person
.
getCertificateNo
(),
existPerson
.
getName
()
});
}
}
}
}
}
}
...
@@ -1343,18 +1350,12 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -1343,18 +1350,12 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
/**
/**
* 更新人员状态
* 更新人员状态
*
*
* @param id
* @param id 人员唯一标识
* 人员唯一标识
* @param version 版本号
* @param version
* @param fromStatuses 前置状态
* 版本号
* @param toStatus 更新状态
* @param fromStatuses
* @param operateType 操作类型
* 前置状态
* @param isEnableSubordinatePsm 是否允许从属人员成员
* @param toStatus
* 更新状态
* @param operateType
* 操作类型
* @param isEnableSubordinatePsm
* 是否允许从属人员成员
*/
*/
private
void
updatePersonStatus
(
String
id
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
,
String
operateType
,
boolean
isEnableSubordinatePsm
)
{
private
void
updatePersonStatus
(
String
id
,
Collection
<
ValidStatus
>
fromStatuses
,
ValidStatus
toStatus
,
String
operateType
,
boolean
isEnableSubordinatePsm
)
{
Org
personMember
=
this
.
orgRepository
.
findMainOrgByPersonId
(
id
);
Org
personMember
=
this
.
orgRepository
.
findMainOrgByPersonId
(
id
);
...
@@ -1377,8 +1378,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -1377,8 +1378,8 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
Person
person
=
this
.
personRepository
.
findOne
(
id
);
Person
person
=
this
.
personRepository
.
findOne
(
id
);
Assert
.
notNull
(
person
,
String
.
format
(
"未找到人员ID“%s”对应的人员。"
,
id
));
Assert
.
notNull
(
person
,
String
.
format
(
"未找到人员ID“%s”对应的人员。"
,
id
));
Util
.
check
(
person
.
getValidStatus
().
equals
(
ValidStatus
.
LOGIC_DELETE
),
"%s失败,“%s”当前的状态是“%s”。"
,
new
Object
[]
{
"清除人员"
,
person
.
getName
(),
Util
.
check
(
person
.
getValidStatus
().
equals
(
ValidStatus
.
LOGIC_DELETE
),
"%s失败,“%s”当前的状态是“%s”。"
,
new
Object
[]
{
"清除人员"
,
person
.
getName
(),
person
.
getValidStatus
().
getDisplayName
()
});
person
.
getValidStatus
().
getDisplayName
()
});
List
<
Org
>
personMembers
=
this
.
orgRepository
.
findPersonMembersByPersonId
(
id
);
List
<
Org
>
personMembers
=
this
.
orgRepository
.
findPersonMembersByPersonId
(
id
);
this
.
orgRepository
.
delete
(
personMembers
);
this
.
orgRepository
.
delete
(
personMembers
);
...
@@ -1435,7 +1436,7 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
...
@@ -1435,7 +1436,7 @@ public class OrgApplicationImpl extends BaseApplication implements OrgApplicatio
public
void
initPassword
(
String
personId
)
{
public
void
initPassword
(
String
personId
)
{
Assert
.
hasText
(
personId
,
String
.
format
(
CommonDomainConstants
.
PARAMETER_NOT_NULL_FORMAT
,
"personId"
));
Assert
.
hasText
(
personId
,
String
.
format
(
CommonDomainConstants
.
PARAMETER_NOT_NULL_FORMAT
,
"personId"
));
Person
person
=
this
.
loadPerson
(
personId
);
Person
person
=
this
.
loadPerson
(
personId
);
Util
.
check
(
person
!=
null
,
"没有找到ID“%s”对应的人员。"
,
new
Object
[]
{
personId
});
Util
.
check
(
person
!=
null
,
"没有找到ID“%s”对应的人员。"
,
new
Object
[]
{
personId
});
person
.
setPassword
(
OpmUtil
.
getDefaultEncryptPassword
());
person
.
setPassword
(
OpmUtil
.
getDefaultEncryptPassword
());
this
.
personRepository
.
save
(
person
);
this
.
personRepository
.
save
(
person
);
}
}
...
...
huigou-uasp/src/main/resources/config/uasp/query/bmp/mysql/opm.xml
View file @
eb412f8f
...
@@ -9,6 +9,24 @@
...
@@ -9,6 +9,24 @@
and (o.org_Kind_Id != 'psm' or
and (o.org_Kind_Id != 'psm' or
(select p.status from SA_OPPerson p where p.id = o.person_Id) >= :newStatus)
(select p.status from SA_OPPerson p where p.id = o.person_Id) >= :newStatus)
</sql>
</sql>
<sql
name=
"subordinatePsm"
>
select id
from
SA_OPOrg o
where o.org_Kind_Id = 'psm'
and o.status in (:oldStatus)
and (select p.status from SA_OPOrg p where p.id = o.parent_Id) >= :newStatus
and exists (select 1
from SA_OPPerson person, SA_OPOrg org
where person.status = :newStatus
and org.org_Kind_Id = 'psm'
and org.status in (:oldStatus)
and org.full_Id like :fullId
and person.main_Org_Id = org.parent_Id
and person.id = org.person_Id
and o.person_Id = person.id
and o.parent_Id != person.main_Org_Id)
</sql>
<sql
name=
"updateSubordinatePsmStatus"
>
<sql
name=
"updateSubordinatePsmStatus"
>
update SA_OPOrg o
update SA_OPOrg o
set o.status = :newStatus, o.version = (select next_sequence('version_seq'))
set o.status = :newStatus, o.version = (select next_sequence('version_seq'))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment