| | |
| | | import com.sandu.common.service.impl.BaseServiceImpl; |
| | | import com.sandu.common.util.SpringContextHolder; |
| | | import com.sandu.ximon.admin.manager.iot.frame.A5Frame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5AtmosphereHeartBeatTimeReportInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5AtmosphereOperationReportInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5AtmosphereQueryVersionReportInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.request.AtmosphereQueryHeartBeatTimeReqInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.request.AtmosphereQueryVersionReqInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.request.AtmosphereRebootReqInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.request.AtmosphereSetHeartBeatTimeReqInnerFrame; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.dto.CommonFrame; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.enums.A5OrderEnum; |
| | |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.admin.utils.StringUtil; |
| | | import com.sandu.ximon.dao.bo.AirEquipmentNongGengBo; |
| | | import com.sandu.ximon.dao.domain.AirEquipment; |
| | | import com.sandu.ximon.dao.domain.AirEquipmentNongGeng; |
| | | import com.sandu.ximon.dao.mapper.AirEquipmentNongGengMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | } |
| | | List<AirEquipmentNongGengBo> airEquipmentBos; |
| | | // if (SecurityUtils.getClientId() == null) { |
| | | // airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(keyword, null); |
| | | // } else { |
| | | // airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(keyword, SecurityUtils.getUserId()); |
| | | // } |
| | | if (SecurityUtils.getClientId() == null) { |
| | | airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(keyword, null); |
| | | } else { |
| | | airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(keyword, SecurityUtils.getUserId()); |
| | | } |
| | | |
| | | if (SecurityUtils.getClientId() == null) { |
| | | airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(keyword, null); |
| | |
| | | * 大气设备列表(农耕,用于首页数据统计) |
| | | */ |
| | | public List<AirEquipmentNongGengBo> listAirEquipmentOnHome() { |
| | | // List<AirEquipmentNongGengBo> airEquipmentBos; |
| | | // if (SecurityUtils.getClientId() == null) { |
| | | // airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(null, null); |
| | | // } else { |
| | | // airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(null, SecurityUtils.getUserId()); |
| | | // } |
| | | List<AirEquipmentNongGengBo> airEquipmentBos; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(null, null); |
| | | } else { |
| | | airEquipmentBos = airEquipmentNongGengMapper.listAirEquipmentByIds(null, SecurityUtils.getUserId()); |
| | | } |
| | | |
| | | // return airEquipmentBos; |
| | | return null; |
| | | return airEquipmentBos; |
| | | // return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | throw new BusinessException("数据校验异常!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置类型 |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean setAirEquipmentType(AirEquipmentNongGeng param) { |
| | | if (param.getType() == null || param.getId() == null || param.getType().isEmpty()) { |
| | | throw new BusinessException("设备id或类型不能为空"); |
| | | } |
| | | if (!"0".equals(param.getType()) && !"1".equals(param.getType()) && !"2".equals(param.getType())) { |
| | | throw new BusinessException("设备类型不正确"); |
| | | } |
| | | AirEquipmentNongGeng byId = getById(param.getId()); |
| | | if (byId == null) { |
| | | throw new BusinessException("设备id错误或设备不存在!"); |
| | | } |
| | | byId.setType(param.getType()); |
| | | |
| | | return updateById(byId); |
| | | } |
| | | } |