修改版本搜索问题
This commit is contained in:
parent
cb563320cf
commit
caaf2bbc92
@ -88,14 +88,14 @@ public class SysLoginService
|
|||||||
if(type==0){
|
if(type==0){
|
||||||
if(user.getDataPowerType()!=0){
|
if(user.getDataPowerType()!=0){
|
||||||
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登陆地址错误");
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登陆地址错误");
|
||||||
throw new BaseException("登陆地址错误,请在管理员界面登陆");
|
throw new BaseException("登陆地址错误,请在运营商界面登陆");
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(user.getDataPowerType()==1 ||user.getDataPowerType()==2){
|
if(user.getDataPowerType()==1 ||user.getDataPowerType()==2){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登陆地址错误");
|
remoteLogService.saveLogininfor(username, Constants.LOGIN_FAIL, "登陆地址错误");
|
||||||
throw new BaseException("登陆地址错误,请在运营商界面登陆");
|
throw new BaseException("登陆地址错误,请在管理员界面登陆");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
public interface XhpcPileEditionMapper {
|
public interface XhpcPileEditionMapper {
|
||||||
|
|
||||||
List<Map<String, Object>> list(@Param("chargingStationId")Long chargingStationId, @Param("chargingPileIds") String chargingPileIds,@Param("logOperatorId")Long logOperatorId, @Param("type")Integer type, @Param("tenantId")String tenantId);
|
List<Map<String, Object>> list(@Param("chargingStationId")Long chargingStationId,@Param("chargingPileIds") List chargingPileIds,@Param("logOperatorId")Long logOperatorId, @Param("type")Integer type, @Param("tenantId")String tenantId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@ -44,24 +44,29 @@ public class XhpcPileEditionServiceImpl extends BaseService implements IXhpcPil
|
|||||||
Long sysUserId = sysUser.getUserId();
|
Long sysUserId = sysUser.getUserId();
|
||||||
String tenantId =loginUser.getTenantId();
|
String tenantId =loginUser.getTenantId();
|
||||||
//判断登录人的权限
|
//判断登录人的权限
|
||||||
|
List listPileIds = new ArrayList();
|
||||||
|
if(chargingPileIds !=null && !"".equals(chargingPileIds)){
|
||||||
|
String[] split = chargingPileIds.split(",");
|
||||||
|
listPileIds = Arrays.asList(split);
|
||||||
|
}
|
||||||
List<Map<String, Object>> list =new ArrayList<>();
|
List<Map<String, Object>> list =new ArrayList<>();
|
||||||
if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){
|
if(UserTypeUtil.SYS_USER_TYPE_FOUR.equals(sysUser.getUserType())){
|
||||||
//运维人员权限
|
//运维人员权限
|
||||||
list = xhpcPileEditionMapper.list(chargingStationId,chargingPileIds,sysUserId,3,tenantId);
|
list = xhpcPileEditionMapper.list(chargingStationId,listPileIds,sysUserId,3,tenantId);
|
||||||
}else{
|
}else{
|
||||||
if(!UserTypeUtil.SYS_USER_TYPE_ADMIN.equals(sysUser.getUserId())){
|
if(!UserTypeUtil.SYS_USER_TYPE_ADMIN.equals(sysUser.getUserId())){
|
||||||
// startPage();
|
// startPage();
|
||||||
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
|
if(UserTypeUtil.SYS_USER_TYPE_ONE.equals(sysUser.getUserType())){
|
||||||
Long logOperatorId = sysUser.getOperatorId();
|
Long logOperatorId = sysUser.getOperatorId();
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
list = xhpcPileEditionMapper.list(chargingStationId,chargingPileIds,logOperatorId,1,tenantId);
|
list = xhpcPileEditionMapper.list(chargingStationId,listPileIds,logOperatorId,1,tenantId);
|
||||||
}else{
|
}else{
|
||||||
//查询赋值的场站
|
//查询赋值的场站
|
||||||
list = xhpcPileEditionMapper.list(chargingStationId,chargingPileIds,sysUserId,2,tenantId);
|
list = xhpcPileEditionMapper.list(chargingStationId,listPileIds,sysUserId,2,tenantId);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// startPage();
|
// startPage();
|
||||||
list = xhpcPileEditionMapper.list(chargingStationId,chargingPileIds,sysUserId,0,tenantId);
|
list = xhpcPileEditionMapper.list(chargingStationId,listPileIds,sysUserId,0,tenantId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
xem.equipmen_name as equipmenName,
|
xem.equipmen_name as equipmenName,
|
||||||
xem.equipmen_number as equipmenNumber,
|
xem.equipmen_number as equipmenNumber,
|
||||||
st.name as chargingStationName,
|
st.name as chargingStationName,
|
||||||
|
st.charging_station_id as chargingStationId,
|
||||||
xem.create_time as createTime
|
xem.create_time as createTime
|
||||||
from xhpc_equipmen_monitor as xem
|
from xhpc_equipmen_monitor as xem
|
||||||
left join xhpc_charging_station as st on st.charging_station_id =xem.charging_station_id
|
left join xhpc_charging_station as st on st.charging_station_id =xem.charging_station_id
|
||||||
|
|||||||
@ -37,9 +37,6 @@
|
|||||||
<if test="chargingStationId !=null">
|
<if test="chargingStationId !=null">
|
||||||
and xpe.charging_station_id = #{chargingStationId}
|
and xpe.charging_station_id = #{chargingStationId}
|
||||||
</if>
|
</if>
|
||||||
<if test="chargingPileIds !=null and chargingPileIds !=''">
|
|
||||||
and find_in_set(xpe.charging_pile_ids, #{chargingPileIds})
|
|
||||||
</if>
|
|
||||||
<if test="type ==1">
|
<if test="type ==1">
|
||||||
and xpe.charging_station_id in(select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId})
|
and xpe.charging_station_id in(select charging_station_id from xhpc_charging_station where operator_id=#{logOperatorId})
|
||||||
</if>
|
</if>
|
||||||
@ -49,6 +46,12 @@
|
|||||||
<if test="type ==3">
|
<if test="type ==3">
|
||||||
and find_in_set (xpe.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId}))
|
and find_in_set (xpe.charging_station_id,(select station_ids from xhpc_work_user where work_user_id=#{logOperatorId}))
|
||||||
</if>
|
</if>
|
||||||
|
<if test="chargingPileIds.size()>0 and chargingPileIds !=null">
|
||||||
|
and
|
||||||
|
<foreach collection="chargingPileIds" separator="and" item="pileId" close=")" open="(">
|
||||||
|
find_in_set(#{pileId},xpe.charging_pile_ids)
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="tenantId !=null and tenantId !=''">
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
and xpe.tenant_id=#{tenantId}
|
and xpe.tenant_id=#{tenantId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user