修改数据权限
This commit is contained in:
parent
4426e69be6
commit
5e2ea9ddc9
@ -72,7 +72,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
|
||||
Map<String, Object> landUser = xhpcChargingStationService.getLandUser(userId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long operatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
list= xhpcChargingPileMapper.selectXhpcChargingPileList(name, type, serialNumber, chargingStationId,operatorId,1);
|
||||
}else{
|
||||
|
||||
@ -113,7 +113,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
Map<String, Object> landUser = xhpcChargingStationMapper.getLandUser(userId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long operatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcChargingStationMapper.selectXhpcChargingStationList(name, operatorName,operatorId,1);
|
||||
|
||||
@ -261,7 +261,16 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
||||
}
|
||||
//获取充电订单号
|
||||
XhpcChargeOrder order = xhpcChargeOrderMapper.getChargingOrderId(chargingOrderId);
|
||||
|
||||
if(order ==null){
|
||||
return AjaxResult.error(1104, "无效的终端编号");
|
||||
}else{
|
||||
if(order.getSource()==1){
|
||||
return AjaxResult.error(1104, "请在启动方停止充电");
|
||||
}
|
||||
if(!order.getUserId().equals(userId)){
|
||||
return AjaxResult.error(1104, "请登陆相应账号停止充电");
|
||||
}
|
||||
}
|
||||
|
||||
R oa = powerPileService.stopCharging(order.getSerialNumber(), xhpcTerminal.getPileSerialNumber(),
|
||||
xhpcTerminal.getSerialNumber(), version);
|
||||
|
||||
@ -91,7 +91,7 @@ public class XhpcHistoryOrderServiceImpl implements IXhpcHistoryOrderService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderMapper.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcHistoryOrderMapper.getListPage(phone,transactionNumber,1,chargingStationName,operatorId,source,startTime,endTime,logOperatorId,type,number);
|
||||
|
||||
@ -84,7 +84,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcRealTimeOrderMapper.list(phone,transactionNumber,source,chargingStationName,terminalName,operatorId,startTime,endTime,number,status,logOperatorId,1);
|
||||
|
||||
@ -45,7 +45,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getTimeIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 1,logOperatorId);
|
||||
@ -167,7 +167,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getDateIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 1,logOperatorId);
|
||||
@ -205,7 +205,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getStationIntervalPage(chargingStationId,operatorUserId,internetUserId,operatorId,startTime,endTime,1,logOperatorId);
|
||||
@ -240,7 +240,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getOperatorIntervalPage(operatorUserId, operatorId, startTime, endTime, 1,logOperatorId);
|
||||
@ -286,7 +286,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
list = xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, type,logOperatorId);
|
||||
@ -313,7 +313,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getChargingStationList(operatorId, logOperatorId, 1));
|
||||
@ -337,7 +337,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getOperatorList(operatorId, logOperatorId, 1));
|
||||
@ -367,7 +367,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
if("01".equals(landUser.get("userType").toString())){
|
||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||
//运营商看自己的场站
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getTerminalList(chargingStationId, logOperatorId, 1));
|
||||
|
||||
@ -142,7 +142,7 @@
|
||||
and charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{userId})
|
||||
</if>
|
||||
<if test="type==2">
|
||||
and internet_user_id in (select charging_station_id from xhpc_user_privilege where user_id=#{userId})
|
||||
and charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{userId})
|
||||
</if>
|
||||
group by DATE_FORMAT(create_time,'%Y-%m-%d')
|
||||
order by DATE_FORMAT(create_time,'%Y-%m-%d') desc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user