|
|
@@ -318,7 +318,7 @@ public class DataboardController {
|
|
|
@ApiOperation(value="学生健康统计")
|
|
|
@SaCheckPermission("databoard:detail")
|
|
|
public RT<HealthStatisticsVo> healthStatistics(@Valid StatisticsDto dto){
|
|
|
- String sql = "SELECT t1.gender,COUNT(t1.*) AS a_count FROM student_infection t1" +
|
|
|
+ String sql = "SELECT t1.gender,COUNT(t1.id) AS a_count FROM student_infection t1" +
|
|
|
" INNER JOIN xjr_workflow_form_relation t2 ON t1.id = t2.form_key_value" +
|
|
|
" WHERE t2.current_state = 'COMPLETED' GROUP BY t1.gender";
|
|
|
List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList(sql);
|
|
|
@@ -331,7 +331,7 @@ public class DataboardController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- sql = "SELECT t1.gender,COUNT(t1.*) AS a_count FROM student_psychological t1" +
|
|
|
+ sql = "SELECT t1.gender,COUNT(t1.id) AS a_count FROM student_psychological t1" +
|
|
|
" INNER JOIN xjr_workflow_form_relation t2 ON t1.id = t2.form_key_value" +
|
|
|
" WHERE t2.current_state = 'COMPLETED' GROUP BY t1.gender";
|
|
|
list = SqlRunnerAdapter.db().selectList(sql);
|
|
|
@@ -510,9 +510,9 @@ public class DataboardController {
|
|
|
sql += " and user_id = " + dto.getUserId();
|
|
|
}
|
|
|
list = SqlRunnerAdapter.db().selectList(sql);
|
|
|
- result.setLateCount(Integer.parseInt(list.get(0).get("a_count").toString()));
|
|
|
+ result.setLateCount(list.size());
|
|
|
|
|
|
- sql = "SELECT COUNT(t1.*) AS a_count FROM wf_course_adjust t1" +
|
|
|
+ sql = "SELECT COUNT(t1.id) AS a_count FROM wf_course_adjust t1" +
|
|
|
" INNER JOIN xjr_workflow_form_relation t2 ON t2.form_key_value = t1.id" +
|
|
|
" WHERE t1.adjust_type = 'course_exchange'" +
|
|
|
" AND t2.current_state = 'COMPLETED'";
|
|
|
@@ -525,7 +525,7 @@ public class DataboardController {
|
|
|
list = SqlRunnerAdapter.db().selectList(sql);
|
|
|
result.setAdjustCount(Integer.parseInt(list.get(0).get("a_count").toString()));
|
|
|
|
|
|
- sql = "SELECT COUNT(t1.*) AS a_count FROM wf_course_adjust t1" +
|
|
|
+ sql = "SELECT COUNT(t1.id) AS a_count FROM wf_course_adjust t1" +
|
|
|
" INNER JOIN xjr_workflow_form_relation t2 ON t2.form_key_value = t1.id" +
|
|
|
" WHERE t1.adjust_type = 'course_substitute'" +
|
|
|
" AND t2.current_state = 'COMPLETED'";
|