sinake
6 天以前 66fd4f82f8567454d0b93cfe6e519801857d156a
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -12,7 +12,9 @@
import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper;
import cn.lihu.jh.module.ecg.enums.DevRentStateEnum;
import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.cxf.common.util.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -86,6 +88,24 @@
        queueMapper.updateById(updateObj);
    }
    public void updateStop(long roomId,String bedNo) {
        // 校验存在
       if(ObjectUtils.isNotEmpty(roomId)) {
           QueueDO updateObj=new QueueDO();
           updateObj.setStatus(40);
           UpdateWrapper<QueueDO> wrapper=new UpdateWrapper<>();
           wrapper.eq("room_id",roomId).eq("bed_no",bedNo).eq("status","30");
           queueMapper.update(updateObj,wrapper);
           QueueDO updateObj1=new QueueDO();
           updateObj1.setRoomId(0l);
           updateObj1.setBedNo(" ");
           UpdateWrapper<QueueDO> wrapper1=new UpdateWrapper<>();
           wrapper1.eq("room_id",roomId).eq("bed_no",bedNo).eq("status","20");
           queueMapper.update(updateObj1,wrapper1);
       }
    }
    @Override
    public void deletequeue(Integer id) {
        // 校验存在