From 3f922de2b18b08cac5e7f681d469d3b14f89da9f Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Fri, 17 Jun 2022 11:07:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E5=B7=A5?= =?UTF-8?q?=E5=9C=B0=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0=E5=9B=BE=E7=89=87?= =?UTF-8?q?=20=E9=83=A8=E5=88=86=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PeopleRecognizeController.java | 11 +++++++++++ .../hisense/monitormanage/dto/BuildingRecordsDto.java | 1 + .../hisense/monitormanage/dto/ChannelPictureDto.java | 2 +- .../java/com/hisense/monitormanage/dto/EventDto.java | 2 ++ .../hisense/monitormanage/entity/ChannelPicture.java | 2 +- .../java/com/hisense/monitormanage/entity/Event.java | 2 ++ .../monitormanage/mapper/BuildingRecordsMapper.java | 4 +++- .../monitormanage/mapper/CaseCityLawMapper.java | 1 - 8 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/hisense/monitormanage/controller/PeopleRecognizeController.java b/src/main/java/com/hisense/monitormanage/controller/PeopleRecognizeController.java index 057c0f0..b5ef131 100644 --- a/src/main/java/com/hisense/monitormanage/controller/PeopleRecognizeController.java +++ b/src/main/java/com/hisense/monitormanage/controller/PeopleRecognizeController.java @@ -6,6 +6,7 @@ import com.hisense.monitormanage.dto.PeopleRecognizeDto; import com.hisense.monitormanage.entity.PeopleRecognize; import com.hisense.monitormanage.entity.Result; import com.hisense.monitormanage.mapper.PeopleRecognizeMapper; +import com.hisense.monitormanage.service.MonitorService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -20,6 +21,9 @@ import java.util.List; @Api(tags = "人流识别算法") public class PeopleRecognizeController { + @Autowired + private MonitorService monitorService; + @Autowired private PeopleRecognizeMapper peopleRecognizeMapper; @@ -41,4 +45,11 @@ public class PeopleRecognizeController { Result success = Result.success(lists); return success; } + + @GetMapping("recover") + public Object recover(){ + monitorService.peopleRecognize(); + return "finish recover"; + } + } diff --git a/src/main/java/com/hisense/monitormanage/dto/BuildingRecordsDto.java b/src/main/java/com/hisense/monitormanage/dto/BuildingRecordsDto.java index 65fd13c..eb5beaa 100644 --- a/src/main/java/com/hisense/monitormanage/dto/BuildingRecordsDto.java +++ b/src/main/java/com/hisense/monitormanage/dto/BuildingRecordsDto.java @@ -15,4 +15,5 @@ public class BuildingRecordsDto { private double pm10;//扬尘 private double noice;//噪声 private String yjsg;//夜间施工 + private String picUrl;//图片路径 } diff --git a/src/main/java/com/hisense/monitormanage/dto/ChannelPictureDto.java b/src/main/java/com/hisense/monitormanage/dto/ChannelPictureDto.java index cb85624..cd4855d 100644 --- a/src/main/java/com/hisense/monitormanage/dto/ChannelPictureDto.java +++ b/src/main/java/com/hisense/monitormanage/dto/ChannelPictureDto.java @@ -15,7 +15,7 @@ public class ChannelPictureDto { private String PicUrl; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date insertTime; diff --git a/src/main/java/com/hisense/monitormanage/dto/EventDto.java b/src/main/java/com/hisense/monitormanage/dto/EventDto.java index 2a8763b..bfe5bfd 100644 --- a/src/main/java/com/hisense/monitormanage/dto/EventDto.java +++ b/src/main/java/com/hisense/monitormanage/dto/EventDto.java @@ -1,5 +1,6 @@ package com.hisense.monitormanage.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.math.BigDecimal; @@ -18,6 +19,7 @@ public class EventDto { private BigDecimal longitude; private String imageUrl; private String taskId; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private String captureTime; private String trackEvent; } diff --git a/src/main/java/com/hisense/monitormanage/entity/ChannelPicture.java b/src/main/java/com/hisense/monitormanage/entity/ChannelPicture.java index ae5e7ff..94093f0 100644 --- a/src/main/java/com/hisense/monitormanage/entity/ChannelPicture.java +++ b/src/main/java/com/hisense/monitormanage/entity/ChannelPicture.java @@ -17,7 +17,7 @@ public class ChannelPicture { private String PicUrl; - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private Date insertTime; } diff --git a/src/main/java/com/hisense/monitormanage/entity/Event.java b/src/main/java/com/hisense/monitormanage/entity/Event.java index 2cf8c75..e543252 100644 --- a/src/main/java/com/hisense/monitormanage/entity/Event.java +++ b/src/main/java/com/hisense/monitormanage/entity/Event.java @@ -2,6 +2,7 @@ package com.hisense.monitormanage.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.math.BigDecimal; @@ -22,6 +23,7 @@ public class Event { private BigDecimal longitude; private String imageUrl; private String taskId; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") private String captureTime; private String trackEvent; } diff --git a/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java b/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java index 2c16f52..c2e104c 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/BuildingRecordsMapper.java @@ -21,7 +21,9 @@ public interface BuildingRecordsMapper extends BaseMapper { void batchUpdate(@Param("list") List list); - @Select("SELECT * FROM t_building_new_site bns JOIN t_building_records br ON bns.gdmc = br.project_name") + @Select("SELECT rns.*,cp.pic_url from (SELECT bns.*,br.project_name,br.push_time,br.pm10,br.noice FROM " + + "t_building_new_site bns JOIN t_building_records br ON bns.gdmc = br.project_name) rns LEFT JOIN " + + "t_channel_picture cp ON rns.channel_code = cp.channel_code") List selectAllBuilding(); @Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc " + diff --git a/src/main/java/com/hisense/monitormanage/mapper/CaseCityLawMapper.java b/src/main/java/com/hisense/monitormanage/mapper/CaseCityLawMapper.java index 7c725a8..9f5507e 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/CaseCityLawMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/CaseCityLawMapper.java @@ -14,7 +14,6 @@ import java.util.Map; * @createTime 2022年05月13日 16:22:00 */ public interface CaseCityLawMapper extends BaseMapper { - //public void batchSave(List list); public void batchSave(List list); public void singleSave(Map map); }