更新工单人员的查询
This commit is contained in:
parent
4b99a3d834
commit
372b44cb66
@ -17,7 +17,11 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -58,8 +62,15 @@ public class WorkUserServiceImpl implements WorkUserService {
|
||||
public List<Map<String, Object>> getDeptAndUserByMap(Map<String, Object> params){
|
||||
List<Map<String, Object>> deptDomains = deptMapper.selectMapListByParams(params);
|
||||
for(Map<String, Object> deptMap: deptDomains){
|
||||
List<Map<String, Object>> users = workUserMapper.selectMapListByDeptId(deptMap.get("id").toString());
|
||||
deptMap.put("users", users);
|
||||
String deptId = deptMap.get("id") + "";
|
||||
if(StringUtils.isNotEmpty(deptId)){
|
||||
deptId = deptId.replaceAll("d_", "");
|
||||
}
|
||||
|
||||
List<Map<String, Object>> users = workUserMapper.selectMapListByDeptId(deptId);
|
||||
if(users.size() > 0){
|
||||
deptMap.put("users", users);
|
||||
}
|
||||
}
|
||||
return deptDomains;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
<select id="selectMapListByParams" resultType="map">
|
||||
select
|
||||
work_dept_id as 'id',
|
||||
concat('d_',work_dept_id) as 'id',
|
||||
dept_name as 'name'
|
||||
from xhpc_work_dept
|
||||
where del_flag = 0 and status = 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user