jiangping
2024-05-27 f360321afa268f8d4e6c19e9a45eaf9f70c770b2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -616,13 +616,15 @@
        }
        //访客报备
        if(visits.getType().equals(Constants.TWO)
         && (StringUtils.isBlank( visits.getName())
            && (StringUtils.isBlank( visits.getName())
                ||  StringUtils.isBlank( visits.getPhone())
                ||  StringUtils.isBlank( visits.getCompanyName()))
                ||  StringUtils.isBlank( visits.getCarNos())
                ||  Objects.isNull( visits.getMemberNum())
        ){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,信息填写不正确!");
        }else if(visits.getType().equals(Constants.ONE) && StringUtils.isBlank(visits.getConstructionReason())){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,未填写施工事由!");
        }
        if(visits.getEndtime().getTime() < System.currentTimeMillis()){
            throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,入厂时间必须大于当前时间!");//
@@ -1213,7 +1215,7 @@
    @Override
    public VisitDetailVO getVisitDetail(Integer id){
    public VisitDetailVO getVisitDetail(Integer id,Integer memberId){
        Visits visits = visitsMapper.selectById(id);
        if(Objects.isNull(visits)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY);
@@ -1257,6 +1259,15 @@
                visitsMapper.selectList(new QueryWrapper<Visits>().lambda()
                .select(Visits::getName,Visits::getPhone,Visits::getQrcode,Visits::getFaceImg,Visits::getImgurl,Visits::getIdcardDecode,Visits::getStatus)
                .eq(Visits::getParentId,id)));
        if(Objects.nonNull(memberId)){
            visitDetailVO.setApproveDateVO(
                    approveService.arrangeApprovedData(id,
                            visits.getType(),
                            memberId)
            );
        }
        return visitDetailVO;
    }