mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 运营商仅可查看本运营商下所有站点订单信息
This commit is contained in:
@@ -61,6 +61,12 @@ public class OrderBasicInfo extends BaseEntity {
|
||||
@Excel(name = "站点id")
|
||||
private String stationId;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
@Excel(name = "运营商id")
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 充电桩sn号
|
||||
*/
|
||||
|
||||
@@ -49,6 +49,11 @@ public class QueryOrderDTO extends BaseEntity {
|
||||
*/
|
||||
private String stationId;
|
||||
|
||||
/**
|
||||
* 运营商Id
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -72,5 +72,5 @@ public interface IPileMerchantInfoService {
|
||||
*/
|
||||
List<String> queryByMerchantDeptIds(List<String> merchantDeptIds);
|
||||
|
||||
|
||||
PileMerchantInfo queryInfoByDeptId(String deptId);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<result property="orderStatus" column="order_status"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="stationId" column="station_id"/>
|
||||
<result property="merchantId" column="merchant_id"/>
|
||||
<result property="pileSn" column="pile_sn"/>
|
||||
<result property="connectorCode" column="connector_code"/>
|
||||
<result property="pileConnectorCode" column="pile_connector_code"/>
|
||||
@@ -91,6 +92,7 @@
|
||||
order_status,
|
||||
member_id,
|
||||
station_id,
|
||||
merchant_id,
|
||||
pile_sn,
|
||||
connector_code,
|
||||
pile_connector_code,
|
||||
@@ -223,13 +225,16 @@
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and t1.create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="merchantId != null and merchantId != ''">
|
||||
and t1.merchant_id = #{merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
<!--<if test="merchantDeptIds != null and merchantDeptIds.size() != 0">
|
||||
and t3.dept_id in
|
||||
<foreach collection="merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">
|
||||
#{merchantDeptId}
|
||||
</foreach>
|
||||
</if>-->
|
||||
<!-- <if test="merchantDeptIds != null and merchantDeptIds.size() != 0">-->
|
||||
<!-- and t3.dept_id in-->
|
||||
<!-- <foreach collection="merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">-->
|
||||
<!-- #{merchantDeptId}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<if test="stationDeptIds != null and stationDeptIds.size() != 0">
|
||||
and t3.dept_id in
|
||||
<foreach collection="stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
|
||||
@@ -305,6 +310,9 @@
|
||||
<if test="stationId != null">
|
||||
station_id,
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="pileSn != null">
|
||||
pile_sn,
|
||||
</if>
|
||||
@@ -403,6 +411,9 @@
|
||||
<if test="stationId != null">
|
||||
#{stationId},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
#{merchantId},
|
||||
</if>
|
||||
<if test="pileSn != null">
|
||||
#{pileSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -502,6 +513,9 @@
|
||||
<if test="stationId != null">
|
||||
station_id = #{stationId},
|
||||
</if>
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId},
|
||||
</if>
|
||||
<if test="pileSn != null">
|
||||
pile_sn = #{pileSn},
|
||||
</if>
|
||||
|
||||
@@ -278,4 +278,12 @@
|
||||
#{item,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryInfoByDeptId" resultMap="PileMerchantInfoResult">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from pile_merchant_info
|
||||
where
|
||||
dept_id = #{deptId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user