|
|
@@ -27,7 +27,7 @@ public class UasOrgService extends AbstractService {
|
|
|
private final Logger logger = LoggerFactory.getLogger(UasOrgService.class);
|
|
|
|
|
|
public HrOrg getById(Integer id) {
|
|
|
- return queryForBean("select * from HrOrg where or_statuscode<>'DISABLE' and or_id=?", HrOrg.class,
|
|
|
+ return queryForBean("select * from HrOrg where or_id=?", HrOrg.class,
|
|
|
id);
|
|
|
}
|
|
|
|
|
|
@@ -38,7 +38,7 @@ public class UasOrgService extends AbstractService {
|
|
|
* @return
|
|
|
*/
|
|
|
public HrOrg getBindById(Integer id) {
|
|
|
- return queryForBean("select * from HrOrg where or_statuscode<>'DISABLE' and or_qywx is not null and or_id=?", HrOrg.class,
|
|
|
+ return queryForBean("select * from HrOrg where or_qywx is not null and or_id=?", HrOrg.class,
|
|
|
id);
|
|
|
}
|
|
|
|
|
|
@@ -80,7 +80,7 @@ public class UasOrgService extends AbstractService {
|
|
|
addrBookSdk.updateDepartment(req);
|
|
|
} else {
|
|
|
HrOrg parentOrg = getBindById(org.getOr_subof());
|
|
|
- if (null != parentOrg) {
|
|
|
+ if (null != parentOrg&&!"DISABLE".equals(parentOrg.getOr_statuscode())) {
|
|
|
UpdateDepartmentReq req = new UpdateDepartmentReq()
|
|
|
.id(org.getOr_qywx())
|
|
|
.name(org.getOr_name())
|
|
|
@@ -95,7 +95,7 @@ public class UasOrgService extends AbstractService {
|
|
|
int parentId = 0;
|
|
|
if(subof>0){
|
|
|
HrOrg parentOrg = getBindById(subof);
|
|
|
- if(parentOrg!=null){
|
|
|
+ if(parentOrg!=null&&!"DISABLE".equals(parentOrg.getOr_statuscode())){
|
|
|
parentId = (parentOrg.getOr_qywx() == null)?0:parentOrg.getOr_qywx();
|
|
|
if(parentId == 0){
|
|
|
logger.debug("create qywx department Or_subof:"+subof+" not exists qywx");
|