Browse Source

emm

dev_shibei_match
zxc 4 years ago
parent
commit
706f12873c
  1. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 17
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java

3
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -149,6 +149,9 @@ public enum EpmetErrorCode {
// 删除可预约事项存在预约记录时提示
MATTER_EXISTS_APPOINTMENT_ERROR(8526, "尚有未履行的预约存在,请确认后操作"),
// 预约某事项在某时间段存在记录时
APPOINTMENT_TIME_ERROR(8527, "该时间段已被预约,请选择其他时间段"),
// 该错误不会提示给前端,只是后端传输错误信息用。
ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"),
OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"),

17
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java

@ -231,8 +231,21 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
@Override
public void appointment(AppointmentFormDTO formDTO, TokenDto tokenDto) {
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());
if (null == staffInfo){
throw new RenException(String.format("查询人员{%s}信息失败",tokenDto.getUserId()));

Loading…
Cancel
Save