Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -110,6 +110,8 @@ sa-token:
|
|||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
||||||
active-timeout: 86400
|
active-timeout: 86400
|
||||||
|
# 同一账号最大登录数量,-1代表不限
|
||||||
|
max-login-count: -1
|
||||||
|
|
||||||
# security配置
|
# security配置
|
||||||
security:
|
security:
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import org.dromara.facility.domain.FacMatrix;
|
|||||||
import org.dromara.facility.service.IFacMatrixService;
|
import org.dromara.facility.service.IFacMatrixService;
|
||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelService;
|
||||||
|
import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum;
|
||||||
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
||||||
import org.dromara.manager.ys7manager.Ys7Constant;
|
import org.dromara.manager.ys7manager.Ys7Constant;
|
||||||
import org.dromara.manager.ys7manager.Ys7Manager;
|
import org.dromara.manager.ys7manager.Ys7Manager;
|
||||||
@ -403,7 +404,8 @@ public class DemoTest {
|
|||||||
@Test
|
@Test
|
||||||
void testImport() {
|
void testImport() {
|
||||||
photovoltaicPanelService.updateFinishNumberByCoordinate(List.of(1968510961294921730L),
|
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
|
@Test
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import org.dromara.common.log.enums.BusinessType;
|
|||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.system.domain.vo.SysRoleVo;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -105,6 +106,14 @@ public class SysRoleWorkController extends BaseController {
|
|||||||
return toAjax(sysRoleWorkService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(sysRoleWorkService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前用户角色列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/getRoleList/{projectId}")
|
||||||
|
public R<List<SysRoleVo>> getRoleList(@PathVariable("projectId") Long projectId) {
|
||||||
|
return R.ok(sysRoleWorkService.getRoleList(projectId));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取角色对应流程
|
* 获取角色对应流程
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -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; // 缺卡统一处理时间
|
|
||||||
}
|
|
||||||
@ -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; // 安全帽设备标识
|
|
||||||
}
|
|
||||||
@ -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;
|
|
||||||
}
|
|
||||||
@ -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; // 更新时间
|
|
||||||
}
|
|
||||||
@ -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; // 更新时间
|
|
||||||
}
|
|
||||||
@ -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; // 摄像头名称
|
|
||||||
}
|
|
||||||
@ -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; // 附件
|
|
||||||
}
|
|
||||||
@ -43,7 +43,7 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi
|
|||||||
try {
|
try {
|
||||||
// 1. 解析消息体(只解析一次,避免重复操作)
|
// 1. 解析消息体(只解析一次,避免重复操作)
|
||||||
byte[] messageBody = message.getBody();
|
byte[] messageBody = message.getBody();
|
||||||
if (messageBody == null || messageBody.length == 0) {
|
if (messageBody.length == 0) {
|
||||||
log.warn("【异步消息处理】消息体为空,忽略处理");
|
log.warn("【异步消息处理】消息体为空,忽略处理");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -76,8 +76,8 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String key = "";
|
String key;
|
||||||
DroProjectDrone droProjectDrone = null;
|
DroProjectDrone droProjectDrone;
|
||||||
boolean isOsd4 = false;
|
boolean isOsd4 = false;
|
||||||
|
|
||||||
// 5. 根据data字段内容判断key类型,并查询无人机信息
|
// 5. 根据data字段内容判断key类型,并查询无人机信息
|
||||||
@ -130,7 +130,7 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi
|
|||||||
System.out.println("大屏已推送消息");
|
System.out.println("大屏已推送消息");
|
||||||
}
|
}
|
||||||
int onlineCount = InitOnStartWebSocketServer.getOnlineCount();
|
int onlineCount = InitOnStartWebSocketServer.getOnlineCount();
|
||||||
if (onlineCount > 0){
|
if (onlineCount > 0) {
|
||||||
String modleId = b ? droProjectDrone.getAirplaneModleId() : droProjectDrone.getDroneModleId();
|
String modleId = b ? droProjectDrone.getAirplaneModleId() : droProjectDrone.getDroneModleId();
|
||||||
if (modleId != null) {
|
if (modleId != null) {
|
||||||
String ued = ueStructureJsonMessage(message, modleId);
|
String ued = ueStructureJsonMessage(message, modleId);
|
||||||
@ -143,14 +143,14 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi
|
|||||||
|
|
||||||
private String buildPushMessage(String key, String message, Long projectId) {
|
private String buildPushMessage(String key, String message, Long projectId) {
|
||||||
JSONObject messageObj = new JSONObject();
|
JSONObject messageObj = new JSONObject();
|
||||||
messageObj.put("type", "wrj_DATA_UPDATE");
|
messageObj.set("type", "wrj_DATA_UPDATE");
|
||||||
messageObj.put("projectId",projectId.toString());
|
messageObj.set("projectId", projectId.toString());
|
||||||
messageObj.put("clientId",key);
|
messageObj.set("clientId", key);
|
||||||
// 位置信息
|
// 位置信息
|
||||||
JSONObject locationObj = new JSONObject();
|
JSONObject locationObj = new JSONObject();
|
||||||
locationObj.put("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude").toString()); // 纬度
|
locationObj.set("latitude", JSONUtil.parseObj(message).getJSONObject("data").get("latitude").toString()); // 纬度
|
||||||
locationObj.put("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude").toString()); // 经度
|
locationObj.set("longitude", JSONUtil.parseObj(message).getJSONObject("data").get("longitude").toString()); // 经度
|
||||||
messageObj.put("location", locationObj);
|
messageObj.set("location", locationObj);
|
||||||
return messageObj.toString();
|
return messageObj.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,19 +161,19 @@ public class AsyncMessageHandlerServiceImpl implements IAsyncMessageHandlerServi
|
|||||||
private String ueStructureJsonMessage(String message, String modelId) {
|
private String ueStructureJsonMessage(String message, String modelId) {
|
||||||
// 构造消息对象(包含关键信息)
|
// 构造消息对象(包含关键信息)
|
||||||
JSONObject messageObj = new JSONObject();
|
JSONObject messageObj = new JSONObject();
|
||||||
messageObj.put("type", "location"); // 消息类型
|
messageObj.set("type", "location"); // 消息类型
|
||||||
|
|
||||||
JSONObject data = new JSONObject();
|
JSONObject data = new JSONObject();
|
||||||
data.put("id", modelId);
|
data.set("id", modelId);
|
||||||
|
|
||||||
// 位置信息
|
// 位置信息
|
||||||
JSONObject position = new JSONObject();
|
JSONObject position = new JSONObject();
|
||||||
position.put("lat", JSONUtil.parseObj(message).getJSONObject("data").get("latitude")); // 纬度
|
position.set("lat", JSONUtil.parseObj(message).getJSONObject("data").get("latitude")); // 纬度
|
||||||
position.put("lng", JSONUtil.parseObj(message).getJSONObject("data").get("longitude")); // 经度
|
position.set("lng", JSONUtil.parseObj(message).getJSONObject("data").get("longitude")); // 经度
|
||||||
position.put("alt", JSONUtil.parseObj(message).getJSONObject("data").get("height")); // 海拔
|
position.set("alt", JSONUtil.parseObj(message).getJSONObject("data").get("height")); // 海拔
|
||||||
|
|
||||||
data.put("position", position);
|
data.set("position", position);
|
||||||
messageObj.put("data", data); // 设备唯一标识
|
messageObj.set("data", data); // 设备唯一标识
|
||||||
|
|
||||||
// 转换为String类型返回
|
// 转换为String类型返回
|
||||||
return messageObj.toString();
|
return messageObj.toString();
|
||||||
|
|||||||
@ -166,6 +166,28 @@ public class SysRoleWorkServiceImpl extends ServiceImpl<SysRoleWorkMapper, SysRo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SysRoleVo> getRoleList(Long projectId){
|
||||||
|
Long userId = LoginHelper.getUserId();
|
||||||
|
List<SysUserRole> list = baseMapper.getRoleList(userId,projectId);
|
||||||
|
List<SysRoleVo> roleList = new ArrayList<>();
|
||||||
|
for (SysUserRole sysUserRole : list) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<SysRoleWork> lqw = new LambdaQueryWrapper<>();
|
||||||
|
lqw.eq(SysRoleWork::getRoleId, sysUserRole.getRoleId());
|
||||||
|
lqw.eq(SysRoleWork::getProjectId,projectId);
|
||||||
|
SysRoleWork one = getOne(lqw);
|
||||||
|
|
||||||
|
if (one != null){
|
||||||
|
SysRoleVo sysRoleVo = roleService.selectRoleById(sysUserRole.getRoleId());
|
||||||
|
if (sysRoleVo != null){
|
||||||
|
roleList.add(sysRoleVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return roleList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据当前登录人获取角色流程对应
|
* 根据当前登录人获取角色流程对应
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -18,6 +18,11 @@ public class IdCoordinatePoint {
|
|||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点位置 107.13162414986301,23.817601041770256
|
* 点位置 107.13162414986301,23.817601041770256
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -358,14 +358,14 @@ public class JSTUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static String getLocationName(String lat, String lng){
|
public static String getLocationName(String lat, String lng) {
|
||||||
String a = lng+","+lat;
|
String a = lng + "," + lat;
|
||||||
String s = HttpUtil.get("https://restapi.amap.com/v3/geocode/regeo?location=" + a + "&Key=2a769e5362ac9a7d7db12e85b640124c");
|
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;
|
String address = null;
|
||||||
if(jsonObject.getInt("status") == 1){
|
if (jsonObject.getInt("status") == 1) {
|
||||||
address = jsonObject.getJSONObject("regeocode").getStr("formatted_address");
|
address = jsonObject.getJSONObject("regeocode").getStr("formatted_address");
|
||||||
}
|
}
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package org.dromara.common.utils;
|
package org.dromara.common.utils;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.common.domain.IdCoordinatePoint;
|
import org.dromara.common.domain.IdCoordinatePoint;
|
||||||
import org.locationtech.jts.geom.Coordinate;
|
import org.locationtech.jts.geom.Coordinate;
|
||||||
import org.locationtech.jts.geom.GeometryFactory;
|
import org.locationtech.jts.geom.GeometryFactory;
|
||||||
@ -8,8 +10,11 @@ import org.locationtech.jts.geom.Polygon;
|
|||||||
import org.locationtech.jts.util.GeometricShapeFactory;
|
import org.locationtech.jts.util.GeometricShapeFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class JtsPointMatcher {
|
public class JtsPointMatcher {
|
||||||
|
|
||||||
private static final GeometryFactory geometryFactory = new GeometryFactory();
|
private static final GeometryFactory geometryFactory = new GeometryFactory();
|
||||||
@ -43,19 +48,30 @@ public class JtsPointMatcher {
|
|||||||
* @param radiusMeter 半径(米)
|
* @param radiusMeter 半径(米)
|
||||||
* @return 匹配到的 pointsB 的 id
|
* @return 匹配到的 pointsB 的 id
|
||||||
*/
|
*/
|
||||||
public static List<Long> matchPoints(List<Coordinate> pointsA, List<IdCoordinatePoint> pointsB, double radiusMeter) {
|
public static Set<Long> matchPoints(List<Coordinate> pointsA, List<IdCoordinatePoint> pointsB, double radiusMeter) {
|
||||||
List<Long> matched = new ArrayList<>();
|
Set<Long> matched = new HashSet<>();
|
||||||
for (Coordinate pA : pointsA) {
|
for (Coordinate pA : pointsA) {
|
||||||
Point pointA = geometryFactory.createPoint(pA);
|
Point pointA = geometryFactory.createPoint(pA);
|
||||||
for (IdCoordinatePoint pvPoint : pointsB) {
|
for (IdCoordinatePoint pvPoint : pointsB) {
|
||||||
// positions 字段 -> Coordinate
|
String positions = pvPoint.getPositions();
|
||||||
String[] posArr = pvPoint.getPositions().split(",");
|
double lon;
|
||||||
double lon = Double.parseDouble(posArr[0]);
|
double lat;
|
||||||
double lat = Double.parseDouble(posArr[1]);
|
if (positions.startsWith("[") && positions.endsWith("]")) {
|
||||||
|
// 是数组形式,例如 [1231515.141,3123123.3123]
|
||||||
|
List<Double> 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);
|
Polygon circle = createCircle(lon, lat, radiusMeter);
|
||||||
|
|
||||||
if (circle.contains(pointA)) {
|
if (circle.contains(pointA)) {
|
||||||
matched.add(pvPoint.getId());
|
matched.add(pvPoint.getId());
|
||||||
|
log.info("匹配到桩点:{}", pvPoint.getName());
|
||||||
break; // 找到一个就够
|
break; // 找到一个就够
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,7 +99,7 @@ public class JtsPointMatcher {
|
|||||||
p2.setPositions("107.08827916132982,23.877744707721714"); // 很远
|
p2.setPositions("107.08827916132982,23.877744707721714"); // 很远
|
||||||
listB.add(p2);
|
listB.add(p2);
|
||||||
|
|
||||||
List<Long> result = matchPoints(listA, listB, 4.4);
|
Set<Long> result = matchPoints(listA, listB, 4.4);
|
||||||
|
|
||||||
System.out.println("匹配到的桩点ID:");
|
System.out.println("匹配到的桩点ID:");
|
||||||
for (Long id : result) {
|
for (Long id : result) {
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import org.dromara.common.core.utils.ObjectUtils;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.SubContractor;
|
import org.dromara.contractor.domain.SubContractor;
|
||||||
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
import org.dromara.contractor.domain.dto.contractor.SubContractorCreateReq;
|
||||||
@ -118,16 +117,19 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
|
|||||||
contractor.setFiles(fileMapStr);
|
contractor.setFiles(fileMapStr);
|
||||||
// 数据校验
|
// 数据校验
|
||||||
validEntityBeforeSave(contractor);
|
validEntityBeforeSave(contractor);
|
||||||
String name = req.getName();
|
|
||||||
Long count = this.lambdaQuery().eq(SubContractor::getName, name).count();
|
|
||||||
if (count > 0) {
|
|
||||||
throw new ServiceException("分包单位名称重复", HttpStatus.BAD_REQUEST);
|
|
||||||
}
|
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
BusProject project = projectService.getById(projectId);
|
BusProject project = projectService.getById(projectId);
|
||||||
if (project == null) {
|
if (project == null) {
|
||||||
throw new ServiceException("项目不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("项目不存在", HttpStatus.NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
String name = req.getName();
|
||||||
|
Long count = this.lambdaQuery()
|
||||||
|
.eq(SubContractor::getName, name)
|
||||||
|
.eq(SubContractor::getProjectId, projectId)
|
||||||
|
.count();
|
||||||
|
if (count > 0) {
|
||||||
|
throw new ServiceException("分包单位名称重复", HttpStatus.BAD_REQUEST);
|
||||||
|
}
|
||||||
// 操作数据库
|
// 操作数据库
|
||||||
boolean save = this.save(contractor);
|
boolean save = this.save(contractor);
|
||||||
if (!save) {
|
if (!save) {
|
||||||
@ -160,7 +162,10 @@ public class SubContractorServiceImpl extends ServiceImpl<SubContractorMapper, S
|
|||||||
}
|
}
|
||||||
// 判断名称是否重复
|
// 判断名称是否重复
|
||||||
if (!oldContractor.getName().equals(req.getName())) {
|
if (!oldContractor.getName().equals(req.getName())) {
|
||||||
Long count = this.lambdaQuery().eq(SubContractor::getName, req.getName()).count();
|
Long count = this.lambdaQuery()
|
||||||
|
.eq(SubContractor::getName, req.getName())
|
||||||
|
.eq(SubContractor::getProjectId, req.getProjectId())
|
||||||
|
.count();
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new ServiceException("分包单位名称重复", HttpStatus.BAD_REQUEST);
|
throw new ServiceException("分包单位名称重复", HttpStatus.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,23 +8,18 @@ import com.alibaba.excel.EasyExcel;
|
|||||||
import com.alibaba.excel.ExcelWriter;
|
import com.alibaba.excel.ExcelWriter;
|
||||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||||
import com.alibaba.excel.write.metadata.fill.FillConfig;
|
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.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
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 jakarta.servlet.ServletException;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.pdfbox.io.IOUtils;
|
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
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.constant.HttpStatus;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.ObjectUtils;
|
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.common.utils.IdCardEncryptorUtil;
|
||||||
import org.dromara.contractor.domain.SubConstructionUser;
|
import org.dromara.contractor.domain.SubConstructionUser;
|
||||||
import org.dromara.contractor.domain.SubUserSalaryDetail;
|
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.usersalarydetail.SubUserSalaryDetailQueryReq;
|
||||||
import org.dromara.contractor.domain.dto.usersalaryperiod.SubConstructionUserSalaryDto;
|
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.usersalarydetail.SubUserSalaryDetailVo;
|
||||||
import org.dromara.contractor.domain.vo.usersalaryperiod.SubConstructionUserSalaryVo;
|
import org.dromara.contractor.domain.vo.usersalaryperiod.SubConstructionUserSalaryVo;
|
||||||
import org.dromara.contractor.excel.DynamicSalaryData;
|
import org.dromara.contractor.excel.DynamicSalaryData;
|
||||||
|
import org.dromara.contractor.excel.SalaryExcelReader;
|
||||||
import org.dromara.contractor.mapper.SubUserSalaryDetailMapper;
|
import org.dromara.contractor.mapper.SubUserSalaryDetailMapper;
|
||||||
import org.dromara.contractor.service.ISubConstructionUserService;
|
import org.dromara.contractor.service.ISubConstructionUserService;
|
||||||
import org.dromara.contractor.service.ISubUserSalaryDetailService;
|
import org.dromara.contractor.service.ISubUserSalaryDetailService;
|
||||||
import org.dromara.gps.domain.vo.ConstructionUser;
|
|
||||||
import org.dromara.project.domain.BusAttendance;
|
import org.dromara.project.domain.BusAttendance;
|
||||||
import org.dromara.project.domain.BusProject;
|
import org.dromara.project.domain.BusProject;
|
||||||
import org.dromara.project.domain.BusProjectTeam;
|
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.IBusProjectService;
|
||||||
import org.dromara.project.service.IBusProjectTeamService;
|
import org.dromara.project.service.IBusProjectTeamService;
|
||||||
import org.dromara.project.service.IBusWorkWageService;
|
import org.dromara.project.service.IBusWorkWageService;
|
||||||
import org.dromara.project.service.impl.BusProjectTeamServiceImpl;
|
|
||||||
import org.dromara.system.domain.vo.SysUserVo;
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
import org.dromara.system.service.ISysUserService;
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@ -66,7 +56,6 @@ import org.springframework.scheduling.annotation.Async;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import software.amazon.awssdk.utils.CollectionUtils;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@ -78,7 +67,6 @@ import java.time.format.DateTimeFormatter;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import org.dromara.contractor.excel.SalaryExcelReader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工每日工资Service业务层处理
|
* 员工每日工资Service业务层处理
|
||||||
|
|||||||
@ -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文件
|
* tif文件
|
||||||
*/
|
*/
|
||||||
private Long tifFile;
|
private String tifFile;
|
||||||
|
|
||||||
/**
|
|
||||||
* 识别信息
|
|
||||||
*/
|
|
||||||
private String recognizeMessage;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 坐标信息
|
|
||||||
*/
|
|
||||||
private String coordinateMessage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
|
|||||||
@ -1,19 +1,15 @@
|
|||||||
package org.dromara.drone.domain.vo;
|
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.annotation.Translation;
|
||||||
import org.dromara.common.translation.constant.TransConstant;
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
import org.dromara.drone.domain.DroDroneBigPicture;
|
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.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,11 +44,6 @@ public class DroDroneBigPictureVo implements Serializable {
|
|||||||
@ExcelProperty(value = "大图")
|
@ExcelProperty(value = "大图")
|
||||||
private String bigPic;
|
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")
|
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "recognizePic")
|
||||||
private String recognizePicUrl;
|
private String recognizePicUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tif文件
|
* tif文件
|
||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "tif文件")
|
@ExcelProperty(value = "tif文件")
|
||||||
private String tifFile;
|
private String tifFile;
|
||||||
|
|
||||||
/**
|
|
||||||
* 识别信息
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "识别信息")
|
|
||||||
private String recognizeMessage;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 坐标信息
|
|
||||||
*/
|
|
||||||
@ExcelProperty(value = "坐标信息")
|
|
||||||
private String coordinateMessage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import org.dromara.progress.domain.PgsProgressCategory;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设施-光伏板立柱Service接口
|
* 设施-光伏板立柱Service接口
|
||||||
@ -123,5 +124,5 @@ public interface IFacPhotovoltaicPanelColumnService extends IService<FacPhotovol
|
|||||||
* @param projectIds 项目id列表
|
* @param projectIds 项目id列表
|
||||||
* @param matchPoints 匹配的坐标点id
|
* @param matchPoints 匹配的坐标点id
|
||||||
*/
|
*/
|
||||||
void updateFinishNumberByCoordinate(List<Long> projectIds, List<Long> matchPoints);
|
void updateFinishNumberByCoordinate(List<Long> projectIds, Set<Long> matchPoints);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import org.dromara.progress.domain.PgsProgressCategory;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设施-光伏板桩点Service接口
|
* 设施-光伏板桩点Service接口
|
||||||
@ -123,5 +124,5 @@ public interface IFacPhotovoltaicPanelPointService extends IService<FacPhotovolt
|
|||||||
* @param projectIds 项目id列表
|
* @param projectIds 项目id列表
|
||||||
* @param matchPoints 匹配的坐标点id
|
* @param matchPoints 匹配的坐标点id
|
||||||
*/
|
*/
|
||||||
void updateFinishNumberByCoordinate(List<Long> projectIds, List<Long> matchPoints);
|
void updateFinishNumberByCoordinate(List<Long> projectIds, Set<Long> matchPoints);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,6 +134,9 @@ public interface IFacPhotovoltaicPanelService extends IService<FacPhotovoltaicPa
|
|||||||
*
|
*
|
||||||
* @param projectIds 项目id列表
|
* @param projectIds 项目id列表
|
||||||
* @param coordinateList 坐标列表
|
* @param coordinateList 坐标列表
|
||||||
|
* @param type 类型
|
||||||
*/
|
*/
|
||||||
void updateFinishNumberByCoordinate(List<Long> projectIds, List<RecognizeConvertCoordinateResult> coordinateList);
|
void updateFinishNumberByCoordinate(List<Long> projectIds,
|
||||||
|
List<RecognizeConvertCoordinateResult> coordinateList,
|
||||||
|
String type);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import org.dromara.progress.domain.PgsProgressCategory;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设施-光伏板支架Service接口
|
* 设施-光伏板支架Service接口
|
||||||
@ -123,5 +124,5 @@ public interface IFacPhotovoltaicPanelSupportService extends IService<FacPhotovo
|
|||||||
* @param projectIds 项目id列表
|
* @param projectIds 项目id列表
|
||||||
* @param matchPoints 匹配的坐标点id
|
* @param matchPoints 匹配的坐标点id
|
||||||
*/
|
*/
|
||||||
void updateFinishNumberByCoordinate(List<Long> projectIds, List<Long> matchPoints);
|
void updateFinishNumberByCoordinate(List<Long> projectIds, Set<Long> matchPoints);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -421,7 +421,7 @@ public class FacPhotovoltaicPanelColumnServiceImpl extends ServiceImpl<FacPhotov
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateFinishNumberByCoordinate(List<Long> projectIds, List<Long> matchPoints) {
|
public void updateFinishNumberByCoordinate(List<Long> projectIds, Set<Long> matchPoints) {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
List<FacPhotovoltaicPanelColumn> finishList = this.listByIds(matchPoints);
|
List<FacPhotovoltaicPanelColumn> finishList = this.listByIds(matchPoints);
|
||||||
// 更新完成状态
|
// 更新完成状态
|
||||||
|
|||||||
@ -44,6 +44,7 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.dao.DataIntegrityViolationException;
|
import org.springframework.dao.DataIntegrityViolationException;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -824,6 +825,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan
|
|||||||
* @param coordinateList 识别结果
|
* @param coordinateList 识别结果
|
||||||
* @param type 类型
|
* @param type 类型
|
||||||
*/
|
*/
|
||||||
|
@Async
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateFinishNumberByCoordinate(List<Long> projectIds,
|
public void updateFinishNumberByCoordinate(List<Long> projectIds,
|
||||||
@ -837,10 +839,11 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 判断识别出来的坐标是否包含某个点
|
// 判断识别出来的坐标是否包含某个点
|
||||||
List<Coordinate> coordinates = coordinateList.stream().map(coordinate -> {
|
List<Coordinate> coordinates = coordinateList.stream().map(coordinate ->
|
||||||
return new Coordinate(Double.parseDouble(coordinate.getLng()), Double.parseDouble(coordinate.getLat()));
|
new Coordinate(Double.parseDouble(coordinate.getLng()), Double.parseDouble(coordinate.getLat()))).toList();
|
||||||
}).toList();
|
// 匹配距离
|
||||||
List<Long> matchPoints = JtsPointMatcher.matchPoints(coordinates, idCoordinatePointList, 1.0);
|
final double distance = 1.0;
|
||||||
|
Set<Long> matchPoints = JtsPointMatcher.matchPoints(coordinates, idCoordinatePointList, distance);
|
||||||
if (CollUtil.isEmpty(matchPoints)) {
|
if (CollUtil.isEmpty(matchPoints)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -869,7 +872,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan
|
|||||||
.list();
|
.list();
|
||||||
if (CollUtil.isNotEmpty(list)) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
return list.stream().map(point ->
|
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())) {
|
} else if (type.equals(RecognizerTypeEnum.COLUMN.getValue())) {
|
||||||
List<FacPhotovoltaicPanelColumn> list = photovoltaicPanelColumnService.lambdaQuery()
|
List<FacPhotovoltaicPanelColumn> list = photovoltaicPanelColumnService.lambdaQuery()
|
||||||
@ -878,7 +881,7 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan
|
|||||||
.list();
|
.list();
|
||||||
if (CollUtil.isNotEmpty(list)) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
return list.stream().map(column ->
|
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())) {
|
} else if (type.equals(RecognizerTypeEnum.BRACKET.getValue())) {
|
||||||
List<FacPhotovoltaicPanelSupport> list = photovoltaicPanelSupportService.lambdaQuery()
|
List<FacPhotovoltaicPanelSupport> list = photovoltaicPanelSupportService.lambdaQuery()
|
||||||
@ -886,8 +889,8 @@ public class FacPhotovoltaicPanelPartsServiceImpl implements IFacPhotovoltaicPan
|
|||||||
.ne(FacPhotovoltaicPanelSupport::getStatus, FacFinishStatusEnum.FINISH.getValue())
|
.ne(FacPhotovoltaicPanelSupport::getStatus, FacFinishStatusEnum.FINISH.getValue())
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isNotEmpty(list)) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
return list.stream().map(column ->
|
return list.stream().map(support ->
|
||||||
new IdCoordinatePoint(column.getId(), column.getPositions())).toList();
|
new IdCoordinatePoint(support.getId(), support.getName(), support.getPositions())).toList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return List.of();
|
return List.of();
|
||||||
|
|||||||
@ -421,7 +421,7 @@ public class FacPhotovoltaicPanelPointServiceImpl extends ServiceImpl<FacPhotovo
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateFinishNumberByCoordinate(List<Long> projectIds, List<Long> matchPoints) {
|
public void updateFinishNumberByCoordinate(List<Long> projectIds, Set<Long> matchPoints) {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
List<FacPhotovoltaicPanelPoint> finishList = this.listByIds(matchPoints);
|
List<FacPhotovoltaicPanelPoint> finishList = this.listByIds(matchPoints);
|
||||||
// 更新完成状态
|
// 更新完成状态
|
||||||
|
|||||||
@ -34,6 +34,7 @@ import org.dromara.facility.mapper.FacPhotovoltaicPanelMapper;
|
|||||||
import org.dromara.facility.service.IFacMatrixService;
|
import org.dromara.facility.service.IFacMatrixService;
|
||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelService;
|
||||||
|
import org.dromara.manager.recognizermanager.enums.RecognizerTypeEnum;
|
||||||
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
|
||||||
import org.dromara.progress.constant.PgsProgressCategoryConstant;
|
import org.dromara.progress.constant.PgsProgressCategoryConstant;
|
||||||
import org.dromara.progress.domain.PgsProgressCategory;
|
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.DataAccessException;
|
||||||
import org.springframework.dao.DataIntegrityViolationException;
|
import org.springframework.dao.DataIntegrityViolationException;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -760,24 +762,31 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
*
|
*
|
||||||
* @param projectIds 项目id列表
|
* @param projectIds 项目id列表
|
||||||
* @param coordinateList 坐标列表
|
* @param coordinateList 坐标列表
|
||||||
|
* @param type 类型
|
||||||
*/
|
*/
|
||||||
|
@Async
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateFinishNumberByCoordinate(List<Long> projectIds, List<RecognizeConvertCoordinateResult> coordinateList) {
|
public void updateFinishNumberByCoordinate(List<Long> projectIds,
|
||||||
|
List<RecognizeConvertCoordinateResult> coordinateList,
|
||||||
|
String type) {
|
||||||
// 获取项目下的所有未完成的光伏板
|
// 获取项目下的所有未完成的光伏板
|
||||||
List<FacPhotovoltaicPanel> panelList = this.lambdaQuery()
|
List<FacPhotovoltaicPanel> panelList = this.lambdaQuery()
|
||||||
.in(FacPhotovoltaicPanel::getProjectId, projectIds)
|
.in(FacPhotovoltaicPanel::getProjectId, projectIds)
|
||||||
.ne(FacPhotovoltaicPanel::getStatus, FacFinishStatusEnum.FINISH.getValue())
|
.ne(FacPhotovoltaicPanel::getStatus, FacFinishStatusEnum.FINISH.getValue())
|
||||||
|
.eq(type.equals(RecognizerTypeEnum.BRACKET.getValue()), FacPhotovoltaicPanel::getProgressCategoryName, "支架安装")
|
||||||
|
.eq(type.equals(RecognizerTypeEnum.PANEL.getValue()), FacPhotovoltaicPanel::getProgressCategoryName, "组件安装")
|
||||||
.list();
|
.list();
|
||||||
if (CollUtil.isEmpty(panelList)) {
|
if (CollUtil.isEmpty(panelList)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 判断识别出来的坐标是否包含在某个面内
|
// 判断识别出来的坐标是否包含在某个面内
|
||||||
List<FacPhotovoltaicPanel> finishPanelList = new ArrayList<>();
|
Set<FacPhotovoltaicPanel> finishPanelList = new HashSet<>();
|
||||||
for (RecognizeConvertCoordinateResult result : coordinateList) {
|
for (RecognizeConvertCoordinateResult result : coordinateList) {
|
||||||
// 获取包含该坐标的面
|
// 获取包含该坐标的面
|
||||||
FacPhotovoltaicPanel containingPanel = JSTUtil.findContainingPanel(result, panelList);
|
FacPhotovoltaicPanel containingPanel = JSTUtil.findContainingPanel(result, panelList);
|
||||||
if (containingPanel != null) {
|
if (containingPanel != null) {
|
||||||
|
log.info("识别到的光伏板:{}", containingPanel.getName());
|
||||||
finishPanelList.add(containingPanel);
|
finishPanelList.add(containingPanel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -421,7 +421,7 @@ public class FacPhotovoltaicPanelSupportServiceImpl extends ServiceImpl<FacPhoto
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateFinishNumberByCoordinate(List<Long> projectIds, List<Long> matchPoints) {
|
public void updateFinishNumberByCoordinate(List<Long> projectIds, Set<Long> matchPoints) {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
List<FacPhotovoltaicPanelSupport> finishList = this.listByIds(matchPoints);
|
List<FacPhotovoltaicPanelSupport> finishList = this.listByIds(matchPoints);
|
||||||
// 更新完成状态
|
// 更新完成状态
|
||||||
|
|||||||
@ -53,16 +53,19 @@ public class BaohanJob {
|
|||||||
}
|
}
|
||||||
log.info("保证金缴纳审批日期到期定时任务执行成功");
|
log.info("保证金缴纳审批日期到期定时任务执行成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Scheduled(cron = "0 0 8 1/1 * ?")
|
@Scheduled(cron = "0 0 8 1/1 * ?")
|
||||||
public void chengbaohetongbaohanJob() {
|
public void chengbaohetongbaohanJob() {
|
||||||
log.info("承包合同保函日期到期定时任务开始执行");
|
log.info("承包合同保函日期到期定时任务开始执行");
|
||||||
// 查询保证金当天到期的数据
|
// 查询保证金当天到期的数据
|
||||||
List<XzdGuaranteeInfo> xzdGuaranteeInfos = xzdGuaranteeInfoMapper.selectList(new LambdaQueryWrapper<XzdGuaranteeInfo>().eq(XzdGuaranteeInfo::getDueDate, LocalDate.now()));
|
List<XzdGuaranteeInfo> xzdGuaranteeInfos = xzdGuaranteeInfoMapper.selectList(new LambdaQueryWrapper<XzdGuaranteeInfo>().eq(XzdGuaranteeInfo::getDueDate, LocalDate.now().plusMonths(1)));
|
||||||
//组装发送数据
|
//组装发送数据
|
||||||
for (XzdGuaranteeInfo xzdGuaranteeInfo : xzdGuaranteeInfos) {
|
for (XzdGuaranteeInfo xzdGuaranteeInfo : xzdGuaranteeInfos) {
|
||||||
SseMessageDto sseMessageDto = new SseMessageDto();
|
SseMessageDto sseMessageDto = new SseMessageDto();
|
||||||
sseMessageDto.setUserIds(List.of(xzdGuaranteeInfo.getCreateBy()));
|
sseMessageDto.setUserIds(List.of(xzdGuaranteeInfo.getCreateBy()));
|
||||||
sseMessageDto.setMessage(xzdGuaranteeInfo.getDocumentNumber()+" "+"保函日期到期");
|
sseMessageDto.setMessage(xzdGuaranteeInfo.getDocumentNumber()+" "+"承包合同保函日期还有一个月到期");
|
||||||
SseMessageUtils.publishMessage(sseMessageDto);
|
SseMessageUtils.publishMessage(sseMessageDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,4 +11,9 @@ public interface RecognizerConstant {
|
|||||||
*/
|
*/
|
||||||
String RECOGNIZE_API_PATH_POST = "/detect_image";
|
String RECOGNIZE_API_PATH_POST = "/detect_image";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板识别 api 路径
|
||||||
|
*/
|
||||||
|
String RECOGNIZE_PANEL_API_PATH_POST = "/detect_process";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,18 +13,16 @@ import org.springframework.stereotype.Component;
|
|||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.net.*;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.nio.file.Files;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.net.FileNameMap;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
import java.net.URLConnection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025/7/21 10:56
|
* @date 2025/7/21 10:56
|
||||||
@ -61,6 +59,16 @@ public class RecognizerManager {
|
|||||||
return recognize(capUrl, recTypeList, false);
|
return recognize(capUrl, recTypeList, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 光伏板识别
|
||||||
|
*
|
||||||
|
* @param capUrl 图片地址
|
||||||
|
* @return 识别结果
|
||||||
|
*/
|
||||||
|
public RecognizeVo recognize(String capUrl) {
|
||||||
|
return RecognizerUtils.recognize(recognizerProperties.getUrl(), capUrl);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绘制图片
|
* 绘制图片
|
||||||
*
|
*
|
||||||
|
|||||||
@ -25,6 +25,9 @@ import java.util.List;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class RecognizerUtils {
|
public class RecognizerUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 坐标转换接口
|
||||||
|
*/
|
||||||
private final static String CONVERT_COORDINATE = "http://192.168.110.2:8895/yjearth4.0/api/v1/vector/convert";
|
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("type", type);
|
||||||
paramMap.put("url", capUrl);
|
paramMap.put("url", capUrl);
|
||||||
paramMap.put("extract", extract != null && extract ? "true" : "false");
|
paramMap.put("extract", extract != null && extract ? "true" : "false");
|
||||||
|
log.info("图片识别请求参数:{}", paramMap);
|
||||||
String errorMsg = "图片识别请求失败";
|
String errorMsg = "图片识别请求失败";
|
||||||
String url = host + RecognizerConstant.RECOGNIZE_API_PATH_POST;
|
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<String, Object> 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<String, Object> paramMap, String errorMsg, String url) {
|
||||||
try (HttpResponse response = HttpRequest.post(url)
|
try (HttpResponse response = HttpRequest.post(url)
|
||||||
.body(JSONUtil.toJsonStr(paramMap))
|
.body(JSONUtil.toJsonStr(paramMap))
|
||||||
.execute()) {
|
.execute()) {
|
||||||
@ -91,8 +127,8 @@ public class RecognizerUtils {
|
|||||||
List<Integer> size = targetVo.getSize();
|
List<Integer> size = targetVo.getSize();
|
||||||
JSONObject pos = new JSONObject();
|
JSONObject pos = new JSONObject();
|
||||||
// 中心点
|
// 中心点
|
||||||
pos.set("x", point.get(0) + size.get(0) / 2);
|
pos.set("x", (point.get(0) + size.get(0)) / 2);
|
||||||
pos.set("y", point.get(1) + size.get(1) / 2);
|
pos.set("y", (point.get(1) + size.get(1)) / 2);
|
||||||
positions.add(pos);
|
positions.add(pos);
|
||||||
}
|
}
|
||||||
reqJson.set("positions", positions);
|
reqJson.set("positions", positions);
|
||||||
|
|||||||
@ -19,11 +19,12 @@ public enum RecognizerTypeEnum {
|
|||||||
NO_VEST("未穿反光衣", "novest", "4"),
|
NO_VEST("未穿反光衣", "novest", "4"),
|
||||||
SMOKE("吸烟", "smoke", "5"),
|
SMOKE("吸烟", "smoke", "5"),
|
||||||
FIRE("火焰", "fire", "6"),
|
FIRE("火焰", "fire", "6"),
|
||||||
SMOGGY("烟雾", "smoggy", "7"),
|
// SMOGGY("烟雾", "smoggy", "7"),
|
||||||
PANEL("光伏板", "solar", "8"),
|
PANEL("光伏板", "solar", "8"),
|
||||||
BRACKET("光伏板支架", "bracket", "9"),
|
BRACKET("光伏板支架", "bracket", "9"),
|
||||||
COLUMN("光伏板桩", "column", "10"),
|
COLUMN("光伏板桩", "column", "10"),
|
||||||
HOLE("光伏板孔", "hole", "11");
|
HOLE("光伏板孔", "hole", "11"),
|
||||||
|
;
|
||||||
|
|
||||||
private final String text;
|
private final String text;
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
private String createByName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1148,13 +1148,10 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
List<Long> projectIds = projects.stream().map(BusProject::getId).distinct().toList();
|
List<Long> projectIds = projects.stream().map(BusProject::getId).distinct().toList();
|
||||||
// 识别类型:洞、桩、架、架子
|
|
||||||
List<RecognizerTypeEnum> enumList = List.of(RecognizerTypeEnum.HOLE, RecognizerTypeEnum.PANEL,
|
|
||||||
RecognizerTypeEnum.COLUMN, RecognizerTypeEnum.BRACKET);
|
|
||||||
// 调用识别算法
|
// 调用识别算法
|
||||||
RecognizeVo recognizeVo = null;
|
RecognizeVo recognizeVo = null;
|
||||||
try {
|
try {
|
||||||
recognizeVo = recognizerManager.recognize(fileUrl, enumList);
|
recognizeVo = recognizerManager.recognize(fileUrl);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("识别失败:{}", e.getMessage());
|
log.error("识别失败:{}", e.getMessage());
|
||||||
}
|
}
|
||||||
@ -1170,7 +1167,6 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
|||||||
// 根据识别到的类型进行分组
|
// 根据识别到的类型进行分组
|
||||||
Map<String, List<RecognizeTargetVo>> typeMap = targets.stream()
|
Map<String, List<RecognizeTargetVo>> typeMap = targets.stream()
|
||||||
.collect(Collectors.groupingBy(RecognizeTargetVo::getType));
|
.collect(Collectors.groupingBy(RecognizeTargetVo::getType));
|
||||||
List<RecognizeConvertCoordinateResult> allConvertCoordinateList = new ArrayList<>();
|
|
||||||
for (Map.Entry<String, List<RecognizeTargetVo>> entry : typeMap.entrySet()) {
|
for (Map.Entry<String, List<RecognizeTargetVo>> entry : typeMap.entrySet()) {
|
||||||
String type = entry.getKey();
|
String type = entry.getKey();
|
||||||
List<RecognizeTargetVo> value = entry.getValue();
|
List<RecognizeTargetVo> value = entry.getValue();
|
||||||
@ -1181,17 +1177,16 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
|||||||
if (CollUtil.isEmpty(coordinateList)) {
|
if (CollUtil.isEmpty(coordinateList)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
allConvertCoordinateList.addAll(coordinateList);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("转换坐标失败:{}", e.getMessage());
|
log.error("转换坐标失败:{}", e.getMessage());
|
||||||
}
|
}
|
||||||
log.info("类型:{},识别到的设施:{},转换坐标:{}", type, value, coordinateList);
|
log.info("类型:{},识别到的设施:{},转换坐标:{}", type, value, coordinateList);
|
||||||
// 处理对应设施
|
// 处理对应设施
|
||||||
if (type.equals(RecognizerTypeEnum.PANEL.getValue())) {
|
if (type.equals(RecognizerTypeEnum.PANEL.getValue())
|
||||||
photovoltaicPanelService.updateFinishNumberByCoordinate(projectIds, coordinateList);
|
|
||||||
} else if (type.equals(RecognizerTypeEnum.HOLE.getValue())
|
|
||||||
|| type.equals(RecognizerTypeEnum.COLUMN.getValue())
|
|
||||||
|| type.equals(RecognizerTypeEnum.BRACKET.getValue())) {
|
|| type.equals(RecognizerTypeEnum.BRACKET.getValue())) {
|
||||||
|
photovoltaicPanelService.updateFinishNumberByCoordinate(projectIds, coordinateList, type);
|
||||||
|
} else if (type.equals(RecognizerTypeEnum.HOLE.getValue())
|
||||||
|
|| type.equals(RecognizerTypeEnum.COLUMN.getValue())) {
|
||||||
photovoltaicPanelPartsService.updateFinishNumberByCoordinate(projectIds, coordinateList, type);
|
photovoltaicPanelPartsService.updateFinishNumberByCoordinate(projectIds, coordinateList, type);
|
||||||
} else {
|
} else {
|
||||||
log.error("未知设施类型:{}", type);
|
log.error("未知设施类型:{}", type);
|
||||||
@ -1200,7 +1195,7 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
|||||||
// 将识别数据同步到图片上
|
// 将识别数据同步到图片上
|
||||||
Long recognizePic = null;
|
Long recognizePic = null;
|
||||||
try {
|
try {
|
||||||
RecognizeImageStreamResult drawnImage = recognizerManager.drawImageToStream(fileUrl, targets);
|
RecognizeImageStreamResult drawnImage = RecognizerManager.drawImageToStream(fileUrl, targets);
|
||||||
InputStream inputStream = drawnImage.getInputStream();
|
InputStream inputStream = drawnImage.getInputStream();
|
||||||
String contentType = drawnImage.getContentType();
|
String contentType = drawnImage.getContentType();
|
||||||
long length = drawnImage.getLength();
|
long length = drawnImage.getLength();
|
||||||
@ -1211,18 +1206,12 @@ public class PgsProgressPlanDetailServiceImpl extends ServiceImpl<PgsProgressPla
|
|||||||
} catch (IOException | URISyntaxException e) {
|
} catch (IOException | URISyntaxException e) {
|
||||||
throw new ServiceException("将识别数据同步到图片上失败", HttpStatus.ERROR);
|
throw new ServiceException("将识别数据同步到图片上失败", HttpStatus.ERROR);
|
||||||
}
|
}
|
||||||
// 文件上传
|
|
||||||
SysOssVo fileVo = ossService.uploadFileUrl(fileUrl, fileName);
|
|
||||||
String tifName = FileNameUtil.getName(tifUrl);
|
|
||||||
SysOssVo tifVo = ossService.uploadFileUrl(tifUrl, tifName);
|
|
||||||
// 保存识别数据
|
// 保存识别数据
|
||||||
DroDroneBigPicture droDroneBigPicture = new DroDroneBigPicture();
|
DroDroneBigPicture droDroneBigPicture = new DroDroneBigPicture();
|
||||||
droDroneBigPicture.setProjectId(projectId);
|
droDroneBigPicture.setProjectId(projectId);
|
||||||
droDroneBigPicture.setBigPic(fileVo.getOssId());
|
droDroneBigPicture.setBigPic(fileUrl);
|
||||||
droDroneBigPicture.setTifFile(tifVo.getOssId());
|
droDroneBigPicture.setTifFile(tifUrl);
|
||||||
droDroneBigPicture.setRecognizePic(recognizePic);
|
droDroneBigPicture.setRecognizePic(recognizePic);
|
||||||
droDroneBigPicture.setRecognizeMessage(JSONUtil.toJsonStr(targets));
|
|
||||||
droDroneBigPicture.setCoordinateMessage(JSONUtil.toJsonStr(allConvertCoordinateList));
|
|
||||||
droDroneBigPictureService.save(droDroneBigPicture);
|
droDroneBigPictureService.save(droDroneBigPicture);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +1,16 @@
|
|||||||
package org.dromara.safety.domain;
|
package org.dromara.safety.domain;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serial;
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 题库对象 wgz_question_bank
|
* 题库对象 wgz_question_bank
|
||||||
@ -21,37 +18,55 @@ import java.time.LocalDate;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-02-17
|
* @date 2025-02-17
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("wgz_question_bank")
|
@TableName("wgz_question_bank")
|
||||||
public class WgzQuestionBank extends BaseEntity {
|
public class WgzQuestionBank extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键ID */
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 题目类别(外键关联到类别表) */
|
/**
|
||||||
|
* 题目类别(外键关联到类别表)
|
||||||
|
*/
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
|
||||||
/** 题目类型(1单选、2多选、3判断、4填空、5问答) */
|
/**
|
||||||
|
* 题目类型(1单选、2多选、3判断、4填空、5问答)
|
||||||
|
*/
|
||||||
private String questionType;
|
private String questionType;
|
||||||
|
|
||||||
/** 题目内容 */
|
/**
|
||||||
|
* 题目内容
|
||||||
|
*/
|
||||||
private String questionText;
|
private String questionText;
|
||||||
|
|
||||||
/** 选项(对单选、多选、判断这种固定答案有效,以JSON数组形式存储) */
|
/**
|
||||||
|
* 选项(对单选、多选、判断这种固定答案有效,以JSON数组形式存储)
|
||||||
|
*/
|
||||||
private String options;
|
private String options;
|
||||||
|
|
||||||
/** 正确答案 */
|
/**
|
||||||
|
* 正确答案
|
||||||
|
*/
|
||||||
private String correctAnswer;
|
private String correctAnswer;
|
||||||
|
|
||||||
/** 得分 */
|
/**
|
||||||
|
* 得分
|
||||||
|
*/
|
||||||
private Long score;
|
private Long score;
|
||||||
|
|
||||||
/** 备注 */
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,15 @@
|
|||||||
package org.dromara.safety.domain;
|
package org.dromara.safety.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serial;
|
||||||
import java.util.Date;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 题库_题库类别对象 wgz_question_category
|
* 题库_题库类别对象 wgz_question_category
|
||||||
@ -20,19 +17,25 @@ import java.time.LocalDate;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-02-17
|
* @date 2025-02-17
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@TableName("wgz_question_category")
|
@TableName("wgz_question_category")
|
||||||
public class WgzQuestionCategory extends BaseEntity {
|
public class WgzQuestionCategory extends BaseEntity {
|
||||||
|
|
||||||
private static final long serialVersionUID=1L;
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键ID */
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 题库类别 */
|
/**
|
||||||
|
* 题库类别
|
||||||
|
*/
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,7 +94,7 @@ public class XzdCbysJdcbfjVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty(value = "项目责任人")
|
@ExcelProperty(value = "项目责任人")
|
||||||
private Long projectLeader;
|
private Long projectLeader;
|
||||||
@Translation(type = TransConstant.XZD_PROJECT_MANAGER_APPROVAL_ID_TO_NAME, mapper = "projectLeader")
|
@Translation(type = TransConstant.USER_ID_TO_NICKNAME, mapper = "projectLeader")
|
||||||
private String projectLeaderName;
|
private String projectLeaderName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -97,6 +97,13 @@ public class XzdGuaranteeInfoVo implements Serializable {
|
|||||||
@ExcelProperty(value = "申请人")
|
@ExcelProperty(value = "申请人")
|
||||||
private String applicant;
|
private String applicant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "合同状态")
|
||||||
|
private String htzt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工程项目
|
* 工程项目
|
||||||
|
|||||||
@ -19,6 +19,9 @@ import org.dromara.common.utils.BatchNumberGenerator;
|
|||||||
import org.dromara.system.service.impl.SysOssServiceImpl;
|
import org.dromara.system.service.impl.SysOssServiceImpl;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.XzdBidPreProject;
|
||||||
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
import org.dromara.xzd.biddingManagement.biaoqianlixiang.domain.vo.XzdBidPreProjectVo;
|
||||||
|
import org.dromara.xzd.contractManagement.fenbaohetongbiangg.domain.XzdSubcontractChange;
|
||||||
|
import org.dromara.xzd.deposit.backletter.domain.XzdGuaranteeChangeInfo;
|
||||||
|
import org.dromara.xzd.deposit.backletter.mapper.XzdGuaranteeChangeInfoMapper;
|
||||||
import org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo;
|
import org.dromara.xzd.deposit.contractBackletter.domain.XzdGuaranteeInfo;
|
||||||
import org.dromara.xzd.deposit.contractBackletter.domain.bo.XzdGuaranteeInfoBo;
|
import org.dromara.xzd.deposit.contractBackletter.domain.bo.XzdGuaranteeInfoBo;
|
||||||
import org.dromara.xzd.deposit.contractBackletter.domain.vo.XzdGuaranteeInfoVo;
|
import org.dromara.xzd.deposit.contractBackletter.domain.vo.XzdGuaranteeInfoVo;
|
||||||
@ -27,10 +30,12 @@ import org.dromara.xzd.deposit.contractBackletter.service.IXzdGuaranteeInfoServi
|
|||||||
import org.dromara.xzd.deposit.earnestMoney.domain.XzdDepositApplication;
|
import org.dromara.xzd.deposit.earnestMoney.domain.XzdDepositApplication;
|
||||||
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
import org.dromara.xzd.domain.dto.QuerCorrespondentDto;
|
||||||
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
import org.dromara.xzd.domain.vo.XzdSupplierInfoVo;
|
||||||
|
import org.dromara.xzd.enums.ZxdEnum;
|
||||||
import org.dromara.xzd.service.IXzdCorrespondentList;
|
import org.dromara.xzd.service.IXzdCorrespondentList;
|
||||||
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
import org.dromara.xzd.service.impl.XzdSupplierInfoServiceImpl;
|
||||||
import org.dromara.xzd.utilS.AreaUtil;
|
import org.dromara.xzd.utilS.AreaUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -55,15 +60,11 @@ public class XzdGuaranteeInfoServiceImpl extends ServiceImpl<XzdGuaranteeInfoMap
|
|||||||
|
|
||||||
private final XzdGuaranteeInfoMapper baseMapper;
|
private final XzdGuaranteeInfoMapper baseMapper;
|
||||||
|
|
||||||
|
|
||||||
private final AreaUtil areaUtil;
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private XzdSupplierInfoServiceImpl xzdSupplierInfoService;
|
@Lazy
|
||||||
|
private XzdGuaranteeChangeInfoMapper xzdGuaranteeChangeInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IXzdCorrespondentList iXzdCorrespondentList;
|
|
||||||
|
|
||||||
|
|
||||||
private final SysOssServiceImpl sysOssService;
|
private final SysOssServiceImpl sysOssService;
|
||||||
@ -79,7 +80,7 @@ public class XzdGuaranteeInfoServiceImpl extends ServiceImpl<XzdGuaranteeInfoMap
|
|||||||
XzdGuaranteeInfoVo xzdGuaranteeInfoVo = baseMapper.selectVoById(id);
|
XzdGuaranteeInfoVo xzdGuaranteeInfoVo = baseMapper.selectVoById(id);
|
||||||
List<XzdGuaranteeInfoVo> xzdGuaranteeInfoVo1 = List.of(xzdGuaranteeInfoVo);
|
List<XzdGuaranteeInfoVo> xzdGuaranteeInfoVo1 = List.of(xzdGuaranteeInfoVo);
|
||||||
// 装填数据
|
// 装填数据
|
||||||
// setValue(xzdGuaranteeInfoVo1);
|
setValue(xzdGuaranteeInfoVo1);
|
||||||
|
|
||||||
|
|
||||||
return xzdGuaranteeInfoVo1.getFirst();
|
return xzdGuaranteeInfoVo1.getFirst();
|
||||||
@ -87,22 +88,11 @@ public class XzdGuaranteeInfoServiceImpl extends ServiceImpl<XzdGuaranteeInfoMap
|
|||||||
|
|
||||||
private void setValue(List<XzdGuaranteeInfoVo> infos) {
|
private void setValue(List<XzdGuaranteeInfoVo> infos) {
|
||||||
for (XzdGuaranteeInfoVo info : infos) {
|
for (XzdGuaranteeInfoVo info : infos) {
|
||||||
//申请机构(供应商信息列表)
|
// 阶段状态
|
||||||
XzdSupplierInfoVo xzdSupplierInfoVot = xzdSupplierInfoService.queryById(info.getApplicationOrganization());
|
info.setHtzt(ZxdEnum.HETONGZTYS.getTypeValue());
|
||||||
if (xzdSupplierInfoVot != null){
|
Long l = xzdGuaranteeChangeInfoMapper.selectCount(new LambdaQueryWrapper<XzdGuaranteeChangeInfo>().eq(XzdGuaranteeChangeInfo::getContractGuaranteeId, info.getId()));
|
||||||
info.setApplicationOrganizationName(xzdSupplierInfoVot.getUnitName());
|
if (l > 0) {
|
||||||
}
|
info.setHtzt(ZxdEnum.HETONGZTBG.getTypeValue());
|
||||||
//乙方单位(供应商信息列表)
|
|
||||||
XzdSupplierInfoVo xzdSupplierInfoVo = xzdSupplierInfoService.queryById(info.getPartyBUnit());
|
|
||||||
if (xzdSupplierInfoVo != null){
|
|
||||||
info.setPartyBUnitName(xzdSupplierInfoVo.getUnitName());
|
|
||||||
}
|
|
||||||
//甲方单位(客户信息列表)
|
|
||||||
R<QuerCorrespondentDto> byid = iXzdCorrespondentList.getCustomerByid(info.getPartyAUnit());
|
|
||||||
if (byid!=null){
|
|
||||||
if (byid.getData().getXzdCustomerinformation() != null){
|
|
||||||
info.setPartyAUnitName(byid.getData().getXzdCustomerinformation().getUnitName());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -120,7 +110,7 @@ public class XzdGuaranteeInfoServiceImpl extends ServiceImpl<XzdGuaranteeInfoMap
|
|||||||
LambdaQueryWrapper<XzdGuaranteeInfo> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<XzdGuaranteeInfo> lqw = buildQueryWrapper(bo);
|
||||||
Page<XzdGuaranteeInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<XzdGuaranteeInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
|
||||||
// setValue(result.getRecords());
|
setValue(result.getRecords());
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,22 @@
|
|||||||
package org.dromara.xzd.paymentsReceipts.domain.vo;
|
package org.dromara.xzd.paymentsReceipts.domain.vo;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
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.mybatis.core.domain.BaseEntity;
|
||||||
import org.dromara.common.translation.annotation.Translation;
|
import org.dromara.common.translation.annotation.Translation;
|
||||||
import org.dromara.common.translation.constant.TransConstant;
|
import org.dromara.common.translation.constant.TransConstant;
|
||||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao;
|
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFapiao;
|
||||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan;
|
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkFukuan;
|
||||||
import org.dromara.xzd.paymentsReceipts.domain.XzdSfkZonhefuwuFk;
|
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.Serial;
|
||||||
import java.io.Serializable;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -30,6 +26,7 @@ import java.util.List;
|
|||||||
* @author Lion Li
|
* @author Lion Li
|
||||||
* @date 2025-10-16
|
* @date 2025-10-16
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@Data
|
@Data
|
||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
@AutoMapper(target = XzdSfkZonhefuwuFk.class)
|
@AutoMapper(target = XzdSfkZonhefuwuFk.class)
|
||||||
|
|||||||
@ -173,10 +173,10 @@ public class XzdContractChangeServiceImpl extends ServiceImpl<XzdContractChangeM
|
|||||||
|
|
||||||
XzdContractDetails byId = xzdContractDetailsService.getById(bo.getContractCodeId());
|
XzdContractDetails byId = xzdContractDetailsService.getById(bo.getContractCodeId());
|
||||||
if (byId != null){
|
if (byId != null){
|
||||||
if (byId.getHtzt().equals("已终止")){
|
if (byId.getHtzt().equals("终止")){
|
||||||
throw new RuntimeException("该合同已被终止");
|
throw new RuntimeException("该合同已被终止");
|
||||||
}else {
|
}else {
|
||||||
byId.setHtzt("已变更");
|
byId.setHtzt("变更");
|
||||||
xzdContractDetailsService.updateById(byId);
|
xzdContractDetailsService.updateById(byId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -251,7 +251,7 @@ public class XzdContractDetailsServiceImpl extends ServiceImpl<XzdContractDetail
|
|||||||
|
|
||||||
XzdContractDetailsVo old = queryById(update.getId());
|
XzdContractDetailsVo old = queryById(update.getId());
|
||||||
|
|
||||||
if (bo.getHtzt().equals("已终止")){
|
if (bo.getHtzt().equals("终止")){
|
||||||
throw new RuntimeException("该合同已被终止!");
|
throw new RuntimeException("该合同已被终止!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ public class XzdContractTerminationServiceImpl extends ServiceImpl<XzdContractTe
|
|||||||
}
|
}
|
||||||
XzdContractDetails detailsVo = xzdContractDetailsService.getById(bo.getContractNumber());
|
XzdContractDetails detailsVo = xzdContractDetailsService.getById(bo.getContractNumber());
|
||||||
if (detailsVo != null){
|
if (detailsVo != null){
|
||||||
detailsVo.setHtzt("已终止");
|
detailsVo.setHtzt("终止");
|
||||||
xzdContractDetailsService.updateById(detailsVo);
|
xzdContractDetailsService.updateById(detailsVo);
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
|||||||
@ -17,10 +17,11 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.xzd.skyfk.fbhtfk.domain.bo.XzdSkyfkFbhtfkBo;
|
import org.dromara.xzd.skyfk.fbhtfk.domain.bo.XzdSkyfkFbhtfkBo;
|
||||||
import org.dromara.xzd.skyfk.fbhtfk.domain.vo.XzdSkyfkFbhtfkVo;
|
import org.dromara.xzd.skyfk.fbhtfk.domain.vo.XzdSkyfkFbhtfkVo;
|
||||||
import org.dromara.xzd.skyfk.fbhtfk.service.IXzdSkyfkFbhtfkService;
|
import org.dromara.xzd.skyfk.fbhtfk.service.impl.XzdSkyfkFbhtfkServiceImpl;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +36,7 @@ import java.util.List;
|
|||||||
@RequestMapping("/xzd/fbhtfk/skyfkFbhtfk")
|
@RequestMapping("/xzd/fbhtfk/skyfkFbhtfk")
|
||||||
public class XzdSkyfkFbhtfkController extends BaseController {
|
public class XzdSkyfkFbhtfkController extends BaseController {
|
||||||
|
|
||||||
private final IXzdSkyfkFbhtfkService xzdSkyfkFbhtfkService;
|
private final XzdSkyfkFbhtfkServiceImpl xzdSkyfkFbhtfkService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询收款与付款-分包合同付款列表
|
* 查询收款与付款-分包合同付款列表
|
||||||
@ -103,4 +104,13 @@ public class XzdSkyfkFbhtfkController extends BaseController {
|
|||||||
@PathVariable Long[] ids) {
|
@PathVariable Long[] ids) {
|
||||||
return toAjax(xzdSkyfkFbhtfkService.deleteWithValidByIds(List.of(ids), true));
|
return toAjax(xzdSkyfkFbhtfkService.deleteWithValidByIds(List.of(ids), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据合同id获取分包付款累计开票金额
|
||||||
|
*/
|
||||||
|
@GetMapping("/getLJKPKE/{contractId}")
|
||||||
|
public R<BigDecimal> getLjkpje(@PathVariable Long contractId){
|
||||||
|
return R.ok(xzdSkyfkFbhtfkService.getLJKPJE(contractId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -271,5 +272,14 @@ public class XzdSkyfkFbhtfk extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String fileId;
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次开票金额
|
||||||
|
*/
|
||||||
|
private BigDecimal bckpje;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 累计开票金额
|
||||||
|
*/
|
||||||
|
private BigDecimal ljkpje;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import org.dromara.xzd.skyfk.fbhtfk.domain.XzdSkyfkFbhtfk;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -343,4 +344,14 @@ public class XzdSkyfkFbhtfkVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
List<XzdSfkFukuanVo> fkxx;
|
List<XzdSfkFukuanVo> fkxx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本次开票金额
|
||||||
|
*/
|
||||||
|
private BigDecimal bckpje;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 累计开票金额
|
||||||
|
*/
|
||||||
|
private BigDecimal ljkpje;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,6 +42,7 @@ import org.springframework.context.event.EventListener;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -376,18 +377,6 @@ public class XzdSkyfkFbhtfkServiceImpl extends ServiceImpl<XzdSkyfkFbhtfkMapper,
|
|||||||
vo.setSkdwYh(xzdSupplierOpenBankVo.getOpenBank());
|
vo.setSkdwYh(xzdSupplierOpenBankVo.getOpenBank());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//项目类型
|
|
||||||
// if (vo.getXmlxId() != null){
|
|
||||||
// XzdProjectType projectTypeVo = xzdProjectTypeService.getBaseMapper().selectById(vo.getXmlxId());
|
|
||||||
// if (projectTypeVo != null){
|
|
||||||
// vo.setXmlx(projectTypeVo.getTypeName());
|
|
||||||
// }
|
|
||||||
// //项目大类
|
|
||||||
// XzdProjectTypeVo bigType = xzdProjectTypeService.getBigType(projectTypeVo.getId());
|
|
||||||
// if (bigType != null){
|
|
||||||
// vo.setXmdl(bigType.getTypeName());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//付款信息
|
//付款信息
|
||||||
XzdSfkFukuanBo bo = new XzdSfkFukuanBo();
|
XzdSfkFukuanBo bo = new XzdSfkFukuanBo();
|
||||||
bo.setMainDocumentId(vo.getId());
|
bo.setMainDocumentId(vo.getId());
|
||||||
@ -402,9 +391,46 @@ public class XzdSkyfkFbhtfkServiceImpl extends ServiceImpl<XzdSkyfkFbhtfkMapper,
|
|||||||
if (xzdSfkFapiaoVos != null && !xzdSfkFapiaoVos.isEmpty()){
|
if (xzdSfkFapiaoVos != null && !xzdSfkFapiaoVos.isEmpty()){
|
||||||
vo.setFpxx(xzdSfkFapiaoVos);
|
vo.setFpxx(xzdSfkFapiaoVos);
|
||||||
}
|
}
|
||||||
|
//累计开票金额
|
||||||
|
LambdaQueryWrapper<XzdSkyfkFbhtfk> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(XzdSkyfkFbhtfk::getContractId, vo.getContractId());
|
||||||
|
List<XzdSkyfkFbhtfk> list = list(lambdaQueryWrapper);
|
||||||
|
BigDecimal ljkpje = new BigDecimal("0");
|
||||||
|
for (XzdSkyfkFbhtfk fbhtfk : list) {
|
||||||
|
LambdaQueryWrapper<XzdSfkFapiao> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper1.eq(XzdSfkFapiao::getMainDocumentId, fbhtfk.getId());
|
||||||
|
List<XzdSfkFapiao> list1 = xzdSfkFapiaoService.list(lambdaQueryWrapper1);
|
||||||
|
for (XzdSfkFapiao fapiao : list1) {
|
||||||
|
ljkpje = ljkpje.add(fapiao.getTotalAmountWithTax());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vo.setLjkpje(ljkpje);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格局分包合同id获取分包合同付款累计开票金额
|
||||||
|
*/
|
||||||
|
public BigDecimal getLJKPJE(Long contractId) {
|
||||||
|
XzdSubcontract info = xzdSubcontract.getBaseMapper().selectById(contractId);
|
||||||
|
if (info == null){
|
||||||
|
return new BigDecimal("0");
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<XzdSkyfkFbhtfk> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(XzdSkyfkFbhtfk::getContractId, contractId);
|
||||||
|
List<XzdSkyfkFbhtfk> list = list(lambdaQueryWrapper);
|
||||||
|
BigDecimal ljkpje = new BigDecimal("0");
|
||||||
|
for (XzdSkyfkFbhtfk fbhtfk : list) {
|
||||||
|
LambdaQueryWrapper<XzdSfkFapiao> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper1.eq(XzdSfkFapiao::getMainDocumentId, fbhtfk.getId());
|
||||||
|
List<XzdSfkFapiao> list1 = xzdSfkFapiaoService.list(lambdaQueryWrapper1);
|
||||||
|
for (XzdSfkFapiao fapiao : list1) {
|
||||||
|
ljkpje = ljkpje.add(fapiao.getTotalAmountWithTax());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ljkpje;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成,单任务完成等)
|
||||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
|
|||||||
Reference in New Issue
Block a user