Browse Source

SystemInitServlet默认开启api统计线程;处理工具类找不到的错误

cuixubin 3 years ago
parent
commit
1ce549a090

+ 5 - 5
src/main/java/com/persagy/framework/servlet/SystemInitServlet.java

@@ -65,11 +65,11 @@ public class SystemInitServlet extends HttpServlet {
 			
 			new Thread(new DependAPIStaticThread(dependApiStaticService, "Thread")).start();
 		}else {
-//			RequestIpStatisticThread rist = new RequestIpStatisticThread(coreService);
-//			rist.init();
-//			new Thread(rist).start();
-//			
-//			new Thread(new DependAPIStaticThread(dependApiStaticService, "Business")).start();
+			RequestIpStatisticThread rist = new RequestIpStatisticThread(coreService);
+			rist.init();
+			new Thread(rist).start();
+			
+			new Thread(new DependAPIStaticThread(dependApiStaticService, "Business")).start();
 		}
 		
 		log.info("system init end.");

+ 1 - 1
src/main/java/com/persagy/functions/weather/business/v2021/ComputeSunRiseSet.java

@@ -9,10 +9,10 @@ import java.util.Map;
 import org.springframework.stereotype.Service;
 
 import com.persagy.core.enumeration.SpecialOperator;
-import com.persagy.core.utils.DateUtils;
 import com.persagy.framework.construct.RequestProcessor;
 import com.persagy.framework.dto.DataQueryParam;
 import com.persagy.framework.util.ConfigUtil;
+import com.persagy.framework.util.DateUtils;
 import com.persagy.framework.util.SunComputeUtil;
 import com.persagy.functions.weather.constant.Const;
 import com.persagy.functions.weather.dto.CityDTO;

+ 1 - 1
src/main/java/com/persagy/functions/weather/business/v2021/QueryDisaster.java

@@ -12,11 +12,11 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import com.persagy.core.enumeration.SpecialOperator;
-import com.persagy.core.utils.DateUtils;
 import com.persagy.ems.pojo.wz.DisasterWarning;
 import com.persagy.framework.construct.RequestProcessor;
 import com.persagy.framework.dto.DataQueryParam;
 import com.persagy.framework.util.ConfigUtil;
+import com.persagy.framework.util.DateUtils;
 import com.persagy.functions.weather.constant.Const;
 import com.persagy.functions.weather.service.DisasterWarningService;
 

+ 1 - 1
src/main/java/com/persagy/functions/weather/business/v2021/QueryHistoryDay.java

@@ -11,11 +11,11 @@ import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
 
 import com.persagy.core.enumeration.SpecialOperator;
-import com.persagy.core.utils.DateUtils;
 import com.persagy.ems.pojo.wz.DayHisRecord;
 import com.persagy.framework.construct.RequestProcessor;
 import com.persagy.framework.dto.DataQueryParam;
 import com.persagy.framework.util.ConfigUtil;
+import com.persagy.framework.util.DateUtils;
 import com.persagy.functions.weather.constant.Const;
 import com.persagy.functions.weather.service.DayHisRecordService;
 

+ 1 - 1
src/main/java/com/persagy/functions/weather/business/v2021/QueryStatisticDay.java

@@ -11,12 +11,12 @@ import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
 
 import com.persagy.core.enumeration.SpecialOperator;
-import com.persagy.core.utils.DateUtils;
 import com.persagy.ems.pojo.wz.DayStaticMoreRecord;
 import com.persagy.ems.pojo.wz.DayStaticRecord;
 import com.persagy.framework.construct.RequestProcessor;
 import com.persagy.framework.dto.DataQueryParam;
 import com.persagy.framework.util.ConfigUtil;
+import com.persagy.framework.util.DateUtils;
 import com.persagy.functions.weather.constant.Const;
 import com.persagy.functions.weather.service.DayStaticService;
 

+ 2 - 2
src/main/java/com/persagy/functions/weather/thread/FileDataTransFindNoDataCityThread.java

@@ -8,10 +8,10 @@ import java.util.Set;
 
 import org.apache.log4j.Logger;
 
-import com.persagy.core.utils.FileTools;
 import com.persagy.ems.pojo.wz.HourRecordData;
 import com.persagy.framework.util.ConfigUtil;
 import com.persagy.framework.util.CsvUtil;
+import com.persagy.framework.util.FileUtil;
 import com.persagy.functions.weather.business.v2020.maintain.WRecord;
 import com.persagy.functions.weather.service.HourRecordService;
 
@@ -194,7 +194,7 @@ public class FileDataTransFindNoDataCityThread implements Runnable {
 				}
 				
 				try {
-					FileTools.writeInFile(new File("D:/testdic/fileToDB.txt"), sbFiles.toString(), true);
+					FileUtil.writeInFile(new File("D:/testdic/fileToDB.txt"), sbFiles.toString(), true);
 				} catch (Exception e) {
 					e.printStackTrace();
 				}