|
@@ -73,6 +73,8 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
private VipGroupCategoryDao vipGroupCategoryDao;
|
|
|
@Autowired
|
|
|
private StudentAttendanceDao studentAttendanceDao;
|
|
|
+ @Autowired
|
|
|
+ private TeacherSalaryComplaintsDao teacherSalaryComplaintsDao;
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory
|
|
|
.getLogger(CourseScheduleTeacherSalaryServiceImpl.class);
|
|
@@ -836,7 +838,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
if(CollectionUtils.isEmpty(teacherSalaryIds)){
|
|
|
return;
|
|
|
}
|
|
|
- courseScheduleTeacherSalaryDao.updateTeacherSalaryConfirmStatus(teacherSalaryIds,1);
|
|
|
+ courseScheduleTeacherSalaryDao.updateTeacherSalaryConfirmStatus(teacherSalaryIds,TeacherSalaryConfirmStatus.CONFIRMED);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -851,11 +853,22 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
pageInfo.setTotal(count);
|
|
|
params.put("offset", pageInfo.getOffset());
|
|
|
dataList = courseScheduleTeacherSalaryDao.findIsSettlementCourseSalarys(params);
|
|
|
+ for (TeacherCourseSalaryDetail4WebDto teacherCourseSalaryDetail4WebDto : dataList) {
|
|
|
+ if(Objects.nonNull(teacherCourseSalaryDetail4WebDto.getReduceSalary())){
|
|
|
+ teacherCourseSalaryDetail4WebDto.setFinalSalary(teacherCourseSalaryDetail4WebDto.getActualSalary().multiply(teacherCourseSalaryDetail4WebDto.getReduceSalary()));
|
|
|
+ }else{
|
|
|
+ teacherCourseSalaryDetail4WebDto.setFinalSalary(teacherCourseSalaryDetail4WebDto.getActualSalary());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if (count == 0) {
|
|
|
dataList = new ArrayList<>();
|
|
|
}
|
|
|
pageInfo.setRows(dataList);
|
|
|
+ Map<String, Object> result=new HashMap<>();
|
|
|
+ result.put("pageInfo", pageInfo);
|
|
|
+ int i = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(DateUtil.getMonth(DateUtil.addMonths(new Date(), -1)));
|
|
|
+ result.put("isOpenConfirm", i>0?1:0);
|
|
|
return pageInfo;
|
|
|
}
|
|
|
|
|
@@ -867,14 +880,26 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
PageInfo<TeacherCourseSalaryDetail4WebDto> pageInfo = findIsSettlementCourseSalarys(queryInfo4Web);
|
|
|
Map<String, Object> result=new HashMap<>();
|
|
|
result.put("pageInfo",pageInfo);
|
|
|
- Map<String, BigDecimal> groupTypeSalaryMap = new HashMap<>();
|
|
|
+ List<CourseTeacherSalaryStatisticsDto> teacherGroupTypeSalary = new ArrayList<>();
|
|
|
if(queryInfo4Web.getPage()<=1){
|
|
|
- List<CourseTeacherSalaryStatisticsDto> teacherGroupTypeSalary = courseScheduleTeacherSalaryDao.getTeacherGroupTypeSalary(queryInfo4Web.getMonth(), queryInfo4Web.getTeacherId());
|
|
|
- groupTypeSalaryMap = teacherGroupTypeSalary.stream()
|
|
|
- .collect(Collectors.toMap(c->c.getGroupType().getCode(),
|
|
|
- c -> Objects.isNull(c.getTotalReduceSalary()) ? c.getTotalActualSalary() : c.getTotalActualSalary().subtract(c.getTotalReduceSalary())));
|
|
|
+ teacherGroupTypeSalary = courseScheduleTeacherSalaryDao.getTeacherGroupTypeSalary(queryInfo4Web.getMonth(), queryInfo4Web.getTeacherId());
|
|
|
+ }
|
|
|
+ result.put("stat", teacherGroupTypeSalary);
|
|
|
+ if(!CollectionUtils.isEmpty(pageInfo.getRows())){
|
|
|
+ if(YesOrNoEnum.YES.equals(pageInfo.getRows().get(0).getConfirmStatus())){
|
|
|
+ result.put("confirmStatus",1);
|
|
|
+ }else{
|
|
|
+ result.put("confirmStatus",0);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ result.put("confirmStatus",0);
|
|
|
+ }
|
|
|
+ List<TeacherSalaryComplaints> teacherSalaryComplaintsWithMonth = teacherSalaryComplaintsDao.findTeacherSalaryComplaintsWithMonth(queryInfo4Web.getTeacherId(), queryInfo4Web.getMonth());
|
|
|
+ if(CollectionUtils.isEmpty(teacherSalaryComplaintsWithMonth)){
|
|
|
+ result.put("haveComplaints",0);
|
|
|
+ }else{
|
|
|
+ result.put("haveComplaints",1);
|
|
|
}
|
|
|
- result.put("stat", groupTypeSalaryMap);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -896,4 +921,14 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
result.put("totalSalary", totalSalary);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void openSalaryConfirm(String month) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void closeSalaryConfirm(String month) {
|
|
|
+
|
|
|
+ }
|
|
|
}
|