jiangping
2024-10-15 38ac48eeebbf0f046cc75f280e782bc64783af97
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -199,27 +199,31 @@
                    .eq(Device::getDoorId,request.getSrcIndex())
                    .eq(Device::getIsdeleted,Constants.ZERO)
                    .last("limit 1" ));
            if(d!=null && !(Constants.equalsInteger(d.getIsEntrance(),Constants.ONE) && Constants.formatIntegerNum(request.getData().getExtEventInOut()) != Constants.ONE)){
                //如果是进门,录入人员的在场数据记录
                inoutDayCount.setInMemberNum(Constants.formatIntegerNum(inoutDayCount.getInMemberNum())+1);//入场人次
            }else{
                inoutDayCount.setOutMemberNum(Constants.formatIntegerNum(inoutDayCount.getOutMemberNum())+1);//离场人次
            if(d!=null && !Constants.equalsInteger(d.getIsEntrance(),Constants.ONE)){
                if(Constants.formatIntegerNum(request.getData().getExtEventInOut()) != Constants.ONE){
                    //如果是进门,录入人员的在场数据记录
                    inoutDayCount.setInMemberNum(Constants.formatIntegerNum(inoutDayCount.getInMemberNum())+1);//入场人次
                }else{
                    inoutDayCount.setOutMemberNum(Constants.formatIntegerNum(inoutDayCount.getOutMemberNum())+1);//离场人次
                }
            }
            if(member !=null){
                delRetentionLis.add(member.getId());
                if(d!=null && !(Constants.equalsInteger(d.getIsEntrance(),Constants.ONE) && Constants.formatIntegerNum(request.getData().getExtEventInOut()) != Constants.ONE)){
                    //如果是进门,录入人员的在场数据记录
                    retentionList.add(getRetentionModelByRequest(member,request));
                    if(Constants.equalsInteger(member.getCompanyType(),Constants.ONE)){
                        inoutDayCount.setInSelfMemberNum(Constants.formatIntegerNum(inoutDayCount.getInSelfMemberNum())+1);//内部人员入场人次
                if(d!=null && !Constants.equalsInteger(d.getIsEntrance(),Constants.ONE)){
                    delRetentionLis.add(member.getId());
                    if( Constants.formatIntegerNum(request.getData().getExtEventInOut()) != Constants.ONE){
                        //如果是进门,录入人员的在场数据记录
                        retentionList.add(getRetentionModelByRequest(member,request));
                        if(Constants.equalsInteger(member.getCompanyType(),Constants.ONE)){
                            inoutDayCount.setInSelfMemberNum(Constants.formatIntegerNum(inoutDayCount.getInSelfMemberNum())+1);//内部人员入场人次
                        }else{
                            inoutDayCount.setInOtherMemberNum(Constants.formatIntegerNum(inoutDayCount.getInOtherMemberNum())+1);//相关方入场人次
                        }
                    }else{
                        inoutDayCount.setInOtherMemberNum(Constants.formatIntegerNum(inoutDayCount.getInOtherMemberNum())+1);//相关方入场人次
                    }
                }else{
                    if(Constants.equalsInteger(member.getCompanyType(),Constants.ONE)){
                        inoutDayCount.setOutSelfMemberNum(Constants.formatIntegerNum(inoutDayCount.getOutSelfMemberNum())+1);//内部人员出场人次
                    }else{
                        inoutDayCount.setOutOtherMemberNum(Constants.formatIntegerNum(inoutDayCount.getOutOtherMemberNum())+1);//相关方出场人次
                        if(Constants.equalsInteger(member.getCompanyType(),Constants.ONE)){
                            inoutDayCount.setOutSelfMemberNum(Constants.formatIntegerNum(inoutDayCount.getOutSelfMemberNum())+1);//内部人员出场人次
                        }else{
                            inoutDayCount.setOutOtherMemberNum(Constants.formatIntegerNum(inoutDayCount.getOutOtherMemberNum())+1);//相关方出场人次
                        }
                    }
                }
            }