fix:优化数据统计查询用户组项目统计
This commit is contained in:
@@ -194,6 +194,9 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
|
||||
|
||||
/**
|
||||
* 所有项目的人员任务完成情况统计
|
||||
* 涉及 simulation_task
|
||||
* 只统计 负责人、执行人
|
||||
* simulation_task_member MemberTypeEnum.PRINCIPAL 负责人/ MemberTypeEnum.EXECUTOR 仿真执行人
|
||||
*/
|
||||
@PostMapping("/getAllUserTaskCompleteStatistics")
|
||||
@Operation(summary = "所有项目的人员任务完成情况统计", description = "所有项目的人员任务完成情况统计")
|
||||
@@ -206,7 +209,7 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
|
||||
* 用户组项目统计
|
||||
* 只统计 经理、负责人、执行人
|
||||
* simulation_node_member NodeMemberTypeEnum.MANAGER 经理
|
||||
* simulation_task_member MemberTypeEnum.PRINCIPAL 负责人/ MemberTypeEnum.EXECUTOR
|
||||
* simulation_task_member MemberTypeEnum.PRINCIPAL 仿真负责人/ MemberTypeEnum.EXECUTOR 仿真执行人
|
||||
*/
|
||||
@GetMapping("/getUserGroupProjectStatistics")
|
||||
@Operation(summary = "用户组项目统计", description = "用户组项目统计")
|
||||
@@ -216,6 +219,11 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
|
||||
|
||||
/**
|
||||
* 用户组任务完成情况统计
|
||||
* 涉及 simulation_task.exe_status
|
||||
*
|
||||
* 只统计 负责人、执行人
|
||||
* simulation_task_member MemberTypeEnum.PRINCIPAL 负责人/ MemberTypeEnum.EXECUTOR 仿真执行人
|
||||
*
|
||||
* 需要传:
|
||||
* discipline 学科
|
||||
* tag1-tag10 标签
|
||||
@@ -230,6 +238,12 @@ public class SimulationNodeController implements ISimulationNodeFeignClient {
|
||||
|
||||
/**
|
||||
* 用户组难度系数统计
|
||||
* 涉及 simulation_task.difficult
|
||||
*
|
||||
* 只统计 负责人、执行人
|
||||
* simulation_task_member MemberTypeEnum.PRINCIPAL 负责人/ MemberTypeEnum.EXECUTOR 仿真执行人
|
||||
*
|
||||
*
|
||||
* discipline 学科
|
||||
* tag1-tag10 标签
|
||||
*
|
||||
|
||||
@@ -89,11 +89,11 @@ public interface SimulationNodeMapper extends BaseMapper<SimulationNode> {
|
||||
|
||||
List<UserGroupProjectVo> getUserGroupProjectStatistics(@Param("userIds")Set<Long> userIds, @Param("tenantId")Long tenantId,@Param("nodeMemberTypeList") List<Integer> nodeMemberTypeList,@Param("taskMemberTypeList") List<Integer> taskMemberTypeList);
|
||||
|
||||
List<UserGroupTaskCompleteVo> getUserGroupTaskCompleteStatistics(@Param("req") GetUserGroupTaskCompleteStatisticsReq req);
|
||||
List<UserGroupTaskCompleteVo> getUserGroupTaskCompleteStatistics(@Param("req") GetUserGroupTaskCompleteStatisticsReq req,@Param("taskMemberTypeList") List<Integer> taskMemberTypeList);
|
||||
|
||||
List<UserGroupTaskCompleteVo> getAllUserTaskCompleteStatistics(@Param("req") GetAllUserTaskCompleteStatisticsReq req);
|
||||
List<UserGroupTaskCompleteVo> getAllUserTaskCompleteStatistics(@Param("req") GetAllUserTaskCompleteStatisticsReq req,@Param("taskMemberTypeList") List<Integer> taskMemberTypeList);
|
||||
|
||||
List<UserGroupDifficultyVo> getUserGroupDifficultyStatistics(@Param("req") GetUserGroupTaskCompleteStatisticsReq req);
|
||||
List<UserGroupDifficultyVo> getUserGroupDifficultyStatistics(@Param("req") GetUserGroupTaskCompleteStatisticsReq req,@Param("taskMemberTypeList") List<Integer> taskMemberTypeList);
|
||||
|
||||
List<CommonGetCompleteFromTaskVo> getCommonCompleteStatisticsFromTask(@Param("req") CommonGetCompleteStatisticsReq req);
|
||||
|
||||
|
||||
@@ -2665,7 +2665,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
|
||||
req.setUserIds(userIds);
|
||||
|
||||
List<UserGroupTaskCompleteVo> userGroupTaskCompleteStatistics = this.baseMapper.getUserGroupTaskCompleteStatistics(req);
|
||||
List<UserGroupTaskCompleteVo> userGroupTaskCompleteStatistics = this.baseMapper.getUserGroupTaskCompleteStatistics(req,Arrays.asList(MemberTypeEnum.PRINCIPAL.getCode(),MemberTypeEnum.EXECUTOR.getCode()));
|
||||
|
||||
// 按用户分组统计任务状态
|
||||
Map<Long, UserGroupTaskCompleteStatisticsVo> userStatisticsMap = new HashMap<>();
|
||||
@@ -2720,7 +2720,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
userId2Nickname = new HashMap<>();
|
||||
}
|
||||
|
||||
List<UserGroupTaskCompleteVo> userGroupTaskCompleteStatistics = this.baseMapper.getAllUserTaskCompleteStatistics(req);
|
||||
List<UserGroupTaskCompleteVo> userGroupTaskCompleteStatistics = this.baseMapper.getAllUserTaskCompleteStatistics(req,Arrays.asList(MemberTypeEnum.PRINCIPAL.getCode(),MemberTypeEnum.EXECUTOR.getCode()));
|
||||
|
||||
// 按用户分组统计任务状态
|
||||
Map<Long, UserGroupTaskCompleteStatisticsVo> userStatisticsMap = new HashMap<>();
|
||||
@@ -2771,7 +2771,7 @@ public class NodeServiceImpl extends ServiceImpl<SimulationNodeMapper, Simulatio
|
||||
}
|
||||
req.setUserIds(userIds);
|
||||
|
||||
List<UserGroupDifficultyVo> userGroupDifficultyStatistics = this.baseMapper.getUserGroupDifficultyStatistics(req);
|
||||
List<UserGroupDifficultyVo> userGroupDifficultyStatistics = this.baseMapper.getUserGroupDifficultyStatistics(req,Arrays.asList(MemberTypeEnum.PRINCIPAL.getCode(),MemberTypeEnum.EXECUTOR.getCode()));
|
||||
|
||||
// 按用户分组统计任务状态
|
||||
Map<Long, UserGroupDifficultyStatisticsVo> userStatisticsMap = new HashMap<>();
|
||||
|
||||
@@ -466,13 +466,21 @@
|
||||
<select id="getUserGroupTaskCompleteStatistics"
|
||||
parameterType="com.sdm.project.model.req.GetUserGroupTaskCompleteStatisticsReq"
|
||||
resultType="com.sdm.project.model.vo.UserGroupTaskCompleteVo">
|
||||
select task.exe_status as exeStatus,
|
||||
select
|
||||
distinct
|
||||
task.uuid,
|
||||
task.exe_status as exeStatus,
|
||||
task_member.user_id as userId
|
||||
from simulation_task task
|
||||
left join simulation_task_member task_member on task.uuid = task_member.task_id
|
||||
<where>
|
||||
task.tenant_Id = #{req.tenantId}
|
||||
and
|
||||
simulation_task_member.type in(
|
||||
<foreach collection="taskMemberTypeList" item="taskMemberType" index="index" separator=",">
|
||||
#{taskMemberType}
|
||||
</foreach>
|
||||
and
|
||||
task_member.user_id in
|
||||
(
|
||||
<foreach collection='req.userIds' item='userId' index='index' separator=','>
|
||||
@@ -526,6 +534,12 @@
|
||||
left join simulation_task_member task_member on task.uuid = task_member.task_id
|
||||
<where>
|
||||
task.tenant_Id = #{req.tenantId}
|
||||
and
|
||||
simulation_task_member.type in(
|
||||
<foreach collection="taskMemberTypeList" item="taskMemberType" index="index" separator=",">
|
||||
#{taskMemberType}
|
||||
</foreach>
|
||||
|
||||
and task_member.user_id in
|
||||
(
|
||||
<foreach collection='req.userIds' item='userId' index='index' separator=','>
|
||||
@@ -548,6 +562,8 @@
|
||||
parameterType="com.sdm.project.model.req.GetUserGroupTaskCompleteStatisticsReq"
|
||||
resultType="com.sdm.project.model.vo.UserGroupDifficultyVo">
|
||||
select
|
||||
distinct
|
||||
task.uuid,
|
||||
task.difficult,
|
||||
task_member.user_id as userId
|
||||
from simulation_task task
|
||||
@@ -555,6 +571,12 @@
|
||||
<where>
|
||||
task.tenant_Id = #{req.tenantId}
|
||||
and
|
||||
simulation_task_member.type in(
|
||||
<foreach collection="taskMemberTypeList" item="taskMemberType" index="index" separator=",">
|
||||
#{taskMemberType}
|
||||
</foreach>
|
||||
)
|
||||
and
|
||||
task_member.user_id in
|
||||
(
|
||||
<foreach collection='req.userIds' item='userId' index='index' separator=','>
|
||||
|
||||
Reference in New Issue
Block a user