车辆绑定教练
This commit is contained in:
parent
45ce3b189a
commit
64927cecf0
@ -18,6 +18,8 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 驾校教练")
|
||||
@ -48,6 +50,20 @@ public class DlDriveSchoolCoachController {
|
||||
return success(dlDriveSchoolCoachService.queryListPage(pageReqVO, page));
|
||||
}
|
||||
|
||||
/**
|
||||
* 不分页获取教练信息
|
||||
*
|
||||
* @param pageReqVO {@link DlDriveSchoolCoachPageReqVO}
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
|
||||
* @author PQZ
|
||||
* @date 14:25 2025/2/7
|
||||
**/
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "不分页获取教练信息")
|
||||
public CommonResult<List<?>> listSchoolCoach(DlDriveSchoolCoachPageReqVO pageReqVO) {
|
||||
return success(dlDriveSchoolCoachService.listSchoolCoach(pageReqVO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存驾校教练
|
||||
*
|
||||
@ -81,11 +97,12 @@ public class DlDriveSchoolCoachController {
|
||||
|
||||
/**
|
||||
* 通过教练id获取驾校教练
|
||||
* @author PQZ
|
||||
* @date 21:41 2025/1/16
|
||||
*
|
||||
* @param id 教练id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO>
|
||||
**/
|
||||
* @author PQZ
|
||||
* @date 21:41 2025/1/16
|
||||
**/
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得驾校教练")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 驾校教练 Service 接口
|
||||
@ -26,6 +27,16 @@ public interface DlDriveSchoolCoachService extends IService<DlDriveSchoolCoach>
|
||||
**/
|
||||
IPage<DlDriveSchoolCoachRespVO> queryListPage(DlDriveSchoolCoachPageReqVO pageReqVO, Page<DlDriveSchoolCoachRespVO> page);
|
||||
|
||||
/**
|
||||
* 不分页查询教练信息
|
||||
*
|
||||
* @param pageReqVO {@link DlDriveSchoolCoachPageReqVO}
|
||||
* @return java.util.List<cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach>
|
||||
* @author PQZ
|
||||
* @date 14:26 2025/2/7
|
||||
**/
|
||||
List<DlDriveSchoolCoach> listSchoolCoach(DlDriveSchoolCoachPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* @param staffVO {@link DlDriveSchoolStaffVO}
|
||||
* @param page 分页参数
|
||||
@ -43,6 +54,16 @@ public interface DlDriveSchoolCoachService extends IService<DlDriveSchoolCoach>
|
||||
**/
|
||||
void saveSchoolCoach(@Valid DlDriveSchoolCoachSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 跟新教练员车辆信息
|
||||
*
|
||||
* @param id id
|
||||
* @param carNo 车辆
|
||||
* @author PQZ
|
||||
* @date 15:51 2025/2/7
|
||||
**/
|
||||
void updateSchoolCoachCarId(String id, String carNo);
|
||||
|
||||
/**
|
||||
* 删除驾校教练
|
||||
*
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.base.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach;
|
||||
import cn.iocoder.yudao.module.base.mapper.DlDriveSchoolCoachMapper;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
||||
@ -8,10 +9,12 @@ import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachPageReqVO;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachSaveReqVO;
|
||||
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolStaffVO;
|
||||
import cn.iocoder.yudao.module.jx.utils.StringUtils;
|
||||
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.UserDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -22,6 +25,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static cn.iocoder.yudao.common.BaseConstants.PASSWORD_DEFAULT;
|
||||
@ -58,6 +62,24 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
||||
return dlDriveSchoolCoachMapper.queryListPage(pageReqVO, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 不分页查询教练信息
|
||||
*
|
||||
* @param pageReqVO {@link DlDriveSchoolCoachPageReqVO}
|
||||
* @return java.util.List<cn.iocoder.yudao.module.base.entity.DlDriveSchoolCoach>
|
||||
* @author PQZ
|
||||
* @date 14:26 2025/2/7
|
||||
**/
|
||||
@Override
|
||||
public List<DlDriveSchoolCoach> listSchoolCoach(DlDriveSchoolCoachPageReqVO pageReqVO) {
|
||||
LambdaQueryWrapper<DlDriveSchoolCoach> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(BaseDO::getDeleted,0).eq(DlDriveSchoolCoach::getType,"jl");
|
||||
if (StringUtils.isNotEmpty(pageReqVO.getName())){
|
||||
lambdaQueryWrapper.like(DlDriveSchoolCoach::getName,pageReqVO.getName());
|
||||
}
|
||||
return list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param staffVO {@link DlDriveSchoolStaffVO}
|
||||
* @param page 分页参数
|
||||
@ -113,6 +135,21 @@ public class DlDriveSchoolCoachServiceImpl extends ServiceImpl<DlDriveSchoolCoac
|
||||
saveOrUpdate(dlDriveSchoolCoach);
|
||||
}
|
||||
|
||||
/**
|
||||
* 跟新教练员车辆信息
|
||||
*
|
||||
* @param id id
|
||||
* @param carNo 车辆
|
||||
* @author PQZ
|
||||
* @date 15:51 2025/2/7
|
||||
**/
|
||||
@Override
|
||||
public void updateSchoolCoachCarId(String id, String carNo) {
|
||||
DlDriveSchoolCoach schoolCoach = getById(id);
|
||||
schoolCoach.setCarId(carNo);
|
||||
updateById(schoolCoach);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除驾校教练
|
||||
*
|
||||
|
@ -40,10 +40,8 @@ public class DriveSchoolCarController extends BaseController
|
||||
@GetMapping("/list")
|
||||
public CommonResult<IPage<?>> list(DriveSchoolCar driveSchoolCar)
|
||||
{
|
||||
driveSchoolCar.setPageNum(1);
|
||||
driveSchoolCar.setPageSize(10);
|
||||
Page<DriveSchoolCar> page = new Page<>(driveSchoolCar.getPageNum(), driveSchoolCar.getPageSize());
|
||||
IPage<DriveSchoolCar> driveSchoolCarIPage = driveSchoolCarService.selectDriveSchoolCarList(driveSchoolCar, page);
|
||||
IPage<DriveSchoolCar> driveSchoolCarIPage = driveSchoolCarService.selectDriveSchoolCarList(page,driveSchoolCar);
|
||||
return CommonResult.success(driveSchoolCarIPage);
|
||||
//return getDataTable(list);
|
||||
}
|
||||
|
@ -70,6 +70,12 @@ public class DriveSchoolCar extends TenantBaDO
|
||||
@Excel(name = "手机号")
|
||||
private String userPhone;
|
||||
|
||||
/** 教练员用户id */
|
||||
private String userId;
|
||||
|
||||
/** 教练id */
|
||||
private String coachId;
|
||||
|
||||
/** 车辆所有人 1:驾校 2:教练 3:其他 */
|
||||
@Excel(name = "车辆所有人")
|
||||
private String carBlong;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package cn.iocoder.yudao.module.jx.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCar;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -15,7 +16,7 @@ import java.util.List;
|
||||
* @date 2024-05-08
|
||||
*/
|
||||
@Mapper
|
||||
public interface DriveSchoolCarMapper
|
||||
public interface DriveSchoolCarMapper extends BaseMapper<DriveSchoolCar>
|
||||
{
|
||||
/**
|
||||
* 查询车辆信息
|
||||
@ -34,30 +35,6 @@ public interface DriveSchoolCarMapper
|
||||
public IPage<DriveSchoolCar> selectDriveSchoolCarList(@Param("entity") DriveSchoolCar driveSchoolCar, Page<DriveSchoolCar> page);
|
||||
public List<DriveSchoolCar> selectDriveSchoolCarListAll(@Param("entity") DriveSchoolCar driveSchoolCar);
|
||||
|
||||
/**
|
||||
* 新增车辆信息
|
||||
*
|
||||
* @param driveSchoolCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDriveSchoolCar(DriveSchoolCar driveSchoolCar);
|
||||
|
||||
/**
|
||||
* 修改车辆信息
|
||||
*
|
||||
* @param driveSchoolCar 车辆信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDriveSchoolCar(DriveSchoolCar driveSchoolCar);
|
||||
|
||||
/**
|
||||
* 删除车辆信息
|
||||
*
|
||||
* @param id 车辆信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDriveSchoolCarById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除车辆信息
|
||||
*
|
||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.jx.service;
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCar;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -12,7 +13,7 @@ import java.util.List;
|
||||
* @author ruoyi
|
||||
* @date 2024-05-08
|
||||
*/
|
||||
public interface IDriveSchoolCarService
|
||||
public interface IDriveSchoolCarService extends IService<DriveSchoolCar>
|
||||
{
|
||||
/**
|
||||
* 查询车辆信息
|
||||
@ -28,7 +29,7 @@ public interface IDriveSchoolCarService
|
||||
* @param driveSchoolCar 车辆信息
|
||||
* @return 车辆信息集合
|
||||
*/
|
||||
public IPage<DriveSchoolCar> selectDriveSchoolCarList(DriveSchoolCar driveSchoolCar, Page<DriveSchoolCar> page);
|
||||
public IPage<DriveSchoolCar> selectDriveSchoolCarList(Page<DriveSchoolCar> page,DriveSchoolCar driveSchoolCar);
|
||||
public List<DriveSchoolCar> selectDriveSchoolCarListAll(DriveSchoolCar driveSchoolCar);
|
||||
|
||||
/**
|
||||
|
@ -1,19 +1,18 @@
|
||||
package cn.iocoder.yudao.module.jx.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.jx.utils.DateUtils;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import cn.iocoder.yudao.module.base.service.DlDriveSchoolCoachService;
|
||||
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCar;
|
||||
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCarMapper;
|
||||
import cn.iocoder.yudao.module.jx.service.IDriveSchoolCarService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.thoughtworks.xstream.core.SecurityUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@ -26,13 +25,12 @@ import java.util.List;
|
||||
* @date 2024-05-08
|
||||
*/
|
||||
@Service
|
||||
public class DriveSchoolCarServiceImpl implements IDriveSchoolCarService
|
||||
public class DriveSchoolCarServiceImpl extends ServiceImpl<DriveSchoolCarMapper,DriveSchoolCar> implements IDriveSchoolCarService
|
||||
{
|
||||
@Autowired
|
||||
private DriveSchoolCarMapper driveSchoolCarMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
private DlDriveSchoolCoachService coachService;
|
||||
|
||||
/**
|
||||
* 查询车辆信息
|
||||
@ -53,22 +51,14 @@ public class DriveSchoolCarServiceImpl implements IDriveSchoolCarService
|
||||
* @return 车辆信息
|
||||
*/
|
||||
@Override
|
||||
public IPage<DriveSchoolCar> selectDriveSchoolCarList(DriveSchoolCar driveSchoolCar, Page<DriveSchoolCar> page)
|
||||
public IPage<DriveSchoolCar> selectDriveSchoolCarList(Page<DriveSchoolCar> page,DriveSchoolCar driveSchoolCar)
|
||||
{
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
AdminUserRespDTO user = userApi.getUser(userId);
|
||||
Long deptId = user.getDeptId();
|
||||
driveSchoolCar.setDeptId(deptId);
|
||||
return driveSchoolCarMapper.selectDriveSchoolCarList(driveSchoolCar,page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DriveSchoolCar> selectDriveSchoolCarListAll(DriveSchoolCar driveSchoolCar)
|
||||
{
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
AdminUserRespDTO user = userApi.getUser(userId);
|
||||
Long deptId = user.getDeptId();
|
||||
driveSchoolCar.setDeptId(deptId);
|
||||
return driveSchoolCarMapper.selectDriveSchoolCarListAll(driveSchoolCar);
|
||||
}
|
||||
|
||||
@ -79,17 +69,17 @@ public class DriveSchoolCarServiceImpl implements IDriveSchoolCarService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertDriveSchoolCar(DriveSchoolCar driveSchoolCar)
|
||||
{
|
||||
DriveSchoolCar driveSchoolCar1 = driveSchoolCarMapper.selectByCarNo(driveSchoolCar.getCarNo());
|
||||
if (ObjectUtils.isNotEmpty(driveSchoolCar1)){
|
||||
throw new RuntimeException("该车牌的车辆已存在!");
|
||||
}
|
||||
Long userId = SecurityFrameworkUtils.getLoginUserId();
|
||||
AdminUserRespDTO user = userApi.getUser(userId);
|
||||
Long deptId = user.getDeptId();
|
||||
driveSchoolCar.setDeptId(deptId);
|
||||
return driveSchoolCarMapper.insertDriveSchoolCar(driveSchoolCar);
|
||||
if (StringUtils.isNotEmpty(driveSchoolCar.getCoachId())){
|
||||
coachService.updateSchoolCoachCarId(driveSchoolCar.getCoachId(), driveSchoolCar.getCarNo());
|
||||
}
|
||||
return driveSchoolCarMapper.insert(driveSchoolCar);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,10 +89,13 @@ public class DriveSchoolCarServiceImpl implements IDriveSchoolCarService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateDriveSchoolCar(DriveSchoolCar driveSchoolCar)
|
||||
{
|
||||
//driveSchoolCar.setUpdateTime(DateUtils.getNowDate());
|
||||
return driveSchoolCarMapper.updateDriveSchoolCar(driveSchoolCar);
|
||||
if (StringUtils.isNotEmpty(driveSchoolCar.getCoachId())){
|
||||
coachService.updateSchoolCoachCarId(driveSchoolCar.getCoachId(), driveSchoolCar.getCarNo());
|
||||
}
|
||||
return driveSchoolCarMapper.updateById(driveSchoolCar);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,7 +119,7 @@ public class DriveSchoolCarServiceImpl implements IDriveSchoolCarService
|
||||
@Override
|
||||
public int deleteDriveSchoolCarById(Long id)
|
||||
{
|
||||
return driveSchoolCarMapper.deleteDriveSchoolCarById(id);
|
||||
return driveSchoolCarMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -139,7 +132,7 @@ public class DriveSchoolCarServiceImpl implements IDriveSchoolCarService
|
||||
for (DriveSchoolCar driveSchoolCar : carsList) {
|
||||
DriveSchoolCar driveSchoolCar1 = driveSchoolCarMapper.selectByCarNo(driveSchoolCar.getCarNo());
|
||||
if (ObjectUtils.isEmpty(driveSchoolCar1)){
|
||||
driveSchoolCarMapper.insertDriveSchoolCar(driveSchoolCar);
|
||||
driveSchoolCarMapper.insert(driveSchoolCar);
|
||||
successNum++;
|
||||
}else {
|
||||
failureNum++;
|
||||
|
@ -15,6 +15,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="inspectionDate" column="inspection_date" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="userPhone" column="user_phone" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="coachId" column="coach_id" />
|
||||
<result property="carBlong" column="car_blong" />
|
||||
<result property="drivingLicence" column="driving_licence" />
|
||||
<result property="operationCertificate" column="operation_certificate" />
|
||||
@ -38,7 +40,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectDriveSchoolCarVo"/>
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
|
||||
<if test="entity.brand != null and entity.brand != ''"> and brand = #{entity.brand}</if>
|
||||
<if test="entity.carModel != null and entity.carModel != ''"> and car_model = #{entity.carModel}</if>
|
||||
<if test="entity.carNo != null and entity.carNo != ''"> and car_no = #{entity.carNo}</if>
|
||||
@ -60,7 +61,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectDriveSchoolCarVo"/>
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
|
||||
<if test="entity.brand != null and entity.brand != ''"> and brand = #{entity.brand}</if>
|
||||
<if test="entity.carModel != null and entity.carModel != ''"> and car_model = #{entity.carModel}</if>
|
||||
<if test="entity.carNo != null and entity.carNo != ''"> and car_no = #{entity.carNo}</if>
|
||||
@ -83,90 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDriveSchoolCar" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCar" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into drive_school_car
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="brand != null and brand != ''">brand,</if>
|
||||
<if test="carModel != null and carModel != ''">car_model,</if>
|
||||
<if test="carNo != null and carNo != ''">car_no,</if>
|
||||
<if test="carPhoto != null and carPhoto != ''">car_photo,</if>
|
||||
<if test="carRegisterDate != null">car_register_date,</if>
|
||||
<if test="inspectionDate != null">inspection_date,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="userPhone != null and userPhone != ''">user_phone,</if>
|
||||
<if test="carBlong != null and carBlong != ''">car_blong,</if>
|
||||
<if test="drivingLicence != null and drivingLicence != ''">driving_licence,</if>
|
||||
<if test="operationCertificate != null and operationCertificate != ''">operation_certificate,</if>
|
||||
<if test="outlineDate != null">outline_date,</if>
|
||||
<if test="repairDate != null">repair_date,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updater != null">updater,</if>
|
||||
<if test="baoxianSttime != null">baoxian_sttime,</if>
|
||||
<if test="baoxianEntime != null">baoxian_entime,</if>
|
||||
<if test="company != null">company,</if>
|
||||
<if test="content != null">content,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="brand != null and brand != ''">#{brand},</if>
|
||||
<if test="carModel != null and carModel != ''">#{carModel},</if>
|
||||
<if test="carNo != null and carNo != ''">#{carNo},</if>
|
||||
<if test="carPhoto != null and carPhoto != ''">#{carPhoto},</if>
|
||||
<if test="carRegisterDate != null">#{carRegisterDate},</if>
|
||||
<if test="inspectionDate != null">#{inspectionDate},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="userPhone != null and userPhone != ''">#{userPhone},</if>
|
||||
<if test="carBlong != null and carBlong != ''">#{carBlong},</if>
|
||||
<if test="drivingLicence != null and drivingLicence != ''">#{drivingLicence},</if>
|
||||
<if test="operationCertificate != null and operationCertificate != ''">#{operationCertificate},</if>
|
||||
<if test="outlineDate != null">#{outlineDate},</if>
|
||||
<if test="repairDate != null">#{repairDate},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updater != null">#{updater},</if>
|
||||
<if test="baoxianSttime != null">#{baoxianSttime},</if>
|
||||
<if test="baoxianEntime != null">#{baoxianEntime},</if>
|
||||
<if test="company != null">#{company},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDriveSchoolCar" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCar">
|
||||
update drive_school_car
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="brand != null and brand != ''">brand = #{brand},</if>
|
||||
<if test="carModel != null and carModel != ''">car_model = #{carModel},</if>
|
||||
<if test="carNo != null and carNo != ''">car_no = #{carNo},</if>
|
||||
<if test="carPhoto != null and carPhoto != ''">car_photo = #{carPhoto},</if>
|
||||
<if test="carRegisterDate != null">car_register_date = #{carRegisterDate},</if>
|
||||
<if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="userPhone != null and userPhone != ''">user_phone = #{userPhone},</if>
|
||||
<if test="carBlong != null and carBlong != ''">car_blong = #{carBlong},</if>
|
||||
<if test="drivingLicence != null and drivingLicence != ''">driving_licence = #{drivingLicence},</if>
|
||||
<if test="operationCertificate != null and operationCertificate != ''">operation_certificate = #{operationCertificate},</if>
|
||||
<if test="outlineDate != null">outline_date = #{outlineDate},</if>
|
||||
<if test="repairDate != null">repair_date = #{repairDate},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updater != null">updater = #{updater},</if>
|
||||
<if test="baoxianSttime != null">baoxian_sttime = #{baoxianSttime},</if>
|
||||
<if test="baoxianEntime != null">baoxian_entime = #{baoxianEntime},</if>
|
||||
<if test="company != null">company = #{company},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDriveSchoolCarById" parameterType="Long">
|
||||
delete from drive_school_car where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDriveSchoolCarByIds" parameterType="String">
|
||||
delete from drive_school_car where id in
|
||||
|
Loading…
Reference in New Issue
Block a user