rk
3 天以前 f8ad853042ef31067711ff29a9b36e7ffababa21
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/JkCabinetGridServiceImpl.java
@@ -35,6 +35,7 @@
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -519,6 +520,8 @@
                        JkCabinetLog lastOutLog = jkCabinetLogMapper.selectOne(new QueryWrapper<JkCabinetLog>().lambda()
                                .eq(JkCabinetLog::getKeyId,jkCabinetLog.getKeyId())
                                .eq(JkCabinetLog::getType,Constants.ZERO)
                                .isNull(JkCabinetLog::getKeyStatus)
                                .isNotNull(JkCabinetLog::getOpenWay)
                                .orderByDesc(JkCabinetLog::getId)
                                .last( "limit 1 "));
                        if(Objects.nonNull(lastOutLog)){
@@ -622,7 +625,7 @@
                    return jkCabinetGridList;
                }
                List<String> authMemberList =  Arrays.asList(jkCabinet.getAuthMemberId().split(","));
                if(!authMemberList.contains(dto.getAutoMemberId())){
                if(!authMemberList.contains(dto.getAutoMemberId().toString())){
                    return jkCabinetGridList;
                }
            }
@@ -685,7 +688,7 @@
                                .isNotNull(JkCabinetGrid::getKeyId)
                                .apply(" ( t2.code in ( select c.car_code from car_use_book c   where c.isdeleted = 0   and NOW() > DATE_SUB(c.START_TIME, INTERVAL "+earlyConfig+" MINUTE) and now() < c.end_time  " +
                                        " and   c.DRIVER_ID = "+dto.getMemberId()+"   )" +
                                        " or t2.code in ( select c.car_code from car_use_book c inner join  cars c1 on c.CAR_ID = c1.ID  where c1.MEMBER_ID = 6611 AND NOW() > DATE_SUB( c.START_TIME, INTERVAL 30 MINUTE ) AND now() < c.end_time )" +
                                        " or t2.code in ( select c.car_code from car_use_book c inner join  cars c1 on c.CAR_ID = c1.ID  where c1.MEMBER_ID = "+dto.getMemberId()+" AND NOW() > DATE_SUB( c.START_TIME, INTERVAL 30 MINUTE ) AND now() < c.end_time )" +
                                        " )" +
                                        " ")
                );