生成调度工单时命名规范
This commit is contained in:
parent
eea1272d42
commit
c5a730fe66
@ -167,7 +167,7 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
|
||||
List<EbikeInventoryRecord> list = new ArrayList<>();
|
||||
|
||||
if (!ecuInfo.getBindBattery()){
|
||||
if (!ecuInfo.getBindBattery()) {
|
||||
EbikeInventoryVo inventoryVo = EbikeInventoryVo.builder()
|
||||
.operatorId(operatorId)
|
||||
.inventoryType(1)
|
||||
@ -181,12 +181,12 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
.build();
|
||||
list.add(inventoryRecord);
|
||||
inventoryService.reduceInventory(inventoryVo);
|
||||
}else {
|
||||
} else {
|
||||
ecuInfo.setIsClaim(Boolean.TRUE);
|
||||
ebikeEcuInfoService.updateById(ecuInfo);
|
||||
}
|
||||
|
||||
if (bindVo.getHasHelme()){
|
||||
if (bindVo.getHasHelme()) {
|
||||
EbikeInventoryVo inventoryVo = EbikeInventoryVo.builder()
|
||||
.operatorId(operatorId)
|
||||
.inventoryType(2)
|
||||
@ -322,9 +322,9 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
}
|
||||
EbikeEcuInfo ebikeEcuInfo = ebikeEcuInfoService.getEcu(bikeCode);
|
||||
|
||||
ResGPSDto resGPSDto = (ResGPSDto)redisUtil.getEcu(ebikeEcuInfo.getEcuSn());
|
||||
ResGPSDto resGPSDto = (ResGPSDto) redisUtil.getEcu(ebikeEcuInfo.getEcuSn());
|
||||
|
||||
if (resGPSDto.getSoc() < 20){
|
||||
if (resGPSDto.getSoc() < 20) {
|
||||
throw new EbikeException("该车辆电量低,暂不能骑行");
|
||||
}
|
||||
|
||||
@ -469,7 +469,9 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
|
||||
EbikeDispatchConfiguration configuration = dispatchConfigurationService.getConfigurationByOperationId(info.getOperatorId());
|
||||
|
||||
redisUtil.saveNoDocument(bikeCode, "2", configuration.getDispatchDuration(), TimeUnit.HOURS);
|
||||
if (configuration != null && configuration.getDispatchDuration() != null) {
|
||||
redisUtil.saveNoDocument(bikeCode, LocalDateTime.now(), configuration.getDispatchDuration(), TimeUnit.HOURS);
|
||||
}
|
||||
|
||||
this.mapper.update(info);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user