From 1629f3e06172e0b956b7e63e2d4674784aabb95b Mon Sep 17 00:00:00 2001 From: liuguijing <123456> Date: Tue, 19 Mar 2024 13:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TerminalController.java | 84 +- .../main/resources/META-INF/spring.factories | 2 +- .../java/com/shxy/xymanager_admin/test.java | 1108 ++++++++++++++++- .../entity/TerminalBasicInfoHistory.java | 49 + .../TerminalBasicInfoHistoryExample.java | 530 ++++++++ .../entity/TerminalPositionHistory.java | 67 + .../TerminalPositionHistoryExample.java | 620 +++++++++ .../entity/TerminalRunningStatusHistory.java | 78 ++ .../TerminalRunningStatusHistoryExample.java | 620 +++++++++ .../entity/TerminalWorkingStatusHistory.java | 140 +++ .../TerminalWorkingStatusHistoryExample.java | 930 ++++++++++++++ .../shxy/xymanager_common/vo/SysUserVo.java | 1 - .../dao/TerminalBasicInfoHistoryDao.java | 22 + .../dao/TerminalPositionHistoryDao.java | 30 + .../dao/TerminalRunningStatusHistoryDao.java | 22 + .../dao/TerminalWorkingStatusHistoryDao.java | 22 + .../mappers/TerminalBasicInfoHistoryDao.xml | 175 +++ .../mappers/TerminalPositionHistoryDao.xml | 243 ++++ .../TerminalRunningStatusHistoryDao.xml | 200 +++ .../TerminalWorkingStatusHistoryDao.xml | 259 ++++ .../filter/UserInfoFilter.java | 2 +- .../impl/TerminalServiceImpl.java | 140 ++- .../impl/UploadServiceImpl.java | 2 - .../service/TerminalService.java | 26 +- 24 files changed, 5356 insertions(+), 16 deletions(-) create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistory.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistoryExample.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistory.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistoryExample.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistory.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistoryExample.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistory.java create mode 100644 xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistoryExample.java create mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalBasicInfoHistoryDao.java create mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPositionHistoryDao.java create mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalRunningStatusHistoryDao.java create mode 100644 xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalWorkingStatusHistoryDao.java create mode 100644 xymanager_dao/src/main/resources/mappers/TerminalBasicInfoHistoryDao.xml create mode 100644 xymanager_dao/src/main/resources/mappers/TerminalPositionHistoryDao.xml create mode 100644 xymanager_dao/src/main/resources/mappers/TerminalRunningStatusHistoryDao.xml create mode 100644 xymanager_dao/src/main/resources/mappers/TerminalWorkingStatusHistoryDao.xml diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java index ec05301..7099931 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/TerminalController.java @@ -1,13 +1,11 @@ package com.shxy.xymanager_admin.controller; -import cn.hutool.core.date.DateTime; import com.shxy.xymanager_common.annotation.Log; import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceStatus; -import com.shxy.xymanager_common.entity.TerminalFaults; -import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals; +import com.shxy.xymanager_common.entity.*; import com.shxy.xymanager_common.excelbean.TerminalAndLastPicListExcelModel; import com.shxy.xymanager_common.excelbean.TerminalListExcelModel; import com.shxy.xymanager_common.model.*; @@ -249,8 +247,8 @@ public class TerminalController extends BaseController { @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getWorkingStatusHistory") @Log(title = "工作状态历史", type = "查询") - public ResponseReult getWorkingStatusHistory(TermFaultsVo vo) { - ServiceBody serviceBody = terminalService.getWorkingStatusHistory(vo); + public ResponseReult> getWorkingStatusHistory(@RequestBody TermFaultsVo vo) { + ServiceBody> serviceBody = terminalService.getWorkingStatusHistory(vo); if (serviceBody.getCode() == ServiceStatus.SUCCESS) { return ResponseReult.success(serviceBody.getData()); } else { @@ -258,6 +256,15 @@ public class TerminalController extends BaseController { } } + @ApiOperation(value = "工作状态历史Excel", notes = "工作状态历史Excel", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @GetMapping("/getWorkingStatusHistoryExcel") + @Log(title = "工作状态历史Excel", type = "查询") + public void getWorkingStatusHistoryExcel(HttpServletResponse response, TermFaultsVo vo) throws IOException { + ServiceBody> serviceBody = terminalService.getWorkingStatusHistory(vo); + EasyExcelUtil.createExcel(response, "设备工作状态列表", serviceBody.getData().getList(), TerminalWorkingStatusHistory.class); + } + @ApiOperation(value = "装置统计", notes = "装置统计", httpMethod = "POST") @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) @RequestMapping("/getTermStatistics") @@ -368,4 +375,71 @@ public class TerminalController extends BaseController { EasyExcelUtil.createExcel(response, "设备故障列表", serviceBody.getData().getList(), TerminalFaults.class); } + @ApiOperation(value = "获取设备运行状态历史", notes = "获取设备运行状态历史", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @RequestMapping("/getTermRunningHistory") + @Log(title = "获取设备运行状态历史", type = "查询") + public ResponseReult> getTermRunningHistory(@RequestBody TermFaultsVo vo) { + ServiceBody> serviceBody = terminalService.getTermRunningHistory(vo); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + + @ApiOperation(value = "获取设备运行状态历史Excel", notes = "获取设备运行状态历史Excel", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @GetMapping("/getTermRunningHistoryExcel") + @Log(title = "获取设备运行状态历史", type = "查询") + public void getTermRunningHistoryExcel(HttpServletResponse response, TermFaultsVo vo) throws IOException { + ServiceBody> serviceBody = terminalService.getTermRunningHistory(vo); + EasyExcelUtil.createExcel(response, "设备运行列表", serviceBody.getData().getList(), TerminalRunningStatusHistory.class); + } + + @ApiOperation(value = "获取设备Gps历史", notes = "获取设备Gps历史", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @RequestMapping("/getTermGpsHistory") + @Log(title = "获取设备Gps历史", type = "查询") + public ResponseReult> getTermGpsHistory(@RequestBody TermFaultsVo vo) { + ServiceBody> serviceBody = terminalService.getTermGpsHistory(vo); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + + @ApiOperation(value = "获取设备Gps历史Excel", notes = "获取设备Gps历史Excel", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @GetMapping("/getTermGpsHistoryExcel") + @Log(title = "获取设备Gps历史Excel", type = "查询") + public void getTermGpsHistoryExcel(HttpServletResponse response, TermFaultsVo vo) throws IOException { + ServiceBody> serviceBody = terminalService.getTermGpsHistory(vo); + EasyExcelUtil.createExcel(response, "设备GPS列表", serviceBody.getData().getList(), TerminalPositionHistory.class); + } + + + @ApiOperation(value = "获取设备基本信息", notes = "获取设备基本信息", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @RequestMapping("/getTermBasicInfoHistory") + @Log(title = "获取设备基本信息", type = "查询") + public ResponseReult> getTermBasicInfoHistory(@RequestBody TermFaultsVo vo) { + ServiceBody> serviceBody = terminalService.getTermBasicInfoHistory(vo); + if (serviceBody.getCode() == ServiceStatus.SUCCESS) { + return ResponseReult.success(serviceBody.getData()); + } else { + return ResponseReult.error(serviceBody.getCode(), serviceBody.getMsg()); + } + } + + @ApiOperation(value = "获取设备基本信息Excel", notes = "获取设备基本信息Excel", httpMethod = "POST") + @ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")}) + @GetMapping("/getTermBasicInfoHistoryExcel") + @Log(title = "获取设备基本信息Excel", type = "查询") + public void getTermBasicInfoHistoryExcel(HttpServletResponse response, TermFaultsVo vo) throws IOException { + ServiceBody> serviceBody = terminalService.getTermBasicInfoHistory(vo); + EasyExcelUtil.createExcel(response, "设备基本信息列表", serviceBody.getData().getList(), TerminalBasicInfoHistory.class); + } + } diff --git a/xymanager_admin/src/main/resources/META-INF/spring.factories b/xymanager_admin/src/main/resources/META-INF/spring.factories index 8e7c358..5e2059b 100644 --- a/xymanager_admin/src/main/resources/META-INF/spring.factories +++ b/xymanager_admin/src/main/resources/META-INF/spring.factories @@ -1 +1 @@ -#org.springframework.boot.env.EnvironmentPostProcessor=com.shxy.xymanager_framework.config.MyEnvironmentPostProcessor +org.springframework.boot.env.EnvironmentPostProcessor=com.shxy.xymanager_framework.config.MyEnvironmentPostProcessor diff --git a/xymanager_admin/src/test/java/com/shxy/xymanager_admin/test.java b/xymanager_admin/src/test/java/com/shxy/xymanager_admin/test.java index c3526a1..a834f45 100644 --- a/xymanager_admin/src/test/java/com/shxy/xymanager_admin/test.java +++ b/xymanager_admin/src/test/java/com/shxy/xymanager_admin/test.java @@ -1,14 +1,22 @@ 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.constant.Constants; +import com.shxy.xymanager_common.util.CmaUtil; import com.shxy.xymanager_common.util.MyDateUtils; +import com.shxy.xymanager_common.util.xinyin.ScheduleListUtils; +import com.shxy.xymanager_common.vo.ScheduleRuleVo; +import java.lang.reflect.Array; import java.math.BigInteger; +import java.util.ArrayList; import java.util.Date; +import java.util.List; public class test { - public static void main(String[] args){ + public static void main(String[] args) { // JSONObject jsonObject = XML.toJSONObject("\n" + // "\n" + // "\n" + @@ -34,5 +42,1103 @@ public class test { // BigInteger bigInteger = BigInteger.valueOf(1710432000000l); // long start = MyDateUtils.TimeMillSecond2Second(DateTime.of(bigInteger.longValue())); // System.out.println(start); + + +// String s = " --server=180.166.218.222 --port=40032 --act=schedule --cmdid=12M10010107136660 --channel=1 --group=24 --hour1=6 --min1=1 --preset1=255 --hour2=6 --min2=31 --preset2=255 --hour3=7 --min3=1 --preset3=255 --hour4=7 --min4=31 --preset4=255 --hour5=8 --min5=1 --preset5=255 --hour6=8 --min6=31 --preset6=255 --hour7=9 --min7=1 --preset7=255 --hour8=9 --min8=31 --preset8=255 --hour9=10 --min9=1 --preset9=255 --hour10=10 --min10=31 --preset10=255 --hour11=11 --min11=1 --preset11=255 --hour12=11 --min12=31 --preset12=255 --hour13=12 --min13=1 --preset13=255 --hour14=12 --min14=31 --preset14=255 --hour15=13 --min15=1 --preset15=255 --hour1=13 --min1=31 --preset1=255 --hour17=14 --min17=1 --preset17=255 --hour18=14 --min18=31 --preset18=255 --hour19=15 --min19=1 --preset19=255 --hour20=15 --min20=31 --preset20=255 --hour21=1 --min21=1 --preset21=255 --hour22=1 --min22=31 --preset22=255 --hour23=17 --min23=1 --preset23=255 --hour24=17 --min24=31 --preset24=255 --clientid=7 --reqid=TS"; +// +// +// ArrayList dtoList = new ArrayList<>(); +// ScheduleRuleVo e = new ScheduleRuleVo(); +// e.setHour(0); +// e.setMinute(0); +// e.setPreset(255); +// dtoList.add(e); +// ScheduleRuleVo f = new ScheduleRuleVo(); +// f.setHour(5); +// f.setMinute(30); +// f.setPreset(255); +// ScheduleListUtils.relateTime(dtoList); +// +// +// String cmd = CmaUtil.relateSchelduleRule(timelist, cmdid, requestId, channelid, timestr); + +// String[] arrays = {"12M10010107137070", +// "12M10010107138310", +// "12M10010107138597", +// "12M10010107138598", +// "12M10010107138599", +// "12M10010107138600", +// "12M10010107138601", +// "12M10010107138602", +// "12M10010107138603", +// "12M10010107138604", +// "12M10010107138605", +// "12M10010107138606", +// "12M10010107138607", +// "12M10010107138608", +// "12M10010107138609", +// "12M10010107138610", +// "12M10010107138611", +// "12M10010107138612", +// "12M10010107138613", +// "12M10010107138614", +// "12M10010107138615", +// "12M10010107138616", +// "12M10010107138617", +// "12M10010107138618", +// "12M10010107138619", +// "12M10010107138620", +// "12M10010107138621", +// "12M10010107138622", +// "12M10010107138623", +// "12M10010107138624", +// "12M10010107138625", +// "12M10010107138626", +// "12M10010107138627", +// "12M10010107138628", +// "12M10010107138629", +// "12M10010107138630", +// "12M10010107138631", +// "12M10010107138632", +// "12M10010107138633", +// "12M10010107138634", +// "12M10010107138635", +// "12M10010107138636", +// "12M10010107138637", +// "12M10010107138638", +// "12M10010107138639", +// "12M10010107138640", +// "12M10010107138641", +// "12M10010107138642", +// "12M10010107138643", +// "12M10010107138644", +// "12M10010107138645", +// "12M10010107138646", +// "12M10010107138647", +// "12M10010107138648", +// "12M10010107138649", +// "12M10010107138650", +// "12M10010107138658", +// "12M10010107138659", +// "12M10010107138660", +// "12M10010107138661", +// "12M10010107138724", +// "12M10010107138725", +// "12M10010107138726", +// "12M10010107138727", +// "12M10010107138728", +// "12M10010107138729", +// "12M10010107138730", +// "12M10010107138731", +// "12M10010107138752", +// "12M10010107138753", +// "12M10010107138754", +// "12M10010107139561", +// "12M10010107139658", +// "12M10010107140056", +// "12M10010107140057", +// "12M10010107140058", +// "12M10010107140059", +// "12M10010107140060", +// "12M10010107140061", +// "12M10010107140062", +// "12M10010107140063", +// "12M10010107140064", +// "12M10010107140065", +// "12M10010107140066", +// "12M10010107140067", +// "12M10010107140068", +// "12M10010107140069", +// "12M10010107140070", +// "12M10010107140071", +// "12M10010107140072", +// "12M10010107140073", +// "12M10010107140074", +// "12M10010107140075", +// "12M10010107140076", +// "12M10010107140077", +// "12M10010107140078", +// "12M10010107140079", +// "12M10010107140080", +// "12M10010107140081", +// "12M10010107140082", +// "12M10010107140083", +// "12M10010107140084", +// "12M10010107140596", +// "12M10010107140597", +// "12M10010107140598", +// "12M10010107140599", +// "12M10010107140600", +// "12M10010107140601", +// "12M10010107140602", +// "12M10010107140603", +// "12M10010107140604", +// "12M10010107140605", +// "12M10010107140606", +// "12M10010107140607", +// "12M10010107140608", +// "12M10010107140609", +// "12M10010107140610", +// "12M10010107140611", +// "12M10010107140612", +// "12M10010107140613", +// "12M10010107140614", +// "12M10010107140615", +// "12M10010107140616", +// "12M10010107140617", +// "12M10010107140618", +// "12M10010107140619", +// "12M10010107140620", +// "12M10010107140621", +// "12M10010107140622", +// "12M10010107140623", +// "12M10010107140624", +// "12M10010107140625", +// "12M10010107140626", +// "12M10010107140627", +// "12M10010107140628", +// "12M10010107140629", +// "12M10010107140630", +// "12M10010107140631", +// "12M10010107140632", +// "12M10010107140633", +// "12M10010107140634", +// "12M10010107140635", +// "12M10010107140636", +// "12M10010107140637", +// "12M10010107140638", +// "12M10010107140639", +// "12M10010107140640", +// "12M10010107140641", +// "12M10010107140642", +// "12M10010107140643", +// "12M10010107140644", +// "12M10010107140645", +// "12M10010107140646", +// "12M10010107140647", +// "12M10010107140648", +// "12M10010107140649", +// "12M10010107140650", +// "12M10010107140651", +// "12M10010107140652", +// "12M10010107140653", +// "12M10010107142153", +// "12M10010107144894", +// "12M10010107144524", +// "12M10010107149905", +// "12M10010107149906", +// "12M10010107149907", +// "12M10010107149908", +// "12M10010107149909", +// "12M10010107149910", +// "12M10010107149911", +// "12M10010107149912", +// "12M10010107149913", +// "12M10010107149914", +// "12M10010107149915", +// "12M10010107149916", +// "12M10010107149917", +// "12M10010107149918", +// "12M10010107149919", +// "12M10010107149920", +// "12M10010107149921", +// "12M10010107149922", +// "12M10010107149923", +// "12M10010107149924", +// "12M10010107149925", +// "12M10010107149926", +// "12M10010107149927", +// "12M10010107149928", +// "12M10010107149929", +// "12M10010107149930", +// "12M10010107149931", +// "12M10010107149932", +// "12M10010107149933", +// "12M10010107149934", +// "12M10010107149935", +// "12M10010107149936", +// "12M10010107149937", +// "12M10010107149938", +// "12M10010107149939", +// "12M10010107149940", +// "12M10010107149941", +// "12M10010107149942", +// "12M10010107149943", +// "12M10010107149944", +// "12M10010107149945", +// "12M10010107149946", +// "12M10010107149947", +// "12M10010107149948", +// "12M10010107149949", +// "12M10010107149950", +// "12M10010107149951", +// "12M10010107149952", +// "12M10010107149953", +// "12M10010107149954", +// "12M10010107149955", +// "12M10010107149956", +// "12M10010107149957", +// "12M10010107149958", +// "12M10010107149959", +// "12M10010107149960", +// "12M10010107149961", +// "12M10010107149962", +// "12M10010107149963", +// "12M10010107149964", +// "12M10010107149965", +// "12M10010107149966", +// "12M10010107149967", +// "12M10010107149968", +// "12M10010107149969", +// "12M10010107149970", +// "12M10010107149971", +// "12M10010107149972", +// "12M10010107149973", +// "12M10010107149974", +// "12M10010107149975", +// "12M10010107149976", +// "12M10010107149977", +// "12M10010107149978", +// "12M10010107149979", +// "12M10010107149980", +// "12M10010107149981", +// "12M10010107149982", +// "12M10010107149983", +// "12M10010107149984", +// "12M10010107149985", +// "12M10010107149986", +// "12M10010107149987", +// "12M10010107149988", +// "12M10010107149989", +// "12M10010107149990", +// "12M10010107149991", +// "12M10010107149992", +// "12M10010107149993", +// "12M10010107149994", +// "12M10010107149995", +// "12M10010107149996", +// "12M10010107149997", +// "12M10010107149998", +// "12M10010107149999", +// "12M10010107150000", +// "12M10010107150001", +// "12M10010107150002", +// "12M10010107150003", +// "12M10010107150004", +// "12M10010107150005", +// "12M10010107150006", +// "12M10010107150007", +// "12M10010107150008", +// "12M10010107150009", +// "12M10010107150010", +// "12M10010107150011", +// "12M10010107150012", +// "12M10010107150013", +// "12M10010107150014", +// "12M10010107150015", +// "12M10010107150016", +// "12M10010107150017", +// "12M10010107150018", +// "12M10010107150019", +// "12M10010107150020", +// "12M10010107150021", +// "12M10010107150022", +// "12M10010107150023", +// "12M10010107150024", +// "12M10010107150025", +// "12M10010107150026", +// "12M10010107150027", +// "12M10010107150028", +// "12M10010107150029", +// "12M10010107150030", +// "12M10010107150031", +// "12M10010107150032", +// "12M10010107150033", +// "12M10010107150034", +// "12M10010107150035", +// "12M10010107150036", +// "12M10010107150037", +// "12M10010107150038", +// "12M10010107150039", +// "12M10010107150040", +// "12M10010107150041", +// "12M10010107150042", +// "12M10010107150043", +// "12M10010107150044", +// "12M10010107150045", +// "12M10010107150046", +// "12M10010107150047", +// "12M10010107150048", +// "12M10010107150049", +// "12M10010107150050", +// "12M10010107150051", +// "12M10010107150052", +// "12M10010107150053", +// "12M10010107150054", +// "12M10010107150055", +// "12M10010107150056", +// "12M10010107150057", +// "12M10010107150058"}; + + String[] arrays = {"12M10010107136660", + "12M10010107136661", + "12M10010107136662", + "12M10010107136663", + "12M10010107136664", + "12M10010107136665", + "12M10010107137070", + "12M10010107137071", + "12M10010107137072", + "12M10010107137073", + "12M10010107137074", + "12M10010107137075", + "12M10010107137076", + "12M10010107137077", + "12M10010107137078", + "12M10010107137079", + "12M10010107137080", + "12M10010107137468", + "12M10010107137469", + "12M10010107137470", + "12M10010107137471", + "12M10010107137472", + "12M10010107137473", + "12M10010107137474", + "12M10010107137475", + "12M10010107137476", + "12M10010107137477", + "12M10010107137478", + "12M10010107137479", + "12M10010107137480", + "12M10010107137481", + "12M10010107137482", + "12M10010107137483", + "12M10010107137484", + "12M10010107137485", + "12M10010107137565", + "12M10010107137566", + "12M10010107137567", + "12M10010107137568", + "12M10010107137569", + "12M10010107137570", + "12M10010107137571", + "12M10010107137572", + "12M10010107137573", + "12M10010107137574", + "12M10010107137575", + "12M10010107137576", + "12M10010107137577", + "12M10010107137578", + "12M10010107137579", + "12M10010107137580", + "12M10010107137949", + "12M10010107137950", + "12M10010107137951", + "12M10010107137952", + "12M10010107137953", + "12M10010107137954", + "12M10010107137955", + "12M10010107137956", + "12M10010107137957", + "12M10010107137958", + "12M10010107137959", + "12M10010107137960", + "12M10010107137961", + "12M10010107137962", + "12M10010107137963", + "12M10010107137964", + "12M10010107137965", + "12M10010107137966", + "12M10010107138295", + "12M10010107138296", + "12M10010107138297", + "12M10010107138298", + "12M10010107138299", + "12M10010107138300", + "12M10010107138301", + "12M10010107138302", + "12M10010107138303", + "12M10010107138304", + "12M10010107138305", + "12M10010107138306", + "12M10010107138307", + "12M10010107138308", + "12M10010107138309", + "12M10010107138310", + "12M10010107138311", + "12M10010107138312", + "12M10010107138313", + "12M10010107138314", + "12M10010107138315", + "12M10010107138316", + "12M10010107138317", + "12M10010107138318", + "12M10010107138319", + "12M10010107138320", + "12M10010107138321", + "12M10010107138322", + "12M10010107138323", + "12M10010107138324", + "12M10010107138325", + "12M10010107138326", + "12M10010107138327", + "12M10010107138399", + "12M10010107138400", + "12M10010107138401", + "12M10010107138402", + "12M10010107138403", + "12M10010107138404", + "12M10010107138405", + "12M10010107138406", + "12M10010107138407", + "12M10010107138408", + "12M10010107138409", + "12M10010107138410", + "12M10010107138411", + "12M10010107138412", + "12M10010107138413", + "12M10010107138519", + "12M10010107138520", + "12M10010107138521", + "12M10010107138522", + "12M10010107138523", + "12M10010107138524", + "12M10010107138525", + "12M10010107138526", + "12M10010107138527", + "12M10010107138528", + "12M10010107138529", + "12M10010107138530", + "12M10010107138531", + "12M10010107138732", + "12M10010107138733", + "12M10010107138734", + "12M10010107138735", + "12M10010107138736", + "12M10010107138737", + "12M10010107138738", + "12M10010107138739", + "12M10010107138740", + "12M10010107138741", + "12M10010107138742", + "12M10010107138743", + "12M10010107138744", + "12M10010107138745", + "12M10010107138746", + "12M10010107138747", + "12M10010107138748", + "12M10010107138749", + "12M10010107138750", + "12M10010107138751", + "12M10010107139226", + "12M10010107139227", + "12M10010107139228", + "12M10010107139229", + "12M10010107139230", + "12M10010107139231", + "12M10010107139232", + "12M10010107139233", + "12M10010107139234", + "12M10010107139235", + "12M10010107139318", + "12M10010107139319", + "12M10010107139320", + "12M10010107139321", + "12M10010107139322", + "12M10010107139323", + "12M10010107139324", + "12M10010107139325", + "12M10010107139326", + "12M10010107139327", + "12M10010107139328", + "12M10010107139329", + "12M10010107139330", + "12M10010107139331", + "12M10010107139332", + "12M10010107139333", + "12M10010107139334", + "12M10010107139335", + "12M10010107139336", + "12M10010107139337", + "12M10010107139525", + "12M10010107139526", + "12M10010107139527", + "12M10010107139528", + "12M10010107139529", + "12M10010107139530", + "12M10010107139531", + "12M10010107139532", + "12M10010107139533", + "12M10010107139534", + "12M10010107139535", + "12M10010107139536", + "12M10010107139537", + "12M10010107139538", + "12M10010107139539", + "12M10010107139540", + "12M10010107139541", + "12M10010107139542", + "12M10010107139543", + "12M10010107139544", + "12M10010107139545", + "12M10010107139546", + "12M10010107139547", + "12M10010107139548", + "12M10010107139549", + "12M10010107139550", + "12M10010107139551", + "12M10010107139552", + "12M10010107139553", + "12M10010107139554", + "12M10010107139555", + "12M10010107139556", + "12M10010107139557", + "12M10010107139558", + "12M10010107139559", + "12M10010107139560", + "12M10010107139561", + "12M10010107139562", + "12M10010107139563", + "12M10010107139564", + "12M10010107139565", + "12M10010107139566", + "12M10010107139567", + "12M10010107139568", + "12M10010107139569", + "12M10010107139570", + "12M10010107139571", + "12M10010107139572", + "12M10010107139573", + "12M10010107139574", + "12M10010107139575", + "12M10010107139576", + "12M10010107139577", + "12M10010107139578", + "12M10010107139579", + "12M10010107139580", + "12M10010107139581", + "12M10010107139582", + "12M10010107139583", + "12M10010107139584", + "12M10010107139585", + "12M10010107139586", + "12M10010107139587", + "12M10010107139588", + "12M10010107139589", + "12M10010107139590", + "12M10010107139591", + "12M10010107139592", + "12M10010107139593", + "12M10010107139594", + "12M10010107139595", + "12M10010107139596", + "12M10010107139597", + "12M10010107139598", + "12M10010107139599", + "12M10010107139600", + "12M10010107139601", + "12M10010107139602", + "12M10010107139603", + "12M10010107139604", + "12M10010107139605", + "12M10010107139606", + "12M10010107139607", + "12M10010107139608", + "12M10010107139609", + "12M10010107139610", + "12M10010107139611", + "12M10010107139612", + "12M10010107139613", + "12M10010107139614", + "12M10010107139615", + "12M10010107139616", + "12M10010107139617", + "12M10010107139618", + "12M10010107139619", + "12M10010107139620", + "12M10010107139621", + "12M10010107139622", + "12M10010107139623", + "12M10010107139624", + "12M10010107139625", + "12M10010107139626", + "12M10010107139627", + "12M10010107139628", + "12M10010107139629", + "12M10010107139630", + "12M10010107139631", + "12M10010107139632", + "12M10010107139633", + "12M10010107139634", + "12M10010107139635", + "12M10010107139636", + "12M10010107139637", + "12M10010107139638", + "12M10010107139639", + "12M10010107139640", + "12M10010107139641", + "12M10010107139642", + "12M10010107139643", + "12M10010107139644", + "12M10010107139645", + "12M10010107139646", + "12M10010107139647", + "12M10010107139648", + "12M10010107139649", + "12M10010107139650", + "12M10010107139651", + "12M10010107139652", + "12M10010107139653", + "12M10010107139654", + "12M10010107139655", + "12M10010107139656", + "12M10010107139657", + "12M10010107139658", + "12M10010107139659", + "12M10010107139660", + "12M10010107139661", + "12M10010107139662", + "12M10010107139663", + "12M10010107139664", + "12M10010107139665", + "12M10010107139666", + "12M10010107139667", + "12M10010107139668", + "12M10010107139669", + "12M10010107139670", + "12M10010107139671", + "12M10010107139672", + "12M10010107139673", + "12M10010107139674", + "12M10010107139675", + "12M10010107139676", + "12M10010107139677", + "12M10010107139678", + "12M10010107139679", + "12M10010107139680", + "12M10010107139681", + "12M10010107139682", + "12M10010107139683", + "12M10010107139684", + "12M10010107139685", + "12M10010107139686", + "12M10010107139687", + "12M10010107139725", + "12M10010107139726", + "12M10010107139727", + "12M10010107139728", + "12M10010107139801", + "12M10010107139802", + "12M10010107139803", + "12M10010107139804", + "12M10010107139805", + "12M10010107139806", + "12M10010107139807", + "12M10010107139808", + "12M10010107139809", + "12M10010107139810", + "12M10010107139811", + "12M10010107139812", + "12M10010107139813", + "12M10010107139814", + "12M10010107139815", + "12M10010107139816", + "12M10010107139817", + "12M10010107139818", + "12M10010107139819", + "12M10010107139820", + "12M10010107139821", + "12M10010107139822", + "12M10010107139823", + "12M10010107139824", + "12M10010107139825", + "12M10010107139826", + "12M10010107139827", + "12M10010107139828", + "12M10010107139829", + "12M10010107139830", + "12M10010107139831", + "12M10010107139832", + "12M10010107139833", + "12M10010107139834", + "12M10010107139835", + "12M10010107139836", + "12M10010107139837", + "12M10010107139838", + "12M10010107139839", + "12M10010107139840", + "12M10010107140189", + "12M10010107140190", + "12M10010107140191", + "12M10010107140192", + "12M10010107140193", + "12M10010107140194", + "12M10010107140195", + "12M10010107140196", + "12M10010107140197", + "12M10010107140198", + "12M10010107140199", + "12M10010107140200", + "12M10010107140201", + "12M10010107140202", + "12M10010107140203", + "12M10010107140204", + "12M10010107140205", + "12M10010107140206", + "12M10010107140207", + "12M10010107140208", + "12M10010107140297", + "12M10010107140298", + "12M10010107140299", + "12M10010107140300", + "12M10010107140301", + "12M10010107140302", + "12M10010107140303", + "12M10010107140304", + "12M10010107140305", + "12M10010107140306", + "12M10010107140307", + "12M10010107140308", + "12M10010107140309", + "12M10010107140310", + "12M10010107140311", + "12M10010107140312", + "12M10010107140313", + "12M10010107140314", + "12M10010107140315", + "12M10010107140316", + "12M10010107140317", + "12M10010107140573", + "12M10010107140574", + "12M10010107140575", + "12M10010107140576", + "12M10010107140577", + "12M10010107140578", + "12M10010107140579", + "12M10010107140580", + "12M10010107140581", + "12M10010107140582", + "12M10010107140583", + "12M10010107140584", + "12M10010107140585", + "12M10010107140586", + "12M10010107140587", + "12M10010107140588", + "12M10010107140589", + "12M10010107140590", + "12M10010107140591", + "12M10010107140592", + "12M10010107140593", + "12M10010107140594", + "12M10010107140595", + "12M10010107141245", + "12M10010107141246", + "12M10010107141247", + "12M10010107141248", + "12M10010107141249", + "12M10010107141250", + "12M10010107141251", + "12M10010107141252", + "12M10010107141253", + "12M10010107141254", + "12M10010107141255", + "12M10010107141256", + "12M10010107141257", + "12M10010107141258", + "12M10010107141259", + "12M10010107141260", + "12M10010107141261", + "12M10010107141262", + "12M10010107141263", + "12M10010107141264", + "12M10010107141265", + "12M10010107141266", + "12M10010107141267", + "12M10010107141268", + "12M10010107141269", + "12M10010107141270", + "12M10010107141271", + "12M10010107141272", + "12M10010107141273", + "12M10010107141274", + "12M10010107141275", + "12M10010107141276", + "12M10010107141277", + "12M10010107141278", + "12M10010107141279", + "12M10010107141280", + "12M10010107141281", + "12M10010107141282", + "12M10010107141283", + "12M10010107141284", + "12M10010107141285", + "12M10010107141637", + "12M10010107141638", + "12M10010107141639", + "12M10010107141640", + "12M10010107141641", + "12M10010107141642", + "12M10010107141643", + "12M10010107141644", + "12M10010107141645", + "12M10010107141646", + "12M10010107141647", + "12M10010107141648", + "12M10010107141649", + "12M10010107141650", + "12M10010107141651", + "12M10010107141652", + "12M10010107141653", + "12M10010107141654", + "12M10010107141655", + "12M10010107141656", + "12M10010107141657", + "12M10010107141658", + "12M10010107141659", + "12M10010107141660", + "12M10010107141661", + "12M10010107141662", + "12M10010107141663", + "12M10010107142118", + "12M10010107142119", + "12M10010107142120", + "12M10010107142121", + "12M10010107142122", + "12M10010107142123", + "12M10010107142124", + "12M10010107142125", + "12M10010107142126", + "12M10010107142127", + "12M10010107142128", + "12M10010107142129", + "12M10010107142130", + "12M10010107142131", + "12M10010107142132", + "12M10010107142133", + "12M10010107142134", + "12M10010107142135", + "12M10010107142136", + "12M10010107142137", + "12M10010107142138", + "12M10010107142139", + "12M10010107142140", + "12M10010107142141", + "12M10010107142142", + "12M10010107142143", + "12M10010107142144", + "12M10010107142145", + "12M10010107142146", + "12M10010107142147", + "12M10010107142148", + "12M10010107142149", + "12M10010107142150", + "12M10010107142151", + "12M10010107142152", + "12M10010107142153", + "12M10010107142154", + "12M10010107142155", + "12M10010107142156", + "12M10010107142157", + "12M10010107142158", + "12M10010107142159", + "12M10010107142160", + "12M10010107142161", + "12M10010107142162", + "12M10010107142163", + "12M10010107142164", + "12M10010107142165", + "12M10010107142166", + "12M10010107142167", + "12M10010107142168", + "12M10010107142169", + "12M10010107142170", + "12M10010107142171", + "12M10010107142172", + "12M10010107142576", + "12M10010107142577", + "12M10010107142578", + "12M10010107142579", + "12M10010107142580", + "12M10010107143509", + "12M10010107143510", + "12M10010107143511", + "12M10010107143512", + "12M10010107143513", + "12M10010107143514", + "12M10010107143515", + "12M10010107143516", + "12M10010107143517", + "12M10010107143518", + "12M10010107143519", + "12M10010107143520", + "12M10010107143521", + "12M10010107143522", + "12M10010107143523", + "12M10010107143524", + "12M10010107143525", + "12M10010107144862", + "12M10010107144863", + "12M10010107144864", + "12M10010107144865", + "12M10010107144866", + "12M10010107144867", + "12M10010107144868", + "12M10010107144869", + "12M10010107144870", + "12M10010107144871", + "12M10010107144872", + "12M10010107144873", + "12M10010107144874", + "12M10010107144875", + "12M10010107144876", + "12M10010107144877", + "12M10010107144878", + "12M10010107144879", + "12M10010107144880", + "12M10010107144881", + "12M10010107144882", + "12M10010107144883", + "12M10010107144884", + "12M10010107144885", + "12M10010107144886", + "12M10010107144887", + "12M10010107144888", + "12M10010107144889", + "12M10010107144890", + "12M10010107144891", + "12M10010107144892", + "12M10010107144893", + "12M10010107144894", + "12M10010107144895", + "12M10010107144896", + "12M10010107144897", + "12M10010107144898", + "12M10010107144899", + "12M10010107144900", + "12M10010107144901", + "12M10010107144902", + "12M10010107144903", + "12M10010107144904", + "12M10010107144905", + "12M10010107144906", + "12M10010107144907", + "12M10010107144908", + "12M10010107144512", + "12M10010107144513", + "12M10010107144514", + "12M10010107144515", + "12M10010107144516", + "12M10010107144517", + "12M10010107144518", + "12M10010107144519", + "12M10010107144520", + "12M10010107144521", + "12M10010107144522", + "12M10010107144523", + "12M10010107144524", + "12M10010107144525", + "12M10010107144526", + "12M10010107144527", + "12M10010107144528", + "12M10010107144529", + "12M10010107144530", + "12M10010107144531", + "12M10010107144532", + "12M10010107144533", + "12M10010107144534", + "12M10010107144535", + "12M10010107139560", + "12M10010107161183", + "12M10010107161184", + "12M10010107161185", + "12M10010107161186", + "12M10010107161187", + "12M10010107161188", + "12M10010107161189", + "12M10010107161190", + "12M10010107161191", + "12M10010107161192", + "12M10010107161193", + "12M10010107161194", + "12M10010107161195", + "12M10010107161196", + "12M10010107161197", + "12M10010107161198", + "12M10010107161199", + "12M10010107161200", + "12M10010107161201", + "12M10010107161202", + "12M10010107161203", + "12M10010107161204", + "12M10010107161205", + "12M10010107161206", + "12M10010107161207", + "12M10010107161208", + "12M10010107161209", + "12M10010107161210", + "12M10010107161211", + "12M10010107161212", + "12M10010107161213"}; + + Date start = MyDateUtils.dateTime("HH:mm", "00:10"); + Date end = MyDateUtils.dateTime("HH:mm", "05:40"); + Date start1 = MyDateUtils.dateTime("HH:mm", "18:10"); + Date end1 = MyDateUtils.dateTime("HH:mm", "23:40"); + Date st3 = MyDateUtils.dateTime("HH:mm", "06:10"); + Date end3 = MyDateUtils.dateTime("HH:mm", "17:40"); + Date a =null; + Date b=null; + Date c=null; + Date d=null; + Date e=null; + Date f=null; + ArrayList list = new ArrayList<>(); + int j = 0; + for (int i = 0; i < arrays.length; i++) { + List dateTimes = new ArrayList<>(); + List dateTimes3 = new ArrayList<>(); + ArrayList resultList = new ArrayList<>(); + dateTimes.add(new DateTime()); + dateTimes3.add(new DateTime()); + if (i%33 == 0) { + a = MyDateUtils.offset(start, DateField.MINUTE, j); + b = MyDateUtils.offset(end, DateField.MINUTE, j); + c = MyDateUtils.offset(start1, DateField.MINUTE, j); + d = MyDateUtils.offset(end1, DateField.MINUTE, j); + e = MyDateUtils.offset(st3, DateField.MINUTE, j); + f = MyDateUtils.offset(end3, DateField.MINUTE, j); + j++; + } + List dateTimes1 = MyDateUtils.rangeToList(a, b, DateField.MINUTE, 30); + List dateTime2 = MyDateUtils.rangeToList(c, d, DateField.MINUTE, 30); + List dateTime = MyDateUtils.rangeToList(e, f, DateField.MINUTE, 30); + dateTimes.addAll(dateTimes1); + dateTimes.addAll(dateTime2); + dateTimes3.addAll(dateTime); + StringBuffer timestr = new StringBuffer(); + StringBuffer timestr2 = new StringBuffer(); + String st = ""; + for (int index = 1; index < dateTimes.size(); index++) { + DateTime date = dateTimes.get(index); + st = " --hour" + index + "=" + date.getHours() + " --min" + index + "=" + date.getMinutes() + " --preset" + index + "=" + 255; + timestr.append(st); + } + + for (int index = 1; index < dateTimes3.size(); index++) { + DateTime date = dateTimes3.get(index); + st = " --hour" + index + "=" + date.getHours() + " --min" + index + "=" + date.getMinutes() + " --preset" + index + "=" + 255; + timestr2.append(st); + } + String s1 = "/usr/local/bin/xympadmn --server=180.166.218.222 --port=40032" + " --act=schedule --cmdid=" + arrays[i] + " --channel=1 --group=" + (dateTimes3.size() - 1) + timestr2.toString() + " --clientid=7 --reqid=TS;\n"; + String s2 = "/usr/local/bin/xympadmn --server=180.166.218.222 --port=40032" + " --act=schedule --cmdid=" + arrays[i] + " --channel=3 --group=" + (dateTimes3.size() - 1) + timestr2.toString() + " --clientid=7 --reqid=TS;\n"; + String s3 = "/usr/local/bin/xympadmn --server=180.166.218.222 --port=40032" + " --act=schedule --cmdid=" + arrays[i] + " --channel=2 --group=" + (dateTimes.size() - 1) + timestr.toString() + " --clientid=7 --reqid=TS;\n"; + String s4 = "/usr/local/bin/xympadmn --server=180.166.218.222 --port=40032" + " --act=schedule --cmdid=" + arrays[i] + " --channel=4 --group=" + (dateTimes.size() - 1) + timestr.toString() + " --clientid=7 --reqid=TS;\n"; + list.add(s1); + list.add(s2); + list.add(s3); + list.add(s4); + } + System.out.println(list); + } } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistory.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistory.java new file mode 100644 index 0000000..c210b85 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistory.java @@ -0,0 +1,49 @@ +package com.shxy.xymanager_common.entity; + +import cn.hutool.core.date.DateTime; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.shxy.xymanager_common.util.MyDateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; + +@Data +@ApiModel(value = "设备基本信息的历史", description = "设备基本信息的历史") +public class TerminalBasicInfoHistory implements Serializable { + + @ColumnWidth(20) + @ExcelProperty("设备编号") + @ApiModelProperty(value = "图像监测装置 ID", example = "123456") + private String cmdid; + @ExcelIgnore + private Integer termId; + + @ColumnWidth(20) + @ExcelProperty("版本号") + @ApiModelProperty(value = "版本号", example = "123456") + private String version; + + @ColumnWidth(20) + @ExcelProperty("出厂编号") + @ApiModelProperty(value = "出厂编号", example = "123456") + private String bsId; + @ExcelIgnore + private BigInteger updateTime; + + @ColumnWidth(20) + @ExcelProperty("更新时间") + private String updateTimeStr; + public String getUpdateTimeStr() { + long time = MyDateUtils.TimeSecond2MillSecond(updateTime.longValue()); + DateTime date = MyDateUtils.date(time); + return date.toString(); + } + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistoryExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistoryExample.java new file mode 100644 index 0000000..1f4bcdf --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalBasicInfoHistoryExample.java @@ -0,0 +1,530 @@ +package com.shxy.xymanager_common.entity; + +import java.util.ArrayList; +import java.util.List; + +public class TerminalBasicInfoHistoryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TerminalBasicInfoHistoryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTermIdIsNull() { + addCriterion("term_id is null"); + return (Criteria) this; + } + + public Criteria andTermIdIsNotNull() { + addCriterion("term_id is not null"); + return (Criteria) this; + } + + public Criteria andTermIdEqualTo(Integer value) { + addCriterion("term_id =", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotEqualTo(Integer value) { + addCriterion("term_id <>", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThan(Integer value) { + addCriterion("term_id >", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThanOrEqualTo(Integer value) { + addCriterion("term_id >=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThan(Integer value) { + addCriterion("term_id <", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThanOrEqualTo(Integer value) { + addCriterion("term_id <=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdIn(List values) { + addCriterion("term_id in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotIn(List values) { + addCriterion("term_id not in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdBetween(Integer value1, Integer value2) { + addCriterion("term_id between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotBetween(Integer value1, Integer value2) { + addCriterion("term_id not between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andCmdidIsNull() { + addCriterion("cmdid is null"); + return (Criteria) this; + } + + public Criteria andCmdidIsNotNull() { + addCriterion("cmdid is not null"); + return (Criteria) this; + } + + public Criteria andCmdidEqualTo(String value) { + addCriterion("cmdid =", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidNotEqualTo(String value) { + addCriterion("cmdid <>", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidGreaterThan(String value) { + addCriterion("cmdid >", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidGreaterThanOrEqualTo(String value) { + addCriterion("cmdid >=", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidLessThan(String value) { + addCriterion("cmdid <", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidLessThanOrEqualTo(String value) { + addCriterion("cmdid <=", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidLike(String value) { + addCriterion("cmdid like", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidNotLike(String value) { + addCriterion("cmdid not like", value, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidIn(List values) { + addCriterion("cmdid in", values, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidNotIn(List values) { + addCriterion("cmdid not in", values, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidBetween(String value1, String value2) { + addCriterion("cmdid between", value1, value2, "cmdid"); + return (Criteria) this; + } + + public Criteria andCmdidNotBetween(String value1, String value2) { + addCriterion("cmdid not between", value1, value2, "cmdid"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(String value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(String value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(String value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(String value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(String value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(String value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLike(String value) { + addCriterion("version like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotLike(String value) { + addCriterion("version not like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(String value1, String value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(String value1, String value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andBsIdIsNull() { + addCriterion("bs_id is null"); + return (Criteria) this; + } + + public Criteria andBsIdIsNotNull() { + addCriterion("bs_id is not null"); + return (Criteria) this; + } + + public Criteria andBsIdEqualTo(String value) { + addCriterion("bs_id =", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdNotEqualTo(String value) { + addCriterion("bs_id <>", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdGreaterThan(String value) { + addCriterion("bs_id >", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdGreaterThanOrEqualTo(String value) { + addCriterion("bs_id >=", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdLessThan(String value) { + addCriterion("bs_id <", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdLessThanOrEqualTo(String value) { + addCriterion("bs_id <=", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdLike(String value) { + addCriterion("bs_id like", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdNotLike(String value) { + addCriterion("bs_id not like", value, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdIn(List values) { + addCriterion("bs_id in", values, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdNotIn(List values) { + addCriterion("bs_id not in", values, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdBetween(String value1, String value2) { + addCriterion("bs_id between", value1, value2, "bsId"); + return (Criteria) this; + } + + public Criteria andBsIdNotBetween(String value1, String value2) { + addCriterion("bs_id not between", value1, value2, "bsId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistory.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistory.java new file mode 100644 index 0000000..c0a56fd --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistory.java @@ -0,0 +1,67 @@ +package com.shxy.xymanager_common.entity; + +import cn.hutool.core.date.DateTime; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.shxy.xymanager_common.util.MyDateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; + +@Data +@ApiModel(value = "设备GPS的历史", description = "设备GPS的历史") +public class TerminalPositionHistory implements Serializable { + @ColumnWidth(20) + @ExcelProperty("设备编号") + @ApiModelProperty(value = "图像监测装置 ID", example = "123456") + private String cmdid; + + @ExcelIgnore + @ApiModelProperty(value = "编号", example = "123456") + private BigInteger id; + + @ExcelIgnore + @ApiModelProperty(value = "装置编号", example = "123456") + private Integer termId; + + @ExcelIgnore + @ApiModelProperty(value = "类型", example = "123456") + private Integer coordinateType; + + @ColumnWidth(20) + @ExcelProperty("半径") + @ApiModelProperty(value = "半径", example = "123456") + private Integer radius; + + @ColumnWidth(20) + @ExcelProperty("纬度") + @ApiModelProperty(value = "纬度", example = "123456") + private Double latitude; + + @ColumnWidth(20) + @ExcelProperty("经度") + @ApiModelProperty(value = "经度", example = "123456") + private Double longitude; + + @ExcelIgnore + @ApiModelProperty(value = "修改时间", example = "123456") + private BigInteger updateTime; + + @ColumnWidth(20) + @ExcelProperty("更新时间") + private BigInteger updateTimeStr; + + public String getUpdateTimeStr() { + long time = MyDateUtils.TimeSecond2MillSecond(updateTime.longValue()); + DateTime date = MyDateUtils.date(time); + return date.toString(); + } + + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistoryExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistoryExample.java new file mode 100644 index 0000000..120decb --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalPositionHistoryExample.java @@ -0,0 +1,620 @@ +package com.shxy.xymanager_common.entity; + +import java.util.ArrayList; +import java.util.List; + +public class TerminalPositionHistoryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TerminalPositionHistoryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTermIdIsNull() { + addCriterion("term_id is null"); + return (Criteria) this; + } + + public Criteria andTermIdIsNotNull() { + addCriterion("term_id is not null"); + return (Criteria) this; + } + + public Criteria andTermIdEqualTo(Integer value) { + addCriterion("term_id =", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotEqualTo(Integer value) { + addCriterion("term_id <>", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThan(Integer value) { + addCriterion("term_id >", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThanOrEqualTo(Integer value) { + addCriterion("term_id >=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThan(Integer value) { + addCriterion("term_id <", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThanOrEqualTo(Integer value) { + addCriterion("term_id <=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdIn(List values) { + addCriterion("term_id in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotIn(List values) { + addCriterion("term_id not in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdBetween(Integer value1, Integer value2) { + addCriterion("term_id between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotBetween(Integer value1, Integer value2) { + addCriterion("term_id not between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeIsNull() { + addCriterion("coordinate_type is null"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeIsNotNull() { + addCriterion("coordinate_type is not null"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeEqualTo(Byte value) { + addCriterion("coordinate_type =", value, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeNotEqualTo(Byte value) { + addCriterion("coordinate_type <>", value, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeGreaterThan(Byte value) { + addCriterion("coordinate_type >", value, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("coordinate_type >=", value, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeLessThan(Byte value) { + addCriterion("coordinate_type <", value, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeLessThanOrEqualTo(Byte value) { + addCriterion("coordinate_type <=", value, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeIn(List values) { + addCriterion("coordinate_type in", values, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeNotIn(List values) { + addCriterion("coordinate_type not in", values, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeBetween(Byte value1, Byte value2) { + addCriterion("coordinate_type between", value1, value2, "coordinateType"); + return (Criteria) this; + } + + public Criteria andCoordinateTypeNotBetween(Byte value1, Byte value2) { + addCriterion("coordinate_type not between", value1, value2, "coordinateType"); + return (Criteria) this; + } + + public Criteria andRadiusIsNull() { + addCriterion("radius is null"); + return (Criteria) this; + } + + public Criteria andRadiusIsNotNull() { + addCriterion("radius is not null"); + return (Criteria) this; + } + + public Criteria andRadiusEqualTo(Short value) { + addCriterion("radius =", value, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusNotEqualTo(Short value) { + addCriterion("radius <>", value, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusGreaterThan(Short value) { + addCriterion("radius >", value, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusGreaterThanOrEqualTo(Short value) { + addCriterion("radius >=", value, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusLessThan(Short value) { + addCriterion("radius <", value, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusLessThanOrEqualTo(Short value) { + addCriterion("radius <=", value, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusIn(List values) { + addCriterion("radius in", values, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusNotIn(List values) { + addCriterion("radius not in", values, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusBetween(Short value1, Short value2) { + addCriterion("radius between", value1, value2, "radius"); + return (Criteria) this; + } + + public Criteria andRadiusNotBetween(Short value1, Short value2) { + addCriterion("radius not between", value1, value2, "radius"); + return (Criteria) this; + } + + public Criteria andLatitudeIsNull() { + addCriterion("latitude is null"); + return (Criteria) this; + } + + public Criteria andLatitudeIsNotNull() { + addCriterion("latitude is not null"); + return (Criteria) this; + } + + public Criteria andLatitudeEqualTo(Double value) { + addCriterion("latitude =", value, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeNotEqualTo(Double value) { + addCriterion("latitude <>", value, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeGreaterThan(Double value) { + addCriterion("latitude >", value, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeGreaterThanOrEqualTo(Double value) { + addCriterion("latitude >=", value, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeLessThan(Double value) { + addCriterion("latitude <", value, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeLessThanOrEqualTo(Double value) { + addCriterion("latitude <=", value, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeIn(List values) { + addCriterion("latitude in", values, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeNotIn(List values) { + addCriterion("latitude not in", values, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeBetween(Double value1, Double value2) { + addCriterion("latitude between", value1, value2, "latitude"); + return (Criteria) this; + } + + public Criteria andLatitudeNotBetween(Double value1, Double value2) { + addCriterion("latitude not between", value1, value2, "latitude"); + return (Criteria) this; + } + + public Criteria andLongitudeIsNull() { + addCriterion("longitude is null"); + return (Criteria) this; + } + + public Criteria andLongitudeIsNotNull() { + addCriterion("longitude is not null"); + return (Criteria) this; + } + + public Criteria andLongitudeEqualTo(Double value) { + addCriterion("longitude =", value, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeNotEqualTo(Double value) { + addCriterion("longitude <>", value, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeGreaterThan(Double value) { + addCriterion("longitude >", value, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeGreaterThanOrEqualTo(Double value) { + addCriterion("longitude >=", value, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeLessThan(Double value) { + addCriterion("longitude <", value, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeLessThanOrEqualTo(Double value) { + addCriterion("longitude <=", value, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeIn(List values) { + addCriterion("longitude in", values, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeNotIn(List values) { + addCriterion("longitude not in", values, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeBetween(Double value1, Double value2) { + addCriterion("longitude between", value1, value2, "longitude"); + return (Criteria) this; + } + + public Criteria andLongitudeNotBetween(Double value1, Double value2) { + addCriterion("longitude not between", value1, value2, "longitude"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistory.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistory.java new file mode 100644 index 0000000..61d1a84 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistory.java @@ -0,0 +1,78 @@ +package com.shxy.xymanager_common.entity; + +import cn.hutool.core.date.DateTime; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.shxy.xymanager_common.util.MyDateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigInteger; + +@Data +@ApiModel(value = "设备运行状态的历史", description = "设备运行状态的信息") +public class TerminalRunningStatusHistory implements Serializable { + + @ColumnWidth(20) + @ExcelProperty("设备编号") + @ApiModelProperty(value = "图像监测装置 ID", example = "123456") + private String cmdid; + + @ExcelIgnore + @ApiModelProperty(value = "装置编号", example = "123456") + private Integer termId; + + @ColumnWidth(20) + @ExcelProperty("4G信号强度") + @ApiModelProperty(value = "4G信号强度", example = "123456") + private Integer signalStrength4g; + + @ColumnWidth(20) + @ExcelProperty("2G信号强度") + @ApiModelProperty(value = "2G信号强度", example = "123456") + private Integer signalStrength2g; + + @ColumnWidth(20) + @ExcelProperty("剩余运行内存") + @ApiModelProperty(value = "剩余运行内存", example = "123456") + private Integer remainingRam; + + @ColumnWidth(20) + @ExcelProperty("剩余存储内存") + @ApiModelProperty(value = "剩余存储内存", example = "123456") + private Integer remainingRom; + + @ExcelIgnore + @ApiModelProperty(value = "装置上次启动时间", example = "123456") + private BigInteger bootTime; + + @ColumnWidth(20) + @ExcelProperty("装置上次启动时间") + private String bootTimeStr; + + public String getBootTimeStr() { + long time = MyDateUtils.TimeSecond2MillSecond(bootTime.longValue()); + DateTime date = MyDateUtils.date(time); + return date.toString(); + } + + @ExcelIgnore + @ApiModelProperty(value = "运行状态更新时间", example = "123456") + private BigInteger rsUpdateTime; + + @ColumnWidth(20) + @ExcelProperty("运行状态更新时间") + private String rsUpdateTimeStr; + + public String getRsUpdateTimeStr() { + long time = MyDateUtils.TimeSecond2MillSecond(rsUpdateTime.longValue()); + DateTime date = MyDateUtils.date(time); + return date.toString(); + } + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistoryExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistoryExample.java new file mode 100644 index 0000000..dd8468d --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalRunningStatusHistoryExample.java @@ -0,0 +1,620 @@ +package com.shxy.xymanager_common.entity; + +import java.util.ArrayList; +import java.util.List; + +public class TerminalRunningStatusHistoryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TerminalRunningStatusHistoryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTermIdIsNull() { + addCriterion("term_id is null"); + return (Criteria) this; + } + + public Criteria andTermIdIsNotNull() { + addCriterion("term_id is not null"); + return (Criteria) this; + } + + public Criteria andTermIdEqualTo(Integer value) { + addCriterion("term_id =", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotEqualTo(Integer value) { + addCriterion("term_id <>", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThan(Integer value) { + addCriterion("term_id >", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThanOrEqualTo(Integer value) { + addCriterion("term_id >=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThan(Integer value) { + addCriterion("term_id <", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThanOrEqualTo(Integer value) { + addCriterion("term_id <=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdIn(List values) { + addCriterion("term_id in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotIn(List values) { + addCriterion("term_id not in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdBetween(Integer value1, Integer value2) { + addCriterion("term_id between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotBetween(Integer value1, Integer value2) { + addCriterion("term_id not between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gIsNull() { + addCriterion("signal_strength_4g is null"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gIsNotNull() { + addCriterion("signal_strength_4g is not null"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gEqualTo(Byte value) { + addCriterion("signal_strength_4g =", value, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gNotEqualTo(Byte value) { + addCriterion("signal_strength_4g <>", value, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gGreaterThan(Byte value) { + addCriterion("signal_strength_4g >", value, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gGreaterThanOrEqualTo(Byte value) { + addCriterion("signal_strength_4g >=", value, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gLessThan(Byte value) { + addCriterion("signal_strength_4g <", value, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gLessThanOrEqualTo(Byte value) { + addCriterion("signal_strength_4g <=", value, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gIn(List values) { + addCriterion("signal_strength_4g in", values, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gNotIn(List values) { + addCriterion("signal_strength_4g not in", values, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gBetween(Byte value1, Byte value2) { + addCriterion("signal_strength_4g between", value1, value2, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength4gNotBetween(Byte value1, Byte value2) { + addCriterion("signal_strength_4g not between", value1, value2, "signalStrength4g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gIsNull() { + addCriterion("signal_strength_2g is null"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gIsNotNull() { + addCriterion("signal_strength_2g is not null"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gEqualTo(Byte value) { + addCriterion("signal_strength_2g =", value, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gNotEqualTo(Byte value) { + addCriterion("signal_strength_2g <>", value, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gGreaterThan(Byte value) { + addCriterion("signal_strength_2g >", value, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gGreaterThanOrEqualTo(Byte value) { + addCriterion("signal_strength_2g >=", value, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gLessThan(Byte value) { + addCriterion("signal_strength_2g <", value, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gLessThanOrEqualTo(Byte value) { + addCriterion("signal_strength_2g <=", value, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gIn(List values) { + addCriterion("signal_strength_2g in", values, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gNotIn(List values) { + addCriterion("signal_strength_2g not in", values, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gBetween(Byte value1, Byte value2) { + addCriterion("signal_strength_2g between", value1, value2, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andSignalStrength2gNotBetween(Byte value1, Byte value2) { + addCriterion("signal_strength_2g not between", value1, value2, "signalStrength2g"); + return (Criteria) this; + } + + public Criteria andRemainingRamIsNull() { + addCriterion("remaining_ram is null"); + return (Criteria) this; + } + + public Criteria andRemainingRamIsNotNull() { + addCriterion("remaining_ram is not null"); + return (Criteria) this; + } + + public Criteria andRemainingRamEqualTo(Short value) { + addCriterion("remaining_ram =", value, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamNotEqualTo(Short value) { + addCriterion("remaining_ram <>", value, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamGreaterThan(Short value) { + addCriterion("remaining_ram >", value, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamGreaterThanOrEqualTo(Short value) { + addCriterion("remaining_ram >=", value, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamLessThan(Short value) { + addCriterion("remaining_ram <", value, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamLessThanOrEqualTo(Short value) { + addCriterion("remaining_ram <=", value, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamIn(List values) { + addCriterion("remaining_ram in", values, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamNotIn(List values) { + addCriterion("remaining_ram not in", values, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamBetween(Short value1, Short value2) { + addCriterion("remaining_ram between", value1, value2, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRamNotBetween(Short value1, Short value2) { + addCriterion("remaining_ram not between", value1, value2, "remainingRam"); + return (Criteria) this; + } + + public Criteria andRemainingRomIsNull() { + addCriterion("remaining_rom is null"); + return (Criteria) this; + } + + public Criteria andRemainingRomIsNotNull() { + addCriterion("remaining_rom is not null"); + return (Criteria) this; + } + + public Criteria andRemainingRomEqualTo(Short value) { + addCriterion("remaining_rom =", value, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomNotEqualTo(Short value) { + addCriterion("remaining_rom <>", value, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomGreaterThan(Short value) { + addCriterion("remaining_rom >", value, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomGreaterThanOrEqualTo(Short value) { + addCriterion("remaining_rom >=", value, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomLessThan(Short value) { + addCriterion("remaining_rom <", value, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomLessThanOrEqualTo(Short value) { + addCriterion("remaining_rom <=", value, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomIn(List values) { + addCriterion("remaining_rom in", values, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomNotIn(List values) { + addCriterion("remaining_rom not in", values, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomBetween(Short value1, Short value2) { + addCriterion("remaining_rom between", value1, value2, "remainingRom"); + return (Criteria) this; + } + + public Criteria andRemainingRomNotBetween(Short value1, Short value2) { + addCriterion("remaining_rom not between", value1, value2, "remainingRom"); + return (Criteria) this; + } + + public Criteria andBootTimeIsNull() { + addCriterion("boot_time is null"); + return (Criteria) this; + } + + public Criteria andBootTimeIsNotNull() { + addCriterion("boot_time is not null"); + return (Criteria) this; + } + + public Criteria andBootTimeEqualTo(Long value) { + addCriterion("boot_time =", value, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeNotEqualTo(Long value) { + addCriterion("boot_time <>", value, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeGreaterThan(Long value) { + addCriterion("boot_time >", value, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeGreaterThanOrEqualTo(Long value) { + addCriterion("boot_time >=", value, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeLessThan(Long value) { + addCriterion("boot_time <", value, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeLessThanOrEqualTo(Long value) { + addCriterion("boot_time <=", value, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeIn(List values) { + addCriterion("boot_time in", values, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeNotIn(List values) { + addCriterion("boot_time not in", values, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeBetween(Long value1, Long value2) { + addCriterion("boot_time between", value1, value2, "bootTime"); + return (Criteria) this; + } + + public Criteria andBootTimeNotBetween(Long value1, Long value2) { + addCriterion("boot_time not between", value1, value2, "bootTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeIsNull() { + addCriterion("rs_update_time is null"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeIsNotNull() { + addCriterion("rs_update_time is not null"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeEqualTo(Long value) { + addCriterion("rs_update_time =", value, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeNotEqualTo(Long value) { + addCriterion("rs_update_time <>", value, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeGreaterThan(Long value) { + addCriterion("rs_update_time >", value, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("rs_update_time >=", value, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeLessThan(Long value) { + addCriterion("rs_update_time <", value, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("rs_update_time <=", value, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeIn(List values) { + addCriterion("rs_update_time in", values, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeNotIn(List values) { + addCriterion("rs_update_time not in", values, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeBetween(Long value1, Long value2) { + addCriterion("rs_update_time between", value1, value2, "rsUpdateTime"); + return (Criteria) this; + } + + public Criteria andRsUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("rs_update_time not between", value1, value2, "rsUpdateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistory.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistory.java new file mode 100644 index 0000000..c3be45a --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistory.java @@ -0,0 +1,140 @@ +package com.shxy.xymanager_common.entity; + +import cn.hutool.core.date.DateTime; +import cn.hutool.core.util.NumberUtil; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.shxy.xymanager_common.enums.CommonStatus; +import com.shxy.xymanager_common.util.MyDateUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.BigInteger; + +@Data +@ApiModel(value = "设备状态的信息历史", description = "设备状态的信息") +public class TerminalWorkingStatusHistory implements Serializable { + @ExcelIgnore + @ApiModelProperty(value = "装置编号", example = "123456") + private Integer termId; + + @ColumnWidth(20) + @ExcelProperty("电池电压") + @ApiModelProperty(value = "电池电压", example = "123456") + private Double batteryVoltage; + + @ColumnWidth(20) + @ExcelProperty("工作温度") + @ApiModelProperty(value = "工作温度", example = "123456") + private Double opTemperature; + + @ExcelIgnore + @ApiModelProperty(value = "电池电量", example = "123456") + private Double batteryCapacity; + + @ColumnWidth(20) + @ExcelProperty("电池电量") + @ApiModelProperty(value = "电池电量", example = "123456") + private String batteryCapacityStr; + + @ColumnWidth(20) + @ExcelProperty("浮充状态") + @ApiModelProperty(value = "浮充状态:充电 放电", example = "12345678") + private String floatingChargeStr; + + public String getFloatingChargeStr() { + boolean equals = CommonStatus.DELETE.value().equals(floatingCharge); + if (equals) { + return "充电"; + } else { + return "放电"; + } + } + + @ExcelIgnore + @ApiModelProperty(value = "浮充状态:充电 放电", example = "12345678") + private BigInteger floatingCharge; + + @ColumnWidth(20) + @ExcelProperty("工作总时间(小时)") + @ApiModelProperty(value = "工作总时间(小时)", example = "名称名称") + private BigInteger totalWorkingTime; + + @ColumnWidth(20) + @ExcelProperty("本次连续工作时间(小时)") + @ApiModelProperty(value = "本次连续工作时间(小时)", example = "12345678") + private BigInteger workingTime; + + @ColumnWidth(20) + @ExcelProperty("网络连接状态") + @ApiModelProperty(value = "网络连接状态 ", example = "名称名称") + private String connectionStr; + + public String getConnectionStr() { + boolean equals = CommonStatus.DELETE.value().equals(connectionState); + if (equals) { + return "正常"; + } else { + return "断开"; + } + } + @ExcelIgnore + @ApiModelProperty(value = "网络连接状态 ", example = "名称名称") + private Integer connectionState; + + @ExcelIgnore + @ApiModelProperty(value = "当月发送流量", example = "123456") + private BigInteger sendFlow; + + @ColumnWidth(20) + @ExcelProperty("当月发送流量(M)") + @ApiModelProperty(value = "当月发送流量", example = "123456") + private String sendFlowStr; + + public String getSendFlowStr() { + BigDecimal div = NumberUtil.div(sendFlow, 1024,2); + return div.toString(); + } + @ExcelIgnore + @ApiModelProperty(value = "当月接收流量", example = "123456") + private BigInteger recvFlow; + + @ColumnWidth(20) + @ExcelProperty("当月接收流量(M)") + @ApiModelProperty(value = "当月接收流量", example = "123456") + private String recvFlowStr; + + public String getRecvFlowStr() { + BigDecimal div = NumberUtil.div(recvFlow, 1024,2); + return div.toString(); + } + + @ExcelIgnore + @ApiModelProperty(value = "通信协议版本", example = "123456") + private String protocolVersion; + + @ColumnWidth(20) + @ExcelProperty("工作状态更新时间") + @ApiModelProperty(value = "工作状态更新时间", example = "123456") + private String wsUpdateTimeStr; + + public String getWsUpdateTimeStr() { + long time = MyDateUtils.TimeSecond2MillSecond(wsUpdateTime.longValue()); + DateTime date = MyDateUtils.date(time); + return date.toString(); + } + @ExcelIgnore + public BigInteger wsUpdateTime; + + @ColumnWidth(20) + @ExcelProperty("设备编号") + @ApiModelProperty(value = "图像监测装置 ID", example = "123456") + private String cmdid; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistoryExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistoryExample.java new file mode 100644 index 0000000..793d4a0 --- /dev/null +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TerminalWorkingStatusHistoryExample.java @@ -0,0 +1,930 @@ +package com.shxy.xymanager_common.entity; + +import java.util.ArrayList; +import java.util.List; + +public class TerminalWorkingStatusHistoryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TerminalWorkingStatusHistoryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTermIdIsNull() { + addCriterion("term_id is null"); + return (Criteria) this; + } + + public Criteria andTermIdIsNotNull() { + addCriterion("term_id is not null"); + return (Criteria) this; + } + + public Criteria andTermIdEqualTo(Integer value) { + addCriterion("term_id =", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotEqualTo(Integer value) { + addCriterion("term_id <>", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThan(Integer value) { + addCriterion("term_id >", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdGreaterThanOrEqualTo(Integer value) { + addCriterion("term_id >=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThan(Integer value) { + addCriterion("term_id <", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdLessThanOrEqualTo(Integer value) { + addCriterion("term_id <=", value, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdIn(List values) { + addCriterion("term_id in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotIn(List values) { + addCriterion("term_id not in", values, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdBetween(Integer value1, Integer value2) { + addCriterion("term_id between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andTermIdNotBetween(Integer value1, Integer value2) { + addCriterion("term_id not between", value1, value2, "termId"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageIsNull() { + addCriterion("battery_voltage is null"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageIsNotNull() { + addCriterion("battery_voltage is not null"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageEqualTo(Float value) { + addCriterion("battery_voltage =", value, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageNotEqualTo(Float value) { + addCriterion("battery_voltage <>", value, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageGreaterThan(Float value) { + addCriterion("battery_voltage >", value, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageGreaterThanOrEqualTo(Float value) { + addCriterion("battery_voltage >=", value, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageLessThan(Float value) { + addCriterion("battery_voltage <", value, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageLessThanOrEqualTo(Float value) { + addCriterion("battery_voltage <=", value, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageIn(List values) { + addCriterion("battery_voltage in", values, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageNotIn(List values) { + addCriterion("battery_voltage not in", values, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageBetween(Float value1, Float value2) { + addCriterion("battery_voltage between", value1, value2, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andBatteryVoltageNotBetween(Float value1, Float value2) { + addCriterion("battery_voltage not between", value1, value2, "batteryVoltage"); + return (Criteria) this; + } + + public Criteria andOpTemperatureIsNull() { + addCriterion("op_temperature is null"); + return (Criteria) this; + } + + public Criteria andOpTemperatureIsNotNull() { + addCriterion("op_temperature is not null"); + return (Criteria) this; + } + + public Criteria andOpTemperatureEqualTo(Float value) { + addCriterion("op_temperature =", value, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureNotEqualTo(Float value) { + addCriterion("op_temperature <>", value, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureGreaterThan(Float value) { + addCriterion("op_temperature >", value, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureGreaterThanOrEqualTo(Float value) { + addCriterion("op_temperature >=", value, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureLessThan(Float value) { + addCriterion("op_temperature <", value, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureLessThanOrEqualTo(Float value) { + addCriterion("op_temperature <=", value, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureIn(List values) { + addCriterion("op_temperature in", values, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureNotIn(List values) { + addCriterion("op_temperature not in", values, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureBetween(Float value1, Float value2) { + addCriterion("op_temperature between", value1, value2, "opTemperature"); + return (Criteria) this; + } + + public Criteria andOpTemperatureNotBetween(Float value1, Float value2) { + addCriterion("op_temperature not between", value1, value2, "opTemperature"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityIsNull() { + addCriterion("battery_capacity is null"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityIsNotNull() { + addCriterion("battery_capacity is not null"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityEqualTo(Float value) { + addCriterion("battery_capacity =", value, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityNotEqualTo(Float value) { + addCriterion("battery_capacity <>", value, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityGreaterThan(Float value) { + addCriterion("battery_capacity >", value, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityGreaterThanOrEqualTo(Float value) { + addCriterion("battery_capacity >=", value, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityLessThan(Float value) { + addCriterion("battery_capacity <", value, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityLessThanOrEqualTo(Float value) { + addCriterion("battery_capacity <=", value, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityIn(List values) { + addCriterion("battery_capacity in", values, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityNotIn(List values) { + addCriterion("battery_capacity not in", values, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityBetween(Float value1, Float value2) { + addCriterion("battery_capacity between", value1, value2, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andBatteryCapacityNotBetween(Float value1, Float value2) { + addCriterion("battery_capacity not between", value1, value2, "batteryCapacity"); + return (Criteria) this; + } + + public Criteria andFloatingChargeIsNull() { + addCriterion("floating_charge is null"); + return (Criteria) this; + } + + public Criteria andFloatingChargeIsNotNull() { + addCriterion("floating_charge is not null"); + return (Criteria) this; + } + + public Criteria andFloatingChargeEqualTo(Byte value) { + addCriterion("floating_charge =", value, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeNotEqualTo(Byte value) { + addCriterion("floating_charge <>", value, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeGreaterThan(Byte value) { + addCriterion("floating_charge >", value, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeGreaterThanOrEqualTo(Byte value) { + addCriterion("floating_charge >=", value, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeLessThan(Byte value) { + addCriterion("floating_charge <", value, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeLessThanOrEqualTo(Byte value) { + addCriterion("floating_charge <=", value, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeIn(List values) { + addCriterion("floating_charge in", values, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeNotIn(List values) { + addCriterion("floating_charge not in", values, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeBetween(Byte value1, Byte value2) { + addCriterion("floating_charge between", value1, value2, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andFloatingChargeNotBetween(Byte value1, Byte value2) { + addCriterion("floating_charge not between", value1, value2, "floatingCharge"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeIsNull() { + addCriterion("total_working_time is null"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeIsNotNull() { + addCriterion("total_working_time is not null"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeEqualTo(Integer value) { + addCriterion("total_working_time =", value, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeNotEqualTo(Integer value) { + addCriterion("total_working_time <>", value, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeGreaterThan(Integer value) { + addCriterion("total_working_time >", value, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("total_working_time >=", value, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeLessThan(Integer value) { + addCriterion("total_working_time <", value, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeLessThanOrEqualTo(Integer value) { + addCriterion("total_working_time <=", value, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeIn(List values) { + addCriterion("total_working_time in", values, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeNotIn(List values) { + addCriterion("total_working_time not in", values, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeBetween(Integer value1, Integer value2) { + addCriterion("total_working_time between", value1, value2, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andTotalWorkingTimeNotBetween(Integer value1, Integer value2) { + addCriterion("total_working_time not between", value1, value2, "totalWorkingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeIsNull() { + addCriterion("working_time is null"); + return (Criteria) this; + } + + public Criteria andWorkingTimeIsNotNull() { + addCriterion("working_time is not null"); + return (Criteria) this; + } + + public Criteria andWorkingTimeEqualTo(Integer value) { + addCriterion("working_time =", value, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeNotEqualTo(Integer value) { + addCriterion("working_time <>", value, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeGreaterThan(Integer value) { + addCriterion("working_time >", value, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("working_time >=", value, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeLessThan(Integer value) { + addCriterion("working_time <", value, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeLessThanOrEqualTo(Integer value) { + addCriterion("working_time <=", value, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeIn(List values) { + addCriterion("working_time in", values, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeNotIn(List values) { + addCriterion("working_time not in", values, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeBetween(Integer value1, Integer value2) { + addCriterion("working_time between", value1, value2, "workingTime"); + return (Criteria) this; + } + + public Criteria andWorkingTimeNotBetween(Integer value1, Integer value2) { + addCriterion("working_time not between", value1, value2, "workingTime"); + return (Criteria) this; + } + + public Criteria andConnectionStateIsNull() { + addCriterion("connection_state is null"); + return (Criteria) this; + } + + public Criteria andConnectionStateIsNotNull() { + addCriterion("connection_state is not null"); + return (Criteria) this; + } + + public Criteria andConnectionStateEqualTo(Byte value) { + addCriterion("connection_state =", value, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateNotEqualTo(Byte value) { + addCriterion("connection_state <>", value, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateGreaterThan(Byte value) { + addCriterion("connection_state >", value, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateGreaterThanOrEqualTo(Byte value) { + addCriterion("connection_state >=", value, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateLessThan(Byte value) { + addCriterion("connection_state <", value, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateLessThanOrEqualTo(Byte value) { + addCriterion("connection_state <=", value, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateIn(List values) { + addCriterion("connection_state in", values, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateNotIn(List values) { + addCriterion("connection_state not in", values, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateBetween(Byte value1, Byte value2) { + addCriterion("connection_state between", value1, value2, "connectionState"); + return (Criteria) this; + } + + public Criteria andConnectionStateNotBetween(Byte value1, Byte value2) { + addCriterion("connection_state not between", value1, value2, "connectionState"); + return (Criteria) this; + } + + public Criteria andSendFlowIsNull() { + addCriterion("send_flow is null"); + return (Criteria) this; + } + + public Criteria andSendFlowIsNotNull() { + addCriterion("send_flow is not null"); + return (Criteria) this; + } + + public Criteria andSendFlowEqualTo(Integer value) { + addCriterion("send_flow =", value, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowNotEqualTo(Integer value) { + addCriterion("send_flow <>", value, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowGreaterThan(Integer value) { + addCriterion("send_flow >", value, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowGreaterThanOrEqualTo(Integer value) { + addCriterion("send_flow >=", value, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowLessThan(Integer value) { + addCriterion("send_flow <", value, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowLessThanOrEqualTo(Integer value) { + addCriterion("send_flow <=", value, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowIn(List values) { + addCriterion("send_flow in", values, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowNotIn(List values) { + addCriterion("send_flow not in", values, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowBetween(Integer value1, Integer value2) { + addCriterion("send_flow between", value1, value2, "sendFlow"); + return (Criteria) this; + } + + public Criteria andSendFlowNotBetween(Integer value1, Integer value2) { + addCriterion("send_flow not between", value1, value2, "sendFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowIsNull() { + addCriterion("recv_flow is null"); + return (Criteria) this; + } + + public Criteria andRecvFlowIsNotNull() { + addCriterion("recv_flow is not null"); + return (Criteria) this; + } + + public Criteria andRecvFlowEqualTo(Integer value) { + addCriterion("recv_flow =", value, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowNotEqualTo(Integer value) { + addCriterion("recv_flow <>", value, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowGreaterThan(Integer value) { + addCriterion("recv_flow >", value, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowGreaterThanOrEqualTo(Integer value) { + addCriterion("recv_flow >=", value, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowLessThan(Integer value) { + addCriterion("recv_flow <", value, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowLessThanOrEqualTo(Integer value) { + addCriterion("recv_flow <=", value, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowIn(List values) { + addCriterion("recv_flow in", values, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowNotIn(List values) { + addCriterion("recv_flow not in", values, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowBetween(Integer value1, Integer value2) { + addCriterion("recv_flow between", value1, value2, "recvFlow"); + return (Criteria) this; + } + + public Criteria andRecvFlowNotBetween(Integer value1, Integer value2) { + addCriterion("recv_flow not between", value1, value2, "recvFlow"); + return (Criteria) this; + } + + public Criteria andProtocolVersionIsNull() { + addCriterion("protocol_version is null"); + return (Criteria) this; + } + + public Criteria andProtocolVersionIsNotNull() { + addCriterion("protocol_version is not null"); + return (Criteria) this; + } + + public Criteria andProtocolVersionEqualTo(String value) { + addCriterion("protocol_version =", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionNotEqualTo(String value) { + addCriterion("protocol_version <>", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionGreaterThan(String value) { + addCriterion("protocol_version >", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionGreaterThanOrEqualTo(String value) { + addCriterion("protocol_version >=", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionLessThan(String value) { + addCriterion("protocol_version <", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionLessThanOrEqualTo(String value) { + addCriterion("protocol_version <=", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionLike(String value) { + addCriterion("protocol_version like", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionNotLike(String value) { + addCriterion("protocol_version not like", value, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionIn(List values) { + addCriterion("protocol_version in", values, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionNotIn(List values) { + addCriterion("protocol_version not in", values, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionBetween(String value1, String value2) { + addCriterion("protocol_version between", value1, value2, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andProtocolVersionNotBetween(String value1, String value2) { + addCriterion("protocol_version not between", value1, value2, "protocolVersion"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeIsNull() { + addCriterion("ws_update_time is null"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeIsNotNull() { + addCriterion("ws_update_time is not null"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeEqualTo(Long value) { + addCriterion("ws_update_time =", value, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeNotEqualTo(Long value) { + addCriterion("ws_update_time <>", value, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeGreaterThan(Long value) { + addCriterion("ws_update_time >", value, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("ws_update_time >=", value, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeLessThan(Long value) { + addCriterion("ws_update_time <", value, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("ws_update_time <=", value, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeIn(List values) { + addCriterion("ws_update_time in", values, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeNotIn(List values) { + addCriterion("ws_update_time not in", values, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeBetween(Long value1, Long value2) { + addCriterion("ws_update_time between", value1, value2, "wsUpdateTime"); + return (Criteria) this; + } + + public Criteria andWsUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("ws_update_time not between", value1, value2, "wsUpdateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SysUserVo.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SysUserVo.java index c725dfc..9bcc48b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SysUserVo.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/vo/SysUserVo.java @@ -22,7 +22,6 @@ public class SysUserVo { @ApiModelProperty(value = "密码", example = "123455") private String password; - @NotNull(message = "备注") @ApiModelProperty(value = "备注", example = "123455") private String notes; diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalBasicInfoHistoryDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalBasicInfoHistoryDao.java new file mode 100644 index 0000000..6ce6c97 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalBasicInfoHistoryDao.java @@ -0,0 +1,22 @@ +package com.shxy.xymanager_dao.dao; + +import com.shxy.xymanager_common.entity.TerminalBasicInfoHistory; +import com.shxy.xymanager_common.entity.TerminalBasicInfoHistoryExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TerminalBasicInfoHistoryDao { + long countByExample(TerminalBasicInfoHistoryExample example); + + int deleteByExample(TerminalBasicInfoHistoryExample example); + + int insert(TerminalBasicInfoHistory record); + + int insertSelective(TerminalBasicInfoHistory record); + + List selectByExample(TerminalBasicInfoHistoryExample example); + + int updateByExampleSelective(@Param("record") TerminalBasicInfoHistory record, @Param("example") TerminalBasicInfoHistoryExample example); + + int updateByExample(@Param("record") TerminalBasicInfoHistory record, @Param("example") TerminalBasicInfoHistoryExample example); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPositionHistoryDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPositionHistoryDao.java new file mode 100644 index 0000000..dfe70a1 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalPositionHistoryDao.java @@ -0,0 +1,30 @@ +package com.shxy.xymanager_dao.dao; + +import com.shxy.xymanager_common.entity.TerminalPositionHistory; +import com.shxy.xymanager_common.entity.TerminalPositionHistoryExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TerminalPositionHistoryDao { + long countByExample(TerminalPositionHistoryExample example); + + int deleteByExample(TerminalPositionHistoryExample example); + + int deleteByPrimaryKey(Long id); + + int insert(TerminalPositionHistory record); + + int insertSelective(TerminalPositionHistory record); + + List selectByExample(TerminalPositionHistoryExample example); + + TerminalPositionHistory selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") TerminalPositionHistory record, @Param("example") TerminalPositionHistoryExample example); + + int updateByExample(@Param("record") TerminalPositionHistory record, @Param("example") TerminalPositionHistoryExample example); + + int updateByPrimaryKeySelective(TerminalPositionHistory record); + + int updateByPrimaryKey(TerminalPositionHistory record); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalRunningStatusHistoryDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalRunningStatusHistoryDao.java new file mode 100644 index 0000000..2763bd6 --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalRunningStatusHistoryDao.java @@ -0,0 +1,22 @@ +package com.shxy.xymanager_dao.dao; + +import com.shxy.xymanager_common.entity.TerminalRunningStatusHistory; +import com.shxy.xymanager_common.entity.TerminalRunningStatusHistoryExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TerminalRunningStatusHistoryDao { + long countByExample(TerminalRunningStatusHistoryExample example); + + int deleteByExample(TerminalRunningStatusHistoryExample example); + + int insert(TerminalRunningStatusHistory record); + + int insertSelective(TerminalRunningStatusHistory record); + + List selectByExample(TerminalRunningStatusHistoryExample example); + + int updateByExampleSelective(@Param("record") TerminalRunningStatusHistory record, @Param("example") TerminalRunningStatusHistoryExample example); + + int updateByExample(@Param("record") TerminalRunningStatusHistory record, @Param("example") TerminalRunningStatusHistoryExample example); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalWorkingStatusHistoryDao.java b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalWorkingStatusHistoryDao.java new file mode 100644 index 0000000..ea5f50b --- /dev/null +++ b/xymanager_dao/src/main/java/com/shxy/xymanager_dao/dao/TerminalWorkingStatusHistoryDao.java @@ -0,0 +1,22 @@ +package com.shxy.xymanager_dao.dao; + +import com.shxy.xymanager_common.entity.TerminalWorkingStatusHistory; +import com.shxy.xymanager_common.entity.TerminalWorkingStatusHistoryExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TerminalWorkingStatusHistoryDao { + long countByExample(TerminalWorkingStatusHistoryExample example); + + int deleteByExample(TerminalWorkingStatusHistoryExample example); + + int insert(TerminalWorkingStatusHistory record); + + int insertSelective(TerminalWorkingStatusHistory record); + + List selectByExample(TerminalWorkingStatusHistoryExample example); + + int updateByExampleSelective(@Param("record") TerminalWorkingStatusHistory record, @Param("example") TerminalWorkingStatusHistoryExample example); + + int updateByExample(@Param("record") TerminalWorkingStatusHistory record, @Param("example") TerminalWorkingStatusHistoryExample example); +} \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalBasicInfoHistoryDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalBasicInfoHistoryDao.xml new file mode 100644 index 0000000..611d3ba --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/TerminalBasicInfoHistoryDao.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + term_id, cmdid, version, bs_id, update_time + + + + delete from terminal_basic_info_history + + + + + + insert into terminal_basic_info_history (term_id, cmdid, version, + bs_id, update_time) + values (#{termId,jdbcType=INTEGER}, #{cmdid,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, + #{bsId,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}) + + + insert into terminal_basic_info_history + + + term_id, + + + cmdid, + + + version, + + + bs_id, + + + update_time, + + + + + #{termId,jdbcType=INTEGER}, + + + #{cmdid,jdbcType=VARCHAR}, + + + #{version,jdbcType=VARCHAR}, + + + #{bsId,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update terminal_basic_info_history + + + term_id = #{record.termId,jdbcType=INTEGER}, + + + cmdid = #{record.cmdid,jdbcType=VARCHAR}, + + + version = #{record.version,jdbcType=VARCHAR}, + + + bs_id = #{record.bsId,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update terminal_basic_info_history + set term_id = #{record.termId,jdbcType=INTEGER}, + cmdid = #{record.cmdid,jdbcType=VARCHAR}, + version = #{record.version,jdbcType=VARCHAR}, + bs_id = #{record.bsId,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalPositionHistoryDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalPositionHistoryDao.xml new file mode 100644 index 0000000..06c69cf --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/TerminalPositionHistoryDao.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, term_id, coordinate_type, radius, latitude, longitude, update_time + + + + + delete from terminal_position_history + where id = #{id,jdbcType=BIGINT} + + + delete from terminal_position_history + + + + + + insert into terminal_position_history (id, term_id, coordinate_type, + radius, latitude, longitude, + update_time) + values (#{id,jdbcType=BIGINT}, #{termId,jdbcType=INTEGER}, #{coordinateType,jdbcType=TINYINT}, + #{radius,jdbcType=SMALLINT}, #{latitude,jdbcType=DOUBLE}, #{longitude,jdbcType=DOUBLE}, + #{updateTime,jdbcType=BIGINT}) + + + insert into terminal_position_history + + + id, + + + term_id, + + + coordinate_type, + + + radius, + + + latitude, + + + longitude, + + + update_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{termId,jdbcType=INTEGER}, + + + #{coordinateType,jdbcType=TINYINT}, + + + #{radius,jdbcType=SMALLINT}, + + + #{latitude,jdbcType=DOUBLE}, + + + #{longitude,jdbcType=DOUBLE}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update terminal_position_history + + + id = #{record.id,jdbcType=BIGINT}, + + + term_id = #{record.termId,jdbcType=INTEGER}, + + + coordinate_type = #{record.coordinateType,jdbcType=TINYINT}, + + + radius = #{record.radius,jdbcType=SMALLINT}, + + + latitude = #{record.latitude,jdbcType=DOUBLE}, + + + longitude = #{record.longitude,jdbcType=DOUBLE}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update terminal_position_history + set id = #{record.id,jdbcType=BIGINT}, + term_id = #{record.termId,jdbcType=INTEGER}, + coordinate_type = #{record.coordinateType,jdbcType=TINYINT}, + radius = #{record.radius,jdbcType=SMALLINT}, + latitude = #{record.latitude,jdbcType=DOUBLE}, + longitude = #{record.longitude,jdbcType=DOUBLE}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update terminal_position_history + + + term_id = #{termId,jdbcType=INTEGER}, + + + coordinate_type = #{coordinateType,jdbcType=TINYINT}, + + + radius = #{radius,jdbcType=SMALLINT}, + + + latitude = #{latitude,jdbcType=DOUBLE}, + + + longitude = #{longitude,jdbcType=DOUBLE}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update terminal_position_history + set term_id = #{termId,jdbcType=INTEGER}, + coordinate_type = #{coordinateType,jdbcType=TINYINT}, + radius = #{radius,jdbcType=SMALLINT}, + latitude = #{latitude,jdbcType=DOUBLE}, + longitude = #{longitude,jdbcType=DOUBLE}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalRunningStatusHistoryDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalRunningStatusHistoryDao.xml new file mode 100644 index 0000000..1573840 --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/TerminalRunningStatusHistoryDao.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + term_id, signal_strength_4g, signal_strength_2g, remaining_ram, remaining_rom, boot_time, + rs_update_time + + + + delete from terminal_running_status_history + + + + + + insert into terminal_running_status_history (term_id, signal_strength_4g, signal_strength_2g, + remaining_ram, remaining_rom, boot_time, + rs_update_time) + values (#{termId,jdbcType=INTEGER}, #{signalStrength4g,jdbcType=TINYINT}, #{signalStrength2g,jdbcType=TINYINT}, + #{remainingRam,jdbcType=SMALLINT}, #{remainingRom,jdbcType=SMALLINT}, #{bootTime,jdbcType=BIGINT}, + #{rsUpdateTime,jdbcType=BIGINT}) + + + insert into terminal_running_status_history + + + term_id, + + + signal_strength_4g, + + + signal_strength_2g, + + + remaining_ram, + + + remaining_rom, + + + boot_time, + + + rs_update_time, + + + + + #{termId,jdbcType=INTEGER}, + + + #{signalStrength4g,jdbcType=TINYINT}, + + + #{signalStrength2g,jdbcType=TINYINT}, + + + #{remainingRam,jdbcType=SMALLINT}, + + + #{remainingRom,jdbcType=SMALLINT}, + + + #{bootTime,jdbcType=BIGINT}, + + + #{rsUpdateTime,jdbcType=BIGINT}, + + + + + + update terminal_running_status_history + + + term_id = #{record.termId,jdbcType=INTEGER}, + + + signal_strength_4g = #{record.signalStrength4g,jdbcType=TINYINT}, + + + signal_strength_2g = #{record.signalStrength2g,jdbcType=TINYINT}, + + + remaining_ram = #{record.remainingRam,jdbcType=SMALLINT}, + + + remaining_rom = #{record.remainingRom,jdbcType=SMALLINT}, + + + boot_time = #{record.bootTime,jdbcType=BIGINT}, + + + rs_update_time = #{record.rsUpdateTime,jdbcType=BIGINT}, + + + + + + + + update terminal_running_status_history + set term_id = #{record.termId,jdbcType=INTEGER}, + signal_strength_4g = #{record.signalStrength4g,jdbcType=TINYINT}, + signal_strength_2g = #{record.signalStrength2g,jdbcType=TINYINT}, + remaining_ram = #{record.remainingRam,jdbcType=SMALLINT}, + remaining_rom = #{record.remainingRom,jdbcType=SMALLINT}, + boot_time = #{record.bootTime,jdbcType=BIGINT}, + rs_update_time = #{record.rsUpdateTime,jdbcType=BIGINT} + + + + + \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/TerminalWorkingStatusHistoryDao.xml b/xymanager_dao/src/main/resources/mappers/TerminalWorkingStatusHistoryDao.xml new file mode 100644 index 0000000..b0782ce --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/TerminalWorkingStatusHistoryDao.xml @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + term_id, battery_voltage, op_temperature, battery_capacity, floating_charge, total_working_time, + working_time, connection_state, send_flow, recv_flow, protocol_version, ws_update_time + + + + delete from terminal_working_status_history + + + + + + insert into terminal_working_status_history (term_id, battery_voltage, op_temperature, + battery_capacity, floating_charge, total_working_time, + working_time, connection_state, send_flow, + recv_flow, protocol_version, ws_update_time + ) + values (#{termId,jdbcType=INTEGER}, #{batteryVoltage,jdbcType=REAL}, #{opTemperature,jdbcType=REAL}, + #{batteryCapacity,jdbcType=REAL}, #{floatingCharge,jdbcType=TINYINT}, #{totalWorkingTime,jdbcType=INTEGER}, + #{workingTime,jdbcType=INTEGER}, #{connectionState,jdbcType=TINYINT}, #{sendFlow,jdbcType=INTEGER}, + #{recvFlow,jdbcType=INTEGER}, #{protocolVersion,jdbcType=VARCHAR}, #{wsUpdateTime,jdbcType=BIGINT} + ) + + + insert into terminal_working_status_history + + + term_id, + + + battery_voltage, + + + op_temperature, + + + battery_capacity, + + + floating_charge, + + + total_working_time, + + + working_time, + + + connection_state, + + + send_flow, + + + recv_flow, + + + protocol_version, + + + ws_update_time, + + + + + #{termId,jdbcType=INTEGER}, + + + #{batteryVoltage,jdbcType=REAL}, + + + #{opTemperature,jdbcType=REAL}, + + + #{batteryCapacity,jdbcType=REAL}, + + + #{floatingCharge,jdbcType=TINYINT}, + + + #{totalWorkingTime,jdbcType=INTEGER}, + + + #{workingTime,jdbcType=INTEGER}, + + + #{connectionState,jdbcType=TINYINT}, + + + #{sendFlow,jdbcType=INTEGER}, + + + #{recvFlow,jdbcType=INTEGER}, + + + #{protocolVersion,jdbcType=VARCHAR}, + + + #{wsUpdateTime,jdbcType=BIGINT}, + + + + + + update terminal_working_status_history + + + term_id = #{record.termId,jdbcType=INTEGER}, + + + battery_voltage = #{record.batteryVoltage,jdbcType=REAL}, + + + op_temperature = #{record.opTemperature,jdbcType=REAL}, + + + battery_capacity = #{record.batteryCapacity,jdbcType=REAL}, + + + floating_charge = #{record.floatingCharge,jdbcType=TINYINT}, + + + total_working_time = #{record.totalWorkingTime,jdbcType=INTEGER}, + + + working_time = #{record.workingTime,jdbcType=INTEGER}, + + + connection_state = #{record.connectionState,jdbcType=TINYINT}, + + + send_flow = #{record.sendFlow,jdbcType=INTEGER}, + + + recv_flow = #{record.recvFlow,jdbcType=INTEGER}, + + + protocol_version = #{record.protocolVersion,jdbcType=VARCHAR}, + + + ws_update_time = #{record.wsUpdateTime,jdbcType=BIGINT}, + + + + + + + + update terminal_working_status_history + set term_id = #{record.termId,jdbcType=INTEGER}, + battery_voltage = #{record.batteryVoltage,jdbcType=REAL}, + op_temperature = #{record.opTemperature,jdbcType=REAL}, + battery_capacity = #{record.batteryCapacity,jdbcType=REAL}, + floating_charge = #{record.floatingCharge,jdbcType=TINYINT}, + total_working_time = #{record.totalWorkingTime,jdbcType=INTEGER}, + working_time = #{record.workingTime,jdbcType=INTEGER}, + connection_state = #{record.connectionState,jdbcType=TINYINT}, + send_flow = #{record.sendFlow,jdbcType=INTEGER}, + recv_flow = #{record.recvFlow,jdbcType=INTEGER}, + protocol_version = #{record.protocolVersion,jdbcType=VARCHAR}, + ws_update_time = #{record.wsUpdateTime,jdbcType=BIGINT} + + + + + \ No newline at end of file diff --git a/xymanager_framework/src/main/java/com/shxy/xymanager_framework/filter/UserInfoFilter.java b/xymanager_framework/src/main/java/com/shxy/xymanager_framework/filter/UserInfoFilter.java index 20eed41..a7c47d3 100644 --- a/xymanager_framework/src/main/java/com/shxy/xymanager_framework/filter/UserInfoFilter.java +++ b/xymanager_framework/src/main/java/com/shxy/xymanager_framework/filter/UserInfoFilter.java @@ -74,7 +74,7 @@ public class UserInfoFilter extends AbstractAuthorizationFilter { if (!StringUtils.isBlank(token)) { String userId = tokenUtil.getUserId(token); if (!StringUtils.isBlank(userId)) { - SysUser user = userService.selectUserById(Integer.parseInt(userId)); + SysUser user = userService.selectUserById(Integer.parseInt("26")); UserContextHolder.setCurrentUserInfo(user); } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java index b17e1ac..44bede2 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java @@ -85,6 +85,18 @@ public class TerminalServiceImpl implements TerminalService { @Autowired TerminalFaultsDao terminalFaultsDao; + @Autowired + TerminalWorkingStatusHistoryDao terminalWorkingStatusHistoryDao; + + @Autowired + TerminalRunningStatusHistoryDao terminalRunningStatusHistoryDao; + + @Autowired + TerminalPositionHistoryDao terminalPositionHistoryDao; + + @Autowired + TerminalBasicInfoHistoryDao terminalBasicInfoHistoryDao; + /** * 获取所有设备列表 * @@ -837,10 +849,134 @@ public class TerminalServiceImpl implements TerminalService { } @Override - public ServiceBody getWorkingStatusHistory(TermFaultsVo vo) { - return null; + public ServiceBody> getWorkingStatusHistory(TermFaultsVo vo) { + Map terminalMap = cacheService.getTerminalMap(); + Integer termid = vo.getTermid(); + Integer pageindex = vo.getPageindex(); + Integer pagesize = vo.getPagesize(); + DateTime starttime = vo.getStarttime(); + DateTime endtime = vo.getEndtime(); + TerminalWorkingStatusHistoryExample example = new TerminalWorkingStatusHistoryExample(); + example.setOrderByClause("ws_update_time desc"); + TerminalWorkingStatusHistoryExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termid); + if (BeanUtil.isNotEmpty(pageindex) && BeanUtil.isNotEmpty(pagesize) && pagesize > 0) { + PageUtils.SetPage(pageindex, pagesize); + } + if (starttime != null) { + criteria.andWsUpdateTimeGreaterThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(starttime)); + } + if (endtime != null) { + criteria.andWsUpdateTimeLessThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(endtime)); + } + List list = terminalWorkingStatusHistoryDao.selectByExample(example); + if (CollectionUtil.isNotEmpty(list)) { + for (TerminalWorkingStatusHistory item : list) { + item.setCmdid(terminalMap.get(termid).getCmdid()); + } + } + TableDataInfo dataTable = PageUtils.getDataTable(list); + return Asserts.success(dataTable); + } + + /** + * 获取设备运行状态历史 + * + * @param vo + * @return + */ + @Override + public ServiceBody> getTermRunningHistory(TermFaultsVo vo) { + Map terminalMap = cacheService.getTerminalMap(); + Integer termid = vo.getTermid(); + Integer pageindex = vo.getPageindex(); + Integer pagesize = vo.getPagesize(); + DateTime starttime = vo.getStarttime(); + DateTime endtime = vo.getEndtime(); + TerminalRunningStatusHistoryExample example = new TerminalRunningStatusHistoryExample(); + example.setOrderByClause("rs_update_time desc"); + TerminalRunningStatusHistoryExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termid); + if (BeanUtil.isNotEmpty(pageindex) && BeanUtil.isNotEmpty(pagesize) && pagesize > 0) { + PageUtils.SetPage(pageindex, pagesize); + } + if (starttime != null) { + criteria.andRsUpdateTimeGreaterThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(starttime)); + } + if (endtime != null) { + criteria.andRsUpdateTimeLessThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(endtime)); + } + List list = terminalRunningStatusHistoryDao.selectByExample(example); + if (CollectionUtil.isNotEmpty(list)) { + for (TerminalRunningStatusHistory item : list) { + item.setCmdid(terminalMap.get(termid).getCmdid()); + } + } + TableDataInfo dataTable = PageUtils.getDataTable(list); + return Asserts.success(dataTable); } + @Override + public ServiceBody> getTermGpsHistory(TermFaultsVo vo) { + Map terminalMap = cacheService.getTerminalMap(); + Integer termid = vo.getTermid(); + Integer pageindex = vo.getPageindex(); + Integer pagesize = vo.getPagesize(); + DateTime starttime = vo.getStarttime(); + DateTime endtime = vo.getEndtime(); + TerminalPositionHistoryExample example = new TerminalPositionHistoryExample(); + example.setOrderByClause("update_time desc"); + TerminalPositionHistoryExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termid); + if (BeanUtil.isNotEmpty(pageindex) && BeanUtil.isNotEmpty(pagesize) && pagesize > 0) { + PageUtils.SetPage(pageindex, pagesize); + } + if (starttime != null) { + criteria.andUpdateTimeGreaterThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(starttime)); + } + if (endtime != null) { + criteria.andUpdateTimeLessThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(endtime)); + } + List list = terminalPositionHistoryDao.selectByExample(example); + if (CollectionUtil.isNotEmpty(list)) { + for (TerminalPositionHistory item : list) { + item.setCmdid(terminalMap.get(termid).getCmdid()); + } + } + TableDataInfo dataTable = PageUtils.getDataTable(list); + return Asserts.success(dataTable); + } + + @Override + public ServiceBody> getTermBasicInfoHistory(TermFaultsVo vo) { +// Map terminalMap = cacheService.getTerminalMap(); + Integer termid = vo.getTermid(); + Integer pageindex = vo.getPageindex(); + Integer pagesize = vo.getPagesize(); + DateTime starttime = vo.getStarttime(); + DateTime endtime = vo.getEndtime(); + TerminalBasicInfoHistoryExample example = new TerminalBasicInfoHistoryExample(); + example.setOrderByClause("update_time desc"); + TerminalBasicInfoHistoryExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termid); + if (BeanUtil.isNotEmpty(pageindex) && BeanUtil.isNotEmpty(pagesize) && pagesize > 0) { + PageUtils.SetPage(pageindex, pagesize); + } + if (starttime != null) { + criteria.andUpdateTimeGreaterThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(starttime)); + } + if (endtime != null) { + criteria.andUpdateTimeLessThanOrEqualTo(MyDateUtils.TimeMillSecond2Second(endtime)); + } + List list = terminalBasicInfoHistoryDao.selectByExample(example); +// if (CollectionUtil.isNotEmpty(list)) { +// for (TerminalBasicInfoHistory item : list) { +// item.setCmdid(terminalMap.get(termid).getCmdid()); +// } +// } + TableDataInfo dataTable = PageUtils.getDataTable(list); + return Asserts.success(dataTable); + } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java index 07f5888..f1f78eb 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/UploadServiceImpl.java @@ -102,11 +102,9 @@ public class UploadServiceImpl implements UploadService { @Override public ServiceBody issueApk(TerminalApkVo vo) { Cma cma = new Cma(server, port); - vo.getCmdid().stream().forEach(var -> { cma.upgrade(var, vo.getPath()); }); - return Asserts.success(true); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java index 72ea9fa..00c803f 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/TerminalService.java @@ -1,8 +1,7 @@ package com.shxy.xymanager_service.service; import com.shxy.xymanager_common.bean.ServiceBody; -import com.shxy.xymanager_common.entity.TerminalFaults; -import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals; +import com.shxy.xymanager_common.entity.*; import com.shxy.xymanager_common.excelbean.TerminalAndLastPicListExcelModel; import com.shxy.xymanager_common.excelbean.TerminalListExcelModel; import com.shxy.xymanager_common.model.*; @@ -171,5 +170,26 @@ public interface TerminalService { * @param vo * @return */ - ServiceBody getWorkingStatusHistory(TermFaultsVo vo); + ServiceBody> getWorkingStatusHistory(TermFaultsVo vo); + + /** + * 获取设备运行状态历史 + * @param vo + * @return + */ + ServiceBody> getTermRunningHistory(TermFaultsVo vo); + + /** + * 获取设备Gps历史 + * @param vo + * @return + */ + ServiceBody> getTermGpsHistory(TermFaultsVo vo); + + /** + * 获取设备基本信息历史 + * @param vo + * @return + */ + ServiceBody> getTermBasicInfoHistory(TermFaultsVo vo); }