| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.jeecg.common.system.vo.DictModel; |
| | | import org.jeecg.modules.mdc.dto.MdcEquipmentStatisticalDto; |
| | | import org.jeecg.modules.mdc.entity.*; |
| | | import org.jeecg.modules.mdc.mapper.MdcEquipmentStatisticalInfoMapper; |
| | | import org.jeecg.modules.mdc.service.*; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | } |
| | | return equipmentStatisticalInfos; |
| | | } |
| | | |
| | | /** |
| | | * 查询设备运行时间 |
| | | * |
| | | * @param equipmentId |
| | | * @param validDate |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer selectProcessLong(String equipmentId, String validDate) { |
| | | Integer processLong = this.baseMapper.selectProcessLong(equipmentId, validDate); |
| | | if (processLong == null) { |
| | | return 0; |
| | | } else { |
| | | return Integer.parseInt(new BigDecimal(processLong).divide(new BigDecimal("60"), 0, RoundingMode.HALF_UP).toString()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public MdcEquipmentStatisticalDto findByEquipmentAndMonth(String equipmentId, String date) { |
| | | return this.baseMapper.findByEquipmentAndMonth(equipmentId, date); |
| | | } |
| | | } |