Commit 7d58f127 authored by LiuZunBo's avatar LiuZunBo

人工监测添加条件查询、对比在历史记录中查看,增加对比列(库水位 降雨量 浸润线 干滩)

对比在历史记录中查看,增加对比列
parent 671a9325
......@@ -18,6 +18,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
* <p>
......@@ -81,5 +82,19 @@ public class ArtificialDataController {
return new ResponseEntity<>(new PostOrPutResult().failed(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
@ApiOperation(value = "人工监测人列表")
@GetMapping("rquery")
public ResponseEntity<Object> rquery() {
List rquery = artificialDataService.rquery();
return new ResponseEntity<>(new PageResult().success(rquery), HttpStatus.OK);
}
@ApiOperation(value = "人工监测类型列表")
@GetMapping("rtype")
public ResponseEntity<Object> rtype() {
List rquery = artificialDataService.rtype();
return new ResponseEntity<>(new PageResult().success(rquery), HttpStatus.OK);
}
}
......@@ -45,7 +45,7 @@ public class AbnormalController {
return new ResponseEntity<>(new PageResult().nopagesuccess(abnormal), HttpStatus.OK);
}
@Log("接触报警")
@Log("解除预警")
@ApiOperation(value = "解除预警")
@PutMapping("histoty")
public ResponseEntity<Object> jcbj(@RequestBody HashMap<String, String> map) {
......
......@@ -55,5 +55,10 @@ public class ArtificialData implements Serializable {
*/
private Date time;
/**
* 监测人
*/
private String jc_man;
}
......@@ -123,4 +123,10 @@ public class DbData implements Serializable {
/*@TableField(exist = false)
public String alarmlevel;*/
/**
* 差值
*/
@TableField(exist = false)
public String difference;
}
......@@ -100,5 +100,9 @@ public class RgData implements Serializable {
@TableField(exist = false)
public String danwei;
/**
* 差值
*/
@TableField(exist = false)
public String difference;
}
......@@ -105,4 +105,9 @@ public class StData implements Serializable {
@TableField(exist = false)
public String danwei;
/**
* 差值
*/
@TableField(exist = false)
public String difference;
}
......@@ -98,4 +98,10 @@ public class WtData implements Serializable {
public Date jctime;
@TableField(exist = false)
public String danwei;
/**
* 差值
*/
@TableField(exist = false)
public String difference;
}
......@@ -32,7 +32,7 @@ public interface TabAbnormalMapper extends BaseMapper<Abnormal> {
@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},ifselect=1 where equipno =#{equipno}")
@Update(value = "update tab_abnormal set state = '2' ,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,
......
......@@ -6,6 +6,7 @@ import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
/**
* <p>
......@@ -41,5 +42,19 @@ public interface ArtificialDataService extends IService<ArtificialData> {
* @return
*/
boolean modify(ArtificialData param, HttpServletRequest request);
/**
* 人工监测人列表
*
* @return
*/
List rquery();
/**
* 人工监测类型列表
* @return
*/
List rtype();
}
......@@ -13,6 +13,7 @@ import me.zhengjie.gemho.service.artificial.ArtificialDataService;
import me.zhengjie.gemho.util.ServiceUtil;
import me.zhengjie.gemho.util.TailNoForInfoUtil;
import me.zhengjie.gemho.x_datavo.artificial.ADataVo;
import me.zhengjie.gemho.x_datavo.artificial.ArtificialDataVo;
import me.zhengjie.gemho.x_datavo.data.DataQueryCriteria;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -139,4 +140,32 @@ public class ArtificialDataServiceImpl extends ServiceImpl<ArtificialDataMapper,
}
return false;
}
/**
* 人工监测人列表
* @return
*/
@Override
public List rquery() {
ArrayList<ArtificialDataVo> artificialListVos = new ArrayList<>();
//获取当前尾矿库
String tailInfoNo = TailNoForInfoUtil.getTailInfoNo();
if (tailInfoNo == null) {
return null;
}
QueryWrapper<ArtificialData> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("tailingid",tailInfoNo);
List<ArtificialData> artificialDataList = artificialDataMapper.selectList(queryWrapper);
for (ArtificialData artificialdata : artificialDataList) {
ArtificialDataVo artificialDataVo = new ArtificialDataVo();
BeanUtils.copyProperties(artificialdata, artificialDataVo);
artificialListVos.add(artificialDataVo);
}
return artificialListVos;
}
@Override
public List rtype() {
return jczxMapper.selectList(null);
}
}
......@@ -314,6 +314,26 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
record.setJcziitemname(jczx.get(artificialData.getJczx_id()));
record.setJcvalue(artificialData.getValue());
record.setJctime(time1);
//计算差值
if (checkArtificial.equals("16")){
Double aDouble = Double.valueOf(record.getAngle());
Double aDouble1 = Double.valueOf(record.getJcvalue());
Double difference = aDouble-aDouble1;
double v = (difference < 0) ? -difference : difference;
record.setDifference(String.valueOf(v));
}else if (checkArtificial.equals("17")){
Double aDouble = Double.valueOf(record.getLenth());
Double aDouble1 = Double.valueOf(record.getJcvalue());
Double difference = aDouble-aDouble1;
double v = (difference < 0) ? -difference : difference;
record.setDifference(String.valueOf(v));
}else if (checkArtificial.equals("18")){
Double aDouble = Double.valueOf(record.getAngle());
Double aDouble1 = Double.valueOf(record.getJcvalue());
Double difference = aDouble-aDouble1;
double v = (difference < 0) ? -difference : difference;
record.setDifference(String.format("%.2f",v));
}
}
}
}
......
......@@ -299,6 +299,12 @@ public class RgDataServiceImpl extends ServiceImpl<RgDataMapper, RgData> impleme
record.setJcziitemname(jczx.get(artificialDataPageRecord.getJczx_id()));
record.setJcvalue(artificialDataPageRecord.getValue());
record.setJctime(time1);
//计算差值
Double aDouble = Double.valueOf(record.getRainfall());
Double aDouble1 = Double.valueOf(record.getJcvalue());
Double difference = aDouble-aDouble1;
double v = (difference < 0) ? -difference : difference;
record.setDifference(String.format("%.2f",v));
}
}
}
......
......@@ -402,6 +402,12 @@ public class StDataServiceImpl extends ServiceImpl<StDataMapper, StData> impleme
record.setJcziitemname(jczx.get(artificialDataPageRecord.getJczx_id()));
record.setJcvalue(artificialDataPageRecord.getValue());
record.setJctime(time1);
//计算差值
Double aDouble = Double.valueOf(record.getStage());
Double aDouble1 = Double.valueOf(record.getJcvalue());
Double difference = aDouble-aDouble1;
double v = (difference < 0) ? -difference : difference;
record.setDifference(String.format("%.2f",v));
}
}
}
......
......@@ -328,6 +328,7 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
for (WtData record : records) {
record.setSensorname(noName.get(record.getSensorid()));
record.setDanwei(noDan.get(record.getSensorid()));
Date time = record.getTime();
for (ArtificialData artificialDataPageRecord : artificialData) {
Date time1 = artificialDataPageRecord.getTime();
......@@ -342,6 +343,12 @@ public class WtDataServiceImpl extends ServiceImpl<WtDataMapper, WtData> impleme
record.setJcziitemname(jczx.get(artificialDataPageRecord.getJczx_id()));
record.setJcvalue(artificialDataPageRecord.getValue());
record.setJctime(time1);
//计算差值
Double aDouble = Double.valueOf(record.getStage());
Double aDouble1 = Double.valueOf(record.getJcvalue());
Double difference = aDouble-aDouble1;
double v = (difference < 0) ? -difference : difference;
record.setDifference(String.format("%.2f",v));
}
}
}
......
......@@ -233,7 +233,7 @@ public class TabAbnormalServiceImpl extends ServiceImpl<TabAbnormalMapper, Abnor
if (!strings.isEmpty()) {
for (String string : strings) {
if (string.equals("state")) {
exact.put("state", 1);
exact.put("state", Integer.valueOf(exact.get(string).toString()));
}
if (string.equals("monitorType")) {
continue;
......
......@@ -55,4 +55,8 @@ public class ADataVo {
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date time;
/**
* 监测人
*/
private String jc_man;
}
......@@ -14,4 +14,5 @@ public class ArtificialDataVo {
private String value;
@JsonFormat(pattern = "yyyy-mm-dd HH:mm:ss")
private Date jctime;
private String jc_man;
}
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