diff --git a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml index 5221d0de..47967f9b 100644 --- a/xinnengyuan/ruoyi-admin/src/main/resources/application.yml +++ b/xinnengyuan/ruoyi-admin/src/main/resources/application.yml @@ -110,6 +110,8 @@ sa-token: timeout: 2592000 # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒 active-timeout: 86400 + # 同一账号最大登录数量,-1代表不限 + max-login-count: -1 # security配置 security: diff --git a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java index 5a92d34c..0321dda0 100644 --- a/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java +++ b/xinnengyuan/ruoyi-admin/src/test/java/org/dromara/test/DemoTest.java @@ -24,6 +24,7 @@ import org.dromara.facility.domain.FacMatrix; import org.dromara.facility.service.IFacMatrixService; import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; import org.dromara.facility.service.IFacPhotovoltaicPanelService; +import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum; import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; import org.dromara.manager.ys7manager.Ys7Constant; import org.dromara.manager.ys7manager.Ys7Manager; @@ -403,7 +404,8 @@ public class DemoTest { @Test void testImport() { photovoltaicPanelService.updateFinishNumberByCoordinate(List.of(1968510961294921730L), - List.of(new RecognizeConvertCoordinateResult("107.124334530", "23.830557974"))); + List.of(new RecognizeConvertCoordinateResult("107.124334530", "23.830557974")), + RecognizerTypeEnum.BRACKET.getValue()); } @Test diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusAttendanceByGo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusAttendanceByGo.java deleted file mode 100644 index 5518783a..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusAttendanceByGo.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.dromara.bigscreen.domain; - -import lombok.Data; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -@Data -public class BusAttendanceByGo { - - private Long id; // 主键ID - - private String userName; // 人员姓名 - - private String pacePhoto; // 人脸照 - - private Long projectId; // 项目id - - private String createBy; // 创建者 - - private String updateBy; // 更新者 - - private LocalDateTime createdAt; // 创建时间 - - private LocalDateTime updatedAt; // 更新时间 - - private LocalDateTime deletedAt; // 删除时间 - - private String clockOn; // 上午打卡 - - private String clockOff; // 下午打卡 - - private String printingDate; // 年月日打卡时间 - - private String isPinch; // 1正常,2迟到,3早退,4缺勤,5补卡 - - private String openid; // 微信id - - private String pinchOpenId; // 代打id - - private String clockRecord; // 多次打卡时间记录 - - private String pinchUserName; // 代打人姓名 - - private String commuter; // 上下班(1上班 2下班) - - private String punchRange; // 打卡范围 - - private BigDecimal dailyWage; // 日薪 - - private String lng; // 经度 - - private String lat; // 纬度 - - private String location; // 逆编码地址信息 - - private LocalDateTime missing; // 缺卡统一处理时间 -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusConstructionUser.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusConstructionUser.java deleted file mode 100644 index 391cfd9f..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusConstructionUser.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.dromara.bigscreen.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.math.BigDecimal; -import java.time.LocalDateTime; - -@Data -@TableName("bus_construction_user") -public class BusConstructionUser { - - @TableId(type = IdType.AUTO) - private Long id; // 主键ID - - private String openid; // 微信id - - private String nickName; // 微信名称 - - private Long teamId; // 班组id - - private String headIcon; // 登陆照片 - - private String pacePhoto; // 人脸照 - - private String userName; // 人员姓名 - - private Long projectId; // 项目id - - private String status; // 状态(0在职 1离职)-字典position_status - - private String isPinch; // 是否代打 - - private String ifManagement; // 是否班组管理 - - private String createBy; // 创建者 - - private String updateBy; // 更新者 - - private LocalDateTime createdAt; // 创建时间 - - private LocalDateTime updatedAt; // 更新时间 - - private LocalDateTime deletedAt; // 删除时间 - - private String phone; // 电话 - - private String sex; // 1:男,2女,3保密 - - private String sfzNation; // 身份证民族 - - private String sfzNumber; // 身份证号码 - - private String sfzStart; // 身份证有效开始期 - - private String sfzEnd; // 身份证有效结束期 - - private String sfzSite; // 身份证地址 - - private String sfzBirth; // 身份证出生日期 - - private String nativePlace; // 籍贯 - - private String yhkNumber; // 银行卡号 - - private String yhkOpeningBank; // 开户行 - - private String yhkCardholder; // 持卡人 - - private String typeOfWork; // 工种(字典) - - private String clock; // 打卡(1启用打卡 2禁止打卡) - - private Long labourserviceId; // 劳务公司id - - private String entryDate; // 入场时间 - - private String leaveDate; // 离场时间 - - private BigDecimal salary; // 薪水(为0表示无效) - - private String projectRecord; // 是否开启项目备案(1开启 2不开启) - - private String wxOrPc; // 哪添加的(1表示pc 2表示小程序) - - private String subscription; // 消息订阅状态(1订阅 2无订阅) - - private String devNum; // 安全帽设备标识 -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusCorporateEvents.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusCorporateEvents.java deleted file mode 100644 index b41fbd10..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusCorporateEvents.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.dromara.bigscreen.domain; - -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; - -import java.time.LocalDateTime; - -/** - * 企业大事记 - */ -@Data -@TableName("bus_corporate_events") -public class BusCorporateEvents { - - @TableId(type = IdType.AUTO) - private Long id; - - /** - * 标题 - */ - private String headline; - - /** - * 内容 - */ - private String content; - - /** - * 创建人 - */ - private Long createdBy; - - /** - * 更新人 - */ - private Long updatedBy; - - /** - * 创建时间 - */ - private LocalDateTime createdAt; - - /** - * 更新时间 - */ - private LocalDateTime updatedAt; - - /** - * 删除时间(软删除标记) - */ - private LocalDateTime deletedAt; -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusProjectTeamByGo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusProjectTeamByGo.java deleted file mode 100644 index fb83763a..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusProjectTeamByGo.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.dromara.bigscreen.domain; - -import lombok.Data; - -import java.time.LocalDateTime; - -@Data -public class BusProjectTeamByGo { - - private Long id; // 主键id - - private Long projectId; // 项目id - - private String name; // 班组名称 - - private String isClockIn; // 范围内打卡(0范围内打卡 1任何地点打卡) - - private String punchRange; // 打卡范围(id串) - - private String remark; // 备注 - - private String createBy; // 创建者 - - private String updateBy; // 更新者 - - private Long createDept; // 创建部门 - - private LocalDateTime createTime; // 创建时间 - - private LocalDateTime updateTime; // 更新时间 -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusProjectTeamMemberByGo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusProjectTeamMemberByGo.java deleted file mode 100644 index 8fef14ef..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusProjectTeamMemberByGo.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.dromara.bigscreen.domain; - -import lombok.Data; - -import java.time.LocalDateTime; - -@Data -public class BusProjectTeamMemberByGo { - - private Long id; // 主键id - - private Long teamId; // 班组id - - private Long projectId; // 项目id - - private Long memberId; // 施工人员id - - private String postId; // 岗位(0普通员工,1组长) - - private String remark; // 备注 - - private LocalDateTime createTime; // 创建时间 - - private LocalDateTime updateTime; // 更新时间 -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusTour.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusTour.java deleted file mode 100644 index f988241a..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/BusTour.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.dromara.bigscreen.domain; - -import lombok.Data; - -import java.util.Date; - -@Data -public class BusTour { - - private Long id; // 主键ID - - private Long projectId; // 项目id - - private String tourCategory; // 类别字典(如:无人机识别、监控拍摄) - - private String tourType; // 类型字典(如:安全帽、安全带) - - private String picture; // 图片路径 - - private Integer num; // 违规数量 - - private String describe; // 故障描述 - - private Date createdAt; // 创建时间 - - private Date updatedAt; // 更新时间 - - private Date deletedAt; // 删除时间 - - private String tableName; // 表名 - - private Long tableId; // 表id - - private String sxtName; // 摄像头名称 -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/SysProjectIntroduce.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/SysProjectIntroduce.java deleted file mode 100644 index 38748982..00000000 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/domain/SysProjectIntroduce.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.dromara.bigscreen.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.time.LocalDateTime; - -@Data -@TableName("sys_project_introduce") -public class SysProjectIntroduce { - - @TableId(type = IdType.AUTO) - private Long id; // 主键id - - private Long projectId; // 项目id - - private String headline; // 标题 - - private String richText; // 富文本 - - private String createdBy; // 创建人 - - private String updatedBy; // 更新人 - - private LocalDateTime createdAt; // 创建时间 - - private LocalDateTime updatedAt; // 更新时间 - - private LocalDateTime deletedAt; // 删除时间 - - private String files; // 附件 -} diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/AsyncMessageHandlerServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/AsyncMessageHandlerServiceImpl.java index 4b32d9a6..ad1fed3b 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/AsyncMessageHandlerServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/bigscreen/service/impl/AsyncMessageHandlerServiceImpl.java @@ -43,7 +43,7 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi try { // 1. 解析消息体(只解析一次,避免重复操作) byte[] messageBody = message.getBody(); - if (messageBody == null || messageBody.length == 0) { + if (messageBody.length == 0) { log.warn("【异步消息处理】消息体为空,忽略处理"); return; } @@ -76,8 +76,8 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi return; } - String key = ""; - DroProjectDrone droProjectDrone = null; + String key; + DroProjectDrone droProjectDrone; boolean isOsd4 = false; // 5. 根据data字段内容判断key类型,并查询无人机信息 @@ -130,7 +130,7 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi System.out.println("大屏已推送消息"); } int onlineCount = InitOnStartWebSocketServer.getOnlineCount(); - if (onlineCount > 0){ + if (onlineCount > 0) { String modleId = b ? droProjectDrone.getAirplaneModleId() : droProjectDrone.getDroneModleId(); if (modleId != null) { String ued = ueStructureJsonMessage(message, modleId); @@ -143,14 +143,14 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi private String buildPushMessage(String key, String message, Long projectId) { JSONObject messageObj = new JSONObject(); - messageObj.put("type", "wrj_DATA_UPDATE"); - messageObj.put("projectId",projectId.toString()); - messageObj.put("clientId",key); + messageObj.set("type", "wrj_DATA_UPDATE"); + messageObj.set("projectId", projectId.toString()); + messageObj.set("clientId", key); // 位置信息 JSONObject locationObj = new JSONObject(); - locationObj.put("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude").toString()); // 纬度 - locationObj.put("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude").toString()); // 经度 - messageObj.put("location", locationObj); + locationObj.set("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude").toString()); // 纬度 + locationObj.set("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude").toString()); // 经度 + messageObj.set("location", locationObj); return messageObj.toString(); } @@ -161,19 +161,19 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi private String ueStructureJsonMessage(String message, String modelId) { // 构造消息对象(包含关键信息) JSONObject messageObj = new JSONObject(); - messageObj.put("type", "location"); // 消息类型 + messageObj.set("type", "location"); // 消息类型 JSONObject data = new JSONObject(); - data.put("id", modelId); + data.set("id", modelId); // 位置信息 JSONObject position = new JSONObject(); - position.put("lat", JSONUtil.parseObj(message).getJSONObject("data").get("latitude")); // 纬度 - position.put("lng", JSONUtil.parseObj(message).getJSONObject("data").get("longitude")); // 经度 - position.put("alt", JSONUtil.parseObj(message).getJSONObject("data").get("height")); // 海拔 + position.set("lat", JSONUtil.parseObj(message).getJSONObject("data").get("latitude")); // 纬度 + position.set("lng", JSONUtil.parseObj(message).getJSONObject("data").get("longitude")); // 经度 + position.set("alt", JSONUtil.parseObj(message).getJSONObject("data").get("height")); // 海拔 - data.put("position", position); - messageObj.put("data", data); // 设备唯一标识 + data.set("position", position); + messageObj.set("data", data); // 设备唯一标识 // 转换为String类型返回 return messageObj.toString(); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/domain/IdCoordinatePoint.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/domain/IdCoordinatePoint.java index b1229dd4..2c962d89 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/domain/IdCoordinatePoint.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/domain/IdCoordinatePoint.java @@ -18,6 +18,11 @@ public class IdCoordinatePoint { */ private Long id; + /** + * 名称 + */ + private String name; + /** * 点位置 107.13162414986301,23.817601041770256 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java index 1dd23886..492aebfc 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JSTUtil.java @@ -358,14 +358,14 @@ public class JSTUtil { } - public static String getLocationName(String lat, String lng){ - String a = lng+","+lat; + public static String getLocationName(String lat, String lng) { + String a = lng + "," + lat; String s = HttpUtil.get("https://restapi.amap.com/v3/geocode/regeo?location=" + a + "&Key=2a769e5362ac9a7d7db12e85b640124c"); - JSONObject jsonObject = JSONUtil.parseObj(s); + JSONObject jsonObject = JSONUtil.parseObj(s); String address = null; - if(jsonObject.getInt("status") == 1){ - address = jsonObject.getJSONObject("regeocode").getStr("formatted_address"); - } + if (jsonObject.getInt("status") == 1) { + address = jsonObject.getJSONObject("regeocode").getStr("formatted_address"); + } return address; } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsPointMatcher.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsPointMatcher.java index 0b9e9a87..c5001a21 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsPointMatcher.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/common/utils/JtsPointMatcher.java @@ -1,5 +1,7 @@ package org.dromara.common.utils; +import cn.hutool.json.JSONUtil; +import lombok.extern.slf4j.Slf4j; import org.dromara.common.domain.IdCoordinatePoint; import org.locationtech.jts.geom.Coordinate; import org.locationtech.jts.geom.GeometryFactory; @@ -8,8 +10,11 @@ import org.locationtech.jts.geom.Polygon; import org.locationtech.jts.util.GeometricShapeFactory; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; +@Slf4j public class JtsPointMatcher { private static final GeometryFactory geometryFactory = new GeometryFactory(); @@ -43,19 +48,30 @@ public class JtsPointMatcher { * @param radiusMeter 半径(米) * @return 匹配到的 pointsB 的 id */ - public static List matchPoints(List pointsA, List pointsB, double radiusMeter) { - List matched = new ArrayList<>(); + public static Set matchPoints(List pointsA, List pointsB, double radiusMeter) { + Set matched = new HashSet<>(); for (Coordinate pA : pointsA) { Point pointA = geometryFactory.createPoint(pA); for (IdCoordinatePoint pvPoint : pointsB) { - // positions 字段 -> Coordinate - String[] posArr = pvPoint.getPositions().split(","); - double lon = Double.parseDouble(posArr[0]); - double lat = Double.parseDouble(posArr[1]); + String positions = pvPoint.getPositions(); + double lon; + double lat; + if (positions.startsWith("[") && positions.endsWith("]")) { + // 是数组形式,例如 [1231515.141,3123123.3123] + List doubles = JSONUtil.toList(positions, Double.class); + lon = doubles.get(0); + lat = doubles.get(1); + } else { + // 是单个坐标,例如 1231515.141,3123123.3123 + String[] posArr = positions.split(","); + lon = Double.parseDouble(posArr[0]); + lat = Double.parseDouble(posArr[1]); + } Polygon circle = createCircle(lon, lat, radiusMeter); if (circle.contains(pointA)) { matched.add(pvPoint.getId()); + log.info("匹配到桩点:{}", pvPoint.getName()); break; // 找到一个就够 } } @@ -83,7 +99,7 @@ public class JtsPointMatcher { p2.setPositions("107.08827916132982,23.877744707721714"); // 很远 listB.add(p2); - List result = matchPoints(listA, listB, 4.4); + Set result = matchPoints(listA, listB, 4.4); System.out.println("匹配到的桩点ID:"); for (Long id : result) { diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubUserSalaryDetailServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubUserSalaryDetailServiceImpl.java index e887b4d6..b410a61f 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubUserSalaryDetailServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/contractor/service/impl/SubUserSalaryDetailServiceImpl.java @@ -8,23 +8,18 @@ import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.fill.FillConfig; -import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jakarta.annotation.Resource; -import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.pdfbox.io.IOUtils; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.dromara.bigscreen.domain.BusConstructionUser; import org.dromara.common.core.constant.HttpStatus; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.ObjectUtils; @@ -35,19 +30,15 @@ import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.common.utils.IdCardEncryptorUtil; import org.dromara.contractor.domain.SubConstructionUser; import org.dromara.contractor.domain.SubUserSalaryDetail; -import org.dromara.contractor.domain.SubUserSalaryPeriod; -import org.dromara.contractor.domain.dto.constructionuser.SubConstructionUserQueryReq; import org.dromara.contractor.domain.dto.usersalarydetail.SubUserSalaryDetailQueryReq; import org.dromara.contractor.domain.dto.usersalaryperiod.SubConstructionUserSalaryDto; -import org.dromara.contractor.domain.exportvo.BusConstructionUserExportVo; -import org.dromara.contractor.domain.vo.constructionuser.SubConstructionUserVo; import org.dromara.contractor.domain.vo.usersalarydetail.SubUserSalaryDetailVo; import org.dromara.contractor.domain.vo.usersalaryperiod.SubConstructionUserSalaryVo; import org.dromara.contractor.excel.DynamicSalaryData; +import org.dromara.contractor.excel.SalaryExcelReader; import org.dromara.contractor.mapper.SubUserSalaryDetailMapper; import org.dromara.contractor.service.ISubConstructionUserService; import org.dromara.contractor.service.ISubUserSalaryDetailService; -import org.dromara.gps.domain.vo.ConstructionUser; import org.dromara.project.domain.BusAttendance; import org.dromara.project.domain.BusProject; import org.dromara.project.domain.BusProjectTeam; @@ -57,7 +48,6 @@ import org.dromara.project.service.IBusAttendanceService; import org.dromara.project.service.IBusProjectService; import org.dromara.project.service.IBusProjectTeamService; import org.dromara.project.service.IBusWorkWageService; -import org.dromara.project.service.impl.BusProjectTeamServiceImpl; import org.dromara.system.domain.vo.SysUserVo; import org.dromara.system.service.ISysUserService; import org.springframework.beans.BeanUtils; @@ -66,7 +56,6 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import software.amazon.awssdk.utils.CollectionUtils; import java.io.*; import java.math.BigDecimal; @@ -78,7 +67,6 @@ import java.time.format.DateTimeFormatter; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; -import org.dromara.contractor.excel.SalaryExcelReader; /** * 员工每日工资Service业务层处理 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/DroDroneBigPicture.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/DroDroneBigPicture.java index a91f7e73..c9fcccff 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/DroDroneBigPicture.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/DroDroneBigPicture.java @@ -35,7 +35,7 @@ public class DroDroneBigPicture implements Serializable { /** * 大图 */ - private Long bigPic; + private String bigPic; /** * 识别结果图片 @@ -45,17 +45,7 @@ public class DroDroneBigPicture implements Serializable { /** * tif文件 */ - private Long tifFile; - - /** - * 识别信息 - */ - private String recognizeMessage; - - /** - * 坐标信息 - */ - private String coordinateMessage; + private String tifFile; /** * 备注 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/vo/DroDroneBigPictureVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/vo/DroDroneBigPictureVo.java index bfe9583e..e7e0e68e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/vo/DroDroneBigPictureVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/drone/domain/vo/DroDroneBigPictureVo.java @@ -1,19 +1,15 @@ package org.dromara.drone.domain.vo; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; import org.dromara.common.translation.annotation.Translation; import org.dromara.common.translation.constant.TransConstant; import org.dromara.drone.domain.DroDroneBigPicture; -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; import java.io.Serial; import java.io.Serializable; -import java.util.Date; - /** @@ -48,11 +44,6 @@ public class DroDroneBigPictureVo implements Serializable { @ExcelProperty(value = "大图") private String bigPic; - /** - * 大图Url - */ - @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "bigPic") - private String bigPicUrl; /** * 识别结果图片 */ @@ -64,24 +55,13 @@ public class DroDroneBigPictureVo implements Serializable { */ @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "recognizePic") private String recognizePicUrl; + /** * tif文件 */ @ExcelProperty(value = "tif文件") private String tifFile; - /** - * 识别信息 - */ - @ExcelProperty(value = "识别信息") - private String recognizeMessage; - - /** - * 坐标信息 - */ - @ExcelProperty(value = "坐标信息") - private String coordinateMessage; - /** * 备注 */ diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelColumnService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelColumnService.java index 59c339fc..250b07cd 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelColumnService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelColumnService.java @@ -16,6 +16,7 @@ import org.dromara.progress.domain.PgsProgressCategory; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 设施-光伏板立柱Service接口 @@ -123,5 +124,5 @@ public interface IFacPhotovoltaicPanelColumnService extends IService projectIds, List matchPoints); + void updateFinishNumberByCoordinate(List projectIds, Set matchPoints); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelPointService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelPointService.java index 0523ca06..dae6b362 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelPointService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelPointService.java @@ -16,6 +16,7 @@ import org.dromara.progress.domain.PgsProgressCategory; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 设施-光伏板桩点Service接口 @@ -123,5 +124,5 @@ public interface IFacPhotovoltaicPanelPointService extends IService projectIds, List matchPoints); + void updateFinishNumberByCoordinate(List projectIds, Set matchPoints); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelService.java index fa1659b3..4e947ad9 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelService.java @@ -134,6 +134,9 @@ public interface IFacPhotovoltaicPanelService extends IService projectIds, List coordinateList); + void updateFinishNumberByCoordinate(List projectIds, + List coordinateList, + String type); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelSupportService.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelSupportService.java index 9f0ac41c..ed43e518 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelSupportService.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/IFacPhotovoltaicPanelSupportService.java @@ -16,6 +16,7 @@ import org.dromara.progress.domain.PgsProgressCategory; import java.util.Collection; import java.util.List; +import java.util.Set; /** * 设施-光伏板支架Service接口 @@ -123,5 +124,5 @@ public interface IFacPhotovoltaicPanelSupportService extends IService projectIds, List matchPoints); + void updateFinishNumberByCoordinate(List projectIds, Set matchPoints); } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelColumnServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelColumnServiceImpl.java index cc42a487..4677037b 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelColumnServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelColumnServiceImpl.java @@ -421,7 +421,7 @@ public class FacPhotovoltaicPanelColumnServiceImpl extends ServiceImpl projectIds, List matchPoints) { + public void updateFinishNumberByCoordinate(List projectIds, Set matchPoints) { // 获取数据 List finishList = this.listByIds(matchPoints); // 更新完成状态 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPartsServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPartsServiceImpl.java index d26a8811..24e2aac6 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPartsServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPartsServiceImpl.java @@ -44,6 +44,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.dao.DataAccessException; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -824,6 +825,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan * @param coordinateList 识别结果 * @param type 类型 */ + @Async @Override @Transactional(rollbackFor = Exception.class) public void updateFinishNumberByCoordinate(List projectIds, @@ -837,10 +839,11 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan return; } // 判断识别出来的坐标是否包含某个点 - List coordinates = coordinateList.stream().map(coordinate -> { - return new Coordinate(Double.parseDouble(coordinate.getLng()), Double.parseDouble(coordinate.getLat())); - }).toList(); - List matchPoints = JtsPointMatcher.matchPoints(coordinates, idCoordinatePointList, 1.0); + List coordinates = coordinateList.stream().map(coordinate -> + new Coordinate(Double.parseDouble(coordinate.getLng()), Double.parseDouble(coordinate.getLat()))).toList(); + // 匹配距离 + final double distance = 1.0; + Set matchPoints = JtsPointMatcher.matchPoints(coordinates, idCoordinatePointList, distance); if (CollUtil.isEmpty(matchPoints)) { return; } @@ -869,7 +872,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan .list(); if (CollUtil.isNotEmpty(list)) { return list.stream().map(point -> - new IdCoordinatePoint(point.getId(), point.getPositions())).toList(); + new IdCoordinatePoint(point.getId(), point.getName(), point.getPositions())).toList(); } } else if (type.equals(RecognizerTypeEnum.COLUMN.getValue())) { List list = photovoltaicPanelColumnService.lambdaQuery() @@ -878,7 +881,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan .list(); if (CollUtil.isNotEmpty(list)) { return list.stream().map(column -> - new IdCoordinatePoint(column.getId(), column.getPositions())).toList(); + new IdCoordinatePoint(column.getId(), column.getName(), column.getPositions())).toList(); } } else if (type.equals(RecognizerTypeEnum.BRACKET.getValue())) { List list = photovoltaicPanelSupportService.lambdaQuery() @@ -886,8 +889,8 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan .ne(FacPhotovoltaicPanelSupport::getStatus, FacFinishStatusEnum.FINISH.getValue()) .list(); if (CollUtil.isNotEmpty(list)) { - return list.stream().map(column -> - new IdCoordinatePoint(column.getId(), column.getPositions())).toList(); + return list.stream().map(support -> + new IdCoordinatePoint(support.getId(), support.getName(), support.getPositions())).toList(); } } return List.of(); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPointServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPointServiceImpl.java index b5d10de2..aaa34fef 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPointServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelPointServiceImpl.java @@ -421,7 +421,7 @@ public class FacPhotovoltaicPanelPointServiceImpl extends ServiceImpl projectIds, List matchPoints) { + public void updateFinishNumberByCoordinate(List projectIds, Set matchPoints) { // 获取数据 List finishList = this.listByIds(matchPoints); // 更新完成状态 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java index 840266c7..f50d02c6 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelServiceImpl.java @@ -34,6 +34,7 @@ import org.dromara.facility.mapper.FacPhotovoltaicPanelMapper; import org.dromara.facility.service.IFacMatrixService; import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; import org.dromara.facility.service.IFacPhotovoltaicPanelService; +import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum; import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; import org.dromara.progress.constant.PgsProgressCategoryConstant; import org.dromara.progress.domain.PgsProgressCategory; @@ -49,6 +50,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.dao.DataAccessException; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -760,24 +762,31 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl projectIds, List coordinateList) { + public void updateFinishNumberByCoordinate(List projectIds, + List coordinateList, + String type) { // 获取项目下的所有未完成的光伏板 List panelList = this.lambdaQuery() .in(FacPhotovoltaicPanel::getProjectId, projectIds) .ne(FacPhotovoltaicPanel::getStatus, FacFinishStatusEnum.FINISH.getValue()) + .eq(type.equals(RecognizerTypeEnum.BRACKET.getValue()), FacPhotovoltaicPanel::getProgressCategoryName, "支架安装") + .eq(type.equals(RecognizerTypeEnum.PANEL.getValue()), FacPhotovoltaicPanel::getProgressCategoryName, "组件安装") .list(); if (CollUtil.isEmpty(panelList)) { return; } // 判断识别出来的坐标是否包含在某个面内 - List finishPanelList = new ArrayList<>(); + Set finishPanelList = new HashSet<>(); for (RecognizeConvertCoordinateResult result : coordinateList) { // 获取包含该坐标的面 FacPhotovoltaicPanel containingPanel = JSTUtil.findContainingPanel(result, panelList); if (containingPanel != null) { + log.info("识别到的光伏板:{}", containingPanel.getName()); finishPanelList.add(containingPanel); } } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelSupportServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelSupportServiceImpl.java index 38f4b634..1504f34a 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelSupportServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/facility/service/impl/FacPhotovoltaicPanelSupportServiceImpl.java @@ -421,7 +421,7 @@ public class FacPhotovoltaicPanelSupportServiceImpl extends ServiceImpl projectIds, List matchPoints) { + public void updateFinishNumberByCoordinate(List projectIds, Set matchPoints) { // 获取数据 List finishList = this.listByIds(matchPoints); // 更新完成状态 diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerConstant.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerConstant.java index 60df3df7..90ac7a9d 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerConstant.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerConstant.java @@ -11,4 +11,9 @@ public interface RecognizerConstant { */ String RECOGNIZE_API_PATH_POST = "/detect_image"; + /** + * 光伏板识别 api 路径 + */ + String RECOGNIZE_PANEL_API_PATH_POST = "/detect_process"; + } diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerManager.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerManager.java index a00446a0..b8a48e17 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerManager.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerManager.java @@ -13,18 +13,16 @@ import org.springframework.stereotype.Component; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; -import java.io.*; -import java.net.*; -import java.nio.file.Files; -import java.util.ArrayList; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.net.FileNameMap; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URLConnection; import java.util.List; import java.util.Objects; -import java.io.*; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; - /** * @author lilemy * @date 2025/7/21 10:56 @@ -61,6 +59,16 @@ public class RecognizerManager { return recognize(capUrl, recTypeList, false); } + /** + * 光伏板识别 + * + * @param capUrl 图片地址 + * @return 识别结果 + */ + public RecognizeVo recognize(String capUrl) { + return RecognizerUtils.recognize(recognizerProperties.getUrl(), capUrl); + } + /** * 绘制图片 * diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerUtils.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerUtils.java index 916b9dd9..56e78e9c 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerUtils.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/RecognizerUtils.java @@ -25,6 +25,9 @@ import java.util.List; @Slf4j public class RecognizerUtils { + /** + * 坐标转换接口 + */ private final static String CONVERT_COORDINATE = "http://192.168.110.2:8895/yjearth4.0/api/v1/vector/convert"; /** @@ -44,8 +47,41 @@ public class RecognizerUtils { paramMap.put("type", type); paramMap.put("url", capUrl); paramMap.put("extract", extract != null && extract ? "true" : "false"); + log.info("图片识别请求参数:{}", paramMap); String errorMsg = "图片识别请求失败"; String url = host + RecognizerConstant.RECOGNIZE_API_PATH_POST; + return getRecognizeVo(capUrl, paramMap, errorMsg, url); + } + + /** + * 光伏板识别 + * + * @param host 域名 + * @param capUrl 在线图片地址 + * @return 识别结果 + */ + public static RecognizeVo recognize(String host, String capUrl) { + if (StringUtils.isAnyBlank(host, capUrl)) { + throw new ServiceException("光伏板图片识别参数为空", HttpStatus.HTTP_BAD_REQUEST); + } + HashMap paramMap = new HashMap<>(); + paramMap.put("url", capUrl); + log.info("光伏板图片识别请求参数:{}", paramMap); + String errorMsg = "光伏板图片识别请求失败"; + String url = host + RecognizerConstant.RECOGNIZE_PANEL_API_PATH_POST; + return getRecognizeVo(capUrl, paramMap, errorMsg, url); + } + + /** + * 获取识别结果 + * + * @param capUrl 图片地址 + * @param paramMap 参数 + * @param errorMsg 错误信息 + * @param url 请求地址 + * @return 识别结果 + */ + private static RecognizeVo getRecognizeVo(String capUrl, HashMap paramMap, String errorMsg, String url) { try (HttpResponse response = HttpRequest.post(url) .body(JSONUtil.toJsonStr(paramMap)) .execute()) { @@ -91,8 +127,8 @@ public class RecognizerUtils { List size = targetVo.getSize(); JSONObject pos = new JSONObject(); // 中心点 - pos.set("x", point.get(0) + size.get(0) / 2); - pos.set("y", point.get(1) + size.get(1) / 2); + pos.set("x", (point.get(0) + size.get(0)) / 2); + pos.set("y", (point.get(1) + size.get(1)) / 2); positions.add(pos); } reqJson.set("positions", positions); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/enums/RecognizerTypeEnum.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/enums/RecognizerTypeEnum.java index e4001375..7fd5173e 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/enums/RecognizerTypeEnum.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/manager/recognizermanager/enums/RecognizerTypeEnum.java @@ -19,11 +19,12 @@ public enum RecognizerTypeEnum { NO_VEST("未穿反光衣", "novest", "4"), SMOKE("吸烟", "smoke", "5"), FIRE("火焰", "fire", "6"), - SMOGGY("烟雾", "smoggy", "7"), + // SMOGGY("烟雾", "smoggy", "7"), PANEL("光伏板", "solar", "8"), BRACKET("光伏板支架", "bracket", "9"), COLUMN("光伏板桩", "column", "10"), - HOLE("光伏板孔", "hole", "11"); + HOLE("光伏板孔", "hole", "11"), + ; private final String text; diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueVo.java index eab932ae..bd9c2392 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/out/domain/vo/OutConstructionValueVo.java @@ -184,7 +184,7 @@ public class OutConstructionValueVo implements Serializable { /** * 上报人 */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") + @Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "createBy") private String createByName; /** diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressPlanDetailServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressPlanDetailServiceImpl.java index ab6f23cf..32b1c0fc 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressPlanDetailServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/progress/service/impl/PgsProgressPlanDetailServiceImpl.java @@ -1148,13 +1148,10 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl projectIds = projects.stream().map(BusProject::getId).distinct().toList(); - // 识别类型:洞、桩、架、架子 - List enumList = List.of(RecognizerTypeEnum.HOLE, RecognizerTypeEnum.PANEL, - RecognizerTypeEnum.COLUMN, RecognizerTypeEnum.BRACKET); // 调用识别算法 RecognizeVo recognizeVo = null; try { - recognizeVo = recognizerManager.recognize(fileUrl, enumList); + recognizeVo = recognizerManager.recognize(fileUrl); } catch (Exception e) { log.error("识别失败:{}", e.getMessage()); } @@ -1170,7 +1167,6 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl> typeMap = targets.stream() .collect(Collectors.groupingBy(RecognizeTargetVo::getType)); - List allConvertCoordinateList = new ArrayList<>(); for (Map.Entry> entry : typeMap.entrySet()) { String type = entry.getKey(); List value = entry.getValue(); @@ -1181,17 +1177,16 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl xzdGuaranteeInfoVo1 = List.of(xzdGuaranteeInfoVo); // 装填数据 -// setValue(xzdGuaranteeInfoVo1); + setValue(xzdGuaranteeInfoVo1); return xzdGuaranteeInfoVo1.getFirst(); diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java index 86c360bf..5df64fe3 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/xzd/paymentsReceipts/domain/vo/XzdSfkZonhefuwuFkVo.java @@ -1,26 +1,22 @@ package org.dromara.xzd.paymentsReceipts.domain.vo; -import java.math.BigDecimal; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.dromara.common.excel.annotation.ExcelDictFormat; +import org.dromara.common.excel.convert.ExcelDictConvert; import org.dromara.common.mybatis.core.domain.BaseEntity; import org.dromara.common.translation.annotation.Translation; import org.dromara.common.translation.constant.TransConstant; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan; import org.dromara.xzd.paymentsReceipts.domain.XzdSfkZonhefuwuFk; -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import org.dromara.common.excel.annotation.ExcelDictFormat; -import org.dromara.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; import java.io.Serial; -import java.io.Serializable; +import java.math.BigDecimal; import java.time.LocalDate; -import java.util.Date; import java.util.List; @@ -30,6 +26,7 @@ import java.util.List; * @author Lion Li * @date 2025-10-16 */ +@EqualsAndHashCode(callSuper = true) @Data @ExcelIgnoreUnannotated @AutoMapper(target = XzdSfkZonhefuwuFk.class)