| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.jeecg.modules.mdc.entity.MdcDeviceCalendar; |
| | | import org.jeecg.modules.mdc.entity.MdcEquipment; |
| | | import org.jeecg.modules.mdc.entity.MdcShiftSub; |
| | | import org.jeecg.modules.mdc.entity.MdcVacationManagement; |
| | | import org.jeecg.modules.mdc.entity.*; |
| | | import org.jeecg.modules.mdc.mapper.MdcDeviceCalendarMapper; |
| | | import org.jeecg.modules.mdc.service.IMdcDeviceCalendarService; |
| | | import org.jeecg.modules.mdc.service.IMdcEquipmentService; |
| | |
| | | public List<MdcDeviceCalendarVo> listByEquipmentAndDate(String equipmentId, List<String> stringDates) { |
| | | List<MdcDeviceCalendarVo> result = new ArrayList<>(); |
| | | try { |
| | | //查询默认班制 |
| | | // List<MdcDeviceCalendarVo> acquiesceShift = this.baseMapper.findAcquiesceShift(); |
| | | |
| | | for (String stringDate : stringDates) { |
| | | List<MdcDeviceCalendarVo> mdcDeviceCalendarVos = this.baseMapper.listByEquipmentAndDate(equipmentId, stringDate); |
| | | if (mdcDeviceCalendarVos != null && !mdcDeviceCalendarVos.isEmpty()) { |
| | | result.addAll(mdcDeviceCalendarVos); |
| | | } |
| | | // else { |
| | | // acquiesceShift.forEach(mdcDeviceCalendarVo -> { |
| | | // mdcDeviceCalendarVo.setEquipmentId(equipmentId); |
| | | // mdcDeviceCalendarVo.setEffectiveDate(stringDate); |
| | | // }); |
| | | // // 设置默认班制 |
| | | // result.addAll(acquiesceShift); |
| | | // } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public MdcDeviceCalendar getFirstData(String equipmentId) { |
| | | return this.baseMapper.getFirstData(equipmentId); |
| | | } |
| | | |
| | | } |