From 2a1438ada81f94de8ab85c3e711cbc3659a2a89a Mon Sep 17 00:00:00 2001 From: panshuling321 Date: Sat, 8 Oct 2022 09:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=B9=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E9=9D=9E=E7=A9=BA=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/activity/service/impl/WorkOrderServiceImpl.java | 8 ++++---- .../main/java/com/xhpc/pp/logic/RealtimeDataLogic.java | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java index 25342e6c..2366284c 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/WorkOrderServiceImpl.java @@ -91,7 +91,7 @@ public class WorkOrderServiceImpl implements WorkOrderService { orderMapper.insertSelective(domain); // 上传文件 - if(!domain.getQuestionImgList().isEmpty()){ + if(domain.getQuestionImgList() != null && !domain.getQuestionImgList().isEmpty()){ for(XhpcWorkOrderImageDomain imageDomain : domain.getQuestionImgList()){ imageDomain.setOrderId(domain.getWorkOrderId()); imageDomain.setType(Short.valueOf("1")); @@ -101,7 +101,7 @@ public class WorkOrderServiceImpl implements WorkOrderService { } // 绑定人员 - if(!domain.getUserList().isEmpty()){ + if(domain.getUserList() != null && !domain.getUserList().isEmpty()){ List orderUserDomainList = new ArrayList<>(); StringBuilder userIdList = new StringBuilder(); for (XhpcWorkUserDomain userDomain: domain.getUserList()){ @@ -127,7 +127,7 @@ public class WorkOrderServiceImpl implements WorkOrderService { List imageIds = imageMapper.selectImageIdByOrderIdAndType(domain.getWorkOrderId(), 1); - if(!domain.getQuestionImgList().isEmpty()){ + if(domain.getQuestionImgList() != null && !domain.getQuestionImgList().isEmpty()){ for (XhpcWorkOrderImageDomain imageDomain: domain.getQuestionImgList()){ if( imageDomain.getOrderImageId() == null || StringUtils.isEmpty(imageDomain.getOrderImageId().toString())){ imageDomain.setOrderId(domain.getWorkOrderId()); @@ -145,7 +145,7 @@ public class WorkOrderServiceImpl implements WorkOrderService { } } - if(!domain.getUserList().isEmpty()){ + if(domain.getUserList() != null && !domain.getUserList().isEmpty()){ // 更新处理人 StringBuilder userIdList = new StringBuilder(); orderMapper.deleteOrderUserByOrderId(domain.getWorkOrderId()); diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java index 5d55c1df..9d9c222d 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java @@ -148,7 +148,7 @@ public class RealtimeDataLogic implements ServiceLogic { cacheOrder.put("totalMoney", cacheRealtimeData.getAmountCharged() / 10000.0); cacheOrder.put("realtimeDataList", realtimeDataList); R r1 = pileOrderService.pileRimeOrder(orderNo); - if (r1 == null || (r1.getMsg()!=null && r1.getMsg().contains("无效订单")) || r1.getCode() >=500) { + if (r1 == null || (r1.getMsg()!=null && r1.getMsg().contains("无效订单")) || (r1.getCode() >=500 && r1.getCode() != 3886)) { chargingController.stopInvalidOrder(orderNo); } else { Integer vul = (Integer) cachePile.get("voltageUpperLimits"); @@ -177,6 +177,13 @@ public class RealtimeDataLogic implements ServiceLogic { } } } + Integer chargingDegree = cacheRealtimeData.getChargingDegree(); + Integer amountCharged =cacheRealtimeData.getAmountCharged(); + if(chargingDegree < 10000 && amountCharged > 200000){ + // 充电度数小于1,并且,充电金额大于10 + R r = chargingController.stopCharging(pileNo, gunId, default_version); + } + if (balance < 50000) { String alerted = (String) cacheOrder.get("lt5alerted"); String tel = (String) cacheOrder.get("tel");