소스 검색

1、数据看板调整
2、学生处分调整

dzx 1 년 전
부모
커밋
1badd5d39e

+ 5 - 5
src/main/java/com/xjrsoft/module/databoard/controller/DataboardController.java

@@ -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'";

+ 1 - 1
src/main/java/com/xjrsoft/module/student/entity/BasePunishmentStudentHandle.java

@@ -36,7 +36,7 @@ public class BasePunishmentStudentHandle implements Serializable {
     * 学生id
     */
     @ApiModelProperty("学生处分id")
-    private Long basePunishmentStudentInfoId;
+    private Long baseStudentPunishmentInfoId;
     /**
     * 调整类型 1:升级 2:降级 3:撤销
     */

+ 2 - 2
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentPunishmentInfoServiceImpl.java

@@ -129,7 +129,7 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
         //********************************* BasePunishmentStudentRelation  增删改  开始 *******************************************/
         {
             // 查出所有子级的id
-            List<BasePunishmentStudentHandle> basePunishmentStudentHandleList = relationMapper.selectList(Wrappers.lambdaQuery(BasePunishmentStudentHandle.class).eq(BasePunishmentStudentHandle::getBasePunishmentStudentInfoId, baseStudentPunishmentInfo.getId()).select(BasePunishmentStudentHandle::getId));
+            List<BasePunishmentStudentHandle> basePunishmentStudentHandleList = relationMapper.selectList(Wrappers.lambdaQuery(BasePunishmentStudentHandle.class).eq(BasePunishmentStudentHandle::getBaseStudentPunishmentInfoId, baseStudentPunishmentInfo.getId()).select(BasePunishmentStudentHandle::getId));
             List<Long> basePunishmentStudentRelationIds = basePunishmentStudentHandleList.stream().map(BasePunishmentStudentHandle::getId).collect(Collectors.toList());
         }
         //********************************* BasePunishmentStudentRelation  增删改  结束 *******************************************/
@@ -141,7 +141,7 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
     @Transactional(rollbackFor = Exception.class)
     public Boolean delete(List<Long> ids) {
         punishmentInfoMapper.deleteBatchIds(ids);
-        relationMapper.delete(Wrappers.lambdaQuery(BasePunishmentStudentHandle.class).in(BasePunishmentStudentHandle::getBasePunishmentStudentInfoId, ids));
+        relationMapper.delete(Wrappers.lambdaQuery(BasePunishmentStudentHandle.class).in(BasePunishmentStudentHandle::getBaseStudentPunishmentInfoId, ids));
 
         return true;
     }

+ 1 - 1
src/main/resources/mapper/student/BaseStudentPunishmentInfoMapper.xml

@@ -60,7 +60,7 @@
         INNER JOIN xjr_user t3 ON t1.user_id = t3.id
         LEFT JOIN base_punishment_type t4 ON t1.punishment_type_id = t4.id
         LEFT JOIN base_class t5 ON t2.class_id = t5.id
-        WHERE t1.status = 1 AND t1.delete_mark = 0 AND t3.delete_mark = 0 AND t2.delete_mark = 0
+        WHERE t1.delete_mark = 0 AND t3.delete_mark = 0 AND t2.delete_mark = 0
         AND t5.id IN (SELECT id FROM base_class WHERE teacher_id = #{dto.teacherId})
         <if test="dto.punishmentTypeIds != null and dto.punishmentTypeIds.size() > 0">
             AND t4.id in