修改bug
This commit is contained in:
@ -302,4 +302,4 @@ qrCode:
|
||||
url: http://192.168.110.151:7788
|
||||
# 无人机大图
|
||||
drone:
|
||||
big-image: http://192.168.110.2:9512
|
||||
url: http://192.168.110.2:9512
|
||||
|
||||
@ -292,4 +292,4 @@ qrCode:
|
||||
url: http://xny.yj-3d.com:7171
|
||||
# 无人机大图
|
||||
drone:
|
||||
big-image: http://192.168.110.2:9512
|
||||
url: http://192.168.110.2:9512
|
||||
|
||||
@ -290,7 +290,7 @@ weather:
|
||||
api-host: n35rk53njv.re.qweatherapi.com
|
||||
# dxf转 geojson 执行文件名
|
||||
dxf2GeoJson:
|
||||
file-name: main
|
||||
file-name: main.exe
|
||||
ys7:
|
||||
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
||||
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
||||
@ -309,4 +309,4 @@ qrCode:
|
||||
url: http://xny.yj-3d.com:7788
|
||||
# 无人机大图
|
||||
drone:
|
||||
big-image: http://192.168.110.2:9512
|
||||
url: http://192.168.110.2:9512
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package org.dromara.manager.recognizermanager;
|
||||
package org.dromara.manager.dronemanager;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@ -11,11 +11,11 @@ import org.springframework.context.annotation.Configuration;
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "drone")
|
||||
public class DroneBigImageProperties {
|
||||
public class DroneProperties {
|
||||
|
||||
/**
|
||||
* 大图请求地址
|
||||
*/
|
||||
private String bigImage;
|
||||
private String url;
|
||||
|
||||
}
|
||||
@ -24,7 +24,7 @@ import org.dromara.facility.domain.*;
|
||||
import org.dromara.facility.domain.enums.FacFinishStatusEnum;
|
||||
import org.dromara.facility.domain.enums.FacFinishTypeEnum;
|
||||
import org.dromara.facility.service.*;
|
||||
import org.dromara.manager.recognizermanager.DroneBigImageProperties;
|
||||
import org.dromara.manager.dronemanager.DroneProperties;
|
||||
import org.dromara.manager.recognizermanager.RecognizerManager;
|
||||
import org.dromara.manager.recognizermanager.enums.RecognizerHasTargetEnum;
|
||||
import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum;
|
||||
@ -121,7 +121,7 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
||||
private ISysOssService ossService;
|
||||
|
||||
@Resource
|
||||
private DroneBigImageProperties droneBigImageProperties;
|
||||
private DroneProperties droneBigImageProperties;
|
||||
|
||||
/**
|
||||
* 分页查询进度计划详情列表
|
||||
@ -922,8 +922,8 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
||||
public Boolean insertNumberDetailByAI(PgsProgressPlanDetailAINumberReq req) {
|
||||
String file = req.getFile();
|
||||
String tif = req.getTif();
|
||||
String fileUrl = droneBigImageProperties.getBigImage() + file;
|
||||
String tifUrl = droneBigImageProperties.getBigImage() + tif;
|
||||
String fileUrl = droneBigImageProperties.getUrl() + file;
|
||||
String tifUrl = droneBigImageProperties.getUrl() + tif;
|
||||
Long projectId = req.getProjectId();
|
||||
// 识别类型:洞、桩、架、架子
|
||||
List<RecognizerTypeEnum> enumList = List.of(RecognizerTypeEnum.HOLE, RecognizerTypeEnum.PHO,
|
||||
|
||||
@ -18,7 +18,6 @@ import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.dromara.common.core.constant.DateConstant;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.DateUtils;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
@ -32,7 +31,6 @@ import org.dromara.common.utils.JSTUtil;
|
||||
import org.dromara.contractor.domain.SubConstructionUser;
|
||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||
import org.dromara.contractor.service.ISubUserSalaryDetailService;
|
||||
import org.dromara.gps.domain.vo.ConstructionUser;
|
||||
import org.dromara.project.domain.*;
|
||||
import org.dromara.project.domain.bo.BusAttendanceBo;
|
||||
import org.dromara.project.domain.dto.attendance.*;
|
||||
@ -335,7 +333,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
// 进行人脸比对
|
||||
try {
|
||||
result = constructionUserService.faceComparison(file);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("人脸识别失败,请重新识别", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@ -361,21 +359,21 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
// 判断当前用户打卡状态
|
||||
|
||||
int clockTypeByTime = getClockTypeByTime(localDate, now, busAttendanceRuleVo);
|
||||
if (clockTypeByTime == 1 ) {
|
||||
if (clockTypeByTime == 1) {
|
||||
List<BusAttendance> attendances = this.lambdaQuery()
|
||||
.eq(BusAttendance::getUserId, userId)
|
||||
.eq(BusAttendance::getClockDate, localDate)
|
||||
.eq(BusAttendance::getClockType, BusAttendanceCommuterEnum.CLOCKIN.getValue())
|
||||
.list();
|
||||
if(CollectionUtil.isNotEmpty(attendances)){
|
||||
if (CollectionUtil.isNotEmpty(attendances)) {
|
||||
BusAttendance busAttendance = attendances.getFirst();
|
||||
if(busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())){
|
||||
if (busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())) {
|
||||
throw new ServiceException("上班缺卡记录已生成,不能更新");
|
||||
}
|
||||
//更新打卡时间
|
||||
busAttendance.setClockTime(now);
|
||||
updateById(busAttendance);
|
||||
}else{
|
||||
} else {
|
||||
BusAttendance attendance = new BusAttendance();
|
||||
// 上班打卡
|
||||
attendance.setClockType(BusAttendanceCommuterEnum.CLOCKIN.getValue());
|
||||
@ -407,21 +405,21 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
userSalaryDetailService.insertByAttendance(userId, attendance.getClockDate());
|
||||
return save;
|
||||
}
|
||||
}else if (clockTypeByTime == 2 ) {
|
||||
} else if (clockTypeByTime == 2) {
|
||||
List<BusAttendance> attendances = this.lambdaQuery()
|
||||
.eq(BusAttendance::getUserId, userId)
|
||||
.eq(BusAttendance::getClockDate, localDate)
|
||||
.eq(BusAttendance::getClockType, BusAttendanceCommuterEnum.CLOCKOUT.getValue())
|
||||
.list();
|
||||
if(CollectionUtil.isNotEmpty(attendances)){
|
||||
if (CollectionUtil.isNotEmpty(attendances)) {
|
||||
BusAttendance busAttendance = attendances.getFirst();
|
||||
if(busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())){
|
||||
if (busAttendance.getClockStatus().equals(BusAttendanceClockStatusEnum.UNCLOCK.getValue())) {
|
||||
throw new ServiceException("下班缺卡记录已生成,不能更新");
|
||||
}
|
||||
//更新打卡时间
|
||||
busAttendance.setClockTime(now);
|
||||
// 判断是否为早退
|
||||
if (isLeaveEarly(now, busAttendanceRuleVo,localDate)) {
|
||||
if (isLeaveEarly(now, busAttendanceRuleVo, localDate)) {
|
||||
busAttendance.setClockStatus(BusAttendanceClockStatusEnum.LEAVEEARLY.getValue());
|
||||
busAttendance.setMinuteCount(getMinutesDifference(now, busAttendanceRuleVo.getClockOutTime()));
|
||||
} else {
|
||||
@ -429,13 +427,13 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
busAttendance.setMinuteCount(0);
|
||||
}
|
||||
updateById(busAttendance);
|
||||
}else {
|
||||
} else {
|
||||
BusAttendance attendance = new BusAttendance();
|
||||
// 下班打卡
|
||||
attendance.setClockType(BusAttendanceCommuterEnum.CLOCKOUT.getValue());
|
||||
attendance.setRuleTime(busAttendanceRuleVo.getClockOutTime());
|
||||
// 判断是否为早退
|
||||
if (isLeaveEarly(now, busAttendanceRuleVo,localDate)) {
|
||||
if (isLeaveEarly(now, busAttendanceRuleVo, localDate)) {
|
||||
attendance.setClockStatus(BusAttendanceClockStatusEnum.LEAVEEARLY.getValue());
|
||||
attendance.setMinuteCount(getMinutesDifference(now, busAttendanceRuleVo.getClockOutTime()));
|
||||
} else {
|
||||
@ -817,13 +815,13 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
/**
|
||||
* 判断是否早退
|
||||
*/
|
||||
private Boolean isLeaveEarly(LocalDateTime checkTime, BusAttendanceRuleVo vo,LocalDate date) {
|
||||
private Boolean isLeaveEarly(LocalDateTime checkTime, BusAttendanceRuleVo vo, LocalDate date) {
|
||||
LocalTime clockOutTime = vo.getClockOutTime();
|
||||
LocalTime clockInTime = vo.getClockInTime();
|
||||
|
||||
LocalDateTime clockOutDateTime;
|
||||
// 构建下班时间和下班最晚打卡时间
|
||||
if(clockOutTime.isBefore(clockInTime)){
|
||||
if (clockOutTime.isBefore(clockInTime)) {
|
||||
clockOutDateTime = LocalDateTime.of(date.plusDays(1), clockOutTime);
|
||||
} else {
|
||||
clockOutDateTime = LocalDateTime.of(date, clockOutTime);
|
||||
@ -844,9 +842,9 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
.eq(dto.getTeamId() != null, SubConstructionUser::getTeamId, dto.getTeamId())
|
||||
.eq(StringUtils.isNotBlank(dto.getTypeOfWork()), SubConstructionUser::getTypeOfWork, dto.getTypeOfWork())
|
||||
);
|
||||
attendanceCountVo.setTotalCount( list.size());
|
||||
attendanceCountVo.setTotalCount(list.size());
|
||||
List<Long> list1 = list.stream().map(SubConstructionUser::getSysUserId).toList();
|
||||
if(CollectionUtil.isEmpty(list1)){
|
||||
if (CollectionUtil.isEmpty(list1)) {
|
||||
attendanceCountVo.setWorkCount(0);
|
||||
return attendanceCountVo;
|
||||
}
|
||||
@ -903,14 +901,14 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
SysUserVo sysUserVo = userService.selectUserById(constructionUser.getSysUserId());
|
||||
attendanceUserVo.setUserId(constructionUser.getSysUserId());
|
||||
attendanceUserVo.setNickName(constructionUser.getUserName());
|
||||
if(sysUserVo != null){
|
||||
if (sysUserVo != null) {
|
||||
if (sysUserVo.getAvatar() != null) {
|
||||
SysOssVo byId = ossService.getById(sysUserVo.getAvatar());
|
||||
attendanceUserVo.setAvatar(byId == null ? null : byId.getUrl());
|
||||
}
|
||||
}
|
||||
attendanceUserVo.setTypeOfWork(constructionUser.getTypeOfWork());
|
||||
if(constructionUser.getTeamId() != null){
|
||||
if (constructionUser.getTeamId() != null) {
|
||||
attendanceUserVo.setTeamName(constructionUser.getTeamName());
|
||||
}
|
||||
if (attendanceUserIds.contains(constructionUser.getSysUserId())) {
|
||||
@ -1177,24 +1175,26 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
|
||||
for (Map.Entry<Long, List<SubConstructionUser>> entry : teamUserMap.entrySet()) {
|
||||
Long teamId = entry.getKey();
|
||||
System.out.println("teamId:" + teamId);
|
||||
List<SubConstructionUser> users = entry.getValue();
|
||||
SubConstructionUser constructionUser = users.getFirst();
|
||||
String teamName = constructionUser.getTeamName();
|
||||
System.out.println("name:" + teamName);
|
||||
Sheet sheet = workbook.createSheet(teamName);
|
||||
|
||||
// ==================== 设置列宽 ====================
|
||||
sheet.setColumnWidth(0, 5* 256); // 序号
|
||||
sheet.setColumnWidth(1, 10* 256); // 姓名/日期
|
||||
sheet.setColumnWidth(2, 30* 256); // 身份证号
|
||||
sheet.setColumnWidth(0, 5 * 256); // 序号
|
||||
sheet.setColumnWidth(1, 10 * 256); // 姓名/日期
|
||||
sheet.setColumnWidth(2, 30 * 256); // 身份证号
|
||||
|
||||
// 日期列(每天一列)
|
||||
for (int i = 3; i < 3 + daysInMonth; i++) {
|
||||
sheet.setColumnWidth(i, 5* 256); // 每天列宽 15 字符
|
||||
sheet.setColumnWidth(i, 5 * 256); // 每天列宽 15 字符
|
||||
}
|
||||
|
||||
sheet.setColumnWidth(3 + daysInMonth, 5* 256); // 合计
|
||||
sheet.setColumnWidth(3 + daysInMonth + 1, 10* 256); // 是否离场
|
||||
sheet.setColumnWidth(3 + daysInMonth + 2, 15* 256); // 签字
|
||||
sheet.setColumnWidth(3 + daysInMonth, 5 * 256); // 合计
|
||||
sheet.setColumnWidth(3 + daysInMonth + 1, 10 * 256); // 是否离场
|
||||
sheet.setColumnWidth(3 + daysInMonth + 2, 15 * 256); // 签字
|
||||
|
||||
// ==================== 表头部分 ====================
|
||||
Row titleRow = sheet.createRow(0);
|
||||
@ -1217,7 +1217,7 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
int midColumn = (totalColumns / 2) - 1;
|
||||
|
||||
// 设置班组类别(右对齐,占据后半部分)
|
||||
int teamCol = midColumn +1; //
|
||||
int teamCol = midColumn + 1; //
|
||||
Cell teamNameCell = projectRow.createCell(teamCol);
|
||||
teamNameCell.setCellValue("班组类别:" + teamName);
|
||||
teamNameCell.setCellStyle(createProjectCellStyle(workbook));
|
||||
@ -1400,7 +1400,4 @@ public class BusAttendanceServiceImpl extends ServiceImpl<BusAttendanceMapper, B
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -423,14 +423,14 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
||||
throw new ServiceException("添加部门失败", HttpStatus.ERROR);
|
||||
}
|
||||
|
||||
if( SysDeptTypeEnum.PROJECT.getCode().equals(bo.getDeptType())){
|
||||
/* if( SysDeptTypeEnum.PROJECT.getCode().equals(bo.getDeptType())){
|
||||
SysRoleBo sysRoleBo = new SysRoleBo();
|
||||
|
||||
ConPerSysRoleDto conPerSysRoleDto = new ConPerSysRoleDto();
|
||||
conPerSysRoleDto.setDeptId(dept.getDeptId());
|
||||
BeanUtil.copyProperties(conPerSysRoleDto,sysRoleBo);
|
||||
roleService.insertRole(sysRoleBo);
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user