|
|
@ -275,6 +275,20 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void appointment(AppointmentFormDTO formDTO, TokenDto tokenDto) { |
|
|
|
IcPartyServiceCenterMatterEntity entity = matterService.selectById(formDTO.getMatterId()); |
|
|
|
if (null == entity){ |
|
|
|
throw new EpmetException("不存在此预约事项"); |
|
|
|
} |
|
|
|
List<String> dateList = getDateList(entity.getAppointmentType()); |
|
|
|
Boolean s = false; |
|
|
|
for (String d : dateList) { |
|
|
|
if (d.equals(formDTO.getAppointmentDate())){ |
|
|
|
s = true; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!s){ |
|
|
|
throw new EpmetException(EpmetErrorCode.ERROR_DATE.getCode()); |
|
|
|
} |
|
|
|
String customerId = tokenDto.getCustomerId(); |
|
|
|
LambdaQueryWrapper<IcMatterAppointmentRecordEntity> l = new LambdaQueryWrapper<>(); |
|
|
|
l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) |
|
|
@ -322,6 +336,20 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void appointmentMini(AppointmentMiniFormDTO formDTO, TokenDto tokenDto) { |
|
|
|
IcPartyServiceCenterMatterEntity entity = matterService.selectById(formDTO.getMatterId()); |
|
|
|
if (null == entity){ |
|
|
|
throw new EpmetException("不存在此预约事项"); |
|
|
|
} |
|
|
|
List<String> dateList = getDateList(entity.getAppointmentType()); |
|
|
|
Boolean s = false; |
|
|
|
for (String d : dateList) { |
|
|
|
if (d.equals(formDTO.getAppointmentDate())){ |
|
|
|
s = true; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!s){ |
|
|
|
throw new EpmetException(EpmetErrorCode.ERROR_DATE.getCode()); |
|
|
|
} |
|
|
|
String customerId = tokenDto.getCustomerId(); |
|
|
|
LambdaQueryWrapper<IcMatterAppointmentRecordEntity> l = new LambdaQueryWrapper<>(); |
|
|
|
l.eq(IcMatterAppointmentRecordEntity::getMatterId,formDTO.getMatterId()) |
|
|
@ -500,11 +528,6 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
Date date = DateUtils.addDateDays(new Date(), 2); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 【党群服务中心】预约记录 |
|
|
|
* @param formDTO |
|
|
|