| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.dispatcher.entity.DispatcherUnit; |
| | | import org.springblade.modules.dispatcher.mapper.DispatcherUnitMapper; |
| | | import org.springblade.modules.dispatcher.service.IDispatcherService; |
| | | import org.springblade.modules.dispatcher.service.IDispatcherUnitService; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | @Service |
| | | public class DispatcherUnitServiceImpl extends ServiceImpl<DispatcherUnitMapper, DispatcherUnit> implements IDispatcherUnitService { |
| | | |
| | | @Autowired |
| | | private IDispatcherService dispatcherService; |
| | | |
| | | |
| | | @Override |
| | | public IPage<DispatcherUnitVO> selectDispatcherUnitPage(IPage<DispatcherUnitVO> page, DispatcherUnitVO dispatcherUnitVO) { |
| | | return page.setRecords(baseMapper.selectDispatcherUnitPage(page, dispatcherUnitVO)); |
| | | List<DispatcherUnitVO> dispatcherUnitVOS = baseMapper.selectDispatcherUnitPage(page, dispatcherUnitVO); |
| | | dispatcherUnitVOS.forEach(dispatcherUnitVO1 -> { |
| | | //查询派遣到每家单位的保安员数量 |
| | | dispatcherUnitVO1.setNum(dispatcherService.getDispatcherNum(dispatcherUnitVO1)); |
| | | }); |
| | | return page.setRecords(dispatcherUnitVOS); |
| | | } |
| | | |
| | | /** |
| | |
| | | public DispatcherUnitVO selectDispatcherUnitInfo(DispatcherUnit dispatcherUnit) { |
| | | return baseMapper.selectDispatcherUnitInfo(dispatcherUnit); |
| | | } |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<DispatcherUnitVO> selectDispatcherUnitPageTree(DispatcherUnitVO dispatcher) { |
| | | return baseMapper.selectDispatcherUnitPageTree(dispatcher); |
| | | } |
| | | } |