| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DeviceMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.Retention; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 设备信息表Service实现 |
| | |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Autowired |
| | | private HKService hkService; |
| | | |
| | | @Override |
| | | public Integer create(Device device) { |
| | |
| | | QueryWrapper<Device> wrapper = new QueryWrapper<>(device); |
| | | return deviceMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<Device> findIdAndNameList(Device param) { |
| | | LambdaQueryWrapper<Device> wrapper = new LambdaQueryWrapper<>(param); |
| | | wrapper.select(Device::getId, Device::getName); |
| | | if(null != param.getType() && null != param.getIsdeleted() && null != param.getHkStatus()) { |
| | | wrapper.eq(Device::getType,param.getType()) |
| | | .eq(Device::getIsdeleted,param.getIsdeleted()) |
| | | .eq(Device::getHkStatus,param.getHkStatus()); |
| | | } |
| | | return deviceMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<Device> findPage(PageWrap<Device> pageWrap) { |