This commit is contained in:
2025-03-24 14:48:16 +08:00
parent 0e65a90c52
commit 950ca784ef
4 changed files with 39 additions and 37 deletions

View File

@ -375,11 +375,11 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
if (byId.getIdentityCard() == null || byId.getIdentityCard()=="") {
throw new RuntimeException("当前用户还未实名认证!");
}
// //3-1、判断当前分数是否及格如若不及格不能申请项目
// WgzAppUserScoreQuery coreQuert = iWgzQuestionSaveService.userScoreQuery(appUserId);
// if (coreQuert.getIsPass().equals("2")){
// throw new RuntimeException("当前用户分数未及格!");
// }
//3-1、判断当前分数是否及格如若不及格不能申请项目
WgzAppUserScoreQuery coreQuert = iWgzQuestionSaveService.userScoreQuery(appUserId);
if (coreQuert.getIsPass().equals("2")){
throw new RuntimeException("安全教育分数未及格!");
}
//3-2、是否已有工地
Integer i = baseMapper.selectCount(
new LambdaQueryWrapper<BgtProjectRecruitApply>().

View File

@ -317,28 +317,28 @@ public class WgzLeaveServiceImpl extends ServicePlusImpl<WgzLeaveMapper, WgzLeav
//处理消息
iBgtMessageService.operation(USERTYPE_WGZ, wgzLeave.getUserId(), USERTYPE_BGT, SecurityUtils.getAppUserId(), wgzLeave.getId(),SqlHelper.table(WgzLeave.class).getTableName());
if(AuditStatus.PASS.getCode().equals(dto.getAuditorType())){
//考勤信息
List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery()
.eq(WgzAttendance::getRecruitId, recruit.getId())
.eq(WgzAttendance::getUserId, wgzLeave.getUserId())
.eq(WgzAttendance::getDate, wgzLeave.getStartTime().toLocalDate()));
if(CollectionUtil.isNotEmpty(list)){
WgzAttendance wgzAttendance = list.get(0);
wgzAttendance.setLeaveMarkId(wgzLeave.getId());
wgzAttendance.setExceptionType("7");
attendanceService.updateById(wgzAttendance);
}else {
WgzAttendance wgzAttendance = new WgzAttendance();
wgzAttendance.setRecruitId(recruit.getId());
wgzAttendance.setUserId(wgzLeave.getUserId());
wgzAttendance.setLeaveMarkId(wgzLeave.getId());
wgzAttendance.setDailyWage(recruit.getRecruitAmount());
wgzAttendance.setDate(wgzLeave.getStartTime().toLocalDate());
wgzAttendance.setExceptionType("7");
attendanceService.save(wgzAttendance);
}
}
// if(AuditStatus.PASS.getCode().equals(dto.getAuditorType())){
// //考勤信息
// List<WgzAttendance> list = attendanceService.list(Wrappers.<WgzAttendance>lambdaQuery()
// .eq(WgzAttendance::getRecruitId, recruit.getId())
// .eq(WgzAttendance::getUserId, wgzLeave.getUserId())
// .eq(WgzAttendance::getDate, wgzLeave.getStartTime().toLocalDate()));
// if(CollectionUtil.isNotEmpty(list)){
// WgzAttendance wgzAttendance = list.get(0);
// wgzAttendance.setLeaveMarkId(wgzLeave.getId());
// wgzAttendance.setExceptionType("7");
// attendanceService.updateById(wgzAttendance);
// }else {
// WgzAttendance wgzAttendance = new WgzAttendance();
// wgzAttendance.setRecruitId(recruit.getId());
// wgzAttendance.setUserId(wgzLeave.getUserId());
// wgzAttendance.setLeaveMarkId(wgzLeave.getId());
// wgzAttendance.setDailyWage(recruit.getRecruitAmount());
// wgzAttendance.setDate(wgzLeave.getStartTime().toLocalDate());
// wgzAttendance.setExceptionType("7");
// attendanceService.save(wgzAttendance);
// }
// }
}
return updateById(wgzLeave);
}

View File

@ -253,13 +253,13 @@ public class WgzQuestionSaveServiceImpl extends ServicePlusImpl<WgzQuestionSaveM
String[] split = pass.split(",");
float fullMark = Float.parseFloat(split[1]);
float passingGrade = Float.parseFloat(split[0]);
// 100分 / 满分 * 答对的分数 = 当前分数
double score = 100.00 / fullMark * sumScore;
// 使用 DecimalFormat 保证分数最多1位小数
DecimalFormat df = new DecimalFormat("#.#");
score = Double.parseDouble(df.format(score));
// // 100分 / 满分 * 答对的分数 = 当前分数
// double score = 100.00 / fullMark * sumScore;
// // 使用 DecimalFormat 保证分数最多1位小数
// DecimalFormat df = new DecimalFormat("#.#");
// score = Double.parseDouble(df.format(score));
// 当前分数 >= 及格线 = 及格 否则 不及格
if (score >= passingGrade) {
if (sumScore >= passingGrade) {
res.setIsPass("1");
} else {
res.setIsPass("2");