Browse Source

去除test方法

Levi.u 4 năm trước cách đây
mục cha
commit
8694fc7c53

+ 0 - 17
src/main/java/com/ebei/screen/common/util/EbaUtils.java

@@ -1,7 +1,6 @@
 package com.ebei.screen.common.util;
 
 import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.date.LocalDateTimeUtil;
 import cn.hutool.core.map.MapUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
@@ -11,9 +10,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.stereotype.Component;
 
 import java.text.NumberFormat;
-import java.time.LocalDate;
 import java.time.LocalDateTime;
-import java.time.temporal.TemporalAdjusters;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -167,18 +164,4 @@ public class EbaUtils {
         float result = (nowF - oldF) / oldF;
         return format.format(result);
     }
-
-    public static void main(String[] args) {
-        LocalDateTime now = LocalDateTime.now();
-        LocalDate localDate = LocalDateTimeUtil.parseDate("2021-02-01");
-        int year = now.getYear();
-        int month = now.getMonthValue();
-        int day = now.getDayOfMonth();
-        int hour = now.getHour();
-        int minute = now.getMinute();
-        Integer first = localDate.with(TemporalAdjusters.firstDayOfMonth()).getDayOfMonth();
-        Integer last = localDate.with(TemporalAdjusters.lastDayOfMonth()).getDayOfMonth();
-        int i = 26 / 10;
-        System.out.println(hour);
-    }
 }

+ 0 - 27
src/main/java/com/ebei/screen/controller/eba/EbaSystemController.java

@@ -1,13 +1,10 @@
 package com.ebei.screen.controller.eba;
 
-import com.alibaba.fastjson.JSONObject;
 import com.ebei.screen.common.response.ResponseBean;
-import com.ebei.screen.common.util.EbaUtils;
 import com.ebei.screen.service.EbaSystemService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.PostConstruct;
@@ -25,30 +22,6 @@ public class EbaSystemController {
     @Autowired
     private EbaSystemService ebaSystemService;
 
-    @Autowired
-    private MongoTemplate mongoTemplate;
-
-    @PostMapping("test")
-    public String test() {
-        //EbaUtils.insertMobjectList();
-        JSONObject map1 = EbaUtils.deviceSystem;
-        JSONObject map2 = EbaUtils.deviceType;
-        JSONObject map3 = EbaUtils.deviceParam;
-        JSONObject map4 = EbaUtils.deviceAlarmType;
-        JSONObject map5 = EbaUtils.fireDeviceType;
-        JSONObject xx1 = map1.getJSONObject("4");
-        JSONObject xx2 = map2.getJSONObject("100");
-        JSONObject xx3 = map3.getJSONObject("5");
-        JSONObject xx4 = map4.getJSONObject("4");
-        JSONObject xx5 = map5.getJSONObject("4");
-        System.out.println(xx1);
-        System.out.println(xx2);
-        System.out.println(xx3);
-        System.out.println(xx4);
-        System.out.println(xx5);
-        return "success";
-    }
-
     /**
      * 初始化数据
      */