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 53c4f213..fec783a7 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 @@ -1439,8 +1439,11 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati List> map =new ArrayList<>(); if(tenantId !=null && !"".equals(tenantId)){ if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){ - //运维管理人员 + //12 版本号问题 13 校时校价问题 14 费率问题 15 离线问题 16 故障问题 17 未知问题 map = xhpcStatisticsServiceMapper.getWorkOrderNumber(3,logUserId,tenantId); + if(map ==null){ + map =getWorkOrderStatus(); + } //异常订单统计 map.add(xhpcStatisticsServiceMapper.getChargeOrderStatusNumber(3,logUserId,tenantId)); //退款订单统计 @@ -1451,6 +1454,9 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati if ("01".equals(sysUser.getUserType())) { //运营商看自己的场站 map = xhpcStatisticsServiceMapper.getWorkOrderNumber(1,logOperatorId,tenantId); + if(map.size()==0){ + map =getWorkOrderStatus(); + } //异常订单统计 map.add(xhpcStatisticsServiceMapper.getChargeOrderStatusNumber(1,logOperatorId,tenantId)); //退款订单统计 @@ -1458,6 +1464,9 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati }else{ //查询赋值的场站 map = xhpcStatisticsServiceMapper.getWorkOrderNumber(2,logUserId,tenantId); + if(map.size()==0){ + map =getWorkOrderStatus(); + } //异常订单统计 map.add(xhpcStatisticsServiceMapper.getChargeOrderStatusNumber(2,logUserId,tenantId)); //退款订单统计 @@ -1466,6 +1475,9 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati }else{ //全部桩 map = xhpcStatisticsServiceMapper.getWorkOrderNumber(0,null,tenantId); + if(map.size()==0){ + map =getWorkOrderStatus(); + } //异常订单统计 map.add(xhpcStatisticsServiceMapper.getChargeOrderStatusNumber(0,null,tenantId)); //退款订单统计 @@ -1792,6 +1804,51 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati return c; } + public List> getWorkOrderStatus(){ + List> map =new ArrayList<>(); + Map mapStatus = new HashMap<>(); + mapStatus.put("type",12); + mapStatus.put("name","版本号问题"); + mapStatus.put("number",0); + + Map mapStatus1 = new HashMap<>(); + mapStatus1.put("type",12); + mapStatus1.put("name","版本号问题"); + mapStatus1.put("number",0); + + Map mapStatus2 = new HashMap<>(); + mapStatus2.put("type",12); + mapStatus2.put("name","版本号问题"); + mapStatus2.put("number",0); + + Map mapStatus3 = new HashMap<>(); + mapStatus3.put("type",12); + mapStatus3.put("name","版本号问题"); + mapStatus3.put("number",0); + + Map mapStatus4 = new HashMap<>(); + mapStatus4.put("type",12); + mapStatus4.put("name","版本号问题"); + mapStatus4.put("number",0); + + Map mapStatus5 = new HashMap<>(); + mapStatus5.put("type",12); + mapStatus5.put("name","版本号问题"); + mapStatus5.put("number",0); + + map.add(mapStatus); + map.add(mapStatus1); + map.add(mapStatus2); + map.add(mapStatus3); + map.add(mapStatus4); + map.add(mapStatus5); + return map; + } + + + + + public static void main(String[] args) { Date date = new Date(); Date beginOfDay = DateUtil.beginOfDay(date); diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index b0efe675..9d457ba9 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -1700,10 +1700,10 @@ concat('异常订单问题') name from xhpc_charge_order where status =2 - and station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId}) + and charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId}) - and station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) + and charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) and find_in_set (station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId}))