add 运营端小程序新增查询枪口详情接口

This commit is contained in:
Lemon
2026-01-19 16:55:17 +08:00
parent e081920d56
commit 284bb4337a
5 changed files with 107 additions and 1 deletions

View File

@@ -128,4 +128,21 @@ public class BusinessConnectorInfoController extends BaseController {
}
/**
* 获取枪口详情
* @param pileConnectorCode
* @return
*/
@GetMapping("/getConnectorDetail/{pileConnectorCode}")
public RestApiResponse<?> getConnectorDetail(@PathVariable("pileConnectorCode") String pileConnectorCode) {
RestApiResponse<?> response = null;
try {
BusinessConnectorInfoVO vo = pileConnectorInfoService.getBusinessPileConnectorDetail(pileConnectorCode);
response = new RestApiResponse<>(ImmutableMap.of("BusinessConnectorDetail", vo.getBusinessConnectorDetail()));
} catch (Exception e) {
logger.error("获取枪口详情 error", e);
}
logger.info("获取枪口详情 pileConnectorCode:{}, result:{}", pileConnectorCode, response);
return response;
}
}

View File

@@ -1264,6 +1264,17 @@ public class PileConnectorInfoServiceImpl implements PileConnectorInfoService {
detailVO.setFaultReason(faultReason);
}
}
detailVO.setPileSn(pileConnectorInfoVO.getPileSn());
detailVO.setPileName(pileConnectorInfoVO.getPileName());
detailVO.setStationId(pileConnectorInfoVO.getStationId());
detailVO.setStationName(pileConnectorInfoVO.getStationName());
detailVO.setMerchantId(pileConnectorInfoVO.getMerchantId());
detailVO.setMerchantName(pileConnectorInfoVO.getMerchantName());
detailVO.setModelName(pileConnectorInfoVO.getModelName());
detailVO.setChargeType(pileConnectorInfoVO.getChargeType());
detailVO.setRatedPower(pileConnectorInfoVO.getRatedPower());
detailVO.setCreateTime(pileConnectorInfoVO.getCreateTime());
detailVO.setPileConnectorCode(pileConnectorCode);
detailVO.setStatus(status);

View File

@@ -61,4 +61,54 @@ public class BusinessConnectorDetailVO {
* 充电开始时间
*/
private String chargeStartTime;
/**
* 桩编号
*/
private String pileSn;
/**
* 桩名称
*/
private String pileName;
/**
* 站点id
*/
private String stationId;
/**
* 站点名称
*/
private String stationName;
/**
* 运营商id
*/
private String merchantId;
/**
* 运营商名称
*/
private String merchantName;
/**
* 充电桩型号
*/
private String modelName;
/**
* 充电类型
*/
private String chargeType;
/**
* 额定功率
*/
private String ratedPower;
/**
* 创建时间
*/
private String createTime;
}

View File

@@ -189,4 +189,24 @@ public class PileConnectorInfoVO {
*/
private GroundLockData groundLockData;
/**
* 创建时间
*/
private String createTime;
/**
* 充电桩型号
*/
private String modelName;
/**
* 充电类型
*/
private String chargeType;
/**
* 充电桩名称
*/
private String pileName;
}

View File

@@ -215,18 +215,26 @@
<select id="getPileConnectorInfoByConnectorCode" resultType="com.jsowell.pile.vo.web.PileConnectorInfoVO">
select
t1.id as connectorId,
t1.pile_connector_code as connectorCode,
t1.pile_connector_code as pileConnectorCode,
t1.status as status,
t1.pile_sn as pileSn,
IF(t3.charger_pile_type = '2','3',(IF(t3.speed_type = '1','1','2'))) AS type,
t3.model_name as modelName,
t3.speed_type as chargeType,
t3.rated_power as ratedPower,
t1.create_time as createTime,
t2.business_type as businessType,
t2.station_id as stationId,
t2.name as pileName,
t4.station_name as stationName,
t5.merchant_name as merchantName,
t4.amap_flag as aMapFlag,
t2.merchant_id as merchantId
from pile_connector_info t1
join pile_basic_info t2 on t2.sn = t1.pile_sn
join pile_model_info t3 on t3.id = t2.model_id
join pile_station_info t4 on t2.station_id = t4.id
join pile_merchant_info t5 on t2.merchant_id = t5.id
where t1.del_flag = '0'
and t1.pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR}
</select>