4 Commits

Author SHA1 Message Date
Guoqs
cace7f692f Merge branch 'dev' of codeup.aliyun.com:67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web into dev
# Conflicts:
#	jsowell-admin/src/main/java/com/jsowell/web/controller/pile/PileStationInfoController.java
2026-07-08 10:24:57 +08:00
Lemon
c9749a1816 bugfix 修复查询站点停车配置信息报错 2026-07-08 10:19:23 +08:00
Lemon
df761d1785 bugfix. 修复希晓运营商无法查看会员详情 2026-07-08 10:07:58 +08:00
Guoqs
6a0e4d6ea7 页面配置停车平台信息 2026-07-03 16:22:39 +08:00
5 changed files with 83 additions and 21 deletions

View File

@@ -132,13 +132,13 @@ public class MemberBasicInfoController extends BaseController {
/**
* 获取会员基础信息详细信息
*/
@PreAuthorize("@ss.hasPermi('member:memberGroup:list')")
@PreAuthorize("@ss.hasPermi('member:info:query')")
@GetMapping(value = "/{memberId}")
public AjaxResult getInfo(@PathVariable("memberId") String memberId) {
return AjaxResult.success(memberBasicInfoService.queryMemberInfoByMemberId(memberId));
}
@PreAuthorize("@ss.hasPermi('member:memberGroup:list')")
@PreAuthorize("@ss.hasPermi('member:info:query')")
@GetMapping(value = "/getMemberPersonPileInfo/{memberId}")
public AjaxResult getMemberPersonPileInfo(@PathVariable("memberId") String memberId) {
return AjaxResult.success(memberBasicInfoService.getMemberPersonPileInfo(memberId));

View File

@@ -32,6 +32,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
/**
@@ -422,7 +423,81 @@ public class PileStationInfoController extends BaseController {
return response;
}
// public AjaxResult checkStationAmap
/**
* 保存停车平台配置
*
* @param config 停车平台配置
* @return
*/
@PostMapping("/saveParkingConfig")
public RestApiResponse<?> saveParkingConfig(@RequestBody ThirdpartyParkingConfig config) {
logger.info("保存停车平台配置 params:{}", JSON.toJSONString(config));
RestApiResponse<?> response = null;
try {
if (config == null) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
if (StringUtils.isBlank(config.getParkingName())
|| StringUtils.isBlank(config.getPlatformType())
|| StringUtils.isBlank(config.getSecretKey())
|| StringUtils.isBlank(config.getParkId())
|| StringUtils.isBlank(config.getApiUrl())) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
if ("4".equals(config.getPlatformType()) && StringUtils.isBlank(config.getAppId())) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
Date now = new Date();
if (config.getId() == null) {
config.setCreateTime(now);
config.setCreateBy(getUsername());
if (StringUtils.isBlank(config.getDelFlag())) {
config.setDelFlag("0");
}
parkingConfigService.insertSelective(config);
} else {
config.setUpdateTime(now);
config.setUpdateBy(getUsername());
parkingConfigService.updateByPrimaryKeySelective(config);
}
response = new RestApiResponse<>(config);
} catch (BusinessException e) {
logger.error("保存停车平台配置 error,", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("保存停车平台配置 error", e);
response = new RestApiResponse<>(e);
}
logger.info("保存停车平台配置 result:{}", response);
return response;
}
/**
* 根据站点获取已绑定停车平台配置
*
* @param stationId 站点ID
*
* @return
*/
@GetMapping("/getParkingConfigByStationId/{stationId}")
public RestApiResponse<?> getParkingConfigByStationId(@PathVariable("stationId") String stationId) {
RestApiResponse<?> response = null;
try {
if (StringUtils.isBlank(stationId)) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
ThirdpartyParkingConfig config = parkingConfigService.selectByStationId(stationId);
response = new RestApiResponse<>(config);
} catch (BusinessException e) {
logger.error("根据站点获取停车平台配置 error,", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("根据站点获取停车平台配置 error", e);
response = new RestApiResponse<>(e);
}
logger.info("根据站点获取停车平台配置 result:{}", response);
return response;
}
}

View File

@@ -7,11 +7,8 @@ import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
import com.jsowell.pile.dto.SavePileMsgDTO;
import com.jsowell.pile.service.PileMsgRecordService;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
@@ -27,9 +24,6 @@ import java.util.Date;
public class TimeCheckSettingResponseHandler extends AbstractYkcHandler {
private final String type = YKCUtils.frameType2Str(YKCFrameTypeCode.TIME_CHECK_SETTING_ANSWER_CODE.getBytes());
@Autowired
private PileMsgRecordService pileMsgRecordService;
@Override
public void afterPropertiesSet() throws Exception {
YKCOperateFactory.register(type, this);
@@ -58,15 +52,7 @@ public class TimeCheckSettingResponseHandler extends AbstractYkcHandler {
Date date = Cp56Time2aUtil.byte2Hdate(currentTimeByteArr);
String deviceTime = DateUtils.formatDateTime(date);
String platformTime = DateUtils.getDateTime();
SavePileMsgDTO dto = SavePileMsgDTO.builder()
.pileSn(pileSn)
.connectorCode("")
.transactionCode("")
.frameType(type)
.jsonMsg("对时设置应答: deviceTime=" + deviceTime + ", platformTime=" + platformTime)
.originalMsg(ykcDataProtocol.getHEXString())
.build();
pileMsgRecordService.save(dto);
// 对时应答(0x55)仅记录日志,不再保存到 pile_msg_record避免日志表持续膨胀。
log.info("[===对时设置充电桩应答===], pileSn:{}, channelId:{}, 充电桩当前时间:{}, 平台当前时间:{}", pileSn, channel.channel().id().asShortText(), deviceTime, platformTime);
return null;
}

View File

@@ -76,8 +76,9 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_CONTROL_START_CHARGING_CODE.getBytes()),
YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_CONTROL_STOP_CHARGING_CODE.getBytes()),
YKCUtils.frameType2Str(YKCFrameTypeCode.RESERVATION_CHARGING_SETUP_CODE.getBytes()),
YKCUtils.frameType2Str(YKCFrameTypeCode.YUXIN_RESERVATION_CHARGING_SETUP_CODE.getBytes()),
YKCUtils.frameType2Str(YKCFrameTypeCode.TIME_CHECK_SETTING_CODE.getBytes())
YKCUtils.frameType2Str(YKCFrameTypeCode.YUXIN_RESERVATION_CHARGING_SETUP_CODE.getBytes())
// 对时帧(0x56)不再保存到 pile_msg_record避免日志表持续膨胀。
// YKCUtils.frameType2Str(YKCFrameTypeCode.TIME_CHECK_SETTING_CODE.getBytes())
);
/**

View File

@@ -68,7 +68,7 @@
#{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
<!--@mbg.generated-->
insert into thirdparty_parking_config
<trim prefix="(" suffix=")" suffixOverrides=",">