From e2121bbd9292b47973550f836243f895f0b6d888 Mon Sep 17 00:00:00 2001 From: liuguijing <123456> Date: Fri, 5 May 2023 19:47:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8B=8D=E7=85=A7=E8=A1=A8?= =?UTF-8?q?=E5=92=8C=E8=A3=85=E7=BD=AE=E7=AE=A1=E7=90=86=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TerminalPhotoController.java | 1 - .../XymanagerAdminApplicationTests.java | 18 ++-- .../dto/TerminalChannelsDto.java | 2 + .../model/DyLineTreeAndChannelListModel.java | 3 + .../model/TerminalGpsModel.java | 4 + .../model/TerminalPhotoListModel.java | 3 + .../vo/TerminalAndChannelIdAndTimeVo.java | 3 +- .../xymanager_dao/dao/TerminalPhotoDao.java | 2 +- .../src/main/resources/generatorConfig.xml | 14 ++- .../resources/mappers/TerminalChannelsDao.xml | 95 ++++++++++++------ .../resources/mappers/TerminalPhotoDao.xml | 9 +- .../impl/TerminalGpsServiceImpl.java | 21 +++- .../impl/TerminalPhotoServiceImpl.java | 3 +- .../src/main/resources/xympj.dll | Bin 41984 -> 0 bytes 14 files changed, 121 insertions(+), 57 deletions(-) delete mode 100644 xymanager_service/src/main/resources/xympj.dll diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java index 1a66429..8fa93da 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalPhotoController.java @@ -9,7 +9,6 @@ import com.shxy.xymanager_common.entity.TerminalPhoto; import com.shxy.xymanager_common.model.TerminalPhotoListModel; import com.shxy.xymanager_common.vo.TerminalAndChannelIdAndTimeVo; import com.shxy.xymanager_common.vo.TerminalPhotoVo; -import com.shxy.xymanager_service.interaction.Cma; import com.shxy.xymanager_service.service.TerminalPhotoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/xymanager_admin/src/test/java/com/shxy/xymanager_admin/XymanagerAdminApplicationTests.java b/xymanager_admin/src/test/java/com/shxy/xymanager_admin/XymanagerAdminApplicationTests.java index daae94d..d35fd98 100644 --- a/xymanager_admin/src/test/java/com/shxy/xymanager_admin/XymanagerAdminApplicationTests.java +++ b/xymanager_admin/src/test/java/com/shxy/xymanager_admin/XymanagerAdminApplicationTests.java @@ -1,23 +1,13 @@ package com.shxy.xymanager_admin; -import cn.hutool.core.date.DateField; -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; -import com.shxy.xymanager_common.entity.Lines; -import com.shxy.xymanager_common.entity.TerminalScheduleRule; -import com.shxy.xymanager_common.entity.Terminals; -import com.shxy.xymanager_common.util.MyDateUtils; import com.shxy.xymanager_dao.dao.LinesDao; import com.shxy.xymanager_dao.dao.TerminalScheduleRuleDao; import com.shxy.xymanager_dao.dao.TerminalsDao; +import com.shxy.xymanager_service.interaction.Cma; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import java.sql.Time; -import java.util.Date; -import java.util.List; - @SpringBootTest class XymanagerAdminApplicationTests { @@ -25,7 +15,6 @@ class XymanagerAdminApplicationTests { TerminalsDao terminalsDao; @Autowired TerminalScheduleRuleDao terminalScheduleRuleDao; - @Autowired LinesDao linesDao; @@ -61,6 +50,11 @@ class XymanagerAdminApplicationTests { // } // System.out.println(dateTime.toString()); + Cma cma = new Cma("47.96.238.157", 6891); + boolean b = cma.requestCapture("XYH10H00000000022", (short) 1, (short) 255, (short) 0); + System.out.println(b); + +// CmaDLL cmaDLL = new CmaDLL(); } } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TerminalChannelsDto.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TerminalChannelsDto.java index a07227a..ae0ab83 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TerminalChannelsDto.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/dto/TerminalChannelsDto.java @@ -10,6 +10,8 @@ public class TerminalChannelsDto implements Serializable { private String name; + private Integer scheduleid; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/DyLineTreeAndChannelListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/DyLineTreeAndChannelListModel.java index 8cfcc8b..1201ad8 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/DyLineTreeAndChannelListModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/DyLineTreeAndChannelListModel.java @@ -77,6 +77,9 @@ public class DyLineTreeAndChannelListModel implements Serializable { @ApiModelProperty(value = "通道名称", example = "123456") private String name; + @ApiModelProperty(value = "拍照规则编号", example = "123456") + private Integer scheduleid; + } } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalGpsModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalGpsModel.java index 0f5bd1b..be1dc5b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalGpsModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalGpsModel.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.util.Date; import java.util.List; /** @@ -26,4 +27,7 @@ public class TerminalGpsModel implements Serializable { @ApiModelProperty(value = "经度", example = "123456") private double longitude; + @ApiModelProperty(value = "修改时间", example = "123456") + private Date updatetime; + } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java index 882228a..b007b21 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/model/TerminalPhotoListModel.java @@ -18,6 +18,9 @@ public class TerminalPhotoListModel implements Serializable { @ApiModelProperty(value = "时间", example = "[]") private Date time; + @ApiModelProperty(value = "照片数量", example = "123") + private Integer num; + @ApiModelProperty(value = "照片对象", example = "[]") private List list; diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java index 7b620ad..e9897d2 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/TerminalAndChannelIdAndTimeVo.java @@ -7,6 +7,7 @@ import lombok.Data; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import java.util.Date; +import java.util.List; @Data @ApiModel(value = "装置和通道编号和查询时间", description = "装置和通道编号和查询时间描述") @@ -18,7 +19,7 @@ public class TerminalAndChannelIdAndTimeVo { @NotNull(message = "通道编号不能缺少") @ApiModelProperty(value = "通道编号", example = "123455") - private Integer channelid; + private List channelid; @NotNull(message = "查询时间不能缺少") @ApiModelProperty(value = "查询时间", example = "123455") diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java index 3468593..b767f40 100644 --- a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPhotoDao.java @@ -10,7 +10,7 @@ import java.util.List; public interface TerminalPhotoDao { - List selectPhotoList(@Param("terminalid") Integer terminalid, @Param("channelid") Integer channelid, @Param("starttime") BigInteger starttime, @Param("endtime") BigInteger endtime); + List selectPhotoList(@Param("terminalid") Integer terminalid, @Param("channelid") List channelid, @Param("starttime") BigInteger starttime, @Param("endtime") BigInteger endtime); int deleteByPrimaryKey(Long id); diff --git a/xymanager_dao/src/main/resources/generatorConfig.xml b/xymanager_dao/src/main/resources/generatorConfig.xml index 00315bd..4165c68 100644 --- a/xymanager_dao/src/main/resources/generatorConfig.xml +++ b/xymanager_dao/src/main/resources/generatorConfig.xml @@ -136,9 +136,17 @@ - + + + + + + + +
diff --git a/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml index c1ffc3d..042ab3d 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalChannelsDao.xml @@ -37,6 +37,7 @@ + @@ -73,46 +74,74 @@ - delete from terminal_channels - where id = #{id,jdbcType=INTEGER} - + delete from terminal_channels + where id = #{id,jdbcType=INTEGER} + - insert into terminal_channels (id, term_id, - channel_name, max_resolution_width, max_resolution_height - ) - values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, - #{channelName,jdbcType=VARCHAR}, #{maxResolutionWidth,jdbcType=INTEGER}, #{maxResolutionHeight,jdbcType=INTEGER} - ) - + insert into terminal_channels (id, term_id, + channel_name, max_resolution_width, max_resolution_height + ) + values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, + #{channelName,jdbcType=VARCHAR}, #{maxResolutionWidth,jdbcType=INTEGER}, #{maxResolutionHeight,jdbcType=INTEGER} + ) + - + insert into terminal_channels (id,channel_name,max_resolution_width,max_resolution_height,status,create_time,update_time) VALUES @@ -198,7 +227,7 @@ where id in - #{item.id} + #{item.id} \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml index 4571646..8cd7bf3 100644 --- a/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml +++ b/xymanager_dao/src/main/resources/mappers/TerminalPhotoDao.xml @@ -23,7 +23,14 @@ select from terminal_photos - where term_id = #{terminalid} and channel_id = #{channelid} and photo_time between #{starttime} and #{endtime} + where term_id = #{terminalid} and photo_time between #{starttime} and #{endtime} + + and channel_id in + + #{item} + + + order by photo_time desc