diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java index 20f1337..d295f2e 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.controller.BaseController; import com.newfiber.common.core.web.domain.Result; import com.newfiber.common.core.web.page.PageResult; -import com.newfiber.common.security.annotation.RequiresPermissions; import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.dto.PhotoIdentifyDto; @@ -31,7 +30,6 @@ import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; - import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -135,7 +133,6 @@ @PostMapping("/export") @ApiOperation(value = "查询历史数据导出excel", position = 60) public void export(HttpServletResponse response, TermiteHistoryQueryRequest request){ - startPage(); PageResult> result =termiteService.queryhistoryData(request); ExcelUtil util = new ExcelUtil(TermiteInfoResponse.class); util.exportExcel(response, result.getData(), request.getSn()+"历史站点"); diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java index 20f1337..d295f2e 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.controller.BaseController; import com.newfiber.common.core.web.domain.Result; import com.newfiber.common.core.web.page.PageResult; -import com.newfiber.common.security.annotation.RequiresPermissions; import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.dto.PhotoIdentifyDto; @@ -31,7 +30,6 @@ import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; - import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -135,7 +133,6 @@ @PostMapping("/export") @ApiOperation(value = "查询历史数据导出excel", position = 60) public void export(HttpServletResponse response, TermiteHistoryQueryRequest request){ - startPage(); PageResult> result =termiteService.queryhistoryData(request); ExcelUtil util = new ExcelUtil(TermiteInfoResponse.class); util.exportExcel(response, result.getData(), request.getSn()+"历史站点"); diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java index 46db3c5..bf53799 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java @@ -20,8 +20,6 @@ public class ProjectInfo extends BaseEntity { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "用户编号") - private Long userId; /** * 项目编码 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java index 20f1337..d295f2e 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.controller.BaseController; import com.newfiber.common.core.web.domain.Result; import com.newfiber.common.core.web.page.PageResult; -import com.newfiber.common.security.annotation.RequiresPermissions; import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.dto.PhotoIdentifyDto; @@ -31,7 +30,6 @@ import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; - import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -135,7 +133,6 @@ @PostMapping("/export") @ApiOperation(value = "查询历史数据导出excel", position = 60) public void export(HttpServletResponse response, TermiteHistoryQueryRequest request){ - startPage(); PageResult> result =termiteService.queryhistoryData(request); ExcelUtil util = new ExcelUtil(TermiteInfoResponse.class); util.exportExcel(response, result.getData(), request.getSn()+"历史站点"); diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java index 46db3c5..bf53799 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java @@ -20,8 +20,6 @@ public class ProjectInfo extends BaseEntity { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "用户编号") - private Long userId; /** * 项目编码 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java index 021d494..4be7201 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -22,6 +22,12 @@ private String location; /** + * 经纬度 + */ + @ApiModelProperty(value = "经纬度") + private String lonandlat; + + /** * 累计告警天数 */ @ApiModelProperty(value = "累计告警天数") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java index 20f1337..d295f2e 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.controller.BaseController; import com.newfiber.common.core.web.domain.Result; import com.newfiber.common.core.web.page.PageResult; -import com.newfiber.common.security.annotation.RequiresPermissions; import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.dto.PhotoIdentifyDto; @@ -31,7 +30,6 @@ import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; - import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -135,7 +133,6 @@ @PostMapping("/export") @ApiOperation(value = "查询历史数据导出excel", position = 60) public void export(HttpServletResponse response, TermiteHistoryQueryRequest request){ - startPage(); PageResult> result =termiteService.queryhistoryData(request); ExcelUtil util = new ExcelUtil(TermiteInfoResponse.class); util.exportExcel(response, result.getData(), request.getSn()+"历史站点"); diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java index 46db3c5..bf53799 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java @@ -20,8 +20,6 @@ public class ProjectInfo extends BaseEntity { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "用户编号") - private Long userId; /** * 项目编码 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java index 021d494..4be7201 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -22,6 +22,12 @@ private String location; /** + * 经纬度 + */ + @ApiModelProperty(value = "经纬度") + private String lonandlat; + + /** * 累计告警天数 */ @ApiModelProperty(value = "累计告警天数") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml index 0b7b71d..702a787 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml @@ -89,12 +89,14 @@ SELECT di_min.sn, di_min.location, + di_min.lonandlat, di_min.dailyFirstWarnDatetime, COUNT(DISTINCT DATE(dm.date)) AS countDays FROM (SELECT sn, location, + lonandlat, MIN(first_warn_datetime) AS dailyFirstWarnDatetime FROM ter_device_info @@ -109,6 +111,7 @@ GROUP BY di_min.sn, di_min.location, + di_min.lonandlat, di_min.dailyFirstWarnDatetime ORDER BY countDays DESC, diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java index 20f1337..d295f2e 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.controller.BaseController; import com.newfiber.common.core.web.domain.Result; import com.newfiber.common.core.web.page.PageResult; -import com.newfiber.common.security.annotation.RequiresPermissions; import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.dto.PhotoIdentifyDto; @@ -31,7 +30,6 @@ import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; - import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -135,7 +133,6 @@ @PostMapping("/export") @ApiOperation(value = "查询历史数据导出excel", position = 60) public void export(HttpServletResponse response, TermiteHistoryQueryRequest request){ - startPage(); PageResult> result =termiteService.queryhistoryData(request); ExcelUtil util = new ExcelUtil(TermiteInfoResponse.class); util.exportExcel(response, result.getData(), request.getSn()+"历史站点"); diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java index 46db3c5..bf53799 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java @@ -20,8 +20,6 @@ public class ProjectInfo extends BaseEntity { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "用户编号") - private Long userId; /** * 项目编码 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java index 021d494..4be7201 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -22,6 +22,12 @@ private String location; /** + * 经纬度 + */ + @ApiModelProperty(value = "经纬度") + private String lonandlat; + + /** * 累计告警天数 */ @ApiModelProperty(value = "累计告警天数") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml index 0b7b71d..702a787 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml @@ -89,12 +89,14 @@ SELECT di_min.sn, di_min.location, + di_min.lonandlat, di_min.dailyFirstWarnDatetime, COUNT(DISTINCT DATE(dm.date)) AS countDays FROM (SELECT sn, location, + lonandlat, MIN(first_warn_datetime) AS dailyFirstWarnDatetime FROM ter_device_info @@ -109,6 +111,7 @@ GROUP BY di_min.sn, di_min.location, + di_min.lonandlat, di_min.dailyFirstWarnDatetime ORDER BY countDays DESC, diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml index 5027cb2..8f65d24 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml @@ -48,7 +48,6 @@ , t.create_time , t.update_by , t.update_time - , pu.user_id AS userId @@ -58,10 +57,16 @@ and t.project_code =#{request.projectCode} + + + and pu.user_id = #{request.userId} + - JOIN ter_project_user pu ON t.project_code = pu.project_code + + JOIN ter_project_user pu ON t.project_code = pu.project_code + diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java index 20f1337..d295f2e 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/controller/TermiteController.java @@ -6,7 +6,6 @@ import com.newfiber.common.core.web.controller.BaseController; import com.newfiber.common.core.web.domain.Result; import com.newfiber.common.core.web.page.PageResult; -import com.newfiber.common.security.annotation.RequiresPermissions; import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.DeviceInfo; import com.newfiber.termite.domain.dto.PhotoIdentifyDto; @@ -31,7 +30,6 @@ import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; - import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -135,7 +133,6 @@ @PostMapping("/export") @ApiOperation(value = "查询历史数据导出excel", position = 60) public void export(HttpServletResponse response, TermiteHistoryQueryRequest request){ - startPage(); PageResult> result =termiteService.queryhistoryData(request); ExcelUtil util = new ExcelUtil(TermiteInfoResponse.class); util.exportExcel(response, result.getData(), request.getSn()+"历史站点"); diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java index 46db3c5..bf53799 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/ProjectInfo.java @@ -20,8 +20,6 @@ public class ProjectInfo extends BaseEntity { private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "用户编号") - private Long userId; /** * 项目编码 diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java index 021d494..4be7201 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java +++ b/newfiber-termites/newfiber-termites-dataup/src/main/java/com/newfiber/termite/domain/response/WarnMonitoringResponseInfo.java @@ -22,6 +22,12 @@ private String location; /** + * 经纬度 + */ + @ApiModelProperty(value = "经纬度") + private String lonandlat; + + /** * 累计告警天数 */ @ApiModelProperty(value = "累计告警天数") diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml index 0b7b71d..702a787 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/DeviceMonitoringDataMapper.xml @@ -89,12 +89,14 @@ SELECT di_min.sn, di_min.location, + di_min.lonandlat, di_min.dailyFirstWarnDatetime, COUNT(DISTINCT DATE(dm.date)) AS countDays FROM (SELECT sn, location, + lonandlat, MIN(first_warn_datetime) AS dailyFirstWarnDatetime FROM ter_device_info @@ -109,6 +111,7 @@ GROUP BY di_min.sn, di_min.location, + di_min.lonandlat, di_min.dailyFirstWarnDatetime ORDER BY countDays DESC, diff --git a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml index 5027cb2..8f65d24 100644 --- a/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml +++ b/newfiber-termites/newfiber-termites-dataup/src/main/resources/mapper/termite/ProjectInfoMapper.xml @@ -48,7 +48,6 @@ , t.create_time , t.update_by , t.update_time - , pu.user_id AS userId @@ -58,10 +57,16 @@ and t.project_code =#{request.projectCode} + + + and pu.user_id = #{request.userId} + - JOIN ter_project_user pu ON t.project_code = pu.project_code + + JOIN ter_project_user pu ON t.project_code = pu.project_code + diff --git a/newfiber-termites/newfiber-termites-package/src/test/java/CommonTest.java b/newfiber-termites/newfiber-termites-package/src/test/java/CommonTest.java index 07dbb1d..fe5a64a 100644 --- a/newfiber-termites/newfiber-termites-package/src/test/java/CommonTest.java +++ b/newfiber-termites/newfiber-termites-package/src/test/java/CommonTest.java @@ -8,6 +8,8 @@ import com.newfiber.common.core.utils.JwtUtils; import com.newfiber.common.core.utils.file.FileUtils; import com.newfiber.common.core.utils.uuid.IdUtils; +import com.newfiber.common.security.utils.PwdUtil; +import com.newfiber.common.security.utils.SecurityUtils; import com.newfiber.termite.domain.jingchu.JingChuUpload; import com.newfiber.termite.domain.request.deviceInfo.DeviceInfoStateSyncRequest; import com.newfiber.termite.util.CosUtil; @@ -106,4 +108,10 @@ System.out.println("1"); } + @Test + public void passTest(){ + String password = SecurityUtils.transferAesEncrypt("Q+AX0BXUxw/bn9mZRVib2w=="); + PwdUtil.passwordCheck(password); + System.out.println(SecurityUtils.encryptPassword(password)); + } }