| | |
| | | */ |
| | | @Override |
| | | public List<MdcDeviceCalendarVo> listByEquipmentAndDate(String equipmentId, List<String> stringDates) { |
| | | List<MdcDeviceCalendarVo> result = new ArrayList<>(); |
| | | try { |
| | | for (String stringDate : stringDates) { |
| | | List<MdcDeviceCalendarVo> mdcDeviceCalendarVos = this.baseMapper.listByEquipmentAndDate(equipmentId, stringDate); |
| | | if (mdcDeviceCalendarVos != null && !mdcDeviceCalendarVos.isEmpty()) { |
| | | result.addAll(mdcDeviceCalendarVos); |
| | | } |
| | | List<MdcDeviceCalendarVo> mdcDeviceCalendarVos = this.baseMapper.listByEquipmentAndDates(equipmentId, stringDates); |
| | | if (mdcDeviceCalendarVos != null && !mdcDeviceCalendarVos.isEmpty()) { |
| | | return mdcDeviceCalendarVos; |
| | | } else { |
| | | return null; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | |
| | | public BigDecimal computeShiftTimeCount(String equipmentId, String validDate) { |
| | | validDate = validDate.replaceAll("-", ""); |
| | | Integer shiftCount = this.baseMapper.computeShiftTimeCount(equipmentId, validDate); |
| | | return new BigDecimal(shiftCount).multiply(new BigDecimal("8")).multiply(new BigDecimal("60")); |
| | | return new BigDecimal(shiftCount); |
| | | } |
| | | |
| | | /** |