Преглед изворни кода

Merge branch 'master' into Joburgess

Joburgess пре 4 година
родитељ
комит
2c9305a088

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -3526,5 +3526,6 @@
             AND CONCAT(cs.class_date_,' ',cs.end_class_time_) <= #{endTime}
             AND CONCAT(cs.class_date_,' ',cs.end_class_time_) <= #{endTime}
             AND cs.group_type_ = 'MUSIC'
             AND cs.group_type_ = 'MUSIC'
             AND cs.teach_mode_ = 'OFFLINE'
             AND cs.teach_mode_ = 'OFFLINE'
+        ORDER BY cs.id_ ASC
     ]]></select>
     ]]></select>
 </mapper>
 </mapper>

+ 10 - 13
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -188,24 +188,21 @@
 
 
 	<select id="getSchoolData" resultMap="IndexBaseMonthData">
 	<select id="getSchoolData" resultMap="IndexBaseMonthData">
 		SELECT
 		SELECT
-			organ_id_,
+			mg.organ_id_,
 			CONCAT(#{month}, '-01') month_,
 			CONCAT(#{month}, '-01') month_,
-			COUNT( id_ ) total_num_,
-			COUNT( id_ ) activate_num_,
-			COUNT( id_ ) percent_
+			COUNT( DISTINCT mg.cooperation_organ_id_ ) total_num_,
+			COUNT( DISTINCT mg.cooperation_organ_id_ ) activate_num_,
+			COUNT( DISTINCT mg.cooperation_organ_id_ ) percent_
 		FROM
 		FROM
-			cooperation_organ
+			music_group mg
 		WHERE
 		WHERE
-			del_flag_ = 0
-		  	AND is_enable_ = 1
-		  	AND organ_id_ IS NOT NULL
-		  	<if test="month!=null and month!=''">
-				AND DATE_FORMAT(create_time_, '%Y-%m') &lt;= #{month}
-			</if>
+			mg.del_flag_ = 0
+		  AND mg.organ_id_ IS NOT NULL
+		  AND mg.status_ = 'PROGRESS'
 		GROUP BY
 		GROUP BY
-			organ_id_
+			mg.organ_id_
 		ORDER BY
 		ORDER BY
-			organ_id_;
+			mg.organ_id_;
 	</select>
 	</select>
 	<select id="getMusicData" resultMap="IndexBaseMonthData">
 	<select id="getMusicData" resultMap="IndexBaseMonthData">
 		SELECT
 		SELECT

+ 2 - 0
mec-biz/src/main/resources/config/mybatis/InspectionItemPlanConclusionMapper.xml

@@ -99,6 +99,7 @@
         <if test="checkItem != null">
         <if test="checkItem != null">
             AND check_item_ = #{checkItem}
             AND check_item_ = #{checkItem}
         </if>
         </if>
+        ORDER BY check_item_ ASC,course_schedule_id_ ASC
     </select>
     </select>
 
 
     <select id="getPlanConclusionCourses" resultMap="com.ym.mec.biz.dal.dao.CourseScheduleDao.CourseSchedule">
     <select id="getPlanConclusionCourses" resultMap="com.ym.mec.biz.dal.dao.CourseScheduleDao.CourseSchedule">
@@ -111,6 +112,7 @@
                  LEFT JOIN sys_user su on iipc.teacher_id_ = su.id_
                  LEFT JOIN sys_user su on iipc.teacher_id_ = su.id_
         WHERE plan_id_ = #{planId}
         WHERE plan_id_ = #{planId}
         GROUP BY iipc.course_schedule_id_, iipc.teacher_id_
         GROUP BY iipc.course_schedule_id_, iipc.teacher_id_
+        ORDER BY iipc.course_schedule_id_ ASC
     </select>
     </select>
 
 
     <select id="getCountByPlanIdAndCheckConclusion" resultType="int">
     <select id="getCountByPlanIdAndCheckConclusion" resultType="int">

+ 34 - 0
mec-web/src/main/java/com/ym/mec/web/controller/InspectionItemPlanConclusionController.java

@@ -0,0 +1,34 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.biz.dal.entity.InspectionItemPlanConclusion;
+import com.ym.mec.biz.service.InspectionItemPlanConclusionService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+@Api(tags = "巡查结果")
+@RequestMapping("inspectionItemPlanConclusion")
+@RestController
+public class InspectionItemPlanConclusionController extends BaseController {
+    @Autowired
+    private InspectionItemPlanConclusionService InspectionItemPlanConclusionService;
+
+    @ApiOperation(value = "获取日程的巡查结果")
+    @GetMapping("/getInfo")
+    @PreAuthorize("@pcs.hasPermissions('inspectionItemPlanConclusion/getInfo')")
+    @ApiImplicitParams({@ApiImplicitParam(name = "planId", value = "日程id", required = true, dataType = "int"),
+            @ApiImplicitParam(name = "checkItem", value = "巡查结果项", required = false, dataType = "int")})
+    public HttpResponseResult<Map<Integer, List<InspectionItemPlanConclusion>>> getInfo(Long planId, Integer checkItem) {
+        return succeed(InspectionItemPlanConclusionService.getInfo(planId, checkItem));
+    }
+    
+}