| | |
| | | import com.ruoyi.system.mapper.DeviceUsageMapper; |
| | | import com.ruoyi.system.model.DeviceUsage; |
| | | import com.ruoyi.system.model.Record; |
| | | import com.ruoyi.system.query.DeviceListQuery; |
| | | import com.ruoyi.system.query.*; |
| | | import com.ruoyi.system.service.DeviceUsageService; |
| | | import com.ruoyi.system.vo.DeviceListVo; |
| | | import com.ruoyi.system.vo.*; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | return deviceList; |
| | | } |
| | | |
| | | @Override |
| | | public List<EntrustProjectVo> projectList( Page<EntrustProjectVo> page,EntrustListQuery query) { |
| | | Integer pageNum = query.getPageNum(); |
| | | Integer pageSize = query.getPageSize(); |
| | | List<EntrustProjectVo> deviceList = this.baseMapper.projectList(page,query); |
| | | for (EntrustProjectVo deviceListVo : deviceList) { |
| | | LocalDateTime checkTime = deviceListVo.getCheckTime(); |
| | | // 判断checkTime是否是本月的时间 |
| | | if (checkTime != null && YearMonth.from(checkTime).equals(YearMonth.now())) { |
| | | deviceListVo.setCheckResult("已检查"); |
| | | }else { |
| | | deviceListVo.setCheckResult("未检查"); |
| | | } |
| | | } |
| | | return deviceList; |
| | | } |
| | | |
| | | @Override |
| | | public List<EntrustProjectReportVo> projectReport(Page<EntrustProjectReportVo> page, ProjectReportListQuery query) { |
| | | List<EntrustProjectReportVo> entrustProjectReportVoList = this.baseMapper.projectReport(page,query); |
| | | return entrustProjectReportVoList; |
| | | } |
| | | |
| | | @Override |
| | | public List<EntrustDeviceListVo> deviceList(Page<EntrustDeviceListVo> page, EntrustDeviceListQuery query) { |
| | | List<EntrustDeviceListVo> deviceList = this.baseMapper.deviceList(page, query); |
| | | for (EntrustDeviceListVo deviceListVo : deviceList) { |
| | | LocalDateTime checkTime = deviceListVo.getCheckTime(); |
| | | // 判断checkTime是否是本月的时间 |
| | | if (checkTime != null && YearMonth.from(checkTime).equals(YearMonth.now())) { |
| | | deviceListVo.setCheckResult("已检查"); |
| | | }else { |
| | | deviceListVo.setCheckResult("未检查"); |
| | | } |
| | | } |
| | | return deviceList; |
| | | } |
| | | |
| | | @Override |
| | | public List<ErrorListVo> errorList(Page<ErrorListVo> page, ErrorListQuery query) { |
| | | List<ErrorListVo> errorList = this.baseMapper.errorList(page, query); |
| | | return errorList; |
| | | } |
| | | |
| | | @Override |
| | | public List<ErrorListVo> deviceErrorList(Page<ErrorListVo> page, ErrorListQuery query) { |
| | | List<ErrorListVo> errorList = this.baseMapper.deviceErrorList(page, query); |
| | | return errorList; } |
| | | |
| | | @Override |
| | | public List<ErrorListVo> safetyErrorList(Page<ErrorListVo> page, ErrorListQuery query) { |
| | | List<ErrorListVo> errorList = this.baseMapper.safetyErrorList(page, query); |
| | | return errorList; } |
| | | |
| | | |
| | | } |