瀏覽代碼

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

yonge 4 年之前
父節點
當前提交
5438edabb8

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherAttendance.java

@@ -108,6 +108,16 @@ public class TeacherAttendance {
 	@ApiModelProperty(value = "签退设备号")
 	private String signOutDeviceNo;
 
+	private String deviceNum;
+
+	public String getDeviceNum() {
+		return deviceNum;
+	}
+
+	public void setDeviceNum(String deviceNum) {
+		this.deviceNum = deviceNum;
+	}
+
 	public String getSignInDeviceNo() {
 		return signInDeviceNo;
 	}

+ 5 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -5276,8 +5276,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		List<CourseScheduleStudentPayment> newPayments = new ArrayList<>();
 		List<CourseScheduleStudentPayment> updatePayments = new ArrayList<>();
 		for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) {
-			if(mainStudentCourseMap.keySet().contains(courseScheduleStudentPayment.getUserId())){
-				CourseScheduleStudentPayment updatePayment = mainStudentCourseMap.get(courseScheduleStudentPayment.getUserId());
+			CourseScheduleStudentPayment updatePayment = mainStudentCourseMap.get(courseScheduleStudentPayment.getUserId());
+			if(Objects.nonNull(updatePayment)&&!updatePayment.getCourseScheduleId().equals(courseScheduleStudentPayment.getCourseScheduleId())){
 				updatePayment.setExpectPrice(updatePayment.getExpectPrice().add(courseScheduleStudentPayment.getExpectPrice()));
 				courseScheduleStudentPayment.setExpectPrice(BigDecimal.ZERO);
 				updatePayments.add(updatePayment);
@@ -5319,7 +5319,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		}
 		courseScheduleDao.batchUpdate(mergeCourses);
 
-		courseScheduleStudentPaymentDao.batchInsert(newPayments);
+		courseScheduleStudentPaymentDao.batchUpdate(updatePayments);
+		if(!CollectionUtils.isEmpty(newPayments))
+			courseScheduleStudentPaymentDao.batchInsert(newPayments);
 
 		courseAdjust(courseSchedules);
 

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServeServiceImpl.java

@@ -451,7 +451,11 @@ public class StudentServeServiceImpl implements StudentServeService {
                 }
                 s.setServeType(result.getServeType());
                 s.setCourseIds(StringUtils.join(courseIds, ","));
-                s.setExpectExercisesNum(courseIds.size());
+                if(StringUtils.isBlank(s.getCourseIds())){
+                    s.setExpectExercisesNum(1);
+                }else{
+                    s.setExpectExercisesNum(courseIds.size());
+                }
                 updateService.add(s);
             }else{
                 newService.add(result);

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -203,6 +203,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 			}else {
 				throw new BizException("签到时间异常");
 			}
+			teacherAttendance.setSignInDeviceNo(teacherAttendance.getDeviceNum());
 			if(Objects.nonNull(teacherAttendance.getId())){
 				teacherAttendanceDao.update(teacherAttendance);
 			}else{
@@ -255,6 +256,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 			}else {
 				throw new BizException("签退时间异常");
 			}
+			teacherAttendance.setSignOutDeviceNo(teacherAttendance.getDeviceNum());
 			if(Objects.nonNull(teacherAttendance.getId())){
 				teacherAttendanceDao.update(teacherAttendance);
 			}else{

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

@@ -610,6 +610,7 @@
     <select id="getTeacherCourseSchedulesWithDate" resultMap="courseScheduleDto">
         SELECT
         cs.id_ seal_class_id_,
+        cs.new_course_id_,
         cg.name_,
         su.real_name_ teacher_name_,
         cs.type_,

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

@@ -530,7 +530,7 @@
                 AND FIND_IN_SET(cs.organ_id_,#{organId})
             </if>
         </where>
-        ORDER BY cs.id_ asc
+        ORDER BY CONCAT(cs.class_date_, ' ', cs.start_class_time_) asc
         <include refid="global.limit"/>
     </select>
     

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

@@ -480,7 +480,7 @@
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="actual_teacher_id_" property="actualTeacherId"/>
         <result column="course_start_time_" property="courseStartTime"/>
-        <result column="" property="teachMode"/>
+        <result column="teach_mode_" property="teachMode"/>
     </resultMap>
 
     <select id="getStudentFutureCourseInfo" resultMap="StudentServeCourseDto">
@@ -506,7 +506,7 @@
                     #{studentId}
                 </foreach>
             </if>
-        ORDER BY cssp.user_id_,start_class_time_
+        ORDER BY cssp.user_id_,course_start_time_
     </select>
 
     <select id="getStudentNames" resultType="string">

+ 2 - 2
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -262,8 +262,8 @@ public class TaskController extends BaseController {
 
 	//学生服务信息统计
 	@GetMapping("/exercisesSituationStatistics")
-	public void exercisesSituationStatistics(){
-		studentServeService.exercisesSituationStatistics2(null,null);
+	public void exercisesSituationStatistics(String monday){
+		studentServeService.exercisesSituationStatistics2(monday,null);
 //		studentServeService.exercisesSituationStatistics2(null,new ArrayList<>(Arrays.asList(1095257)));
 //		studentServeService.exercisesSituationStatistics(null);
 	}