diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosDeviceService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosDeviceService.java index c79790a9..6729d236 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosDeviceService.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosDeviceService.java @@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosDeviceService * @return 基坑监测-南方测绘-设备 */ public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceById(Long id); - public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceByDevId(Long devId); + public DevPitmonitSouthsmosDevice selectDevPitmonitSouthsmosDeviceByDevId(DevPitmonitSouthsmosDevice dev); /** * 查询基坑监测-南方测绘-设备列表 * diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosElementService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosElementService.java index 1fd56839..4e91de8e 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosElementService.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosElementService.java @@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosElementService * @return 基坑监测-南方测绘-监测项 */ public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementById(Long id); - public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementBySrvId(Long id); + public DevPitmonitSouthsmosElement selectDevPitmonitSouthsmosElementBySrvId(DevPitmonitSouthsmosElement el); /** * 查询基坑监测-南方测绘-监测项列表 * diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosSurveypointService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosSurveypointService.java index 14a2277f..5a4ffd2c 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosSurveypointService.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosSurveypointService.java @@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosSurveypointService * @return 基坑监测-南方测绘-测点 */ public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointById(Long id); - public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointBySpId(Long id); + public DevPitmonitSouthsmosSurveypoint selectDevPitmonitSouthsmosSurveypointBySpId(DevPitmonitSouthsmosSurveypoint pt); /** * 查询基坑监测-南方测绘-测点列表 * diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosThresholdService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosThresholdService.java index aa8057e3..0881c24f 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosThresholdService.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/IDevPitmonitSouthsmosThresholdService.java @@ -19,7 +19,7 @@ public interface IDevPitmonitSouthsmosThresholdService * @return 报警阈值 */ public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdById(Long id); - public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdBySrvId(Long id); + public DevPitmonitSouthsmosThreshold selectDevPitmonitSouthsmosThresholdBySrvId(DevPitmonitSouthsmosThreshold th); /** * 查询报警阈值列表 * diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosDeviceServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosDeviceServiceImpl.java index d94dd9e0..f7280b4d 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosDeviceServiceImpl.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosDeviceServiceImpl.java @@ -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 list=selectDevPitmonitSouthsmosDeviceList(where); return list.size()>0?list.get(0):null; } @@ -117,7 +118,7 @@ public class DevPitmonitSouthsmosDeviceServiceImpl implements IDevPitmonitSouths public void addList(List items, SurProjectPitMonitCfg cfg) { items.forEach(it->{ it.setCfgId(cfg.getId()); - DevPitmonitSouthsmosDevice old= selectDevPitmonitSouthsmosDeviceByDevId(it.getDevId()); + DevPitmonitSouthsmosDevice old= selectDevPitmonitSouthsmosDeviceByDevId(it); if(old==null) { insertDevPitmonitSouthsmosDevice(it); } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosElementServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosElementServiceImpl.java index cef2ac1d..8f800443 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosElementServiceImpl.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosElementServiceImpl.java @@ -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 list=selectDevPitmonitSouthsmosElementList(where); return list.size()==1?list.get(0): null; } @@ -117,7 +118,7 @@ public class DevPitmonitSouthsmosElementServiceImpl implements IDevPitmonitSouth public void addList(List elList, SurProjectPitMonitCfg cfg) { elList.forEach(el->{ el.setCfgId(cfg.getId()); - DevPitmonitSouthsmosElement old=selectDevPitmonitSouthsmosElementBySrvId(el.getSrvId()); + DevPitmonitSouthsmosElement old=selectDevPitmonitSouthsmosElementBySrvId(el); if(old==null){ insertDevPitmonitSouthsmosElement(el); } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosSurveypointServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosSurveypointServiceImpl.java index b0927766..a964b8d4 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosSurveypointServiceImpl.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosSurveypointServiceImpl.java @@ -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 list=selectDevPitmonitSouthsmosSurveypointList(where); return list.size()==1?list.get(0): null; } @@ -114,7 +115,7 @@ public class DevPitmonitSouthsmosSurveypointServiceImpl implements IDevPitmonitS public void addList(List ptList, SurProjectPitMonitCfg cfg) { ptList.forEach(pt->{ pt.setCfgId(cfg.getId()); - DevPitmonitSouthsmosSurveypoint old=selectDevPitmonitSouthsmosSurveypointBySpId(pt.getSpId()); + DevPitmonitSouthsmosSurveypoint old=selectDevPitmonitSouthsmosSurveypointBySpId(pt); if(old==null){ insertDevPitmonitSouthsmosSurveypoint(pt); } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosThresholdServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosThresholdServiceImpl.java index e0d97e7a..b296e81e 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosThresholdServiceImpl.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/DevPitmonitSouthsmosThresholdServiceImpl.java @@ -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 list=selectDevPitmonitSouthsmosThresholdList(where); return list.size()==1?list.get(0):null; } @@ -114,7 +115,7 @@ public class DevPitmonitSouthsmosThresholdServiceImpl implements IDevPitmonitSou public void addList(List thList, SurProjectPitMonitCfg cfg) { thList.forEach(th->{ th.setCfgId(cfg.getId()); - DevPitmonitSouthsmosThreshold old=selectDevPitmonitSouthsmosThresholdBySrvId(th.getSrvId()); + DevPitmonitSouthsmosThreshold old=selectDevPitmonitSouthsmosThresholdBySrvId(th); if(old==null){ insertDevPitmonitSouthsmosThreshold(th); } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/PitmonitSouthsmosTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/PitmonitSouthsmosTask.java index 4e980863..b5688e0d 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/PitmonitSouthsmosTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/PitmonitSouthsmosTask.java @@ -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 list=getMonitorElement(token,orgId); - //System.out.println(list); + List list=getMonitorElement(token,orgId); + System.out.println(list); //5.获取测点列表 //List spList=getSurveyPoint(token,orgId); //System.out.println(spList); @@ -179,8 +179,8 @@ public class PitmonitSouthsmosTask { //List thList=getThreshold("53245",token); //System.out.println(thList); //8.获取报警信息 - List alarmList=getAlarm(orgId,token,DateUtil.parse("2024-12-31")); - System.out.println(alarmList); + //List alarmList=getAlarm(orgId,token,DateUtil.parse("2024-12-31")); + //System.out.println(alarmList); //9.获取设备 //List devList=getDevices(token,orgId); //System.out.println(devList);