修改bug
This commit is contained in:
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.core.constant.DateConstant;
|
import org.dromara.common.core.constant.DateConstant;
|
||||||
import org.dromara.common.core.constant.HttpStatus;
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
import org.dromara.common.core.enums.UserType;
|
import org.dromara.common.core.enums.UserType;
|
||||||
@ -47,7 +48,6 @@ import org.dromara.contractor.service.ISubConstructionUserService;
|
|||||||
import org.dromara.contractor.service.ISubContractorService;
|
import org.dromara.contractor.service.ISubContractorService;
|
||||||
import org.dromara.project.domain.*;
|
import org.dromara.project.domain.*;
|
||||||
import org.dromara.project.domain.dto.attendance.TodayUserDto;
|
import org.dromara.project.domain.dto.attendance.TodayUserDto;
|
||||||
import org.dromara.project.domain.dto.attendance.TwoWeekDto;
|
|
||||||
import org.dromara.project.domain.enums.BusAttendanceClockStatusEnum;
|
import org.dromara.project.domain.enums.BusAttendanceClockStatusEnum;
|
||||||
import org.dromara.project.domain.enums.BusAttendanceCommuterEnum;
|
import org.dromara.project.domain.enums.BusAttendanceCommuterEnum;
|
||||||
import org.dromara.project.domain.enums.BusConstructionUserAttendanceStatusEnum;
|
import org.dromara.project.domain.enums.BusConstructionUserAttendanceStatusEnum;
|
||||||
@ -87,6 +87,7 @@ import static org.dromara.project.domain.enums.BusAttendanceClockStatusEnum.ATTE
|
|||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-03-07
|
* @date 2025-03-07
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionUserMapper, SubConstructionUser>
|
public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionUserMapper, SubConstructionUser>
|
||||||
implements ISubConstructionUserService {
|
implements ISubConstructionUserService {
|
||||||
@ -617,7 +618,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateClockBatch(updateClockBatchDto dto) {
|
public Boolean updateClockBatch(updateClockBatchDto dto) {
|
||||||
this.lambdaUpdate().set(SubConstructionUser::getClock, dto.getClock())
|
this.lambdaUpdate().set(SubConstructionUser::getClock, dto.getClock())
|
||||||
.eq(SubConstructionUser::getProjectId, dto.getProjectId())
|
.eq(SubConstructionUser::getProjectId, dto.getProjectId())
|
||||||
.in(CollectionUtil.isNotEmpty(dto.getSysUserIds()), SubConstructionUser::getSysUserId, dto.getSysUserIds())
|
.in(CollectionUtil.isNotEmpty(dto.getSysUserIds()), SubConstructionUser::getSysUserId, dto.getSysUserIds())
|
||||||
.update();
|
.update();
|
||||||
@ -1017,7 +1018,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
));
|
));
|
||||||
int fileTypeSize = dictTypeService.selectDictDataByType(SubConstructionUserConstant.USER_FILE_TYPE).size();
|
int fileTypeSize = dictTypeService.selectDictDataByType(SubConstructionUserConstant.USER_FILE_TYPE).size();
|
||||||
// 获取用户上传文件数量信息
|
// 获取用户上传文件数量信息
|
||||||
List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getId).toList();
|
List<Long> userIdList = constructionUserList.stream().map(SubConstructionUser::getSysUserId).toList();
|
||||||
List<SubConstructionUserFile> fileList = constructionUserFileService.lambdaQuery()
|
List<SubConstructionUserFile> fileList = constructionUserFileService.lambdaQuery()
|
||||||
.select(SubConstructionUserFile::getId, SubConstructionUserFile::getUserId)
|
.select(SubConstructionUserFile::getId, SubConstructionUserFile::getUserId)
|
||||||
.in(SubConstructionUserFile::getUserId, userIdList)
|
.in(SubConstructionUserFile::getUserId, userIdList)
|
||||||
@ -1046,12 +1047,12 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
constructionUserVo.setStandardSalary(workWageMap.get(key));
|
constructionUserVo.setStandardSalary(workWageMap.get(key));
|
||||||
}
|
}
|
||||||
// 关联施工人员文件上传状态
|
// 关联施工人员文件上传状态
|
||||||
long count = fileCountMap.getOrDefault(constructionUser.getId(), 0L);
|
long count = fileCountMap.getOrDefault(constructionUser.getSysUserId(), 0L);
|
||||||
if (count <= 0) {
|
if (count <= 0) {
|
||||||
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.NOUPLOAD.getValue());
|
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.NOUPLOAD.getValue());
|
||||||
} else if (count < fileTypeSize) {
|
} else if (count < fileTypeSize) {
|
||||||
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.PARTUPLOAD.getValue());
|
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.PARTUPLOAD.getValue());
|
||||||
} else if (count == fileTypeSize) {
|
} else if (count >= fileTypeSize) {
|
||||||
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.UPLOAD.getValue());
|
constructionUserVo.setFileUploadStatus(SubConstructionUserFileStatusEnum.UPLOAD.getValue());
|
||||||
}
|
}
|
||||||
// 解密身份证号码
|
// 解密身份证号码
|
||||||
@ -1253,7 +1254,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(attendanceUserIdList.contains(id)){
|
if (attendanceUserIdList.contains(id)) {
|
||||||
constructionUserAttendanceTotalResp.setClockToday(true);
|
constructionUserAttendanceTotalResp.setClockToday(true);
|
||||||
}
|
}
|
||||||
constructionUserAttendanceTotalResp.setAttendanceDays(attendanceDays);
|
constructionUserAttendanceTotalResp.setAttendanceDays(attendanceDays);
|
||||||
@ -1456,7 +1457,7 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
* 人脸识别
|
* 人脸识别
|
||||||
*
|
*
|
||||||
* @param file 图片文件
|
* @param file 图片文件
|
||||||
* @param userId
|
* @param userId 用户id
|
||||||
* @return 是否匹配成功
|
* @return 是否匹配成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -1464,8 +1465,8 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
String reqBase64 = this.getPicBase64(file);
|
String reqBase64 = this.getPicBase64(file);
|
||||||
HumanFaceReq request = new HumanFaceReq();
|
HumanFaceReq request = new HumanFaceReq();
|
||||||
request.setImage(reqBase64);
|
request.setImage(reqBase64);
|
||||||
if(userId == null){
|
if (userId == null) {
|
||||||
userId = LoginHelper.getUserId();
|
userId = LoginHelper.getUserId();
|
||||||
}
|
}
|
||||||
SubConstructionUser constructionUser = this.getBySysUserId(userId);
|
SubConstructionUser constructionUser = this.getBySysUserId(userId);
|
||||||
if (constructionUser == null || StringUtils.isBlank(constructionUser.getFacePic())) {
|
if (constructionUser == null || StringUtils.isBlank(constructionUser.getFacePic())) {
|
||||||
@ -1610,16 +1611,16 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
||||||
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
||||||
.isNotNull(SubConstructionUser::getTeamId);
|
.isNotNull(SubConstructionUser::getTeamId);
|
||||||
if("1".equals(dto.getType())){
|
if ("1".equals(dto.getType())) {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}else if("2".equals(dto.getType())){
|
} else if ("2".equals(dto.getType())) {
|
||||||
if(dto.getIsToday()){
|
if (dto.getIsToday()) {
|
||||||
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()),SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()), SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}else {
|
} else {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1654,16 +1655,16 @@ public class SubConstructionUserServiceImpl extends ServiceImpl<SubConstructionU
|
|||||||
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
.eq(StrUtil.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
||||||
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
.like(StrUtil.isNotBlank(dto.getUserName()), SubConstructionUser::getUserName, dto.getUserName())
|
||||||
.isNotNull(SubConstructionUser::getTeamId);
|
.isNotNull(SubConstructionUser::getTeamId);
|
||||||
if("1".equals(dto.getType())){
|
if ("1".equals(dto.getType())) {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}else if("2".equals(dto.getType())){
|
} else if ("2".equals(dto.getType())) {
|
||||||
if(dto.getIsToday()){
|
if (dto.getIsToday()) {
|
||||||
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()),SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.notIn(CollectionUtil.isNotEmpty(dto.getUserIds()), SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}else {
|
} else {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
wrapper.in(SubConstructionUser::getSysUserId, dto.getUserIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user