更新获取历史订单详情抛出异常需要返回错误信息
This commit is contained in:
parent
c8b3a6944e
commit
318ebf37b0
@ -182,9 +182,8 @@ public class XhpcHistoryOrderServiceImpl implements IXhpcHistoryOrderService {
|
|||||||
}
|
}
|
||||||
return AjaxResult.success(byId);
|
return AjaxResult.success(byId);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
return AjaxResult.error(e.getMessage());
|
||||||
}
|
}
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -239,13 +238,13 @@ public class XhpcHistoryOrderServiceImpl implements IXhpcHistoryOrderService {
|
|||||||
}
|
}
|
||||||
xhpcChargeOrder.setEndSoc(cacheRealtimeData.getSoc() + "");
|
xhpcChargeOrder.setEndSoc(cacheRealtimeData.getSoc() + "");
|
||||||
//充电时长
|
//充电时长
|
||||||
Long tiem = Long.valueOf(cacheRealtimeData.getChargingTime() / 1000);
|
long time = (long) (cacheRealtimeData.getChargingTime() / 1000);
|
||||||
if (tiem > 3600) {
|
if (time > 3600) {
|
||||||
long hours = tiem / 3600;
|
long hours = time / 3600;
|
||||||
double mins = (double) ((tiem - (hours * 3600)) / 60);
|
double mins = (double) ((time - (hours * 3600)) / 60);
|
||||||
xhpcChargeOrder.setChargingTime(hours + "时" + new BigDecimal(mins).setScale(0) + "分");
|
xhpcChargeOrder.setChargingTime(hours + "时" + new BigDecimal(mins).setScale(0) + "分");
|
||||||
} else {
|
} else {
|
||||||
double mins = (double) (tiem / 60);
|
double mins = (double) (time / 60);
|
||||||
xhpcChargeOrder.setChargingTime(new BigDecimal(mins).setScale(0) + "分");
|
xhpcChargeOrder.setChargingTime(new BigDecimal(mins).setScale(0) + "分");
|
||||||
}
|
}
|
||||||
BigDecimal decimal = new BigDecimal(10000);
|
BigDecimal decimal = new BigDecimal(10000);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user