Browse Source

经济运行弹窗时间转换修改

wangb@gyee-china.com 1 year atrás
parent
commit
50de5f3516

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -390,8 +390,8 @@ public class WindturbinegoodnessService {
         ProBasicEquipmentPoint glAi = wtpointmap.get(ContantXk.CJ_SSGL);
         ProBasicEquipmentPoint fjztAi = wtpointmap.get(ContantXk.SBZT);
 
-        Date begindate = DateUtils.parseDate(begin);
-        Date enddate = DateUtils.parseDate(end);
+        Date begindate = DateUtils.parseDate5(begin);
+        Date enddate = DateUtils.parseDate5(end);
         Map<String, String> tempmap = new HashMap<String, String>();
 
         // 发电量

+ 12 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/util/DateUtils.java

@@ -488,6 +488,18 @@ public class DateUtils {
         return null;
     }
 
+    public static Date parseDate5(String date) {
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+        try {
+            Date parsedDate = format.parse(date);
+            return parsedDate;
+            // 对解析后的日期对象进行后续操作
+        } catch (ParseException e) {
+            e.printStackTrace();
+            // 处理解析异常
+        }
+        return  null;
+    }
     public static Date parseDate2(String date) {
         try {
             return getFormat2().parse(date);