mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 电池报告算法逻辑
This commit is contained in:
@@ -68,6 +68,7 @@ public class BatteryChargeReportService {
|
||||
@Autowired
|
||||
private PileStationInfoService pileStationInfoService;
|
||||
|
||||
@Autowired
|
||||
private ChargeAlgorithmRecordService chargeAlgorithmRecordService;
|
||||
|
||||
/**
|
||||
@@ -100,12 +101,16 @@ public class BatteryChargeReportService {
|
||||
log.error("订单:{} 获取到 taskId 为空", orderCode);
|
||||
return null;
|
||||
}
|
||||
// 存入数据库
|
||||
ChargeAlgorithmRecord record = new ChargeAlgorithmRecord();
|
||||
record.setOrderCode(orderCode);
|
||||
record.setTaskId(taskId);
|
||||
chargeAlgorithmRecordService.insertOrUpdateSelective(record);
|
||||
|
||||
ChargeAlgorithmRecord record = chargeAlgorithmRecordService.queryRecordByOrderCode(orderCode);
|
||||
if (record != null) {
|
||||
record.setTaskId(taskId);
|
||||
chargeAlgorithmRecordService.updateChargeAlgorithmRecord(record);
|
||||
}else {
|
||||
record = new ChargeAlgorithmRecord();
|
||||
record.setTaskId(taskId);
|
||||
record.setOrderCode(orderCode);
|
||||
chargeAlgorithmRecordService.insertOrUpdateSelective(record);
|
||||
}
|
||||
return taskId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user