Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5ad4b29795
@ -76,7 +76,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
||||
if(type ==null || userId ==null){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if(userId !=1) {
|
||||
if(logUserId !=1) {
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -91,7 +91,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
list = xhpcRealTimeOrderMapper.list(phone,transactionNumber,source,chargingStationName,terminalName,operatorId,startTime,endTime,number,status,userId,0);
|
||||
list = xhpcRealTimeOrderMapper.list(phone,transactionNumber,source,chargingStationName,terminalName,operatorId,startTime,endTime,number,status,logUserId,0);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
@ -46,7 +46,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -61,7 +61,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
list =xhpcStatisticsServiceMapper.getTimeIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 0,userId);
|
||||
list =xhpcStatisticsServiceMapper.getTimeIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 0,logUserId);
|
||||
}
|
||||
List<Map<String, Object>> page =new ArrayList<>();
|
||||
if(list !=null && list.size()>0){
|
||||
@ -168,7 +168,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -183,7 +183,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
list =xhpcStatisticsServiceMapper.getDateIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 0,userId);
|
||||
list =xhpcStatisticsServiceMapper.getDateIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 0,logUserId);
|
||||
}
|
||||
|
||||
return list;
|
||||
@ -206,7 +206,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -221,7 +221,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
list =xhpcStatisticsServiceMapper.getStationIntervalPage(chargingStationId,operatorUserId,internetUserId,operatorId,startTime,endTime,0,userId);
|
||||
list =xhpcStatisticsServiceMapper.getStationIntervalPage(chargingStationId,operatorUserId,internetUserId,operatorId,startTime,endTime,0,logUserId);
|
||||
}
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -256,7 +256,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
list =xhpcStatisticsServiceMapper.getOperatorIntervalPage(operatorUserId, operatorId, startTime, endTime, 0,userId);
|
||||
list =xhpcStatisticsServiceMapper.getOperatorIntervalPage(operatorUserId, operatorId, startTime, endTime, 0,logUserId);
|
||||
}
|
||||
|
||||
return list;
|
||||
@ -280,29 +280,25 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getTerminalIntervalPage(String chargingStationId, String terminalId, Long operatorId, String startTime, String endTime, Long userId, Integer type) {
|
||||
if(getJudge(null,operatorId,type)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
List<Map<String, Object>> list =new ArrayList<>();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
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);
|
||||
list = xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, 1,logOperatorId);
|
||||
}else{
|
||||
//查询赋值的场站
|
||||
list = xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, type,logUserId);
|
||||
list = xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, 2,logUserId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
list =xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, type,userId);
|
||||
list =xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, 0,logUserId);
|
||||
}
|
||||
|
||||
|
||||
@ -314,7 +310,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -329,7 +325,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getChargingStationList(operatorId, userId, 0));
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getChargingStationList(operatorId, logUserId, 0));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@ -338,7 +334,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
public AjaxResult getOperatorList(Long operatorId, Long userId, Integer type) {
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -353,7 +349,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
AjaxResult.success(xhpcStatisticsServiceMapper.getOperatorList(operatorId, userId, 0));
|
||||
AjaxResult.success(xhpcStatisticsServiceMapper.getOperatorList(operatorId, logUserId, 0));
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
@ -368,7 +364,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
|
||||
//获取登陆用户
|
||||
Long logUserId = SecurityUtils.getUserId();
|
||||
if(userId !=1){
|
||||
if(logUserId !=1){
|
||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||
if(landUser !=null){
|
||||
if(landUser.get("userType") !=null){
|
||||
@ -383,7 +379,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getTerminalList(chargingStationId, userId, 0));
|
||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getTerminalList(chargingStationId, logUserId, 0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -785,6 +785,7 @@
|
||||
cs.operator_id as operatorId,
|
||||
te.charging_pile_id as chargingPileId,
|
||||
co.user_id as userId,
|
||||
co.user_id as internetUserId,
|
||||
ho.create_time as createTime
|
||||
from xhpc_history_order ho
|
||||
left join xhpc_charge_order co on co.charge_order_id = ho.charge_order_id
|
||||
|
||||
@ -266,7 +266,7 @@
|
||||
DATE_FORMAT(ss.create_time,'%Y-%m-%d') createTime
|
||||
from xhpc_statistics_station as ss
|
||||
left join xhpc_internet_user as iu on iu.internet_user_id = ss.internet_user_id
|
||||
where ss.del_flag=0 and ss.type=2 and ss.internet_user_id !=null
|
||||
where ss.del_flag=0 and ss.type=2 and ss.internet_user_id is not null
|
||||
<if test="startTime !=null and startTime !=''">
|
||||
and ss.create_time >= #{startTime}
|
||||
</if>
|
||||
@ -316,10 +316,10 @@
|
||||
<if test="endTime !=null and endTime !=''">
|
||||
and ss.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="chargingStationId !=null">
|
||||
<if test="chargingStationId !=null and chargingStationId !=''">
|
||||
and cs.charging_station_id=#{chargingStationId}
|
||||
</if>
|
||||
<if test="terminalId !=null">
|
||||
<if test="terminalId !=null and terminalId !=''">
|
||||
and te.terminal_id=#{terminalId}
|
||||
</if>
|
||||
<if test="type==1">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user