Commit a9a15a16 authored by kiritoausna's avatar kiritoausna

2022-5-10

parent a7a49d1b
......@@ -40,15 +40,16 @@ public class ArtificialPointController {
@ApiOperation(value = "人工监测点位表分页列表", response = ArtificialPoint.class)
@GetMapping()
public ResponseEntity<Object> list(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
HashMap<String, Object> data = artificialPointService.plist(dataQueryCriteria,request);
HashMap<String, Object> data = artificialPointService.plist(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(data), HttpStatus.OK);
}
@Log(value = "新增人工监测点位")
@ApiOperation(value = "人工监测点位表新增")
@PostMapping()
public Object add(@Valid @RequestBody ArtificialPoint param,HttpServletRequest request) {
boolean result = artificialPointService.add(param,request);
public Object add(@Valid @RequestBody ArtificialPoint param, HttpServletRequest request) {
param.setTime(new Date());
boolean result = artificialPointService.add(param, request);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else {
......@@ -59,9 +60,9 @@ public class ArtificialPointController {
@Log(value = "修改人工监测点位")
@ApiOperation(value = "人工监测点位表修改")
@PutMapping()
public Object modify(@Valid @RequestBody ArtificialPoint param,HttpServletRequest request) {
public Object modify(@Valid @RequestBody ArtificialPoint param, HttpServletRequest request) {
param.setTime(new Date());
boolean result = artificialPointService.modify(param,request);
boolean result = artificialPointService.modify(param, request);
if (result) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
} else {
......
......@@ -93,8 +93,8 @@ public class DbDataController {
@ApiOperation(value = "图标历史")
@GetMapping("imghistory")
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria) {
ImgDataVo dbData = dbDataService.imgList(dataQueryCriteria);
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria,HttpServletRequest request) {
ImgDataVo dbData = dbDataService.imgList(dataQueryCriteria,request);
return new ResponseEntity<>(new PageResult().success(dbData), HttpStatus.OK);
}
......
......@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.HashMap;
......@@ -81,9 +82,9 @@ public class DmDataController {
*/
@ApiOperation("获取内部位移的历史数据")
@GetMapping("history")
public ResponseEntity<Object> gethistory(DataQueryCriteria dataQueryCriteria) {
public ResponseEntity<Object> gethistory(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
try {
HashMap<String, Object> map = dmDataService.pageall(dataQueryCriteria);
HashMap<String, Object> map = dmDataService.pageall(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
} catch (NumberFormatException e) {
e.printStackTrace();
......@@ -93,18 +94,16 @@ public class DmDataController {
@ApiOperation(value = "图标历史")
@GetMapping("imghistory")
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria) {
ImgDataVo dbData = dmDataService.imgList(dataQueryCriteria);
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria,HttpServletRequest request) {
ImgDataVo dbData = dmDataService.imgList(dataQueryCriteria,request);
return new ResponseEntity<>(new PageResult().success(dbData), HttpStatus.OK);
}
@ApiOperation(value = "导出excel")
@GetMapping("download")
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria) {
dmDataService.download(response, dataQueryCriteria);
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
dmDataService.download(response, dataQueryCriteria,request);
}
;
}
......@@ -10,11 +10,15 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
......@@ -140,30 +144,15 @@ public class MpDataController {
/**
* 获取表面位移的历史数据
*
* @param page
* @param size
* @param searchName
* @param searchValue
* @param limit
* @param timeSpace
* @param sort
* @param datasource
* @param dataQueryCriteria
* @param request
* @return
*/
@ApiOperation("获取表面位移的历史数据")
@GetMapping("history")
public ResponseEntity<Object> gethistory(@ApiParam(value = "分页参数,页数", required = true) String page,
@ApiParam(value = "分页参数,数量", required = true) String size,
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort,
@ApiParam(value = "数据来源, 1 历史数据 2人工巡检历史数据", required = true) String datasource) {
public ResponseEntity<Object> gethistory(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
try {
long l = Long.parseLong(page);
long l1 = Long.parseLong(size);
HashMap<String, Object> map = mpDataService.pageall(searchName, searchValue, limit, timeSpace, sort, l, l1, datasource);
HashMap<String, Object> map = mpDataService.pageall(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
} catch (NumberFormatException e) {
e.printStackTrace();
......@@ -171,5 +160,17 @@ public class MpDataController {
return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "图标历史")
@GetMapping("imghistory")
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
ImgDataVo dbData = mpDataService.imgList(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(dbData), HttpStatus.OK);
}
@ApiOperation(value = "导出excel")
@GetMapping("download")
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
mpDataService.download(response, dataQueryCriteria,request);
}
}
......@@ -10,11 +10,15 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
......@@ -58,81 +62,30 @@ public class StDataController {
return new ResponseEntity<>(new RealVo().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "新增浸润线人工巡检数据")
@PostMapping
public ResponseEntity<Object> add(@RequestBody StData stData) {
try {
Date time = stData.getTime();
String format = sdf.format(time);
int i = Integer.parseInt(format);
stData.setId(i);
stData.setDatasource(0);
stData.setCreatetime(new Date());
stData.setUpdatetime(new Date());
boolean b = stDataService.saveOrUpdate(stData);
if (b) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
} catch (NumberFormatException e) {
e.printStackTrace();
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.OK);
}
@ApiOperation(value = "删除浸润线人工巡检数据")
@DeleteMapping
public ResponseEntity<Object> deletedata(@RequestBody HashMap<String, Integer> map) {
try {
Integer id = map.get("id");
boolean b = stDataService.removeById(id);
if (b) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} catch (Exception e) {
e.printStackTrace();
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "修改人工巡检数据")
@PutMapping
public ResponseEntity<Object> updata(@RequestBody StData stData) {
try {
stData.setUpdatetime(new Date());
boolean b = stDataService.saveOrUpdate(stData);
if (b) {
return new ResponseEntity<>(new PostOrPutResult().success(), HttpStatus.OK);
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
} catch (Exception e) {
e.printStackTrace();
}
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "分页查看")
@GetMapping("history")
public ResponseEntity<Object> getall(@ApiParam(value = "分页参数,页数", required = true) String page,
@ApiParam(value = "分页参数,数量", required = true) String size,
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort,
@ApiParam(value = "数据来源, 1 历史数据 2人工巡检历史数据", required = true) String datasource) {
public ResponseEntity<Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
try {
long l = Long.parseLong(page);
long l1 = Long.parseLong(size);
HashMap<String, Object> map = stDataService.pageall(searchName, searchValue, limit, timeSpace, sort, l, l1, datasource);
HashMap<String, Object> map = stDataService.pageall(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
} catch (NumberFormatException e) {
e.printStackTrace();
}
return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "图标历史")
@GetMapping("imghistory")
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
ImgDataVo dbData = stDataService.imgList(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(dbData), HttpStatus.OK);
}
@ApiOperation(value = "导出excel")
@GetMapping("download")
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
stDataService.download(response, dataQueryCriteria,request);
}
}
......@@ -10,11 +10,15 @@ import me.zhengjie.gemho.util.PageResult;
import me.zhengjie.gemho.util.PostOrPutResult;
import me.zhengjie.gemho.util.RealVo;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
......@@ -114,25 +118,29 @@ public class WtDataController {
@ApiOperation(value = "分页查看")
@GetMapping("history")
public ResponseEntity<Object> getall(@ApiParam(value = "分页参数,页数", required = true) String page,
@ApiParam(value = "分页参数,数量", required = true) String size,
@ApiParam(value = "查询条件字段") String searchName,
@ApiParam(value = "查询条件数值") String searchValue,
@ApiParam(value = "查询条件精准或者模糊") String limit,
@ApiParam(value = "查询条件时间区间") String timeSpace,
@ApiParam(value = "查询条件正序或者倒序") String sort,
@ApiParam(value = "数据来源, 1 历史数据 2人工巡检历史数据", required = true) String datasource) {
public ResponseEntity<Object> getall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
try {
long l = Long.parseLong(page);
long l1 = Long.parseLong(size);
HashMap<String, Object> map = wtDataService.pageall(searchName, searchValue, limit, timeSpace, sort, l, l1, datasource);
HashMap<String, Object> map = wtDataService.pageall(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(map), HttpStatus.OK);
} catch (NumberFormatException e) {
e.printStackTrace();
}
return new ResponseEntity<>(new PageResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
@ApiOperation(value = "图标历史")
@GetMapping("imghistory")
public ResponseEntity<Object> imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
ImgDataVo dbData = wtDataService.imgList(dataQueryCriteria, request);
return new ResponseEntity<>(new PageResult().success(dbData), HttpStatus.OK);
}
@ApiOperation(value = "导出excel")
@GetMapping("download")
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
wtDataService.download(response, dataQueryCriteria,request);
}
}
......
......@@ -60,7 +60,6 @@ public class UserTailponController {
return new ResponseEntity<>(new PageResult().nopagesuccess(hashMap), HttpStatus.OK);
}
@Log("绑定用户尾矿库信息")
@ApiOperation(value = "绑定用户和尾矿信息")
@PostMapping()
public ResponseEntity<Object> add(String username, ArrayList<HashMap<String, String>> maps) {
......
package me.zhengjie.gemho.entity.data;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
......@@ -40,6 +41,10 @@ public class MpData implements Serializable {
*/
@ApiModelProperty("设备id")
public String sensorid;
/**
* 设备名称
*/
public String sensorname;
/**
* 测量时间
......@@ -171,4 +176,15 @@ public class MpData implements Serializable {
public String bjjb;
@TableField(exist = false)
private String jcziitemname;
@TableField(exist = false)
private String jcvalue;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@TableField(exist = false)
private Date jctime;
}
package me.zhengjie.gemho.entity.data;
import com.alibaba.fastjson.annotation.JSONField;
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 io.swagger.annotations.ApiModel;
......@@ -38,7 +40,9 @@ public class StData implements Serializable {
* 监测点编号(外键),tb_drybeachequipinfor 的id
*/
@ApiModelProperty("设备id")
public String sensorid;
public String sensorid;
public String sensorname;
/**
* 测量时间
......@@ -89,4 +93,15 @@ public class StData implements Serializable {
public String bjjb;
@TableField(exist = false)
public String jcziitemname;
@TableField(exist = false)
public String jcvalue;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@TableField(exist = false)
public Date jctime;
}
package me.zhengjie.gemho.entity.data;
import com.alibaba.fastjson.annotation.JSONField;
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 io.swagger.annotations.ApiModel;
......@@ -40,6 +42,8 @@ public class WtData implements Serializable {
@ApiModelProperty(value = "设备id")
public String sensorid;
public String sensorname;
/**
* 测量时间
*/
......@@ -83,4 +87,14 @@ public class WtData implements Serializable {
public Integer datasource;
@TableField(exist = false)
private String jcziitemname;
@TableField(exist = false)
private String jcvalue;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@TableField(exist = false)
private Date jctime;
}
......@@ -19,7 +19,7 @@ import java.io.Serializable;
*/
@Getter
@Setter
@TableName("sys_devicetype")
@TableName("tab_devicetype")
public class SysType implements Serializable {
private static final long serialVersionUID = 1L;
......
......@@ -28,19 +28,19 @@ public interface SysSummaryMapper extends BaseMapper<SysSummary> {
@Select(value = "select id from sys_summary where mdcode =#{mdcode} ")
List<Integer> getcode(String mdcode);
@Select(value = "select a.id as id ,a.title as title from sys_summary a JOIN sys_devicetype b on a.type=b.type where b.must = '1' and a.name=#{tailingno} " +
@Select(value = "select a.id as id ,a.title as title from sys_summary a JOIN tab_devicetype b on a.type=b.type where b.must = '1' and a.name=#{tailingno} " +
"UNION\n" +
"select a.id as id,a.title as title from sys_summary a JOIN sys_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid = #{tailingno}) ORDER BY id DESC")
"select a.id as id,a.title as title from sys_summary a JOIN tab_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid = #{tailingno}) ORDER BY id DESC")
List<Map<String, Object>> getUncode(String tailingno);
@Select(value = "select a.id as id ,a.title as title from sys_summary a JOIN sys_devicetype b on a.type=b.type where b.must = '2' and a.name = #{tailingno}")
@Select(value = "select a.id as id ,a.title as title from sys_summary a JOIN tab_devicetype b on a.type=b.type where b.must = '2' and a.name = #{tailingno}")
List<Map<String, Object>> getUncodem(String tailingno);
@Select(value = "SELECT * FROM `sys_summary` where type!='t_14' and name =#{tailingno}\n" +
"UNION\n" +
"SELECT a.* FROM `sys_summary` a JOIN monitorvideo b ON a.id = b.v_sumid where name =#{tailingno}\n" +
"UNION\n" +
"select a.* from sys_summary a JOIN sys_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid =#{tailingno}) ORDER BY id DESC")
"select a.* from sys_summary a JOIN tab_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid =#{tailingno}) ORDER BY id DESC")
Page<SysSummary> getbyeqno(Page page, @Param("tailingno") String tailingno);
......@@ -48,13 +48,13 @@ public interface SysSummaryMapper extends BaseMapper<SysSummary> {
"UNION\n" +
"SELECT a.* FROM `sys_summary` a JOIN monitorvideo b ON a.id = b.v_sumid where name =#{tailingno}\n" +
"UNION\n" +
"select a.* from sys_summary a JOIN sys_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid =#{tailingno}) ORDER BY id DESC) r where r.title like CONCAT(CONCAT('%', #{searchValue}), '%')")
"select a.* from sys_summary a JOIN tab_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid =#{tailingno}) ORDER BY id DESC) r where r.title like CONCAT(CONCAT('%', #{searchValue}), '%')")
Page<SysSummary> getbyeqnobyseach(Page page, @Param("tailingno") String tailingno, String searchValue);
/* @Select(value = "SELECT a.* FROM `sys_summary` a JOIN monitorvideo b ON a.id = b.v_sumid where name =#{tailingno}")
Page<SysSummary> getbyeqno(Page page, @Param("tailingno") String tailingno);
@Select(value = "select a.* from sys_summary a JOIN sys_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid =#{tailingno}) ORDER BY id DESC")
@Select(value = "select a.* from sys_summary a JOIN tab_devicetype b on a.type=b.type where a.deviceid in (select equipno FROM tb_drybeachequipinfor where tailingid =#{tailingno}) ORDER BY id DESC")
Page<SysSummary> getbyeqno1(Page page, @Param("tailingno") String tailingno);
@Select(value = "SELECT * FROM `sys_summary` where type!='t_14' and name =#{tailingno}")
......
......@@ -18,12 +18,12 @@ import java.util.List;
@Mapper
public interface SysTypeMapper extends BaseMapper<SysType> {
@Select(value = " SELECT must FROM `sys_devicetype` where type=#{type}")
@Select(value = " SELECT must FROM `tab_devicetype` where type=#{type}")
int getMust(String type);
@Select(value = "select b.name from tb_drybeachequipinfor a join sys_devicetype b on a.devicetype=b.`code` where tailingid=#{tailingid}")
@Select(value = "select b.name from tb_drybeachequipinfor a join tab_devicetype b on a.devicetype=b.`code` where tailingid=#{tailingid}")
List<String> getbytailno(String tailingid);
@Select(value = "SELECT name FROM `sys_devicetype` where must = 0 or name ='水质'")
@Select(value = "SELECT name FROM `tab_devicetype` where must = 0 or name ='水质'")
List<String> getname();
}
......@@ -31,7 +31,10 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor>
@Select(value = "select b.tailingno as value ,b.tailingname as name FROM `tab_user_tailpon` a join tb_tailpondinfor b on a.tailingno=b.tailingno where a.username=#{username}")
ArrayList<Dic> gettailingid(String username);
@Select(value = "select code as value ,name from sys_devicetype where must ='0' or type='t_8' ")
@Select(value = "select tailingno as value ,tailingname as name from tb_tailpondinfor")
ArrayList<Dic> gettailingid();
@Select(value = "select code as value ,name from tab_devicetype where must ='0' or type='t_8' ")
ArrayList<Dic> getdevicetype();
@Select(value = "select equipno from tb_drybeachequipinfor where tailingid = #{tailingid}")
......@@ -62,7 +65,7 @@ public interface DrybeachequipinforMapper extends BaseMapper<Drybeachequipinfor>
"SELECT count(distinct sensorid)AS `online` from tb_sl_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}")
ArrayList<Integer> getonlinecount(String tailingid);
@Select(value = "select a.type from sys_devicetype a join tb_drybeachequipinfor b on a.`code`= b.devicetype where b.equipno=#{equipno}")
@Select(value = "select a.type from tab_devicetype a join tb_drybeachequipinfor b on a.`code`= b.devicetype where b.equipno=#{equipno}")
String getdrytype(String equipno);
int deleteall(String equipno);
......
......@@ -36,7 +36,7 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
"sum(case when alarmlevel =2 then 1 else 0 end )as \"orange\",\n" +
"sum(case when alarmlevel =3 then 1 else 0 end )as \"yellow\",\n" +
"sum(case when alarmlevel =4 then 1 else 0 end )as \"blue\" \n" +
"FROM (SELECT * from tab_abnormal where DATE_FORMAT(time,'%y') =DATE_FORMAT(NOW(),'%y') ) a right join (SELECT tdr.equipno as equipno ,tdr.devicetype as `code` ,ssd.`name` as `name` FROM `tb_drybeachequipinfor` tdr join sys_devicetype ssd on tdr.devicetype =ssd.`code` WHERE tdr.tailingid=#{tailno}) b on a.equipno= b.equipno GROUP BY b.code")
"FROM (SELECT * from tab_abnormal where DATE_FORMAT(time,'%y') =DATE_FORMAT(NOW(),'%y') ) a right join (SELECT tdr.equipno as equipno ,tdr.devicetype as `code` ,ssd.`name` as `name` FROM `tb_drybeachequipinfor` tdr join tab_devicetype ssd on tdr.devicetype =ssd.`code` WHERE tdr.tailingid=#{tailno}) b on a.equipno= b.equipno GROUP BY b.code")
List<HashMap<String, Object>> statistics(String tailno);
@Select(value = "select count(a.equipno) as count ,b.equipname,b.equipno ,\n" +
......@@ -53,7 +53,7 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
"sum(case when alarmlevel =2 then 1 else 0 end )as \"2\",\n" +
"sum(case when alarmlevel =3 then 1 else 0 end )as \"3\",\n" +
"sum(case when alarmlevel =4 then 1 else 0 end )as \"4\" \n" +
"FROM (SELECT * from tab_abnormal where DATE_FORMAT(time,'%y') =DATE_FORMAT(NOW(),'%y') and state = 1) a right join (SELECT tdr.equipno as equipno ,tdr.devicetype as `code` ,ssd.`name` as `name` FROM `tb_drybeachequipinfor` tdr join sys_devicetype ssd on tdr.devicetype =ssd.`code` WHERE tdr.tailingid=#{tailno}) b on a.equipno= b.equipno GROUP BY b.code")
"FROM (SELECT * from tab_abnormal where DATE_FORMAT(time,'%y') =DATE_FORMAT(NOW(),'%y') and state = 1) a right join (SELECT tdr.equipno as equipno ,tdr.devicetype as `code` ,ssd.`name` as `name` FROM `tb_drybeachequipinfor` tdr join tab_devicetype ssd on tdr.devicetype =ssd.`code` WHERE tdr.tailingid=#{tailno}) b on a.equipno= b.equipno GROUP BY b.code")
List<HashMap<String, Object>> statistics1(String tailno);
......@@ -73,7 +73,7 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
"\telse ta.alarmlevel\n" +
" end\n" +
" as alarmlevel\n" +
" from (select * from tab_abnormal ORDER BY alarmlevel DESC) ta RIGHT join (SELECT tdr.equipno as equipno ,tdr.devicetype as `code` ,ssd.`name` as `name` FROM `tb_drybeachequipinfor` tdr join sys_devicetype ssd on tdr.devicetype =ssd.`code` WHERE tdr.tailingid=#{tailno}) sd on sd.`equipno`=ta.equipno GROUP BY sd.`code`")
" from (select * from tab_abnormal ORDER BY alarmlevel DESC) ta RIGHT join (SELECT tdr.equipno as equipno ,tdr.devicetype as `code` ,ssd.`name` as `name` FROM `tb_drybeachequipinfor` tdr join tab_devicetype ssd on tdr.devicetype =ssd.`code` WHERE tdr.tailingid=#{tailno}) sd on sd.`equipno`=ta.equipno GROUP BY sd.`code`")
List<HashMap<String, Object>> gettypelist(String tailno);
@Select(value = "select case ta.alarmlevel when '1' then 'red'\n" +
......
......@@ -69,7 +69,7 @@ public interface DbDataService extends IService<DbData> {
* @param dataQueryCriteria
* @return
*/
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria);
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
/**
......@@ -82,5 +82,5 @@ public interface DbDataService extends IService<DbData> {
/***
* 导出干滩表格
*/
void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response,HttpServletRequest request) throws IOException;
void download(DataQueryCriteria dataQueryCriteria, HttpServletResponse response, HttpServletRequest request) throws IOException;
}
......@@ -60,7 +60,7 @@ public interface DmDataService extends IService<DmData> {
* @param dataQueryCriteria
* @return
*/
HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria);
HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria,HttpServletRequest request);
/**
* 实时数据
......@@ -75,8 +75,8 @@ public interface DmDataService extends IService<DmData> {
* @param dataQueryCriteria
* @return
*/
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria);
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria,HttpServletRequest request);
void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria);
void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria,HttpServletRequest request);
}
......@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.MpData;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
......@@ -50,25 +53,31 @@ public interface MpDataService extends IService<MpData> {
List<MpData> demo(String date, String values, String deviceid);
/**
* 实时数据
*
* @return
*/
List<RealDataVo> real(String equipno, HttpServletRequest request);
/**
* 分页历史
*
* @param searchName
* @param searchValue
* @param limit
* @param timeSpace
* @param sort
* @param page
* @param size
* @param datasource
* @param dataQueryCriteria
* @param request
* @return
*/
HashMap<String, Object> pageall(String searchName, String searchValue, String limit, String timeSpace, String sort, long page, long size, String datasource);
HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
/**
* 实时数据
* 图表数据
*
* @param dataQueryCriteria
* @param request
* @return
*/
List<RealDataVo> real(String equipno, HttpServletRequest request);
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
}
......@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.StData;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
......@@ -52,19 +55,12 @@ public interface StDataService extends IService<StData> {
DataVo month(String date, String values, String deviceid, String subitem);
/**
* 分页历史记录
*
* @param searchName
* @param searchValue
* @param limit
* @param timeSpace
* @param sort
* @param page
* @param size
* @param datasource
* 分页历史记录
* @param dataQueryCriteria
* @param request
* @return
*/
HashMap<String, Object> pageall(String searchName, String searchValue, String limit, String timeSpace, String sort, long page, long size, String datasource);
HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
/**
* 实时数据
......@@ -73,4 +69,15 @@ public interface StDataService extends IService<StData> {
* @return
*/
List<RealDataVo> real(String equipno, HttpServletRequest request);
/**
* 图表数据
*
* @param dataQueryCriteria
* @param request
* @return
*/
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
}
......@@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.gemho.entity.data.WtData;
import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.RealDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import me.zhengjie.gemho.x_datavo.data.ImgDataVo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
......@@ -50,21 +53,26 @@ public interface WtDataService extends IService<WtData> {
* @return
*/
DataVo month(String date, String values, String deviceid, String subitem);
/**
* 分页历史
*
* @param dataQueryCriteria
* @param request
* @return
*/
HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
/**
* 分页历史记录
* 图表数据
*
* @param searchName
* @param searchValue
* @param limit
* @param timeSpace
* @param sort
* @param page
* @param size
* @param datasource
* @param dataQueryCriteria
* @param request
* @return
*/
HashMap<String, Object> pageall(String searchName, String searchValue, String limit, String timeSpace, String sort, long page, long size, String datasource);
ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request);
/**
* 实时数据
......
......@@ -308,6 +308,8 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
dbDataPage = dbDataMapper.selectPage(dbDataPage, dbDataQueryWrapper);
List<DbData> records = dbDataPage.getRecords();
long total = dbDataPage.getTotal();
//获取编码-名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
//判断是否需要人工监测数据
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
......@@ -316,6 +318,7 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
HashMap<String, Integer> point = ServiceUtil.artificialPoint();
List<ArtificialData> artificialDataList = ServiceUtil.artificialDataDeal(page, size, checkArtificial, dataQueryCriteria);
for (DbData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
Date time = record.getTime();
for (ArtificialData artificialData : artificialDataList) {
boolean b = false;
......@@ -333,6 +336,10 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
}
}
}
} else {
for (DbData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
}
}
map.put("list", records);
map.put("total", total);
......@@ -340,44 +347,51 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
}
@Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria) {
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
if (code == null) {
//获取当前尾矿库
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("devicetype", "1").orderByDesc("id");
drybeachequipinforQueryWrapper.eq("devicetype", "1").eq("tailingid", tailInfoNo).orderByDesc("id");
Drybeachequipinfor drybeachequipinfor = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper).get(0);
dataQueryCriteria.setCode(drybeachequipinfor.getEquipno());
}
QueryWrapper<DbData> dbDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(dbDataQueryWrapper, dataQueryCriteria);
List<DbData> dbData = dbDataMapper.selectList(dbDataQueryWrapper);
//获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request);
String sensorname = noName.get(dataQueryCriteria.getCode());
//封装处理数据
HashMap<String, List<Map>> realdata = ReadJsonFileUtil.getMap("realdata");
List<Map> dbdata = realdata.get("dbdata");
ImgDataVo imgDataVo = new ImgDataVo();
ArrayList<Result> results = new ArrayList<>();
for (DbData dbDatum : dbData) {
HashMap map = new HashMap<String, Object>();
for (Field declaredField : dbDatum.getClass().getDeclaredFields()) {
for (Map dbmap : dbdata) {
String key = dbmap.get("key").toString();
if (declaredField.getName().equals(key)) {
try {
map.put(declaredField.getName(), declaredField.get(dbDatum));
} catch (IllegalAccessException e) {
e.printStackTrace();
if (!dbData.isEmpty()) {
for (DbData dbDatum : dbData) {
HashMap map = new HashMap<String, Object>();
for (Field declaredField : dbDatum.getClass().getDeclaredFields()) {
for (Map dbmap : dbdata) {
String key = dbmap.get("key").toString();
if (declaredField.getName().equals(key)) {
try {
map.put(declaredField.getName(), declaredField.get(dbDatum));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
;
}
;
}
Result result = new Result();
result.setDate(dbDatum.getTime());
result.setValues(map);
results.add(result);
}
Result result = new Result();
result.setDate(dbDatum.getTime());
result.setValues(map);
results.add(result);
}
imgDataVo.setLists(results);
imgDataVo.setSensorname(dataQueryCriteria.getSensorname());
imgDataVo.setSensorname(sensorname);
imgDataVo.setNames(dbdata);
return imgDataVo;
}
......
......@@ -3,6 +3,7 @@ package me.zhengjie.gemho.service.data.impl;
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 lombok.SneakyThrows;
import me.zhengjie.gemho.entity.artificial.ArtificialData;
import me.zhengjie.gemho.entity.data.DmData;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
......@@ -16,6 +17,7 @@ import me.zhengjie.gemho.x_datavo.RealDataVo;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -307,15 +309,17 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}
@Override
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria) {
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage();
long size = dataQueryCriteria.getSize();
HashMap<String, Object> map = new HashMap<>();
QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.dataQuery(dmDataQueryWrapper, dataQueryCriteria);
ServiceUtil.dbquery(dmDataQueryWrapper, dataQueryCriteria, request);
Page<DmData> dmDataPage = new Page<>(page + 1, size);
dmDataPage = dmDataMapper.selectPage(dmDataPage, dmDataQueryWrapper);
List<DmData> records = dmDataPage.getRecords();
//获取编码-名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
//处理人工监测数据
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
......@@ -323,6 +327,7 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
HashMap<String, Integer> point = ServiceUtil.artificialPoint();
List<ArtificialData> artificialDataList = ServiceUtil.artificialDataDeal(page, size, checkArtificial, dataQueryCriteria);
for (DmData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
Date time = record.getTime();
for (ArtificialData artificialData : artificialDataList) {
boolean b = false;
......@@ -340,6 +345,10 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}
}
}
} else {
for (DmData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
}
}
map.put("list", records);
map.put("total", dmDataPage.getTotal());
......@@ -377,19 +386,24 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
}
@Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria) {
String sensorname = dataQueryCriteria.getSensorname();
if (sensorname == null) {
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
if (code == null) {
//获取当前尾矿库编码
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("devicetype", "4").orderByDesc("id");
drybeachequipinforQueryWrapper.eq("devicetype", "4").eq("tailingid", tailInfoNo).orderByDesc("id");
Drybeachequipinfor drybeachequipinfor = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper).get(0);
dataQueryCriteria.setSensorname(drybeachequipinfor.getEquipname());
dataQueryCriteria.setCode(drybeachequipinfor.getEquipno());
}
QueryWrapper<DmData> dmDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(dmDataQueryWrapper, dataQueryCriteria);
List<DmData> dmData = dmDataMapper.selectList(dmDataQueryWrapper);
//获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request);
String sensorname = noName.get(dataQueryCriteria.getCode());
//处理封装数据
ImgDataVo dmdata = ServiceUtil.deal("dmdata", dataQueryCriteria.getSensorname(), dmData);
ImgDataVo dmdata = ServiceUtil.deal("dmdata", sensorname, dmData);
return dmdata;
}
......@@ -404,15 +418,23 @@ public class DmDataServiceImpl extends ServiceImpl<DmDataMapper, DmData> impleme
return stringListHashMap[i];
}
@SneakyThrows
@Override
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria) {
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
//获取数据
List<DmData> list = (List<DmData>) pageall(dataQueryCriteria).get("list");
List<DmData> list = (List<DmData>) pageall(dataQueryCriteria, request).get("list");
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
ArrayList<Map<String, Object>> maps = new ArrayList<>();
for (DmData dmData : list) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("设备编号", dmData.getSensorid());
map.put("设备名称", dmData.getSensorname());
map.put("a轴变化量", dmData.getDispA());
map.put("b轴变化量", dmData.getDispB());
map.put("是否报警", dmData.getState() == 0 ? "否" : "是");
map.put("监测时间", dmData.getTime());
maps.add(map);
}
FileUtil.downloadExcel(maps, "数据监测: 内部位移", response);
}
}
......@@ -3,7 +3,11 @@ package me.zhengjie.gemho.service.data.impl;
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 lombok.SneakyThrows;
import me.zhengjie.gemho.entity.artificial.ArtificialData;
import me.zhengjie.gemho.entity.data.MpData;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.artificial.ArtificialDataMapper;
import me.zhengjie.gemho.mapper.data.MpDataMapper;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.service.data.MpDataService;
......@@ -12,10 +16,14 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Field;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -35,6 +43,8 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
private MpDataMapper mpDataMapper;
@Autowired
private DrybeachequipinforMapper drybeachequipinforMapper;
@Autowired
private ArtificialDataMapper artificialDataMapper;
@Override
public DataVo day(String date, String values, String deviceid) {
......@@ -323,13 +333,56 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
}
@Override
public HashMap<String, Object> pageall(String searchName, String searchValue, String limit, String timeSpace, String sort, long page, long size, String datasource) {
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage();
long size = dataQueryCriteria.getSize();
//构建返回map
HashMap<String, Object> map = new HashMap<>();
//构建查询条件
QueryWrapper<MpData> mpDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.dbquery(mpDataQueryWrapper, searchName, searchValue, limit, timeSpace, sort, datasource);
ServiceUtil.dbquery(mpDataQueryWrapper, dataQueryCriteria, request);
//分页对象
Page<MpData> mpDataPage = new Page<>(page + 1, size);
mpDataPage = mpDataMapper.selectPage(mpDataPage, mpDataQueryWrapper);
map.put("list", mpDataPage.getRecords());
List<MpData> records = mpDataPage.getRecords();
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
//获取编码-名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
//处理人工巡检
if (checkArtificial != null) {
//获取所有的检测子项id 和 name的hashmap
HashMap<Integer, String> jczx = ServiceUtil.jczx();
HashMap<String, Integer> point = ServiceUtil.artificialPoint();
//
QueryWrapper<ArtificialData> artificialDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.artificialQuery(artificialDataQueryWrapper, dataQueryCriteria, checkArtificial);
List<ArtificialData> artificialDataPageRecords = artificialDataMapper.selectList(artificialDataQueryWrapper);
//
for (MpData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
Date time = record.getTime();
for (ArtificialData artificialDataPageRecord : artificialDataPageRecords) {
Date time1 = artificialDataPageRecord.getTime();
boolean b = false;
//判断数据是否在同一小时内
if (time1 != null) {
b = DateUtil.timeInterval(time, time1);
}
//判断当前设备是否绑定的监测点是否一致
boolean check = point.get(record.getSensorid()) == artificialDataPageRecord.getPoint_id();
if (b && check) {
record.setJcziitemname(jczx.get(artificialDataPageRecord.getJczx_id()));
record.setJcvalue(artificialDataPageRecord.getValue());
record.setJctime(time1);
}
}
}
} else {
for (MpData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
}
}
map.put("list", records);
map.put("total", mpDataPage.getTotal());
return map;
}
......@@ -364,6 +417,58 @@ public class MpDataServiceImpl extends ServiceImpl<MpDataMapper, MpData> impleme
return realDataVos;
}
@Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
if (code == null) {
//获取当前尾矿库
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("devicetype", "3").eq("tailingid", tailInfoNo).orderByDesc("id");
Drybeachequipinfor drybeachequipinfor = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper).get(0);
dataQueryCriteria.setCode(drybeachequipinfor.getEquipno());
}
QueryWrapper<MpData> mpDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(mpDataQueryWrapper, dataQueryCriteria);
List<MpData> mpData = mpDataMapper.selectList(mpDataQueryWrapper);
//获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request);
String sensorname = noName.get(dataQueryCriteria.getCode());
//处理封装数据
ImgDataVo mpdata = ServiceUtil.deal("mpdata1", sensorname, mpData);
return mpdata;
}
@SneakyThrows
@Override
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
List<MpData> mpData = (List<MpData>) pageall(dataQueryCriteria, request).get("list");
//判断是否需要人工
boolean result = false;
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
result = true;
}
ArrayList<Map<String, Object>> list = new ArrayList<>();
for (MpData mpDatum : mpData) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("设备名称", mpDatum.getSensorname());
map.put("设备ID", mpDatum.getSensorid());
map.put("x变化量", mpDatum.getDispx());
map.put("y变化量", mpDatum.getDispy());
map.put("z变化量", mpDatum.getDisph());
map.put("是否报警", mpDatum.getState() == 0 ? "否" : "是");
map.put("监测时间", mpDatum.getTime());
if (result) {
map.put("人工监测项", mpDatum.getJcziitemname());
map.put("人工监测值", mpDatum.getJcvalue());
map.put("人工监测时间", mpDatum.getJctime());
}
list.add(map);
}
FileUtil.downloadExcel(list, "监测数据: 表面位移", response);
}
public String deal(Date date) throws ParseException {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
......@@ -3,7 +3,10 @@ package me.zhengjie.gemho.service.data.impl;
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 lombok.SneakyThrows;
import me.zhengjie.gemho.entity.artificial.ArtificialData;
import me.zhengjie.gemho.entity.data.StData;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.data.StDataMapper;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.service.data.StDataService;
......@@ -12,10 +15,14 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Field;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -281,18 +288,6 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
return null;
}
@Override
public HashMap<String, Object> pageall(String searchName, String searchValue, String limit, String timeSpace, String sort, long page, long size, String datasource) {
QueryWrapper<StData> stDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.dbquery(stDataQueryWrapper, searchName, searchValue, limit, timeSpace, sort, datasource);
Page<StData> stDataPage = new Page<>(page + 1, size);
stDataPage = stDataMapper.selectPage(stDataPage, stDataQueryWrapper);
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("list", stDataPage.getRecords());
hashMap.put("total", stDataPage.getTotal());
return hashMap;
}
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request) {
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
......@@ -323,6 +318,106 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
return realDataVos;
}
@SneakyThrows
@Override
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage();
long size = dataQueryCriteria.getSize();
QueryWrapper<StData> stDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.dbquery(stDataQueryWrapper, dataQueryCriteria, request);
Page<StData> stDataPage = new Page<>(page + 1, size);
stDataPage = stDataMapper.selectPage(stDataPage, stDataQueryWrapper);
List<StData> records = stDataPage.getRecords();
HashMap<String, Object> hashMap = new HashMap<>();
//获取编号名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
//判断是否需要处理人工巡检数据
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
//获取 所需的map
HashMap<Integer, String> jczx = ServiceUtil.jczx();
HashMap<String, Integer> stringIntegerHashMap = ServiceUtil.artificialPoint();
List<ArtificialData> artificialData = ServiceUtil.artificialDataDeal(page, size, checkArtificial, dataQueryCriteria);
for (StData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
Date time = record.getTime();
for (ArtificialData artificialDataPageRecord : artificialData) {
Date time1 = artificialDataPageRecord.getTime();
boolean b = false;
//判断数据是否在同一小时内
if (time1 != null) {
b = DateUtil.timeInterval(time, time1);
}
//判断当前设备是否绑定的监测点是否一致
boolean check = stringIntegerHashMap.get(record.getSensorid()) == artificialDataPageRecord.getPoint_id();
if (b && check) {
record.setJcziitemname(jczx.get(artificialDataPageRecord.getJczx_id()));
record.setJcvalue(artificialDataPageRecord.getValue());
record.setJctime(time1);
}
}
}
} else {
for (StData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
}
}
hashMap.put("list", records);
hashMap.put("total", stDataPage.getTotal());
return hashMap;
}
@Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
if (code == null) {
//获取当前尾矿库
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("devicetype", "5").eq("tailingid", tailInfoNo).orderByDesc("id");
Drybeachequipinfor drybeachequipinfor = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper).get(0);
dataQueryCriteria.setCode(drybeachequipinfor.getEquipno());
}
QueryWrapper<StData> stDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(stDataQueryWrapper, dataQueryCriteria);
List<StData> stData = stDataMapper.selectList(stDataQueryWrapper);
//获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request);
String sensorname = noName.get(dataQueryCriteria.getCode());
//处理封装数据
ImgDataVo mpdata = ServiceUtil.deal("stdata", sensorname, stData);
return mpdata;
}
@SneakyThrows
@Override
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
List<StData> stData = (List<StData>) pageall(dataQueryCriteria, request).get("list");
//判断是否需要人工
boolean result = false;
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
result = true;
}
ArrayList<Map<String, Object>> list = new ArrayList<>();
for (StData stDatum : stData) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("设备名称", stDatum.getSensorname());
map.put("设备ID", stDatum.getSensorid());
map.put("水位", stDatum.getStage());
map.put("埋深", stDatum.getDepth());
map.put("是否报警", stDatum.getState() == 0 ? "否" : "是");
map.put("监测时间", stDatum.getTime());
if (result) {
map.put("人工监测项", stDatum.getJcziitemname());
map.put("人工监测值", stDatum.getJcvalue());
map.put("人工监测时间", stDatum.getJctime());
}
list.add(map);
}
FileUtil.downloadExcel(list, "监测数据: 表面位移", response);
}
public String deal(Date date) throws ParseException {
String[] stringListHashMap = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
......
......@@ -3,7 +3,10 @@ package me.zhengjie.gemho.service.data.impl;
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 lombok.SneakyThrows;
import me.zhengjie.gemho.entity.artificial.ArtificialData;
import me.zhengjie.gemho.entity.data.WtData;
import me.zhengjie.gemho.entity.tab.Drybeachequipinfor;
import me.zhengjie.gemho.mapper.data.WtDataMapper;
import me.zhengjie.gemho.mapper.tab.DrybeachequipinforMapper;
import me.zhengjie.gemho.service.data.WtDataService;
......@@ -12,10 +15,14 @@ import me.zhengjie.gemho.x_datavo.DataVo;
import me.zhengjie.gemho.x_datavo.NameVo;
import me.zhengjie.gemho.x_datavo.RealDataVo;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Field;
import java.text.ParseException;
import java.text.SimpleDateFormat;
......@@ -285,18 +292,103 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
}
@Override
public HashMap<String, Object> pageall(String searchName, String searchValue, String limit, String
timeSpace, String sort, long page, long size, String datasource) {
public HashMap<String, Object> pageall(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage();
long size = dataQueryCriteria.getSize();
QueryWrapper<WtData> wtDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.dbquery(wtDataQueryWrapper, searchName, searchValue, limit, timeSpace, sort, datasource);
ServiceUtil.dbquery(wtDataQueryWrapper, dataQueryCriteria, request);
Page<WtData> wtDataPage = new Page<>(page + 1, size);
wtDataPage = wtDataMapper.selectPage(wtDataPage, wtDataQueryWrapper);
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("list", wtDataPage.getRecords());
List<WtData> records = wtDataPage.getRecords();
//获取编号名字map
HashMap<String, String> noName = ServiceUtil.getNoName(request);
//判断是否需要处理人工巡检数据
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
//获取 所需的map
HashMap<Integer, String> jczx = ServiceUtil.jczx();
HashMap<String, Integer> stringIntegerHashMap = ServiceUtil.artificialPoint();
List<ArtificialData> artificialData = ServiceUtil.artificialDataDeal(page, size, checkArtificial, dataQueryCriteria);
for (WtData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
Date time = record.getTime();
for (ArtificialData artificialDataPageRecord : artificialData) {
Date time1 = artificialDataPageRecord.getTime();
boolean b = false;
//判断数据是否在同一小时内
if (time1 != null) {
b = DateUtil.timeInterval(time, time1);
}
//判断当前设备是否绑定的监测点是否一致
boolean check = stringIntegerHashMap.get(record.getSensorid()) == artificialDataPageRecord.getPoint_id();
if (b && check) {
record.setJcziitemname(jczx.get(artificialDataPageRecord.getJczx_id()));
record.setJcvalue(artificialDataPageRecord.getValue());
record.setJctime(time1);
}
}
}
} else {
for (WtData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
}
}
hashMap.put("list", records);
hashMap.put("total", wtDataPage.getTotal());
return hashMap;
}
@Override
public ImgDataVo imgList(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
String code = dataQueryCriteria.getCode();
if (code == null) {
//获取当前尾矿库
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
drybeachequipinforQueryWrapper.eq("devicetype", "2").eq("tailingid", tailInfoNo).orderByDesc("id");
Drybeachequipinfor drybeachequipinfor = drybeachequipinforMapper.selectList(drybeachequipinforQueryWrapper).get(0);
dataQueryCriteria.setCode(drybeachequipinfor.getEquipno());
}
QueryWrapper<WtData> wtDataQueryWrapper = new QueryWrapper<>();
ServiceUtil.imgQuery(wtDataQueryWrapper, dataQueryCriteria);
List<WtData> wtData = wtDataMapper.selectList(wtDataQueryWrapper);
//获取编码-名
HashMap<String, String> noName = ServiceUtil.getNoName(request);
String sensorname = noName.get(dataQueryCriteria.getCode());
//处理封装数据
ImgDataVo mpdata = ServiceUtil.deal("wtdata", sensorname, wtData);
return mpdata;
}
@SneakyThrows
@Override
public void download(HttpServletResponse response, DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
List<WtData> wtData = (List<WtData>) pageall(dataQueryCriteria, request).get("list");
boolean result = false;
String checkArtificial = ServiceUtil.checkArtificial(dataQueryCriteria);
if (checkArtificial != null) {
result = true;
}
ArrayList<Map<String, Object>> list = new ArrayList<>();
for (WtData wtDatum : wtData) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("设备名称", wtDatum.getSensorname());
map.put("设备ID", wtDatum.getSensorid());
map.put("水位", wtDatum.getStage());
map.put("是否报警", wtDatum.getState() == 0 ? "否" : "是");
map.put("监测时间", wtDatum.getTime());
if (result) {
map.put("人工监测项", wtDatum.getJcziitemname());
map.put("人工监测值", wtDatum.getJcvalue());
map.put("人工监测时间", wtDatum.getJctime());
}
list.add(map);
}
FileUtil.downloadExcel(list, "监测数据: 库水位", response);
}
@Override
public List<RealDataVo> real(String equipno1, HttpServletRequest request) {
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo(request);
......
......@@ -76,9 +76,14 @@ public class DicServiceImpl implements DicService {
public HashMap<String, ArrayList<Dic>> getdrybeachequipinfor() {
String currentUsername = SecurityUtils.getCurrentUsername();
HashMap<String, ArrayList<Dic>> map = new HashMap<>();
ArrayList<Dic> gettailingid = drybeachequipinforMapper.gettailingid(currentUsername);
if (currentUsername.equals("admin")) {
ArrayList<Dic> gettailingid = drybeachequipinforMapper.gettailingid();
map.put("tailingid", gettailingid);
} else {
ArrayList<Dic> gettailingid = drybeachequipinforMapper.gettailingid(currentUsername);
map.put("tailingid", gettailingid);
}
ArrayList<Dic> getdevicetype = drybeachequipinforMapper.getdevicetype();
map.put("tailingid", gettailingid);
map.put("devicetype", getdevicetype);
return map;
}
......
......@@ -48,7 +48,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
HashMap<String, Object> hashMap = new HashMap<>();
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
String currentUsername = SecurityUtils.getCurrentUsername();
String gettailno = onlineUserService.gettailno(currentUsername,request);
String gettailno = onlineUserService.gettailno(currentUsername, request);
drybeachequipinforQueryWrapper.eq("tailingid", gettailno);
ServiceUtil.query(drybeachequipinforQueryWrapper, dataQueryCriteria);
Page<Drybeachequipinfor> drybeachequipinforPage = new Page<>(page + 1, size);
......@@ -119,7 +119,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
}
@Override
public HashMap<String, Object> level(DataQueryCriteria dataQueryCriteria,HttpServletRequest request) {
public HashMap<String, Object> level(DataQueryCriteria dataQueryCriteria, HttpServletRequest request) {
long page = dataQueryCriteria.getPage();
long size = dataQueryCriteria.getSize();
String vague = dataQueryCriteria.getVague();
......@@ -163,7 +163,7 @@ public class DrybeachequipinforServiceImpl extends ServiceImpl<Drybeachequipinfo
}
@Override
public List<DrybeachequipinforVo> sensorList(String code,HttpServletRequest request) {
public List<DrybeachequipinforVo> sensorList(String code, HttpServletRequest request) {
QueryWrapper<Drybeachequipinfor> drybeachequipinforQueryWrapper = new QueryWrapper<>();
if (code != null) {
drybeachequipinforQueryWrapper.eq("devicetype", code);
......
......@@ -64,7 +64,6 @@ public class WebMonitorPointsServiceImpl extends ServiceImpl<WebMonitorPointsMap
@Override
public void pchuli(ArrayList<WebMonitorPoints> webMonitorPoints) {
webMonitorPointsMapper.batchinsert(webMonitorPoints);
}
......@@ -115,7 +114,6 @@ public class WebMonitorPointsServiceImpl extends ServiceImpl<WebMonitorPointsMap
webMonitorLinkQueryWrapper.in("pointid", guids);
iWebMonitorLinkService.removebyguids(guids);
if (!webMonitorLinks.isEmpty()){
iWebMonitorLinkService.pinsert(webMonitorLinks);
}
}
......
......@@ -170,7 +170,10 @@ public class DataUtil {
//根据报警状态返回报警值
//在报警表中查询该设备的报警状态
Integer alarmLevel = tabAbnormalMapper.getalarmlevel(drybeachequipinfor.getEquipno());
/* if (alarmLevel != null) {
if (alarmLevel == null) {
alarmLevel = 0;
}
/* if (alarmLevel != null) {
if (alarmLevel == 2 || alarmLevel == 1) {
drybeachequipinfor.setThreelevelalarm(0.0);
drybeachequipinfor.setFourlevelalarm(0.0);
......@@ -186,13 +189,13 @@ public class DataUtil {
}*/
HashMap<String, Object> map = new HashMap<>();
HashMap<String, Double> alarm = new HashMap<>();
alarm.put("value",0.0);
alarm.put("value", 0.0);
alarm.put("red", drybeachequipinfor.getOnelevelalarm());
alarm.put("orange", drybeachequipinfor.getTwolevelalarm());
alarm.put("yellow", drybeachequipinfor.getThreelevelalarm());
alarm.put("blue", drybeachequipinfor.getFourlevelalarm());
map.put("value",alarm);
map.put("alarmLevel",alarmLevel);
map.put("value", alarm);
map.put("alarmLevel", alarmLevel);
return map;
}
}
......@@ -2,10 +2,10 @@ package me.zhengjie.gemho.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
public class DateUtil {
......@@ -141,11 +141,12 @@ public class DateUtil {
* @return
*/
public static boolean timeInterval(Date time, Date time1) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH");
LocalDateTime localDateTime = dateToLocalDateTime(time);
LocalDateTime localDateTime1 = dateToLocalDateTime(time1);
Duration duration = Duration.between(localDateTime, localDateTime1);
long l = duration.toHours();
if (l <= 1) {
String forTime = formatter.format(localDateTime);
String forTime1 = formatter.format(localDateTime1);
if (forTime.equals(forTime1)) {
return true;
}
return false;
......
......@@ -117,7 +117,7 @@ public class UserController {
// 默认密码 123456
resources.setPassword(passwordEncoder.encode("123456"));
ArrayList<HashMap<String, String>> ponds = resources.getPonds();
userTailponController.add(resources.getUsername(),ponds);
userTailponController.add(resources.getUsername(), ponds);
userService.create(resources);
return new ResponseEntity<>(HttpStatus.CREATED);
}
......@@ -129,7 +129,9 @@ public class UserController {
public ResponseEntity<Object> updateUser(@Validated(User.Update.class) @RequestBody User resources) throws Exception {
checkLevel(resources);
ArrayList<HashMap<String, String>> ponds = resources.getPonds();
userTailponController.add(resources.getUsername(),ponds);
if (ponds != null) {
userTailponController.add(resources.getUsername(), ponds);
}
userService.update(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
......
......@@ -43,6 +43,20 @@
"name": "沉降值"
}
],
"mpdata1": [
{
"key": "dispx",
"name": "x方向偏移"
},
{
"key": "dispy",
"name": "y方向偏移"
},
{
"key": "disph",
"name": "沉降值"
}
],
"stdata": [
{
"key": "stage",
......
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