mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-16 07:48:34 +08:00
首页数据权限过滤
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.jsowell.pile.dto;
|
package com.jsowell.pile.dto;
|
||||||
|
|
||||||
|
import com.jsowell.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -9,7 +10,7 @@ import lombok.Data;
|
|||||||
* @date 2023/2/3 16:11
|
* @date 2023/2/3 16:11
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class IndexQueryDTO {
|
public class IndexQueryDTO extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 站点id
|
* 站点id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -545,8 +545,13 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IndexGeneralSituationVO getGeneralSituation(IndexQueryDTO dto) {
|
public IndexGeneralSituationVO getGeneralSituation(IndexQueryDTO dto) {
|
||||||
//
|
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||||
return pileBasicInfoMapper.getGeneralSituation(dto);
|
if (authorizedMap == null) {
|
||||||
|
return new IndexGeneralSituationVO();
|
||||||
|
}
|
||||||
|
dto.setStationDeptIds(authorizedMap.getStationDeptIds());
|
||||||
|
dto.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
|
||||||
|
return pileBasicInfoMapper.getGeneralSituation(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -319,9 +319,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
) t4
|
) t4
|
||||||
WHERE
|
WHERE
|
||||||
t1.del_flag = '0'
|
t1.del_flag = '0'
|
||||||
<if test="IndexQueryDTO.stationId != null and IndexQueryDTO.stationId != ''">
|
<if test="IndexQueryDTO.stationId != null and IndexQueryDTO.stationId != ''">
|
||||||
and t1.station_id = #{IndexQueryDTO.stationId,jdbcType=VARCHAR}
|
and t1.station_id = #{IndexQueryDTO.stationId,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
<if test="IndexQueryDTO.stationDeptIds != null and IndexQueryDTO.stationDeptIds.size() != 0">
|
||||||
|
and t1.station_id in
|
||||||
|
<foreach collection="IndexQueryDTO.stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
|
||||||
|
#{stationDeptId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
group by t4.totalMemberAmount
|
group by t4.totalMemberAmount
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<div class="progress"></div>
|
<div class="progress"></div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7" v-hasRole="['admin', 'common']">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<p>总客户余额</p>
|
<p>总客户余额</p>
|
||||||
<div class="box-text">
|
<div class="box-text">
|
||||||
|
|||||||
Reference in New Issue
Block a user