|
@@ -411,22 +411,23 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
CourseSchedule courseSchedule = courseScheduleTeacherSalary.getCourseSchedule();
|
|
|
TeachModeEnum teachMode = courseScheduleTeacherSalary.getCourseSchedule().getTeachMode();
|
|
|
if(TeachModeEnum.OFFLINE == teachMode){
|
|
|
- if(teacherAttendance.getSignInStatus() == null || teacherAttendance.getSignInStatus() == YesOrNoEnum.NO){
|
|
|
- String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_IN_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
- String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_IN_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
+ //如果没签到也没签退,那么就是未点名
|
|
|
+ if(teacherAttendance.getSignInStatus() == null || teacherAttendance.getSignOutStatus() == null){
|
|
|
+ String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_NO_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
+ String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_NO_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
BigDecimal signInGpsCutAmount = getCutAmount(c, c1, expectSalary);
|
|
|
if(signInGpsCutAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
deductCost = deductCost.add(signInGpsCutAmount);
|
|
|
- deductReasons.add("签到经纬度异常扣除" + signInGpsCutAmount);
|
|
|
+ deductReasons.add("VIP线下课未点名扣除" + signInGpsCutAmount);
|
|
|
}
|
|
|
}
|
|
|
- if(teacherAttendance.getSignOutStatus() == null || teacherAttendance.getSignOutStatus() == YesOrNoEnum.NO){
|
|
|
- String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_OUT_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
- String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_OUT_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
+ if(teacherAttendance.getSignOutStatus() == YesOrNoEnum.NO || teacherAttendance.getSignInStatus() == YesOrNoEnum.NO){
|
|
|
+ String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
+ String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
BigDecimal signOutGpsCutAmount = getCutAmount(c, c1, expectSalary);
|
|
|
if(signOutGpsCutAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
deductCost = deductCost.add(signOutGpsCutAmount);
|
|
|
- deductReasons.add("签退经纬度异常扣除" + signOutGpsCutAmount);
|
|
|
+ deductReasons.add("VIP线下课点名经纬度异常扣除" + signOutGpsCutAmount);
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
@@ -1783,33 +1784,34 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
//扣除费用
|
|
|
BigDecimal deductCost = BigDecimal.ZERO;
|
|
|
TeachModeEnum teachMode = courseSchedule.getTeachMode();
|
|
|
+ TeacherAttendance teacherAttendance = null;
|
|
|
+ if(teacherAttendances != null && teacherAttendances.size() > 0){
|
|
|
+ teacherAttendance = teacherAttendances.get(0);
|
|
|
+ }
|
|
|
+ if(teacherAttendance == null){
|
|
|
+ teacherAttendance = new TeacherAttendance();
|
|
|
+ }
|
|
|
if(TeachModeEnum.OFFLINE == teachMode){
|
|
|
- if(true){
|
|
|
- String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_IN_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
- String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_IN_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
+ //如果没签到也没签退,那么就是未点名
|
|
|
+ if(teacherAttendance.getSignInStatus() == null || teacherAttendance.getSignOutStatus() == null){
|
|
|
+ String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_NO_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
+ String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_NO_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
BigDecimal signInGpsCutAmount = getCutAmount(c, c1, expectSalary);
|
|
|
if(signInGpsCutAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
deductCost = deductCost.add(signInGpsCutAmount);
|
|
|
- deductReasons.add(new TeacherSalaryDeductReasonDto(DeductReasonEnum.GPS_ERR_IN, signInGpsCutAmount));
|
|
|
+ deductReasons.add(new TeacherSalaryDeductReasonDto(DeductReasonEnum.NO_GPS, signInGpsCutAmount));
|
|
|
}
|
|
|
}
|
|
|
- if(true){
|
|
|
- String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_OUT_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
- String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.OFFLINE_SIGN_OUT_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
+ if(teacherAttendance.getSignOutStatus() == YesOrNoEnum.NO || teacherAttendance.getSignInStatus() == YesOrNoEnum.NO){
|
|
|
+ String c = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_GPS_ERROR_CUT_SALARY, tenantId);
|
|
|
+ String c1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.VIP_OFFLINE_GPS_ERROR_CUT_SALARY_UNIT, tenantId);
|
|
|
BigDecimal signOutGpsCutAmount = getCutAmount(c, c1, expectSalary);
|
|
|
if(signOutGpsCutAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
deductCost = deductCost.add(signOutGpsCutAmount);
|
|
|
- deductReasons.add(new TeacherSalaryDeductReasonDto(DeductReasonEnum.GPS_ERR_OUT, signOutGpsCutAmount));
|
|
|
+ deductReasons.add(new TeacherSalaryDeductReasonDto(DeductReasonEnum.GPS_ERR, signOutGpsCutAmount));
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
- TeacherAttendance teacherAttendance = null;
|
|
|
- if(teacherAttendances != null && teacherAttendances.size() > 0){
|
|
|
- teacherAttendance = teacherAttendances.get(0);
|
|
|
- }
|
|
|
- if(teacherAttendance == null){
|
|
|
- teacherAttendance = new TeacherAttendance();
|
|
|
- }
|
|
|
if(teacherAttendance.getSignInStatus() == null || teacherAttendance.getSignInStatus() == YesOrNoEnum.NO){
|
|
|
SalarySettlementSignEnum signInStatus = getSignInStatus(teacherAttendance.getSignInTime(), courseSchedule.getStartClassTime(), teachMode,tenantId);
|
|
|
BigDecimal signInDeductCost = getSignInDeduce(expectSalary, signInStatus, teachMode,tenantId);
|