| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import liquibase.pro.packaged.C; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.apache.commons.net.ftp.FTPConnectionClosedException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import org.springblade.modules.equipage.service.CarService; |
| | | import org.springblade.modules.equipage.vo.CarVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.*; |
| | | import java.io.*; |
| | | import java.net.URL; |
| | | import java.net.URLDecoder; |
| | | import java.nio.charset.Charset; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipFile; |
| | | import java.util.zip.ZipInputStream; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | public class CarController { |
| | | |
| | | private final CarService carService; |
| | | private static String csvurl; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param car 车辆信息对象 |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @GetMapping("/page") |
| | | public R<IPage<CarVo>> page(CarVo car, Query query) { |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 车辆信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | CarVo detail = carService.selectCarInfo(car); |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 查询押运车辆 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCar") |
| | | public R selectCar() { |
| | | List<Map<Object, Object>> maps = carService.selectCar(); |
| | | return R.data(maps); |
| | | } |
| | | |
| | | |
| | | } |