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); }