生成调度工单时命名规范
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("该车辆电量低,暂不能骑行");
|
||||
}
|
||||
|
||||
@ -342,13 +342,13 @@ public class EbikeBikeInfoServiceImpl extends ServiceImpl<EbikeBikeInfoMapper, E
|
||||
.where(EBIKE_BIKE_ORDER.HANDLE_STATE.eq(OrderHandleState.PROCESSED))
|
||||
.where(EBIKE_BIKE_ORDER.DISPATCH_STATE.eq(OrderDispatchState.PROCESSED));
|
||||
EbikeBikeOrder bikeOrder = orderMapper.selectOneByQuery(query);
|
||||
if (bikeOrder != null) {
|
||||
redisUtil.deleteDispatchOrder(bikeOrder.getOrderId());
|
||||
bikeOrder.setDispatchState(OrderDispatchState.EFFECTIVE);
|
||||
orderMapper.update(bikeOrder);
|
||||
}
|
||||
if (bikeOrder != null) {
|
||||
redisUtil.deleteDispatchOrder(bikeOrder.getOrderId());
|
||||
bikeOrder.setDispatchState(OrderDispatchState.EFFECTIVE);
|
||||
orderMapper.update(bikeOrder);
|
||||
}
|
||||
|
||||
//若存在未处理/已接单的调度工单:作废未处理的调度工单
|
||||
//若存在未处理/已接单的调度工单:作废未处理的调度工单
|
||||
List<Integer> list = new ArrayList<>();
|
||||
list.add(OrderHandleState.UNPROCESSED);
|
||||
list.add(OrderHandleState.ACCEPTED);
|
||||
@ -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