Commit 38fcbe66 authored by kiritoausna's avatar kiritoausna

2022-11.04 环境监测历史数据

parent f15244d2
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
<!-- 打包 --> <!-- 打包 -->
<build> <build>
<finalName>MineTRS_new0.16</finalName>
<plugins> <plugins>
<!-- 跳过单元测试 --> <!-- 跳过单元测试 -->
<plugin> <plugin>
......
...@@ -7,9 +7,10 @@ import me.zhengjie.gemho.service.sys.SysTypeService; ...@@ -7,9 +7,10 @@ import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService; import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.RedisUtils; import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
...@@ -127,4 +128,72 @@ public class RealDataController { ...@@ -127,4 +128,72 @@ public class RealDataController {
redisUtils.set("realData", realDataVos1); redisUtils.set("realData", realDataVos1);
return new ResponseEntity<>(new PageResult().nopagesuccess(realDataVos1), HttpStatus.OK); return new ResponseEntity<>(new PageResult().nopagesuccess(realDataVos1), HttpStatus.OK);
} }
@GetMapping("dimensional")
public ResponseEntity<Object> dimensionalReal(HttpServletRequest request, String tailInfoNo) {
if (ObjectUtils.isEmpty(tailInfoNo)) {
return null;
}
//创建返回对象
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
ArrayList<RealDataVo> realDataVos1 = new ArrayList<>();
//获取相应尾矿库下的所有设备
List<String> equipnos = drybeachequipinforService.getequipno(tailInfoNo);
//获取所有检测项
QueryWrapper<SysType> sysTypeQueryWrapper = new QueryWrapper<>();
sysTypeQueryWrapper.eq("must", 0);
List<SysType> list = sysTypeService.list(sysTypeQueryWrapper);
if (list.isEmpty()) {
return new ResponseEntity<>(new PageResult().nopagefailed("确实该尾矿下是否有绑定的设备"), HttpStatus.INTERNAL_SERVER_ERROR);
}
for (SysType sysType : list) {
switch (sysType.getCode()) {
case "1":
List<RealDataVo> dbdatas = dbDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(dbdatas);
break;
case "2":
List<RealDataVo> wtdatas = wtDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(wtdatas);
break;
case "3":
List<RealDataVo> mpdatas = mpDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(mpdatas);
break;
case "4":
List<RealDataVo> dmdatas = dmDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(dmdatas);
break;
case "5":
List<RealDataVo> stdatas = stDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(stdatas);
break;
case "6":
List<RealDataVo> rgdatas = rgDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(rgdatas);
break;
case "7":
List<RealDataVo> psldatas = pslDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(psldatas);
break;
case "9":
List<RealDataVo> sldatas = slDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(sldatas);
break;
case "16":
List<RealDataVo> wpbdatas = wpbDataService.real(sysType.getTypeno(), request,tailInfoNo);
realDataVos.addAll(wpbdatas);
break;
}
}
for (RealDataVo realDataVo : realDataVos) {
boolean contains = equipnos.contains(realDataVo.getEquipno());
if (contains) {
realDataVos1.add(realDataVo);
}
}
redisUtils.set("realData", realDataVos1);
return new ResponseEntity<>(new PageResult().nopagesuccess(realDataVos1), HttpStatus.OK);
}
} }
package me.zhengjie.gemho.controller.data; package me.zhengjie.gemho.controller.data;
import cn.hutool.http.HttpRequest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -52,11 +53,15 @@ public class SzDataController { ...@@ -52,11 +53,15 @@ public class SzDataController {
} }
return new ResponseEntity<>(new RealVo().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new RealVo().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
/**
@ApiOperation(value = "分页查看") * 获取环境/水质的历史数据
*
* @param
* @return
*/
@ApiOperation("获取干滩的历史数据")
@GetMapping("history") @GetMapping("history")
public ResponseEntity<Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public ResponseEntity<Object> gethistory(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
try { try {
HashMap<String, Object> map = szDataService.pageall(dataQueryCriteria, request); HashMap<String, Object> map = szDataService.pageall(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK); return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
......
...@@ -14,7 +14,7 @@ import me.zhengjie.gemho.service.sys.SysViewsService; ...@@ -14,7 +14,7 @@ import me.zhengjie.gemho.service.sys.SysViewsService;
import me.zhengjie.gemho.service.tab.TailpondinforService; import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -6,15 +6,17 @@ import io.swagger.annotations.Api; ...@@ -6,15 +6,17 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.sys.DevtypeExtend;
import me.zhengjie.gemho.entity.sys.SysSummary; import me.zhengjie.gemho.entity.sys.SysSummary;
import me.zhengjie.gemho.entity.tab.Monitorvideo; import me.zhengjie.gemho.entity.tab.Monitorvideo;
import me.zhengjie.gemho.service.sys.IDevtypeExtendService;
import me.zhengjie.gemho.service.sys.SysSelectService; import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.service.sys.SysSummaryService; import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.tab.MonitorvideoService; import me.zhengjie.gemho.service.tab.MonitorvideoService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
...@@ -46,6 +48,8 @@ public class SysSummaryController { ...@@ -46,6 +48,8 @@ public class SysSummaryController {
private MonitorvideoService monitorvideoService; private MonitorvideoService monitorvideoService;
@Autowired @Autowired
private OnlineUserService onlineUserService; private OnlineUserService onlineUserService;
@Autowired
private IDevtypeExtendService iDevtypeExtendService;
/** /**
* 查询全部 * 查询全部
...@@ -71,7 +75,7 @@ public class SysSummaryController { ...@@ -71,7 +75,7 @@ public class SysSummaryController {
public ResponseEntity<Object> add(@RequestBody SysSummary sysSummary, HttpServletRequest request) { public ResponseEntity<Object> add(@RequestBody SysSummary sysSummary, HttpServletRequest request) {
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(currentUsername, request); String gettailno = onlineUserService.gettailno(currentUsername, request);
if(gettailno==null){ if (gettailno == null) {
return new ResponseEntity<>(new PostOrPutResult().noTailFailed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().noTailFailed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
sysSummary.setCreatetime(LocalDateTime.now()); sysSummary.setCreatetime(LocalDateTime.now());
...@@ -90,7 +94,9 @@ public class SysSummaryController { ...@@ -90,7 +94,9 @@ public class SysSummaryController {
if (list.size() > 0) { if (list.size() > 0) {
return new ResponseEntity<>(new PostOrPutResult().chongfufailed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().chongfufailed(), HttpStatus.INTERNAL_SERVER_ERROR);
} }
if(title.contains("沉降")&&sysSummary.getType().equals("t_4")){
sysSummary.setValues("沉降");
}
boolean save = sysSummaryService.save(sysSummary); boolean save = sysSummaryService.save(sysSummary);
if (save) { if (save) {
if (sysSummary.getType().equals("t_14")) { if (sysSummary.getType().equals("t_14")) {
...@@ -108,6 +114,15 @@ public class SysSummaryController { ...@@ -108,6 +114,15 @@ public class SysSummaryController {
monitorvideo.setV_tailno(id.toString()); monitorvideo.setV_tailno(id.toString());
monitorvideoService.save(monitorvideo); monitorvideoService.save(monitorvideo);
} }
if (sysSummary.getType().equals("t_13")) {
QueryWrapper<SysSummary> sysSummaryQueryWrapper1 = new QueryWrapper<>();
sysSummaryQueryWrapper1.eq("title", sysSummary.getTitle()).eq("name", gettailno);
Integer id = sysSummaryService.getOne(sysSummaryQueryWrapper1).getId();
DevtypeExtend devtypeExtend = new DevtypeExtend();
devtypeExtend.setCity_weather(sysSummary.getCity_weather());
devtypeExtend.setE_sumid(id);
iDevtypeExtendService.save(devtypeExtend);
}
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK); return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} }
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
...@@ -133,6 +148,13 @@ public class SysSummaryController { ...@@ -133,6 +148,13 @@ public class SysSummaryController {
//monitorvideoService.saveOrUpdate(monitorvideo); //monitorvideoService.saveOrUpdate(monitorvideo);
//sysSummary.setRemark(monitorvideo.getV_id()); //sysSummary.setRemark(monitorvideo.getV_id());
//sysSummary.setSubitem(null); //sysSummary.setSubitem(null);
} else if (sysSummary.getType().equals("t_13")) {
DevtypeExtend devtypeExtend = new DevtypeExtend();
devtypeExtend.setCity_weather(sysSummary.getCity_weather());
devtypeExtend.setE_sumid(sysSummary.getId());
QueryWrapper<DevtypeExtend> devtypeExtendQueryWrapper = new QueryWrapper<>();
devtypeExtendQueryWrapper.eq("e_sumid", sysSummary.getId());
iDevtypeExtendService.saveOrUpdate(devtypeExtend, devtypeExtendQueryWrapper);
} }
sysSummary.setUpdatetime(LocalDateTime.now()); sysSummary.setUpdatetime(LocalDateTime.now());
boolean b = sysSummaryService.saveOrUpdate(sysSummary); boolean b = sysSummaryService.saveOrUpdate(sysSummary);
......
...@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -153,5 +154,21 @@ public class AbnormalController { ...@@ -153,5 +154,21 @@ public class AbnormalController {
tabAbnormalService.download(dataQueryCriteria, response, request); tabAbnormalService.download(dataQueryCriteria, response, request);
} }
@ApiOperation(value = "报警弹窗")
@GetMapping("alterAbnormal")
public ResponseEntity<Object> alterAbnormal() throws Exception {
List<Map> maps = tabAbnormalService.alterAbnormal();
return new ResponseEntity<>(new PageResult().success(maps), HttpStatus.OK);
}
@ApiOperation(value = "已阅读报警弹窗")
@PutMapping("alterAbnormal")
public ResponseEntity<Object> dealAlterAbnormal(@RequestBody Map map ) throws Exception {
Integer id = Integer.valueOf(map.get("id").toString());
tabAbnormalService.dealAlterAbnormal(id);
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
} }
...@@ -16,10 +16,10 @@ import me.zhengjie.gemho.service.tab.TabAbnormalService; ...@@ -16,10 +16,10 @@ import me.zhengjie.gemho.service.tab.TabAbnormalService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.DryVo; import me.zhengjie.gemho.x_datavo.tab.dry.DryVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.RedisUtils; import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
...@@ -79,7 +79,7 @@ public class DrybeachequipinforController { ...@@ -79,7 +79,7 @@ public class DrybeachequipinforController {
String format = simpleDateFormat.format(new Date()); String format = simpleDateFormat.format(new Date());
int i = new Random().nextInt(8999) + 1000; int i = new Random().nextInt(8999) + 1000;
String eqno = format + i; String eqno = format + i;
drybeachequipinfor.setEquipno(eqno); //drybeachequipinfor.setEquipno(eqno);
drybeachequipinfor.setCreatetime(new Date()); drybeachequipinfor.setCreatetime(new Date());
drybeachequipinfor.setUpdatetime(new Date()); drybeachequipinfor.setUpdatetime(new Date());
boolean save = drybeachequipinforService.save(drybeachequipinfor); boolean save = drybeachequipinforService.save(drybeachequipinfor);
...@@ -204,7 +204,7 @@ public class DrybeachequipinforController { ...@@ -204,7 +204,7 @@ public class DrybeachequipinforController {
//获取当前尾矿库 //获取当前尾矿库
String gettailno = onlineUserService.gettailno(currentUsername, request); String gettailno = onlineUserService.gettailno(currentUsername, request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>(); QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", gettailno); drybeachequipinforQueryWrapper.eq("tailingid", gettailno).ne("equipname","基准点");
List<Drybeachequipinfor> list = drybeachequipinforService.list(drybeachequipinforQueryWrapper); List<Drybeachequipinfor> list = drybeachequipinforService.list(drybeachequipinforQueryWrapper);
if (!list.isEmpty()) { if (!list.isEmpty()) {
for (Drybeachequipinfor drybeachequipinfor : list) { for (Drybeachequipinfor drybeachequipinfor : list) {
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.sys.SysSelectService; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.service.sys.SysSummaryService; import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.tab.MonitorvideoService; import me.zhengjie.gemho.service.tab.MonitorvideoService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -13,7 +13,7 @@ import me.zhengjie.gemho.util.PageResult; ...@@ -13,7 +13,7 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.ThrowableUtil; import me.zhengjie.utils.ThrowableUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -139,11 +139,8 @@ public class TailpondinforController { ...@@ -139,11 +139,8 @@ public class TailpondinforController {
public ResponseEntity<Object> updateone(@RequestBody Tailpondinfor tailpondinfor, HttpServletRequest request) { public ResponseEntity<Object> updateone(@RequestBody Tailpondinfor tailpondinfor, HttpServletRequest request) {
try { try {
boolean biaoji = false; boolean biaoji = false;
String replace = tailpondinfor.getSubtailingno().replace("_", "");
String tailingno = tailpondinfor.getTailingno(); String tailingno = tailpondinfor.getTailingno();
int length = tailingno.length(); int length = tailingno.length();
String s = tailingno.substring(length - 4, length);
tailpondinfor.setTailingno(replace + s);
tailpondinfor.setCreatetime(new Date()); tailpondinfor.setCreatetime(new Date());
tailpondinfor.setUpdatetime(new Date()); tailpondinfor.setUpdatetime(new Date());
int defaults = tailpondinfor.getDefaults(); int defaults = tailpondinfor.getDefaults();
......
...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.tab.Tailpondinfor; ...@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.tab.Tailpondinfor;
import me.zhengjie.gemho.service.tab.TailpondinforService; import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult; import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.x_datavo.weather.WeatherVo; import me.zhengjie.gemho.x_datavo.weather.WeatherVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -10,7 +10,7 @@ import me.zhengjie.gemho.util.PageResult; ...@@ -10,7 +10,7 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult; import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.web.MonitorChartVo; import me.zhengjie.gemho.x_datavo.web.MonitorChartVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -120,31 +120,7 @@ public class DbData implements Serializable { ...@@ -120,31 +120,7 @@ public class DbData implements Serializable {
@TableField(exist = false) @TableField(exist = false)
public String danwei; public String danwei;
public static void main(String[] args) { /*@TableField(exist = false)
LocalDateTime start = LocalDateTime.now(); public String alarmlevel;*/
LocalDateTime end = LocalDateTime.now().plusHours(1);
Duration duration = Duration.between(start, end);
// 相差的天数
long days = duration.toDays();
System.out.println("相差" + days + "天");
// 相差的小时数
long hours = duration.toHours();
System.out.println("相差" + hours + "小时");
// 相差的分钟数
long minutes = duration.toMinutes();
System.out.println("相差" + minutes + "分钟");
// 相差毫秒数
long millis = duration.toMillis();
System.out.println("相差" + millis + "毫秒");
// 相差的纳秒数
long nanos = duration.toNanos();
System.out.println("相差" + nanos + "纳秒");
}
} }
...@@ -112,6 +112,9 @@ public class DmData implements Serializable { ...@@ -112,6 +112,9 @@ public class DmData implements Serializable {
@ApiModelProperty(value = "报警级别") @ApiModelProperty(value = "报警级别")
public String bjjb; public String bjjb;
@TableField(exist = false)
public String cjvalue;
@TableField(exist = false) @TableField(exist = false)
private String jcziitemname; private String jcziitemname;
......
...@@ -43,6 +43,7 @@ public class AlarmState implements Serializable { ...@@ -43,6 +43,7 @@ public class AlarmState implements Serializable {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
@TableField("remark") @TableField("remark")
private String remark; private String remark;
private String color;
} }
...@@ -83,6 +83,8 @@ public class SysSummary implements Serializable { ...@@ -83,6 +83,8 @@ public class SysSummary implements Serializable {
private LocalDateTime updatetime; private LocalDateTime updatetime;
private int must; private int must;
@TableField(exist = false) @TableField(exist = false)
private String v_appkey; private String v_appkey;
@TableField(exist = false) @TableField(exist = false)
...@@ -99,6 +101,10 @@ public class SysSummary implements Serializable { ...@@ -99,6 +101,10 @@ public class SysSummary implements Serializable {
private String v_id; private String v_id;
@TableField(exist = false) @TableField(exist = false)
private String v_sumid; private String v_sumid;
@TableField(exist = false)
private String city_weather;
@TableField(exist = false)
private String e_sumid;
} }
...@@ -13,4 +13,5 @@ public class Children { ...@@ -13,4 +13,5 @@ public class Children {
private String subitem; private String subitem;
private String deviceid; private String deviceid;
private String values; private String values;
private String city_weather;
} }
package me.zhengjie.gemho.entity.tab; package me.zhengjie.gemho.entity.tab;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter; import lombok.Getter;
...@@ -80,6 +81,9 @@ public class Abnormal implements Serializable { ...@@ -80,6 +81,9 @@ public class Abnormal implements Serializable {
*/ */
private Date createtime; private Date createtime;
@TableField(exist = false)
private String unit;
/** /**
* 修改时间 * 修改时间
*/ */
......
...@@ -286,6 +286,8 @@ public class Drybeachequipinfor implements Serializable { ...@@ -286,6 +286,8 @@ public class Drybeachequipinfor implements Serializable {
*/ */
private Double jrx_coord_x; private Double jrx_coord_x;
private Integer sensortype;
/** /**
* 排水量流速(单位是m/s),只用于排水量,表示流速 * 排水量流速(单位是m/s),只用于排水量,表示流速
*/ */
......
...@@ -567,6 +567,10 @@ public class Tailpondinfor implements Serializable { ...@@ -567,6 +567,10 @@ public class Tailpondinfor implements Serializable {
@ApiModelProperty(value = "大屏标题") @ApiModelProperty(value = "大屏标题")
private String screen_title; private String screen_title;
private Integer risk_entrance;
private Integer logo;
/** /**
* 创建时间 * 创建时间
*/ */
......
...@@ -51,14 +51,14 @@ public class WebMonitorPoints implements Serializable { ...@@ -51,14 +51,14 @@ public class WebMonitorPoints implements Serializable {
@ApiModelProperty(value = "y位置") @ApiModelProperty(value = "y位置")
private Double y; private Double y;
@ApiModelProperty(value = "高度") /* @ApiModelProperty(value = "高度")
private Double height; private Double height;
@ApiModelProperty(value = "宽度") @ApiModelProperty(value = "宽度")
private Double width; private Double width;
@ApiModelProperty(value = "角度") @ApiModelProperty(value = "角度")
private Double angle; private Double angle;*/
@ApiModelProperty(value = "信息框位置") @ApiModelProperty(value = "信息框位置")
private String infoseat; private String infoseat;
......
package me.zhengjie.gemho.mapper.data; package me.zhengjie.gemho.mapper.data;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.data.DbData; import me.zhengjie.gemho.entity.data.DbData;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.HashMap; import java.util.HashMap;
...@@ -19,9 +22,12 @@ import java.util.List; ...@@ -19,9 +22,12 @@ import java.util.List;
@Mapper @Mapper
public interface DbDataMapper extends BaseMapper<DbData> { public interface DbDataMapper extends BaseMapper<DbData> {
@Select("SELECT * FROM (SELECT * FROM `tb_db_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select(value = "SELECT a.*,CASE WHEN b.alarmlevel IS NULL THEN 0 ELSE b.alarmlevel END AS alarmlevel from `tb_db_data` a left join tab_abnormal b on a.time =b.time ${ew.customSqlSegment} ")
Page<DbData> pageAll(Page<DbData> page, @Param("ew") Wrapper wrapper);
@Select("select a.* from tb_db_data a join (select max(time) as time ,sensorid from tb_db_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<DbData> dealmonth(String deviceid, String start, String end); List<DbData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.lenth as `lenth`,a.angle as angle ,a.safeheight as safeheight ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_db_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.lenth as `lenth`,a.angle as angle ,a.safeheight as safeheight ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_db_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_db_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -19,9 +19,9 @@ import java.util.List; ...@@ -19,9 +19,9 @@ import java.util.List;
@Mapper @Mapper
public interface DmDataMapper extends BaseMapper<DmData> { public interface DmDataMapper extends BaseMapper<DmData> {
@Select("SELECT * FROM (SELECT * FROM `tb_dm_data` ORDER BY time DESC)a where sensorid=#{sensorid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("select a.* from tb_dm_data a join (select max(time) as time ,sensorid from tb_dm_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{sensorid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<DmData> dealmonth(String sensorid, String start, String end); List<DmData> dealmonth(String sensorid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipname as sensorname,b.equipno equipno,a.dispA as dispA,a.dispB as dispB , DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_dm_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipname as sensorname,b.equipno equipno,a.dispA as dispA,a.dispB as dispB , DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_dm_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_dm_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC ")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -22,10 +22,10 @@ public interface MpDataMapper extends BaseMapper<MpData> { ...@@ -22,10 +22,10 @@ public interface MpDataMapper extends BaseMapper<MpData> {
/* @Results({ /* @Results({
@Result(column = "acceler_x", property = "accelerx", typeHandler = AESEncryptHandler.class) @Result(column = "acceler_x", property = "accelerx", typeHandler = AESEncryptHandler.class)
})*/ })*/
@Select("SELECT a.disp_x as dispx ,a.disp_y as dispy,a.disp_h as disph ,a.time as time FROM (SELECT * FROM `tb_mp_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("SELECT a.disp_x as dispx ,a.disp_y as dispy,a.disp_h as disph ,a.time as time FROM `tb_mp_data` a join(select max(time) as time ,sensorid from tb_mp_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<MpData> dealmonth(String deviceid, String start, String end); List<MpData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.disp_x as disp_x , a.disp_y as disp_y ,a.disp_h as disp_h ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_mp_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.disp_x as disp_x , a.disp_y as disp_y ,a.disp_h as disp_h ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_mp_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_mp_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -19,9 +19,9 @@ import java.util.List; ...@@ -19,9 +19,9 @@ import java.util.List;
@Mapper @Mapper
public interface PslDataMapper extends BaseMapper<PslData> { public interface PslDataMapper extends BaseMapper<PslData> {
@Select("SELECT * FROM (SELECT * FROM `tb_psl_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("select a.* from tb_psl_data a join (select max(time) as time ,sensorid from tb_psl_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<PslData> dealmonth(String deviceid, String start, String end); List<PslData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.pslvalue as `value`, DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m')as time from tb_psl_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.pslvalue as `value`, DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m')as time from tb_psl_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_psl_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -2,6 +2,7 @@ package me.zhengjie.gemho.mapper.data; ...@@ -2,6 +2,7 @@ package me.zhengjie.gemho.mapper.data;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.data.RgData; import me.zhengjie.gemho.entity.data.RgData;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -21,9 +22,14 @@ import java.util.List; ...@@ -21,9 +22,14 @@ import java.util.List;
@Mapper @Mapper
public interface RgDataMapper extends BaseMapper<RgData> { public interface RgDataMapper extends BaseMapper<RgData> {
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.rainfall as `rainfall` ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_rg_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") Page<RgData> pageAll(Page<RgData> page,@Param("ew") Wrapper wrapper);
@Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.rainfall as `rainfall` ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_rg_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_rg_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
@Select(value = "SELECT SUM(a.rainfall)as rainfall ,a.time FROM (select * from tb_rg_data ${ew.customSqlSegment})a GROUP BY a.time") @Select(value = "SELECT SUM(a.rainfall)as rainfall ,a.time FROM (select * from tb_rg_data ${ew.customSqlSegment})a GROUP BY a.time")
List<RgData> imgList(@Param("ew") Wrapper wrapper); List<RgData> imgList(@Param("ew") Wrapper wrapper);
List<RgData> week(String start, String end, String sensorid);
} }
...@@ -19,9 +19,9 @@ import java.util.List; ...@@ -19,9 +19,9 @@ import java.util.List;
@Mapper @Mapper
public interface SlDataMapper extends BaseMapper<SlData> { public interface SlDataMapper extends BaseMapper<SlData> {
@Select("SELECT * FROM (SELECT * FROM `tb_sl_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("select a.* from tb_sl_data a join (select max(time) as time ,sensorid from tb_sl_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<SlData> dealmonth(String deviceid, String start, String end); List<SlData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.sllvalue as `value`, DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_sl_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.sllvalue as `value`, DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_sl_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_sl_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -19,10 +19,10 @@ import java.util.List; ...@@ -19,10 +19,10 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface StDataMapper extends BaseMapper<StData> { public interface StDataMapper extends BaseMapper<StData> {
@Select("SELECT * FROM (SELECT * FROM `tb_st_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("select a.* from tb_sl_data a join (select max(time) as time ,sensorid from tb_sl_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<StData> dealmonth(String deviceid, String start, String end); List<StData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.stage as stage,a.depth as depth ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_st_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.stage as stage,a.depth as depth ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_st_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_sl_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
List<JrxDryVo> getStageDepth(List<String> sensorids); List<JrxDryVo> getStageDepth(List<String> sensorids);
......
...@@ -16,10 +16,10 @@ import java.util.List; ...@@ -16,10 +16,10 @@ import java.util.List;
* @since 2022-05-12 * @since 2022-05-12
*/ */
public interface WpbDataMapper extends BaseMapper<WpbData> { public interface WpbDataMapper extends BaseMapper<WpbData> {
@Select("SELECT * FROM (SELECT * FROM `tb_wpb_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("select a.* from tb_wpb_data a join (select max(time) as time ,sensorid from tb_wpb_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<WpbData> dealmonth(String deviceid, String start, String end); List<WpbData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.value as `value` ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_wpb_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.value as `value` ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_wpb_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_wpb_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -18,9 +18,9 @@ import java.util.List; ...@@ -18,9 +18,9 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface WtDataMapper extends BaseMapper<WtData> { public interface WtDataMapper extends BaseMapper<WtData> {
@Select("SELECT * FROM (SELECT * FROM `tb_wt_data` ORDER BY time DESC)a where sensorid=#{deviceid} and time>=#{start} and time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')") @Select("select a.* from tb_wt_data a join (select max(time) as time ,sensorid from tb_wt_data GROUP BY sensorid,DATE_FORMAT( time, '%y-%m-%d' ))b on a.time =b.time and a.sensorid=b.sensorid where a.sensorid=#{deviceid} and a.time>=#{start} and a.time <=#{end}GROUP BY DATE_FORMAT(a.time,'%y-%m-%d')")
List<WtData> dealmonth(String deviceid, String start, String end); List<WtData> dealmonth(String deviceid, String start, String end);
@Select(value = "SELECT r.* from(select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.stage as `stage` ,DATE_FORMAT(a.time,'%y-%m-%d %H:%m:%m') as time from tb_wt_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC) r GROUP BY r.sensorname") @Select(value = "select b.eqdanwei as eqdanwei,b.equipno equipno,b.equipname as sensorname,a.stage as `stage` ,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time from tb_wt_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno join (select max(time) as time ,sensorid from tb_wt_data GROUP BY sensorid) c on a.time =c.time and a.sensorid=c.sensorid where a.datasource =1 and b.tailingid=#{tailingid} ORDER BY time DESC")
List<HashMap<String, Object>> real(String tailingid); List<HashMap<String, Object>> real(String tailingid);
} }
...@@ -25,7 +25,7 @@ public interface SysSelectMapper extends BaseMapper<SysSelect> { ...@@ -25,7 +25,7 @@ public interface SysSelectMapper extends BaseMapper<SysSelect> {
@Select(value = "select sumid from sys_select where mdcode=#{mdcode} and tailno=#{tailno}") @Select(value = "select sumid from sys_select where mdcode=#{mdcode} and tailno=#{tailno}")
List<Integer> getcode(String mdcode, String tailno); List<Integer> getcode(String mdcode, String tailno);
@Select("select ss.id as id,sy.title as sumtitle,sy.ranges as `range` , sy.requrl as requrl,sy.type as type,sy.subitem as subitem ,ss.mdcode as mdcode ,sy.deviceid as deviceid ,sy.`values` as `values` from sys_select ss JOIN sys_summary sy on sy.id=ss.sumid where ss.tailno=#{tailno}") @Select("select ss.id as id,sy.title as sumtitle,sy.ranges as `range` , sy.requrl as requrl,sy.type as type,sy.subitem as subitem ,ss.mdcode as mdcode ,sy.deviceid as deviceid ,sy.`values` as `values`, te.city_weather as city_weather from sys_select ss JOIN sys_summary sy on sy.id=ss.sumid left join tab_devtype_extend te on sy.id=te.e_sumid where ss.tailno=#{tailno}")
List<Children> getchildren(String tailno); List<Children> getchildren(String tailno);
@Select(value = "SELECT a.id as id ,a.mdcode as mdcode ,a.sumid as sumid , a.tailno as tailno, b.title as sumtitle FROM sys_select a join sys_summary b on a.sumid=b.id where a.tailno=#{gettailno}") @Select(value = "SELECT a.id as id ,a.mdcode as mdcode ,a.sumid as sumid , a.tailno as tailno, b.title as sumtitle FROM sys_select a join sys_summary b on a.sumid=b.id where a.tailno=#{gettailno}")
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.dic.Dic; import me.zhengjie.gemho.entity.dic.Dic;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor; import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.x_datavo.tab.dry.LevelVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
...@@ -43,7 +44,7 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor> ...@@ -43,7 +44,7 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor>
@Select(value = "select equipno as value ,equipname as name from tb_drybeachequipinfor") @Select(value = "select equipno as value ,equipname as name from tb_drybeachequipinfor")
ArrayList<HashMap<String, String>> getDryCode(); ArrayList<HashMap<String, String>> getDryCode();
@Select(value = "select count(id) from tb_drybeachequipinfor where tailingid=#{tailingid}") @Select(value = "select count(id) from tb_drybeachequipinfor where tailingid=#{tailingid} and equipname!='基准点'")
int getallcount(String equipno); int getallcount(String equipno);
@Select("SELECT count(distinct sensorid)AS `online` from tb_db_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno WHERE a.time >=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%m-%d') and b.tailingid=#{tailingid}" + @Select("SELECT count(distinct sensorid)AS `online` from tb_db_data a join tb_drybeachequipinfor b on a.sensorid=b.equipno WHERE a.time >=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%m-%d') and b.tailingid=#{tailingid}" +
...@@ -73,16 +74,16 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor> ...@@ -73,16 +74,16 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor>
@Select(value = "select equipno from tb_drybeachequipinfor where tailingid =#{tailno}") @Select(value = "select equipno from tb_drybeachequipinfor where tailingid =#{tailno}")
List<String> getequipno(String tailno); List<String> getequipno(String tailno);
@Select(value = "select equipno as id ,equipname as name from tb_drybeachequipinfor where tailingid =#{tailno}") @Select(value = "select equipno as id ,equipname as name from tb_drybeachequipinfor where tailingid =#{tailno} and equipname !='基准点'")
List<HashMap<String, Object>> getDevice(String tailingid); List<HashMap<String, Object>> getDevice(String tailingid);
@Select(value = "<script>" + @Select(value = "<script>" +
"select equipno, equipname, onelevelalarm, twolevelalarm, threelevelalarm, fourlevelalarm from tb_drybeachequipinfor where tailingid = #{tailingid}" + "select equipno, equipname, onelevelalarm, twolevelalarm, threelevelalarm, fourlevelalarm,eqdanwei as unit from tb_drybeachequipinfor where tailingid = #{tailingid}" +
" <if test='searchValue!=\"\" and searchValue!=null '>\n" + " <if test='searchValue!=\"\" and searchValue!=null '>\n" +
" and equipname like CONCAT('%',#{searchValue},'%')\n" + " and equipname like CONCAT('%',#{searchValue},'%')\n" +
" </if>" + " </if>" +
"</script>") "</script>")
Page<HashMap<String, Object>> level(Page page, String tailingid, String searchName, String searchValue); Page<LevelVo> level(Page page, String tailingid, String searchName, String searchValue);
int dealLevel(@Param(value = "equipno") String equipno, @Param(value = "onelevelalarm") String onelevelalarm, @Param(value = "twolevelalarm") String twolevelalarm, @Param(value = "threelevelalarm") String threelevelalarm, @Param(value = "fourlevelalarm") String fourlevelalarm); int dealLevel(@Param(value = "equipno") String equipno, @Param(value = "onelevelalarm") String onelevelalarm, @Param(value = "twolevelalarm") String twolevelalarm, @Param(value = "threelevelalarm") String threelevelalarm, @Param(value = "fourlevelalarm") String fourlevelalarm);
......
...@@ -15,5 +15,5 @@ import java.util.List; ...@@ -15,5 +15,5 @@ import java.util.List;
*/ */
public interface JrxStepsMapper extends BaseMapper<JrxSteps> { public interface JrxStepsMapper extends BaseMapper<JrxSteps> {
List<JrxSteps> getByCode(Integer code); List<JrxSteps> getByCode(String code);
} }
package me.zhengjie.gemho.mapper.tab; package me.zhengjie.gemho.mapper.tab;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.tab.Abnormal; import me.zhengjie.gemho.entity.tab.Abnormal;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -10,6 +12,7 @@ import org.apache.ibatis.annotations.Update; ...@@ -10,6 +12,7 @@ import org.apache.ibatis.annotations.Update;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -22,10 +25,14 @@ import java.util.List; ...@@ -22,10 +25,14 @@ import java.util.List;
@Mapper @Mapper
public interface TabAbnormalMapper extends BaseMapper<Abnormal> { public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
@Select(value = "SELECT a.*,b.eqdanwei as unit from `tab_abnormal` a join tb_drybeachequipinfor b on a.equipno =b.equipno ${ew.customSqlSegment} ")
Page<Abnormal> pageAll(Page<Abnormal> page, @Param("ew") Wrapper wrapper);
@Select(value = "select ta.equipno as equipno , ta.evalue as evalue , ta.alarmlevel as alarmlevel ,td.equipname ,td.eqdanwei as eqdanwei ,DATE_FORMAT(ta.time,'%Y-%m-%d %H:%i:%s') as time from tab_abnormal ta join tb_drybeachequipinfor td on ta.equipno = td.equipno where ta.state='1' and td.tailingid=#{tailingid} ORDER BY ta.time DESC") @Select(value = "select ta.equipno as equipno , ta.evalue as evalue , ta.alarmlevel as alarmlevel ,td.equipname ,td.eqdanwei as eqdanwei ,DATE_FORMAT(ta.time,'%Y-%m-%d %H:%i:%s') as time from tab_abnormal ta join tb_drybeachequipinfor td on ta.equipno = td.equipno where ta.state='1' and td.tailingid=#{tailingid} ORDER BY ta.time DESC")
ArrayList<HashMap<String, Object>> getalarminfo(String tailingid); ArrayList<HashMap<String, Object>> getalarminfo(String tailingid);
@Update(value = "update tab_abnormal set state = '0' ,jcreason= #{jcreason},jcbjtime=#{jcbjtime},reason=#{reason} where equipno =#{equipno}") @Update(value = "update tab_abnormal set state = '0' ,jcreason= #{jcreason},jcbjtime=#{jcbjtime},reason=#{reason},ifselect=1 where equipno =#{equipno}")
int jcbj(@Param(value = "jcreason") String jcreason, int jcbj(@Param(value = "jcreason") String jcreason,
@Param(value = "jcbjtime") String jcbjtime, @Param(value = "jcbjtime") String jcbjtime,
@Param(value = "reason") String reason, @Param(value = "reason") String reason,
...@@ -85,4 +92,12 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> { ...@@ -85,4 +92,12 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
List<HashMap<String, Object>> monthtj(String tailingid); List<HashMap<String, Object>> monthtj(String tailingid);
List<HashMap<String, Object>> realalarm(); List<HashMap<String, Object>> realalarm();
@Update(value = "${jcsql}")
int jchistory(String jcsql);
@Select(value = "select b.equipname as equipname,a.id as id,a.equipno,DATE_FORMAT(a.time,'%Y-%m-%d %H:%i:%m') as time,a.evalue,a.alarmlevel,b.eqdanwei as unit from `tab_abnormal` a join tb_drybeachequipinfor b on a.equipno =b.equipno where ifselect=0 and a.state = 1 and b.tailingid = #{tailingid} ")
List<Map> alterAbnormal(String tailingid);
int updateIfselect(Integer id);
} }
...@@ -49,7 +49,7 @@ public interface TailpondinforMapper extends BaseMapper<Tailpondinfor> { ...@@ -49,7 +49,7 @@ public interface TailpondinforMapper extends BaseMapper<Tailpondinfor> {
@Select(value = "SELECT * from tb_tailpondinfor ") @Select(value = "SELECT * from tb_tailpondinfor ")
List<Tailpondinfor> tailpons(); List<Tailpondinfor> tailpons();
@Select(value = "select tailingname FROM tb_tailpondinfor where tailingno=#{tailingno}") @Select(value = "select tailingname,risk_entrance FROM tb_tailpondinfor where tailingno=#{tailingno}")
HashMap<String, Object> getzuobiao(String tailingno); HashMap<String, Object> getzuobiao(String tailingno);
/** /**
......
...@@ -18,7 +18,7 @@ import java.util.List; ...@@ -18,7 +18,7 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface WebMonitorPointsMapper extends BaseMapper<WebMonitorPoints> { public interface WebMonitorPointsMapper extends BaseMapper<WebMonitorPoints> {
@Select(value = "SELECT * FROM web_monitor_points where chartid=#{chartid}") //@Select(value = "SELECT * FROM web_monitor_points where chartid=#{chartid}")
List<WebMonitorPointsVo> getbycid(int chartid); List<WebMonitorPointsVo> getbycid(int chartid);
int deletepoints(String guid); int deletepoints(String guid);
......
...@@ -79,6 +79,8 @@ public interface DbDataService extends IService<DbData> { ...@@ -79,6 +79,8 @@ public interface DbDataService extends IService<DbData> {
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
/*** /***
* 导出干滩表格 * 导出干滩表格
*/ */
......
...@@ -69,6 +69,8 @@ public interface DmDataService extends IService<DmData> { ...@@ -69,6 +69,8 @@ public interface DmDataService extends IService<DmData> {
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
/** /**
* 图表数据与 * 图表数据与
* *
......
...@@ -60,6 +60,7 @@ public interface MpDataService extends IService<MpData> { ...@@ -60,6 +60,7 @@ public interface MpDataService extends IService<MpData> {
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
/** /**
* 分页历史 * 分页历史
* *
......
...@@ -81,4 +81,6 @@ public interface PslDataService extends IService<PslData> { ...@@ -81,4 +81,6 @@ public interface PslDataService extends IService<PslData> {
* @return * @return
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
} }
...@@ -79,4 +79,6 @@ public interface RgDataService extends IService<RgData> { ...@@ -79,4 +79,6 @@ public interface RgDataService extends IService<RgData> {
* @return * @return
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
} }
...@@ -77,4 +77,6 @@ public interface SlDataService extends IService<SlData> { ...@@ -77,4 +77,6 @@ public interface SlDataService extends IService<SlData> {
* @return * @return
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
} }
...@@ -71,6 +71,8 @@ public interface StDataService extends IService<StData> { ...@@ -71,6 +71,8 @@ public interface StDataService extends IService<StData> {
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
/** /**
* 图表数据 * 图表数据
* *
......
...@@ -83,5 +83,7 @@ public interface WpbDataService extends IService<WpbData> { ...@@ -83,5 +83,7 @@ public interface WpbDataService extends IService<WpbData> {
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
} }
...@@ -81,4 +81,6 @@ public interface WtDataService extends IService<WtData> { ...@@ -81,4 +81,6 @@ public interface WtDataService extends IService<WtData> {
* @return * @return
*/ */
List<RealDataVo> real(String equipno, HttpServletRequest request); List<RealDataVo> real(String equipno, HttpServletRequest request);
List<RealDataVo> real(String equipno, HttpServletRequest request,String tailInfoNo);
} }
...@@ -51,11 +51,11 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -51,11 +51,11 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
private final ArtificialDataMapper artificialDataMapper; private final ArtificialDataMapper artificialDataMapper;
private final JczxMapper jczxMapper; private final JczxMapper jczxMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -87,7 +87,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -87,7 +87,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
Result result = new Result(); Result result = new Result();
if (!dbData1.isEmpty()) { if (!dbData1.isEmpty()) {
for (DbData data1 : dbData1) { for (DbData data1 : dbData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field declaredField : data1.getClass().getDeclaredFields()) { for (Field declaredField : data1.getClass().getDeclaredFields()) {
if (declaredField.getName().equals(dbdata)) { if (declaredField.getName().equals(dbdata)) {
...@@ -163,6 +163,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -163,6 +163,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
//遍历时间 //遍历时间
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(dbdata, 0.0); hashMap.put(dbdata, 0.0);
...@@ -174,6 +175,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -174,6 +175,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
for (Field declaredField : data1.getClass().getDeclaredFields()) { for (Field declaredField : data1.getClass().getDeclaredFields()) {
if (declaredField.getName().equals(dbdata)) { if (declaredField.getName().equals(dbdata)) {
hashMap.put(dbdata, Double.parseDouble((String) declaredField.get(data1))); hashMap.put(dbdata, Double.parseDouble((String) declaredField.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -182,7 +184,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -182,7 +184,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
} }
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap); result.setValues(hashMap);
result.setDate(parse); result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
} }
...@@ -231,6 +233,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -231,6 +233,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
//遍历时间 //遍历时间
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(dbdata, 0.0); hashMap.put(dbdata, 0.0);
...@@ -242,6 +245,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -242,6 +245,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
for (Field declaredField : data1.getClass().getDeclaredFields()) { for (Field declaredField : data1.getClass().getDeclaredFields()) {
if (declaredField.getName().equals(dbdata)) { if (declaredField.getName().equals(dbdata)) {
hashMap.put(dbdata, Double.parseDouble((String) declaredField.get(data1))); hashMap.put(dbdata, Double.parseDouble((String) declaredField.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -250,7 +254,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -250,7 +254,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
} }
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap); result.setValues(hashMap);
result.setDate(parse); result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
} }
...@@ -413,6 +417,35 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme ...@@ -413,6 +417,35 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = dbDataMapper.real(tailInfoNo);
HashMap<String, List<Map>> realdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = realdata.get("dbdata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
@Override @Override
public void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response, HttpServletRequest request) throws IOException { public void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response, HttpServletRequest request) throws IOException {
//获取数据 //获取数据
......
...@@ -43,11 +43,11 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -43,11 +43,11 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
private DmDataMapper dmDataMapper; private DmDataMapper dmDataMapper;
@Autowired @Autowired
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -86,7 +86,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -86,7 +86,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
} }
if (!dmData1.isEmpty()) { if (!dmData1.isEmpty()) {
for (DmData data1 : dmData1) { for (DmData data1 : dmData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
for (String dmdatum : dmdata) { for (String dmdatum : dmdata) {
...@@ -169,6 +169,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -169,6 +169,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
// List<DmData> dmData2 = dmDataMapper.dealmonth(deviceid, s, s1, 0); // List<DmData> dmData2 = dmDataMapper.dealmonth(deviceid, s, s1, 0);
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
for (String dmdatum : dmdata) { for (String dmdatum : dmdata) {
...@@ -184,6 +185,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -184,6 +185,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
String name = field.getName(); String name = field.getName();
if (dmdatum.equals(name)) { if (dmdatum.equals(name)) {
hashMap.put(dmdatum, Double.parseDouble((String) field.get(data1))); hashMap.put(dmdatum, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
} }
...@@ -209,8 +211,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -209,8 +211,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap); result.setValues(hashMap);
result.setDate(parse); result.setDate(rgdate);
String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
} }
...@@ -224,6 +225,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -224,6 +225,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
dataVo.setNames(nameVos); dataVo.setNames(nameVos);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
System.out.println("e = " + e.getMessage());
} }
return dataVo; return dataVo;
} }
...@@ -260,6 +262,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -260,6 +262,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
// List<DmData> dmData2 = dmDataMapper.dealmonth(deviceid, s, s1, 0); // List<DmData> dmData2 = dmDataMapper.dealmonth(deviceid, s, s1, 0);
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
for (String dmdatum : dmdata) { for (String dmdatum : dmdata) {
...@@ -274,6 +277,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -274,6 +277,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
for (String dmdatum : dmdata) { for (String dmdatum : dmdata) {
if (dmdatum.equals(field.getName())) { if (dmdatum.equals(field.getName())) {
hashMap.put(dmdatum, Double.parseDouble((String) field.get(data1))); hashMap.put(dmdatum, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
} }
...@@ -298,7 +302,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -298,7 +302,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap); result.setValues(hashMap);
result.setDate(parse); result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
} }
...@@ -331,6 +335,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -331,6 +335,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
//获取编码-名字map //获取编码-名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request); HashMap<String, String> noName = ServiceUtil.getNoName(request);
HashMap<String, String> noDan = ServiceUtil.getNoDan(request); HashMap<String, String> noDan = ServiceUtil.getNoDan(request);
HashMap<String, Integer> sensorType = ServiceUtil.getSensorType();
//处理人工监测数据 //处理人工监测数据
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria); String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) { if (checkArtificial != null) {
...@@ -359,8 +364,17 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -359,8 +364,17 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
} }
} else { } else {
for (DmData record : records) { for (DmData record : records) {
Integer integer = sensorType.get(record.getSensorid());
record.setSensorname(noName.get(record.getSensorid())); record.setSensorname(noName.get(record.getSensorid()));
record.setDanwei(noDan.get(record.getSensorid())); record.setDanwei(noDan.get(record.getSensorid()));
if(!ObjectUtils.isEmpty(integer)){
if (3 == integer) {
String dispB = record.getDispB();
record.setCjvalue(dispB);
record.setDispA("");
record.setDispB("");
}
}
} }
} }
map.put("list", records); map.put("list", records);
...@@ -401,6 +415,35 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -401,6 +415,35 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = dmDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("dmdata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
@Override @Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode(); String code = dataQueryCriteria.getCode();
...@@ -418,14 +461,22 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme ...@@ -418,14 +461,22 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>(); QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(dmDataQueryWrapper, dataQueryCriteria); ServiceUtil.imgQuery(dmDataQueryWrapper, dataQueryCriteria);
List<DmData> dmData = dmDataMapper.selectList(dmDataQueryWrapper); List<DmData> dmData = dmDataMapper.selectList(dmDataQueryWrapper);
HashMap<String, Integer> sensorType = ServiceUtil.getSensorType();
//获取编码-名 //获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request); HashMap<String, String> noName = ServiceUtil.getNoName(request);
HashMap<String, String> noDan = ServiceUtil.getNoDan(request); HashMap<String, String> noDan = ServiceUtil.getNoDan(request);
String sensorname = noName.get(dataQueryCriteria.getCode()); String sensorname = noName.get(dataQueryCriteria.getCode());
Integer sensortype = sensorType.get(dataQueryCriteria.getCode());
String danwei = noDan.get(dataQueryCriteria.getCode()); String danwei = noDan.get(dataQueryCriteria.getCode());
ImgDataVo imgDataVo = new ImgDataVo();
if (3 == sensortype) {
//处理封装数据
imgDataVo = ServiceUtil.deal("dmdata1", sensorname, dmData, danwei);
} else {
//处理封装数据 //处理封装数据
ImgDataVo dmdata = ServiceUtil.deal("dmdata", sensorname, dmData, danwei); imgDataVo = ServiceUtil.deal("dmdata", sensorname, dmData, danwei);
return dmdata; }
return imgDataVo;
} }
public String deal(Date date) throws ParseException { public String deal(Date date) throws ParseException {
......
...@@ -46,11 +46,11 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -46,11 +46,11 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
@Autowired @Autowired
private ArtificialDataMapper artificialDataMapper; private ArtificialDataMapper artificialDataMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid) { public DataVo day(String date, String values, String deviceid) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//构建返回对象 //构建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<NameVo> nameVos = new ArrayList<>(); ArrayList<NameVo> nameVos = new ArrayList<>();
...@@ -92,7 +92,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -92,7 +92,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
//遍历实时数据 //遍历实时数据
if (!mpData1.isEmpty()) { if (!mpData1.isEmpty()) {
for (MpData data1 : mpData1) { for (MpData data1 : mpData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (String mpdata : mpdatas) { for (String mpdata : mpdatas) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
...@@ -151,7 +151,6 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -151,7 +151,6 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
public DataVo week(String date, String values, String deviceid) { public DataVo week(String date, String values, String deviceid) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<NameVo> nameVos = new ArrayList<>(); ArrayList<NameVo> nameVos = new ArrayList<>();
...@@ -179,6 +178,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -179,6 +178,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
//获取时间区间的人工巡检数据 //获取时间区间的人工巡检数据
//List<MpData> mpData2 = mpDataMapper.dealmonth(deviceid, s, s1, 0); //List<MpData> mpData2 = mpDataMapper.dealmonth(deviceid, s, s1, 0);
for (String weekBetweenDate : weekBetweenDates) { for (String weekBetweenDate : weekBetweenDates) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
for (String mpdata : mpdatas) { for (String mpdata : mpdatas) {
...@@ -194,6 +194,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -194,6 +194,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (mpdata.equals(field.getName())) { if (mpdata.equals(field.getName())) {
hashMap.put(mpdata, Double.parseDouble((String) field.get(data1))); hashMap.put(mpdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
} }
...@@ -219,7 +220,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -219,7 +220,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
}*/ }*/
Date parse = sdf.parse(weekBetweenDate); Date parse = sdf.parse(weekBetweenDate);
String deal = deal(parse); String deal = deal(parse);
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2]); result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2]);
//result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2] + "日"); //result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2] + "日");
...@@ -246,7 +247,6 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -246,7 +247,6 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
public DataVo month(String date, String values, String deviceid) { public DataVo month(String date, String values, String deviceid) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<NameVo> nameVos = new ArrayList<>(); ArrayList<NameVo> nameVos = new ArrayList<>();
...@@ -274,6 +274,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -274,6 +274,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
//获取时间区间的人工巡检数据 //获取时间区间的人工巡检数据
//List<MpData> mpData2 = mpDataMapper.dealmonth(deviceid, s, s1, 0); //List<MpData> mpData2 = mpDataMapper.dealmonth(deviceid, s, s1, 0);
for (String weekBetweenDate : weekBetweenDates) { for (String weekBetweenDate : weekBetweenDates) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
for (String mpdata : mpdatas) { for (String mpdata : mpdatas) {
...@@ -289,6 +290,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -289,6 +290,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (mpdata.equals(field.getName())) { if (mpdata.equals(field.getName())) {
hashMap.put(mpdata, Double.parseDouble((String) field.get(data1))); hashMap.put(mpdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
} }
...@@ -313,7 +315,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -313,7 +315,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
} }
}*/ }*/
Date parse = sdf.parse(weekBetweenDate); Date parse = sdf.parse(weekBetweenDate);
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2]); result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2]);
results.add(result); results.add(result);
...@@ -433,6 +435,35 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme ...@@ -433,6 +435,35 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = mpDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("mpdata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
@Override @Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode(); String code = dataQueryCriteria.getCode();
......
...@@ -43,12 +43,12 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -43,12 +43,12 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
private PslDataMapper pslDataMapper; private PslDataMapper pslDataMapper;
@Autowired @Autowired
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -86,7 +86,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -86,7 +86,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
//hashMap.put("p_" + psldata, 0.0); //hashMap.put("p_" + psldata, 0.0);
if (!pslData1.isEmpty()) { if (!pslData1.isEmpty()) {
for (PslData data1 : pslData1) { for (PslData data1 : pslData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (psldata.equals(field.getName())) { if (psldata.equals(field.getName())) {
...@@ -164,6 +164,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -164,6 +164,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
//List<PslData> pslData2 = pslDataMapper.dealmonth(deviceid, s, s1, 0); //List<PslData> pslData2 = pslDataMapper.dealmonth(deviceid, s, s1, 0);
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(psldata, 0.0); hashMap.put(psldata, 0.0);
...@@ -175,6 +176,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -175,6 +176,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (psldata.equals(field.getName())) { if (psldata.equals(field.getName())) {
hashMap.put(psldata, Double.parseDouble((String) field.get(data1))); hashMap.put(psldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -195,7 +197,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -195,7 +197,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
String deal = deal(parse); String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
...@@ -246,6 +248,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -246,6 +248,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
List<PslData> pslData1 = pslDataMapper.dealmonth(deviceid, s, s1); List<PslData> pslData1 = pslDataMapper.dealmonth(deviceid, s, s1);
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(psldata, 0.0); hashMap.put(psldata, 0.0);
...@@ -257,6 +260,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -257,6 +260,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (psldata.equals(field.getName())) { if (psldata.equals(field.getName())) {
hashMap.put(psldata, Double.parseDouble((String) field.get(data1))); hashMap.put(psldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -264,7 +268,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -264,7 +268,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
} }
} }
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
...@@ -427,6 +431,34 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl ...@@ -427,6 +431,34 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = pslDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("psldata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
public String deal(Date date) throws ParseException { public String deal(Date date) throws ParseException {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"}; String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
......
...@@ -43,7 +43,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -43,7 +43,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
private SlDataMapper slDataMapper; private SlDataMapper slDataMapper;
@Autowired @Autowired
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
/** /**
* 日统计 * 日统计
* *
...@@ -56,7 +56,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -56,7 +56,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -94,7 +94,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -94,7 +94,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
// hashMap.put("p_" + sldata, 0.0); // hashMap.put("p_" + sldata, 0.0);
if (!slData1.isEmpty()) { if (!slData1.isEmpty()) {
for (SlData data1 : slData1) { for (SlData data1 : slData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (sldata.equals(field.getName())) { if (sldata.equals(field.getName())) {
...@@ -181,6 +181,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -181,6 +181,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
//获取时间区间的时间 //获取时间区间的时间
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(sldata, 0.0); hashMap.put(sldata, 0.0);
...@@ -192,6 +193,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -192,6 +193,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (sldata.equals(field.getName())) { if (sldata.equals(field.getName())) {
hashMap.put(sldata, Double.parseDouble((String) field.get(data1))); hashMap.put(sldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -212,7 +214,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -212,7 +214,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
String deal = deal(parse); String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
result.setValues(hashMap); result.setValues(hashMap);
...@@ -275,6 +277,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -275,6 +277,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
//获取时间区间的时间 //获取时间区间的时间
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(sldata, 0.0); hashMap.put(sldata, 0.0);
...@@ -286,6 +289,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -286,6 +289,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (sldata.equals(field.getName())) { if (sldata.equals(field.getName())) {
hashMap.put(sldata, Double.parseDouble((String) field.get(data1))); hashMap.put(sldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -306,7 +310,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -306,7 +310,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
result.setValues(hashMap); result.setValues(hashMap);
results.add(result); results.add(result);
...@@ -468,6 +472,35 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme ...@@ -468,6 +472,35 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<RealDataVo> realDataVos = new ArrayList<>();
List<HashMap<String, Object>> reals = slDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("sldata");
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
public String deal(Date date) throws ParseException { public String deal(Date date) throws ParseException {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"}; String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
...@@ -43,11 +43,11 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -43,11 +43,11 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
private StDataMapper stDataMapper; private StDataMapper stDataMapper;
@Autowired @Autowired
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -84,7 +84,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -84,7 +84,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
// hashMap.put("p_" + stdata, 0.0); // hashMap.put("p_" + stdata, 0.0);
if (!stData1.isEmpty()) { if (!stData1.isEmpty()) {
for (StData data1 : stData1) { for (StData data1 : stData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (stdata.equals(field.getName())) { if (stdata.equals(field.getName())) {
...@@ -161,6 +161,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -161,6 +161,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
//获取时间区间的时间 //获取时间区间的时间
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(stdata, 0.0); hashMap.put(stdata, 0.0);
...@@ -172,6 +173,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -172,6 +173,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (stdata.equals(field.getName())) { if (stdata.equals(field.getName())) {
hashMap.put(stdata, Double.parseDouble((String) field.get(data1))); hashMap.put(stdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -193,7 +195,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -193,7 +195,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap); result.setValues(hashMap);
result.setDate(parse); result.setDate(rgdate);
//String deal = deal(parse); //String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
...@@ -245,6 +247,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -245,6 +247,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
//获取时间区间的时间 //获取时间区间的时间
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(stdata, 0.0); hashMap.put(stdata, 0.0);
...@@ -256,6 +259,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -256,6 +259,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (stdata.equals(field.getName())) { if (stdata.equals(field.getName())) {
hashMap.put(stdata, Double.parseDouble((String) field.get(data1))); hashMap.put(stdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -277,7 +281,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -277,7 +281,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap); result.setValues(hashMap);
result.setDate(parse); result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
} }
...@@ -331,6 +335,35 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme ...@@ -331,6 +335,35 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = stDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("stdata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
@SneakyThrows @SneakyThrows
@Override @Override
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
......
...@@ -35,7 +35,7 @@ public class SzDataServiceImpl extends ServiceImpl<SzDataMapper, SzData> impleme ...@@ -35,7 +35,7 @@ public class SzDataServiceImpl extends ServiceImpl<SzDataMapper, SzData> impleme
private static String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"}; private static String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Autowired @Autowired
private SzDataMapper szDataMapper; private SzDataMapper szDataMapper;
@Autowired @Autowired
......
...@@ -42,12 +42,12 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -42,12 +42,12 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
private WpbDataMapper wpbDataMapper; private WpbDataMapper wpbDataMapper;
@Autowired @Autowired
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -84,7 +84,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -84,7 +84,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
//hashMap.put("p_" + wpbdata, 0.0); //hashMap.put("p_" + wpbdata, 0.0);
if (!wpbData1.isEmpty()) { if (!wpbData1.isEmpty()) {
for (WpbData data1 : wpbData1) { for (WpbData data1 : wpbData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (wpbdata.equals(field.getName())) { if (wpbdata.equals(field.getName())) {
...@@ -161,6 +161,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -161,6 +161,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
//获取时间区间 //获取时间区间
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
//hashMap.put(wpbdata, 0.0); //hashMap.put(wpbdata, 0.0);
...@@ -172,6 +173,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -172,6 +173,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (wpbdata.equals(field.getName())) { if (wpbdata.equals(field.getName())) {
hashMap.put(wpbdata, Double.parseDouble((String) field.get(data1))); hashMap.put(wpbdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
} }
...@@ -191,7 +193,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -191,7 +193,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
...@@ -244,6 +246,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -244,6 +246,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
//获取时间区间 //获取时间区间
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(wpbdata, 0.0); hashMap.put(wpbdata, 0.0);
...@@ -257,6 +260,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -257,6 +260,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (wpbdata.equals(field.getName())) { if (wpbdata.equals(field.getName())) {
hashMap.put(wpbdata, Double.parseDouble((String) field.get(data1))); hashMap.put(wpbdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -277,7 +281,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -277,7 +281,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
...@@ -440,4 +444,33 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl ...@@ -440,4 +444,33 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
} }
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = wpbDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("wpbdata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
} }
...@@ -43,12 +43,12 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -43,12 +43,12 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
private WtDataMapper wtDataMapper; private WtDataMapper wtDataMapper;
@Autowired @Autowired
private DrybeachequipinforMapper drybeachequipinforMapper; private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override @Override
public DataVo day(String date, String values, String deviceid, String subitem) { public DataVo day(String date, String values, String deviceid, String subitem) {
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH"); SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象 //创建返回对象
DataVo dataVo = new DataVo(); DataVo dataVo = new DataVo();
ArrayList<Result> results = new ArrayList<>(); ArrayList<Result> results = new ArrayList<>();
...@@ -85,7 +85,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -85,7 +85,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
//hashMap.put("p_" + wtdata, 0.0); //hashMap.put("p_" + wtdata, 0.0);
if (!wtData1.isEmpty()) { if (!wtData1.isEmpty()) {
for (WtData data1 : wtData1) { for (WtData data1 : wtData1) {
String format = sdf2.format(data1.getTime()); String format = sdf3.format(data1.getTime());
if (string.equals(format)) { if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (wtdata.equals(field.getName())) { if (wtdata.equals(field.getName())) {
...@@ -162,6 +162,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -162,6 +162,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
//获取时间区间 //获取时间区间
List<String> strings = DateUtil.getWeekBetweenDates(start, end); List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
//hashMap.put(wtdata, 0.0); //hashMap.put(wtdata, 0.0);
...@@ -173,6 +174,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -173,6 +174,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (wtdata.equals(field.getName())) { if (wtdata.equals(field.getName())) {
hashMap.put(wtdata, Double.parseDouble((String) field.get(data1))); hashMap.put(wtdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
} }
...@@ -192,7 +194,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -192,7 +194,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
String deal = deal(parse); String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
...@@ -246,6 +248,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -246,6 +248,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
//获取时间区间 //获取时间区间
List<String> strings = DateUtil.getMonthBetweenDates(start, end); List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) { for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result(); Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>(); HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(wtdata, 0.0); hashMap.put(wtdata, 0.0);
...@@ -259,6 +262,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -259,6 +262,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
for (Field field : data1.getClass().getDeclaredFields()) { for (Field field : data1.getClass().getDeclaredFields()) {
if (wtdata.equals(field.getName())) { if (wtdata.equals(field.getName())) {
hashMap.put(wtdata, Double.parseDouble((String) field.get(data1))); hashMap.put(wtdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
} }
} }
break; break;
...@@ -279,7 +283,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -279,7 +283,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
} }
}*/ }*/
Date parse = sdf1.parse(string + " 00:00:00"); Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse); result.setDate(rgdate);
result.setValues(hashMap); result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]); result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result); results.add(result);
...@@ -442,6 +446,35 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme ...@@ -442,6 +446,35 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
return realDataVos; return realDataVos;
} }
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = wtDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("wtdata");
ArrayList<RealDataVo> realDataVos = new ArrayList<>();
for (int i = 0; i < reals.size(); i++) {
HashMap<String, Object> real = reals.get(i);
String sensorname = (String) real.get("sensorname");
String eqdanwei = (String) real.get("eqdanwei");
String equipno = (String) real.get("equipno");
String time = (String) real.get("time");
real.remove("time");
real.remove("equipno");
real.remove("sensorname");
real.remove("eqdanwei");
RealDataVo realDataVo = new RealDataVo();
realDataVo.setTime(time);
realDataVo.setEquipno(equipno);
realDataVo.setData(real);
realDataVo.setKeys(keys1);
realDataVo.setName(sensorname);
realDataVo.setType(equipno1);
realDataVo.setEqdanwei(eqdanwei);
realDataVos.add(realDataVo);
}
return realDataVos;
}
public String deal(Date date) throws ParseException { public String deal(Date date) throws ParseException {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"}; String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
package me.zhengjie.gemho.service.sys; package me.zhengjie.gemho.service.sys;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.sys.SysArea;
import me.zhengjie.gemho.entity.sys.SysSelect; import me.zhengjie.gemho.entity.sys.SysSelect;
import me.zhengjie.gemho.entity.sys.SysArea;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
......
var devices = [];
var dmId = '';
var hdId = '';
var deviceData = [];
var box1Alarm = 0;
$(function () {
$.ajax({
type: "GET",
url: baseURL + "hangdao/getList",
contentType: "application/json",
async: false,
success: function (r) {
$(".nav-tabs").empty();
var tab = '';
for (var i = 0; i < r.length; i++) {
if (i == 0) {
hdId = r[i].id;
tab = '
<li id="active" class="active"><a data-toggle="tab" href="#" id="' + r[i].id + '">' + r[i].name + '</a></li>';
getFractures(hdId);
} else {
tab = '
<li id="active"><a data-toggle="tab" href="#" id="' + r[i].id + '">' + r[i].name + '</a></li>';
}
$(".nav-tabs").append(tab);
}
}
});
createChartBox();
getFractures(hdId);
getDevices(hdId, dmId);
getChartData(hdId, dmId);
createScatter();
setInterval(function () {
createChartBox();
getDevices(hdId, dmId);
getChartData(hdId, dmId);
}, 180000)
});
$(".nav-tabs").on('click', 'a', function () {
var val = $(this).attr("id");
hdId = val;
createChartBox();
getFractures(val);
getDevices(val, dmId);
getChartData(hdId, dmId);
});
$(".nav-stacked").on('click', 'a', function () {
var val = $(this).attr("id");
dmId = val;
createChartBox();
getDevices(hdId, val);
getChartData(hdId, dmId);
});
/**
* 创建图表容器
*/
function createChartBox() {
$("#charts").empty();
var box = '
<div id="box1" class="col-md-12 chartBox" style=" height: 585px;"></div>';
$("#charts").append(box);
}
/**
* 获取巷道下的断面
* @param hdId
*/
function getFractures(hdId) {
$.ajax({
type: "GET",
url: baseURL + "duanmian/getList/" + hdId,
contentType: "application/json",
data: {
mark: '断面收敛'
},
async: false,
success: function (r) {
$(".nav-stacked").empty();
var tab = '';
for (var i = 0; i < r.length; i++) {
if (i == 0) {
dmId = r[i].id;
tab = '
<li id="active" class="active"><a data-toggle="tab" href="#" id="' + r[i].id + '">' + r[i].name + '</a></li>';
} else {
tab = '
<li id="active"><a data-toggle="tab" href="#" id="' + r[i].id + '">' + r[i].name + '</a></li>';
}
$(".nav-stacked").append(tab);
}
}
})
}
/**
* 获取断面下的设备
* @param hdId
* @param dmId
*/
function getDevices(hdId, dmId) {
// getDeviceByHdIdAndDmId
$.ajax({
type: "GET",
url: baseURL + "sensor/getDeviceByHdIdAndDmId",
contentType: "application/json",
async: false,
data: {
hdId: hdId,
dmId: dmId,
mark: "断面收敛"
},
success: function (r) {
devices = [];
for (var i = 0; i < r.data.length; i++) {
if (i == 2) continue
devices.push(r.data[i]);
}
console.log(devices)
}
})
}
function getChartData(hdId, dmId) {
$.ajax({
type: "GET",
url: baseURL + "shoulian/getChartByHdAndDm",
contentType: "application/json",
data: {hdId: hdId, dmId: dmId},
async: false,
success: function (r) {
chart('box1', r.data, devices);
}
})
}
/**
* 绘制图表
*/
function chart(boxId, data, devices) {
var alarmYellow;
var alarmOrenge;
var alarmRed;
var alarmY;
$.ajax({
type: "GET",
url: baseURL + "sensor/getSensorByName",
contentType: "application/json",
async: false,
data: {
name: devices[0]
},
success: function (r) {
var sensor = r.sensor;
var alarm = sensor["alarmValue"].split("|");
alarmYellow = alarm[0];
alarmY=alarm[3];
alarmOrenge = alarm[1];
alarmRed = alarm[2];
}
})
var x_data = new Array();
var y_data = new Array();
var bkc = '#fff';
for (var i = 0; i < devices.length; i++) {
var x = [];
var y = [];
for (var j = 0; j < data.length; j++) {
if (devices[i] == data[j]["sensorName"]) {
x.push(data[j]['createTime']);
y.push(data[j]['slValue']);
}
if (data[j]['ifAlarm'] != 0) {
box1Alarm = 1;
}
}
deviceData.push(y[y.length - 1]);
x_data = x;
y_data.push(y);
}
console.log("x_data: " + x_data);
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById(boxId));
// 指定图表的配置项和数据
var option = {
backgroundColor: "rgba(255,255,255,0.2)",
// title: {
// text: deviceId + " 应力值",
// left: 'center'
// },
grid: {
x: 50
},
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
data: x_data,
axisLabel: {
interval: 0,//横轴信息全部显示
// rotate: -45,//-30度角倾斜显示
textStyle: {
fontSize: 8
}
}
},
yAxis: {
type: 'value',
max:alarmY
},
legend: {
orient: 'horizontal',
top: 'top'
},
series: [{
name: devices[0],
data: y_data[0],
//设置折线图颜色
itemStyle: {
normal: {
color: '#05eefc',
lineStyle: {
color: '#05eefc'
}
}
},
type: 'line',
markLine: {
data: [
{
name: '黄色预警',
yAxis: alarmYellow,
lineStyle: {
color: '#FFD700'
}
},
{
name: '橙色预警',
yAxis: alarmOrenge,
lineStyle: {
color: '#FFA500'
}
},
{
name: '红色预警',
yAxis: alarmRed,
lineStyle: {
color: '#FF0000'
}
}
]
},
markPoint: {
data: [
{
symbolSize: [50, 20],
symbol: 'rect',
name: '黄色预警',
yAxis: alarmYellow,
x: '90%',
itemStyle: {
normal: {
color: '#FFD700',
}
},
label: {
formatter: '黄色预警',
textStyle: {
color: '#fff'
}
}
},
{
symbolSize: [50, 20],
symbol: 'rect',
name: '橙色预警',
yAxis: alarmOrenge,
x: '90%',
itemStyle: {
normal: {
color: '#FFA500',
}
},
label: {
formatter: '橙色预警',
textStyle: {
color: '#fff'
}
}
},
{
symbolSize: [50, 20],
symbol: 'rect',
name: '红色预警',
yAxis: alarmRed,
x: '90%',
itemStyle: {
normal: {
color: '#FF0000',
}
},
label: {
formatter: '红色预警',
textStyle: {
color: '#fff'
}
}
}
]
}
}, {
name: devices[1],
data: y_data[1],
//设置折线图颜色
itemStyle: {
normal: {
color: '#F3A43B',
lineStyle: {
color: '#F3A43B'
}
}
},
type: 'line'
}, {
name: devices[2],
data: y_data[2],
//设置折线图颜色
itemStyle: {
normal: {
color: '#FAD860',
lineStyle: {
color: '#FAD860'
}
}
},
type: 'line'
}, {
name: devices[3],
data: y_data[3],
//设置折线图颜色
itemStyle: {
normal: {
color: '#9BCA63',
lineStyle: {
color: '#9BCA63'
}
}
},
type: 'line'
}, {
name: devices[4],
data: y_data[4],
//设置折线图颜色
itemStyle: {
normal: {
color: '#FE8463',
lineStyle: {
color: '#FE8463'
}
}
},
type: 'line'
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
}
function createScatter() {
var dom = document.getElementById("deviceBox");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
xAxis: {
show: false,
max: 10,
splitLine: {
show: false
}
},
yAxis: {
show: false,
max: 10,
splitLine: {
show: false
}
},
tooltip: {
trigger: 'item',
formatter: function (params) {
var text;
if (params.data == "1.2,7") {
text = '设备:' + devices[0] + '<br/>变化量:' + deviceData[0];
} else if (params.data == "3.4,8.6") {
text = '设备:' + devices[1] + '<br/>变化量:' + deviceData[1];
} else if (params.data == "6.6,8.6") {
text = '设备:' + devices[2] + '<br/>变化量:' + deviceData[2];
} else if (params.data == "8.8,7") {
text = '设备:' + devices[3] + '<br/>变化量:' + deviceData[3];
}
return text;
}
},
series: [{
name: devices[0],
symbolSize: 100,
symbolRotate: 240,
itemStyle: {
opacity: 0
},
data: [
[1.2, 7]
],
type: 'scatter'
}, {
name: devices[1],
symbolSize: 100,
symbolRotate: 210,
itemStyle: {
opacity: 0
},
data: [
[3.4, 8.6]
],
type: 'scatter'
}, {
name: devices[2],
symbolSize: 100,
symbolRotate: 150,
itemStyle: {
opacity: 0
},
data: [
[6.6, 8.6]
],
type: 'scatter'
}, {
name: devices[3],
symbolSize: 100,
symbolRotate: 120,
itemStyle: {
opacity: 0
},
data: [
[8.8, 7]
],
type: 'scatter'
}]
};
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
}
$('#charts').on('dblclick', '.chartBox', function () {
if (box1Alarm == 1) {
layer.open({
title: '解除报警',
content: '点击“确定”按钮解除报警',
btnAlign: 'c',
yes: function (index, layero) {
$.ajax({
type: "GET",
url: baseURL + "shoulian/updateIfAlarm",
contentType: "application/json",
data: {hdId: hdId, dmId: dmId},
async: false,
success: function (r) {
if (r.code == 0) {
box1Alarm = 0;
createChartBox();
getDevices(hdId, dmId);
getChartData(hdId, dmId);
}
}
});
layer.close(index);
}
})
}
})
...@@ -12,7 +12,7 @@ import me.zhengjie.gemho.mapper.sys.SysSummaryMapper; ...@@ -12,7 +12,7 @@ import me.zhengjie.gemho.mapper.sys.SysSummaryMapper;
import me.zhengjie.gemho.mapper.sys.SysViewsMapper; import me.zhengjie.gemho.mapper.sys.SysViewsMapper;
import me.zhengjie.gemho.service.sys.SysSelectService; import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -5,20 +5,20 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -5,20 +5,20 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.gemho.entity.sys.SysSummary; import me.zhengjie.gemho.entity.sys.SysSummary;
import me.zhengjie.gemho.mapper.sys.SysSelectMapper; import me.zhengjie.gemho.mapper.sys.*;
import me.zhengjie.gemho.mapper.sys.SysSummaryMapper;
import me.zhengjie.gemho.mapper.sys.SysTypeMapper;
import me.zhengjie.gemho.mapper.sys.SysViewsMapper;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.mapper.tab.UserTailponMapper; import me.zhengjie.gemho.mapper.tab.UserTailponMapper;
import me.zhengjie.gemho.service.sys.SysSummaryService; import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_datavo.sys.SysSummaryVo;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.*; import java.util.*;
...@@ -47,6 +47,8 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm ...@@ -47,6 +47,8 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm
private SysViewsMapper sysViewsMapper; private SysViewsMapper sysViewsMapper;
@Autowired @Autowired
private SysTypeMapper sysTypeMapper; private SysTypeMapper sysTypeMapper;
@Autowired
private DevtypeExtendMapper devtypeExtendMapper;
@Override @Override
public HashMap<String, Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public HashMap<String, Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
...@@ -92,7 +94,15 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm ...@@ -92,7 +94,15 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm
sysSummaries.addAll(records); sysSummaries.addAll(records);
//sysSummaries.addAll(records1); //sysSummaries.addAll(records1);
//sysSummaries.addAll(records2); //sysSummaries.addAll(records2);
stringListHashMap.put("list", sysSummaries);
//处理返回类型
ArrayList<SysSummaryVo> sysSummaryVos = new ArrayList<>();
for (SysSummary sysSummary : sysSummaries) {
SysSummaryVo sysSummaryVo = new SysSummaryVo();
BeanUtils.copyProperties(sysSummary, sysSummaryVo);
sysSummaryVos.add(sysSummaryVo);
}
stringListHashMap.put("list", sysSummaryVos);
stringListHashMap.put("total", getbyeqno.getTotal()/* + getbyeqno1.getTotal() + getbyeqno2.getTotal()*/); stringListHashMap.put("total", getbyeqno.getTotal()/* + getbyeqno1.getTotal() + getbyeqno2.getTotal()*/);
return stringListHashMap; return stringListHashMap;
} }
...@@ -132,9 +142,11 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm ...@@ -132,9 +142,11 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm
return true; return true;
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public boolean deletebyid(int id) { public boolean deletebyid(int id) {
int deletebyid = sysSummaryMapper.deletebyid(id); int deletebyid = sysSummaryMapper.deletebyid(id);
devtypeExtendMapper.deletebyid(id);
if (deletebyid > 0) { if (deletebyid > 0) {
return true; return true;
} }
......
...@@ -4,19 +4,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -4,19 +4,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.gemho.entity.sys.SysType; import me.zhengjie.gemho.entity.sys.SysType;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor; import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.sys.SysDaterangeMapper; import me.zhengjie.gemho.mapper.sys.*;
import me.zhengjie.gemho.mapper.sys.SysSubitemMapper;
import me.zhengjie.gemho.mapper.sys.SysTypeMapper;
import me.zhengjie.gemho.mapper.sys.SysValueMapper;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.mapper.tab.JrxDissectMapper; import me.zhengjie.gemho.mapper.tab.JrxDissectMapper;
import me.zhengjie.gemho.mapper.tab.MonitorvideoMapper; import me.zhengjie.gemho.mapper.tab.MonitorvideoMapper;
import me.zhengjie.gemho.service.sys.SysTypeService; import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.sys.*; import me.zhengjie.gemho.x_datavo.sys.*;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -46,6 +44,8 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl ...@@ -46,6 +44,8 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl
private MonitorvideoMapper monitorvideoMapper; private MonitorvideoMapper monitorvideoMapper;
@Autowired @Autowired
private OnlineUserService onlineUserService; private OnlineUserService onlineUserService;
@Autowired
private DevtypeExtendMapper devtypeExtendMapper;
@Override @Override
public SysVo getbyid(String id, String sensorid) { public SysVo getbyid(String id, String sensorid) {
...@@ -54,7 +54,9 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl ...@@ -54,7 +54,9 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl
drybeachequipinforQueryWrapper.eq("equipno", sensorid); drybeachequipinforQueryWrapper.eq("equipno", sensorid);
Drybeachequipinfor one = drybeachequipinforMapper.selectOne(drybeachequipinforQueryWrapper); Drybeachequipinfor one = drybeachequipinforMapper.selectOne(drybeachequipinforQueryWrapper);
SysType sysType = null; SysType sysType = null;
Integer sensortype = null;
if (one != null) { if (one != null) {
sensortype = one.getSensortype();
String devicetype = one.getDevicetype(); String devicetype = one.getDevicetype();
//根据设备类型获取指定的类型表信息 //根据设备类型获取指定的类型表信息
int deviceid = Integer.parseInt(devicetype); int deviceid = Integer.parseInt(devicetype);
...@@ -101,12 +103,29 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl ...@@ -101,12 +103,29 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl
} }
ArrayList<TypeVo> getsubs = jrxDissectMapper.getsubs(tailInfoNo); ArrayList<TypeVo> getsubs = jrxDissectMapper.getsubs(tailInfoNo);
sysVo.setSubitem(getsubs); sysVo.setSubitem(getsubs);
} else if (sysType.getTypeno().equals("t_13")) {
DevtypeExtendVo devtypeExtendVo = new DevtypeExtendVo();
if (id != null) {
devtypeExtendVo = devtypeExtendMapper.getBySumid(Integer.valueOf(id));
}
if (ObjectUtils.isEmpty(devtypeExtendVo)) {
sysVo.setCity_weather("");
} else {
sysVo.setCity_weather(devtypeExtendVo.getCity_weather());
}
sysVo.setSubitem(typeVos);
} else { } else {
typeVos = sysSubitemMapper.getsubs(sysType.getCode()); typeVos = sysSubitemMapper.getsubs(sysType.getCode());
sysVo.setSubitem(typeVos); sysVo.setSubitem(typeVos);
} }
dataRangeVos = sysDaterangeMapper.getranges(sysType.getCode()); dataRangeVos = sysDaterangeMapper.getranges(sysType.getCode());
valuesVos = sysValueMapper.getsysvalues(sysType.getCode()); String code = sysType.getCode();
if (!ObjectUtils.isEmpty(sensortype)){
if (3==sensortype) {
code += "_3";
}
}
valuesVos = sysValueMapper.getsysvalues(code);
sysVo.setRanges(dataRangeVos); sysVo.setRanges(dataRangeVos);
sysVo.setValues(valuesVos); sysVo.setValues(valuesVos);
return sysVo; return sysVo;
......
...@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* <p> * <p>
...@@ -60,4 +61,12 @@ public interface TabAbnormalService extends IService<Abnormal> { ...@@ -60,4 +61,12 @@ public interface TabAbnormalService extends IService<Abnormal> {
void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response, HttpServletRequest request); void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response, HttpServletRequest request);
/**
* 报警弹窗
*
*/
List<Map> alterAbnormal();
void dealAlterAbnormal(Integer id);
} }
...@@ -13,7 +13,8 @@ import me.zhengjie.gemho.util.ServiceUtil; ...@@ -13,7 +13,8 @@ import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil; import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_datavo.tab.dry.LevelVo;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -41,6 +42,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo ...@@ -41,6 +42,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
@Autowired @Autowired
private OnlineUserService onlineUserService; private OnlineUserService onlineUserService;
@Override @Override
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) { public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage(); long page = dataQueryCriteria.getPage();
...@@ -51,6 +53,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo ...@@ -51,6 +53,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
String gettailno = onlineUserService.gettailno(currentUsername, request); String gettailno = onlineUserService.gettailno(currentUsername, request);
drybeachequipinforQueryWrapper.eq("tailingid", gettailno); drybeachequipinforQueryWrapper.eq("tailingid", gettailno);
ServiceUtil.query(drybeachequipinforQueryWrapper, dataQueryCriteria); ServiceUtil.query(drybeachequipinforQueryWrapper, dataQueryCriteria);
drybeachequipinforQueryWrapper.ne("equipname","基准点");
Page<Drybeachequipinfor> drybeachequipinforPage = new Page<>(page + 1, size); Page<Drybeachequipinfor> drybeachequipinforPage = new Page<>(page + 1, size);
drybeachequipinforPage = drybeachequipinforMapper.selectPage(drybeachequipinforPage, drybeachequipinforQueryWrapper); drybeachequipinforPage = drybeachequipinforMapper.selectPage(drybeachequipinforPage, drybeachequipinforQueryWrapper);
hashMap.put("list", drybeachequipinforPage.getRecords()); hashMap.put("list", drybeachequipinforPage.getRecords());
...@@ -140,7 +143,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo ...@@ -140,7 +143,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
//获取当前尾矿库编码 //获取当前尾矿库编码
String tailingid = TailNoForInfoUtil.getTailInfoNo(request); String tailingid = TailNoForInfoUtil.getTailInfoNo(request);
Page<HashMap<String, Object>> drybeachequipinforPage = new Page<>(page + 1, size); Page<HashMap<String, Object>> drybeachequipinforPage = new Page<>(page + 1, size);
Page<HashMap<String, Object>> page1 = drybeachequipinforMapper.level(drybeachequipinforPage, tailingid, searchName, searchValue); Page<LevelVo> page1 = drybeachequipinforMapper.level(drybeachequipinforPage, tailingid, searchName, searchValue);
List records = page1.getRecords(); List records = page1.getRecords();
long total = page1.getTotal(); long total = page1.getTotal();
map.put("list", records); map.put("list", records);
...@@ -179,7 +182,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo ...@@ -179,7 +182,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
if (tailInfoNo == null) { if (tailInfoNo == null) {
return null; return null;
} }
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo); drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo).ne("equipname", "基准点");
List<Drybeachequipinfor> drybeachequipinfors = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper); List<Drybeachequipinfor> drybeachequipinfors = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper);
ArrayList<DrybeachequipinforVo> drybeachequipinforVos = new ArrayList<>(); ArrayList<DrybeachequipinforVo> drybeachequipinforVos = new ArrayList<>();
for (Drybeachequipinfor drybeachequipinfor : drybeachequipinfors) { for (Drybeachequipinfor drybeachequipinfor : drybeachequipinfors) {
...@@ -197,7 +200,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo ...@@ -197,7 +200,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
if (tailInfoNo == null) { if (tailInfoNo == null) {
return null; return null;
} }
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo); drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo).ne("equipname", "基准点");
List<Drybeachequipinfor> drybeachequipinfors = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper); List<Drybeachequipinfor> drybeachequipinfors = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper);
ArrayList<DrybeachequipinforVo> drybeachequipinforVos = new ArrayList<>(); ArrayList<DrybeachequipinforVo> drybeachequipinforVos = new ArrayList<>();
for (Drybeachequipinfor drybeachequipinfor : drybeachequipinfors) { for (Drybeachequipinfor drybeachequipinfor : drybeachequipinfors) {
......
...@@ -122,7 +122,7 @@ public class JrxDissectServiceImpl extends ServiceImpl<JrxDissectMapper, JrxDiss ...@@ -122,7 +122,7 @@ public class JrxDissectServiceImpl extends ServiceImpl<JrxDissectMapper, JrxDiss
BeanUtils.copyProperties(jrxDissect, jrxDissectDto); BeanUtils.copyProperties(jrxDissect, jrxDissectDto);
jrxDissectVisualVO.setDissect(jrxDissectDto); jrxDissectVisualVO.setDissect(jrxDissectDto);
//根据坡面编号获取台阶信息 //根据坡面编号获取台阶信息
List<JrxSteps> byCode = jrxStepsMapper.getByCode(Integer.valueOf(subitem)); List<JrxSteps> byCode = jrxStepsMapper.getByCode(subitem);
jrxDissectVisualVO.setSteps(byCode); jrxDissectVisualVO.setSteps(byCode);
//根据坡面查询设备信息 //根据坡面查询设备信息
String dry_s = jrxDissect.getDry_s(); String dry_s = jrxDissect.getDry_s();
......
package me.zhengjie.gemho.service.tab.impl; package me.zhengjie.gemho.service.tab.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -7,6 +8,7 @@ import lombok.SneakyThrows; ...@@ -7,6 +8,7 @@ import lombok.SneakyThrows;
import me.zhengjie.gemho.entity.dic.AlarmLevel; import me.zhengjie.gemho.entity.dic.AlarmLevel;
import me.zhengjie.gemho.entity.dic.AlarmState; import me.zhengjie.gemho.entity.dic.AlarmState;
import me.zhengjie.gemho.entity.tab.Abnormal; import me.zhengjie.gemho.entity.tab.Abnormal;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.mapper.tab.TabAbnormalMapper; import me.zhengjie.gemho.mapper.tab.TabAbnormalMapper;
import me.zhengjie.gemho.service.dic.IAlarmLevelService; import me.zhengjie.gemho.service.dic.IAlarmLevelService;
...@@ -42,6 +44,21 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor ...@@ -42,6 +44,21 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
private IAlarmLevelService iAlarmLevelService; private IAlarmLevelService iAlarmLevelService;
@Autowired @Autowired
private IAlarmStateService iAlarmStateService; private IAlarmStateService iAlarmStateService;
public static String appointDates = null;
private static HashMap<String, String> typeToTable = new HashMap<>();
static {
typeToTable.put("1", "db");
typeToTable.put("2", "wt");
typeToTable.put("3", "mp");
typeToTable.put("4", "dm");
typeToTable.put("5", "st");
typeToTable.put("6", "rg");
typeToTable.put("7", "psl");
typeToTable.put("8", "sz");
typeToTable.put("9", "sl");
typeToTable.put("16", "wpb");
}
@Override @Override
public boolean jcbj(String equipno, String time, String reason, String jcreason) { public boolean jcbj(String equipno, String time, String reason, String jcreason) {
...@@ -56,6 +73,14 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor ...@@ -56,6 +73,14 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
int jcbj = tabAbnormalMapper.jcbj(jcreason, jcbjtime, reason, equipno); int jcbj = tabAbnormalMapper.jcbj(jcreason, jcbjtime, reason, equipno);
//解除设备的报警状态 //解除设备的报警状态
int jcbj1 = drybeachequipinforMapper.jcbj(equipno); int jcbj1 = drybeachequipinforMapper.jcbj(equipno);
//更新历史表中报警状态
//根据id查询设备类型
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("equipno", equipno);
String devicetype = drybeachequipinforMapper.selectOne(drybeachequipinforQueryWrapper).getDevicetype();
String table = typeToTable.get(devicetype);
String jcsql = "update tb_" + table + "_data set state=2 where state=1 and sensorid='" + equipno + "'";
tabAbnormalMapper.jchistory(jcsql);
if (jcbj > 0 && jcbj1 > 0) { if (jcbj > 0 && jcbj1 > 0) {
return true; return true;
} }
...@@ -148,14 +173,14 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor ...@@ -148,14 +173,14 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
long size = dataQueryCriteria.getSize(); long size = dataQueryCriteria.getSize();
Page<Abnormal> abnormalPage = new Page<>(page + 1, size); Page<Abnormal> abnormalPage = new Page<>(page + 1, size);
QueryWrapper<Abnormal> abnormalQueryWrapper = new QueryWrapper<>(); QueryWrapper<Abnormal> abnormalQueryWrapper = new QueryWrapper<>();
ServiceUtil.dataQuery(abnormalQueryWrapper, dataQueryCriteria); dataQuery(abnormalQueryWrapper, dataQueryCriteria);
//获取所有设备的编码 //获取所有设备的编码
List<String> dryNo = TailNoForInfoUtil.getDryNo(request); List<String> dryNo = TailNoForInfoUtil.getDryNo(request);
if (dryNo != null) { if (dryNo != null) {
abnormalQueryWrapper.in("equipno", dryNo); abnormalQueryWrapper.in("a.equipno", dryNo);
} }
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
Page<Abnormal> abnormalPage1 = tabAbnormalMapper.selectPage(abnormalPage, abnormalQueryWrapper); Page<Abnormal> abnormalPage1 = tabAbnormalMapper.pageAll(abnormalPage, abnormalQueryWrapper);
map.put("list", abnormalPage1.getRecords()); map.put("list", abnormalPage1.getRecords());
map.put("total", abnormalPage1.getTotal()); map.put("total", abnormalPage1.getTotal());
return map; return map;
...@@ -197,4 +222,79 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor ...@@ -197,4 +222,79 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
} }
} }
public void dataQuery(QueryWrapper<?> queryWrapper, DataQueryCriteria dataQueryCriteria) {
//获取精确查询字段
String exact1 = dataQueryCriteria.getExact();
if (exact1 != null) {
HashMap exact = JSON.parseObject(exact1, HashMap.class);
//HashMap<String, Object> exact = dataQueryCriteria.getExact();
//处理精确查询字段
Set<String> strings = exact.keySet();
if (!strings.isEmpty()) {
for (String string : strings) {
if (string.equals("state")) {
exact.put("state", 1);
}
if (string.equals("monitorType")) {
continue;
}
queryWrapper.eq("a." + string, exact.get(string));
}
}
}
//获取模糊查询字段
String vague1 = dataQueryCriteria.getVague();
if (vague1 != null) {
Map vague = JSON.parseObject(vague1, Map.class);
Set<String> strings1 = vague.keySet();
if (!strings1.isEmpty()) {
for (String s : strings1) {
queryWrapper.like("a." + s, vague.get(s));
}
}
}
//判断是否有时间字段
String timeSpace = dataQueryCriteria.getDaterange();
if (timeSpace != null) {
if (timeSpace.contains(",")) {
String starttime = timeSpace.split(",")[0] + " 00:00:00";
String endtime = timeSpace.split(",")[1] + " 23:59:59";
Date start = ServiceUtil.toDate(starttime);
Date end = ServiceUtil.toDate(endtime);
queryWrapper.ge("a.time", start).le("a.time", end);
} else {
Date start = ServiceUtil.toDate(timeSpace + " 00:00:00");
Date end = ServiceUtil.toDate(timeSpace + " 23:59:59");
queryWrapper.ge("a.time", start).le("a.time", end);
}
}
//正序倒序
String sort = dataQueryCriteria.getSort();
if (sort != null) {
String s = sort.split(",")[1];
if (s.equals("desc")) {
queryWrapper.orderByDesc("a.time");
} else {
queryWrapper.orderByAsc("a.time");
}
} else {
queryWrapper.orderByAsc("a.time");
}
}
@Override
public List<Map> alterAbnormal() {
//获取当前尾矿库
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo();
List<Map> maps = tabAbnormalMapper.alterAbnormal(tailInfoNo);
return maps;
}
@Override
public void dealAlterAbnormal(Integer id) {
tabAbnormalMapper.updateIfselect(id);
}
} }
...@@ -15,6 +15,7 @@ import me.zhengjie.utils.SecurityUtils; ...@@ -15,6 +15,7 @@ import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -46,6 +47,9 @@ public class TailpondinforServiceImpl extends ServiceImpl<TailpondinforMapper, T ...@@ -46,6 +47,9 @@ public class TailpondinforServiceImpl extends ServiceImpl<TailpondinforMapper, T
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
if (!currentUsername.equals("admin")) { if (!currentUsername.equals("admin")) {
ArrayList<String> gettailnos = userTailponMapper.gettailnos(currentUsername); ArrayList<String> gettailnos = userTailponMapper.gettailnos(currentUsername);
if(ObjectUtils.isEmpty(gettailnos)){
tailpondinforQueryWrapper.in("tailingno", "");
}
tailpondinforQueryWrapper.in("tailingno", gettailnos); tailpondinforQueryWrapper.in("tailingno", gettailnos);
} }
ServiceUtil.query(tailpondinforQueryWrapper, dataQueryCriteria); ServiceUtil.query(tailpondinforQueryWrapper, dataQueryCriteria);
......
...@@ -2,6 +2,7 @@ package me.zhengjie.gemho.service.web.impl; ...@@ -2,6 +2,7 @@ package me.zhengjie.gemho.service.web.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.gemho.controller.data.RealDataController;
import me.zhengjie.gemho.entity.web.WebMonitorChart; import me.zhengjie.gemho.entity.web.WebMonitorChart;
import me.zhengjie.gemho.entity.web.WebMonitorIcon; import me.zhengjie.gemho.entity.web.WebMonitorIcon;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
...@@ -15,7 +16,7 @@ import me.zhengjie.gemho.service.web.IWebMonitorChartService; ...@@ -15,7 +16,7 @@ import me.zhengjie.gemho.service.web.IWebMonitorChartService;
import me.zhengjie.gemho.x_datavo.RealDataVo; import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.web.MonitorChartVo; import me.zhengjie.gemho.x_datavo.web.MonitorChartVo;
import me.zhengjie.gemho.x_datavo.web.WebMonitorPointsVo; import me.zhengjie.gemho.x_datavo.web.WebMonitorPointsVo;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.RedisUtils; import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -55,6 +56,8 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe ...@@ -55,6 +56,8 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired @Autowired
private DrybeachequipinforService drybeachequipinforService; private DrybeachequipinforService drybeachequipinforService;
@Autowired
private RealDataController realDataController;
@Override @Override
public boolean deal(WebMonitorChart webMonitorChart, HttpServletRequest request) { public boolean deal(WebMonitorChart webMonitorChart, HttpServletRequest request) {
...@@ -181,6 +184,10 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe ...@@ -181,6 +184,10 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
List<HashMap<String, Object>> hashMaps = drybeachequipinforService.dryStateCount(request); List<HashMap<String, Object>> hashMaps = drybeachequipinforService.dryStateCount(request);
//获取所有设备的实时数据 //获取所有设备的实时数据
List<RealDataVo> realData = (List<RealDataVo>) redisUtils.get("realData"); List<RealDataVo> realData = (List<RealDataVo>) redisUtils.get("realData");
if (ObjectUtils.isEmpty(realData)) {
realDataController.real(request);
realData = (List<RealDataVo>) redisUtils.get("realData");
}
//获取设备的实时报警状态 //获取设备的实时报警状态
List<HashMap<String, Object>> realalarm = tabAbnormalMapper.realalarm(); List<HashMap<String, Object>> realalarm = tabAbnormalMapper.realalarm();
MonitorChartVo monitorChartVo = getsimplemonbase(request); MonitorChartVo monitorChartVo = getsimplemonbase(request);
...@@ -206,23 +213,31 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe ...@@ -206,23 +213,31 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
break; break;
} }
} }
if (!ObjectUtils.isEmpty(realData)) {
for (RealDataVo realDataVo : realData) { for (RealDataVo realDataVo : realData) {
if (realDataVo.getEquipno().equals(id)) { if (realDataVo.getEquipno().equals(id)) {
//获取键值
List<Map> keys = (List<Map>) realDataVo.getKeys(); List<Map> keys = (List<Map>) realDataVo.getKeys();
//获取数据
HashMap<String, Object> data = realDataVo.getData(); HashMap<String, Object> data = realDataVo.getData();
//获取数据的keys
Set<String> strings = data.keySet(); Set<String> strings = data.keySet();
//
HashMap<String, Object> map = new HashMap<>();
//遍历键值
for (Map key : keys) { for (Map key : keys) {
Set keyset1 = key.keySet(); Set keyset1 = key.keySet();
for (Object o : keyset1) { for (Object o : keyset1) {
String s = (String) key.get(o.toString()); String s = (String) key.get(o.toString());
for (String string : strings) { for (String string : strings) {
if (s.equals(string)) { if (s.equals(string)) {
key.put(o.toString(), data.get(string)); map.put(o.toString(), data.get(string));
} }
} }
} }
} }
item.put("realdata", keys); item.put("realdata", map);
}
} }
} }
} }
...@@ -265,21 +280,30 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe ...@@ -265,21 +280,30 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
} }
for (RealDataVo realDataVo : realData) { for (RealDataVo realDataVo : realData) {
if (realDataVo.getEquipno().equals(id)) { if (realDataVo.getEquipno().equals(id)) {
//获取键说明的list
List<Map> keys = (List<Map>) realDataVo.getKeys(); List<Map> keys = (List<Map>) realDataVo.getKeys();
//获取数据
HashMap<String, Object> data = realDataVo.getData(); HashMap<String, Object> data = realDataVo.getData();
//获取数据的key集合
Set<String> strings = data.keySet(); Set<String> strings = data.keySet();
for (Map key : keys) { //创建储存键值的map
Set keyset1 = key.keySet(); HashMap<String, Object> realDataMap = new HashMap<>();
//遍历键说明的list
for (Map map : keys) {
//遍历键说明
Set keyset1 = map.keySet();
for (Object o : keyset1) { for (Object o : keyset1) {
String s = (String) key.get(o.toString()); String s = (String) map.get(o.toString());
//遍历数据
for (String string : strings) { for (String string : strings) {
//键和数据的键相同就存入
if (s.equals(string)) { if (s.equals(string)) {
key.put(o.toString(), data.get(string)); realDataMap.put(o.toString(), data.get(string));
} }
} }
} }
} }
item.put("realdata", keys); item.put("realdata", realDataMap);
} }
} }
} }
...@@ -340,4 +364,5 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe ...@@ -340,4 +364,5 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
public void updatehw(int height, int width, int id) { public void updatehw(int height, int width, int id) {
} }
} }
...@@ -42,6 +42,7 @@ public class DataUtil { ...@@ -42,6 +42,7 @@ public class DataUtil {
HashMap<String, String> map = new HashMap<>(); HashMap<String, String> map = new HashMap<>();
map.put("水平", "dispA"); map.put("水平", "dispA");
map.put("竖向", "dispB"); map.put("竖向", "dispB");
map.put("沉降", "dispB");
ArrayList<String> strings = new ArrayList<>(); ArrayList<String> strings = new ArrayList<>();
String[] split = code.split(","); String[] split = code.split(",");
for (String s : split) { for (String s : split) {
...@@ -60,6 +61,9 @@ public class DataUtil { ...@@ -60,6 +61,9 @@ public class DataUtil {
} else if (s.equals("竖向")) { } else if (s.equals("竖向")) {
nameVos.add(new NameVo().setKey("dispB").setName("竖向变化量")); nameVos.add(new NameVo().setKey("dispB").setName("竖向变化量"));
//nameVos.add(new NameVo().setKey("p_dispB").setName("人工检查竖向变化量")); //nameVos.add(new NameVo().setKey("p_dispB").setName("人工检查竖向变化量"));
} else if (s.equals("沉降")) {
nameVos.add(new NameVo().setKey("dispB").setName("沉降变化量"));
//nameVos.add(new NameVo().setKey("p_dispB").setName("人工检查竖向变化量"));
} }
} }
return nameVos; return nameVos;
...@@ -213,4 +217,5 @@ public class DataUtil { ...@@ -213,4 +217,5 @@ public class DataUtil {
map.put("alarmLevel", alarmLevel); map.put("alarmLevel", alarmLevel);
return map; return map;
} }
} }
...@@ -14,7 +14,6 @@ import me.zhengjie.gemho.x_datavo.Result; ...@@ -14,7 +14,6 @@ import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria; import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo; import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo; import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -22,8 +21,6 @@ import javax.servlet.http.HttpServletRequest; ...@@ -22,8 +21,6 @@ import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
public class ServiceUtil { public class ServiceUtil {
...@@ -48,10 +45,19 @@ public class ServiceUtil { ...@@ -48,10 +45,19 @@ public class ServiceUtil {
Set<String> strings = exact.keySet(); Set<String> strings = exact.keySet();
if (!strings.isEmpty()) { if (!strings.isEmpty()) {
for (String string : strings) { for (String string : strings) {
if (string.equals("isonline")) {
String str = exact.get(string).toString().equals("1") ? ">=" : "<=";
if (">=".equals(str)){
queryWrapper.apply("DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%i:%s') " + str + "DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d %H:%m:%s')");
}else{
queryWrapper.apply("(DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%i:%s') " + str + "DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d %H:%m:%s') or datarealtime is null)");
}
} else {
queryWrapper.eq(string, exact.get(string)); queryWrapper.eq(string, exact.get(string));
} }
} }
} }
}
//获取模糊查询字段 //获取模糊查询字段
String vague1 = dataQueryCriteria.getVague(); String vague1 = dataQueryCriteria.getVague();
if (vague1 != null) { if (vague1 != null) {
...@@ -670,19 +676,36 @@ public class ServiceUtil { ...@@ -670,19 +676,36 @@ public class ServiceUtil {
if (tailInfoNo == null) { if (tailInfoNo == null) {
return null; return null;
} }
//读取redis
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
HashMap<String, String> map = (HashMap<String, String>) redisUtils.get("NoName" + tailInfoNo);
if (map != null) {
return map;
}
DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class); DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class);
List<DrybeachequipinforVo> drybeachequipinforVos = drybeachequipinforService.sensorList(null, request); List<DrybeachequipinforVo> drybeachequipinforVos = drybeachequipinforService.sensorList(null, request);
HashMap<String, String> hashMap = new HashMap<String, String>(); HashMap<String, String> hashMap = new HashMap<String, String>();
for (DrybeachequipinforVo drybeachequipinforVo : drybeachequipinforVos) { for (DrybeachequipinforVo drybeachequipinforVo : drybeachequipinforVos) {
hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEquipname()); hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEquipname());
} }
redisUtils.set("NoName" + tailInfoNo, hashMap); return hashMap;
}
/**
* 获取编码-sensortype的map
*
* @return
*/
public static HashMap<String, Integer> getSensorType() {
//获取当前尾矿库的编码
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo();
if (tailInfoNo == null) {
return null;
}
DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
List<Drybeachequipinfor> list = drybeachequipinforService.list(drybeachequipinforQueryWrapper);
HashMap<String, Integer> hashMap = new HashMap<String, Integer>();
for (Drybeachequipinfor drybeachequipinfor : list) {
hashMap.put(drybeachequipinfor.getEquipno(), drybeachequipinfor.getSensortype());
}
return hashMap; return hashMap;
} }
...@@ -698,12 +721,7 @@ public class ServiceUtil { ...@@ -698,12 +721,7 @@ public class ServiceUtil {
if (tailInfoNo == null) { if (tailInfoNo == null) {
return null; return null;
} }
//读取redis
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
HashMap<String, String> map = (HashMap<String, String>) redisUtils.get("NoDan" + tailInfoNo);
if (map != null) {
return map;
}
DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class); DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>(); QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo); drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
...@@ -712,7 +730,6 @@ public class ServiceUtil { ...@@ -712,7 +730,6 @@ public class ServiceUtil {
for (Drybeachequipinfor drybeachequipinforVo : drybeachequipinforVos) { for (Drybeachequipinfor drybeachequipinforVo : drybeachequipinforVos) {
hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEqdanwei()); hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEqdanwei());
} }
redisUtils.set("NoDan" + tailInfoNo, hashMap);
return hashMap; return hashMap;
} }
...@@ -728,12 +745,6 @@ public class ServiceUtil { ...@@ -728,12 +745,6 @@ public class ServiceUtil {
if (tailInfoNo == null) { if (tailInfoNo == null) {
return null; return null;
} }
//读取redis
RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
HashMap<String, String> map = (HashMap<String, String>) redisUtils.get("NoDan" + tailInfoNo);
if (map != null) {
return map;
}
DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class); DrybeachequipinforService drybeachequipinforService = SpringContextHolder.getBean(DrybeachequipinforService.class);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>(); QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo); drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
...@@ -742,23 +753,7 @@ public class ServiceUtil { ...@@ -742,23 +753,7 @@ public class ServiceUtil {
for (Drybeachequipinfor drybeachequipinforVo : drybeachequipinforVos) { for (Drybeachequipinfor drybeachequipinforVo : drybeachequipinforVos) {
hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEqdanwei()); hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEqdanwei());
} }
redisUtils.set("NoDan" + tailInfoNo, hashMap);
return hashMap; return hashMap;
} }
public static void main(String[] args) {
int hours = 6;
String format = "yyyy-MM-dd HH";
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(format);
String format1 = "yyyy-MM-dd HH:mm:ss";
DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern(format1);
LocalDateTime end = LocalDateTime.now();
String endIng = end.format(dateTimeFormatter) + ":59:59";
LocalDateTime endTime = LocalDateTime.parse(endIng, dateTimeFormatter1);
LocalDateTime start = end.minusHours(hours);
String startIng = start.format(dateTimeFormatter) + ":00:00";
LocalDateTime startTime = LocalDateTime.parse(startIng, dateTimeFormatter1);
}
} }
...@@ -3,7 +3,7 @@ package me.zhengjie.gemho.util; ...@@ -3,7 +3,7 @@ package me.zhengjie.gemho.util;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor; import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper; import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.modules.security.service.OnlineUserService; import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.RedisUtils; import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import me.zhengjie.utils.SpringContextHolder; import me.zhengjie.utils.SpringContextHolder;
......
...@@ -8,7 +8,7 @@ import java.util.HashMap; ...@@ -8,7 +8,7 @@ import java.util.HashMap;
@Data @Data
public class Result { public class Result {
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date date; private Date date;
private String dateUnit; private String dateUnit;
private HashMap<String, ?> values; private HashMap<String, ?> values;
......
package me.zhengjie.gemho.x_datavo.sys;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class DevtypeExtendVo {
private String city_weather;
private Integer e_umid;
}
package me.zhengjie.gemho.x_datavo.sys;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class SysSummaryVo {
private static final long serialVersionUID = 1L;
/**
* 自增,主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 大屏模块编码
*/
private String mdcode;
/**
* sys_type类别的id
*/
private String type;
/**
* sys_type类别的name
*/
private String name;
/**
* sys_type类别的reqUrl
*/
private String requrl;
/**
* sys_value表中的名字
*/
@TableField(value = "`values`")
private String values;
/**
* sys_daterange表中的名字
*/
private String ranges;
/**
* 备注
*/
private String remark;
/**
* 分项 变化量
*/
private Object subitem;
/**
* 设备id
*/
private String deviceid;
private String title;
private LocalDateTime createtime;
private LocalDateTime updatetime;
private int must;
}
...@@ -28,9 +28,10 @@ public class SysVo { ...@@ -28,9 +28,10 @@ public class SysVo {
private String v_id;*/ private String v_id;*/
private String v_tailno; /*private String v_tailno;*/
private List<DataRangeVo> ranges; private List<DataRangeVo> ranges;
private List<ValuesVo> values; private List<ValuesVo> values;
private List<SensorVo> sensors; private List<SensorVo> sensors;
private MonitorvideoVo monitor; private MonitorvideoVo monitor;
private String city_weather;
} }
package me.zhengjie.gemho.x_datavo; package me.zhengjie.gemho.x_datavo.tab.dry;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package me.zhengjie.gemho.x_datavo.tab.dry;
import lombok.Data;
/**
*预警级别设置用 实体类型
*/
@Data
public class LevelVo {
private String equipname;
private String equipno;
private double fourlevelalarm;
private double onelevelalarm;
private double threelevelalarm;
private double twolevelalarm;
private String unit;
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain; package me.zhengjie.gemho.x_generato.modules.mnt.domain;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain; package me.zhengjie.gemho.x_generato.modules.mnt.domain;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain; package me.zhengjie.gemho.x_generato.modules.mnt.domain;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain; package me.zhengjie.gemho.x_generato.modules.mnt.domain;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain; package me.zhengjie.gemho.x_generato.modules.mnt.domain;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.repository; package me.zhengjie.gemho.x_generato.modules.mnt.repository;
import me.zhengjie.modules.mnt.domain.App; import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.repository; package me.zhengjie.gemho.x_generato.modules.mnt.repository;
import me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.repository; package me.zhengjie.gemho.x_generato.modules.mnt.repository;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.repository; package me.zhengjie.gemho.x_generato.modules.mnt.repository;
import me.zhengjie.modules.mnt.domain.Deploy; import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.repository; package me.zhengjie.gemho.x_generato.modules.mnt.repository;
import me.zhengjie.modules.mnt.domain.ServerDeploy; import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.rest; package me.zhengjie.gemho.x_generato.modules.mnt.rest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.App; import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.service.AppService; import me.zhengjie.gemho.x_generato.modules.mnt.service.AppService;
import me.zhengjie.modules.mnt.service.dto.AppQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppQueryCriteria;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.rest; package me.zhengjie.gemho.x_generato.modules.mnt.rest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.service.DatabaseService; import me.zhengjie.gemho.x_generato.modules.mnt.service.DatabaseService;
import me.zhengjie.modules.mnt.service.dto.DatabaseDto; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.modules.mnt.service.dto.DatabaseQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.modules.mnt.util.SqlUtils; import me.zhengjie.gemho.x_generato.modules.mnt.util.SqlUtils;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.rest; package me.zhengjie.gemho.x_generato.modules.mnt.rest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.Deploy; import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.service.DeployService; import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployService;
import me.zhengjie.modules.mnt.service.dto.DeployQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
......
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.rest; package me.zhengjie.gemho.x_generato.modules.mnt.rest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.service.DeployHistoryService; import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.rest; package me.zhengjie.gemho.x_generato.modules.mnt.rest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.ServerDeploy; import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import me.zhengjie.modules.mnt.service.ServerDeployService; import me.zhengjie.gemho.x_generato.modules.mnt.service.ServerDeployService;
import me.zhengjie.modules.mnt.service.dto.ServerDeployQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployQueryCriteria;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service; package me.zhengjie.gemho.x_generato.modules.mnt.service;
import me.zhengjie.modules.mnt.domain.App; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppDto;
import me.zhengjie.modules.mnt.service.dto.AppDto; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppQueryCriteria;
import me.zhengjie.modules.mnt.service.dto.AppQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service; package me.zhengjie.gemho.x_generato.modules.mnt.service;
import me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.modules.mnt.service.dto.DatabaseDto; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.modules.mnt.service.dto.DatabaseQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service; package me.zhengjie.gemho.x_generato.modules.mnt.service;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryDto;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryDto; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service; package me.zhengjie.gemho.x_generato.modules.mnt.service;
import me.zhengjie.modules.mnt.domain.Deploy; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployDto;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.modules.mnt.service.dto.DeployDto; import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.service.dto.DeployQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service; package me.zhengjie.gemho.x_generato.modules.mnt.service;
import me.zhengjie.modules.mnt.domain.ServerDeploy; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.modules.mnt.service.dto.ServerDeployDto; import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployQueryCriteria;
import me.zhengjie.modules.mnt.service.dto.ServerDeployQueryCriteria; import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service.dto; package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service.dto; package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import lombok.Data; import lombok.Data;
import me.zhengjie.annotation.Query; import me.zhengjie.annotation.Query;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service.dto; package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service.dto; package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import lombok.Data; import lombok.Data;
import me.zhengjie.annotation.Query; import me.zhengjie.annotation.Query;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service.dto; package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import lombok.Getter; import lombok.Getter;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.service.dto; package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import lombok.Data; import lombok.Data;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment