浏览代码

生成模块

523096025 2 年之前
父节点
当前提交
0604d25539

+ 3 - 0
huimv-admin/src/main/java/com/huimv/admin/entity/CameraFunctionArea.java

@@ -40,8 +40,11 @@ public class CameraFunctionArea implements Serializable {
     private Integer farmId;
 
     private String functionIds;
+
     private Integer functionType;
+
     private String camearIds;
+
     private String parentId;
 
 

+ 1 - 1
huimv-admin/src/main/java/com/huimv/admin/service/impl/CameraFunctionAreaServiceImpl.java

@@ -44,7 +44,7 @@ public class CameraFunctionAreaServiceImpl extends ServiceImpl<CameraFunctionAre
         String farmId = (String) params.get("farmId");
         QueryWrapper<CameraFunctionArea> wrapper = new QueryWrapper<>();
         wrapper.eq("farm_id",farmId);
-        wrapper.like("function_name",functionaName);
+        wrapper.like(StringUtils.isNotBlank(functionaName),"function_name",functionaName);
         List<CameraFunctionArea> list = this.list(wrapper);
         //将结果List改为树
         List<TreeCameraFuntionArea> treeBasePigpens = parseBizBaseArea(list);

+ 17 - 0
huimv-admin/src/main/java/com/huimv/admin/timer/EnergyTimer.java

@@ -0,0 +1,17 @@
+package com.huimv.admin.timer;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+@Configuration
+@EnableScheduling
+public class EnergyTimer {
+
+
+//    能耗数据
+    @Scheduled(cron = "0 0/11 * * * ? ")
+    private void getShenChan() throws Exception {
+
+    }
+}

+ 18 - 0
huimv-admin/src/main/java/com/huimv/admin/timer/GasTimer.java

@@ -0,0 +1,18 @@
+package com.huimv.admin.timer;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+@Configuration
+@EnableScheduling
+public class GasTimer {
+//    @Autowired
+//    private Gas
+    @Scheduled(cron = "0 0 * * * ? ")
+    private void getShenChan() throws Exception {
+
+    }
+}

+ 16 - 0
huimv-admin/src/main/java/com/huimv/admin/timer/ProdTimer.java

@@ -0,0 +1,16 @@
+package com.huimv.admin.timer;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+@Configuration
+@EnableScheduling
+public class ProdTimer {
+
+    //    环保数据
+    @Scheduled(cron = "0 0/11 * * * ? ")
+    private void getShenChan() throws Exception {
+
+    }
+}

+ 12 - 4
huimv-admin/src/main/java/com/huimv/admin/timer/ShenChanTimer.java

@@ -40,6 +40,7 @@ import java.util.Map;
 @EnableScheduling
 public class ShenChanTimer {
 
+    //生产数据
     @Autowired
     private RestTemplate restTemplate;
     //环控数据
@@ -49,10 +50,17 @@ public class ShenChanTimer {
     private static final String BASE_URL ="test.htpig.cn";
 
 
-//    @Scheduled(cron = "0 0/11 * * * ? ")
-//    private void getShenChan() throws Exception {
-//
-//    }
+    @Scheduled(cron = "0 0/11 * * * ? ")
+    private void getShenChan() throws Exception {
+        //自己生成
+//        if (false){
+
+
+//        }else {
+            //没接口,暂时没有
+//        }
+
+    }
 
     private String loginOnly() throws Exception {
         Map<String, Object> map = new HashMap<String, Object>();