同步获取响应数据

This commit is contained in:
Guoqs
2024-08-01 16:50:16 +08:00
parent ea1a0c81f1
commit e7e8848b00
4 changed files with 1 additions and 30 deletions

View File

@@ -78,7 +78,7 @@ public class TempController extends BaseController {
*/
@PostMapping("/proofreadTimeTest")
public AjaxResult proofreadTimeTest(@RequestBody QueryPileDTO queryPileDTO) {
pileRemoteService.proofreadTimeTest(queryPileDTO.getPileSn());
pileRemoteService.proofreadTime(queryPileDTO.getPileSn());
return AjaxResult.success();
}

View File

@@ -151,16 +151,6 @@ public class PileRemoteService {
ykcPushCommandService.pushProofreadTimeCommand(command);
}
public void proofreadTimeTest(String pileSn) {
ProofreadTimeCommand command = ProofreadTimeCommand.builder().pileSn(pileSn).build();
try {
ykcPushCommandService.pushProofreadTimeCommandTest(command);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* 下发充电桩计费模型
*/

View File

@@ -84,5 +84,4 @@ public interface YKCPushCommandService {
*/
void pushReservationChargingCommand(ReservationChargingCommand command);
void pushProofreadTimeCommandTest(ProofreadTimeCommand command) throws Exception;
}

View File

@@ -401,24 +401,6 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
log.info("[充电桩:{}对时, 时间:{}, CP56Time2a:{}]", pileSn, DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date), BytesUtil.binary(dateBytes, 16));
}
@Override
public void pushProofreadTimeCommandTest(ProofreadTimeCommand command) throws Exception {
String pileSn = command.getPileSn();
byte[] pileSnByteArr = BytesUtil.str2Bcd(pileSn);
// 时间
Date date = DateUtils.parseDate(DateUtils.getDateTime());
byte[] dateBytes = Cp56Time2aUtil.date2Hbyte(date);
// 拼装msg
byte[] msg = Bytes.concat(pileSnByteArr, dateBytes);
byte[] bytes = this.send(msg, pileSn, YKCFrameTypeCode.TIME_CHECK_SETTING_CODE);
log.info("[充电桩:{}对时, 时间:{}, CP56Time2a:{}], 响应:{}",
pileSn, DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, date), BytesUtil.binary(dateBytes, 16), BytesUtil.binary(bytes, 16));
}
/**
* 向充电桩发送计费模板
*