mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-19 22:59:46 +08:00
时段耗电量为null, 则设置为0
This commit is contained in:
@@ -3555,7 +3555,26 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OrderDetail getOrderDetailByOrderCode(String orderCode) {
|
public OrderDetail getOrderDetailByOrderCode(String orderCode) {
|
||||||
return orderBasicInfoMapper.getOrderDetailByOrderCode(orderCode);
|
OrderDetail orderDetail = orderBasicInfoMapper.getOrderDetailByOrderCode(orderCode);
|
||||||
|
if (orderDetail != null) {
|
||||||
|
// 如果尖时段耗电量为null, 则设置为0
|
||||||
|
if (orderDetail.getSharpUsedElectricity() == null) {
|
||||||
|
orderDetail.setSharpUsedElectricity(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
// 如果峰时段耗电量为null, 则设置为0
|
||||||
|
if (orderDetail.getPeakUsedElectricity() == null) {
|
||||||
|
orderDetail.setPeakUsedElectricity(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
// 如果谷时段耗电量为null, 则设置为0
|
||||||
|
if (orderDetail.getValleyUsedElectricity() == null) {
|
||||||
|
orderDetail.setValleyUsedElectricity(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
// 如果平时段耗电量为null, 则设置为0
|
||||||
|
if (orderDetail.getFlatUsedElectricity() == null) {
|
||||||
|
orderDetail.setFlatUsedElectricity(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return orderDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user