| | |
| | | @GetMapping("/map/getSiteList") |
| | | @ApiOperation(value = "获取站点", tags = {"2.0-管理后台-数据分析-电站分布"}) |
| | | public R<List<GetSiteListDTO>> getMapSiteList(GetSiteList siteList){ |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser data = sysUserClient.getSysUser(userid).getData(); |
| | | |
| | | if (data.getRoleType()==2){ |
| | | siteList.setSiteId(data.getSiteId()); |
| | | } |
| | | List<GetSiteListDTO> list = siteService.getSiteListNolimit(siteList); |
| | | SysUser sysUser = tokenService.getLoginUser().getSysUser(); |
| | | List<GetSiteListDTO> list = siteService.getSiteListNolimit(siteList,sysUser); |
| | | List<GetSiteListDTO> records = list; |
| | | |
| | | for (GetSiteListDTO record : records) { |
| | |
| | | @ApiOperation(value = "获取充电桩列表数据", tags = {"管理后台-充电桩信息"}) |
| | | public AjaxResult<PageInfo<PageChargingPileListDTO>> pageChargingPileList(PageChargingPileList page){ |
| | | SysUser sysUser = tokenService.getLoginUser().getSysUser(); |
| | | Integer siteId = sysUser.getSiteId(); |
| | | PageInfo<PageChargingPileListDTO> list = chargingPileService.pageChargingPileList(page,siteId); |
| | | PageInfo<PageChargingPileListDTO> list = chargingPileService.pageChargingPileList(page,sysUser); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.chargingPile.dto.SiteDTO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<GetSiteListDTO> getSiteList(GetSiteList siteList); |
| | | List<GetSiteListDTO> getSiteListNolimit(GetSiteList siteList); |
| | | List<GetSiteListDTO> getSiteListNolimit(GetSiteList siteList, SysUser sysUser); |
| | | |
| | | PageInfo<GetSiteListDTO> getSiteList1(Long userId); |
| | | |
| | |
| | | import com.ruoyi.chargingPile.api.vo.TChargingPileVO; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param page |
| | | * @return |
| | | */ |
| | | PageInfo<PageChargingPileListDTO> pageChargingPileList(PageChargingPileList page,Integer siteId); |
| | | PageInfo<PageChargingPileListDTO> pageChargingPileList(PageChargingPileList page, SysUser sysUser); |
| | | |
| | | |
| | | /** |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<GetSiteListDTO> getSiteListNolimit(GetSiteList siteList) { |
| | | Set<Integer> ids = null; |
| | | public List<GetSiteListDTO> getSiteListNolimit(GetSiteList siteList,SysUser sysUser) { |
| | | Set<Integer> ids = new HashSet<>(); |
| | | if(sysUser.getRoleType() != 1){ |
| | | ids.add(sysUser.getSiteId()); |
| | | } |
| | | List<GetSiteListDTO> list = this.baseMapper.getSiteListNolimit( siteList, ids); |
| | | return list; |
| | | } |
| | |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<PageChargingPileListDTO> pageChargingPileList(PageChargingPileList page,Integer siteId) { |
| | | public PageInfo<PageChargingPileListDTO> pageChargingPileList(PageChargingPileList page, SysUser sysUser) { |
| | | // 获取当前登录账号站点 |
| | | Set<Integer> siteIds = new HashSet<>(); |
| | | siteIds.add(siteId); |
| | | if(sysUser.getRoleType() != 1){ |
| | | siteIds.add(sysUser.getSiteId()); |
| | | } |
| | | PageInfo<PageChargingPileListDTO> pageInfo = new PageInfo<>(page.getPageCurr(), page.getPageSize()); |
| | | List<PageChargingPileListDTO> list = this.baseMapper.pageChargingPileList(pageInfo, page, siteIds); |
| | | return pageInfo.setRecords(list); |
| | |
| | | <if test="null != item.siteId"> |
| | | and a.id = #{item.siteId} |
| | | </if> |
| | | <if test="null != item.name and item.name != ''"> |
| | | and a.name LIKE concat('%',#{item.name},'%') |
| | | </if> |
| | | <if test="null != ids and ids.size() > 0"> |
| | | and a.id in |
| | | <foreach collection="ids" item="itemm" index="index" open="(" separator="," close=")"> |
| | | #{itemm} |
| | | </foreach> |
| | | </if> |
| | | order by a.sort desc, a.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | private String phone; |
| | | // 开始时间 |
| | | @Excel(name = "开始时间", width = 20) |
| | | private LocalDateTime beginTime; |
| | | private String beginTime; |
| | | // 结束时间 |
| | | @Excel(name = "结束时间", width = 20) |
| | | private LocalDateTime endTime; |
| | | private String endTime; |
| | | // 充电时长 |
| | | @Excel(name = "充电时长", width = 20) |
| | | private String chargingDuration; |
| | |
| | | @Excel(name = "终端编码", width = 20) |
| | | private String terminalCode; |
| | | // 车牌号 |
| | | @Excel(name = "车牌号", width = 20) |
| | | @Excel(name = "车牌号码", width = 20) |
| | | private String plateNumber; |
| | | // 电站价电费金额 |
| | | @Excel(name = "电站价电费金额", width = 20) |
| | |
| | | @Excel(name = "电站价总金额", width = 20) |
| | | private BigDecimal totalAmount; |
| | | //获得积分 |
| | | @Excel(name = "获得积分", width = 20) |
| | | @Excel(name = "获得绿电分", width = 20) |
| | | private Integer point; |
| | | } |
| | |
| | | @Excel(name = "订单状态" , readConverterExp = "3=待使用,4=已完成,5=已取消,8=已评价") |
| | | private String orderStatus; |
| | | |
| | | |
| | | /** |
| | | * 商户单号 |
| | | */ |