k94314517
2024-12-13 ad86a0aa39f20e1b8bb511acd6961c7ec59f9251
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -82,7 +82,7 @@
    @Autowired
    private RetentionMapper retentionMapper;
    @Autowired
    private VisitsMapper visitsMapper;
    private VisitsJoinMapper visitsMapper;
    @Autowired
    private ApproveMapper approveMapper;
    @Autowired
@@ -1260,6 +1260,23 @@
        queryWrapper.isNull(Visits::getParentId);
        queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getMemberId()),Visits::getMemberId,pageWrap.getModel().getMemberId());
        queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getReceptMemberId()),Visits::getReceptMemberId,pageWrap.getModel().getReceptMemberId());
        if(Objects.nonNull(pageWrap.getModel().getBusinessStatus())){
            if(Constants.equalsInteger(pageWrap.getModel().getBusinessStatus(),Constants.TWO)){
                queryWrapper.in(Visits::getStatus,
                        Constants.VisitStatus.xfSuccess,
                        Constants.VisitStatus.xfFail,
                        Constants.VisitStatus.signin,
                        Constants.VisitStatus.signout,
                        Constants.VisitStatus.invalid,
                        Constants.VisitStatus.pass
                        );
            }else{
                queryWrapper.eq(Visits::getStatus,pageWrap.getModel().getBusinessStatus());
            }
        }
        queryWrapper.orderByDesc(Visits::getCreateDate);
        IPage<Visits> result = visitsJoinMapper.selectJoinPage(page, Visits.class,queryWrapper);
@@ -1392,6 +1409,18 @@
                            memberId)
            );
//        }
        Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda().eq(Notices::getObjId,visits.getId())
                .eq(Notices::getType,Constants.equalsInteger(visits.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit)
                        .eq(Notices::getUserId,memberId)
                        .eq(Notices::getSendacopy,Constants.ZERO)
                .last(" limit 1 ")
        );
        if(Objects.nonNull(notices)){
            notices.setInfo(notices.getInfo());
        }else{
            notices.setInfo("暂无");
        }
        return visitDetailVO;
    }