派单3.0
This commit is contained in:
@ -20,6 +20,7 @@ import org.dromara.patch.domain.vo.PdMasterProgressVo;
|
||||
import org.dromara.patch.enums.TaskStatusEnum;
|
||||
import org.dromara.patch.service.IPdMasterSonService;
|
||||
import org.dromara.patch.service.IPdMasterUserService;
|
||||
import org.dromara.system.domain.SysUser;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.patch.domain.bo.PdMasterBo;
|
||||
import org.dromara.patch.domain.vo.PdMasterVo;
|
||||
@ -206,6 +207,9 @@ public class PdMasterServiceImpl extends ServiceImpl<PdMasterMapper, PdMaster> i
|
||||
bigDecimal = bigDecimal.add(new BigDecimal(pdMasterSon.getProgress()));
|
||||
}
|
||||
item.setCompletionProgress(bigDecimal+"%");
|
||||
//执行人
|
||||
PdMasterUser one1 = pdMasterUserService.getById(item.getId());
|
||||
item.setSlaveName(one1.getSlaveName());
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
@ -122,4 +122,6 @@ public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> {
|
||||
|
||||
List<Long> thisAlldepIds(@Param("depId") Long deptId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -694,6 +694,8 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
|
||||
public List<SysUser> findThis() {
|
||||
//1、获取当前用户部门
|
||||
Long deptId = LoginHelper.getDeptId();
|
||||
// //2、根据用户获取到对应部门的父
|
||||
// SysDeptVo sysDeptVo = deptService.selectDeptById(deptId);
|
||||
//2、查询当前用户所在部门
|
||||
List<Long> longs = baseMapper.thisAlldepIds(deptId);
|
||||
//3、查询当前用户所在部门所有用户
|
||||
|
@ -71,6 +71,7 @@
|
||||
|
||||
<select id="thisAlldepIds" resultType="Long">
|
||||
WITH RECURSIVE dept_tree AS (
|
||||
-- 首先获取当前部门自身的记录
|
||||
SELECT
|
||||
dept_id,
|
||||
parent_id,
|
||||
@ -79,14 +80,15 @@
|
||||
order_num,
|
||||
status,
|
||||
is_show,
|
||||
1 as level
|
||||
0 as level -- 自身级别设为0,子部门从1开始
|
||||
FROM sys_dept
|
||||
WHERE parent_id = #{depId}
|
||||
WHERE dept_id = #{depId} -- 匹配当前部门ID
|
||||
AND del_flag = '0'
|
||||
AND status = '0'
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- 然后递归查询所有子部门
|
||||
SELECT
|
||||
d.dept_id,
|
||||
d.parent_id,
|
||||
|
Reference in New Issue
Block a user