Commit 38fcbe66 authored by kiritoausna's avatar kiritoausna

2022-11.04 环境监测历史数据

parent f15244d2
......@@ -132,6 +132,7 @@
<!-- 打包 -->
<build>
<finalName>MineTRS_new0.16</finalName>
<plugins>
<!-- 跳过单元测试 -->
<plugin>
......
......@@ -7,9 +7,10 @@ import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.service.tab.DrybeachequipinforService;
import me.zhengjie.gemho.util.PageResult;
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.SecurityUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......@@ -127,4 +128,72 @@ public class RealDataController {
redisUtils.set("realData", realDataVos1);
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;
import cn.hutool.http.HttpRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
......@@ -52,11 +53,15 @@ public class SzDataController {
}
return new ResponseEntity<>(new RealVo().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "分页查看")
/**
* 获取环境/水质的历史数据
*
* @param
* @return
*/
@ApiOperation("获取干滩的历史数据")
@GetMapping("history")
public ResponseEntity<Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
public ResponseEntity<Object> gethistory(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
try {
HashMap<String, Object> map = szDataService.pageall(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
......
......@@ -14,7 +14,7 @@ import me.zhengjie.gemho.service.sys.SysViewsService;
import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
......
......@@ -6,15 +6,17 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import me.zhengjie.annotation.Log;
import me.zhengjie.gemho.entity.sys.DevtypeExtend;
import me.zhengjie.gemho.entity.sys.SysSummary;
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.SysSummaryService;
import me.zhengjie.gemho.service.tab.MonitorvideoService;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
......@@ -46,6 +48,8 @@ public class SysSummaryController {
private MonitorvideoService monitorvideoService;
@Autowired
private OnlineUserService onlineUserService;
@Autowired
private IDevtypeExtendService iDevtypeExtendService;
/**
* 查询全部
......@@ -71,7 +75,7 @@ public class SysSummaryController {
public ResponseEntity<Object> add(@RequestBody SysSummary sysSummary, HttpServletRequest request) {
String currentUsername = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(currentUsername, request);
if(gettailno==null){
if (gettailno == null) {
return new ResponseEntity<>(new PostOrPutResult().noTailFailed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
sysSummary.setCreatetime(LocalDateTime.now());
......@@ -90,7 +94,9 @@ public class SysSummaryController {
if (list.size() > 0) {
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);
if (save) {
if (sysSummary.getType().equals("t_14")) {
......@@ -108,6 +114,15 @@ public class SysSummaryController {
monitorvideo.setV_tailno(id.toString());
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().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
......@@ -133,6 +148,13 @@ public class SysSummaryController {
//monitorvideoService.saveOrUpdate(monitorvideo);
//sysSummary.setRemark(monitorvideo.getV_id());
//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());
boolean b = sysSummaryService.saveOrUpdate(sysSummary);
......
......@@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -153,5 +154,21 @@ public class AbnormalController {
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;
import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
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.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.SecurityUtils;
import me.zhengjie.utils.SpringContextHolder;
......@@ -79,7 +79,7 @@ public class DrybeachequipinforController {
String format = simpleDateFormat.format(new Date());
int i = new Random().nextInt(8999) + 1000;
String eqno = format + i;
drybeachequipinfor.setEquipno(eqno);
//drybeachequipinfor.setEquipno(eqno);
drybeachequipinfor.setCreatetime(new Date());
drybeachequipinfor.setUpdatetime(new Date());
boolean save = drybeachequipinforService.save(drybeachequipinfor);
......@@ -204,7 +204,7 @@ public class DrybeachequipinforController {
//获取当前尾矿库
String gettailno = onlineUserService.gettailno(currentUsername, request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", gettailno);
drybeachequipinforQueryWrapper.eq("tailingid", gettailno).ne("equipname","基准点");
List<Drybeachequipinfor> list = drybeachequipinforService.list(drybeachequipinforQueryWrapper);
if (!list.isEmpty()) {
for (Drybeachequipinfor drybeachequipinfor : list) {
......
......@@ -8,7 +8,7 @@ import me.zhengjie.gemho.service.sys.SysSelectService;
import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.service.tab.MonitorvideoService;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
......
......@@ -13,7 +13,7 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil;
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.ThrowableUtil;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -139,11 +139,8 @@ public class TailpondinforController {
public ResponseEntity<Object> updateone(@RequestBody Tailpondinfor tailpondinfor, HttpServletRequest request) {
try {
boolean biaoji = false;
String replace = tailpondinfor.getSubtailingno().replace("_", "");
String tailingno = tailpondinfor.getTailingno();
int length = tailingno.length();
String s = tailingno.substring(length - 4, length);
tailpondinfor.setTailingno(replace + s);
tailpondinfor.setCreatetime(new Date());
tailpondinfor.setUpdatetime(new Date());
int defaults = tailpondinfor.getDefaults();
......
......@@ -8,7 +8,7 @@ import me.zhengjie.gemho.entity.tab.Tailpondinfor;
import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.gemho.util.PageResult;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
......
......@@ -10,7 +10,7 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.TailNoForInfoUtil;
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.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -120,31 +120,7 @@ public class DbData implements Serializable {
@TableField(exist = false)
public String danwei;
public static void main(String[] args) {
LocalDateTime start = LocalDateTime.now();
/*@TableField(exist = false)
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 {
@ApiModelProperty(value = "报警级别")
public String bjjb;
@TableField(exist = false)
public String cjvalue;
@TableField(exist = false)
private String jcziitemname;
......
......@@ -43,6 +43,7 @@ public class AlarmState implements Serializable {
@ApiModelProperty(value = "备注")
@TableField("remark")
private String remark;
private String color;
}
......@@ -83,6 +83,8 @@ public class SysSummary implements Serializable {
private LocalDateTime updatetime;
private int must;
@TableField(exist = false)
private String v_appkey;
@TableField(exist = false)
......@@ -99,6 +101,10 @@ public class SysSummary implements Serializable {
private String v_id;
@TableField(exist = false)
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 {
private String subitem;
private String deviceid;
private String values;
private String city_weather;
}
package me.zhengjie.gemho.entity.tab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
......@@ -80,6 +81,9 @@ public class Abnormal implements Serializable {
*/
private Date createtime;
@TableField(exist = false)
private String unit;
/**
* 修改时间
*/
......
......@@ -253,7 +253,7 @@ public class Drybeachequipinfor implements Serializable {
*/
@TableField(exist = false)
@ApiModelProperty(value = "浸润线埋深 ,开孔高度,只用于浸润线")
private String jrxburial_depth;
private String jrxburial_depth;
/**
* 所属库水位的设备编号,只用于添加干滩设备时使用,对应库水位
......@@ -286,6 +286,8 @@ public class Drybeachequipinfor implements Serializable {
*/
private Double jrx_coord_x;
private Integer sensortype;
/**
* 排水量流速(单位是m/s),只用于排水量,表示流速
*/
......
......@@ -567,6 +567,10 @@ public class Tailpondinfor implements Serializable {
@ApiModelProperty(value = "大屏标题")
private String screen_title;
private Integer risk_entrance;
private Integer logo;
/**
* 创建时间
*/
......
......@@ -51,14 +51,14 @@ public class WebMonitorPoints implements Serializable {
@ApiModelProperty(value = "y位置")
private Double y;
@ApiModelProperty(value = "高度")
/* @ApiModelProperty(value = "高度")
private Double height;
@ApiModelProperty(value = "宽度")
private Double width;
@ApiModelProperty(value = "角度")
private Double angle;
private Double angle;*/
@ApiModelProperty(value = "信息框位置")
private String infoseat;
......
package me.zhengjie.gemho.mapper.data;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.data.DbData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.HashMap;
......@@ -19,9 +22,12 @@ import java.util.List;
@Mapper
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);
@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);
}
......@@ -19,9 +19,9 @@ import java.util.List;
@Mapper
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);
@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);
}
......@@ -22,10 +22,10 @@ public interface MpDataMapper extends BaseMapper<MpData> {
/* @Results({
@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);
@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);
}
......@@ -19,9 +19,9 @@ import java.util.List;
@Mapper
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);
@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);
}
......@@ -2,6 +2,7 @@ package me.zhengjie.gemho.mapper.data;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.data.RgData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -21,9 +22,14 @@ import java.util.List;
@Mapper
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);
@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> week(String start, String end, String sensorid);
}
......@@ -19,9 +19,9 @@ import java.util.List;
@Mapper
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);
@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);
}
......@@ -19,10 +19,10 @@ import java.util.List;
*/
@Mapper
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);
@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<JrxDryVo> getStageDepth(List<String> sensorids);
......
......@@ -16,10 +16,10 @@ import java.util.List;
* @since 2022-05-12
*/
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);
@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);
}
......@@ -18,9 +18,9 @@ import java.util.List;
*/
@Mapper
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);
@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);
}
......@@ -25,7 +25,7 @@ public interface SysSelectMapper extends BaseMapper<SysSelect> {
@Select(value = "select sumid from sys_select where mdcode=#{mdcode} and tailno=#{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);
@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;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.dic.Dic;
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.Param;
import org.apache.ibatis.annotations.Select;
......@@ -43,7 +44,7 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor>
@Select(value = "select equipno as value ,equipname as name from tb_drybeachequipinfor")
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);
@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>
@Select(value = "select equipno from tb_drybeachequipinfor where tailingid =#{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);
@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" +
" and equipname like CONCAT('%',#{searchValue},'%')\n" +
" </if>" +
"</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);
......
......@@ -15,5 +15,5 @@ import java.util.List;
*/
public interface JrxStepsMapper extends BaseMapper<JrxSteps> {
List<JrxSteps> getByCode(Integer code);
List<JrxSteps> getByCode(String code);
}
package me.zhengjie.gemho.mapper.tab;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.gemho.entity.tab.Abnormal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -10,6 +12,7 @@ import org.apache.ibatis.annotations.Update;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -22,10 +25,14 @@ import java.util.List;
@Mapper
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")
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,
@Param(value = "jcbjtime") String jcbjtime,
@Param(value = "reason") String reason,
......@@ -85,4 +92,12 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
List<HashMap<String, Object>> monthtj(String tailingid);
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> {
@Select(value = "SELECT * from tb_tailpondinfor ")
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);
/**
......
......@@ -18,7 +18,7 @@ import java.util.List;
*/
@Mapper
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);
int deletepoints(String guid);
......
......@@ -79,6 +79,8 @@ public interface DbDataService extends IService<DbData> {
*/
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> {
*/
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> {
*/
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> {
* @return
*/
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> {
* @return
*/
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> {
* @return
*/
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> {
*/
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> {
*/
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> {
* @return
*/
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
private DrybeachequipinforMapper drybeachequipinforMapper;
private final ArtificialDataMapper artificialDataMapper;
private final JczxMapper jczxMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -87,7 +87,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
Result result = new Result();
if (!dbData1.isEmpty()) {
for (DbData data1 : dbData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field declaredField : data1.getClass().getDeclaredFields()) {
if (declaredField.getName().equals(dbdata)) {
......@@ -163,6 +163,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
//遍历时间
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(dbdata, 0.0);
......@@ -174,6 +175,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
for (Field declaredField : data1.getClass().getDeclaredFields()) {
if (declaredField.getName().equals(dbdata)) {
hashMap.put(dbdata, Double.parseDouble((String) declaredField.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -182,7 +184,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
}
Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap);
result.setDate(parse);
result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
}
......@@ -231,6 +233,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
//遍历时间
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(dbdata, 0.0);
......@@ -242,6 +245,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
for (Field declaredField : data1.getClass().getDeclaredFields()) {
if (declaredField.getName().equals(dbdata)) {
hashMap.put(dbdata, Double.parseDouble((String) declaredField.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -250,7 +254,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
}
Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap);
result.setDate(parse);
result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
}
......@@ -413,6 +417,35 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
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
public void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response, HttpServletRequest request) throws IOException {
//获取数据
......
......@@ -43,11 +43,11 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
private DmDataMapper dmDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -86,7 +86,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}
if (!dmData1.isEmpty()) {
for (DmData data1 : dmData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) {
for (String dmdatum : dmdata) {
......@@ -169,6 +169,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
// List<DmData> dmData2 = dmDataMapper.dealmonth(deviceid, s, s1, 0);
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
for (String dmdatum : dmdata) {
......@@ -184,6 +185,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
String name = field.getName();
if (dmdatum.equals(name)) {
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
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap);
result.setDate(parse);
String deal = deal(parse);
result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
}
......@@ -224,6 +225,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
dataVo.setNames(nameVos);
} catch (Exception e) {
e.printStackTrace();
System.out.println("e = " + e.getMessage());
}
return dataVo;
}
......@@ -260,6 +262,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
// List<DmData> dmData2 = dmDataMapper.dealmonth(deviceid, s, s1, 0);
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
for (String dmdatum : dmdata) {
......@@ -274,6 +277,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
for (String dmdatum : dmdata) {
if (dmdatum.equals(field.getName())) {
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
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap);
result.setDate(parse);
result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
}
......@@ -331,6 +335,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
//获取编码-名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
HashMap<String, String> noDan = ServiceUtil.getNoDan(request);
HashMap<String, Integer> sensorType = ServiceUtil.getSensorType();
//处理人工监测数据
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
......@@ -359,8 +364,17 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}
} else {
for (DmData record : records) {
Integer integer = sensorType.get(record.getSensorid());
record.setSensorname(noName.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);
......@@ -401,6 +415,35 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
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
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
......@@ -418,14 +461,22 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(dmDataQueryWrapper, dataQueryCriteria);
List<DmData> dmData = dmDataMapper.selectList(dmDataQueryWrapper);
HashMap<String, Integer> sensorType = ServiceUtil.getSensorType();
//获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request);
HashMap<String, String> noDan = ServiceUtil.getNoDan(request);
String sensorname = noName.get(dataQueryCriteria.getCode());
Integer sensortype = sensorType.get(dataQueryCriteria.getCode());
String danwei = noDan.get(dataQueryCriteria.getCode());
//处理封装数据
ImgDataVo dmdata = ServiceUtil.deal("dmdata", sensorname, dmData, danwei);
return dmdata;
ImgDataVo imgDataVo = new ImgDataVo();
if (3 == sensortype) {
//处理封装数据
imgDataVo = ServiceUtil.deal("dmdata1", sensorname, dmData, danwei);
} else {
//处理封装数据
imgDataVo = ServiceUtil.deal("dmdata", sensorname, dmData, danwei);
}
return imgDataVo;
}
public String deal(Date date) throws ParseException {
......
......@@ -46,11 +46,11 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
private DrybeachequipinforMapper drybeachequipinforMapper;
@Autowired
private ArtificialDataMapper artificialDataMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid) {
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();
ArrayList<NameVo> nameVos = new ArrayList<>();
......@@ -92,7 +92,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
//遍历实时数据
if (!mpData1.isEmpty()) {
for (MpData data1 : mpData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (String mpdata : mpdatas) {
for (Field field : data1.getClass().getDeclaredFields()) {
......@@ -151,7 +151,6 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
public DataVo week(String date, String values, String deviceid) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象
DataVo dataVo = new DataVo();
ArrayList<NameVo> nameVos = new ArrayList<>();
......@@ -179,6 +178,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
//获取时间区间的人工巡检数据
//List<MpData> mpData2 = mpDataMapper.dealmonth(deviceid, s, s1, 0);
for (String weekBetweenDate : weekBetweenDates) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
for (String mpdata : mpdatas) {
......@@ -194,6 +194,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (mpdata.equals(field.getName())) {
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
}*/
Date parse = sdf.parse(weekBetweenDate);
String deal = deal(parse);
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
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
public DataVo month(String date, String values, String deviceid) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH");
//创建返回对象
DataVo dataVo = new DataVo();
ArrayList<NameVo> nameVos = new ArrayList<>();
......@@ -274,6 +274,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
//获取时间区间的人工巡检数据
//List<MpData> mpData2 = mpDataMapper.dealmonth(deviceid, s, s1, 0);
for (String weekBetweenDate : weekBetweenDates) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
for (String mpdata : mpdatas) {
......@@ -289,6 +290,7 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (mpdata.equals(field.getName())) {
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
}
}*/
Date parse = sdf.parse(weekBetweenDate);
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
result.setDateUnit(weekBetweenDate.split("-")[1] + "-" + weekBetweenDate.split("-")[2]);
results.add(result);
......@@ -433,6 +435,35 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
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
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
......
......@@ -43,12 +43,12 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
private PslDataMapper pslDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -86,7 +86,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
//hashMap.put("p_" + psldata, 0.0);
if (!pslData1.isEmpty()) {
for (PslData data1 : pslData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) {
if (psldata.equals(field.getName())) {
......@@ -164,6 +164,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
//List<PslData> pslData2 = pslDataMapper.dealmonth(deviceid, s, s1, 0);
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(psldata, 0.0);
......@@ -175,6 +176,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
for (Field field : data1.getClass().getDeclaredFields()) {
if (psldata.equals(field.getName())) {
hashMap.put(psldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -195,7 +197,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
......@@ -246,6 +248,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
List<PslData> pslData1 = pslDataMapper.dealmonth(deviceid, s, s1);
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(psldata, 0.0);
......@@ -257,6 +260,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
for (Field field : data1.getClass().getDeclaredFields()) {
if (psldata.equals(field.getName())) {
hashMap.put(psldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -264,7 +268,7 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
}
}
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
......@@ -427,6 +431,34 @@ public class PslDataServiceImpl extends ServiceImpl<PslDataMapper, PslData> impl
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 {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
......
......@@ -18,7 +18,6 @@ import me.zhengjie.gemho.x_datavo.Result;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import me.zhengjie.utils.FileUtil;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -57,7 +56,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
public DataVo week(String date, String values, String deviceid) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
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");
//创建返回对象的list集合
ArrayList<Result> rgs = new ArrayList<>();
ArrayList<NameVo> nameVos = new ArrayList<>();
......@@ -84,8 +83,9 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
Date starttime = sdf1.parse(start + " 00:00:00");
Date endtime = sdf1.parse(end + " 23:59:59");
//获取实时数据
rgDataQueryWrapper1.ge("time", starttime).le("time", endtime).eq("datasource", 1).eq("sensorid", deviceid);
List<RgData> rgData1 = rgDataMapper.selectList(rgDataQueryWrapper1);
rgDataQueryWrapper1.ge("time", starttime).le("time", endtime).eq("sensorid", deviceid);
List<RgData> rgData2 = rgDataMapper.selectList(rgDataQueryWrapper1);
List<RgData> rgData1 = rgDataMapper.week(start + " 00:00:00", end + " 23:59:59", deviceid);
//获取人工巡检的数据
/*QueryWrapper<RgData> rgDataQueryWrapper2 = new QueryWrapper<>();
rgDataQueryWrapper2.ge("time", starttime).le("time", endtime).eq("datasource", 0).eq("sensorid", deviceid);
......@@ -93,6 +93,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
//获取时间区间内所有的时间
List<String> list = DateUtil.getWeekBetweenDates(map.get("start"), map.get("end"));
for (String s : list) {
Date rgdate = sdf.parse(s);
Result rg = new Result();
double value1 = 0.0;
//double value2 = 0.0;
......@@ -103,7 +104,8 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
//判断时间是否在同一天
if (format.equals(s)) {
//在同一天数据相加
value1 += Double.parseDouble(data.getRainfall().toString());
value1 = Double.parseDouble(data.getRainfall().toString());
rgdate = sdf2.parse(sdf2.format(data.getTime()));
break;
}
}
......@@ -126,9 +128,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
hashMap.put("name1", value1);
//hashMap.put("name2", value2);
rg.setValues(hashMap);
Date parse = sdf.parse(s);
rg.setDate(parse);
String deal = deal(parse);
rg.setDate(rgdate);
rg.setDateUnit(s.split("-")[1] + "-" + s.split("-")[2]);
rgs.add(rg);
}
......@@ -164,7 +164,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
public DataVo month(String date, String values, String deviceid) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
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");
//创建返回对象的list集合
ArrayList<Result> rgs = new ArrayList<>();
ArrayList<NameVo> nameVos = new ArrayList<>();
......@@ -192,7 +192,8 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
Date starttime = sdf1.parse(start + " 00:00:00");
Date endtime = sdf1.parse(end + " 23:59:59");
rgDataQueryWrapper1.ge("time", starttime).le("time", endtime).eq("sensorid", deviceid);
List<RgData> rgData1 = rgDataMapper.selectList(rgDataQueryWrapper1);
List<RgData> rgData2 = rgDataMapper.selectList(rgDataQueryWrapper1);
List<RgData> rgData1 = rgDataMapper.week(start + " 00:00:00", end + " 23:59:59", deviceid);
//获取人工巡检的数据
/* QueryWrapper<RgData> rgDataQueryWrapper2 = new QueryWrapper<>();
rgDataQueryWrapper2.ge("time", starttime).le("time", endtime).eq("datasource", 0).eq("sensorid", deviceid);
......@@ -200,6 +201,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
//获取时间区间内所有的时间
List<String> list = DateUtil.getMonthBetweenDates(map.get("start"), map.get("end"));
for (String s : list) {
Date rgdate = sdf.parse(s);
Result rg = new Result();
double value1 = 0.0;
//double value2 = 0.0;
......@@ -210,7 +212,8 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
//判断时间是否在同一天
if (format.equals(s)) {
//在同一天数据相加
value1 += Double.parseDouble(data.getRainfall().toString());
value1 = Double.parseDouble(data.getRainfall().toString());
rgdate = sdf2.parse(sdf2.format(data.getTime()));
break;
}
}
......@@ -235,7 +238,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
hashMap.put("name1", value1);
//hashMap.put("name2", value2);
rg.setValues(hashMap);
rg.setDate(sdf.parse(s));
rg.setDate(rgdate);
rg.setDateUnit(s.split("-")[1] + "-" + s.split("-")[2]);
rgs.add(rg);
}
......@@ -267,7 +270,7 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
QueryWrapper<RgData> rgDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.dbquery(rgDataQueryWrapper, dataQueryCriteria, request);
Page<RgData> rgDataPage = new Page<>(page + 1, size);
rgDataPage = rgDataMapper.selectPage(rgDataPage, rgDataQueryWrapper);
rgDataPage = rgDataMapper.pageAll(rgDataPage, rgDataQueryWrapper);
List<RgData> records = rgDataPage.getRecords();
//获取编号名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
......@@ -426,6 +429,35 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
return realDataVos;
}
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request, String tailInfoNo) {
List<HashMap<String, Object>> reals = rgDataMapper.real(tailInfoNo);
Map dbdata = ReadJsonFileUtil.getMap("realdata");
Object keys1 = dbdata.get("rgdata");
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;
}
/**
* 日统计
*
......@@ -499,7 +531,8 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
hashMap.put("name1", value1);
//hashMap.put("name2", value2);
rg.setValues(hashMap);
rg.setDate(sdf2.parse(string));
Date parse = sdf1.parse(string + ":00:00");
rg.setDate(parse);
rg.setDateUnit(string.substring(string.length() - 2, string.length()) + "时");
rgs.add(rg);
}
......@@ -574,39 +607,6 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
}
public static void main(String[] args) throws ParseException {
/*Date date = new Date();
HashMap<String, String> map = new HashMap<>();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH");
String format = simpleDateFormat.format(date);
Date start = simpleDateFormat.parse(format);
Calendar dd = Calendar.getInstance();
dd.setTime(start);
dd.add(Calendar.HOUR_OF_DAY, -12);
String format1 = simpleDateFormat.format(dd.getTime());
map.put("start", format1);
map.put("end", format);
List<String> list = DateUtil.getdayBetweenDates(map.get("start"), map.get("end"));
System.out.println(JSONObject.toJSON(map));*/
/* String s = "sasdfg";
String substring = s.substring(s.length() - 2, s.length() - 1);
System.out.println(s.substring(s.length() - 2, s.length()));*/
/* Date date = new Date();
String s = "2022-01-8 23:23:23";
String[] arr = s.split("-");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar instance = Calendar.getInstance();
//instance.setTime(sdf1.parse(s));
instance.set(Integer.parseInt(arr[0]), Integer.parseInt(arr[1]) - 1, Integer.parseInt(arr[2]));
int i = instance.get(Calendar.DAY_OF_WEEK) - 1;
System.out.println(i);*/
ArrayList<T> ts = null;
if (ObjectUtils.isEmpty(ts)) {
System.out.println("ts = null");
}
}
public String deal(Date date) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
......
......@@ -43,7 +43,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
private SlDataMapper slDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
/**
* 日统计
*
......@@ -56,7 +56,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -94,7 +94,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
// hashMap.put("p_" + sldata, 0.0);
if (!slData1.isEmpty()) {
for (SlData data1 : slData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) {
if (sldata.equals(field.getName())) {
......@@ -181,6 +181,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
//获取时间区间的时间
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(sldata, 0.0);
......@@ -192,6 +193,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (sldata.equals(field.getName())) {
hashMap.put(sldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -212,7 +214,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
result.setValues(hashMap);
......@@ -275,6 +277,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
//获取时间区间的时间
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(sldata, 0.0);
......@@ -286,6 +289,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (sldata.equals(field.getName())) {
hashMap.put(sldata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -306,7 +310,7 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
result.setValues(hashMap);
results.add(result);
......@@ -468,6 +472,35 @@ public class SlDataServiceImpl extends ServiceImpl<SlDataMapper, SlData> impleme
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 {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
......@@ -43,11 +43,11 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
private StDataMapper stDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -84,7 +84,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
// hashMap.put("p_" + stdata, 0.0);
if (!stData1.isEmpty()) {
for (StData data1 : stData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) {
if (stdata.equals(field.getName())) {
......@@ -161,6 +161,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
//获取时间区间的时间
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(stdata, 0.0);
......@@ -172,6 +173,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (stdata.equals(field.getName())) {
hashMap.put(stdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -193,7 +195,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap);
result.setDate(parse);
result.setDate(rgdate);
//String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
......@@ -245,6 +247,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
//获取时间区间的时间
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(stdata, 0.0);
......@@ -256,6 +259,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (stdata.equals(field.getName())) {
hashMap.put(stdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -277,7 +281,7 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setValues(hashMap);
result.setDate(parse);
result.setDate(rgdate);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
}
......@@ -331,6 +335,35 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
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
@Override
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
......
......@@ -35,7 +35,7 @@ public class SzDataServiceImpl extends ServiceImpl<SzDataMapper, SzData> impleme
private static String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
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
private SzDataMapper szDataMapper;
@Autowired
......
......@@ -42,12 +42,12 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
private WpbDataMapper wpbDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -84,7 +84,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
//hashMap.put("p_" + wpbdata, 0.0);
if (!wpbData1.isEmpty()) {
for (WpbData data1 : wpbData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) {
if (wpbdata.equals(field.getName())) {
......@@ -161,6 +161,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
//获取时间区间
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
//hashMap.put(wpbdata, 0.0);
......@@ -172,6 +173,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
for (Field field : data1.getClass().getDeclaredFields()) {
if (wpbdata.equals(field.getName())) {
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
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
......@@ -244,6 +246,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
//获取时间区间
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(wpbdata, 0.0);
......@@ -257,6 +260,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
for (Field field : data1.getClass().getDeclaredFields()) {
if (wpbdata.equals(field.getName())) {
hashMap.put(wpbdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -277,7 +281,7 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
......@@ -440,4 +444,33 @@ public class WpbDataServiceImpl extends ServiceImpl<WpbDataMapper, WpbData> impl
}
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
private WtDataMapper wtDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
@Override
public DataVo day(String date, String values, String deviceid, String subitem) {
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();
ArrayList<Result> results = new ArrayList<>();
......@@ -85,7 +85,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
//hashMap.put("p_" + wtdata, 0.0);
if (!wtData1.isEmpty()) {
for (WtData data1 : wtData1) {
String format = sdf2.format(data1.getTime());
String format = sdf3.format(data1.getTime());
if (string.equals(format)) {
for (Field field : data1.getClass().getDeclaredFields()) {
if (wtdata.equals(field.getName())) {
......@@ -162,6 +162,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
//获取时间区间
List<String> strings = DateUtil.getWeekBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
//hashMap.put(wtdata, 0.0);
......@@ -173,6 +174,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (wtdata.equals(field.getName())) {
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
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
String deal = deal(parse);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
......@@ -246,6 +248,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
//获取时间区间
List<String> strings = DateUtil.getMonthBetweenDates(start, end);
for (String string : strings) {
Date rgdate = sdf.parse(s);
Result result = new Result();
HashMap<String, Double> hashMap = new HashMap<>();
hashMap.put(wtdata, 0.0);
......@@ -259,6 +262,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
for (Field field : data1.getClass().getDeclaredFields()) {
if (wtdata.equals(field.getName())) {
hashMap.put(wtdata, Double.parseDouble((String) field.get(data1)));
rgdate=sdf2.parse(sdf2.format(data1.getTime()));
}
}
break;
......@@ -279,7 +283,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
}
}*/
Date parse = sdf1.parse(string + " 00:00:00");
result.setDate(parse);
result.setDate(rgdate);
result.setValues(hashMap);
result.setDateUnit(string.split("-")[1] + "-" + string.split("-")[2]);
results.add(result);
......@@ -442,6 +446,35 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
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 {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
package me.zhengjie.gemho.service.sys;
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.SysArea;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
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;
import me.zhengjie.gemho.mapper.sys.SysViewsMapper;
import me.zhengjie.gemho.service.sys.SysSelectService;
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 org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -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.service.impl.ServiceImpl;
import me.zhengjie.gemho.entity.sys.SysSummary;
import me.zhengjie.gemho.mapper.sys.SysSelectMapper;
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.sys.*;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.mapper.tab.UserTailponMapper;
import me.zhengjie.gemho.service.sys.SysSummaryService;
import me.zhengjie.gemho.util.TailNoForInfoUtil;
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 org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
......@@ -47,6 +47,8 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm
private SysViewsMapper sysViewsMapper;
@Autowired
private SysTypeMapper sysTypeMapper;
@Autowired
private DevtypeExtendMapper devtypeExtendMapper;
@Override
public HashMap<String, Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
......@@ -92,7 +94,15 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm
sysSummaries.addAll(records);
//sysSummaries.addAll(records1);
//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()*/);
return stringListHashMap;
}
......@@ -132,9 +142,11 @@ public class SysSummaryServiceImpl extends ServiceImpl<SysSummaryMapper, SysSumm
return true;
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deletebyid(int id) {
int deletebyid = sysSummaryMapper.deletebyid(id);
devtypeExtendMapper.deletebyid(id);
if (deletebyid > 0) {
return true;
}
......
......@@ -4,19 +4,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import me.zhengjie.gemho.entity.sys.SysType;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.sys.SysDaterangeMapper;
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.sys.*;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.mapper.tab.JrxDissectMapper;
import me.zhengjie.gemho.mapper.tab.MonitorvideoMapper;
import me.zhengjie.gemho.service.sys.SysTypeService;
import me.zhengjie.gemho.util.TailNoForInfoUtil;
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.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
......@@ -46,6 +44,8 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl
private MonitorvideoMapper monitorvideoMapper;
@Autowired
private OnlineUserService onlineUserService;
@Autowired
private DevtypeExtendMapper devtypeExtendMapper;
@Override
public SysVo getbyid(String id, String sensorid) {
......@@ -54,7 +54,9 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl
drybeachequipinforQueryWrapper.eq("equipno", sensorid);
Drybeachequipinfor one = drybeachequipinforMapper.selectOne(drybeachequipinforQueryWrapper);
SysType sysType = null;
Integer sensortype = null;
if (one != null) {
sensortype = one.getSensortype();
String devicetype = one.getDevicetype();
//根据设备类型获取指定的类型表信息
int deviceid = Integer.parseInt(devicetype);
......@@ -101,12 +103,29 @@ public class SysTypeServiceImpl extends ServiceImpl<SysTypeMapper, SysType> impl
}
ArrayList<TypeVo> getsubs = jrxDissectMapper.getsubs(tailInfoNo);
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 {
typeVos = sysSubitemMapper.getsubs(sysType.getCode());
sysVo.setSubitem(typeVos);
}
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.setValues(valuesVos);
return sysVo;
......
......@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -60,4 +61,12 @@ public interface TabAbnormalService extends IService<Abnormal> {
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;
import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -41,6 +42,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
@Autowired
private OnlineUserService onlineUserService;
@Override
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage();
......@@ -51,6 +53,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
String gettailno = onlineUserService.gettailno(currentUsername, request);
drybeachequipinforQueryWrapper.eq("tailingid", gettailno);
ServiceUtil.query(drybeachequipinforQueryWrapper, dataQueryCriteria);
drybeachequipinforQueryWrapper.ne("equipname","基准点");
Page<Drybeachequipinfor> drybeachequipinforPage = new Page<>(page + 1, size);
drybeachequipinforPage = drybeachequipinforMapper.selectPage(drybeachequipinforPage, drybeachequipinforQueryWrapper);
hashMap.put("list", drybeachequipinforPage.getRecords());
......@@ -140,7 +143,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
//获取当前尾矿库编码
String tailingid = TailNoForInfoUtil.getTailInfoNo(request);
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();
long total = page1.getTotal();
map.put("list", records);
......@@ -179,7 +182,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
if (tailInfoNo == null) {
return null;
}
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo).ne("equipname", "基准点");
List<Drybeachequipinfor> drybeachequipinfors = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper);
ArrayList<DrybeachequipinforVo> drybeachequipinforVos = new ArrayList<>();
for (Drybeachequipinfor drybeachequipinfor : drybeachequipinfors) {
......@@ -197,7 +200,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
if (tailInfoNo == null) {
return null;
}
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo).ne("equipname", "基准点");
List<Drybeachequipinfor> drybeachequipinfors = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper);
ArrayList<DrybeachequipinforVo> drybeachequipinforVos = new ArrayList<>();
for (Drybeachequipinfor drybeachequipinfor : drybeachequipinfors) {
......
......@@ -122,7 +122,7 @@ public class JrxDissectServiceImpl extends ServiceImpl<JrxDissectMapper, JrxDiss
BeanUtils.copyProperties(jrxDissect, jrxDissectDto);
jrxDissectVisualVO.setDissect(jrxDissectDto);
//根据坡面编号获取台阶信息
List<JrxSteps> byCode = jrxStepsMapper.getByCode(Integer.valueOf(subitem));
List<JrxSteps> byCode = jrxStepsMapper.getByCode(subitem);
jrxDissectVisualVO.setSteps(byCode);
//根据坡面查询设备信息
String dry_s = jrxDissect.getDry_s();
......
package me.zhengjie.gemho.service.tab.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
......@@ -7,6 +8,7 @@ import lombok.SneakyThrows;
import me.zhengjie.gemho.entity.dic.AlarmLevel;
import me.zhengjie.gemho.entity.dic.AlarmState;
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.TabAbnormalMapper;
import me.zhengjie.gemho.service.dic.IAlarmLevelService;
......@@ -42,6 +44,21 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
private IAlarmLevelService iAlarmLevelService;
@Autowired
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
public boolean jcbj(String equipno, String time, String reason, String jcreason) {
......@@ -56,6 +73,14 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
int jcbj = tabAbnormalMapper.jcbj(jcreason, jcbjtime, reason, 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) {
return true;
}
......@@ -148,14 +173,14 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
long size = dataQueryCriteria.getSize();
Page<Abnormal> abnormalPage = new Page<>(page + 1, size);
QueryWrapper<Abnormal> abnormalQueryWrapper = new QueryWrapper<>();
ServiceUtil.dataQuery(abnormalQueryWrapper, dataQueryCriteria);
dataQuery(abnormalQueryWrapper, dataQueryCriteria);
//获取所有设备的编码
List<String> dryNo = TailNoForInfoUtil.getDryNo(request);
if (dryNo != null) {
abnormalQueryWrapper.in("equipno", dryNo);
abnormalQueryWrapper.in("a.equipno", dryNo);
}
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("total", abnormalPage1.getTotal());
return map;
......@@ -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;
import me.zhengjie.utils.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
......@@ -46,6 +47,9 @@ public class TailpondinforServiceImpl extends ServiceImpl<TailpondinforMapper, T
String currentUsername = SecurityUtils.getCurrentUsername();
if (!currentUsername.equals("admin")) {
ArrayList<String> gettailnos = userTailponMapper.gettailnos(currentUsername);
if(ObjectUtils.isEmpty(gettailnos)){
tailpondinforQueryWrapper.in("tailingno", "");
}
tailpondinforQueryWrapper.in("tailingno", gettailnos);
}
ServiceUtil.query(tailpondinforQueryWrapper, dataQueryCriteria);
......
......@@ -2,6 +2,7 @@ package me.zhengjie.gemho.service.web.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.WebMonitorIcon;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
......@@ -15,7 +16,7 @@ import me.zhengjie.gemho.service.web.IWebMonitorChartService;
import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.web.MonitorChartVo;
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.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -55,6 +56,8 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
private RedisUtils redisUtils;
@Autowired
private DrybeachequipinforService drybeachequipinforService;
@Autowired
private RealDataController realDataController;
@Override
public boolean deal(WebMonitorChart webMonitorChart, HttpServletRequest request) {
......@@ -181,6 +184,10 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
List<HashMap<String, Object>> hashMaps = drybeachequipinforService.dryStateCount(request);
//获取所有设备的实时数据
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();
MonitorChartVo monitorChartVo = getsimplemonbase(request);
......@@ -206,23 +213,31 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
break;
}
}
for (RealDataVo realDataVo : realData) {
if (realDataVo.getEquipno().equals(id)) {
List<Map> keys = (List<Map>) realDataVo.getKeys();
HashMap<String, Object> data = realDataVo.getData();
Set<String> strings = data.keySet();
for (Map key : keys) {
Set keyset1 = key.keySet();
for (Object o : keyset1) {
String s = (String) key.get(o.toString());
for (String string : strings) {
if (s.equals(string)) {
key.put(o.toString(), data.get(string));
if (!ObjectUtils.isEmpty(realData)) {
for (RealDataVo realDataVo : realData) {
if (realDataVo.getEquipno().equals(id)) {
//获取键值
List<Map> keys = (List<Map>) realDataVo.getKeys();
//获取数据
HashMap<String, Object> data = realDataVo.getData();
//获取数据的keys
Set<String> strings = data.keySet();
//
HashMap<String, Object> map = new HashMap<>();
//遍历键值
for (Map key : keys) {
Set keyset1 = key.keySet();
for (Object o : keyset1) {
String s = (String) key.get(o.toString());
for (String string : strings) {
if (s.equals(string)) {
map.put(o.toString(), data.get(string));
}
}
}
}
item.put("realdata", map);
}
item.put("realdata", keys);
}
}
}
......@@ -265,21 +280,30 @@ public class WebMonitorChartServiceImpl extends ServiceImpl<WebMonitorChartMappe
}
for (RealDataVo realDataVo : realData) {
if (realDataVo.getEquipno().equals(id)) {
//获取键说明的list
List<Map> keys = (List<Map>) realDataVo.getKeys();
//获取数据
HashMap<String, Object> data = realDataVo.getData();
//获取数据的key集合
Set<String> strings = data.keySet();
for (Map key : keys) {
Set keyset1 = key.keySet();
//创建储存键值的map
HashMap<String, Object> realDataMap = new HashMap<>();
//遍历键说明的list
for (Map map : keys) {
//遍历键说明
Set keyset1 = map.keySet();
for (Object o : keyset1) {
String s = (String) key.get(o.toString());
String s = (String) map.get(o.toString());
//遍历数据
for (String string : strings) {
//键和数据的键相同就存入
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
public void updatehw(int height, int width, int id) {
}
}
......@@ -42,6 +42,7 @@ public class DataUtil {
HashMap<String, String> map = new HashMap<>();
map.put("水平", "dispA");
map.put("竖向", "dispB");
map.put("沉降", "dispB");
ArrayList<String> strings = new ArrayList<>();
String[] split = code.split(",");
for (String s : split) {
......@@ -60,6 +61,9 @@ public class DataUtil {
} else if (s.equals("竖向")) {
nameVos.add(new NameVo().setKey("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;
......@@ -213,4 +217,5 @@ public class DataUtil {
map.put("alarmLevel", alarmLevel);
return map;
}
}
......@@ -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.ImgDataVo;
import me.zhengjie.gemho.x_datavo.tab.DrybeachequipinforVo;
import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SpringContextHolder;
import org.springframework.util.ObjectUtils;
......@@ -22,8 +21,6 @@ import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
public class ServiceUtil {
......@@ -48,7 +45,16 @@ public class ServiceUtil {
Set<String> strings = exact.keySet();
if (!strings.isEmpty()) {
for (String string : strings) {
queryWrapper.eq(string, exact.get(string));
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));
}
}
}
}
......@@ -439,23 +445,23 @@ public class ServiceUtil {
LocalDateTime startTime = LocalDateTime.parse(startIng, dateTimeFormatter1);
queryWrapper.ge("time", startTime).le("time", endTime);
} else {*/
//判断是否有时间字段
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 = toDate(starttime);
Date end = toDate(endtime);
queryWrapper.ge("time", start).le("time", end);
} else {
Date start = toDate(timeSpace + " 00:00:00");
Date end = toDate(timeSpace + " 23:59:59");
queryWrapper.ge("time", start).le("time", end);
}
//判断是否有时间字段
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 = toDate(starttime);
Date end = toDate(endtime);
queryWrapper.ge("time", start).le("time", end);
} else {
queryWrapper.apply("DATE_FORMAT(time,'%Y-%m-%d') =DATE_FORMAT(NOW(),'%Y-%m-%d')");
Date start = toDate(timeSpace + " 00:00:00");
Date end = toDate(timeSpace + " 23:59:59");
queryWrapper.ge("time", start).le("time", end);
}
} else {
queryWrapper.apply("DATE_FORMAT(time,'%Y-%m-%d') =DATE_FORMAT(NOW(),'%Y-%m-%d')");
}
//}
//正序倒序
String sort = dataQueryCriteria.getSort();
......@@ -670,19 +676,36 @@ public class ServiceUtil {
if (tailInfoNo == 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);
List<DrybeachequipinforVo> drybeachequipinforVos = drybeachequipinforService.sensorList(null, request);
HashMap<String, String> hashMap = new HashMap<String, String>();
for (DrybeachequipinforVo drybeachequipinforVo : drybeachequipinforVos) {
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;
}
......@@ -698,12 +721,7 @@ public class ServiceUtil {
if (tailInfoNo == 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);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
......@@ -712,7 +730,6 @@ public class ServiceUtil {
for (Drybeachequipinfor drybeachequipinforVo : drybeachequipinforVos) {
hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEqdanwei());
}
redisUtils.set("NoDan" + tailInfoNo, hashMap);
return hashMap;
}
......@@ -728,12 +745,6 @@ public class ServiceUtil {
if (tailInfoNo == 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);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("tailingid", tailInfoNo);
......@@ -742,23 +753,7 @@ public class ServiceUtil {
for (Drybeachequipinfor drybeachequipinforVo : drybeachequipinforVos) {
hashMap.put(drybeachequipinforVo.getEquipno(), drybeachequipinforVo.getEqdanwei());
}
redisUtils.set("NoDan" + tailInfoNo, 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;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
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.SecurityUtils;
import me.zhengjie.utils.SpringContextHolder;
......
......@@ -8,7 +8,7 @@ import java.util.HashMap;
@Data
public class Result {
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date date;
private String dateUnit;
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 {
private String v_id;*/
private String v_tailno;
/*private String v_tailno;*/
private List<DataRangeVo> ranges;
private List<ValuesVo> values;
private List<SensorVo> sensors;
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.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 @@
* See the License for the specific language governing permissions and
* 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.copier.CopyOptions;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.copier.CopyOptions;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.copier.CopyOptions;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.copier.CopyOptions;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.copier.CopyOptions;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* 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.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* 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.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* 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.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* 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.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* 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.JpaSpecificationExecutor;
......
......@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* 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.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.service.AppService;
import me.zhengjie.modules.mnt.service.dto.AppQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import me.zhengjie.gemho.x_generato.modules.mnt.service.AppService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* 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.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.service.DatabaseService;
import me.zhengjie.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.modules.mnt.util.SqlUtils;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DatabaseService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.util.SqlUtils;
import me.zhengjie.utils.FileUtil;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* 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.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.service.DeployService;
import me.zhengjie.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.utils.FileUtil;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
......
......@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* 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.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployHistoryService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* 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.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.ServerDeploy;
import me.zhengjie.modules.mnt.service.ServerDeployService;
import me.zhengjie.modules.mnt.service.dto.ServerDeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import me.zhengjie.gemho.x_generato.modules.mnt.service.ServerDeployService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* 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.modules.mnt.service.dto.AppDto;
import me.zhengjie.modules.mnt.service.dto.AppQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* 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.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* 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.modules.mnt.service.dto.DeployHistoryDto;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* 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.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.service.dto.DeployDto;
import me.zhengjie.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* 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.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.modules.mnt.service.dto.ServerDeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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 me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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 me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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 lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.dto;
package me.zhengjie.gemho.x_generato.modules.mnt.service.dto;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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 me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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 me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* 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 me.zhengjie.annotation.Query;
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.impl;
package me.zhengjie.gemho.x_generato.modules.mnt.service.impl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.repository.AppRepository;
import me.zhengjie.modules.mnt.service.AppService;
import me.zhengjie.modules.mnt.service.dto.AppDto;
import me.zhengjie.modules.mnt.service.dto.AppQueryCriteria;
import me.zhengjie.modules.mnt.service.mapstruct.AppMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.repository.AppRepository;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct.AppMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import me.zhengjie.gemho.x_generato.modules.mnt.service.AppService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppQueryCriteria;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.QueryHelp;
......
......@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.impl;
package me.zhengjie.gemho.x_generato.modules.mnt.service.impl;
import cn.hutool.core.util.IdUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.repository.DatabaseRepository;
import me.zhengjie.modules.mnt.service.DatabaseService;
import me.zhengjie.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.modules.mnt.service.mapstruct.DatabaseMapper;
import me.zhengjie.modules.mnt.util.SqlUtils;
import me.zhengjie.gemho.x_generato.modules.mnt.repository.DatabaseRepository;
import me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct.DatabaseMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DatabaseService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.util.SqlUtils;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.QueryHelp;
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.impl;
package me.zhengjie.gemho.x_generato.modules.mnt.service.impl;
import cn.hutool.core.util.IdUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.repository.DeployHistoryRepository;
import me.zhengjie.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryDto;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import me.zhengjie.modules.mnt.service.mapstruct.DeployHistoryMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.repository.DeployHistoryRepository;
import me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct.DeployHistoryMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployHistoryService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryQueryCriteria;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.QueryHelp;
......
......@@ -13,31 +13,31 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.impl;
package me.zhengjie.gemho.x_generato.modules.mnt.service.impl;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.domain.ServerDeploy;
import me.zhengjie.modules.mnt.repository.DeployRepository;
import me.zhengjie.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.service.DeployService;
import me.zhengjie.modules.mnt.service.ServerDeployService;
import me.zhengjie.modules.mnt.service.dto.AppDto;
import me.zhengjie.modules.mnt.service.dto.DeployDto;
import me.zhengjie.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.modules.mnt.service.mapstruct.DeployMapper;
import me.zhengjie.modules.mnt.util.ExecuteShellUtil;
import me.zhengjie.modules.mnt.util.ScpClientUtil;
import me.zhengjie.modules.mnt.websocket.MsgType;
import me.zhengjie.modules.mnt.websocket.SocketMsg;
import me.zhengjie.modules.mnt.websocket.WebSocketServer;
import me.zhengjie.gemho.x_generato.modules.mnt.repository.DeployRepository;
import me.zhengjie.gemho.x_generato.modules.mnt.websocket.MsgType;
import me.zhengjie.gemho.x_generato.modules.mnt.websocket.SocketMsg;
import me.zhengjie.gemho.x_generato.modules.mnt.websocket.WebSocketServer;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployHistoryService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.DeployService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.ServerDeployService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct.DeployMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.util.ExecuteShellUtil;
import me.zhengjie.gemho.x_generato.modules.mnt.util.ScpClientUtil;
import me.zhengjie.utils.*;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.impl;
package me.zhengjie.gemho.x_generato.modules.mnt.service.impl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.mnt.domain.ServerDeploy;
import me.zhengjie.modules.mnt.repository.ServerDeployRepository;
import me.zhengjie.modules.mnt.service.ServerDeployService;
import me.zhengjie.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.modules.mnt.service.dto.ServerDeployQueryCriteria;
import me.zhengjie.modules.mnt.service.mapstruct.ServerDeployMapper;
import me.zhengjie.modules.mnt.util.ExecuteShellUtil;
import me.zhengjie.gemho.x_generato.modules.mnt.repository.ServerDeployRepository;
import me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct.ServerDeployMapper;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import me.zhengjie.gemho.x_generato.modules.mnt.service.ServerDeployService;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.mnt.util.ExecuteShellUtil;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.QueryHelp;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.service.dto.AppDto;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.App;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.AppDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.service.dto.DatabaseDto;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Database;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DatabaseDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.service.dto.DeployHistoryDto;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.DeployHistory;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployHistoryDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.service.dto.DeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.Deploy;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.DeployDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.mnt.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.mnt.domain.ServerDeploy;
import me.zhengjie.modules.mnt.service.dto.ServerDeployDto;
import me.zhengjie.gemho.x_generato.modules.mnt.domain.ServerDeploy;
import me.zhengjie.gemho.x_generato.modules.mnt.service.dto.ServerDeployDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -17,7 +17,7 @@
*
*/
package me.zhengjie.modules.mnt.util;
package me.zhengjie.gemho.x_generato.modules.mnt.util;
import lombok.extern.slf4j.Slf4j;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.util;
package me.zhengjie.gemho.x_generato.modules.mnt.util;
import cn.hutool.core.io.IoUtil;
import com.jcraft.jsch.ChannelShell;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.util;
package me.zhengjie.gemho.x_generato.modules.mnt.util;
import ch.ethz.ssh2.Connection;
import ch.ethz.ssh2.SCPClient;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.util;
package me.zhengjie.gemho.x_generato.modules.mnt.util;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.util.StringUtils;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.websocket;
package me.zhengjie.gemho.x_generato.modules.mnt.websocket;
/**
* @author ZhangHouYing
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.websocket;
package me.zhengjie.gemho.x_generato.modules.mnt.websocket;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.mnt.websocket;
package me.zhengjie.gemho.x_generato.modules.mnt.websocket;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.config;
package me.zhengjie.gemho.x_generato.modules.quartz.config;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.repository.QuartzJobRepository;
import me.zhengjie.modules.quartz.utils.QuartzManage;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.repository.QuartzJobRepository;
import me.zhengjie.gemho.x_generato.modules.quartz.utils.QuartzManage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.config;
package me.zhengjie.gemho.x_generato.modules.quartz.config;
import org.quartz.spi.TriggerFiredBundle;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.domain;
package me.zhengjie.gemho.x_generato.modules.quartz.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.domain;
package me.zhengjie.gemho.x_generato.modules.quartz.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.repository;
package me.zhengjie.gemho.x_generato.modules.quartz.repository;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.repository;
package me.zhengjie.gemho.x_generato.modules.quartz.repository;
import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.rest;
package me.zhengjie.gemho.x_generato.modules.quartz.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -21,9 +21,9 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.service.QuartzJobService;
import me.zhengjie.modules.quartz.service.dto.JobQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.service.QuartzJobService;
import me.zhengjie.gemho.x_generato.modules.quartz.service.dto.JobQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.service;
package me.zhengjie.gemho.x_generato.modules.quartz.service;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.service.dto.JobQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzLog;
import me.zhengjie.gemho.x_generato.modules.quartz.service.dto.JobQueryCriteria;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.service.dto;
package me.zhengjie.gemho.x_generato.modules.quartz.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
......
......@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.service.impl;
package me.zhengjie.gemho.x_generato.modules.quartz.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.repository.QuartzJobRepository;
import me.zhengjie.modules.quartz.repository.QuartzLogRepository;
import me.zhengjie.modules.quartz.service.QuartzJobService;
import me.zhengjie.modules.quartz.service.dto.JobQueryCriteria;
import me.zhengjie.modules.quartz.utils.QuartzManage;
import me.zhengjie.gemho.x_generato.modules.quartz.repository.QuartzLogRepository;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzLog;
import me.zhengjie.gemho.x_generato.modules.quartz.repository.QuartzJobRepository;
import me.zhengjie.gemho.x_generato.modules.quartz.service.QuartzJobService;
import me.zhengjie.gemho.x_generato.modules.quartz.service.dto.JobQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.quartz.utils.QuartzManage;
import me.zhengjie.utils.*;
import org.quartz.CronExpression;
import org.springframework.data.domain.Pageable;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.task;
package me.zhengjie.gemho.x_generato.modules.quartz.task;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
......
......@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.utils;
package me.zhengjie.gemho.x_generato.modules.quartz.utils;
import cn.hutool.extra.template.Template;
import cn.hutool.extra.template.TemplateConfig;
import cn.hutool.extra.template.TemplateEngine;
import cn.hutool.extra.template.TemplateUtil;
import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.repository.QuartzLogRepository;
import me.zhengjie.modules.quartz.service.QuartzJobService;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzLog;
import me.zhengjie.gemho.x_generato.modules.quartz.repository.QuartzLogRepository;
import me.zhengjie.gemho.x_generato.modules.quartz.service.QuartzJobService;
import me.zhengjie.service.EmailService;
import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.SpringContextHolder;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.utils;
package me.zhengjie.gemho.x_generato.modules.quartz.utils;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.gemho.x_generato.modules.quartz.domain.QuartzJob;
import org.quartz.*;
import org.quartz.impl.triggers.CronTriggerImpl;
import org.springframework.stereotype.Component;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.quartz.utils;
package me.zhengjie.gemho.x_generato.modules.quartz.utils;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.utils.SpringContextHolder;
......
......@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.config;
package me.zhengjie.gemho.x_generato.modules.security.config;
import me.zhengjie.modules.security.config.bean.LoginProperties;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.LoginProperties;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......
......@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.config;
package me.zhengjie.gemho.x_generato.modules.security.config;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.modules.security.security.JwtAccessDeniedHandler;
import me.zhengjie.modules.security.security.JwtAuthenticationEntryPoint;
import me.zhengjie.modules.security.security.TokenConfigurer;
import me.zhengjie.modules.security.security.TokenProvider;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.modules.security.service.UserCacheClean;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.security.security.JwtAccessDeniedHandler;
import me.zhengjie.gemho.x_generato.modules.security.security.JwtAuthenticationEntryPoint;
import me.zhengjie.gemho.x_generato.modules.security.security.TokenConfigurer;
import me.zhengjie.gemho.x_generato.modules.security.security.TokenProvider;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.security.service.UserCacheClean;
import me.zhengjie.utils.enums.RequestMethodEnum;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.config.bean;
package me.zhengjie.gemho.x_generato.modules.security.config.bean;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.config.bean;
package me.zhengjie.gemho.x_generato.modules.security.config.bean;
/**
* 验证码配置枚举
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.config.bean;
package me.zhengjie.gemho.x_generato.modules.security.config.bean;
import com.wf.captcha.*;
import com.wf.captcha.base.Captcha;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.config.bean;
package me.zhengjie.gemho.x_generato.modules.security.config.bean;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.rest;
package me.zhengjie.gemho.x_generato.modules.security.rest;
import cn.hutool.core.util.IdUtil;
import com.wf.captcha.base.Captcha;
......@@ -26,14 +26,14 @@ import me.zhengjie.annotation.rest.AnonymousGetMapping;
import me.zhengjie.annotation.rest.AnonymousPostMapping;
import me.zhengjie.config.RsaProperties;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.modules.security.config.bean.LoginCodeEnum;
import me.zhengjie.modules.security.config.bean.LoginProperties;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.modules.security.security.TokenProvider;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.modules.security.service.dto.AuthUserDto;
import me.zhengjie.modules.security.service.dto.JwtUserDto;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.LoginCodeEnum;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.LoginProperties;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.security.security.TokenProvider;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.security.service.dto.AuthUserDto;
import me.zhengjie.gemho.x_generato.modules.security.service.dto.JwtUserDto;
import me.zhengjie.gemho.x_generato.modules.system.service.UserService;
import me.zhengjie.utils.RedisUtils;
import me.zhengjie.utils.RsaUtils;
import me.zhengjie.utils.SecurityUtils;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.rest;
package me.zhengjie.gemho.x_generato.modules.security.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.utils.EncryptUtils;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.security;
package me.zhengjie.gemho.x_generato.modules.security.security;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.security;
package me.zhengjie.gemho.x_generato.modules.security.security;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.security;
package me.zhengjie.gemho.x_generato.modules.security.security;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.modules.security.service.UserCacheClean;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.security.service.UserCacheClean;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.DefaultSecurityFilterChain;
......
......@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.security;
package me.zhengjie.gemho.x_generato.modules.security.security;
import cn.hutool.core.util.StrUtil;
import io.jsonwebtoken.ExpiredJwtException;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.modules.security.service.UserCacheClean;
import me.zhengjie.modules.security.service.dto.OnlineUserDto;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.security.service.UserCacheClean;
import me.zhengjie.gemho.x_generato.modules.security.service.dto.OnlineUserDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.core.Authentication;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.security;
package me.zhengjie.gemho.x_generato.modules.security.security;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
......@@ -22,7 +22,7 @@ import io.jsonwebtoken.*;
import io.jsonwebtoken.io.Decoders;
import io.jsonwebtoken.security.Keys;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import me.zhengjie.utils.RedisUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
......
......@@ -13,17 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.service;
package me.zhengjie.gemho.x_generato.modules.security.service;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.gemho.entity.tab.Tailpondinfor;
import me.zhengjie.gemho.service.tab.TailpondinforService;
import me.zhengjie.modules.security.config.bean.SecurityProperties;
import me.zhengjie.modules.security.security.TokenProvider;
import me.zhengjie.modules.security.service.dto.JwtUserDto;
import me.zhengjie.modules.security.service.dto.OnlineUserDto;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.gemho.x_generato.modules.security.security.TokenProvider;
import me.zhengjie.gemho.x_generato.modules.security.service.dto.JwtUserDto;
import me.zhengjie.gemho.x_generato.modules.security.service.dto.OnlineUserDto;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.SecurityProperties;
import me.zhengjie.gemho.x_generato.modules.system.repository.UserRepository;
import me.zhengjie.utils.*;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
......@@ -218,7 +217,7 @@ public class OnlineUserService {
if (tailpondinfor != null) {
Long tokenValidityInSeconds = properties.getTokenValidityInSeconds();
System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++" + tokenValidityInSeconds);
redisUtils.set("wkk" + username, tailpondinfor.getTailingno(), (properties.getTokenValidityInSeconds() / 1000) * 2);
redisUtils.set("wkk" + username, tailpondinfor.getTailingno(), -1);
} //清空 菜单的缓存
redisUtils.del("menu::user:" + currentUserId);
......@@ -231,7 +230,7 @@ public class OnlineUserService {
if (tailpondinfor != null) {
Long tokenValidityInSeconds = properties.getTokenValidityInSeconds();
System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++" + tokenValidityInSeconds);
redisUtils.set("wkk" + username, tailpondinfor.getTailingno(), (properties.getTokenValidityInSeconds() / 1000) * 2);
redisUtils.set("wkk" + username, tailpondinfor.getTailingno(), -1);
} //清空 菜单的缓存
redisUtils.del("menu::user:" + currentUserId);
}
......@@ -255,7 +254,7 @@ public class OnlineUserService {
public void changeWkkBase(String username, String tailingno, HttpServletRequest request) {
TokenProvider tokenProvider = SpringContextHolder.getBean(TokenProvider.class);
String token = tokenProvider.getToken(request);
redisUtils.set("wkk" + username, tailingno, (properties.getTokenValidityInSeconds() / 1000) * 2);
redisUtils.set("wkk" + username, tailingno, -1);
//清空 菜单的缓存
UserRepository userRepository = SpringContextHolder.getBean(UserRepository.class);
Long aLong = userRepository.JuUSerName(username);
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package me.zhengjie.modules.security.service;
package me.zhengjie.gemho.x_generato.modules.security.service;
import me.zhengjie.utils.StringUtils;
import org.springframework.stereotype.Component;
......
......@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.service;
package me.zhengjie.gemho.x_generato.modules.security.service;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityNotFoundException;
import me.zhengjie.modules.security.config.bean.LoginProperties;
import me.zhengjie.modules.security.service.dto.JwtUserDto;
import me.zhengjie.modules.system.service.DataService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.security.service.dto.JwtUserDto;
import me.zhengjie.gemho.x_generato.modules.security.config.bean.LoginProperties;
import me.zhengjie.gemho.x_generato.modules.system.service.DataService;
import me.zhengjie.gemho.x_generato.modules.system.service.RoleService;
import me.zhengjie.gemho.x_generato.modules.system.service.UserService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.service.dto;
package me.zhengjie.gemho.x_generato.modules.security.service.dto;
import lombok.Getter;
import lombok.Setter;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.service.dto;
package me.zhengjie.gemho.x_generato.modules.security.service.dto;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Getter;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.security.service.dto;
package me.zhengjie.gemho.x_generato.modules.security.service.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain;
package me.zhengjie.gemho.x_generato.modules.system.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain.vo;
package me.zhengjie.gemho.x_generato.modules.system.domain.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain.vo;
package me.zhengjie.gemho.x_generato.modules.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.domain.vo;
package me.zhengjie.gemho.x_generato.modules.system.domain.vo;
import lombok.Data;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.gemho.x_generato.modules.system.domain.DictDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.gemho.x_generato.modules.system.domain.Job;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.gemho.x_generato.modules.system.domain.Menu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.repository;
package me.zhengjie.gemho.x_generato.modules.system.repository;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import cn.hutool.core.collection.CollectionUtil;
import io.swagger.annotations.Api;
......@@ -21,10 +21,10 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.service.DeptService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.utils.PageUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.service.DictService;
import me.zhengjie.modules.system.service.dto.DictQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import me.zhengjie.gemho.x_generato.modules.system.service.DictService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.service.DictDetailService;
import me.zhengjie.modules.system.service.dto.DictDetailDto;
import me.zhengjie.modules.system.service.dto.DictDetailQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.DictDetail;
import me.zhengjie.gemho.x_generato.modules.system.service.DictDetailService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
......
......@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.JobService;
import me.zhengjie.modules.system.service.dto.JobQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Job;
import me.zhengjie.gemho.x_generato.modules.system.service.JobService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import cn.hutool.core.collection.CollectionUtil;
import io.swagger.annotations.Api;
......@@ -21,11 +21,11 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.service.MenuService;
import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.service.mapstruct.MenuMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.Menu;
import me.zhengjie.gemho.x_generato.modules.system.service.MenuService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.MenuMapper;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.http.HttpStatus;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.service.MonitorService;
import me.zhengjie.gemho.x_generato.modules.system.service.MonitorService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import cn.hutool.core.lang.Dict;
import io.swagger.annotations.Api;
......@@ -21,11 +21,11 @@ import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleDto;
import me.zhengjie.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.service.RoleService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.utils.SecurityUtils;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import cn.hutool.core.collection.CollectionUtil;
import io.swagger.annotations.Api;
......@@ -24,13 +24,13 @@ import me.zhengjie.config.RsaProperties;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.gemho.controller.tab.UserTailponController;
import me.zhengjie.gemho.service.tab.UserTailponService;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.UserPassVo;
import me.zhengjie.modules.system.service.*;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.domain.vo.UserPassVo;
import me.zhengjie.gemho.x_generato.modules.system.service.*;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.RsaUtils;
import me.zhengjie.utils.SecurityUtils;
......
......@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.rest;
package me.zhengjie.gemho.x_generato.modules.system.rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.modules.system.service.VerifyService;
import me.zhengjie.gemho.x_generato.modules.system.service.VerifyService;
import me.zhengjie.service.EmailService;
import me.zhengjie.utils.enums.CodeBiEnum;
import me.zhengjie.utils.enums.CodeEnum;
......
......@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import java.util.List;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptQueryCriteria;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.service.dto.DictDetailDto;
import me.zhengjie.modules.system.service.dto.DictDetailQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.DictDetail;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.List;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.service.dto.DictDto;
import me.zhengjie.modules.system.service.dto.DictQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.dto.JobDto;
import me.zhengjie.modules.system.service.dto.JobQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Job;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobQueryCriteria;
import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.Menu;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuQueryCriteria;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import java.util.Map;
......
......@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.service.dto.RoleDto;
import me.zhengjie.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import org.springframework.data.domain.Pageable;
import org.springframework.security.core.GrantedAuthority;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service;
package me.zhengjie.gemho.x_generato.modules.system.service;
import me.zhengjie.domain.vo.EmailVo;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import me.zhengjie.annotation.DataPermission;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Getter;
import lombok.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Getter;
import lombok.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Getter;
import lombok.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Getter;
import lombok.NoArgsConstructor;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Getter;
import lombok.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Getter;
import lombok.Setter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.dto;
package me.zhengjie.gemho.x_generato.modules.system.service.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;
......
......@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.DataService;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.service.DataService;
import me.zhengjie.gemho.x_generato.modules.system.service.DeptService;
import me.zhengjie.gemho.x_generato.modules.system.service.RoleService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import me.zhengjie.utils.enums.DataScopeEnum;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
......
......@@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.DeptRepository;
import me.zhengjie.modules.system.repository.RoleRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.modules.system.service.mapstruct.DeptMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.repository.DeptRepository;
import me.zhengjie.gemho.x_generato.modules.system.repository.RoleRepository;
import me.zhengjie.gemho.x_generato.modules.system.repository.UserRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.DeptMapper;
import me.zhengjie.gemho.x_generato.modules.system.service.DeptService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptQueryCriteria;
import me.zhengjie.utils.*;
import me.zhengjie.utils.enums.DataScopeEnum;
import org.springframework.cache.annotation.CacheConfig;
......
......@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.modules.system.repository.DictRepository;
import me.zhengjie.modules.system.service.DictDetailService;
import me.zhengjie.modules.system.service.dto.DictDetailDto;
import me.zhengjie.modules.system.service.dto.DictDetailQueryCriteria;
import me.zhengjie.modules.system.service.mapstruct.DictDetailMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.DictDetail;
import me.zhengjie.gemho.x_generato.modules.system.repository.DictDetailRepository;
import me.zhengjie.gemho.x_generato.modules.system.repository.DictRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.DictDetailMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import me.zhengjie.gemho.x_generato.modules.system.service.DictDetailService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailQueryCriteria;
import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
......
......@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.repository.DictRepository;
import me.zhengjie.modules.system.service.DictService;
import me.zhengjie.modules.system.service.dto.DictDetailDto;
import me.zhengjie.modules.system.service.dto.DictDto;
import me.zhengjie.modules.system.service.dto.DictQueryCriteria;
import me.zhengjie.modules.system.service.mapstruct.DictMapper;
import me.zhengjie.gemho.x_generato.modules.system.repository.DictRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.DictMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import me.zhengjie.gemho.x_generato.modules.system.service.DictService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictQueryCriteria;
import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.data.domain.Page;
......
......@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.repository.JobRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.JobService;
import me.zhengjie.modules.system.service.dto.JobDto;
import me.zhengjie.modules.system.service.dto.JobQueryCriteria;
import me.zhengjie.modules.system.service.mapstruct.JobMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.Job;
import me.zhengjie.gemho.x_generato.modules.system.repository.JobRepository;
import me.zhengjie.gemho.x_generato.modules.system.repository.UserRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.JobMapper;
import me.zhengjie.gemho.x_generato.modules.system.service.JobService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobQueryCriteria;
import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
......@@ -21,20 +21,20 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException;
import me.zhengjie.gemho.mapper.sys.SysTypeMapper;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.MenuMetaVo;
import me.zhengjie.modules.system.domain.vo.MenuVo;
import me.zhengjie.modules.system.repository.MenuRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.MenuService;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.mapstruct.MenuMapper;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.system.domain.Menu;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.repository.MenuRepository;
import me.zhengjie.gemho.x_generato.modules.system.repository.UserRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.MenuMapper;
import me.zhengjie.gemho.x_generato.modules.system.domain.vo.MenuMetaVo;
import me.zhengjie.gemho.x_generato.modules.system.domain.vo.MenuVo;
import me.zhengjie.gemho.x_generato.modules.system.service.MenuService;
import me.zhengjie.gemho.x_generato.modules.system.service.RoleService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
......
......@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import cn.hutool.core.date.BetweenFormater;
import cn.hutool.core.date.DateUtil;
import me.zhengjie.modules.system.service.MonitorService;
import me.zhengjie.gemho.x_generato.modules.system.service.MonitorService;
import me.zhengjie.utils.ElAdminConstant;
import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.StringUtils;
......
......@@ -13,25 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException;
import me.zhengjie.modules.security.service.UserCacheClean;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.RoleRepository;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.service.dto.RoleDto;
import me.zhengjie.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.modules.system.service.mapstruct.RoleMapper;
import me.zhengjie.modules.system.service.mapstruct.RoleSmallMapper;
import me.zhengjie.gemho.x_generato.modules.security.service.UserCacheClean;
import me.zhengjie.gemho.x_generato.modules.system.domain.Menu;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.repository.RoleRepository;
import me.zhengjie.gemho.x_generato.modules.system.repository.UserRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.RoleMapper;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.RoleSmallMapper;
import me.zhengjie.gemho.x_generato.modules.system.service.RoleService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleQueryCriteria;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
......
......@@ -13,23 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import lombok.RequiredArgsConstructor;
import me.zhengjie.config.FileProperties;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException;
import me.zhengjie.exception.EntityNotFoundException;
import me.zhengjie.modules.security.service.OnlineUserService;
import me.zhengjie.modules.security.service.UserCacheClean;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.repository.UserRepository;
import me.zhengjie.modules.system.service.UserService;
import me.zhengjie.modules.system.service.dto.JobSmallDto;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.modules.system.service.mapstruct.UserMapper;
import me.zhengjie.gemho.x_generato.modules.security.service.OnlineUserService;
import me.zhengjie.gemho.x_generato.modules.security.service.UserCacheClean;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.repository.UserRepository;
import me.zhengjie.gemho.x_generato.modules.system.service.mapstruct.UserMapper;
import me.zhengjie.gemho.x_generato.modules.system.service.UserService;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserQueryCriteria;
import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.impl;
package me.zhengjie.gemho.x_generato.modules.system.service.impl;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.RandomUtil;
......@@ -24,7 +24,7 @@ import cn.hutool.extra.template.TemplateUtil;
import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.service.VerifyService;
import me.zhengjie.gemho.x_generato.modules.system.service.VerifyService;
import me.zhengjie.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.dto.DeptDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.dto.DeptSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dept;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DeptSmallDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.service.dto.DictDetailDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.DictDetail;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDetailDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.service.dto.DictDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.service.dto.DictSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Dict;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.DictSmallDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.dto.JobDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Job;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.dto.JobSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Job;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.JobSmallDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.service.dto.MenuDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Menu;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.MenuDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.service.dto.RoleDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.service.dto.RoleSmallDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.Role;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.RoleSmallDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.modules.system.service.mapstruct;
package me.zhengjie.gemho.x_generato.modules.system.service.mapstruct;
import me.zhengjie.base.BaseMapper;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.service.dto.UserDto;
import me.zhengjie.gemho.x_generato.modules.system.domain.User;
import me.zhengjie.gemho.x_generato.modules.system.service.dto.UserDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
......
......@@ -2,12 +2,13 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:8.142.46.126}:${DB_PORT:3306}/${DB_NAME:mdm_1_db}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.3.35}:${DB_PORT:3306}/${DB_NAME:mdm_1_db}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
username: ${DB_USER:root}
#password: ${DB_PWD:jinghe2021//}
password: ${DB_PWD:jinghe2021//}
#password: ${DB_PWD:123456}
# 初始连接数
initial-size: 5
# 最小连接数
......
#配置数据源
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:mdm_1_db}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
username: ${DB_USER:root}
password: ${DB_PWD:jinghe2021//}
# 初始连接数
initial-size: 5
# 最小连接数
min-idle: 15
# 最大连接数
max-active: 60
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
# 连接在池中最大生存的时间
max-evictable-idle-time-millis: 900000
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
test-while-idle: true
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
test-on-borrow: true
# 是否在归还到池中前进行检验
test-on-return: false
# 检测连接是否有效
validation-query: select 1
# 配置监控统计
webStatFilter:
enabled: true
stat-view-servlet:
enabled: true
# 控制台管理用户名和密码
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: 123456
filter:
stat:
enabled: true
# 记录慢SQL
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# 登录相关配置
login:
# 登录缓存
cache-enable: true
# 是否限制单用户登录
single-login: false
# 验证码
login-code:
# 验证码类型配置 查看 LoginProperties 类
code-type: arithmetic
# 登录图形验证码有效时间/分钟
expiration: 2
# 验证码高度
width: 111
# 验证码宽度
height: 36
# 内容长度
length: 2
# 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可
font-name:
# 字体大小
font-size: 25
#jwt
jwt:
header: Authorization
# 令牌前缀
token-start-with: Bearer
# 必须使用最少88位的Base64对该令牌进行编码
base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI=
# 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html
token-validity-in-seconds: 7200000
# 在线用户key
online-key: online-token-
# 验证码
code-key: code-key-
# token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期
detect: 1800000
# 续期时间范围,默认 1小时,这里单位毫秒
renew: 3600000
# IP 本地解析
ip:
local-parsing: false
#是否允许生成代码,生产环境设置为false
generator:
enabled: false
#如果生产环境要开启swagger,需要配置请求地址
#springfox:
# documentation:
# swagger:
# v2:
# host: # 接口域名或外网ip
#是否开启 swagger-ui
swagger:
enabled: false
# 文件存储路径
file:
mac:
path: ~/file/
avatar: ~/avatar/
linux:
path: /home/eladmin/file/
avatar: /home/eladmin/avatar/
windows:
path: C:\eladmin\file\
avatar: C:\eladmin\avatar\
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
......@@ -2,6 +2,7 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=false;druid.stat.slowSqlMillis=5000
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:8.142.46.126}:${DB_PORT:3306}/${DB_NAME:intest}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
......
server:
port: 8000
port: 9001
spring:
freemarker:
check-template-location: false
profiles:
active: prod
active: dev
jackson:
time-zone: GMT+8
data:
......
......@@ -23,6 +23,12 @@
"name": "b轴变化量"
}
],
"dmdata1": [
{
"key": "dispB",
"name": "沉降值"
}
],
"wtdata": [
{
"key": "stage",
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.zhengjie.gemho.mapper.data.RgDataMapper">
<select id="pageAll" resultType="me.zhengjie.gemho.entity.data.RgData">
SELECT id,
sensorid,
sensorname,
zongliang,
createtime,
updatetime,
bjjb,
state,
datasource,
time,
round(rainfall, 2) as rainfall
FROM
`tb_rg_data`
${ew.customSqlSegment}
</select>
<select id="week" resultType="me.zhengjie.gemho.entity.data.RgData">
SELECT id,
sensorid,
sensorname,
zongliang,
createtime,
updatetime,
bjjb,
state,
datasource,
max(time) AS time,
round(sum( rainfall ),2 )AS rainfall
FROM
`tb_rg_data`
WHERE
time &gt;= #{start}
AND time &lt;= #{end}
and sensorid=#{sensorid}
and state = 0
GROUP BY
DATE_FORMAT( time, '%Y-%m-%d' )
</select>
</mapper>
......@@ -17,8 +17,8 @@
<select id="dryStateCount" resultType="hashmap">
SELECT equipno,
case
when DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%m:%s') &gt;=
DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d %H:%m:%s') then 0
when DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%i:%s') &gt;=
DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d %H:%i:%s') then 0
else 1 end as `state`
FROM `tb_drybeachequipinfor`
where tailingid = #{tailingid}
......@@ -27,9 +27,9 @@
SELECT COUNT(id) as unloin
FROM tb_drybeachequipinfor
where tailingid = #{tailingid}
and DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%m:%s') &lt;= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d
and (DATE_FORMAT(datarealtime, '%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 30 MINUTE), '%Y-%m-%d
%H:%m:%s')
or tailingid = #{tailingid} and datarealtime is Null
or datarealtime is Null) and equipname !='基准点'
</select>
<update id="enforceOnline">
update tb_drybeachequipinfor
......
......@@ -12,4 +12,9 @@
GROUP BY c.equipno) a
right join tb_drybeachequipinfor b on a.equipno = b.equipno
</select>
<update id="updateIfselect">
update tab_abnormal
set ifselect=1
where id =#{id}
</update>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="me.zhengjie.gemho.mapper.web.WebMonitorPointsMapper">
<insert id="batchinsert">
insert into web_monitor_points (chartid,type,guid,name,x,y,height,width,angle,infoseat,remark) values
insert into web_monitor_points (chartid,type,guid,name,x,y,infoseat,remark) values
<foreach collection="webMonitorPoints" item="monitorPoint" separator=",">
(#{monitorPoint.chartid},
#{monitorPoint.type},
......@@ -10,9 +10,6 @@
#{monitorPoint.name},
#{monitorPoint.x},
#{monitorPoint.y},
#{monitorPoint.height},
#{monitorPoint.width},
#{monitorPoint.angle},
#{monitorPoint.infoseat},
#{monitorPoint.remark}
)
......@@ -23,4 +20,21 @@
a.*,b.* from web_monitor_points a left JOIN web_monitor_link b on a.guid = b.pointid where a.guid=
#{guid}
</delete>
<select id="getbycid" resultType="me.zhengjie.gemho.x_datavo.web.WebMonitorPointsVo">
SELECT p.id as id,
p.chartid as chartid,
p.type as type,
p.guid as guid,
p.NAME as name,
p.x as x,
p.y as y,
ic.height as height,
ic.width as width,
ic.angle as angle,
p.infoseat as infoseat,
p.remark as remark
FROM web_monitor_points p
JOIN web_monitor_icon ic on p.type = ic.type
where chartid = #{chartid}
</select>
</mapper>
package me.zhengjie;
import me.zhengjie.modules.security.service.UserDetailsServiceImpl;
import me.zhengjie.gemho.x_generato.modules.security.service.UserDetailsServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
......
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