mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
Merge branch 'dev-new' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev-new
This commit is contained in:
@@ -34,6 +34,16 @@ public class PileMemberRelation extends BaseEntity
|
||||
@Excel(name = "会员id")
|
||||
private String memberId;
|
||||
|
||||
/**
|
||||
* 设备id 蓝牙桩
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 设备名称 蓝牙桩
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/** 身份类型(1-管理员,2-用户) */
|
||||
@Excel(name = "身份类型", readConverterExp = "1=-管理员,2-用户")
|
||||
private String type;
|
||||
|
||||
@@ -39,4 +39,14 @@ public class PileMemberBindingDTO {
|
||||
* 一级运营商id
|
||||
*/
|
||||
private String firstLevelMerchantId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String deviceId;
|
||||
}
|
||||
|
||||
@@ -891,24 +891,25 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return null;
|
||||
}
|
||||
|
||||
for (PersonalPileInfoVO personalPileInfoVO : list) {
|
||||
String pileSn = personalPileInfoVO.getPileSn();
|
||||
|
||||
// 获取桩状态
|
||||
Map<String, String> pileStatus = pileConnectorInfoService.getPileStatus(Lists.newArrayList(pileSn));
|
||||
personalPileInfoVO.setPileStatus(pileStatus.get(pileSn));
|
||||
personalPileInfoVO.setPileStatusDesc(PileStatusEnum.getStatusDesc(pileStatus.get(pileSn)));
|
||||
if (StringUtils.equals("1", personalPileInfoVO.getType())) {
|
||||
personalPileInfoVO.setType("管理员用户");
|
||||
}else {
|
||||
personalPileInfoVO.setType("普通用户");
|
||||
}
|
||||
if (StringUtils.equals("1", personalPileInfoVO.getSpeedType())) {
|
||||
personalPileInfoVO.setSpeedType("快充");
|
||||
}else {
|
||||
personalPileInfoVO.setSpeedType("慢充");
|
||||
}
|
||||
// if (StringUtils.equals(Constants.ONE, personalPileInfoVO.getType())) {
|
||||
// personalPileInfoVO.setType("管理员用户");
|
||||
// }else {
|
||||
// personalPileInfoVO.setType("普通用户");
|
||||
// }
|
||||
personalPileInfoVO.setType(StringUtils.equals(Constants.ONE, personalPileInfoVO.getType()) ? "管理员用户" : "普通用户");
|
||||
// if (StringUtils.equals(Constants.ONE, personalPileInfoVO.getSpeedType())) {
|
||||
// personalPileInfoVO.setSpeedType("快充");
|
||||
// }else {
|
||||
// personalPileInfoVO.setSpeedType("慢充");
|
||||
// }
|
||||
personalPileInfoVO.setSpeedType(StringUtils.equals(Constants.ONE, personalPileInfoVO.getSpeedType()) ? "快充" : "慢充");
|
||||
personalPileInfoVO.setConnectionType(StringUtils.isNotBlank(personalPileInfoVO.getDeviceId()) ? "BT" : "4G");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
|
||||
List<String> noCachePileSnList = pileSnList.stream()
|
||||
.filter(pileSn -> !collect.containsKey(pileSn))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// TODO 未从缓存获取到的去数据库查询并放缓存
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,4 +64,14 @@ public class PersonalPileInfoVO {
|
||||
* 枪口数量
|
||||
*/
|
||||
private String connectorNum;
|
||||
|
||||
private String deviceName;
|
||||
|
||||
private String deviceId;
|
||||
|
||||
/**
|
||||
* 充电桩连接类型
|
||||
* 4G/BT
|
||||
*/
|
||||
private String connectionType;
|
||||
}
|
||||
@@ -330,6 +330,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
t1.pile_sn as pileSn,
|
||||
t1.member_id as memberId,
|
||||
t1.type,
|
||||
t1.device_name as deviceName,
|
||||
t1.device_id as deviceId,
|
||||
t3.model_name as modelName,
|
||||
t3.rated_power as ratedPower,
|
||||
t3.rated_current as ratedCurrent,
|
||||
|
||||
@@ -8,16 +8,20 @@
|
||||
<result property="id" column="id" />
|
||||
<result property="pileSn" column="pile_sn" />
|
||||
<result property="memberId" column="member_id" />
|
||||
<result property="deviceName" column="device_name"/>
|
||||
<result property="deviceId" column="device_id"/>
|
||||
<result property="type" column="type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPileMemberRelationVo">
|
||||
select id, pile_sn, member_id, type, create_time from pile_member_relation
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from pile_member_relation
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, pile_sn, member_id, type, create_time
|
||||
id, pile_sn, member_id, device_name, device_id, type, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectPileMemberRelationList" parameterType="com.jsowell.pile.domain.PileMemberRelation" resultMap="PileMemberRelationResult">
|
||||
@@ -39,11 +43,15 @@
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="pileSn != null">pile_sn,</if>
|
||||
<if test="memberId != null">member_id,</if>
|
||||
<if test="deviceName != null">device_name,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="pileSn != null">#{pileSn},</if>
|
||||
<if test="memberId != null">#{memberId},</if>
|
||||
<if test="deviceName != null">#{deviceName},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
Reference in New Issue
Block a user