|
|
|
@ -25,6 +25,7 @@ import com.weaver.general.BaseBean;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -157,11 +158,11 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|
|
|
|
private String buildSqlWhere(Map<String, Object> params) {
|
|
|
|
|
DBType dbType = DBType.get(new RecordSet().getDBType());
|
|
|
|
|
String sqlWhere = " where delete_type = 0";
|
|
|
|
|
String lastName = (String) params.get("ecManager");
|
|
|
|
|
List<Long> resourceIds = MapperProxyFactory.getProxy(EmployeeMapper.class).getResourceIds(lastName);
|
|
|
|
|
String ecManager = StringUtils.join(resourceIds,",");
|
|
|
|
|
String lastName = Util.null2String(params.get("ecManager"));
|
|
|
|
|
if (StringUtils.isNotBlank(lastName)) {
|
|
|
|
|
sqlWhere += " AND ec_manager in ("+ecManager+") ";
|
|
|
|
|
List<Long> resourceIds = MapperProxyFactory.getProxy(EmployeeMapper.class).getResourceIds(lastName);
|
|
|
|
|
String ecManager = StringUtils.join(resourceIds, ",");
|
|
|
|
|
sqlWhere += " AND ec_manager in (" + (StringUtils.isBlank(ecManager) ? "''" : ecManager) + ") ";
|
|
|
|
|
}
|
|
|
|
|
String ecRolelevel = (String) params.get("ecRolelevel");
|
|
|
|
|
if (StringUtils.isNotBlank(ecRolelevel)) {
|
|
|
|
|