瀏覽代碼

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

zouxuan 4 年之前
父節點
當前提交
faea17e6f3

+ 1 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupTeacherMapperServiceImpl.java

@@ -309,8 +309,6 @@ public class ClassGroupTeacherMapperServiceImpl extends BaseServiceImpl<Long, Cl
             List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaryList = new ArrayList<>();
             List<TeacherAttendance> teacherAttendances = new ArrayList<>();
 
-            List<CourseScheduleTeacherSalary> allTeacherSalarys = courseScheduleTeacherSalaryDao.findByTeacher(musicGroupId, GroupType.MUSIC, classGroupNoStartCourseSchedule.getType(), teacherUserIds);
-
             //课时长度
             int duration = DateUtil.minutesBetween(classGroupNoStartCourseSchedule.getStartClassTime(), classGroupNoStartCourseSchedule.getEndClassTime());
             List<ClassGroupTeacherMapper> byClassGroup = classGroupTeacherMapperDao.findByClassGroup(classGroupNoStartCourseSchedule.getClassGroupId());
@@ -318,7 +316,7 @@ public class ClassGroupTeacherMapperServiceImpl extends BaseServiceImpl<Long, Cl
                 if (!classGroupTeacherMapper.getClassGroupId().equals(classGroupNoStartCourseSchedule.getClassGroupId())) {
                     continue;
                 }
-                BigDecimal salary;
+                BigDecimal salary = new BigDecimal("0");
 
                 TeacherDefaultMusicGroupSalary teacherDefaultMusicGroupSalary = teacherDefaultMusicGroupSalaryDao.findByTeacherAndCourseType(classGroupTeacherMapper.getUserId(),
                         classGroupNoStartCourseSchedule.getType().getCode());
@@ -357,17 +355,6 @@ public class ClassGroupTeacherMapperServiceImpl extends BaseServiceImpl<Long, Cl
                     classTimeDuty = new BigDecimal(duration).divide(new BigDecimal(40), BigDecimal.ZERO.intValue(), BigDecimal.ROUND_DOWN);
                 }
 
-                salary = baseSalary.multiply(classTimeDuty).setScale(2, BigDecimal.ROUND_HALF_UP);
-
-                for (CourseScheduleTeacherSalary teacherSalary : allTeacherSalarys) {
-                    if (teacherSalary.getUserId().equals(classGroupTeacherMapper.getUserId())
-                            && teacherSalary.getTeacherRole().equals(classGroupTeacherMapper.getTeacherRole())) {
-                        int oldDuration = DateUtil.minutesBetween(teacherSalary.getCourseSchedule().getStartClassTime(), teacherSalary.getCourseSchedule().getEndClassTime());
-                        salary = teacherSalary.getExpectSalary().divide(new BigDecimal(oldDuration), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(duration)).setScale(2, BigDecimal.ROUND_HALF_UP);
-                        break;
-                    }
-                }
-
                 //课堂课课酬
 //                if (musicGroup.isClassroomLessons()) {
 //                    salary = classGroupTeacherMapper.getTeacherRole().equals(TeachTypeEnum.BISHOP) ? teacherDefaultMusicGroupSalary.getMainTeacher30MinSalary() : teacherDefaultMusicGroupSalary.getAssistantTeacher30MinSalary();

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

@@ -552,7 +552,7 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods>  implement
 		List<GoodsProcurement> groupGoodsList = goodsProcurements.stream().filter(g -> Objects.nonNull(g.getParentGoodsId())||Objects.isNull(g.getBatchNo())).collect(Collectors.toList());
 		if(!CollectionUtils.isEmpty(groupGoodsList)){
 			for (GoodsProcurement goodsProcurement : groupGoodsList) {
-				Goods goods = idTempGoodsMap.get(goodsProcurement.getGoodsId());
+				Goods goods = goodsDao.lock(goodsProcurement.getGoodsId());
 				SellOrder sellOrder = new SellOrder();
 				sellOrder.setParentGoodsId(goodsProcurement.getParentGoodsId());
 				sellOrder.setGoodsId(goodsProcurement.getGoodsId());