该死的空订单哇
This commit is contained in:
parent
0ac70127bf
commit
4f81f34d59
@ -127,21 +127,21 @@ public class ChargeOrderInfo {
|
||||
xhpcHistoryOrder.getXhpcStatisticsTimeIntervalList();
|
||||
this.sumPeriod = xhpcStatisticsTimeIntervalList == null ? 0 : xhpcStatisticsTimeIntervalList.size();
|
||||
this.chargeDetails = translate(xhpcStatisticsTimeIntervalList);
|
||||
Date starttime = xhpcHistoryOrder.getStartTime();
|
||||
Date endtime = xhpcHistoryOrder.getEndTime();
|
||||
int cl = 0;
|
||||
if (starttime != null && endtime != null) {
|
||||
cl = Math.toIntExact((endtime.getTime() - starttime.getTime()) / 1000);
|
||||
}
|
||||
String starttimestr = DateUtil.date2StringDt(starttime);
|
||||
String endtimestr = DateUtil.date2StringDt(endtime);
|
||||
if (cl < 0) {
|
||||
String tmp = endtimestr;
|
||||
endtimestr = starttimestr;
|
||||
starttimestr = tmp;
|
||||
}
|
||||
this.startTime = starttimestr;
|
||||
this.endTime = endtimestr;
|
||||
// Date starttime = xhpcHistoryOrder.getStartTime();
|
||||
// Date endtime = xhpcHistoryOrder.getEndTime();
|
||||
// int cl = 0;
|
||||
// if (starttime != null && endtime != null) {
|
||||
// cl = Math.toIntExact((endtime.getTime() - starttime.getTime()) / 1000);
|
||||
// }
|
||||
// String starttimestr = DateUtil.date2StringDt(starttime);
|
||||
// String endtimestr = DateUtil.date2StringDt(endtime);
|
||||
// if (cl < 0) {
|
||||
// String tmp = endtimestr;
|
||||
// endtimestr = starttimestr;
|
||||
// starttimestr = tmp;
|
||||
// }
|
||||
// this.startTime = starttimestr;
|
||||
// this.endTime = endtimestr; //fuck it!!
|
||||
}
|
||||
|
||||
private ChargeDetails[] translate(List<XhpcStatisticsTimeInterval> xhpcStatisticsTimeIntervalList) {
|
||||
|
||||
@ -40,7 +40,7 @@ public class NotificationStartChargeResultTask extends CoreDispatcher {
|
||||
Collection<String> pushOrderKeys = REDIS.keys("pushOrder:*");
|
||||
for (String pushOrderKey : pushOrderKeys) {
|
||||
Map<String, Object> pushOrder = REDIS.getCacheMap(pushOrderKey);
|
||||
if ((Integer) pushOrder.get("startChargeSeqStat") > 1) {
|
||||
if (pushOrder.get("startChargeSeqStat") != null && (Integer) pushOrder.get("startChargeSeqStat") > 1) {
|
||||
Integer startChargeNotificationStat = (Integer) pushOrder.get("startChargeNotificationStat");
|
||||
if (null != startChargeNotificationStat && 1 != startChargeNotificationStat && startChargeNotificationStat <= 20) {
|
||||
String startChargeSeq = (String) pushOrder.get("internetSerialNumber");
|
||||
|
||||
@ -53,7 +53,9 @@ public class NotificationStopChargeResultTask extends CoreDispatcher {
|
||||
String orderkey = "order:".concat(orderNo);
|
||||
CacheOrderData orderData = REDIS.getCacheMapValue(orderkey, "orderData");
|
||||
Map<String, Object> pushOrder = REDIS.getCacheMap(pushOrderKey);
|
||||
if (orderData != null || (Integer) pushOrder.get("startChargeSeqStat") > 3) {
|
||||
if (orderData != null || (pushOrder != null &&
|
||||
pushOrder.get("startChargeSeqStat") != null &&
|
||||
(Integer) pushOrder.get("startChargeSeqStat") > 3)) {
|
||||
Boolean isStopNotified = (Boolean) pushOrder.get("isStopNotified");
|
||||
if (isStopNotified == null || !isStopNotified) {
|
||||
String internetSerialNumber = (String) pushOrder.get("internetSerialNumber");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user