修复基坑监测管理
parent
d4333ee497
commit
5106e36ae8
|
@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosDeviceService
|
||||||
* @return 基坑监测-南方测绘-设备
|
* @return 基坑监测-南方测绘-设备
|
||||||
*/
|
*/
|
||||||
public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceById(Long id);
|
public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceById(Long id);
|
||||||
public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceByDevId(Long devId);
|
public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceByDevId(DevPitmonitSouthsmosDevice dev);
|
||||||
/**
|
/**
|
||||||
* 查询基坑监测-南方测绘-设备列表
|
* 查询基坑监测-南方测绘-设备列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosElementService
|
||||||
* @return 基坑监测-南方测绘-监测项
|
* @return 基坑监测-南方测绘-监测项
|
||||||
*/
|
*/
|
||||||
public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementById(Long id);
|
public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementById(Long id);
|
||||||
public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementBySrvId(Long id);
|
public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementBySrvId(DevPitmonitSouthsmosElement el);
|
||||||
/**
|
/**
|
||||||
* 查询基坑监测-南方测绘-监测项列表
|
* 查询基坑监测-南方测绘-监测项列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosSurveypointService
|
||||||
* @return 基坑监测-南方测绘-测点
|
* @return 基坑监测-南方测绘-测点
|
||||||
*/
|
*/
|
||||||
public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointById(Long id);
|
public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointById(Long id);
|
||||||
public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointBySpId(Long id);
|
public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointBySpId(DevPitmonitSouthsmosSurveypoint pt);
|
||||||
/**
|
/**
|
||||||
* 查询基坑监测-南方测绘-测点列表
|
* 查询基坑监测-南方测绘-测点列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosThresholdService
|
||||||
* @return 报警阈值
|
* @return 报警阈值
|
||||||
*/
|
*/
|
||||||
public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdById(Long id);
|
public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdById(Long id);
|
||||||
public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdBySrvId(Long id);
|
public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdBySrvId(DevPitmonitSouthsmosThreshold th);
|
||||||
/**
|
/**
|
||||||
* 查询报警阈值列表
|
* 查询报警阈值列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -39,9 +39,10 @@ public class DevPitmonitSouthsmosDeviceServiceImpl implements IDevPitmonitSouths
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceByDevId(Long devId) {
|
public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceByDevId(DevPitmonitSouthsmosDevice dev) {
|
||||||
DevPitmonitSouthsmosDevice where=new DevPitmonitSouthsmosDevice();
|
DevPitmonitSouthsmosDevice where=new DevPitmonitSouthsmosDevice();
|
||||||
where.setDevId(devId);
|
where.setDevId(dev.getDevId());
|
||||||
|
where.setCfgId(dev.getCfgId());
|
||||||
List<DevPitmonitSouthsmosDevice> list=selectDevPitmonitSouthsmosDeviceList(where);
|
List<DevPitmonitSouthsmosDevice> list=selectDevPitmonitSouthsmosDeviceList(where);
|
||||||
return list.size()>0?list.get(0):null;
|
return list.size()>0?list.get(0):null;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +118,7 @@ public class DevPitmonitSouthsmosDeviceServiceImpl implements IDevPitmonitSouths
|
||||||
public void addList(List<DevPitmonitSouthsmosDevice> items, SurProjectPitMonitCfg cfg) {
|
public void addList(List<DevPitmonitSouthsmosDevice> items, SurProjectPitMonitCfg cfg) {
|
||||||
items.forEach(it->{
|
items.forEach(it->{
|
||||||
it.setCfgId(cfg.getId());
|
it.setCfgId(cfg.getId());
|
||||||
DevPitmonitSouthsmosDevice old= selectDevPitmonitSouthsmosDeviceByDevId(it.getDevId());
|
DevPitmonitSouthsmosDevice old= selectDevPitmonitSouthsmosDeviceByDevId(it);
|
||||||
if(old==null) {
|
if(old==null) {
|
||||||
insertDevPitmonitSouthsmosDevice(it);
|
insertDevPitmonitSouthsmosDevice(it);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,9 +39,10 @@ public class DevPitmonitSouthsmosElementServiceImpl implements IDevPitmonitSouth
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementBySrvId(Long id) {
|
public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementBySrvId(DevPitmonitSouthsmosElement el) {
|
||||||
DevPitmonitSouthsmosElement where=new DevPitmonitSouthsmosElement();
|
DevPitmonitSouthsmosElement where=new DevPitmonitSouthsmosElement();
|
||||||
where.setSrvId(id);
|
where.setSrvId(el.getSrvId());
|
||||||
|
where.setCfgId(el.getCfgId());
|
||||||
List<DevPitmonitSouthsmosElement> list=selectDevPitmonitSouthsmosElementList(where);
|
List<DevPitmonitSouthsmosElement> list=selectDevPitmonitSouthsmosElementList(where);
|
||||||
return list.size()==1?list.get(0): null;
|
return list.size()==1?list.get(0): null;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +118,7 @@ public class DevPitmonitSouthsmosElementServiceImpl implements IDevPitmonitSouth
|
||||||
public void addList(List<DevPitmonitSouthsmosElement> elList, SurProjectPitMonitCfg cfg) {
|
public void addList(List<DevPitmonitSouthsmosElement> elList, SurProjectPitMonitCfg cfg) {
|
||||||
elList.forEach(el->{
|
elList.forEach(el->{
|
||||||
el.setCfgId(cfg.getId());
|
el.setCfgId(cfg.getId());
|
||||||
DevPitmonitSouthsmosElement old=selectDevPitmonitSouthsmosElementBySrvId(el.getSrvId());
|
DevPitmonitSouthsmosElement old=selectDevPitmonitSouthsmosElementBySrvId(el);
|
||||||
if(old==null){
|
if(old==null){
|
||||||
insertDevPitmonitSouthsmosElement(el);
|
insertDevPitmonitSouthsmosElement(el);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,10 @@ public class DevPitmonitSouthsmosSurveypointServiceImpl implements IDevPitmonitS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointBySpId(Long id) {
|
public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointBySpId(DevPitmonitSouthsmosSurveypoint pt) {
|
||||||
DevPitmonitSouthsmosSurveypoint where=new DevPitmonitSouthsmosSurveypoint();
|
DevPitmonitSouthsmosSurveypoint where=new DevPitmonitSouthsmosSurveypoint();
|
||||||
where.setSpId(id);
|
where.setSpId(pt.getSpId());
|
||||||
|
where.setCfgId(pt.getCfgId());
|
||||||
List<DevPitmonitSouthsmosSurveypoint> list=selectDevPitmonitSouthsmosSurveypointList(where);
|
List<DevPitmonitSouthsmosSurveypoint> list=selectDevPitmonitSouthsmosSurveypointList(where);
|
||||||
return list.size()==1?list.get(0): null;
|
return list.size()==1?list.get(0): null;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,7 @@ public class DevPitmonitSouthsmosSurveypointServiceImpl implements IDevPitmonitS
|
||||||
public void addList(List<DevPitmonitSouthsmosSurveypoint> ptList, SurProjectPitMonitCfg cfg) {
|
public void addList(List<DevPitmonitSouthsmosSurveypoint> ptList, SurProjectPitMonitCfg cfg) {
|
||||||
ptList.forEach(pt->{
|
ptList.forEach(pt->{
|
||||||
pt.setCfgId(cfg.getId());
|
pt.setCfgId(cfg.getId());
|
||||||
DevPitmonitSouthsmosSurveypoint old=selectDevPitmonitSouthsmosSurveypointBySpId(pt.getSpId());
|
DevPitmonitSouthsmosSurveypoint old=selectDevPitmonitSouthsmosSurveypointBySpId(pt);
|
||||||
if(old==null){
|
if(old==null){
|
||||||
insertDevPitmonitSouthsmosSurveypoint(pt);
|
insertDevPitmonitSouthsmosSurveypoint(pt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,10 @@ public class DevPitmonitSouthsmosThresholdServiceImpl implements IDevPitmonitSou
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdBySrvId(Long id) {
|
public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdBySrvId(DevPitmonitSouthsmosThreshold th) {
|
||||||
DevPitmonitSouthsmosThreshold where=new DevPitmonitSouthsmosThreshold();
|
DevPitmonitSouthsmosThreshold where=new DevPitmonitSouthsmosThreshold();
|
||||||
where.setSrvId(id);
|
where.setSrvId(th.getSrvId());
|
||||||
|
where.setCfgId(th.getCfgId());
|
||||||
List<DevPitmonitSouthsmosThreshold> list=selectDevPitmonitSouthsmosThresholdList(where);
|
List<DevPitmonitSouthsmosThreshold> list=selectDevPitmonitSouthsmosThresholdList(where);
|
||||||
return list.size()==1?list.get(0):null;
|
return list.size()==1?list.get(0):null;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +115,7 @@ public class DevPitmonitSouthsmosThresholdServiceImpl implements IDevPitmonitSou
|
||||||
public void addList(List<DevPitmonitSouthsmosThreshold> thList, SurProjectPitMonitCfg cfg) {
|
public void addList(List<DevPitmonitSouthsmosThreshold> thList, SurProjectPitMonitCfg cfg) {
|
||||||
thList.forEach(th->{
|
thList.forEach(th->{
|
||||||
th.setCfgId(cfg.getId());
|
th.setCfgId(cfg.getId());
|
||||||
DevPitmonitSouthsmosThreshold old=selectDevPitmonitSouthsmosThresholdBySrvId(th.getSrvId());
|
DevPitmonitSouthsmosThreshold old=selectDevPitmonitSouthsmosThresholdBySrvId(th);
|
||||||
if(old==null){
|
if(old==null){
|
||||||
insertDevPitmonitSouthsmosThreshold(th);
|
insertDevPitmonitSouthsmosThreshold(th);
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,13 +161,13 @@ public class PitmonitSouthsmosTask {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
String identifier="JHXC";
|
String identifier="SXYZ";
|
||||||
String credential="Admin123456!";
|
String credential="Admin123!";
|
||||||
String orgId="1687";
|
String orgId="5131";
|
||||||
String token=getToken(identifier,credential);
|
String token=getToken(identifier,credential);
|
||||||
//4.获取监测项列表
|
//4.获取监测项列表
|
||||||
//List<DevPitmonitSouthsmosElement> list=getMonitorElement(token,orgId);
|
List<DevPitmonitSouthsmosElement> list=getMonitorElement(token,orgId);
|
||||||
//System.out.println(list);
|
System.out.println(list);
|
||||||
//5.获取测点列表
|
//5.获取测点列表
|
||||||
//List<DevPitmonitSouthsmosSurveypoint> spList=getSurveyPoint(token,orgId);
|
//List<DevPitmonitSouthsmosSurveypoint> spList=getSurveyPoint(token,orgId);
|
||||||
//System.out.println(spList);
|
//System.out.println(spList);
|
||||||
|
@ -179,8 +179,8 @@ public class PitmonitSouthsmosTask {
|
||||||
//List<DevPitmonitSouthsmosThreshold> thList=getThreshold("53245",token);
|
//List<DevPitmonitSouthsmosThreshold> thList=getThreshold("53245",token);
|
||||||
//System.out.println(thList);
|
//System.out.println(thList);
|
||||||
//8.获取报警信息
|
//8.获取报警信息
|
||||||
List<DevPitmonitSouthsmosAlarm> alarmList=getAlarm(orgId,token,DateUtil.parse("2024-12-31"));
|
//List<DevPitmonitSouthsmosAlarm> alarmList=getAlarm(orgId,token,DateUtil.parse("2024-12-31"));
|
||||||
System.out.println(alarmList);
|
//System.out.println(alarmList);
|
||||||
//9.获取设备
|
//9.获取设备
|
||||||
//List<DevPitmonitSouthsmosDevice> devList=getDevices(token,orgId);
|
//List<DevPitmonitSouthsmosDevice> devList=getDevices(token,orgId);
|
||||||
//System.out.println(devList);
|
//System.out.println(devList);
|
||||||
|
|
Loading…
Reference in New Issue