|
@ -231,8 +231,21 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ |
|
|
@Override |
|
|
@Override |
|
|
public void appointment(AppointmentFormDTO formDTO, TokenDto tokenDto) { |
|
|
public void appointment(AppointmentFormDTO formDTO, TokenDto tokenDto) { |
|
|
String customerId = tokenDto.getCustomerId(); |
|
|
String customerId = tokenDto.getCustomerId(); |
|
|
// TODO 后台认证是不是可以预约
|
|
|
LambdaQueryWrapper<IcMatterAppointmentRecordEntity> l = new LambdaQueryWrapper<>(); |
|
|
|
|
|
l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) |
|
|
|
|
|
.eq(IcMatterAppointmentRecordEntity::getAppointmentDate,formDTO.getAppointmentDate()) |
|
|
|
|
|
.eq(IcMatterAppointmentRecordEntity::getStatus,PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING) |
|
|
|
|
|
.eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO); |
|
|
|
|
|
List<IcMatterAppointmentRecordEntity> records = matterAppointmentRecordDao.selectList(l); |
|
|
|
|
|
if (CollectionUtils.isNotEmpty(records)){ |
|
|
|
|
|
List<String> timeIds = new ArrayList<>(); |
|
|
|
|
|
records.forEach(r -> { |
|
|
|
|
|
timeIds.addAll(Arrays.asList(r.getTimeId().split(","))); |
|
|
|
|
|
}); |
|
|
|
|
|
if (timeIds.retainAll(Arrays.asList(formDTO.getTimeId().split(",")))){ |
|
|
|
|
|
throw new RenException(EpmetErrorCode.APPOINTMENT_TIME_ERROR.getCode()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); |
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, tokenDto.getUserId()); |
|
|
if (null == staffInfo){ |
|
|
if (null == staffInfo){ |
|
|
throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); |
|
|
throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId())); |
|
|