kongzy
2023-11-01 dd8795a2675e32b25abe98f644f80d5f72fadb90
src/main/java/com/nanometer/smartlab/service/SysContainerSensorsServiceImpl.java
@@ -7,8 +7,11 @@
import com.nanometer.smartlab.entity.SysLaboratoryContainer;
import com.nanometer.smartlab.entity.SysWarehouseContainer;
import com.nanometer.smartlab.entity.dto.ContainerStatusMngDto;
import com.nanometer.smartlab.exception.BusinessException;
import com.nanometer.smartlab.exception.ExceptionEnumCode;
import com.nanometer.smartlab.util.Constants;
import com.nanometer.smartlab.util.IDUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.log4j.Logger;
@@ -18,6 +21,7 @@
import org.springframework.util.Assert;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.*;
@@ -109,5 +113,31 @@
        return sysContainerSensorsDao.countAll(params);
    }
    @Override
    public ContainerStatusMngDto getRowData(String rowKey) {
        return sysContainerSensorsDao.getRowData(rowKey);
    }
    @Override
    public Map<String,BigDecimal> selectMaxTemperature(String selectedContainerId, String beginDate, String endDate) {
        if (StringUtils.isBlank(selectedContainerId))
            throw new BusinessException(ExceptionEnumCode.PARAM_NULL,"参数为空");
        return sysContainerSensorsDao.selectMaxTemperature( selectedContainerId,  beginDate,  endDate);
    }
    @Override
    public Map<String,BigDecimal> selectMaxHumidity(String selectedContainerId, String beginDate, String endDate) {
        if (StringUtils.isBlank(selectedContainerId))
            throw new BusinessException(ExceptionEnumCode.PARAM_NULL,"参数为空");
        return sysContainerSensorsDao.selectMaxHumidity(selectedContainerId,  beginDate,  endDate);
    }
    @Override
    public Map<String,BigDecimal> selectMaxVoc(String selectedContainerId, String beginDate, String endDate) {
        if (StringUtils.isBlank(selectedContainerId))
            throw new BusinessException(ExceptionEnumCode.PARAM_NULL,"参数为空");
        return sysContainerSensorsDao.selectMaxVoc(selectedContainerId,  beginDate,  endDate);
    }
}