车辆预约判断状态bug修复
This commit is contained in:
parent
d133211275
commit
8de4e31035
@ -183,6 +183,7 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
||||
List<CarInfoApprovalFlow> flows = carInfoApprovalFlowMapper.selectList(new LambdaQueryWrapper<CarInfoApprovalFlow>()
|
||||
.eq(CarInfoApprovalFlow::getProjectSn, c.getProjectSn())
|
||||
.eq(CarInfoApprovalFlow::getCarNumber, c.getCarNumber())
|
||||
.last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
||||
);
|
||||
List<CarInfoApprovalFlow> otherFlows = flows.stream().filter(f -> !Objects.equals(c.getEnterpriseId(), f.getEnterpriseId())).collect(Collectors.toList());
|
||||
boolean overlap = otherFlows.stream().anyMatch(f -> DateUtil.compare(f.getReserveStartTime(), c.getReserveEndTime()) < 0 && DateUtil.compare(f.getReserveEndTime(), c.getReserveStartTime()) > 0);
|
||||
@ -503,7 +504,8 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
||||
carInfo.setEnterpriseId(workerInfo.getEnterpriseId());
|
||||
QueryWrapper<CarInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(CarInfo::getProjectSn, carInfo.getProjectSn())
|
||||
.eq(CarInfo::getCarNumber, carInfo.getCarNumber());
|
||||
.eq(CarInfo::getCarNumber, carInfo.getCarNumber())
|
||||
.last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||
CarInfo old = this.getOne(queryWrapper);
|
||||
if (old != null && Objects.equals(old.getIsBlack(), 1)) {
|
||||
map.put("success", false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user