Commit 0967fa7d by 吕明尚

Merge branch 'dev' into dev-lms

parents 941000a0 995cb851
package share.system.service.impl;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import share.common.constant.Constants;
import share.common.core.page.TableDataInfo;
import share.common.enums.*;
import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.system.domain.*;
import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.SCleanRecordsVo;
import share.system.mapper.*;
import share.system.service.*;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 保洁记录Service业务层处理
*
......@@ -467,7 +467,12 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
throw new RuntimeException("当前保洁任务不存在!");
}
int index = updateSCleanRecords(sCleanRecords);
if (index > 0) {
//查询当前房间是否有正在使用的订单
SOrder one = orderService.getOne(new LambdaQueryWrapper<SOrder>().
eq(SOrder::getRoomId, records.getRoomId()).
eq(SOrder::getStatus, OrderStatusEnum.INUSE.getCode()));
//没有,断电
if (ObjectUtils.isEmpty(one)) {
// 断电
deviceOpService.openOrCloseDevice(records.getRoomId(), records.getPhone(), OpTypeEnum.CUT_ELECTRIC.getCode(), true, 5);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment