Commit 907798cc authored by 高滢's avatar 高滢

Merge branch 'gaoying' into 'dev'

首页参与任务情况统计

See merge request !239
parents 7276931a 18076f4b
package com.ruoyi.domain.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("首页参与任务情况")
public class TaskParticipationStatisticsVO {
@ApiModelProperty("用户名称")
private String userName;
@ApiModelProperty("项目数量")
private Integer taskNum;
}
package com.ruoyi.mapper;
import com.ruoyi.domain.vo.ConfidentialityLevelProportionVO;
import com.ruoyi.domain.vo.InspectionItemPassedNumVO;
import com.ruoyi.domain.vo.QuantityStatisticsVO;
import com.ruoyi.domain.vo.StandardCategoryStatisticsVO;
import com.ruoyi.domain.vo.*;
import org.springframework.stereotype.Repository;
import java.util.List;
......@@ -22,4 +19,7 @@ public interface StatisticsHomeMapper {
// 体系审查任务通过数量
public InspectionItemPassedNumVO selectInspectionItemPassedNum();
// 参与任务情况统计
public List<TaskParticipationStatisticsVO> selectTaskParticipationStatistics();
}
package com.ruoyi.service;
import com.ruoyi.domain.vo.AverageInspectionRateVO;
import com.ruoyi.domain.vo.ConfidentialityLevelProportionVO;
import com.ruoyi.domain.vo.QuantityStatisticsVO;
import com.ruoyi.domain.vo.StandardCategoryStatisticsVO;
import com.ruoyi.domain.vo.*;
import java.util.List;
......@@ -19,4 +16,7 @@ public interface StatisticsHomeService {
//平均检验通过率
public List<AverageInspectionRateVO> selectAverageInspectionRate();
// 参与任务情况统计
public List<TaskParticipationStatisticsVO> selectTaskParticipationStatistics();
}
......@@ -67,6 +67,11 @@ public class StatisticsHomeServiceImpl implements StatisticsHomeService {
return list;
}
@Override
public List<TaskParticipationStatisticsVO> selectTaskParticipationStatistics(){
return statisticsHomeMapper.selectTaskParticipationStatistics();
}
// 计算两个数各占比
public int percentageCalculation(Integer a, Integer b){
int total = a+b;
......
package com.ruoyi.web;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.domain.vo.AverageInspectionRateVO;
import com.ruoyi.domain.vo.ConfidentialityLevelProportionVO;
import com.ruoyi.domain.vo.QuantityStatisticsVO;
import com.ruoyi.domain.vo.StandardCategoryStatisticsVO;
import com.ruoyi.domain.vo.*;
import com.ruoyi.service.StatisticsHomeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -44,4 +41,9 @@ public class StatisticsHomeController {
public R<List<AverageInspectionRateVO>> selectAverageInspectionRate(){
return R.ok(statisticsHomeService.selectAverageInspectionRate());
}
@ApiOperation("首页任务情况安排")
@PostMapping("/taskParticipation")
public R<List<TaskParticipationStatisticsVO>> selectTaskParticipationStatistics(){
return R.ok(statisticsHomeService.selectTaskParticipationStatistics());
}
}
......@@ -58,4 +58,14 @@
( SELECT COUNT( id ) FROM t_model_test_task WHERE task_status = 'FINISH' ) AS modelTestCompletedNum,
( SELECT COUNT( id ) FROM t_model_test_task WHERE task_status = 'FINISH' AND task_result = 'PASS' ) AS modelTestPassedNum
</select>
<select id="selectTaskParticipationStatistics" resultType="com.ruoyi.domain.vo.TaskParticipationStatisticsVO">
SELECT
count( task_id ) AS taskNum,
NAME AS userName
FROM
t_task_user_relation
GROUP BY
user_id,NAME
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment