diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/BusController.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/BusController.java new file mode 100644 index 0000000000000000000000000000000000000000..99e6e5f8777f6fec736e9b3f1114fe6eee4acc10 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/BusController.java @@ -0,0 +1,68 @@ +package cn.insectmk.bus.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * @Description 客户管理控制器 + * @Author makun + * @Date 2023/6/28 16:47 + * @Version 1.0 + */ +@Controller +@RequestMapping("bus") +public class BusController { + /** + * 跳转到检查单管理的页面 + * @return + */ + @RequestMapping("toCheckManager") + public String toCheckManager(){ + return "business/check/checkManager"; + } + + /** + * 跳转到汽车入库管理的页面 + * @return + */ + @RequestMapping("toCheckCarManager") + public String toCheckCarManager(){ + return "business/check/checkCarManager"; + } + + /** + * 跳转到出租单管理的页面 + * @return + */ + @RequestMapping("toRentManager") + public String toRentManager(){ + return "business/rent/rentManager"; + } + + /** + * 跳转到车辆出租 + * @return + */ + @RequestMapping("toRentCarManager") + public String toRentCarManager(){ + return "business/rent/rentCarManager"; + } + + /** + * 跳转到车辆管理 + * @return + */ + @RequestMapping("toCarManager") + public String toCarManager(){ + return "business/car/carManager"; + } + + /** + * 跳转到客户管理 + * @return + */ + @RequestMapping("toCustomerManager") + public String toCustomerManager(){ + return "business/customer/customerManager"; + } +} \ No newline at end of file diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CarController.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CarController.java new file mode 100644 index 0000000000000000000000000000000000000000..d128b5519842f004ab8eb08c8c5ec8fc207144d9 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CarController.java @@ -0,0 +1,116 @@ +package cn.insectmk.bus.controller; + +import cn.insectmk.bus.domain.Car; +import cn.insectmk.bus.domain.CarVo; +import cn.insectmk.bus.service.CarService; +import cn.insectmk.sys.domain.DataGridView; +import cn.insectmk.sys.utils.AppFileUtils; +import cn.insectmk.sys.utils.ResultObj; +import cn.insectmk.sys.utils.SysConstant; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; + +/** + * @Description 汽车控制器 + * @Author makun + * @Date 2023/6/29 14:57 + * @Version 1.0 + */ +@RestController +@RequestMapping("car") +public class CarController { + @Autowired + private CarService carService; + + /** + * 批量删除车辆 + * @param carVo + * @return + */ + @RequestMapping("deleteBatchCar") + public ResultObj deleteBatchCar(CarVo carVo){ + try{ + this.carService.deleteBatchCar(carVo.getIds()); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 修改车辆 + * @param carVo + * @return + */ + @RequestMapping("updateCar") + public ResultObj updateCar(CarVo carVo){ + try{ + String carimg = carVo.getCarimg(); + if (carimg.endsWith(SysConstant.FILE_UPLOAD_TEMP)) { + String filePath =AppFileUtils.updateFileName(carVo.getCarimg(), SysConstant.FILE_UPLOAD_TEMP); + carVo.setCarimg(filePath); + //把原来的删除 + Car car = this.carService.queryCarByCarNumber(carVo.getCarnumber()); + AppFileUtils.removeFileByPath(car.getCarimg()); + + } + this.carService.updateCar(carVo); + return ResultObj.UPDATE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.UPDATE_ERROR; + } + } + + /** + * 删除一个车辆 + * @param carVo + * @return + */ + @RequestMapping("deleteCar") + public ResultObj deleteCar(CarVo carVo){ + try { + this.carService.deleteCar(carVo.getCarnumber()); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 添加一个车辆 + * @param carVo + * @return + */ + @RequestMapping("addCar") + public ResultObj addCar(CarVo carVo){ + try{ + carVo.setCreatetime(new Date()); + //如果不是默认图片就去掉图片的_temp的后缀 + if(!carVo.getCarimg().equals(SysConstant.DEFAULT_CAR_IMG)){ + String filePath = AppFileUtils.updateFileName(carVo.getCarimg(), SysConstant.FILE_UPLOAD_TEMP); + carVo.setCarimg(filePath); + } + this.carService.addCar(carVo); + return ResultObj.ADD_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.ADD_ERROR; + } + } + + /** + * 加载车辆列表返回DataGridView + * @param carVo + * @return + */ + @RequestMapping("loadAllCar") + public DataGridView loadAllCar(CarVo carVo){ + return this.carService.queryAllCar(carVo); + } +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CheckController.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CheckController.java new file mode 100644 index 0000000000000000000000000000000000000000..68c4ba7086d550c048c8b81d81eea0da405c4ee0 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CheckController.java @@ -0,0 +1,119 @@ +package cn.insectmk.bus.controller; + +import cn.insectmk.bus.domain.CheckVo; +import cn.insectmk.bus.domain.Rent; +import cn.insectmk.bus.service.CheckService; +import cn.insectmk.bus.service.RentService; +import cn.insectmk.sys.domain.DataGridView; +import cn.insectmk.sys.utils.ResultObj; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import java.util.Date; +import java.util.Map; + +/** + * @Description 入库管理 + * @Author makun + * @Date 2023/7/4 15:29 + * @Version 1.0 + */ +@RestController +@RequestMapping("check") +public class CheckController { + @Autowired + private RentService rentService; + @Autowired + private CheckService checkService; + + /** + * 批量删除检查单 + * @return + */ + @RequestMapping("deleteBatchCheck") + public ResultObj deleteBatchCheck(CheckVo checkVo){ + try{ + this.checkService.deleteBatchCheck(checkVo.getIds()); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 删除一个检查单 + * @param checkVo + * @return + */ + @RequestMapping("deleteCheck") + public ResultObj deleteCheck(CheckVo checkVo){ + try{ + this.checkService.deleteCheck(checkVo); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 更新检查单 + * @param checkVo + * @return + */ + @RequestMapping("updateCheck") + public ResultObj updateCheck(CheckVo checkVo){ + try { + this.checkService.updateCheck(checkVo); + return ResultObj.UPDATE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.UPDATE_ERROR; + } + } + + /** + * 查询所有检查单 + * @param checkVo + * @return + */ + @RequestMapping("loadAllCheck") + public DataGridView loadAllCheck(CheckVo checkVo){ + return this.checkService.queryAllCheck(checkVo); + } + + /** + * 保存检查单数据 + * @param checkVo + * @return + */ + @RequestMapping("saveCheck") + public ResultObj saveCheck(CheckVo checkVo){ + try{ + checkVo.setCreatetime(new Date()); + this.checkService.addCheck(checkVo); + return ResultObj.ADD_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.ADD_ERROR; + } + } + + /** + * 根据出租单号加载检查单的表单数据 + * @param rentid + * @return + */ + @RequestMapping("initCheckFormData") + public Map initCheckFormData(String rentid){ + return this.checkService.initCheckFormData(rentid); + } + + @RequestMapping("checkRentExist") + public Rent checkRentExist(String rentid){ + //出租单号不存在,返回一个null,出租单号存在,返回一个rent对象 + Rent rent = rentService.queryRentByRentId(rentid); + return rent; + } +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CustomerController.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CustomerController.java new file mode 100644 index 0000000000000000000000000000000000000000..ab2cabf4d884a5afebbe4262568fdf9a6085e192 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/CustomerController.java @@ -0,0 +1,99 @@ +package cn.insectmk.bus.controller; + +import cn.insectmk.bus.domain.CustomerVo; +import cn.insectmk.sys.domain.DataGridView; +import cn.insectmk.bus.service.CustomerService; +import cn.insectmk.sys.utils.ResultObj; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; + +/** + * @Description 客户控制器 + * @Author makun + * @Date 2023/6/28 16:53 + * @Version 1.0 + */ +@RestController //以json形式响应数据 +@RequestMapping("customer") +public class CustomerController { + @Autowired + private CustomerService customerService; + + /** + * 批量删除客户 + * @param customerVo + * @return + */ + @RequestMapping("batchDeleteCustomer") + public ResultObj deleteBatchCustomer(CustomerVo customerVo){ + try{ + this.customerService.deleteBatchCustomer(customerVo.getIds()); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 修改一个客户 + * @param customerVo + * @return + */ + @RequestMapping("updateCustomer") + public ResultObj updateCustomer(CustomerVo customerVo){ + try{ + this.customerService.updateCustomer(customerVo); + return ResultObj.UPDATE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.UPDATE_ERROR; + } + } + + /** + * 删除一个客户 + * @param customerVo + * @return + */ + @RequestMapping("deleteCustomer") + public ResultObj deleteCustomer(CustomerVo customerVo){ + try { + this.customerService.deleteCustomer(customerVo.getIdentity()); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 加载客户列表返回DataGridView + * @param customerVo + * @return + */ + @RequestMapping("loadAllCustomer") + public DataGridView loadAllCustomer(CustomerVo customerVo){ + return customerService.queryAllCustomer(customerVo); + } + + /** + * 添加客户 + * @param customerVo + * @return + */ + @RequestMapping("addCustomer") + public ResultObj addCustomer(CustomerVo customerVo){ + try{ + customerVo.setCreatetime(new Date()); + this.customerService.addCustomer(customerVo); + return ResultObj.ADD_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.ADD_ERROR; + } + } +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/FileController.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/FileController.java new file mode 100644 index 0000000000000000000000000000000000000000..3aadf1bdf29d87e0619ff9a4cf7d25f0de44bd33 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/FileController.java @@ -0,0 +1,81 @@ +package cn.insectmk.bus.controller; + +/** + * @Description 文件控制器 + * @Author makun + * @Date 2023/6/29 15:17 + * @Version 1.0 + */ + +import cn.insectmk.sys.domain.DataGridView; +import cn.insectmk.sys.utils.AppFileUtils; +import cn.insectmk.sys.utils.RandomUtils; +import cn.insectmk.sys.utils.SysConstant; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * 文件上传下载的控制器 + * + */ +@Controller +@RequestMapping("file") +public class FileController { + /** + * 添加 + * @throws IOException + * @throws IllegalStateException + */ + @RequestMapping("uploadFile") + @ResponseBody + public DataGridView uploadFile(MultipartFile mf) throws IllegalStateException, IOException { + // 文件上传的父目录 + String parentPath = AppFileUtils.PATH; + // 得到当前日期作为文件夹名称 + String dirName = RandomUtils.getCurrentDateForString(); + // 构造文件夹对象 + File dirFile = new File(parentPath, dirName); + if (!dirFile.exists()) { + dirFile.mkdirs();// 创建文件夹 + } + // 得到文件原名 + String oldName = mf.getOriginalFilename(); + // 根据文件原名得到新名 + String newName = RandomUtils.createFileNameUseTime(oldName, SysConstant.FILE_UPLOAD_TEMP); + File dest = new File(dirFile, newName); + mf.transferTo(dest); + + Map map=new HashMap<>(); + map.put("src", dirName+"/"+newName); + return new DataGridView(map); + } + + + /** + * 不下载只显示 + */ + @RequestMapping("downloadShowFile") + public ResponseEntity downloadShowFile(String path, HttpServletResponse response) { + return AppFileUtils.downloadFile(response, path, ""); + } + + /** + * 下载图片 + * @param path + * @param response + * @return + */ + @RequestMapping("downloadFile") + public ResponseEntity downloadFile(String path, HttpServletResponse response) { + String oldName=""; + return AppFileUtils.downloadFile(response, path, oldName); + } +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/RentController.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/RentController.java new file mode 100644 index 0000000000000000000000000000000000000000..f07ee198a55452e0f3f506ee7c7fbb019a383be4 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/controller/RentController.java @@ -0,0 +1,130 @@ +package cn.insectmk.bus.controller; + +import cn.insectmk.bus.domain.Customer; +import cn.insectmk.bus.domain.RentVo; +import cn.insectmk.bus.service.CheckService; +import cn.insectmk.bus.service.CustomerService; +import cn.insectmk.bus.service.RentService; +import cn.insectmk.sys.domain.DataGridView; +import cn.insectmk.sys.domain.User; +import cn.insectmk.sys.utils.RandomUtils; +import cn.insectmk.sys.utils.ResultObj; +import cn.insectmk.sys.utils.SysConstant; +import cn.insectmk.sys.utils.WebUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import java.util.Date; +import java.util.Map; + +/** + * @Description 汽车出租管理的控制器 + * @Author makun + * @Date 2023/7/3 21:10 + * @Version 1.0 + */ +@RestController +@RequestMapping("rent") +public class RentController { + @Autowired + private RentService rentService; + @Autowired + private CustomerService customerService; + @Autowired + private CheckService checkService; + + /** + * 删除出租单信息 + * @param rentVo + * @return + */ + @RequestMapping("deleteRent") + public ResultObj deleteRent(RentVo rentVo){ + try { + //删除 + this.rentService.deleteRent(rentVo.getRentid()); + return ResultObj.DELETE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.DELETE_ERROR; + } + } + + /** + * 修改出租单信息 + * @param rentVo + * @return + */ + @RequestMapping("updateRent") + public ResultObj updateRent(RentVo rentVo){ + try { + //修改 + this.rentService.updateRent(rentVo); + return ResultObj.UPDATE_SUCCESS; + }catch (Exception e){ + e.printStackTrace(); + return ResultObj.UPDATE_ERROR; + } + } + + /** + * 查询 + */ + @RequestMapping("loadAllRent") + public DataGridView loadAllRent(RentVo rentVo){ + return this.rentService.queryAllRent(rentVo); + } + + /** + * 保存出租单信息 + * @param rentVo + * @return + */ + @RequestMapping("saveRent") + public ResultObj saveRent(RentVo rentVo) { + try { + //设置创建时间 + rentVo.setCreatetime(new Date()); + //设置归还状态 + rentVo.setRentflag(SysConstant.RENT_BACK_FALSE); + //保存 + this.rentService.addRent(rentVo); + return ResultObj.ADD_SUCCESS; + } catch (Exception e) { + e.printStackTrace(); + return ResultObj.ADD_ERROR; + } + } + + /** + * 初始化添加出租单的表单的数据 + * @param rentVo + * @return + */ + @RequestMapping("initRentFrom") + public RentVo initRentFrom(RentVo rentVo){ + //生成出租单号 + rentVo.setRentid(RandomUtils.createRandomStringUseTime(SysConstant.CAR_ORDER_CZ)); + //设置起租时间 + rentVo.setBegindate(new Date()); + //设置操作员 + User user = (User) WebUtils.getHttpSession().getAttribute("user"); + rentVo.setOpername(user.getRealname()); + return rentVo; + } + + /** + *检查身份证号是否存在 + * @param rentVo + * @return + */ + @RequestMapping("checkCustomerExist") + public ResultObj checkCustomerExist(RentVo rentVo){ + Customer customer = customerService.queryCustomerByIdentity(rentVo.getIdentity()); + if(customer!=null){ + return ResultObj.STATUS_TRUE; + }else { + return ResultObj.STATUS_FALSE; + } + } +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Car.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Car.java new file mode 100644 index 0000000000000000000000000000000000000000..a7d2d3d8269f3413a88c91cd24ff4affd5f836bf --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Car.java @@ -0,0 +1,40 @@ +package cn.insectmk.bus.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Description 车辆实体类 + * @Author makun + * @Date 2023/6/29 14:56 + * @Version 1.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Car { + private String carnumber; + + private String cartype; + + private String color; + + private Double price; + + private Double rentprice; + + private Double deposit; + + private Integer isrenting; + + private String description; + + private String carimg; + + @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss", timezone = "GTM+8") + private Date createtime; +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CarVo.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CarVo.java new file mode 100644 index 0000000000000000000000000000000000000000..598b9c88b376223cc9a908139eb3ccc73c5ce708 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CarVo.java @@ -0,0 +1,28 @@ +package cn.insectmk.bus.domain; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Description 车辆视图对象 + * @Author makun + * @Date 2023/6/29 14:57 + * @Version 1.0 + */ + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class CarVo extends Car { + + /** + * 分页参数 + */ + private Integer page; + private Integer limit; + + //接受多个id + private String [] ids; +} + diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Check.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Check.java new file mode 100644 index 0000000000000000000000000000000000000000..da1fec21d4ab746907f63f84c01471fe61fb3bc4 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Check.java @@ -0,0 +1,31 @@ +package cn.insectmk.bus.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +/** + * @Description 检查单,入库表实体 + * @Author makun + * @Date 2023/7/4 15:30 + * @Version 1.0 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Check { + private String checkid; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date checkdate; + private String checkdesc; + private String problem; + private Double paymoney; + private String opername; + private String rentid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date createtime; +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CheckVo.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CheckVo.java new file mode 100644 index 0000000000000000000000000000000000000000..cb9eea0bc600d6f7ae56bbf4d0ba9a02bc18ff4a --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CheckVo.java @@ -0,0 +1,35 @@ +package cn.insectmk.bus.domain; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; + +/** + * @Description 检查单视图对象 + * @Author makun + * @Date 2023/7/4 15:32 + * @Version 1.0 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CheckVo extends Check { + /** + * 分页参数 + */ + private Integer page; + private Integer limit; + + //接受多个id + private String[] ids; + + /** + * 扩展表单参数 将前台时间提交到后台 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Customer.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Customer.java new file mode 100644 index 0000000000000000000000000000000000000000..bd0d2f6006947a092442fc24d816485d1390648d --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Customer.java @@ -0,0 +1,35 @@ +package cn.insectmk.bus.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Description 客户实体对象 + * @Author makun + * @Date 2023/6/28 16:52 + * @Version 1.0 + */ + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Customer { + private String identity; + + private String custname; + + private Integer sex; + + private String address; + + private String phone; + + private String career; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date createtime; +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CustomerVo.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CustomerVo.java new file mode 100644 index 0000000000000000000000000000000000000000..b6f198750ec4953b0945496e422318e271ee1bc8 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/CustomerVo.java @@ -0,0 +1,29 @@ +package cn.insectmk.bus.domain; + +import cn.insectmk.bus.domain.Customer; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Arrays; + +/** + * @Description 客户视图对象 + * @Author makun + * @Date 2023/6/28 16:53 + * @Version 1.0 + */ + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class CustomerVo extends Customer { + /** + * 分页参数 + */ + private Integer page; + private Integer limit; + + //接受多个id + private String [] ids; +} diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Rent.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Rent.java new file mode 100644 index 0000000000000000000000000000000000000000..0840dbe71f96cde2f534f282e11a7c54d41dc130 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/Rent.java @@ -0,0 +1,40 @@ +package cn.insectmk.bus.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @Description 汽车租借实体对象 + * @Author makun + * @Date 2023/7/3 21:08 + * @Version 1.0 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class Rent { + private String rentid; + + private Double price; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date begindate; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date returndate; + + private Integer rentflag; + + private String identity; + + private String carnumber; + + private String opername; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date createtime; +} \ No newline at end of file diff --git a/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/RentVo.java b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/RentVo.java new file mode 100644 index 0000000000000000000000000000000000000000..2429ea8c2b59f03ec585cfcbdef8a69e8d85b465 --- /dev/null +++ b/fengmi-car-management/src/main/java/cn/insectmk/bus/domain/RentVo.java @@ -0,0 +1,35 @@ +package cn.insectmk.bus.domain; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * @Description 租借视图对象 + * @Author makun + * @Date 2023/7/3 21:09 + * @Version 1.0 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class RentVo extends Rent { + + /** + * 分页参数 + */ + private Integer page; + private Integer limit; + + /** + * 扩展表单参数 将前台时间提交到后台 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + +}