chenza
2023-03-14 751097966dfbd04819c6f3522fce9bd8aef7b8f9
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/CarServiceImpl.java
@@ -126,7 +126,7 @@
     * @throws Exception
     */
    @Override
    public ResultUtil addCar(Integer modelId, String color, String licensePlate, Date time, String drivingLicensePhoto, String drivingLicenseEndTime,
    public ResultUtil addCar(Integer modelId, String color, String licensePlate, Date time, String drivingLicenseNumber, String drivingLicensePhoto, String drivingLicenseEndTime,
                             String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid,Integer id, String peopleAndCarsPhone) throws Exception {
        Car query = carMapper.query(licensePlate);
@@ -142,12 +142,6 @@
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Car car = new Car();
        car.setDriverId(uid);
        car = carMapper.selectOne(car);
        if(car==null){
            car = new Car();
            car.setId(id);
        }
        car.setPeopleAndCarsPhone(peopleAndCarsPhone);
        car.setCarModelId(modelId);
        CarModel carModel = carModelMapper.selectById(modelId);
@@ -155,6 +149,7 @@
        car.setCarColor(color);
        car.setCarLicensePlate(licensePlate);
        car.setAnnualInspectionTime(time);
        car.setDrivingLicenseNumber(drivingLicenseNumber);
        car.setDrivingLicensePhoto(drivingLicensePhoto);
        if(ToolUtil.isNotEmpty(drivingLicenseEndTime)){
            car.setDrivingLicenseEndTime(sdf.parse(drivingLicenseEndTime));