| | |
| | | package com.ruoyi.sy.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.sy.domain.ArdSyCar; |
| | | import com.ruoyi.sy.domain.ArdSyCarLock; |
| | | import com.ruoyi.sy.mapper.ArdSyCarMapper; |
| | | import com.ruoyi.sy.service.ArdSyCarLockService; |
| | | import com.ruoyi.sy.vo.CarLockVo; |
| | | import com.ruoyi.sy.vo.CarVo; |
| | | import com.ruoyi.system.mapper.SysDeptMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author Administrator |
| | | */ |
| | | @Service |
| | | public class ArdSyCarLockServiceImpl implements ArdSyCarLockService { |
| | | |
| | | @Autowired |
| | | private ArdSyCarMapper ardSyCarMapper; |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Override |
| | | public List<CarVo> car() { |
| | | return null; |
| | | List<CarVo> list = new ArrayList<>(); |
| | | QueryWrapper<ArdSyCar> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.isNull("reserved_1"); |
| | | List<ArdSyCar> ardSyCars= ardSyCarMapper.selectList(queryWrapper); |
| | | for (int i = 0; i < ardSyCars.size(); i++) { |
| | | ArdSyCar ardSyCar = ardSyCars.get(i); |
| | | CarVo carVo = new CarVo(); |
| | | carVo.setCarId(ardSyCar.getCarId()); |
| | | carVo.setCarPicture(ardSyCar.getCarPicture()); |
| | | carVo.setCarType(ardSyCar.getCarType()); |
| | | carVo.setDeptId(ardSyCar.getDeptId()); |
| | | SysDept sysDept = sysDeptMapper.selectById(ardSyCar.getDeptId()); |
| | | carVo.setDeptName(sysDept.getDeptName()); |
| | | list.add(carVo); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int addUpdLock(ArdSyCarLock ardSyCarLock) { |
| | | public int addUpdLock(List<ArdSyCarLock> ardSyCarLock) { |
| | | return 0; |
| | | } |
| | | |
| | | } |