Joburgess 5 лет назад
Родитель
Сommit
92ca03e1c8

+ 3 - 1
edu-common/src/main/java/com/keao/edu/common/enums/MessageTypeEnum.java

@@ -1,7 +1,9 @@
 package com.keao.edu.common.enums;
 
 public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
-    SMS_VERIFY_CODE_LOGIN("SMS_VERIFY_CODE_LOGIN", "验证码登录");
+
+    SMS_VERIFY_CODE_LOGIN("SMS_VERIFY_CODE_LOGIN", "验证码登录"),
+    EXAM_REGISTRATION_URL_PUSH("EXAM_REGISTRATION_URL_PUSH", "报名连接推送");
 
     MessageTypeEnum(String code, String msg) {
         this.code = code;

+ 3 - 3
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamReview.java

@@ -30,7 +30,7 @@ public class ExamReview {
 	
 	/** 结果 */
 	@ApiModelProperty(value = "结果")
-	private ExamEvaluationResultEnum evaluationResult;
+	private Integer evaluationResult;
 	
 	private java.util.Date createTime;
 	
@@ -92,11 +92,11 @@ public class ExamReview {
 		return this.evaluationContent;
 	}
 
-	public ExamEvaluationResultEnum getEvaluationResult() {
+	public Integer getEvaluationResult() {
 		return evaluationResult;
 	}
 
-	public void setEvaluationResult(ExamEvaluationResultEnum evaluationResult) {
+	public void setEvaluationResult(Integer evaluationResult) {
 		this.evaluationResult = evaluationResult;
 	}
 

+ 36 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamTeacherSalary.java

@@ -5,6 +5,8 @@ import com.keao.edu.user.enums.SettlementTypeEnum;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import java.math.BigDecimal;
+
 /**
  * 对应数据库表(exam_teacher_salary):
  */
@@ -27,6 +29,15 @@ public class ExamTeacherSalary {
 	@ApiModelProperty(value = "分润金额")
 	private java.math.BigDecimal shareProfitAmount;
 
+	@ApiModelProperty(value = "总监考次数")
+	private Integer totalInvigilationNum;
+
+	@ApiModelProperty(value = "监考学员数")
+	private Integer totalInvigilationStudentNum;
+
+	@ApiModelProperty(value = "结算费用")
+	private BigDecimal totalSettlementCost;
+
 	private java.util.Date createTime;
 
 	private java.util.Date updateTime;
@@ -80,7 +91,31 @@ public class ExamTeacherSalary {
 	public java.math.BigDecimal getShareProfitAmount(){
 		return this.shareProfitAmount;
 	}
-			
+
+	public Integer getTotalInvigilationNum() {
+		return totalInvigilationNum;
+	}
+
+	public void setTotalInvigilationNum(Integer totalInvigilationNum) {
+		this.totalInvigilationNum = totalInvigilationNum;
+	}
+
+	public Integer getTotalInvigilationStudentNum() {
+		return totalInvigilationStudentNum;
+	}
+
+	public void setTotalInvigilationStudentNum(Integer totalInvigilationStudentNum) {
+		this.totalInvigilationStudentNum = totalInvigilationStudentNum;
+	}
+
+	public BigDecimal getTotalSettlementCost() {
+		return totalSettlementCost;
+	}
+
+	public void setTotalSettlementCost(BigDecimal totalSettlementCost) {
+		this.totalSettlementCost = totalSettlementCost;
+	}
+
 	public void setCreateTime(java.util.Date createTime){
 		this.createTime = createTime;
 	}

+ 12 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/StudentExamResult.java

@@ -23,6 +23,9 @@ public class StudentExamResult {
 	@ApiModelProperty(value = "考试结果")
 	private ExamEvaluationResultEnum result;
 
+	@ApiModelProperty(value = "教师评审均分")
+	private Float avgScore;
+
 	@ApiModelProperty(value = "考试结果确认")
 	private Boolean confirmStatus;
 	
@@ -120,7 +123,15 @@ public class StudentExamResult {
 	public java.util.Date getUpdateTime(){
 		return this.updateTime;
 	}
-			
+
+	public Float getAvgScore() {
+		return avgScore;
+	}
+
+	public void setAvgScore(Float avgScore) {
+		this.avgScore = avgScore;
+	}
+
 	public void setTenantId(String tenantId){
 		this.tenantId = tenantId;
 	}

+ 36 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/Teacher.java

@@ -6,6 +6,8 @@ import com.keao.edu.user.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
+import java.math.BigDecimal;
+
 /**
  * 对应数据库表(teacher):
  */
@@ -28,6 +30,15 @@ public class Teacher {
 
 	@ApiModelProperty(value = "是否删除",required = false)
 	private YesOrNoEnum delFlag;
+
+	@ApiModelProperty(value = "总监考次数")
+	private Integer totalInvigilationNum;
+
+	@ApiModelProperty(value = "监考学员数")
+	private Integer totalInvigilationStudentNum;
+
+	@ApiModelProperty(value = "结算费用")
+	private BigDecimal totalSettlementCost;
 	
 	/**  */
 	private java.util.Date createTime;
@@ -103,7 +114,31 @@ public class Teacher {
 	public java.math.BigDecimal getSalary(){
 		return this.salary;
 	}
-			
+
+	public Integer getTotalInvigilationNum() {
+		return totalInvigilationNum;
+	}
+
+	public void setTotalInvigilationNum(Integer totalInvigilationNum) {
+		this.totalInvigilationNum = totalInvigilationNum;
+	}
+
+	public Integer getTotalInvigilationStudentNum() {
+		return totalInvigilationStudentNum;
+	}
+
+	public void setTotalInvigilationStudentNum(Integer totalInvigilationStudentNum) {
+		this.totalInvigilationStudentNum = totalInvigilationStudentNum;
+	}
+
+	public BigDecimal getTotalSettlementCost() {
+		return totalSettlementCost;
+	}
+
+	public void setTotalSettlementCost(BigDecimal totalSettlementCost) {
+		this.totalSettlementCost = totalSettlementCost;
+	}
+
 	public void setCreateTime(java.util.Date createTime){
 		this.createTime = createTime;
 	}

+ 12 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamOrganizationRelationServiceImpl.java

@@ -1,11 +1,15 @@
 package com.keao.edu.user.service.impl;
 
+import com.keao.edu.auth.api.client.SysMessageFeignService;
+import com.keao.edu.auth.api.entity.SysUser;
 import com.keao.edu.common.dal.BaseDAO;
+import com.keao.edu.common.enums.MessageTypeEnum;
 import com.keao.edu.common.exception.BizException;
 import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.page.QueryInfo;
 import com.keao.edu.common.service.impl.BaseServiceImpl;
 import com.keao.edu.common.tenant.TenantContextHolder;
+import com.keao.edu.thirdparty.message.MessageSenderPluginContext;
 import com.keao.edu.user.dao.ExamOrganizationRelationDao;
 import com.keao.edu.user.dao.ExaminationBasicDao;
 import com.keao.edu.user.entity.ExamOrganizationRelation;
@@ -41,6 +45,8 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 	private OrganizationService organizationService;
 	@Autowired
 	private ShortUrlService shortUrlService;
+	@Autowired
+	private SysMessageFeignService sysMessageFeignService;
 
 	@Override
 	public BaseDAO<Long, ExamOrganizationRelation> getDAO() {
@@ -133,6 +139,12 @@ public class ExamOrganizationRelationServiceImpl extends BaseServiceImpl<Long, E
 		for (ExamOrganizationRelation examOrgan : examOrgans) {
 			examOrgan.setUrl(shortUrlService.createShortUrl(""));
 			examOrgan.setSendUrlFlag(YesOrNoEnum.YES);
+
+//			SysUser student = teacherDao.getUser(practiceGroup.getStudentId());
+//			Map<Integer, String> userPhoneMap = new HashMap<>();
+//			userPhoneMap.put(practiceGroup.getStudentId(), student.getPhone());
+//			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI, MessageTypeEnum.EXAM_REGISTRATION_URL_PUSH,
+//					userPhoneMap, null, 0, null, "STUDENT", groupStartTime, groupEndTime, teacherName, drillTimesOnWeek, firstCourseStartTime);
 		}
 
 		examOrganizationRelationDao.batchUpdate(examOrgans);

+ 16 - 2
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamTeacherSalaryMapper.xml

@@ -13,6 +13,9 @@
 		<result column="teacher_id_" property="teacherId" />
 		<result column="settlement_type_" property="settlementType" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" />
 		<result column="share_profit_amount_" property="shareProfitAmount" />
+		<result column="total_invigilation_num_" property="totalInvigilationNum"/>
+		<result column="total_invigilation_student_num_" property="totalInvigilationStudentNum"/>
+		<result column="total_settlement_fee_" property="totalSettlementCost"/>
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 		<result column="tenant_id_" property="tenantId" />
@@ -30,8 +33,10 @@
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamTeacherSalary" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO exam_teacher_salary (id_,examination_basic_id_,exam_mode_,teacher_id_,settlement_type_,share_profit_amount_,create_time_,update_time_,tenant_id_)
-		VALUES(#{id},#{examinationBasicId},#{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{teacherId},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{shareProfitAmount},NOW(),NOW(),#{tenantId})
+		INSERT INTO exam_teacher_salary (id_,examination_basic_id_,exam_mode_,teacher_id_,settlement_type_,share_profit_amount_,
+		total_invigilation_num_,total_invigilation_student_num_,total_settlement_fee_,create_time_,update_time_,tenant_id_)
+		VALUES(#{id},#{examinationBasicId},#{examMode,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{teacherId},#{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{shareProfitAmount},
+		#{totalInvigilationNum},#{totalInvigilationStudentNum},#{totalSettlementCost},NOW(),NOW(),#{tenantId})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -56,6 +61,15 @@
 			<if test="settlementType != null">
 				settlement_type_ = #{settlementType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
 			</if>
+			<if test="totalInvigilationNum != null">
+				total_invigilation_num_ = #{totalInvigilationNum},
+			</if>
+			<if test="totalInvigilationStudentNum != null">
+				total_invigilation_student_num_ = #{totalInvigilationStudentNum},
+			</if>
+			<if test="totalSettlementCost != null">
+				total_settlement_fee_ = #{totalSettlementCost},
+			</if>
 				update_time_ = NOW()
 		</set> WHERE id_ = #{id}
 	</update>

+ 4 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExaminationBasicMapper.xml

@@ -151,7 +151,10 @@
 		<where>
 			tenant_id_=#{tenantId}
 			<if test="examStatus!=null">
-				status_=#{examStatus}
+				AND status_=#{examStatus}
+			</if>
+			<if test="search!=null">
+				AND (id_=#{search} OR name_ LIKE CONCAT(#{search}, '%'))
 			</if>
 		</where>
 	</sql>

+ 8 - 4
edu-user/edu-user-server/src/main/resources/config/mybatis/StudentExamResultMapper.xml

@@ -11,6 +11,7 @@
 		<result column="examination_basic_id_" property="examinationBasicId" />
 		<result column="student_id_" property="studentId" />
 		<result column="result_" property="result" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler" />
+		<result column="avg_score_" property="avgScore"/>
 		<result column="confirm_status_" property="confirmStatus" />
 		<result column="is_finished_exam_" property="isFinishedExam" />
 		<result column="memo_" property="memo" />
@@ -33,16 +34,16 @@
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.keao.edu.user.entity.StudentExamResult" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO student_exam_result (id_,examination_basic_id_,student_id_,result_,confirm_status_,memo_,operator_id_,is_finished_exam_,create_time_,update_time_,tenant_id_)
-		VALUES(#{id},#{examinationBasicId},#{studentId},#{result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{confirmStatus},#{memo},#{operatorId},#{isFinishedExam},NOW(),NOW(),#{tenantId})
+		INSERT INTO student_exam_result (id_,examination_basic_id_,student_id_,result_,avg_score_,confirm_status_,memo_,operator_id_,is_finished_exam_,create_time_,update_time_,tenant_id_)
+		VALUES(#{id},#{examinationBasicId},#{studentId},#{result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{avgScore},#{confirmStatus},#{memo},#{operatorId},#{isFinishedExam},NOW(),NOW(),#{tenantId})
 	</insert>
 
 	<insert id="batchInsert" parameterType="com.keao.edu.user.entity.StudentExamResult" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO student_exam_result (examination_basic_id_,student_id_,result_,confirm_status_,memo_,operator_id_,is_finished_exam_,create_time_,update_time_,tenant_id_)
+		INSERT INTO student_exam_result (examination_basic_id_,student_id_,result_,#{avg_score_},confirm_status_,memo_,operator_id_,is_finished_exam_,create_time_,update_time_,tenant_id_)
 		VALUES
 		<foreach collection="results" item="result" separator=",">
 			(#{result.examinationBasicId},#{result.studentId},#{result.result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
-			#{result.confirmStatus},#{result.memo},#{result.operatorId},#{result.isFinishedExam},NOW(),NOW(),#{result.tenantId})
+			#{result.avgScore},#{result.confirmStatus},#{result.memo},#{result.operatorId},#{result.isFinishedExam},NOW(),NOW(),#{result.tenantId})
 		</foreach>
 	</insert>
 
@@ -68,6 +69,9 @@
 			<if test="result != null">
 				result_ = #{result,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
 			</if>
+			<if test="avgScore != null">
+				avg_score_ = #{avgScore},
+			</if>
 			<if test="memo != null">
 				memo_ = #{memo},
 			</if>

+ 12 - 0
edu-user/edu-user-server/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -13,6 +13,9 @@
 		<result column="salary_settlement_type_" property="salarySettlementType" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
 		<result column="salary_" property="salary" />
 		<result column="del_flag_" property="delFlag" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
+		<result column="total_invigilation_num_" property="totalInvigilationNum"/>
+		<result column="total_invigilation_student_num_" property="totalInvigilationStudentNum"/>
+		<result column="total_settlement_fee_" property="totalSettlementCost"/>
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 		<result column="tenant_id_" property="tenantId" />
@@ -46,6 +49,15 @@
 			<if test="tenantId != null">
 				tenant_id_ = #{tenantId},
 			</if>
+			<if test="totalInvigilationNum != null">
+				total_invigilation_num_ = #{totalInvigilationNum},
+			</if>
+			<if test="totalInvigilationStudentNum != null">
+				total_invigilation_student_num_ = #{totalInvigilationStudentNum},
+			</if>
+			<if test="totalSettlementCost != null">
+				total_settlement_fee_ = #{totalSettlementCost},
+			</if>
 			update_time_ = NOW()
 		</set>
 		WHERE user_id_ = #{userId}