Browse Source

获取传感器数据

huangxingxing 8 months ago
parent
commit
ba65f2b192

+ 16 - 0
modelsrc/com/miniframe/model/system/DSensorVal.java

@@ -54,6 +54,8 @@ public class DSensorVal extends MiniserviceBaseModel implements Serializable {
 
 
     private Integer aid;
     private Integer aid;
 
 
+    private Integer jid;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     /**
     /**
@@ -293,4 +295,18 @@ public class DSensorVal extends MiniserviceBaseModel implements Serializable {
     public void setAid(Integer aid) {
     public void setAid(Integer aid) {
         this.aid = aid;
         this.aid = aid;
     }
     }
+
+    /**
+     * @return jid
+     */
+    public Integer getJid() {
+        return jid;
+    }
+
+    /**
+     * @param jid
+     */
+    public void setJid(Integer jid) {
+        this.jid = jid;
+    }
 }
 }

+ 60 - 0
modelsrc/com/miniframe/model/system/DSensorValSQLBuilder.java

@@ -1273,6 +1273,66 @@ public class DSensorValSQLBuilder {
             addCriterion("aid not between", value1, value2, "aid");
             addCriterion("aid not between", value1, value2, "aid");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
+
+        public Criteria andJidIsNull() {
+            addCriterion("jid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidIsNotNull() {
+            addCriterion("jid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidEqualTo(Integer value) {
+            addCriterion("jid =", value, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidNotEqualTo(Integer value) {
+            addCriterion("jid <>", value, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidGreaterThan(Integer value) {
+            addCriterion("jid >", value, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidGreaterThanOrEqualTo(Integer value) {
+            addCriterion("jid >=", value, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidLessThan(Integer value) {
+            addCriterion("jid <", value, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidLessThanOrEqualTo(Integer value) {
+            addCriterion("jid <=", value, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidIn(List<Integer> values) {
+            addCriterion("jid in", values, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidNotIn(List<Integer> values) {
+            addCriterion("jid not in", values, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidBetween(Integer value1, Integer value2) {
+            addCriterion("jid between", value1, value2, "jid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJidNotBetween(Integer value1, Integer value2) {
+            addCriterion("jid not between", value1, value2, "jid");
+            return (Criteria) this;
+        }
     }
     }
 
 
     public static class Criteria extends GeneratedCriteria {
     public static class Criteria extends GeneratedCriteria {

+ 1 - 1
modelsrc/com/miniframe/model/system/dbconfig/MapperConfig-system.xml

@@ -5,7 +5,7 @@
     This file is generated by MyBatis Generator.
     This file is generated by MyBatis Generator.
     This file is the shell of a Mapper Config file - in many cases you will need to add
     This file is the shell of a Mapper Config file - in many cases you will need to add
       to this file before it is usable by MyBatis.
       to this file before it is usable by MyBatis.
-    This file was generated on Mon Dec 23 14:22:25 CST 2024.
+    This file was generated on Fri Dec 27 10:23:01 CST 2024.
   -->
   -->
   <mappers>
   <mappers>
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />

+ 3 - 2
src/main/java/com/miniframe/bisiness/system/D00008Service.java

@@ -88,7 +88,7 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 		LogService.createLog(accident);
 		LogService.createLog(accident);
 		//获取传感器数据
 		//获取传感器数据
 		//TODO:  需要从第三方获取
 		//TODO:  需要从第三方获取
-		initDNodeVal(aid);
+		initDNodeVal(aid,jid);
 
 
 
 
 		TemplateGenerator.createMonitor(aid,jid);//生成监测点文件
 		TemplateGenerator.createMonitor(aid,jid);//生成监测点文件
@@ -251,7 +251,7 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 		accidentDao.updateByPrimaryKey(accident);
 		accidentDao.updateByPrimaryKey(accident);
 	}
 	}
 
 
-	private void initDNodeVal(Integer aid) {
+	private void initDNodeVal(Integer aid,Integer jid) {
 		//TODO
 		//TODO
 		try {
 		try {
 			PtDjCgq cgq= PtdjServer.getCgq();
 			PtDjCgq cgq= PtdjServer.getCgq();
@@ -264,6 +264,7 @@ public class D00008Service extends D00008BaseModel implements ExecProcessFlow {
 					val.setDataTime(r.getData_time());
 					val.setDataTime(r.getData_time());
 					val.setMineCode(r.getMine_code());
 					val.setMineCode(r.getMine_code());
 					val.setAid(aid);
 					val.setAid(aid);
+					val.setJid(jid);
 					val.setPipes(r.getPipes());
 					val.setPipes(r.getPipes());
 					val.setPointCode(r.getPoint_code());
 					val.setPointCode(r.getPoint_code());
 					val.setPointLocation(r.getPoint_location());
 					val.setPointLocation(r.getPoint_location());

+ 2 - 2
src/main/java/com/miniframe/bisiness/system/M00002Service.java

@@ -34,7 +34,7 @@ public class M00002Service extends M00002BaseModel implements ExecProcessFlow {
 		for (String p:persons) {
 		for (String p:persons) {
 			String[] st =p.split(",");
 			String[] st =p.split(",");
 			if(st.length!=3){
 			if(st.length!=3){
-				throw new BusinessException("EB3000002");
+				throw new BusinessException("EMB00003");
 			}
 			}
 		}
 		}
 
 
@@ -42,7 +42,7 @@ public class M00002Service extends M00002BaseModel implements ExecProcessFlow {
 		DAccidentMapper accDao  = UtilTools.getBean(DAccidentMapper.class);
 		DAccidentMapper accDao  = UtilTools.getBean(DAccidentMapper.class);
 		DAccident da =accDao.selectByPrimaryKey(aid);
 		DAccident da =accDao.selectByPrimaryKey(aid);
 		if(da==null){
 		if(da==null){
-			throw new BusinessException("EMB00003");
+			throw new BusinessException("EB3000002");
 		}
 		}
 
 
 		DMwaySQLBuilder wsb =new DMwaySQLBuilder();
 		DMwaySQLBuilder wsb =new DMwaySQLBuilder();