| | |
| | | this.createFk(visits,true); |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.NOT_SUPPORTED) |
| | | void saveInterfaceLog(Object param, String path, String result, Integer type) { |
| | | InterfaceLog interfaceLog=new InterfaceLog(); |
| | | interfaceLog.setType(type); |
| | |
| | | //根据手机号和身份证号码查询 当前预约的时间是否与其他预约记录有冲突 |
| | | if (visitsMapper.selectCount(new QueryWrapper<Visits>().lambda() |
| | | .notIn(Visits::getStatus,Constants.VisitStatus.cancel,Constants.VisitStatus.noPass,Constants.VisitStatus.xfFail,Constants.VisitStatus.signout,Constants.VisitStatus.invalid) |
| | | .eq(Visits::getIdcardDecode, Constants.getTuominStr(cardno)) |
| | | // .eq(Visits::getIdcardDecode, Constants.getTuominStr(cardno)) |
| | | .and(ms -> ms.eq(Visits::getPhone, visits.getPhone()) |
| | | .or().eq(Visits::getIdcardDecode, Constants.getTuominStr(cardno))) |
| | | .and(ms -> ms.apply(" visits.STARTTIME <= '" + DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm:ss") + "' and visits.ENDTIME >= '" + DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm:ss") + "' ") |
| | | .or().apply(" visits.STARTTIME <= '" + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm:ss") + "' and visits.ENDTIME >= '" + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm:ss") + "' ") |
| | | )) > Constants.ZERO) { |
| | | .or().apply(" visits.STARTTIME >= '" + DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm:ss") + "' and visits.ENDTIME <= '" + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm:ss") + "' ") |
| | | .or().apply(" visits.STARTTIME <= '" + DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm:ss") + "' and visits.ENDTIME >= '" + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm:ss") + "' ") |
| | | ) |
| | | ) > Constants.ZERO) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对不起,手机号【"+member.getPhone()+"】或身份证【"+ member.getIdcardDecode() +"】存在预约时间冲突,无法申请哦!"); |
| | | } |
| | | return member; |