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