Merge pull request '多部门负责人BUG修复' (#111) from feature/dxf into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/111
This commit is contained in:
commit
5791e53fb5
|
|
@ -162,7 +162,12 @@ public class DepartmentBO {
|
|||
if (StringUtils.isBlank(departmentPrincipal)) {
|
||||
return "";
|
||||
}
|
||||
return MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(Long.parseLong(departmentPrincipal));
|
||||
List<Long> collect = Arrays.stream(departmentPrincipal.split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(collect)) {
|
||||
return "";
|
||||
}
|
||||
List<String> employeeNameById = MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(collect);
|
||||
return StringUtils.join(employeeNameById, ",");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ import java.util.Map;
|
|||
**/
|
||||
public interface EmployeeMapper {
|
||||
|
||||
String getEmployeeNameById(@Param("employeeId") Long id);
|
||||
List<String> getEmployeeNameById(@Param("ids") Collection<Long> ids);
|
||||
|
||||
List<Long> getResourceIds(@Param("lastName") String lastName);
|
||||
|
||||
List<Long> getResourceIdsByName(@Param("lastName") String lastName);
|
||||
|
||||
|
||||
List<Map<String,Object>> getBrowserDatas(@Param("ids") Collection<Long> ids);
|
||||
List<Map<String, Object>> getBrowserDatas(@Param("ids") Collection<Long> ids);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,10 @@
|
|||
<select id="getEmployeeNameById" resultType="string">
|
||||
select t.lastname
|
||||
from hrmresource t
|
||||
where id = #{employeeId}
|
||||
where id in
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -543,8 +543,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
//TODO new DepartmentTriggerRunnable(departmentPO.getId()).run();
|
||||
}
|
||||
// 查询该部门一级岗位、更新岗位所属分部、所属部门
|
||||
List<JobPO> firstChildJobList = getJobMapper().listJobsByDepartmentId(mergeParam.getId());
|
||||
firstChildJobList = firstChildJobList.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
||||
//List<JobPO> firstChildJobList = getJobMapper().listJobsByDepartmentId(mergeParam.getId());
|
||||
//firstChildJobList = firstChildJobList.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
||||
// 批量更新部门、所属分部
|
||||
RecordSet rs = new RecordSet();
|
||||
String targetEcDeptId = targetDepartment.getId().toString();
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@ import com.engine.organization.entity.DeleteParam;
|
|||
import com.engine.organization.mapper.employee.EmployeeMapper;
|
||||
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -20,8 +22,15 @@ import java.util.stream.Collectors;
|
|||
public class ManagerDetachTransMethod {
|
||||
|
||||
public static String getManagerName(String ecManager) {
|
||||
String managerName = MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(Long.valueOf(ecManager));
|
||||
return managerName;
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(ecManager)) {
|
||||
return "";
|
||||
}
|
||||
List<Long> collect = Arrays.stream(ecManager.split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(collect)) {
|
||||
return "";
|
||||
}
|
||||
List<String> employeeNameById = MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(collect);
|
||||
return StringUtils.join(employeeNameById, ",");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue