feat: 推送人脸和车辆信息
This commit is contained in:
parent
8893afcf8f
commit
724a4d70fe
2
pom.xml
2
pom.xml
|
@ -9,7 +9,7 @@
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.watu</groupId>
|
<groupId>com.watu</groupId>
|
||||||
<artifactId>dataSend</artifactId>
|
<artifactId>dataSend_zhyq</artifactId>
|
||||||
<version>V3</version>
|
<version>V3</version>
|
||||||
<name>bootdo</name>
|
<name>bootdo</name>
|
||||||
<description>Demo project for Spring Boot</description>
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.controller;
|
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
|
|
||||||
@Controller
|
|
||||||
@RequestMapping("/api")
|
|
||||||
@RequiredArgsConstructor
|
|
||||||
public class ApiController {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 注册直接成功
|
|
||||||
*
|
|
||||||
* @param str
|
|
||||||
* @param response
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@ResponseBody
|
|
||||||
@RequestMapping("/test")
|
|
||||||
public Object Register(@RequestBody String str, HttpServletResponse response) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
public class ProducerController {
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(ProducerController.class);
|
|
||||||
|
|
||||||
private final RabbitTemplate rabbitTemplate;
|
|
||||||
|
|
||||||
public ProducerController(RabbitTemplate rabbitTemplate) {
|
|
||||||
this.rabbitTemplate = rabbitTemplate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/send")
|
|
||||||
public String sendMessage(@RequestBody String message) {
|
|
||||||
rabbitTemplate.convertAndSend("warnrecord", "routing.key.warnrecord", message);
|
|
||||||
return "Message sent!";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// @PostConstruct
|
|
||||||
public String sendMessagetest() {
|
|
||||||
try {
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
json.put("12aaa3", "2aaa34");
|
|
||||||
json.put("2aaa34", "45aaa6");
|
|
||||||
rabbitTemplate.convertAndSend("warnrecord", "routing.key.warnrecord", json);
|
|
||||||
logger.info("Message sent!");
|
|
||||||
return "Message sent!";
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.bootdo.datasend.dianxin.controller;
|
||||||
|
|
||||||
|
import com.bootdo.datasend.dianxin.task.StandardTask;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description controller
|
||||||
|
* @Author lijingtong
|
||||||
|
* @Date 2025-09-01
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping("/api")
|
||||||
|
public class controller {
|
||||||
|
|
||||||
|
private final StandardTask standardTask;
|
||||||
|
|
||||||
|
@PostMapping("/sendUserRecord")
|
||||||
|
public void sendUserRecord() {
|
||||||
|
standardTask.sendUserRecord();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sendVehicleRecord")
|
||||||
|
public void sendVehicleRecord() {
|
||||||
|
standardTask.sendVehicleRecord();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,187 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人脸门禁记录表(BaseDoorRecord)Domain
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-21 16:15:21
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName(value = "base_door_record")
|
|
||||||
public class BaseDoorRecord {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 小区编码
|
|
||||||
*/
|
|
||||||
private String placeCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 小区名称
|
|
||||||
*/
|
|
||||||
private String placeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备编码
|
|
||||||
*/
|
|
||||||
private String deviceCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备名称
|
|
||||||
*/
|
|
||||||
private String deviceName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关联视频监控编码
|
|
||||||
*/
|
|
||||||
private String gbsChannelNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备安装位置
|
|
||||||
*/
|
|
||||||
private String deviceAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 方位
|
|
||||||
*/
|
|
||||||
private Integer orientation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 摄像头ip
|
|
||||||
*/
|
|
||||||
private String cameraIp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 姓名
|
|
||||||
*/
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 证件类型
|
|
||||||
*/
|
|
||||||
private Integer identityType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 联系电话
|
|
||||||
*/
|
|
||||||
private String phone;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 证件号码
|
|
||||||
*/
|
|
||||||
private String idcard;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 进出方向
|
|
||||||
*/
|
|
||||||
private Integer direction;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人脸图
|
|
||||||
*/
|
|
||||||
private String personPic;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 记录唯一标识
|
|
||||||
*/
|
|
||||||
private String recordId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据来源唯一ID
|
|
||||||
*/
|
|
||||||
private String sourceId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人脸小图唯一ID
|
|
||||||
*/
|
|
||||||
private String personImageId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 卡号/人脸编码
|
|
||||||
*/
|
|
||||||
private String cardno;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 门禁类型
|
|
||||||
*/
|
|
||||||
private Integer cardType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开门结果
|
|
||||||
*/
|
|
||||||
private String openResult;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 健康码类型
|
|
||||||
*/
|
|
||||||
private Integer healthCodeType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 行程码类型
|
|
||||||
*/
|
|
||||||
private Integer travelCodeType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 行程码记录
|
|
||||||
*/
|
|
||||||
private String travelCodeRecord;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 核酸检测结果
|
|
||||||
*/
|
|
||||||
private Integer nucleicResultType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开门时间
|
|
||||||
*/
|
|
||||||
private Long passTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开门时间(分区)
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date partitionField;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date createtimeV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建者
|
|
||||||
*/
|
|
||||||
private Integer createbyV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date updatetimeV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新者
|
|
||||||
*/
|
|
||||||
private Integer updatebyV;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否发送
|
|
||||||
*/
|
|
||||||
private Integer isSend;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,111 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电动车预警(BaseElectricCarRecord)Domain
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-19 19:10:33
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName(value = "base_electric_car_record")
|
|
||||||
public class BaseElectricCarRecord {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备名称
|
|
||||||
*/
|
|
||||||
private String deviceName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备编码
|
|
||||||
*/
|
|
||||||
private String deviceCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通道国标编码
|
|
||||||
*/
|
|
||||||
private String gbsChannelNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NVR设备编号
|
|
||||||
*/
|
|
||||||
private String serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通道号
|
|
||||||
*/
|
|
||||||
private Integer channelNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 监控大类
|
|
||||||
*/
|
|
||||||
private Integer parentMonitoringType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备类型
|
|
||||||
*/
|
|
||||||
private Integer deviceType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备能力集
|
|
||||||
*/
|
|
||||||
private String structuredCameraType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 安装位置
|
|
||||||
*/
|
|
||||||
private String deviceAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备方位
|
|
||||||
*/
|
|
||||||
private Integer orientation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备ip
|
|
||||||
*/
|
|
||||||
private String deviceIp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 多维设备SN
|
|
||||||
*/
|
|
||||||
private String geminiSn;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场所编码
|
|
||||||
*/
|
|
||||||
private String placeCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场所名称
|
|
||||||
*/
|
|
||||||
private String placeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 抓拍图路径
|
|
||||||
*/
|
|
||||||
private String highThrowImgurl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 抓拍时间
|
|
||||||
*/
|
|
||||||
private Long passTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否发送
|
|
||||||
*/
|
|
||||||
private Integer isSend;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,108 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高抛记录表(BaseHighThrowRecord)Domain
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-18 09:34:36
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@TableName(value = "base_high_throw_record")
|
|
||||||
public class BaseHighThrowRecord {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备名称
|
|
||||||
*/
|
|
||||||
private String deviceName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备编码
|
|
||||||
*/
|
|
||||||
private String deviceCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通道国标编码
|
|
||||||
*/
|
|
||||||
private String gbsChannelNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NVR设备编号
|
|
||||||
*/
|
|
||||||
private String serial;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通道号
|
|
||||||
*/
|
|
||||||
private Integer channelNo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 监控大类
|
|
||||||
*/
|
|
||||||
private Integer parentMonitoringType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备类型
|
|
||||||
*/
|
|
||||||
private Integer deviceType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备能力集
|
|
||||||
*/
|
|
||||||
private String structuredCameraType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 安装位置
|
|
||||||
*/
|
|
||||||
private String deviceAddress;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备方位
|
|
||||||
*/
|
|
||||||
private Integer orientation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备ip
|
|
||||||
*/
|
|
||||||
private String deviceIp;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 多维设备SN
|
|
||||||
*/
|
|
||||||
private String geminiSn;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场所编码
|
|
||||||
*/
|
|
||||||
private String placeCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 场所名称
|
|
||||||
*/
|
|
||||||
private String placeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高抛图路径
|
|
||||||
*/
|
|
||||||
private String highThrowImgurl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 抓拍时间
|
|
||||||
*/
|
|
||||||
private Long passTime;
|
|
||||||
|
|
||||||
private Integer isSend;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推送设备信息实体类
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@TableName("device_info")
|
|
||||||
public class DeviceInfoRecord {
|
|
||||||
|
|
||||||
@TableField("gatewaySN")
|
|
||||||
private String gatewaySN;
|
|
||||||
private Integer deviceType;
|
|
||||||
@TableField("deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
private String heartbeatTime;
|
|
||||||
private Integer isOnline;
|
|
||||||
private Integer isOpenAccount;
|
|
||||||
private Integer isOweMoney;
|
|
||||||
private BigDecimal totalMoney;
|
|
||||||
private Integer buyTimes;
|
|
||||||
private BigDecimal balance;
|
|
||||||
private String roomNo;
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
@TableField("is_send")
|
|
||||||
private Integer isSend;
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@TableName("device_order_info")
|
|
||||||
public class DeviceOrderInfo {
|
|
||||||
@TableField("deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
private Integer saleType;
|
|
||||||
private String buyTypeName;
|
|
||||||
private BigDecimal money;
|
|
||||||
private String saleDate;
|
|
||||||
private String ownerName;
|
|
||||||
private String roomNo;
|
|
||||||
private Integer isSend;
|
|
||||||
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@TableName("device_power_info")
|
|
||||||
public class DevicePowerInfo {
|
|
||||||
private String useDate;
|
|
||||||
@TableField("deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
private String userName;
|
|
||||||
private String roomNo;
|
|
||||||
private BigDecimal powerUse;
|
|
||||||
private BigDecimal powerStart;
|
|
||||||
private BigDecimal powerEnd;
|
|
||||||
private Integer isSend;
|
|
||||||
|
|
||||||
@TableId
|
|
||||||
private Long id;
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceInfoDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class DeviceInfoDTO {
|
|
||||||
@JSONField(name = "requestData")
|
|
||||||
private DeviceInfoDataDTO requestData;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceInfoDataDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class DeviceInfoDataDTO {
|
|
||||||
@JSONField(name = "requestFlag")
|
|
||||||
private String requestFlag;
|
|
||||||
@JSONField(name = "requestDataList")
|
|
||||||
private List<DeviceInfoDataListDTO> requestDataList;
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceInfoDataListDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class DeviceInfoDataListDTO {
|
|
||||||
// 多维网关设备SN
|
|
||||||
@JSONField(name = "gatewaySN")
|
|
||||||
private String gatewaySN;
|
|
||||||
// 设备类型
|
|
||||||
@JSONField(name = "deviceType")
|
|
||||||
private Integer deviceType;
|
|
||||||
// 设备(国标)编码
|
|
||||||
@JSONField(name = "deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
// 设备心跳时间
|
|
||||||
@JSONField(name = "heartbeatTime")
|
|
||||||
private String heartbeatTime;
|
|
||||||
// 是否在线,1-在线,0-离线
|
|
||||||
@JSONField(name = "isOnline")
|
|
||||||
private Integer isOnline;
|
|
||||||
// 是否开户,1-开户,0-未开户
|
|
||||||
@JSONField(name = "isOpenAccount")
|
|
||||||
private Integer isOpenAccount;
|
|
||||||
// 是否欠费,1-欠费,0-不欠费
|
|
||||||
@JSONField(name = "isOweMoney")
|
|
||||||
private Integer isOweMoney;
|
|
||||||
// 累计购买金额
|
|
||||||
@JSONField(name = "totalMoney")
|
|
||||||
private java.math.BigDecimal totalMoney;
|
|
||||||
// 购买次数
|
|
||||||
@JSONField(name = "buyTimes")
|
|
||||||
private Integer buyTimes;
|
|
||||||
// 余额
|
|
||||||
@JSONField(name = "balance")
|
|
||||||
private java.math.BigDecimal balance;
|
|
||||||
// 房间号
|
|
||||||
@JSONField(name = "roomNo")
|
|
||||||
private String roomNo;
|
|
||||||
// 项目名称
|
|
||||||
@JSONField(name = "projectName")
|
|
||||||
private String projectName;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceOrderInfoDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DeviceOrderInfoDTO {
|
|
||||||
|
|
||||||
@JSONField(name = "requestData")
|
|
||||||
private DeviceOrderInfoDataDTO requestData;
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceOrderInfoDataDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DeviceOrderInfoDataDTO {
|
|
||||||
@JSONField(name = "requestFlag")
|
|
||||||
private String requestFlag;
|
|
||||||
@JSONField(name = "requestDataList")
|
|
||||||
private List<DeviceOrderInfoDataListDTO> requestDataList;
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceOrderInfoDataListDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DeviceOrderInfoDataListDTO {
|
|
||||||
// 设备(国标)编码
|
|
||||||
@JSONField(name = "deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
// 销售类型1-充值 2-冲正 3-退费
|
|
||||||
@JSONField(name = "saleType")
|
|
||||||
private Integer saleType;
|
|
||||||
// 购买方式
|
|
||||||
@JSONField(name = "buyTypeName")
|
|
||||||
private String buyTypeName;
|
|
||||||
// 订单金额
|
|
||||||
@JSONField(name = "money")
|
|
||||||
private BigDecimal money;
|
|
||||||
// 订单时间
|
|
||||||
@JSONField(name = "saleDate")
|
|
||||||
private String saleDate;
|
|
||||||
// 购买用户
|
|
||||||
@JSONField(name = "ownerName")
|
|
||||||
private String ownerName;
|
|
||||||
// 房间号
|
|
||||||
@JSONField(name = "roomNo")
|
|
||||||
private String roomNo;
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DevicePowerInfoDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DevicePowerInfoDTO {
|
|
||||||
|
|
||||||
@JSONField(name = "requestData")
|
|
||||||
private DevicePowerInfoDataDTO requestData;
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DevicePowerInfoDataDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DevicePowerInfoDataDTO {
|
|
||||||
@JSONField(name = "requestFlag")
|
|
||||||
private String requestFlag;
|
|
||||||
@JSONField(name = "requestDataList")
|
|
||||||
private List<DevicePowerInfoDataListDTO> requestDataList;
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DevicePowerInfoDataListDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DevicePowerInfoDataListDTO {
|
|
||||||
|
|
||||||
// 使用日期
|
|
||||||
@JSONField(name = "useDate")
|
|
||||||
private String useDate;
|
|
||||||
// 设备(国标)编码
|
|
||||||
@JSONField(name = "deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
// 用户名
|
|
||||||
@JSONField(name = "userName")
|
|
||||||
private String userName;
|
|
||||||
// 房间号
|
|
||||||
@JSONField(name = "roomNo")
|
|
||||||
private String roomNo;
|
|
||||||
// 用电量
|
|
||||||
@JSONField(name = "powerUse")
|
|
||||||
private BigDecimal powerUse;
|
|
||||||
// 用电开始量
|
|
||||||
@JSONField(name = "powerStart")
|
|
||||||
private BigDecimal powerStart;
|
|
||||||
// 用电结束量
|
|
||||||
@JSONField(name = "powerEnd")
|
|
||||||
private BigDecimal powerEnd;
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DoorRecordDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-06-17
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class DoorRecordDTO {
|
|
||||||
@JSONField(name = "requestData")
|
|
||||||
private DoorRequestDataDTO requestData;
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DoorRequestDataDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-06-17
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class DoorRequestDataDTO {
|
|
||||||
@JSONField(name = "requestFlag")
|
|
||||||
private String requestFlag;
|
|
||||||
@JSONField(name = "requestDataList")
|
|
||||||
private List<DoorRequestDataListDTO> requestDataList;
|
|
||||||
}
|
|
|
@ -1,51 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DoorRequestDataListDTO
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-06-17
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class DoorRequestDataListDTO {
|
|
||||||
// 多维网关设备SN
|
|
||||||
@JSONField(name = "gatewaySN")
|
|
||||||
private String gatewaySN;
|
|
||||||
// 设备(国标)编码
|
|
||||||
@JSONField(name = "deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
// 门禁验证方式
|
|
||||||
@JSONField(name = "validType")
|
|
||||||
private Integer validType;
|
|
||||||
// 卡号/人脸编码(证件号码MD5)
|
|
||||||
@JSONField(name = "cardNo")
|
|
||||||
private String cardNo;
|
|
||||||
// 验证结果
|
|
||||||
@JSONField(name = "validResult")
|
|
||||||
private Short validResult;
|
|
||||||
// 通行时间
|
|
||||||
@JSONField(name = "passTime")
|
|
||||||
private String passTime;
|
|
||||||
// 通行方向
|
|
||||||
@JSONField(name = "passDirection")
|
|
||||||
private Integer passDirection;
|
|
||||||
// 人脸图base64编码
|
|
||||||
@JSONField(name = "personPicBase64")
|
|
||||||
private String personPicBase64;
|
|
||||||
// 全景图base64编码
|
|
||||||
@JSONField(name = "globalPicBase64")
|
|
||||||
private String globalPicBase64;
|
|
||||||
// 人员姓名
|
|
||||||
@JSONField(name = "userName")
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
@JSONField(name = "personPic")
|
|
||||||
private String personPic;
|
|
||||||
|
|
||||||
@JSONField(name = "globalPic")
|
|
||||||
private String globalPic;
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Auther: cyFeng
|
|
||||||
* @Date: 2024/11/18 14:23
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class ElectricCarDto {
|
|
||||||
|
|
||||||
@JSONField(name = "requestData")
|
|
||||||
private RequestDataDTO requestData;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Auther: cyFeng
|
|
||||||
* @Date: 2024/11/18 14:23
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class HighThrowDto {
|
|
||||||
|
|
||||||
@JSONField(name = "requestData")
|
|
||||||
private RequestDataDTO requestData;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class RequestDataDTO {
|
|
||||||
@JSONField(name = "requestFlag")
|
|
||||||
private String requestFlag;
|
|
||||||
@JSONField(name = "requestDataList")
|
|
||||||
private List<RequestDataListDTO> requestDataList;
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.domain.dto;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class RequestDataListDTO {
|
|
||||||
@JSONField(name = "gatewaySN")
|
|
||||||
private String gatewaySN;
|
|
||||||
@JSONField(name = "warnType")
|
|
||||||
private String warnType;
|
|
||||||
@JSONField(name = "deviceType")
|
|
||||||
private String deviceType;
|
|
||||||
@JSONField(name = "deviceSN")
|
|
||||||
private String deviceSN;
|
|
||||||
@JSONField(name = "detailSN")
|
|
||||||
private String detailSN;
|
|
||||||
|
|
||||||
@JSONField(name = "eventName")
|
|
||||||
private String eventName;
|
|
||||||
@JSONField(name = "warnTime")
|
|
||||||
private String warnTime;
|
|
||||||
@JSONField(name = "eventDescribe")
|
|
||||||
private String eventDescribe;
|
|
||||||
@JSONField(name = "globalPicBase64")
|
|
||||||
private String globalPicBase64;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseDoorRecord;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人脸门禁记录表(BaseDoorRecord)Mapper
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-21 16:15:21
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface BaseDoorRecordMapper extends BaseMapper<BaseDoorRecord> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseElectricCarRecord;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电动车预警(BaseElectricCarRecord)Mapper
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-19 19:10:33
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface BaseElectricCarRecordMapper extends BaseMapper<BaseElectricCarRecord> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseHighThrowRecord;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高抛记录表(BaseHighThrowRecord)Mapper
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-18 09:35:05
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface BaseHighThrowRecordMapper extends BaseMapper<BaseHighThrowRecord> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DeviceInfoRecord;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceInfoRecordMapper
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface DeviceInfoRecordMapper extends BaseMapper<DeviceInfoRecord> {
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DeviceOrderInfo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceOrderInfoMapper
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface DeviceOrderInfoMapper extends BaseMapper<DeviceOrderInfo> {
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DevicePowerInfo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DevicePowerInfoMapper
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface DevicePowerInfoMapper extends BaseMapper<DevicePowerInfo> {
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseDoorRecord;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人脸门禁记录表(BaseDoorRecord)Service
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-21 16:15:21
|
|
||||||
*/
|
|
||||||
public interface BaseDoorRecordService extends IService<BaseDoorRecord> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseElectricCarRecord;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电动车预警(BaseElectricCarRecord)Service
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-19 19:10:33
|
|
||||||
*/
|
|
||||||
public interface BaseElectricCarRecordService extends IService<BaseElectricCarRecord> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseHighThrowRecord;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高抛记录表(BaseHighThrowRecord)Service
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-18 09:34:35
|
|
||||||
*/
|
|
||||||
public interface BaseHighThrowRecordService extends IService<BaseHighThrowRecord> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -4,8 +4,6 @@ package com.bootdo.datasend.dianxin.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseUserRecord;
|
import com.bootdo.datasend.dianxin.domain.BaseUserRecord;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人脸记录表(BaseUserRecord)Service
|
* 人脸记录表(BaseUserRecord)Service
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,8 +4,6 @@ package com.bootdo.datasend.dianxin.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseVehicleRecord;
|
import com.bootdo.datasend.dianxin.domain.BaseVehicleRecord;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆记录表(BaseVehicleRecord)Service
|
* 车辆记录表(BaseVehicleRecord)Service
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DeviceInfoRecord;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceInfoRecordService
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
public interface DeviceInfoRecordService extends IService<DeviceInfoRecord> {
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DeviceOrderInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceOrderInfoService
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
public interface DeviceOrderInfoService extends IService<DeviceOrderInfo> {
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DevicePowerInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DevicePowerInfoService
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
public interface DevicePowerInfoService extends IService<DevicePowerInfo> {
|
|
||||||
}
|
|
|
@ -4,8 +4,6 @@ package com.bootdo.datasend.dianxin.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.bootdo.datasend.dianxin.domain.SysDictData;
|
import com.bootdo.datasend.dianxin.domain.SysDictData;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典数据表(SysDictData)Service
|
* 字典数据表(SysDictData)Service
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service.impl;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseDoorRecord;
|
|
||||||
import com.bootdo.datasend.dianxin.mapper.BaseDoorRecordMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.service.BaseDoorRecordService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 人脸门禁记录表(BaseDoorRecord)ServiceImpl
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-21 16:15:21
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class BaseDoorRecordServiceImpl extends ServiceImpl<BaseDoorRecordMapper, BaseDoorRecord> implements BaseDoorRecordService {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service.impl;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseElectricCarRecord;
|
|
||||||
import com.bootdo.datasend.dianxin.mapper.BaseElectricCarRecordMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.service.BaseElectricCarRecordService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电动车预警(BaseElectricCarRecord)ServiceImpl
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-19 19:10:33
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class BaseElectricCarRecordServiceImpl extends ServiceImpl<BaseElectricCarRecordMapper, BaseElectricCarRecord> implements BaseElectricCarRecordService {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service.impl;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.BaseHighThrowRecord;
|
|
||||||
import com.bootdo.datasend.dianxin.mapper.BaseHighThrowRecordMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.service.BaseHighThrowRecordService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 高抛记录表(BaseHighThrowRecord)ServiceImpl
|
|
||||||
*
|
|
||||||
* @author makejava
|
|
||||||
* @since 2024-11-18 09:35:05
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class BaseHighThrowRecordServiceImpl extends ServiceImpl<BaseHighThrowRecordMapper, BaseHighThrowRecord> implements BaseHighThrowRecordService {
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DeviceInfoRecord;
|
|
||||||
import com.bootdo.datasend.dianxin.mapper.DeviceInfoRecordMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.service.DeviceInfoRecordService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceInfoRecordServiceImpl
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class DeviceInfoRecordServiceImpl extends ServiceImpl<DeviceInfoRecordMapper, DeviceInfoRecord> implements DeviceInfoRecordService {
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DeviceOrderInfo;
|
|
||||||
import com.bootdo.datasend.dianxin.mapper.DeviceOrderInfoMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.service.DeviceOrderInfoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DeviceOrderInfoServiceImpl
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class DeviceOrderInfoServiceImpl extends ServiceImpl<DeviceOrderInfoMapper, DeviceOrderInfo> implements DeviceOrderInfoService {
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.bootdo.datasend.dianxin.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.bootdo.datasend.dianxin.domain.DevicePowerInfo;
|
|
||||||
import com.bootdo.datasend.dianxin.mapper.DevicePowerInfoMapper;
|
|
||||||
import com.bootdo.datasend.dianxin.service.DevicePowerInfoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description DevicePowerInfoServiceImpl
|
|
||||||
* @Author lijingtong
|
|
||||||
* @Date 2025-07-09
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class DevicePowerInfoServiceImpl extends ServiceImpl<DevicePowerInfoMapper, DevicePowerInfo> implements DevicePowerInfoService {
|
|
||||||
}
|
|
|
@ -5,21 +5,20 @@ import com.alibaba.fastjson.parser.Feature;
|
||||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.bootdo.datasend.dianxin.cache.DeviceCache;
|
import com.bootdo.datasend.dianxin.cache.DeviceCache;
|
||||||
import com.bootdo.datasend.dianxin.domain.*;
|
import com.bootdo.datasend.dianxin.domain.BaseUserRecord;
|
||||||
|
import com.bootdo.datasend.dianxin.domain.BaseVehicleRecord;
|
||||||
|
import com.bootdo.datasend.dianxin.domain.DevopsDeviceInfo;
|
||||||
import com.bootdo.datasend.dianxin.domain.dto.*;
|
import com.bootdo.datasend.dianxin.domain.dto.*;
|
||||||
import com.bootdo.datasend.dianxin.service.*;
|
import com.bootdo.datasend.dianxin.service.BaseUserRecordService;
|
||||||
|
import com.bootdo.datasend.dianxin.service.BaseVehicleRecordService;
|
||||||
import com.bootdo.util.Base64Util;
|
import com.bootdo.util.Base64Util;
|
||||||
import com.bootdo.util.StringKit;
|
import com.bootdo.util.StringKit;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -27,207 +26,10 @@ import java.util.List;
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class StandardTask {
|
public class StandardTask {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(StandardTask.class);
|
private static final Logger logger = LoggerFactory.getLogger(StandardTask.class);
|
||||||
|
|
||||||
private final RabbitTemplate rabbitTemplate;
|
|
||||||
private final BaseHighThrowRecordService highThrowRecordService;
|
|
||||||
private final BaseElectricCarRecordService electricCarRecordService;
|
|
||||||
private final BaseUserRecordService userRecordService;
|
|
||||||
private final BaseVehicleRecordService vehicleRecordService;
|
private final BaseVehicleRecordService vehicleRecordService;
|
||||||
private final BaseDoorRecordService doorRecordService;
|
|
||||||
private final DeviceInfoRecordService deviceRecordService;
|
|
||||||
private final DeviceOrderInfoService deviceOrderInfoService;
|
|
||||||
|
|
||||||
private final DevicePowerInfoService devicePowerInfoService;
|
|
||||||
|
|
||||||
private final RestTemplate restTemplate;
|
private final RestTemplate restTemplate;
|
||||||
|
private final BaseUserRecordService userRecordService;
|
||||||
/**
|
|
||||||
* 功能描述: 高抛发送
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void sendHighThrow() {
|
|
||||||
|
|
||||||
//获取高抛记录
|
|
||||||
List<BaseHighThrowRecord> highThrowRecords = highThrowRecordService.list(new QueryWrapper<BaseHighThrowRecord>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.last("limit 100")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (BaseHighThrowRecord h : highThrowRecords) {
|
|
||||||
|
|
||||||
String deviceId = h.getDeviceIp();
|
|
||||||
String deviceCacheStr = DeviceCache.get(deviceId);
|
|
||||||
DevopsDeviceInfo deviceInfo = null;
|
|
||||||
if ("".equals(StringKit.toString(deviceCacheStr))) {
|
|
||||||
logger.info("当前设备缓存中不存在:" + deviceId);
|
|
||||||
} else {
|
|
||||||
logger.info("当前设备获取到缓存:" + deviceId);
|
|
||||||
deviceInfo = JSON.parseObject(deviceCacheStr, DevopsDeviceInfo.class, Feature.IgnoreNotMatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
HighThrowDto dto = new HighThrowDto();
|
|
||||||
|
|
||||||
RequestDataDTO dataDTO = new RequestDataDTO();
|
|
||||||
dataDTO.setRequestFlag("1");
|
|
||||||
|
|
||||||
RequestDataListDTO requestDataListDTO = new RequestDataListDTO();
|
|
||||||
if (deviceInfo != null) {
|
|
||||||
requestDataListDTO.setGatewaySN(deviceInfo.getGeminiSn());
|
|
||||||
}
|
|
||||||
requestDataListDTO.setWarnType("1001");
|
|
||||||
requestDataListDTO.setDeviceType("302");
|
|
||||||
requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
|
||||||
requestDataListDTO.setEventName("高抛报警");
|
|
||||||
requestDataListDTO.setWarnTime(StringKit.toString(h.getPassTime()));
|
|
||||||
requestDataListDTO.setGlobalPicBase64(Base64Util.getBase64ByUrl(h.getHighThrowImgurl()));
|
|
||||||
List<RequestDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(requestDataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
|
|
||||||
//循环发送mq
|
|
||||||
boolean b = sendHighThrowMq(dto);
|
|
||||||
if (b) {
|
|
||||||
h.setIsSend(1);
|
|
||||||
highThrowRecordService.saveOrUpdate(h);
|
|
||||||
logger.info("高抛记录发送成功:" + h.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述: 发送电瓶车预警
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void sendElectricCar() {
|
|
||||||
|
|
||||||
//获取高抛记录
|
|
||||||
List<BaseElectricCarRecord> lists = electricCarRecordService.list(new QueryWrapper<BaseElectricCarRecord>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.last("limit 100")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (BaseElectricCarRecord h : lists) {
|
|
||||||
|
|
||||||
String deviceId = h.getDeviceIp();
|
|
||||||
String deviceCacheStr = DeviceCache.get(deviceId);
|
|
||||||
DevopsDeviceInfo deviceInfo = null;
|
|
||||||
if ("".equals(StringKit.toString(deviceCacheStr))) {
|
|
||||||
logger.info("当前设备缓存中不存在:" + deviceId);
|
|
||||||
} else {
|
|
||||||
logger.info("当前设备获取到缓存:" + deviceId);
|
|
||||||
deviceInfo = JSON.parseObject(deviceCacheStr, DevopsDeviceInfo.class, Feature.IgnoreNotMatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
ElectricCarDto dto = new ElectricCarDto();
|
|
||||||
|
|
||||||
RequestDataDTO dataDTO = new RequestDataDTO();
|
|
||||||
dataDTO.setRequestFlag("1");
|
|
||||||
|
|
||||||
RequestDataListDTO requestDataListDTO = new RequestDataListDTO();
|
|
||||||
if (deviceInfo != null) {
|
|
||||||
requestDataListDTO.setGatewaySN(deviceInfo.getGeminiSn());
|
|
||||||
}
|
|
||||||
requestDataListDTO.setWarnType("1002");
|
|
||||||
requestDataListDTO.setDeviceType("302");
|
|
||||||
requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
|
||||||
requestDataListDTO.setEventName("电动车入侵");
|
|
||||||
requestDataListDTO.setWarnTime(StringKit.toString(h.getPassTime()));
|
|
||||||
requestDataListDTO.setGlobalPicBase64(Base64Util.getBase64ByUrl(h.getHighThrowImgurl()));
|
|
||||||
List<RequestDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(requestDataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
|
|
||||||
//循环发送mq
|
|
||||||
boolean b = sendElectricCarMq(dto);
|
|
||||||
if (b) {
|
|
||||||
h.setIsSend(1);
|
|
||||||
electricCarRecordService.saveOrUpdate(h);
|
|
||||||
logger.info("电动车入侵记录发送成功:" + h.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述: 发送人脸记录
|
|
||||||
*/
|
|
||||||
// @Scheduled(cron = "0/5 * * * * ? ")
|
// @Scheduled(cron = "0/5 * * * * ? ")
|
||||||
public void sendUserRecord() {
|
|
||||||
|
|
||||||
List<BaseUserRecord> lists = userRecordService.list(new QueryWrapper<BaseUserRecord>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.last("limit 100")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (BaseUserRecord h : lists) {
|
|
||||||
|
|
||||||
String deviceId = h.getDeviceIp();
|
|
||||||
String deviceCacheStr = DeviceCache.get(deviceId);
|
|
||||||
DevopsDeviceInfo deviceInfo = null;
|
|
||||||
if ("".equals(StringKit.toString(deviceCacheStr))) {
|
|
||||||
logger.info("当前设备缓存中不存在:" + deviceId);
|
|
||||||
} else {
|
|
||||||
logger.info("当前设备获取到缓存:" + deviceId);
|
|
||||||
deviceInfo = JSON.parseObject(deviceCacheStr, DevopsDeviceInfo.class, Feature.IgnoreNotMatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
UserRecordDto dto = new UserRecordDto();
|
|
||||||
|
|
||||||
UserRequestDataDTO dataDTO = new UserRequestDataDTO();
|
|
||||||
dataDTO.setRequestFlag("1");
|
|
||||||
|
|
||||||
UserRequestDataListDTO requestDataListDTO = new UserRequestDataListDTO();
|
|
||||||
|
|
||||||
|
|
||||||
if (deviceInfo != null) {
|
|
||||||
requestDataListDTO.setGatewaySN(deviceInfo.getGeminiSn());
|
|
||||||
}
|
|
||||||
requestDataListDTO.setPassTime(StringKit.toString(h.getPassTime()));
|
|
||||||
requestDataListDTO.setPersonPicBase64(Base64Util.getBase64ByUrl(h.getPersonPic()));
|
|
||||||
requestDataListDTO.setGlobalPicBase64(Base64Util.getBase64ByUrl(h.getGlobalPic()));
|
|
||||||
requestDataListDTO.setPassDirection(StringKit.toString(deviceInfo.getDirection()));
|
|
||||||
requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
|
||||||
List<UserRequestDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(requestDataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
String requestBody = JSON.toJSONString(dto);
|
|
||||||
|
|
||||||
// 比如队列名称是 instruction||{gatewaySN} ,需替换成实际的 gatewaySN 值
|
|
||||||
String gatewaySN = deviceInfo != null ? deviceInfo.getGeminiSn() : "";
|
|
||||||
String queueName = "instruction||" + gatewaySN;
|
|
||||||
String url = "http://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/accept";
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
|
||||||
// 消息队列发送
|
|
||||||
// rabbitTemplate.convertAndSend(queueName, JSON.toJSONString(dto));
|
|
||||||
// 调接口
|
|
||||||
String result = restTemplate.postForObject(url, requestBody, String.class);
|
|
||||||
logger.info("调用接口返回结果:{}", result);
|
|
||||||
|
|
||||||
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
|
||||||
h.setIsSend(1);
|
|
||||||
userRecordService.saveOrUpdate(h);
|
|
||||||
logger.info("人脸抓拍记录发送成功:" + h.getId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
|
||||||
}
|
|
||||||
//循环发送mq
|
|
||||||
boolean b = sendUserMq(dto);
|
|
||||||
if (b) {
|
|
||||||
h.setIsSend(1);
|
|
||||||
userRecordService.saveOrUpdate(h);
|
|
||||||
logger.info("人脸抓拍记录发送成功:" + h.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能描述: 发送车辆记录
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void sendVehicleRecord() {
|
public void sendVehicleRecord() {
|
||||||
|
|
||||||
List<BaseVehicleRecord> lists = vehicleRecordService.list(new QueryWrapper<BaseVehicleRecord>()
|
List<BaseVehicleRecord> lists = vehicleRecordService.list(new QueryWrapper<BaseVehicleRecord>()
|
||||||
|
@ -277,10 +79,12 @@ public class StandardTask {
|
||||||
dto.setRequestData(dataDTO);
|
dto.setRequestData(dataDTO);
|
||||||
// String requestBody = JSON.toJSONString(dto);
|
// String requestBody = JSON.toJSONString(dto);
|
||||||
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
||||||
|
logger.info("json格式字符串:{}", requestBody);
|
||||||
// 比如队列名称是 instruction||{gatewaySN} ,需替换成实际的 gatewaySN 值
|
// 比如队列名称是 instruction||{gatewaySN} ,需替换成实际的 gatewaySN 值
|
||||||
String gatewaySN = deviceInfo != null ? deviceInfo.getGeminiSn() : "";
|
String gatewaySN = deviceInfo != null ? deviceInfo.getGeminiSn() : "";
|
||||||
String queueName = "instruction||" + gatewaySN;
|
String queueName = "instruction||" + gatewaySN;
|
||||||
String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwCarRecord";
|
// String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwCarRecord";
|
||||||
|
String url = "";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
||||||
|
@ -302,23 +106,17 @@ public class StandardTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
public void sendUserRecord() {
|
||||||
* 人脸门禁
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void doorRecord() {
|
|
||||||
|
|
||||||
List<BaseDoorRecord> lists = doorRecordService.list(new QueryWrapper<BaseDoorRecord>()
|
List<BaseUserRecord> lists = userRecordService.list(new QueryWrapper<BaseUserRecord>()
|
||||||
.eq("is_send", "0")
|
.eq("is_send", "0")
|
||||||
.last("limit 100")
|
.last("limit 100")
|
||||||
);
|
);
|
||||||
|
|
||||||
for (BaseDoorRecord h : lists) {
|
for (BaseUserRecord h : lists) {
|
||||||
|
|
||||||
|
String deviceId = h.getDeviceIp();
|
||||||
String deviceId = h.getCameraIp();
|
|
||||||
String deviceCacheStr = DeviceCache.get(deviceId);
|
String deviceCacheStr = DeviceCache.get(deviceId);
|
||||||
String passDirection = "";
|
|
||||||
DevopsDeviceInfo deviceInfo = null;
|
DevopsDeviceInfo deviceInfo = null;
|
||||||
if ("".equals(StringKit.toString(deviceCacheStr))) {
|
if ("".equals(StringKit.toString(deviceCacheStr))) {
|
||||||
logger.info("当前设备缓存中不存在:" + deviceId);
|
logger.info("当前设备缓存中不存在:" + deviceId);
|
||||||
|
@ -327,43 +125,34 @@ public class StandardTask {
|
||||||
deviceInfo = JSON.parseObject(deviceCacheStr, DevopsDeviceInfo.class, Feature.IgnoreNotMatch);
|
deviceInfo = JSON.parseObject(deviceCacheStr, DevopsDeviceInfo.class, Feature.IgnoreNotMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UserRecordDto dto = new UserRecordDto();
|
||||||
|
|
||||||
DoorRecordDTO dto = new DoorRecordDTO();
|
UserRequestDataDTO dataDTO = new UserRequestDataDTO();
|
||||||
|
|
||||||
DoorRequestDataDTO dataDTO = new DoorRequestDataDTO();
|
|
||||||
dataDTO.setRequestFlag("1");
|
dataDTO.setRequestFlag("1");
|
||||||
|
|
||||||
DoorRequestDataListDTO requestDataListDTO = new DoorRequestDataListDTO();
|
UserRequestDataListDTO requestDataListDTO = new UserRequestDataListDTO();
|
||||||
|
|
||||||
|
|
||||||
if (deviceInfo != null) {
|
if (deviceInfo != null) {
|
||||||
requestDataListDTO.setGatewaySN(deviceInfo.getGeminiSn());
|
requestDataListDTO.setGatewaySN(deviceInfo.getGeminiSn());
|
||||||
}
|
}
|
||||||
requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
|
||||||
requestDataListDTO.setValidType(Integer.valueOf(h.getDirection()));
|
|
||||||
requestDataListDTO.setPassTime(StringKit.toString(h.getPassTime()));
|
requestDataListDTO.setPassTime(StringKit.toString(h.getPassTime()));
|
||||||
if (h.getPersonPic() != null) {
|
requestDataListDTO.setPersonPicBase64(Base64Util.getBase64ByUrl(h.getPersonPic()));
|
||||||
requestDataListDTO.setGlobalPicBase64(Base64Util.getBase64ByUrl(h.getPersonPic()));
|
requestDataListDTO.setGlobalPicBase64(Base64Util.getBase64ByUrl(h.getGlobalPic()));
|
||||||
}
|
requestDataListDTO.setPassDirection(StringKit.toString(deviceInfo.getDirection()));
|
||||||
requestDataListDTO.setPersonPic(h.getPersonPic());
|
|
||||||
requestDataListDTO.setGlobalPic(h.getPersonPic());
|
|
||||||
requestDataListDTO.setCardNo(h.getCardno());
|
|
||||||
requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
||||||
if (h.getOpenResult().contains("成功")) {
|
List<UserRequestDataListDTO> list = new ArrayList<>();
|
||||||
requestDataListDTO.setValidResult((short) 1);
|
|
||||||
} else {
|
|
||||||
requestDataListDTO.setValidResult((short) 0);
|
|
||||||
}
|
|
||||||
requestDataListDTO.setUserName(h.getUserName());
|
|
||||||
requestDataListDTO.setPassDirection(h.getDirection());
|
|
||||||
List<DoorRequestDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(requestDataListDTO);
|
list.add(requestDataListDTO);
|
||||||
dataDTO.setRequestDataList(list);
|
dataDTO.setRequestDataList(list);
|
||||||
dto.setRequestData(dataDTO);
|
dto.setRequestData(dataDTO);
|
||||||
// String requestBody = JSON.toJSONString(dto);
|
String requestBody = JSON.toJSONString(dto);
|
||||||
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
System.out.println("JOSN格式字符串"+requestBody);
|
||||||
|
logger.info("json格式字符串:{}", requestBody);
|
||||||
// 比如队列名称是 instruction||{gatewaySN} ,需替换成实际的 gatewaySN 值
|
// 比如队列名称是 instruction||{gatewaySN} ,需替换成实际的 gatewaySN 值
|
||||||
String gatewaySN = deviceInfo != null ? deviceInfo.getGeminiSn() : "";
|
String gatewaySN = deviceInfo != null ? deviceInfo.getGeminiSn() : "";
|
||||||
String queueName = "instruction||" + gatewaySN;
|
String queueName = "instruction||" + gatewaySN;
|
||||||
String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwUserRecord";
|
// String url = "http://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/accept";
|
||||||
|
String url = "";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
||||||
|
@ -375,335 +164,11 @@ public class StandardTask {
|
||||||
|
|
||||||
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
||||||
h.setIsSend(1);
|
h.setIsSend(1);
|
||||||
doorRecordService.saveOrUpdate(h);
|
userRecordService.saveOrUpdate(h);
|
||||||
logger.info("人脸抓拍记录发送成功:" + h.getId());
|
logger.info("人脸抓拍记录发送成功:" + h.getId());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
// public void sendDoorRecord() {
|
|
||||||
//
|
|
||||||
// List<BaseDoorRecord> lists = doorRecordService.list(new QueryWrapper<BaseDoorRecord>()
|
|
||||||
// .eq("is_send", "0")
|
|
||||||
// .last("limit 100")
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// for (BaseDoorRecord h : lists) {
|
|
||||||
//
|
|
||||||
// String deviceId = h.getCameraIp();
|
|
||||||
// String deviceCacheStr = DeviceCache.get(deviceId);
|
|
||||||
// DevopsDeviceInfo deviceInfo = null;
|
|
||||||
// if ("".equals(StringKit.toString(deviceCacheStr))) {
|
|
||||||
// logger.info("当前设备缓存中不存在:" + deviceId);
|
|
||||||
// } else {
|
|
||||||
// logger.info("当前设备获取到缓存:" + deviceId);
|
|
||||||
// deviceInfo = JSON.parseObject(deviceCacheStr, DevopsDeviceInfo.class, Feature.IgnoreNotMatch);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// UserRecordDto dto = new UserRecordDto();
|
|
||||||
//
|
|
||||||
// UserRequestDataDTO dataDTO = new UserRequestDataDTO();
|
|
||||||
// dataDTO.setRequestFlag("1");
|
|
||||||
//
|
|
||||||
// UserRequestDataListDTO requestDataListDTO = new UserRequestDataListDTO();
|
|
||||||
//
|
|
||||||
// if (deviceInfo != null) {
|
|
||||||
// requestDataListDTO.setGatewaySN(deviceInfo.getGeminiSn());
|
|
||||||
// }
|
|
||||||
// requestDataListDTO.setPassTime(StringKit.toString(h.getPassTime()));
|
|
||||||
// requestDataListDTO.setPersonPicBase64(Base64Util.getBase64ByUrl(h.getPersonPic()));
|
|
||||||
// requestDataListDTO.setPassDirection(StringKit.toString(deviceInfo.getDirection()));
|
|
||||||
//
|
|
||||||
// requestDataListDTO.setDeviceSN(h.getGbsChannelNo());
|
|
||||||
// //门禁验证方式
|
|
||||||
// requestDataListDTO.setValidType(h.getGbsChannelNo());
|
|
||||||
// requestDataListDTO.setCardNo(h.getCardno());
|
|
||||||
//
|
|
||||||
// List<UserRequestDataListDTO> list = new ArrayList<>();
|
|
||||||
// list.add(requestDataListDTO);
|
|
||||||
// dataDTO.setRequestDataList(list);
|
|
||||||
// dto.setRequestData(dataDTO);
|
|
||||||
//
|
|
||||||
// //循环发送mq
|
|
||||||
// boolean b = sendUserMq(dto);
|
|
||||||
// if (b) {
|
|
||||||
// h.setIsSend(1);
|
|
||||||
// doorRecordService.saveOrUpdate(h);
|
|
||||||
// logger.info("门禁抓拍记录发送成功:" + h.getId());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
public boolean sendHighThrowMq(HighThrowDto bean) {
|
|
||||||
try {
|
|
||||||
rabbitTemplate.convertAndSend("warnrecord", "routing.key.warnrecord", JSON.toJSONString(bean));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean sendElectricCarMq(ElectricCarDto bean) {
|
|
||||||
try {
|
|
||||||
rabbitTemplate.convertAndSend("warnrecord", "routing.key.warnrecord", JSON.toJSONString(bean));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean sendUserMq(UserRecordDto bean) {
|
|
||||||
try {
|
|
||||||
rabbitTemplate.convertAndSend("warnrecord", "routing.key.userrecord", JSON.toJSONString(bean));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean sendVehicleMq(VehicleRecordDto bean) {
|
|
||||||
try {
|
|
||||||
rabbitTemplate.convertAndSend("warnrecord", "routing.key.vehiclerecord", JSON.toJSONString(bean));
|
|
||||||
} catch (Exception e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电表设备信息
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void DeviceInfoRecord() {
|
|
||||||
|
|
||||||
List<DeviceInfoRecord> lists = deviceRecordService.list(new QueryWrapper<DeviceInfoRecord>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.last("limit 100")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (DeviceInfoRecord h : lists) {
|
|
||||||
DeviceInfoDTO dto = new DeviceInfoDTO();
|
|
||||||
|
|
||||||
DeviceInfoDataDTO dataDTO = new DeviceInfoDataDTO();
|
|
||||||
dataDTO.setRequestFlag("single");
|
|
||||||
DeviceInfoDataListDTO dataListDTO = new DeviceInfoDataListDTO();
|
|
||||||
dataListDTO.setGatewaySN(h.getGatewaySN());
|
|
||||||
dataListDTO.setDeviceType(h.getDeviceType());
|
|
||||||
dataListDTO.setDeviceSN(h.getDeviceSN());
|
|
||||||
dataListDTO.setHeartbeatTime(h.getHeartbeatTime());
|
|
||||||
if (h.getIsOnline() == null) {
|
|
||||||
dataListDTO.setIsOnline(0);
|
|
||||||
} else {
|
|
||||||
dataListDTO.setIsOnline(h.getIsOnline());
|
|
||||||
}
|
|
||||||
dataListDTO.setIsOpenAccount(h.getIsOpenAccount());
|
|
||||||
dataListDTO.setIsOweMoney(h.getIsOweMoney());
|
|
||||||
dataListDTO.setTotalMoney(h.getTotalMoney());
|
|
||||||
dataListDTO.setBuyTimes(h.getBuyTimes());
|
|
||||||
dataListDTO.setBalance(h.getBalance());
|
|
||||||
dataListDTO.setRoomNo(h.getRoomNo());
|
|
||||||
dataListDTO.setProjectName(h.getProjectName());
|
|
||||||
List<DeviceInfoDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(dataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
|
||||||
|
|
||||||
String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwDeviceInfo";
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
|
||||||
// 消息队列发送
|
|
||||||
// rabbitTemplate.convertAndSend(queueName, JSON.toJSONString(dto));
|
|
||||||
// 调接口
|
|
||||||
String result = restTemplate.postForObject(url, requestBody, String.class);
|
|
||||||
logger.info("调用接口返回结果:{}", result);
|
|
||||||
|
|
||||||
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
|
||||||
h.setIsSend(1);
|
|
||||||
deviceRecordService.saveOrUpdate(h);
|
|
||||||
logger.info("电表数据发送成功:" + h.getId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推送设备订单信息
|
|
||||||
*/
|
|
||||||
@Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void DeviceOrderInfoRecord() {
|
|
||||||
|
|
||||||
List<DeviceOrderInfo> lists = deviceOrderInfoService.list(new QueryWrapper<DeviceOrderInfo>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.last("limit 100")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (DeviceOrderInfo h : lists) {
|
|
||||||
DeviceOrderInfoDTO dto = new DeviceOrderInfoDTO();
|
|
||||||
DeviceOrderInfoDataDTO dataDTO = new DeviceOrderInfoDataDTO();
|
|
||||||
dataDTO.setRequestFlag("single");
|
|
||||||
DeviceOrderInfoDataListDTO dataListDTO = new DeviceOrderInfoDataListDTO();
|
|
||||||
dataListDTO.setDeviceSN(h.getDeviceSN());
|
|
||||||
dataListDTO.setSaleType(h.getSaleType());
|
|
||||||
dataListDTO.setBuyTypeName(h.getBuyTypeName());
|
|
||||||
dataListDTO.setMoney(h.getMoney());
|
|
||||||
dataListDTO.setSaleDate(h.getSaleDate());
|
|
||||||
dataListDTO.setOwnerName(h.getOwnerName());
|
|
||||||
dataListDTO.setRoomNo(h.getRoomNo());
|
|
||||||
List<DeviceOrderInfoDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(dataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
|
||||||
|
|
||||||
String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwDeviceOrder";
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
|
||||||
// 消息队列发送
|
|
||||||
// rabbitTemplate.convertAndSend(queueName, JSON.toJSONString(dto));
|
|
||||||
// 调接口
|
|
||||||
String result = restTemplate.postForObject(url, requestBody, String.class);
|
|
||||||
logger.info("调用接口返回结果:{}", result);
|
|
||||||
|
|
||||||
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
|
||||||
h.setIsSend(1);
|
|
||||||
deviceOrderInfoService.saveOrUpdate(h);
|
|
||||||
logger.info("电表设备订单信息发送成功:" + h.getId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 推送电表设备用电信息
|
|
||||||
*/
|
|
||||||
// @Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
@Scheduled(cron = "0 30 2 * * ?")
|
|
||||||
public void DevicePowerInfoRecord() {
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
// 昨天
|
|
||||||
LocalDateTime yesterday = now.minusDays(1);
|
|
||||||
// 转成yyyy-MM-dd HH:mm:ss格式
|
|
||||||
String format = yesterday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
||||||
List<DevicePowerInfo> lists = devicePowerInfoService.list(new QueryWrapper<DevicePowerInfo>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.like("use_date", format)
|
|
||||||
);
|
|
||||||
|
|
||||||
for (DevicePowerInfo h : lists) {
|
|
||||||
DevicePowerInfoDTO dto = new DevicePowerInfoDTO();
|
|
||||||
DevicePowerInfoDataDTO dataDTO = new DevicePowerInfoDataDTO();
|
|
||||||
dataDTO.setRequestFlag("single");
|
|
||||||
DevicePowerInfoDataListDTO dataListDTO = new DevicePowerInfoDataListDTO();
|
|
||||||
dataListDTO.setDeviceSN(h.getDeviceSN());
|
|
||||||
|
|
||||||
dataListDTO.setPowerEnd(h.getPowerEnd());
|
|
||||||
dataListDTO.setPowerStart(h.getPowerStart());
|
|
||||||
dataListDTO.setPowerUse(h.getPowerUse());
|
|
||||||
dataListDTO.setRoomNo(h.getRoomNo());
|
|
||||||
dataListDTO.setUseDate(h.getUseDate());
|
|
||||||
dataListDTO.setUserName(h.getUserName());
|
|
||||||
List<DevicePowerInfoDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(dataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
|
||||||
|
|
||||||
String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwDeviceUsage";
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
|
||||||
// 消息队列发送
|
|
||||||
// rabbitTemplate.convertAndSend(queueName, JSON.toJSONString(dto));
|
|
||||||
// 调接口
|
|
||||||
String result = restTemplate.postForObject(url, requestBody, String.class);
|
|
||||||
logger.info("调用接口返回结果:{}", result);
|
|
||||||
|
|
||||||
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
|
||||||
h.setIsSend(1);
|
|
||||||
devicePowerInfoService.saveOrUpdate(h);
|
|
||||||
logger.info("电表设备用电信息发送成功:" + h.getId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Scheduled(cron = "0 30 3 * * ?")
|
|
||||||
// @Scheduled(cron = "0/5 * * * * ? ")
|
|
||||||
public void DeviceWatterInfoRecord() {
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
// 昨天
|
|
||||||
LocalDateTime yesterday = now.minusDays(1);
|
|
||||||
// 转成yyyy-MM-dd HH:mm:ss格式
|
|
||||||
List<DevicePowerInfo> lists = devicePowerInfoService.list(new QueryWrapper<DevicePowerInfo>()
|
|
||||||
.eq("is_send", "0")
|
|
||||||
.likeRight("deviceSN", "C1E81")
|
|
||||||
);
|
|
||||||
|
|
||||||
for (DevicePowerInfo h : lists) {
|
|
||||||
DevicePowerInfoDTO dto = new DevicePowerInfoDTO();
|
|
||||||
DevicePowerInfoDataDTO dataDTO = new DevicePowerInfoDataDTO();
|
|
||||||
dataDTO.setRequestFlag("single");
|
|
||||||
DevicePowerInfoDataListDTO dataListDTO = new DevicePowerInfoDataListDTO();
|
|
||||||
dataListDTO.setDeviceSN(h.getDeviceSN());
|
|
||||||
|
|
||||||
dataListDTO.setPowerEnd(h.getPowerEnd());
|
|
||||||
dataListDTO.setPowerStart(h.getPowerStart());
|
|
||||||
dataListDTO.setPowerUse(h.getPowerUse());
|
|
||||||
dataListDTO.setRoomNo(h.getRoomNo());
|
|
||||||
dataListDTO.setUseDate(h.getUseDate());
|
|
||||||
dataListDTO.setUserName(h.getUserName());
|
|
||||||
List<DevicePowerInfoDataListDTO> list = new ArrayList<>();
|
|
||||||
list.add(dataListDTO);
|
|
||||||
dataDTO.setRequestDataList(list);
|
|
||||||
dto.setRequestData(dataDTO);
|
|
||||||
String requestBody = JSON.toJSONString(dto, SerializerFeature.BrowserCompatible);
|
|
||||||
String url = "https://cyy.csxdtx.com:10010/api/zdyq-equipment/dwBoxRecord/acceptDwDeviceUsage";
|
|
||||||
|
|
||||||
try {
|
|
||||||
// 发送 POST 请求,这里假设接口返回类型为 String ,可根据实际调整
|
|
||||||
// 消息队列发送
|
|
||||||
// rabbitTemplate.convertAndSend(queueName, JSON.toJSONString(dto));
|
|
||||||
// 调接口
|
|
||||||
String result = restTemplate.postForObject(url, requestBody, String.class);
|
|
||||||
logger.info("调用接口返回结果:{}", result);
|
|
||||||
|
|
||||||
// 若返回码符合成功逻辑(需看接口文档定义),更新发送状态
|
|
||||||
h.setIsSend(1);
|
|
||||||
devicePowerInfoService.saveOrUpdate(h);
|
|
||||||
logger.info("电表设备用电信息发送成功:" + h.getId());
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error("调用接口发送数据失败,记录 ID:{},异常:{}", h.getId(), e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
LocalDateTime now = LocalDateTime.now();
|
|
||||||
// 昨天
|
|
||||||
LocalDateTime yesterday = now.minusDays(1);
|
|
||||||
// 转成yyyy-MM-dd HH:mm:ss格式
|
|
||||||
String format = yesterday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
|
||||||
System.out.println(format);
|
|
||||||
System.out.println(yesterday);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ spring:
|
||||||
datasource: #数据库
|
datasource: #数据库
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
username: root
|
username: root
|
||||||
password: '!QAZ1qaz'
|
password: 'puxing@18912915666'
|
||||||
url: jdbc:mysql://221.229.107.118:30557/multidimensional_box?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
|
url: jdbc:mysql://110.1.53.162:55306/multidimensional_box?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
|
||||||
# url: jdbc:mysql://127.0.0.1:55306/multidimensional_box?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
|
# url: jdbc:mysql://127.0.0.1:55306/multidimensional_box?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
initialSize: 5 # 配置初始化大小、最小、最大
|
initialSize: 5 # 配置初始化大小、最小、最大
|
||||||
|
|
Loading…
Reference in New Issue