update 运营商仅可查看本运营商下所有站点订单信息

This commit is contained in:
Lemon
2023-07-04 14:49:50 +08:00
parent ba9c16d34c
commit 31e366b49f
11 changed files with 69 additions and 10 deletions

View File

@@ -61,6 +61,12 @@ public class OrderBasicInfo extends BaseEntity {
@Excel(name = "站点id")
private String stationId;
/**
* 运营商id
*/
@Excel(name = "运营商id")
private String merchantId;
/**
* 充电桩sn号
*/

View File

@@ -49,6 +49,11 @@ public class QueryOrderDTO extends BaseEntity {
*/
private String stationId;
/**
* 运营商Id
*/
private String merchantId;
/**
* 开始时间
*/

View File

@@ -70,4 +70,11 @@ public interface PileMerchantInfoMapper {
public int deletePileMerchantInfoByIds(Long[] ids);
List<String> queryByMerchantDeptIds(@Param("merchantDeptIds") List<String> merchantDeptIds);
/**
* 根据部门id查询基本信息
* @param deptId
* @return
*/
PileMerchantInfo queryInfoByDeptId(@Param("deptId") String deptId);
}

View File

@@ -72,5 +72,5 @@ public interface IPileMerchantInfoService {
*/
List<String> queryByMerchantDeptIds(List<String> merchantDeptIds);
PileMerchantInfo queryInfoByDeptId(String deptId);
}

View File

@@ -176,7 +176,12 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
}
dto.setStationDeptIds(authorizedMap.getStationDeptIds());
dto.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
String deptId = authorizedMap.getDeptId();
// 根据部门id查询merchantId
PileMerchantInfo pileMerchantInfo = pileMerchantInfoService.queryInfoByDeptId(deptId);
if (pileMerchantInfo != null) {
dto.setMerchantId(String.valueOf(pileMerchantInfo.getId()));
}
List<OrderListVO> orderListVOS = orderBasicInfoMapper.selectOrderBasicInfoList(dto);
if (CollectionUtils.isNotEmpty(orderListVOS)) {
for (OrderListVO orderListVO : orderListVOS) {

View File

@@ -245,4 +245,9 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
public List<String> queryByMerchantDeptIds(List<String> merchantDeptIds) {
return pileMerchantInfoMapper.queryByMerchantDeptIds(merchantDeptIds);
}
@Override
public PileMerchantInfo queryInfoByDeptId(String deptId) {
return pileMerchantInfoMapper.queryInfoByDeptId(deptId);
}
}