|
@@ -25,6 +25,7 @@ import java.io.StringWriter;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.DecimalFormat;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
@@ -474,8 +475,17 @@ public class E63UploadFileService extends BaseUploadFileService {
|
|
|
boolean isUseRedis = false;
|
|
|
if (!qxzMap.isEmpty()) {
|
|
|
String time = qxzMap.get("time");
|
|
|
+ long timestamp = new Date().getTime();
|
|
|
+ SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ try{
|
|
|
+ Date d = sf.parse(time);// 日期转换为时间戳
|
|
|
+ timestamp = d.getTime();
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("日期转换异常");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
if (StrUtil.isNotBlank(time)) {
|
|
|
- if (Long.parseLong(time) >= startTime && Long.parseLong(time) <= endTime) {
|
|
|
+ if (timestamp >= startTime && timestamp <= endTime) {
|
|
|
// 从缓存里赋值
|
|
|
globalR = qxzMap.get("globalR") == null ? qxzRandomCreate("globalR") : new BigDecimal(qxzMap.get("globalR"));
|
|
|
directR = qxzMap.get("directR") == null ? qxzRandomCreate("directR") : new BigDecimal(qxzMap.get("directR"));
|
|
@@ -597,8 +607,17 @@ public class E63UploadFileService extends BaseUploadFileService {
|
|
|
boolean isUseRedis = false;
|
|
|
if (!cftMap.isEmpty()) {
|
|
|
String time = cftMap.get("time");
|
|
|
+ long timestamp = new Date().getTime();
|
|
|
+ SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ try{
|
|
|
+ Date d = sf.parse(time);// 日期转换为时间戳
|
|
|
+ timestamp = d.getTime();
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("日期转换异常");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
if (StrUtil.isNotBlank(time)) {
|
|
|
- if (Long.parseLong(time) >= startTime && Long.parseLong(time) <= endTime) {
|
|
|
+ if (timestamp>= startTime && timestamp <= endTime) {
|
|
|
// 从缓存里赋值
|
|
|
ws10 = cftMap.get("wsInst10") == null ? new BigDecimal("-99") : new BigDecimal(cftMap.get("wsInst10"));
|
|
|
wd10 = cftMap.get("wdInst10") == null ? new BigDecimal("-99") : new BigDecimal(cftMap.get("wdInst10"));
|
|
@@ -927,8 +946,17 @@ public class E63UploadFileService extends BaseUploadFileService {
|
|
|
boolean isUseRedis = false;
|
|
|
if (!fjMap.isEmpty()) {
|
|
|
String time = fjMap.get("time");
|
|
|
+ long timestamp = new Date().getTime();
|
|
|
+ SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ try{
|
|
|
+ Date d = sf.parse(time);// 日期转换为时间戳
|
|
|
+ timestamp = d.getTime();
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("日期转换异常");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
if (StrUtil.isNotBlank(time)) {
|
|
|
- if (Long.parseLong(time) >= startTime && Long.parseLong(time) <= endTime) {
|
|
|
+ if (timestamp >= startTime && timestamp <= endTime) {
|
|
|
if (fjMap.get("status") != null) {
|
|
|
status = fjMap.get("status");
|
|
|
}
|
|
@@ -1106,10 +1134,21 @@ public class E63UploadFileService extends BaseUploadFileService {
|
|
|
// 累积发电量
|
|
|
BigDecimal cumulativeGeneratedEnergy = new BigDecimal("0");
|
|
|
boolean isUseRedis = false;
|
|
|
+
|
|
|
if (!nbqMap.isEmpty()) {
|
|
|
String time = nbqMap.get("time");
|
|
|
+ long timestamp = new Date().getTime();
|
|
|
+ SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ try{
|
|
|
+ Date d = sf.parse(time);// 日期转换为时间戳
|
|
|
+ timestamp = d.getTime();
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("日期转换异常");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
if (StrUtil.isNotBlank(time)) {
|
|
|
- if (Long.parseLong(time) >= startTime && Long.parseLong(time) <= endTime) {
|
|
|
+ if (timestamp >= startTime && timestamp <= endTime) {
|
|
|
if (nbqMap.get("status") != null) {
|
|
|
status = nbqMap.get("status");
|
|
|
}
|