diff --git a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcRateTimeMapper.xml b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcRateTimeMapper.xml index 3d303b19..5dfd628d 100644 --- a/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcRateTimeMapper.xml +++ b/xhpc-modules/xhpc-card/src/main/resources/mapper/XhpcRateTimeMapper.xml @@ -55,6 +55,7 @@ ELSE "C端用户" END userType + from xhpc_charge_order co left join xhpc_internet_user as inu on inu.internet_user_id = co.user_id and co.source =1 left join xhpc_app_user as apu on apu.app_user_id = co.user_id and co.source =0 left join xhpc_community_personnel as cop on cop.community_personnel_id = co.user_id and co.source =2 diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java index ad445cef..27f59645 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java @@ -927,13 +927,18 @@ public class XhpcHistoryOrderController extends BaseController { public void getInvoiceInfo(){ logger.info("++++++++++++每1分钟,扫描一次,异常订单,自动生成工单++++++++++++++++"); try { - int invoiceInfo = chargeOrderService.getChargeOrderStatus(); - if(invoiceInfo>0){ + List> invoiceInfo = chargeOrderService.getChargeOrderStatus(); + if(invoiceInfo !=null && invoiceInfo.size()>0){ Date date = DateUtil.date(); String format = DateUtil.format(date, "yyyy-MM-dd"); R r = workOrderYuService.workOrderMessage(2, format); if(r.getCode()==200){ - workOrderYuService.addNewOrder("2","有异常订单订单待处理","定时任务自动扫描申请异常订单","","","",""); + for (int i = 0; i map = invoiceInfo.get(i); + String stationId = map.get("chargingStationId").toString(); + String serialNumber = map.get("serialNumber").toString().substring(0,16); + workOrderYuService.addNewOrder("2","有异常订单订单待处理","定时任务自动扫描申请异常订单","",stationId,"",serialNumber); + } } } }catch (Exception e){ @@ -1132,4 +1137,14 @@ public class XhpcHistoryOrderController extends BaseController { } } } + + + public static void main(String[] args) { + String tr ="80836000050002012210280905315435"; + String substring = tr.substring(0, 16); + System.out.println("substring:"+substring); + + } + + } diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcChargeOrderMapper.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcChargeOrderMapper.java index 46fa60cf..7f320762 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcChargeOrderMapper.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/mapper/XhpcChargeOrderMapper.java @@ -212,7 +212,7 @@ public interface XhpcChargeOrderMapper { */ List getFourTimsStatus(); - int getChargeOrderStatus(); + List> getChargeOrderStatus(); /** * 查询相同桩之后是否有订单结算 * @param serialNumber 订单号 diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcChargeOrderService.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcChargeOrderService.java index d196961f..209cf650 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcChargeOrderService.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/IXhpcChargeOrderService.java @@ -164,7 +164,7 @@ public interface IXhpcChargeOrderService { * 查询是否有异常订单 * @return */ - int getChargeOrderStatus(); + List> getChargeOrderStatus(); //获取桩信息 Map getXhpcChargingPileById(Long chargingPileId); diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java index ebb48201..23c116ce 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java @@ -723,7 +723,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar * @return */ @Override - public int getChargeOrderStatus() { + public List> getChargeOrderStatus() { return xhpcChargeOrderMapper.getChargeOrderStatus(); } diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java index bad847da..ee8ddb03 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcStatisticsServiceImpl.java @@ -1823,28 +1823,28 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati mapStatus.put("number",0); Map mapStatus1 = new HashMap<>(); - mapStatus1.put("type",12); - mapStatus1.put("name","版本号问题"); + mapStatus1.put("type",13); + mapStatus1.put("name","校时校价问题"); mapStatus1.put("number",0); Map mapStatus2 = new HashMap<>(); - mapStatus2.put("type",12); - mapStatus2.put("name","版本号问题"); + mapStatus2.put("type",14); + mapStatus2.put("name","费率问题"); mapStatus2.put("number",0); Map mapStatus3 = new HashMap<>(); - mapStatus3.put("type",12); - mapStatus3.put("name","版本号问题"); + mapStatus3.put("type",15); + mapStatus3.put("name","离线问题"); mapStatus3.put("number",0); Map mapStatus4 = new HashMap<>(); - mapStatus4.put("type",12); - mapStatus4.put("name","版本号问题"); + mapStatus4.put("type",16); + mapStatus4.put("name","故障问题"); mapStatus4.put("number",0); Map mapStatus5 = new HashMap<>(); - mapStatus5.put("type",12); - mapStatus5.put("name","版本号问题"); + mapStatus5.put("type",17); + mapStatus5.put("name","未知问题"); mapStatus5.put("number",0); map.add(mapStatus); diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml index 6d94acd7..56df0ae6 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcChargeOrderMapper.xml @@ -719,8 +719,8 @@ select * from xhpc_charge_order where now() >DATE_ADD(create_time,interval 4 hour) and status=0 - + select charging_station_id chargingStationId,serial_number serialNumber from xhpc_charge_order where status =2