zouxuan 3 éve
szülő
commit
f9e224a7e0

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -668,6 +668,7 @@ public class ExportServiceImpl implements ExportService {
             BigDecimal routeTeachingFee = BigDecimal.ZERO;
             BigDecimal routeOtherFee = BigDecimal.ZERO;
             BigDecimal routeCloudTeacherFee = BigDecimal.ZERO;
+            BigDecimal routeRechargeFee = BigDecimal.ZERO;
             for (StudentPaymentOrderExportDto order : orders) {
                 Date endDate = DateUtil.stringToDate("2021-04-01", "yyyy-MM-dd");
                 if (order.getPayTime() == null || order.getPayTime().compareTo(endDate) < 0) {
@@ -704,6 +705,7 @@ public class ExportServiceImpl implements ExportService {
                 BigDecimal teachingFee = BigDecimal.ZERO;
                 BigDecimal otherFee = BigDecimal.ZERO;
                 BigDecimal cloudTeacherFee = BigDecimal.ZERO;
+                BigDecimal rechargeFee = BigDecimal.ZERO;
 
                 if (order.getActualAmount() != null && order.getActualAmount().compareTo(BigDecimal.ZERO) > 0) {
                     musicGroupCourseFee = order.getMusicGroupCourseFee().multiply(order.getRouteAmount()).divide(order.getActualAmount(), 2, BigDecimal.ROUND_DOWN);
@@ -732,6 +734,8 @@ public class ExportServiceImpl implements ExportService {
                             degreeFee = order.getRouteAmount();
                         } else if (order.getChargeType() != null && SporadicChargeTypeEnum.PRACTICE_GROUP_BUY.getCode().equals(order.getChargeType())) {
                             practiceCourseFee = order.getRouteAmount();
+                        } else if (order.getChargeType() != null && SporadicChargeTypeEnum.RECHARGE.getCode().equals(order.getChargeType())) {
+                            rechargeFee = order.getRouteAmount();
                         } else {
                             otherFee = order.getRouteAmount();
                         }
@@ -761,6 +765,7 @@ public class ExportServiceImpl implements ExportService {
                     musicalFee = order.getMusicalFee().subtract(routeMusicalFee);
                     teachingFee = order.getTeachingFee().subtract(routeTeachingFee);
                     otherFee = order.getOtherFee().subtract(routeOtherFee);
+                    rechargeFee = order.getRechargeFee().subtract(routeRechargeFee);
                     cloudTeacherFee = order.getCloudTeacherFee().subtract(routeCloudTeacherFee);
                 }
                 j++;
@@ -777,6 +782,7 @@ public class ExportServiceImpl implements ExportService {
                 routeMusicalFee = routeMusicalFee.add(musicalFee);
                 routeTeachingFee = routeTeachingFee.add(teachingFee);
                 routeOtherFee = routeOtherFee.add(otherFee);
+                routeRechargeFee = routeRechargeFee.add(rechargeFee);
                 routeCloudTeacherFee = routeCloudTeacherFee.add(cloudTeacherFee);
 
                 order.setMusicGroupCourseFee(musicGroupCourseFee);
@@ -791,6 +797,7 @@ public class ExportServiceImpl implements ExportService {
                 order.setMusicalFee(musicalFee);
                 order.setTeachingFee(teachingFee);
                 order.setOtherFee(otherFee);
+                order.setRechargeFee(rechargeFee);
                 order.setCloudTeacherFee(cloudTeacherFee);
             }
         });

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/EmployeeInfoController.java

@@ -77,7 +77,7 @@ public class EmployeeInfoController extends BaseController {
 			return failed("用户信息获取失败");
 		}
         EmployeeInfo info = employeeInfoService.findByPhone(employeeInfo.getMobileNo());
-		if(info != null){
+		if(info != null && !info.getId().equals(employeeInfo.getId())){
             return failed("该手机号已存在");
         }
 		employeeInfo.setOperatorId(sysUser.getId());