mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 查询首页数据
This commit is contained in:
@@ -3,6 +3,8 @@ package com.jsowell.pile.dto;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页数据展示DTO
|
||||
*
|
||||
@@ -15,4 +17,6 @@ public class IndexQueryDTO extends BaseEntity {
|
||||
* 站点id
|
||||
*/
|
||||
private String stationId;
|
||||
|
||||
private List<String> stationIdList;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@@ -67,4 +68,6 @@ public interface PileMerchantInfoMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePileMerchantInfoByIds(Long[] ids);
|
||||
|
||||
List<String> queryByMerchantDeptIds(@Param("merchantDeptIds") List<String> merchantDeptIds);
|
||||
}
|
||||
|
||||
@@ -77,4 +77,6 @@ public interface PileStationInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
List<PileStationInfo> getStationInfoForLianLian();
|
||||
|
||||
List<String> queryByStationDeptIds(@Param("stationDeptIds") List<String> stationDeptIds);
|
||||
}
|
||||
|
||||
@@ -63,4 +63,11 @@ public interface IPileMerchantInfoService {
|
||||
String getMerchantIdByAppId(String appId);
|
||||
|
||||
MerchantInfoVO getMerchantInfo(String merchantId);
|
||||
|
||||
/**
|
||||
* 根据运营商部门ids 查询所有站点id
|
||||
* @param merchantDeptIds
|
||||
* @return
|
||||
*/
|
||||
List<String> queryByMerchantDeptIds(List<String> merchantDeptIds);
|
||||
}
|
||||
|
||||
@@ -92,4 +92,6 @@ public interface IPileStationInfoService {
|
||||
PileStationVO getStationInfoByPileSn(String pileSn);
|
||||
|
||||
List<PileStationInfo> getStationInfoForLianLian();
|
||||
|
||||
List<String> queryByStationDeptIds(List<String> stationIds);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.jsowell.pile.service.IPileConnectorInfoService;
|
||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||
import com.jsowell.pile.service.IPileModelInfoService;
|
||||
import com.jsowell.pile.service.IPileSimInfoService;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.service.SimCardService;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||
@@ -71,6 +72,9 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
||||
@Autowired
|
||||
private IPileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileStationInfoService pileStationInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileSimInfoService pileSimInfoService;
|
||||
|
||||
@@ -565,9 +569,27 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
||||
if (authorizedMap == null) {
|
||||
return new IndexGeneralSituationVO();
|
||||
}
|
||||
dto.setStationDeptIds(authorizedMap.getStationDeptIds());
|
||||
dto.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
|
||||
// dto.setStationDeptIds(authorizedMap.getStationDeptIds());
|
||||
// dto.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
|
||||
List<String> stationIdList = Lists.newArrayList();
|
||||
List<String> stationDeptIds = authorizedMap.getStationDeptIds();
|
||||
if (CollectionUtils.isNotEmpty(stationDeptIds)) {
|
||||
// 根据部门id查询站点id
|
||||
List<String> list = pileStationInfoService.queryByStationDeptIds(stationDeptIds);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
stationIdList.addAll(list);
|
||||
}
|
||||
}
|
||||
List<String> merchantDeptIds = authorizedMap.getMerchantDeptIds();
|
||||
if (CollectionUtils.isNotEmpty(merchantDeptIds)) {
|
||||
// 根据运营商部门id查询下面所有站点id
|
||||
List<String> list = pileMerchantInfoService.queryByMerchantDeptIds(merchantDeptIds);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
stationIdList.addAll(list);
|
||||
}
|
||||
}
|
||||
log.info("后管首页基本信息查询 authorizedMap:{}, dto:{}", JSONObject.toJSONString(authorizedMap), JSONObject.toJSONString(dto));
|
||||
dto.setStationIdList(stationIdList);
|
||||
return pileBasicInfoMapper.getGeneralSituation(dto);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,4 +175,9 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
.build();
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> queryByMerchantDeptIds(List<String> merchantDeptIds) {
|
||||
return pileMerchantInfoMapper.queryByMerchantDeptIds(merchantDeptIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,6 +163,11 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
return pileStationInfoMapper.getStationInfoForLianLian();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> queryByStationDeptIds(List<String> stationIds) {
|
||||
return pileStationInfoMapper.queryByStationDeptIds(stationIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电站信息列表
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user