Commit 96c9f0f8 by wubh

包活干V2.2.0-删除无用代码

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@29323 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent e236969f
......@@ -28,10 +28,6 @@ public interface ISysOrganizationService {
int updateByPrimaryKeySelective(SysOrganization record);
List<SysOrganization> findOrgByRecord(SysOrganization record);
List<SysOrganization> findOrgById(Integer id);
SysOrganization selectDetailById(Integer id);
/**
......
......@@ -173,23 +173,24 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService {
criteria.andIdIn(ids);
}
List<SysOrganization> rawOrgList;
List<SysOrganization> organizationList;
if (StringUtils.isNotBlank(orgName) && orgId != null && orgStatus != null) {
// 根据三个条件查找,先根据父组织id和状态查找,再根据名称过滤
SysOrganization record = new SysOrganization();
record.setId(orgId);
record.setOrgStatus(orgStatus);
List<SysOrganization> rawOrgList = organizationMapper.selectByRecord(record);
rawOrgList = organizationMapper.selectByRecord(record);
organizationList = this.convertListToTreeByKeyword(rawOrgList, orgName);
} else if (StringUtils.isNotBlank(orgName) && orgId != null) {
// 根据名称和父组织id查找
List<SysOrganization> rawOrgList = organizationMapper.selectByParentId(orgId);
rawOrgList = organizationMapper.selectByParentId(orgId);
organizationList = this.convertListToTreeByKeyword(rawOrgList, orgName);
} else if (StringUtils.isNotBlank(orgName) && orgStatus != null) {
// 根据名称和状态查找
criteria.andOrgStatusEqualTo(orgStatus);
example.setOrderByClause("sort asc");
List<SysOrganization> rawOrgList = organizationMapper.selectByExample(example);
rawOrgList = organizationMapper.selectByExample(example);
organizationList = this.convertListToTreeByKeyword(rawOrgList, orgName);
} else if (orgId != null && orgStatus != null) {
// 根据父组织id和状态查找
......@@ -200,7 +201,7 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService {
} else if (StringUtils.isNotBlank(orgName)) {
// 仅根据名称查找
criteria.andOrgStatusIn(Arrays.asList((byte) 1, (byte) 2));
List<SysOrganization> rawOrgList = organizationMapper.selectByExample(example);
rawOrgList = organizationMapper.selectByExample(example);
organizationList = this.convertListToTreeByKeyword(rawOrgList, orgName);
} else if (orgId != null) {
// 仅根据父组织id查找
......@@ -208,7 +209,7 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService {
} else if (orgStatus != null) {
// 仅根据状态查找
criteria.andOrgStatusEqualTo(orgStatus);
List<SysOrganization> rawOrgList = organizationMapper.selectByExample(example);
rawOrgList = organizationMapper.selectByExample(example);
organizationList = this.convertListToTree(rawOrgList);
} else {
// 参数全为空,只查询一级组织
......@@ -258,19 +259,6 @@ public class SysOrganizationServiceImpl implements ISysOrganizationService {
return effectRows;
}
@Deprecated
@Override
public List<SysOrganization> findOrgByRecord(SysOrganization record) {
return organizationMapper.selectByRecord(record);
}
@Deprecated
@Override
public List<SysOrganization> findOrgById(Integer id) {
return organizationMapper.selectByParentId(id);
}
/**
* 说明方法描述:递归查询子节点
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!