diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcWorkHistoryOrderServiceImpl.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcWorkHistoryOrderServiceImpl.java index fda653d8..4bcffe54 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcWorkHistoryOrderServiceImpl.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcWorkHistoryOrderServiceImpl.java @@ -68,13 +68,19 @@ public class XhpcWorkHistoryOrderServiceImpl extends BaseService implements Xhpc Long sysUserId = sysUser.getUserId(); //params.put("tenantId", loginUser.getTenantId()); //桩的统计、该时段金额 - if (UserTypeUtil.USER_ID !=sysUserId) { + if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){ + //运维管理人员 + params.put("status", 3); + params.put("userId",sysUserId); + }else if (UserTypeUtil.USER_ID !=sysUserId) { if (UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())) { Long logOperatorId = sysUser.getOperatorId(); params.put("status", 1); + params.put("userId",logOperatorId); //运营商看自己的场站 } else { params.put("status", 2); + params.put("userId",sysUserId); //查询赋值的场站 } } else { diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkHistoryOrderMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkHistoryOrderMapper.xml index 7c39a2b7..30dfb142 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkHistoryOrderMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcWorkHistoryOrderMapper.xml @@ -171,7 +171,9 @@ and co.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{params.userId}) - + + and find_in_set (ho.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{params.userId})) + and ho.tenant_id=#{params.tenantId} diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcEquipmenMonitorServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcEquipmenMonitorServiceImpl.java index d917cfae..16369797 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcEquipmenMonitorServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcEquipmenMonitorServiceImpl.java @@ -48,6 +48,7 @@ public class XhpcEquipmenMonitorServiceImpl implements IXhpcEquipmenMonitorServi if(tenantId !=null && !"".equals(tenantId)){ if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){ //运维管理人员 + map = xhpcEquipmenMonitorMapper.list(3,logUserId,tenantId,chargingStationId,equipmenName,equipmenNumber); }else{ if(sysUser.getUserId() !=UserTypeUtil.USER_ID){ Long logOperatorId = sysUser.getOperatorId(); diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcEquipmenMonitorMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcEquipmenMonitorMapper.xml index cf4c6dd6..6bc4db45 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcEquipmenMonitorMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcEquipmenMonitorMapper.xml @@ -47,6 +47,9 @@ and xem.charging_station_id in(select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) + + and find_in_set (xem.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId})) + and xem.tenant_id=#{tenantId} 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 4630b9ec..7b4e4581 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 @@ -1261,6 +1261,7 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati if(tenantId !=null && !"".equals(tenantId)){ if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){ //运维管理人员 + map= xhpcStatisticsServiceMapper.getChargingStationEmptyOrder(3,logUserId,tenantId,startTime,endTime); }else{ if(chargingStationId==null){ if(sysUser.getUserId() !=UserTypeUtil.USER_ID){ @@ -1380,6 +1381,11 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati if(tenantId !=null && !"".equals(tenantId)){ if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){ //运维管理人员 + if(type !=null && type==4){ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderListYY(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,3,logUserId,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + }else{ + map= xhpcStatisticsServiceMapper.getWorkHistoryOrderList(operatorId,chargingStationId,chargingPileId,terminalId,stopReason,3,logUserId,tenantId,conditionBeginOfDay,conditionEndOfDay,type); + } }else{ if(sysUser.getUserId() !=UserTypeUtil.USER_ID){ Long logOperatorId = sysUser.getOperatorId(); @@ -1429,6 +1435,11 @@ public class XhpcStatisticsServiceImpl extends BaseService implements IXhpcStati if(tenantId !=null && !"".equals(tenantId)){ if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){ //运维管理人员 + map = xhpcStatisticsServiceMapper.getWorkOrderNumber(3,logUserId,tenantId); + //异常订单统计 + map.add(xhpcStatisticsServiceMapper.getChargeOrderStatusNumber(3,logUserId,tenantId)); + //退款订单统计 + map.add(xhpcStatisticsServiceMapper.getRefundOderStatusNumber(3,logUserId,tenantId)); }else{ if(sysUser.getUserId() !=UserTypeUtil.USER_ID){ Long logOperatorId = sysUser.getOperatorId(); 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 735093ab..f5142056 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -1457,6 +1457,9 @@ and xh.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) + + and find_in_set (xh.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId})) + GROUP BY xh.charging_station_id @@ -1555,7 +1558,9 @@ and xwho.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) - + + and find_in_set (xwho.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId})) + GROUP BY DATE_FORMAT(xwho.end_time, '%Y-%m-%d') order by xwho.end_time @@ -1620,7 +1625,9 @@ and xwho.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) - + + and find_in_set (xwho.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId})) + GROUP BY date_format(xwho.end_time, '%Y-%m') order by xwho.end_time @@ -1641,6 +1648,9 @@ and xwo.station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{logOperatorId}) + + and find_in_set (xwo.station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId})) + and xwo.tenant_id=#{tenantId} @@ -1659,6 +1669,9 @@ and 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})) + and tenant_id=#{tenantId} @@ -1670,12 +1683,6 @@ concat('30') type, concat('退款问题') name from xhpc_refund_order where status =0 and amount > 200 - - and 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 tenant_id=#{tenantId}