This commit is contained in:
PQZ 2025-02-19 16:18:17 +08:00
parent f736e8279f
commit 3acff13a1f
28 changed files with 473 additions and 173 deletions

View File

@ -1,22 +1,20 @@
package cn.iocoder.yudao.module.course.controller.admin;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachPageReqVO;
import cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.course.entity.Process;
import cn.iocoder.yudao.module.course.service.ProcessService;
import cn.iocoder.yudao.module.course.vo.ProcessVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@ -78,5 +76,34 @@ public class ProcessController {
return success(processService.getMyCourseStudentPage(process, page));
}
/**
* 通过id查询学员进度课程
*
* @param id 学员课程进度id
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.base.vo.DlDriveSchoolCoachRespVO>
* @author PQZ
* @date 11:28 2025/2/18
**/
@GetMapping("/get")
@Operation(summary = "通过id 查询学员进度课程")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<ProcessVO> getDlDriveSchoolCoach(@RequestParam("id") String id) {
return success(BeanUtils.toBean(processService.getById(id), ProcessVO.class));
}
/**
* 财务审核
*
* @param process {@link Process}
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
* @author PQZ
* @date 15:23 2025/2/18
**/
@PostMapping("/check")
@Operation(summary = "财务审核")
public CommonResult<Boolean> saveSchoolCoach(@Valid @RequestBody Process process) {
processService.checkProcess(process);
return success(true);
}
}

View File

@ -0,0 +1,60 @@
package cn.iocoder.yudao.module.course.controller.admin;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 提成记录")
@RestController
@RequestMapping("/drive/school-commission")
@Validated
public class SchoolCommissionController {
@Resource
private SchoolCommissionService schoolCommissionService;
/**
* 分页查询教练提成记录
*
* @param pageReqVO {@link SchoolCommissionVO}
* @param pageNo 分页参数
* @param pageSize 分页参数
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
* @author PQZ
* @date 13:59 2025/2/19
**/
@GetMapping("/page")
@Operation(summary = "获得提成记录分页")
public CommonResult<IPage<?>> getSchoolCommissionPage(SchoolCommissionVO pageReqVO,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
Page<SchoolCommissionVO> page = new Page<>(pageNo, pageSize);
return success(schoolCommissionService.queryPage(page, pageReqVO));
}
// @GetMapping("/get")
// @Operation(summary = "获得提成记录")
// @Parameter(name = "id", description = "编号", required = true, example = "1024")
// @PreAuthorize("@ss.hasPermission('drive:school-commission:query')")
// public CommonResult<SchoolCommissionVO> getSchoolCommission(@RequestParam("id") String id) {
//// SchoolCommissionDO schoolCommission = schoolCommissionService.getSchoolCommission(id);
// return success(BeanUtils.toBean(schoolCommission, SchoolCommissionRespVO.class));
// }
//
}

View File

@ -0,0 +1,71 @@
package cn.iocoder.yudao.module.course.entity;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import java.math.BigDecimal;
/**
* 提成记录 DO
*
* @author 若依
*/
@TableName("drive_school_commission")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SchoolCommission extends TenantBaseDO {
/**
* 主键id
*/
@TableId(type = IdType.ASSIGN_UUID)
private String id;
/**
* 教练id
*/
private String coachId;
/**
* 教练用户表id
*/
private Long coachUserId;
/**
* 教练姓名
*/
private String coachName;
/**
* 学生id
*/
private Long studentId;
/**
* 学生姓名
*/
private String studentName;
/**
* 提成金额
*/
private BigDecimal commissionAmount;
/**
* 课程id
*/
private String courseId;
/**
* 科目
*/
private String subject;
/**
* 审核人id
*/
private Long checkId;
/**
* 审核人姓名
*/
private String checkName;
}

View File

@ -0,0 +1,32 @@
package cn.iocoder.yudao.module.course.mapper;
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import cn.iocoder.yudao.module.course.vo.ProcessVO;
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
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;
import org.apache.ibatis.annotations.Param;
/**
* 提成记录 Mapper
*
* @author 若依
*/
@Mapper
public interface SchoolCommissionMapper extends BaseMapper<SchoolCommission> {
/**
* 分页查询教练提成记录
*
* @param entity {@link SchoolCommissionVO}
* @param page 分页参数
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.course.vo.SchoolCommissionVO>
* @author PQZ
* @date 14:07 2025/2/19
**/
IPage<SchoolCommissionVO> queryPage(@Param("entity") SchoolCommissionVO entity, Page<SchoolCommissionVO> page);
}

View File

@ -89,4 +89,13 @@ public interface ProcessService extends IService<Process> {
* @date 15:34 2025/2/17
**/
IPage<ProcessVO> pageProcess(Page<ProcessVO> page, ProcessVO pageReqVO);
/**
* 财务审核
*
* @param process {@link Process}
* @author PQZ
* @date 15:24 2025/2/18
**/
void checkProcess(Process process);
}

View File

@ -0,0 +1,28 @@
package cn.iocoder.yudao.module.course.service;
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 提成记录 Service 接口
*
* @author 若依
*/
public interface SchoolCommissionService extends IService<SchoolCommission> {
/**
* 分页查询提成记录
*
* @param page 分页参数
* @param pageReqVO {@link SchoolCommissionVO}
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.course.vo.SchoolCommissionVO>
* @author PQZ
* @date 14:00 2025/2/19
**/
IPage<SchoolCommissionVO> queryPage(Page<SchoolCommissionVO> page, SchoolCommissionVO pageReqVO);
}

View File

@ -1,11 +1,19 @@
package cn.iocoder.yudao.module.course.service.impl;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.course.entity.Process;
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import cn.iocoder.yudao.module.course.mapper.ProcessMapper;
import cn.iocoder.yudao.module.course.service.ProcessService;
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
import cn.iocoder.yudao.module.course.vo.ProcessVO;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct;
import cn.iocoder.yudao.module.jx.service.IDriveSchoolDeductService;
import cn.iocoder.yudao.module.payment.service.IFzRecordService;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -13,7 +21,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.*;
import java.util.stream.Collectors;
@ -27,6 +37,13 @@ import java.util.stream.Collectors;
public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> implements ProcessService {
@Autowired
private ProcessMapper processMapper;
@Resource
private IDriveSchoolDeductService deductService;
@Resource
private AdminUserApi userApi;
@Resource
private SchoolCommissionService schoolCommissionService;
/**
* 教练查自己带教的课程和科目
@ -199,4 +216,52 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
return processMapper.pageProcess(pageReqVO,page);
}
/**
* 财务审核
*
* @param process {@link Process}
* @author PQZ
* @date 15:24 2025/2/18
**/
@Override
@Transactional(rollbackFor = Exception.class)
public void checkProcess(Process process) {
//查询数据
Process oldProcess = getById(process.getId());
//查询当前登录用户信息
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO sysUser = userApi.getUser(userId);
//如果是通过审核需要保存考试记录
if (process.getFinancePass()) {
//根据科目查询规则
if (null != process.getSubject()){
DriveSchoolDeduct deduct = deductService.queryBySubject(process.getSubject().toString());
//如果存在提成规则则生成提成记录
if (null != deduct) {
SchoolCommission schoolCommission = new SchoolCommission();
//教练用户表id
schoolCommission.setCoachUserId(oldProcess.getCoachId());
//教练名称
schoolCommission.setCoachName(oldProcess.getCoachName());
//学生id
schoolCommission.setStudentId(oldProcess.getUserId());
//学生姓名
schoolCommission.setStudentName(oldProcess.getUserName());
//提成金额
schoolCommission.setCommissionAmount(deduct.getDeduct());
//课程id
schoolCommission.setCourseId(oldProcess.getCourseId());
//科目
schoolCommission.setSubject(oldProcess.getSubject().toString());
//审核人id
schoolCommission.setCheckId(sysUser.getId());
//审核人姓名
schoolCommission.setCheckName(sysUser.getNickname());
schoolCommissionService.save(schoolCommission);
}
}
}
updateById(process);
}
}

View File

@ -0,0 +1,41 @@
package cn.iocoder.yudao.module.course.service.impl;
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper;
import cn.iocoder.yudao.module.course.service.SchoolCommissionService;
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
/**
* 提成记录 Service 实现类
*
* @author 若依
*/
@Service
@Validated
public class SchoolCommissionServiceImpl extends ServiceImpl<SchoolCommissionMapper, SchoolCommission> implements SchoolCommissionService {
@Resource
private SchoolCommissionMapper schoolCommissionMapper;
/**
* 分页查询提成记录
*
* @param page 分页参数
* @param pageReqVO {@link SchoolCommissionVO}
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.course.vo.SchoolCommissionVO>
* @author PQZ
* @date 14:00 2025/2/19
**/
@Override
public IPage<SchoolCommissionVO> queryPage(Page<SchoolCommissionVO> page, SchoolCommissionVO pageReqVO) {
return schoolCommissionMapper.queryPage(pageReqVO,page);
}
}

View File

@ -0,0 +1,19 @@
package cn.iocoder.yudao.module.course.vo;
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import lombok.Data;
/**
* 提成记录 DO
*
* @author 若依
*/
@Data
public class SchoolCommissionVO extends SchoolCommission {
/**课程名称*/
private String courseName;
/**课程类型*/
private String courseType;
}

View File

@ -30,9 +30,10 @@ public class DriveSchoolCarRepairController extends BaseController
* 查询车辆维修记录列表
*/
@GetMapping("/list")
public CommonResult<IPage<?>> list(DriveSchoolCarRepair driveSchoolCarRepair)
public CommonResult<IPage<?>> list(DriveSchoolCarRepair driveSchoolCarRepair,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
{
Page<DriveSchoolCarRepair> page = new Page<>(driveSchoolCarRepair.getPageNum(), driveSchoolCarRepair.getPageSize());
Page<DriveSchoolCarRepair> page = new Page<>(pageNum, pageSize);
IPage<DriveSchoolCarRepair> driveSchoolCarRepairIPage = driveSchoolCarRepairService.selectDriveSchoolCarRepairList(driveSchoolCarRepair, page);
return CommonResult.success(driveSchoolCarRepairIPage);
//return getDataTable(list);
@ -63,7 +64,7 @@ public class DriveSchoolCarRepairController extends BaseController
* 获取车辆维修记录详细信息
*/
@GetMapping(value = "/{id}")
public CommonResult getInfo(@PathVariable("id") Long id)
public CommonResult getInfo(@PathVariable("id") String id)
{
return success(driveSchoolCarRepairService.selectDriveSchoolCarRepairById(id));
}

View File

@ -27,9 +27,10 @@ public class DriveSchoolDeductController extends BaseController
* 查询提成配置列表
*/
@GetMapping("/list")
public CommonResult<IPage<?>> list(DriveSchoolDeduct driveSchoolDeduct)
public CommonResult<IPage<?>> list(DriveSchoolDeduct driveSchoolDeduct,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
{
Page<DriveSchoolDeduct> page = new Page<>(driveSchoolDeduct.getPageNum(), driveSchoolDeduct.getPageSize());
Page<DriveSchoolDeduct> page = new Page<>(pageNum,pageSize);
IPage<DriveSchoolDeduct> driveSchoolDeductIPage = driveSchoolDeductService.selectDriveSchoolDeductList(driveSchoolDeduct, page);
return CommonResult.success(driveSchoolDeductIPage);
//return getDataTable(list);

View File

@ -26,12 +26,13 @@ public class DriveSchoolInsuranceController extends BaseController
* 查询保险管理列表
*/
@GetMapping("/list")
public CommonResult<IPage<?>> list(DriveSchoolInsurance driveSchoolInsurance)
public CommonResult<IPage<?>> list(DriveSchoolInsurance driveSchoolInsurance,@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
{
Page<DriveSchoolInsurance> page = new Page<>(driveSchoolInsurance.getPageNum(), driveSchoolInsurance.getPageSize());
Page<DriveSchoolInsurance> page = new Page<>(pageNum,pageSize);
IPage<DriveSchoolInsurance> driveSchoolInsuranceIPage = driveSchoolInsuranceService.selectDriveSchoolInsuranceList(driveSchoolInsurance, page);
return success(driveSchoolInsuranceIPage);
//return getDataTable(list);
//return getDataTable(list);川E5033学
}
/**

View File

@ -1,7 +1,10 @@
package cn.iocoder.yudao.module.jx.domain;
import cn.iocoder.yudao.annotation.Excel;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import cn.iocoder.yudao.module.jx.core.page.TenantBaDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@ -15,16 +18,14 @@ import java.util.Date;
* @date 2024-04-01
*/
@Data
public class DriveSchoolCarRepair extends TenantBaDO
public class DriveSchoolCarRepair extends TenantBaseDO
{
private static final long serialVersionUID = 1L;
/** 主键id */
private Long id;
@TableId(type = IdType.ASSIGN_UUID)
private String id;
/** 机构id */
@Excel(name = "机构id")
private Long deptId;
/** 负责人id */
@Excel(name = "负责人id")

View File

@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.jx.domain;
import cn.iocoder.yudao.annotation.Excel;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import cn.iocoder.yudao.module.jx.core.page.TenantBaDO;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
@ -16,17 +17,13 @@ import java.math.BigDecimal;
* @date 2024-05-07
*/
@Data
public class DriveSchoolDeduct extends TenantBaDO
public class DriveSchoolDeduct extends TenantBaseDO
{
private static final long serialVersionUID = 1L;
/** 主键id */
private Long id;
/** 机构id */
@Excel(name = "机构id")
private Long deptId;
/** 提成比例 */
@Excel(name = "提成比例")
private BigDecimal deduct;

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.jx.domain;
import cn.iocoder.yudao.annotation.Excel;
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import cn.iocoder.yudao.module.jx.core.page.TenantBaDO;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -16,17 +17,13 @@ import java.util.Date;
* @date 2024-05-06
*/
@Data
public class DriveSchoolInsurance extends TenantBaDO
public class DriveSchoolInsurance extends TenantBaseDO
{
private static final long serialVersionUID = 1L;
/** 主键id */
private Long id;
/** 机构id */
@Excel(name = "机构id")
private Long deptId;
/** 负责人id */
@Excel(name = "负责人id")
private Long userId;

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.jx.mapper;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolCarRepair;
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-04-01
*/
@Mapper
public interface DriveSchoolCarRepairMapper
public interface DriveSchoolCarRepairMapper extends BaseMapper<DriveSchoolCarRepair>
{
/**
* 查询车辆维修记录
@ -23,7 +24,7 @@ public interface DriveSchoolCarRepairMapper
* @param id 车辆维修记录主键
* @return 车辆维修记录
*/
public DriveSchoolCarRepair selectDriveSchoolCarRepairById(Long id);
public DriveSchoolCarRepair selectDriveSchoolCarRepairById(String id);
/**
* 查询车辆维修记录列表

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.jx.mapper;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct;
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-07
*/
@Mapper
public interface DriveSchoolDeductMapper
public interface DriveSchoolDeductMapper extends BaseMapper<DriveSchoolDeduct>
{
/**
* 查询提成配置

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.jx.mapper;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolInsurance;
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-06
*/
@Mapper
public interface DriveSchoolInsuranceMapper
public interface DriveSchoolInsuranceMapper extends BaseMapper<DriveSchoolInsurance>
{
/**
* 查询保险管理
@ -33,21 +34,6 @@ public interface DriveSchoolInsuranceMapper
*/
public IPage<DriveSchoolInsurance> selectDriveSchoolInsuranceList(@Param("entity") DriveSchoolInsurance driveSchoolInsurance, Page<DriveSchoolInsurance> page);
/**
* 新增保险管理
*
* @param driveSchoolInsurance 保险管理
* @return 结果
*/
public int insertDriveSchoolInsurance(DriveSchoolInsurance driveSchoolInsurance);
/**
* 修改保险管理
*
* @param driveSchoolInsurance 保险管理
* @return 结果
*/
public int updateDriveSchoolInsurance(DriveSchoolInsurance driveSchoolInsurance);
/**
* 删除保险管理

View File

@ -20,7 +20,7 @@ public interface IDriveSchoolCarRepairService
* @param id 车辆维修记录主键
* @return 车辆维修记录
*/
public DriveSchoolCarRepair selectDriveSchoolCarRepairById(Long id);
public DriveSchoolCarRepair selectDriveSchoolCarRepairById(String id);
/**
* 查询车辆维修记录列表

View File

@ -3,8 +3,7 @@ package cn.iocoder.yudao.module.jx.service;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 提成配置Service接口
@ -12,8 +11,7 @@ import java.util.List;
* @author ruoyi
* @date 2024-05-07
*/
public interface IDriveSchoolDeductService
{
public interface IDriveSchoolDeductService extends IService<DriveSchoolDeduct> {
/**
* 查询提成配置
*
@ -61,4 +59,14 @@ public interface IDriveSchoolDeductService
* @return 结果
*/
public int deleteDriveSchoolDeductById(Long id);
/**
* 通过科目查询提成配置信息
*
* @param subject 科目
* @return cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct
* @author PQZ
* @date 14:23 2025/2/19
**/
DriveSchoolDeduct queryBySubject(String subject);
}

View File

@ -42,7 +42,7 @@ public class DriveSchoolCarRepairServiceImpl implements IDriveSchoolCarRepairSer
* @return 车辆维修记录
*/
@Override
public DriveSchoolCarRepair selectDriveSchoolCarRepairById(Long id)
public DriveSchoolCarRepair selectDriveSchoolCarRepairById(String id)
{
return driveSchoolCarRepairMapper.selectDriveSchoolCarRepairById(id);
}
@ -58,13 +58,6 @@ public class DriveSchoolCarRepairServiceImpl implements IDriveSchoolCarRepairSer
@Override
public IPage<DriveSchoolCarRepair> selectDriveSchoolCarRepairList(DriveSchoolCarRepair driveSchoolCarRepair, Page<DriveSchoolCarRepair> page)
{
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolCarRepair.setDeptId(deptId);
if (deptId == 100){
driveSchoolCarRepair.setDeptId(null);
}
IPage<DriveSchoolCarRepair> driveSchoolCarRepairIPage = driveSchoolCarRepairMapper.selectDriveSchoolCarRepairList(driveSchoolCarRepair, page);
List<DriveSchoolCarRepair> driveSchoolCarRepairs = driveSchoolCarRepairIPage.getRecords();
for (DriveSchoolCarRepair schoolCarRepair : driveSchoolCarRepairs) {
@ -79,10 +72,7 @@ public class DriveSchoolCarRepairServiceImpl implements IDriveSchoolCarRepairSer
@Override
public List<DriveSchoolCarRepair> selectDriveSchoolCarRepairListAll(DriveSchoolCarRepair driveSchoolCarRepair)
{
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolCarRepair.setDeptId(deptId);
List<DriveSchoolCarRepair> driveSchoolCarRepairs = driveSchoolCarRepairMapper.selectDriveSchoolCarRepairListAll(driveSchoolCarRepair);
for (DriveSchoolCarRepair schoolCarRepair : driveSchoolCarRepairs) {
DriveSchoolCar driveSchoolCar = driveSchoolCarMapper.selectDriveSchoolCarById(schoolCarRepair.getCarId());
@ -102,11 +92,7 @@ public class DriveSchoolCarRepairServiceImpl implements IDriveSchoolCarRepairSer
@Override
public int insertDriveSchoolCarRepair(DriveSchoolCarRepair driveSchoolCarRepair)
{
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolCarRepair.setDeptId(deptId);
return driveSchoolCarRepairMapper.insertDriveSchoolCarRepair(driveSchoolCarRepair);
return driveSchoolCarRepairMapper.insert(driveSchoolCarRepair);
}
/**
@ -119,7 +105,7 @@ public class DriveSchoolCarRepairServiceImpl implements IDriveSchoolCarRepairSer
public int updateDriveSchoolCarRepair(DriveSchoolCarRepair driveSchoolCarRepair)
{
//driveSchoolCarRepair.setUpdateTime(DateUtils.getNowDate());
return driveSchoolCarRepairMapper.updateDriveSchoolCarRepair(driveSchoolCarRepair);
return driveSchoolCarRepairMapper.updateById(driveSchoolCarRepair);
}
/**

View File

@ -1,14 +1,20 @@
package cn.iocoder.yudao.module.jx.service.impl;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.course.entity.SchoolCommission;
import cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper;
import cn.iocoder.yudao.module.jx.core.page.TenantBaDO;
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct;
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolDeductMapper;
import cn.iocoder.yudao.module.jx.service.IDriveSchoolDeductService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -22,7 +28,7 @@ import java.util.List;
* @date 2024-05-07
*/
@Service
public class DriveSchoolDeductServiceImpl implements IDriveSchoolDeductService
public class DriveSchoolDeductServiceImpl extends ServiceImpl<DriveSchoolDeductMapper, DriveSchoolDeduct> implements IDriveSchoolDeductService
{
@Autowired
private DriveSchoolDeductMapper driveSchoolDeductMapper;
@ -51,13 +57,6 @@ public class DriveSchoolDeductServiceImpl implements IDriveSchoolDeductService
@Override
public IPage<DriveSchoolDeduct> selectDriveSchoolDeductList(DriveSchoolDeduct driveSchoolDeduct, Page<DriveSchoolDeduct> page)
{
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolDeduct.setDeptId(deptId);
if (deptId == 100){
driveSchoolDeduct.setDeptId(null);
}
return driveSchoolDeductMapper.selectDriveSchoolDeductList(driveSchoolDeduct,page);
}
@ -69,10 +68,6 @@ public class DriveSchoolDeductServiceImpl implements IDriveSchoolDeductService
*/
@Override
public int insertDriveSchoolDeduct(DriveSchoolDeduct driveSchoolDeduct) throws Exception {
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolDeduct.setDeptId(deptId);
String courseSubject = driveSchoolDeduct.getCourseSubject();
DriveSchoolDeduct driveSchoolDeduct1 = new DriveSchoolDeduct();
driveSchoolDeduct1.setCourseSubject(courseSubject);
@ -119,4 +114,24 @@ public class DriveSchoolDeductServiceImpl implements IDriveSchoolDeductService
{
return driveSchoolDeductMapper.deleteDriveSchoolDeductById(id);
}
/**
* 通过科目查询提成配置信息
*
* @param subject 科目
* @return cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct
* @author PQZ
* @date 14:23 2025/2/19
**/
@Override
public DriveSchoolDeduct queryBySubject(String subject) {
LambdaQueryWrapper<DriveSchoolDeduct> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(BaseDO::getDeleted,0).eq(DriveSchoolDeduct::getCourseSubject,subject).orderByDesc(BaseDO::getCreateTime);
List<DriveSchoolDeduct> list = list(lambdaQueryWrapper);
if (!list.isEmpty()) {
return list.get(0);
} else {
return null;
}
}
}

View File

@ -57,19 +57,14 @@ public class DriveSchoolInsuranceServiceImpl implements IDriveSchoolInsuranceSer
@Override
public IPage<DriveSchoolInsurance> selectDriveSchoolInsuranceList(DriveSchoolInsurance driveSchoolInsurance, Page<DriveSchoolInsurance> page)
{
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolInsurance.setDeptId(deptId);
if (deptId==100){
driveSchoolInsurance.setDeptId(null);
}
IPage<DriveSchoolInsurance> driveSchoolInsuranceIPage = driveSchoolInsuranceMapper.selectDriveSchoolInsuranceList(driveSchoolInsurance, page);
List<DriveSchoolInsurance> driveSchoolInsurances = driveSchoolInsuranceIPage.getRecords();
for (DriveSchoolInsurance schoolInsurance : driveSchoolInsurances) {
DriveSchoolCar driveSchoolCar = driveSchoolCarMapper.selectDriveSchoolCarById(schoolInsurance.getCarId());
schoolInsurance.setCarName(driveSchoolCar.getCarModel());
if (null != driveSchoolCar){
schoolInsurance.setCarName(driveSchoolCar.getCarModel());
}
}
return driveSchoolInsuranceIPage;
@ -89,11 +84,7 @@ public class DriveSchoolInsuranceServiceImpl implements IDriveSchoolInsuranceSer
}else {
driveSchoolInsurance.setCarId(driveSchoolCar.getId());
}
Long userId = SecurityFrameworkUtils.getLoginUserId();
AdminUserRespDTO user = userApi.getUser(userId);
Long deptId = user.getDeptId();
driveSchoolInsurance.setDeptId(deptId);
return driveSchoolInsuranceMapper.insertDriveSchoolInsurance(driveSchoolInsurance);
return driveSchoolInsuranceMapper.insert(driveSchoolInsurance);
}
/**
@ -106,7 +97,7 @@ public class DriveSchoolInsuranceServiceImpl implements IDriveSchoolInsuranceSer
public int updateDriveSchoolInsurance(DriveSchoolInsurance driveSchoolInsurance)
{
//driveSchoolInsurance.setUpdateTime(DateUtils.getNowDate());
return driveSchoolInsuranceMapper.updateDriveSchoolInsurance(driveSchoolInsurance);
return driveSchoolInsuranceMapper.updateById(driveSchoolInsurance);
}
/**

View File

@ -46,8 +46,11 @@
SELECT
dsp.* FROM drive_school_process dsp
<where>
desp.deleted = 0
dsp.deleted = 0
<if test="entity.coachName != null and entity.coachName != '' "> and dsp.coach_name like concat('%', #{entity.coachName}, '%')</if>
<if test="entity.userName != null and entity.userName != '' "> and dsp.user_name like concat('%', #{entity.userName}, '%')</if>
<if test="entity.courseName != null and entity.courseName != '' "> and dsc.name like concat('%', #{entity.courseName}, '%')</if>
</where>
order by dsp.create_time desc
</select>
</mapper>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.course.mapper.SchoolCommissionMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="queryPage" resultType="cn.iocoder.yudao.module.course.vo.SchoolCommissionVO">
SELECT
main.*,
dsc.name AS courseName,
dsc.type AS courseType
FROM
drive_school_commission main
LEFT JOIN drive_school_course dsc ON main.course_id = dsc.id AND dsc.deleted = 0
<where>
main.deleted = 0
<if test="entity.coachName != null and entity.coachName != '' "> and main.coach_name like concat('%', #{entity.coachName}, '%')</if>
<if test="entity.studentName != null and entity.studentName != '' "> and main.student_name like concat('%', #{entity.studentName}, '%')</if>
<if test="entity.checkName != null and entity.checkName != '' "> and main.check_name like concat('%', #{entity.checkName}, '%')</if>
<if test="entity.courseName != null and entity.courseName != '' "> and dsc.name like concat('%', #{entity.courseName}, '%')</if>
</where>
order by main.create_time desc
</select>
</mapper>

View File

@ -6,7 +6,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="cn.iocoder.yudao.module.jx.domain.DriveSchoolCarRepair" id="DriveSchoolCarRepairResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="carId" column="car_id" />
@ -31,14 +30,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDriveSchoolCarRepairVo">
select id, out_time,carBian,photo,carExpert,carCheck,carExchange,carRepaired,carRepair,carLong,carsId,dept_id, user_id, car_id,car_no, user_name,problem, content, money, create_time, creator, update_time, updater from drive_school_car_repair
select id, out_time,carBian,photo,carExpert,carCheck,carExchange,carRepaired,carRepair,carLong,carsId,user_id, car_id,car_no, user_name,problem, content, money, create_time, creator, update_time, updater from drive_school_car_repair
</sql>
<select id="selectDriveSchoolCarRepairList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCarRepair" resultMap="DriveSchoolCarRepairResult">
<include refid="selectDriveSchoolCarRepairVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null "> and user_name like concat('%',#{entity.userName},'%')</if>
<if test="entity.carId != null "> and car_id = #{entity.carId}</if>
@ -54,7 +52,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDriveSchoolCarRepairVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null "> and user_name like concat('%',#{entity.userName},'%')</if>
<if test="entity.carId != null "> and car_id = #{entity.carId}</if>
@ -66,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc
</select>
<select id="selectDriveSchoolCarRepairById" parameterType="Long" resultMap="DriveSchoolCarRepairResult">
<select id="selectDriveSchoolCarRepairById" parameterType="String" resultMap="DriveSchoolCarRepairResult">
<include refid="selectDriveSchoolCarRepairVo"/>
where id = #{id}
</select>
@ -75,7 +72,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into drive_school_car_repair
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="carId != null">car_id,</if>
@ -100,7 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="carId != null">#{carId},</if>
@ -128,7 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateDriveSchoolCarRepair" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolCarRepair">
update drive_school_car_repair
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="carId != null">car_id = #{carId},</if>

View File

@ -6,7 +6,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct" id="DriveSchoolDeductResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="deduct" column="deduct" />
<result property="courseSubject" column="course_subject" />
<result property="createTime" column="create_time" />
@ -16,14 +15,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDriveSchoolDeductVo">
select id, dept_id, deduct, course_subject, create_time, creator, update_time, updater from drive_school_deduct
select id, deduct, course_subject, create_time, creator, update_time, updater from drive_school_deduct
</sql>
<select id="selectDriveSchoolDeductList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct" resultMap="DriveSchoolDeductResult">
<include refid="selectDriveSchoolDeductVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.deduct != null "> and deduct = #{entity.deduct}</if>
<if test="entity.courseSubject != null and entity.courseSubject != ''"> and course_subject = #{entity.courseSubject}</if>
</where>
@ -34,7 +32,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectDriveSchoolDeductVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.deduct != null "> and deduct = #{entity.deduct}</if>
<if test="entity.courseSubject != null and entity.courseSubject != ''"> and course_subject = #{entity.courseSubject}</if>
</where>
@ -49,7 +46,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertDriveSchoolDeduct" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct" useGeneratedKeys="true" keyProperty="id">
insert into drive_school_deduct
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="deduct != null">deduct,</if>
<if test="courseSubject != null">course_subject,</if>
<if test="createTime != null">create_time,</if>
@ -58,7 +54,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updater != null">updater,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="deduct != null">#{deduct},</if>
<if test="courseSubject != null">#{courseSubject},</if>
<if test="createTime != null">#{createTime},</if>
@ -71,7 +66,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateDriveSchoolDeduct" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolDeduct">
update drive_school_deduct
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="deduct != null">deduct = #{deduct},</if>
<if test="courseSubject != null">course_subject = #{courseSubject},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@ -97,7 +91,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from drive_school_deduct
<where>
deleted = 0
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="courseSubject != null and courseSubject != ''"> and course_subject = #{courseSubject}</if>
</where>
limit 1

View File

@ -6,7 +6,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="cn.iocoder.yudao.module.jx.domain.DriveSchoolInsurance" id="DriveSchoolInsuranceResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
<result property="userName" column="user_name" />
<result property="userNames" column="user_names" />
@ -23,14 +22,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDriveSchoolInsuranceVo">
select id, dept_id,user_names, user_id, car_id, user_name,car_no,company, content, money, insurance_time, create_time, creator, update_time, updater from drive_school_insurance
select id, user_names, user_id, car_id, user_name,car_no,company, content, money, insurance_time, create_time, creator, update_time, updater from drive_school_insurance
</sql>
<select id="selectDriveSchoolInsuranceList" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolInsurance" resultMap="DriveSchoolInsuranceResult">
<include refid="selectDriveSchoolInsuranceVo"/>
<where>
deleted = 0
<if test="entity.deptId != null "> and dept_id = #{entity.deptId}</if>
<if test="entity.userId != null "> and user_id = #{entity.userId}</if>
<if test="entity.userName != null "> and user_name = #{entity.userName}</if>
<if test="entity.carId != null "> and car_id = #{entity.carId}</if>
@ -48,62 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert id="insertDriveSchoolInsurance" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolInsurance" useGeneratedKeys="true" keyProperty="id">
insert into drive_school_insurance
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null">user_name,</if>
<if test="userNames != null">user_names,</if>
<if test="carId != null">car_id,</if>
<if test="carNo != null">car_no,</if>
<if test="company != null and company != ''">company,</if>
<if test="content != null and content != ''">content,</if>
<if test="money != null">money,</if>
<if test="insuranceTime != null">insurance_time,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null">#{userName},</if>
<if test="userNames != null">#{userNames},</if>
<if test="carId != null">#{carId},</if>
<if test="carNo != null">#{carNo},</if>
<if test="company != null and company != ''">#{company},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="money != null">#{money},</if>
<if test="insuranceTime != null">#{insuranceTime},</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>
</trim>
</insert>
<update id="updateDriveSchoolInsurance" parameterType="cn.iocoder.yudao.module.jx.domain.DriveSchoolInsurance">
update drive_school_insurance
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null">user_name = #{userName},</if>
<if test="userNames != null">user_names = #{userNames},</if>
<if test="carId != null">car_id = #{carId},</if>
<if test="carNo != null">car_no = #{carNo},</if>
<if test="company != null and company != ''">company = #{company},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="money != null">money = #{money},</if>
<if test="insuranceTime != null">insurance_time = #{insuranceTime},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteDriveSchoolInsuranceById" parameterType="Long">
delete from drive_school_insurance where id = #{id}