瀏覽代碼

Merge branch 'master' of http://git.dayaedu.com/yonge/edu-saas

zouxuan 5 年之前
父節點
當前提交
27162e19f5

+ 1 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamRegistrationDao.java

@@ -185,4 +185,5 @@ public interface ExamRegistrationDao extends BaseDAO<Long, ExamRegistration> {
      * @return com.keao.edu.user.dto.OrganExamRegistStatisticsDto
      */
     List<OrganExamRegistStatisticsDto> getOrganExamRegistStatistics(Map<String, Object> params);
+    int countOrganExamRegistStatistics(Map<String, Object> params);
 }

+ 1 - 1
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExaminationBasicDao.java

@@ -56,5 +56,5 @@ public interface ExaminationBasicDao extends BaseDAO<Long, ExaminationBasic> {
      * @param organIds:
      * @return com.keao.edu.user.dto.ExamStatisticsDto
      */
-    ExamStatisticsDto getTenantExamStatistics(@Param("organs") List<Integer> organIds);
+    ExamStatisticsDto getTenantExamStatistics(@Param("organIds") List<Integer> organIds);
 }

+ 1 - 1
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/enums/TeacherSettlementTypeEnum.java

@@ -8,7 +8,7 @@ import com.keao.edu.common.enums.BaseEnum;
  */
 public enum TeacherSettlementTypeEnum implements BaseEnum<String, TeacherSettlementTypeEnum> {
 
-    SINGLE("SINGLE", "次结算"),
+    SINGLE("SINGLE", "次结算"),
     PEOPLE_NUM("PEOPLE_NUM", "人数结算"),
     SUBSIDY_NUM("SUBSIDY_NUM", "组合(补贴+人数)");
 

+ 1 - 1
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/ExamRegistrationServiceImpl.java

@@ -410,7 +410,7 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
         params.put("organIds", childOrganIds);
 
         List<OrganExamRegistStatisticsDto> dataList = null;
-        int count = childOrganIds.size();
+        int count = examRegistrationDao.countOrganExamRegistStatistics(params);
         if (count > 0) {
             pageInfo.setTotal(count);
             params.put("offset", pageInfo.getOffset());

+ 9 - 2
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/service/impl/StudentExamResultServiceImpl.java

@@ -215,9 +215,16 @@ public class StudentExamResultServiceImpl extends BaseServiceImpl<Long, StudentE
 			for (Object examResultConfig : examResultConfigs) {
 				Integer startScore = ((JSONObject) examResultConfig).getInteger("startScore");
 				Integer endScore = ((JSONObject) examResultConfig).getInteger("endScore");
-				if(studentExamResult.getAvgScore()>=startScore&&studentExamResult.getAvgScore()<=endScore){
-					String levelName = ((JSONObject) examResultConfig).getString("levelName");
+				String levelName = ((JSONObject) examResultConfig).getString("levelName");
+				boolean b;
+				if(levelName.equals(ExamEvaluationResultEnum.EXCELLENT.getCode())){
+					b = studentExamResult.getAvgScore()>=startScore&&studentExamResult.getAvgScore()<=endScore;
+				}else{
+					b = studentExamResult.getAvgScore()>=startScore&&studentExamResult.getAvgScore()<endScore;
+				}
+				if(b){
 					studentExamResult.setResult(ExamEvaluationResultEnum.valueOf(levelName));
+					break;
 				}
 			}
 		}

+ 21 - 4
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -656,13 +656,30 @@
 		FROM
 			organization o
 			LEFT JOIN exam_registration er ON er.organ_id_ = o.id_ AND er.status_ IN ('AUDIT_WAIT', 'AUDIT_PASS', 'AUDIT_REJECT')
-		WHERE o.id_ IN
-			<foreach collection="organIds" item="organId" separator="," open="(" close=")">
-				#{organId}
-			</foreach>
+		WHERE 1=1
+			<if test="organIds!=null">
+				AND o.id_ IN
+				<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+					#{organId}
+				</foreach>
+			</if>
 		GROUP BY
 			o.id_
 		ORDER BY o.id_
 		<include refid="global.limit"/>
 	</select>
+
+	<select id="countOrganExamRegistStatistics" resultType="int">
+		SELECT
+			COUNT(o.id_)
+		FROM
+			organization o
+		WHERE 1=1
+			<if test="organIds!=null">
+				AND o.id_ IN
+				<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+					#{organId}
+				</foreach>
+			</if>
+	</select>
 </mapper>

+ 14 - 10
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExaminationBasicMapper.xml

@@ -295,12 +295,14 @@
 		exam_organization_relation eor
 		LEFT JOIN examination_basic eb ON eor.examination_basic_id_ = eb.id_
 		WHERE status_ IN ( 'APPLYING', 'APPLIED' )
-		AND (eor.organ_id_ = #{organId}
-			OR eb.organ_id_ IN
-			<foreach collection="organIds" item="organId" separator="," open="(" close=")">
-				#{organId}
-			</foreach>
-			)
+		<if test="organId!=null">
+			AND (eor.organ_id_ = #{organId}
+				OR eb.organ_id_ IN
+				<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+					#{organId}
+				</foreach>
+				)
+		</if>
 		ORDER BY
 		create_time_ DESC
 		LIMIT 6;
@@ -314,9 +316,11 @@
 			examination_basic
 		WHERE
 			status_ NOT IN ( 'CLOSE', 'DELETE' )
-			AND organ_id_ IN
-			<foreach collection="organs" item="organ" separator="," open="(" close=")">
-				#{organ}
-			</foreach>
+			<if test="organIds!=null">
+				AND organ_id_ IN
+				<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+					#{organId}
+				</foreach>
+			</if>
 	</select>
 </mapper>

+ 1 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/controller/ExaminationBasicController.java

@@ -116,7 +116,7 @@ public class ExaminationBasicController extends BaseController {
     }
 
     @ApiOperation("获取首页进行中项目")
-    @PostMapping(value = "/getHomePageExams")
+    @GetMapping(value = "/getHomePageExams")
     @PreAuthorize("@pcs.hasPermissions('examinationBasic/getHomePageExams')")
     public HttpResponseResult getHomePageExams(){
         SysUser sysUser = sysUserFeignService.queryUserInfo();

二進制
edu-user/edu-user-server/src/main/resources/excelTemplate/teacher.xls