zhouy hace 7 meses
padre
commit
d8afb78d3b

+ 20 - 0
bus-biz/src/main/java/bus/mapper/BCoursePreMapper.java

@@ -0,0 +1,20 @@
+package bus.mapper;
+
+import bus.model.dto.BCoursePrePageDto;
+import bus.model.vo.BCoursePreVo;
+import bus.model.po.*;
+import org.apache.ibatis.annotations.Mapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import java.util.List;
+
+/**
+ * @Program: bus
+ * @Description: 描述
+ * @Author: zy
+ * @Date: 2025-03-17 21:07:12
+ **/
+@Mapper
+public interface BCoursePreMapper extends BaseMapper<BCoursePrePo> {
+
+    List<BCoursePreVo> list(BCoursePrePageDto dto);
+}

+ 1 - 1
bus-biz/src/main/java/bus/service/BBusInfoService.java

@@ -53,7 +53,7 @@ public interface BBusInfoService extends IService<BBusInfoPo> {
      */
     void delete(String id);
 
-    public BTrackStationDto getPoint(String busId);
+    public List<BTrackStationDto> getPoint(String busId);
 
     /**
      * 获取车辆状态树型数据

+ 56 - 0
bus-biz/src/main/java/bus/service/BCoursePreService.java

@@ -0,0 +1,56 @@
+package bus.service;
+
+import bus.model.dto.BCoursePreDto;
+import bus.model.dto.BCoursePrePageDto;
+import bus.model.vo.BCoursePreVo;
+import bus.model.po.BCoursePrePo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Program: bus
+ * @Description: 描述
+ * @Author: zy
+ * @Date: 2025-03-17 21:07:12
+ **/
+public interface BCoursePreService extends IService<BCoursePrePo> {
+
+
+    /**
+     * 详情
+     * @param id
+     * @return
+     */
+    BCoursePrePo getDetailById(String id);
+
+	/**
+     * 保存
+     * @param dto
+     * @return
+     */
+    void save(BCoursePreDto dto);
+
+    /**
+    * 列表
+    * @param dto
+    * @return
+    */
+    List<BCoursePreVo> list(BCoursePrePageDto dto);
+
+	/**
+     * 修改
+     * @param dto
+     * @return
+     */
+    void update(BCoursePreDto dto);
+
+	/**
+     * 删除
+     * @param id
+     * @return
+     */
+    void delete(String id);
+
+    void deleteByCourseId(String courseId);
+}

+ 1 - 1
bus-biz/src/main/java/bus/service/CommonService.java

@@ -14,7 +14,7 @@ import java.util.List;
 * @Program: bus
 * @Description: 描述
 * @Author: zy
-* @Date: 2025-03-11 18:22:22
+* @Date: 2025-03-17 21:07:12
 **/
 public interface CommonService {
 

+ 31 - 25
bus-biz/src/main/java/bus/service/impl/BBusInfoServiceImpl.java

@@ -462,8 +462,8 @@ public class BBusInfoServiceImpl extends ServiceImpl<BBusInfoMapper,BBusInfoPo>
     }
 
     @Override
-    public BTrackStationDto getPoint(String busId) {
-        BTrackStationDto dto = new BTrackStationDto();
+    public List<BTrackStationDto> getPoint(String busId) {
+       List<BTrackStationDto> dtoList = new ArrayList<>();
         QueryWrapper<BCourseBusPo> queryWrapper = new QueryWrapper();
         queryWrapper.eq("bus_id", busId);
         queryWrapper.eq("is_delete", 0);
@@ -471,34 +471,40 @@ public class BBusInfoServiceImpl extends ServiceImpl<BBusInfoMapper,BBusInfoPo>
         if (CollectionUtil.isEmpty(list1)) {
             throw new BusinessException("该车辆未分配路线");
         } else {
-            String courseId = list1.get(0).getCourseId();
-            BCourseInfoPo byId = (BCourseInfoPo)this.bCourseInfoService.getById(courseId);
-            if (byId == null) {
+            List<String> courseIdList = list1.stream().map(BCourseBusPo::getCourseId).collect(Collectors.toList());
+            List<BCourseInfoPo> bCourseInfoPos = this.bCourseInfoService.listByIds(courseIdList);
+            if (CollectionUtil.isEmpty(bCourseInfoPos)) {
                 throw new BusinessException("该路线不存在");
             } else {
-                List<BCourseStationPo> listByCourse = this.bCourseStationService.getListByCourse(courseId);
-                if (CollectionUtil.isNotEmpty(listByCourse)) {
-                    List<String> stationIds = (List)listByCourse.stream().map(BCourseStationPo::getStationId).collect(Collectors.toList());
-                    List<BStationPointDto> list = new ArrayList();
-                    this.bStationInfoService.listByIds(stationIds).forEach((bStationInfoPo) -> {
-                        BStationPointDto bCoursePointDto = new BStationPointDto();
-                        bCoursePointDto.setLatitude(bCoursePointDto.getLatitude());
-                        bCoursePointDto.setLongitude(bCoursePointDto.getLongitude());
-                        bCoursePointDto.setId(bStationInfoPo.getId());
-                        bCoursePointDto.setName(bStationInfoPo.getName());
-                        list.add(bCoursePointDto);
-                    });
-                    dto.setSlist(list);
+                for (BCourseInfoPo bCourseInfoPo : bCourseInfoPos) {
+                    BTrackStationDto dto = new BTrackStationDto();
+                    List<BCourseStationPo> listByCourse = this.bCourseStationService.getListByCourse(bCourseInfoPo.getId());
+                    if (CollectionUtil.isNotEmpty(listByCourse)) {
+                        List<String> stationIds = (List)listByCourse.stream().map(BCourseStationPo::getStationId).collect(Collectors.toList());
+                        List<BStationPointDto> list = new ArrayList();
+                        this.bStationInfoService.listByIds(stationIds).forEach((bStationInfoPo) -> {
+                            BStationPointDto bCoursePointDto = new BStationPointDto();
+                            bCoursePointDto.setLatitude(bCoursePointDto.getLatitude());
+                            bCoursePointDto.setLongitude(bCoursePointDto.getLongitude());
+                            bCoursePointDto.setId(bStationInfoPo.getId());
+                            bCoursePointDto.setName(bStationInfoPo.getName());
+                            list.add(bCoursePointDto);
+                        });
+                        dto.setSlist(list);
+                    }
+
+                    String mapPoint = bCourseInfoPo.getMapPoint();
+                    if (StrUtil.isNotBlank(mapPoint)) {
+                        List<BCoursePointDto> fileJsons = JSONUtil.toList(mapPoint, BCoursePointDto.class);
+                        dto.setClist(fileJsons);
+                    }
+
+                    dto.setId(busId);
+                    dtoList.add(dto);
                 }
 
-                String mapPoint = byId.getMapPoint();
-                if (StrUtil.isNotBlank(mapPoint)) {
-                    List<BCoursePointDto> fileJsons = JSONUtil.toList(mapPoint, BCoursePointDto.class);
-                    dto.setClist(fileJsons);
-                }
 
-                dto.setId(busId);
-                return dto;
+                return dtoList;
             }
         }
     }

+ 58 - 15
bus-biz/src/main/java/bus/service/impl/BCourseInfoServiceImpl.java

@@ -45,6 +45,8 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
     @Resource
     private BCourseTimeService bCourseTimeService;
     @Resource
+    private BCoursePreService bCoursePreService;
+    @Resource
     private BCourseStationService bCourseStationService;
     @Resource
     private BStationInfoService bStationInfoService;
@@ -75,6 +77,12 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
         List<BCourseTimePo> list = bCourseTimeService.list(queryWrapper);
         bCourseInfoDto.setBCourseTimeList(BeanUtil.copyToList(list, BCourseTimeDto.class));
 
+        QueryWrapper<BCoursePrePo> queryWrapper6 = new QueryWrapper<>();
+        queryWrapper6.eq("course_id", id);
+        queryWrapper6.orderByAsc("sort");
+        List<BCoursePrePo> list6 = bCoursePreService.list(queryWrapper6);
+        bCourseInfoDto.setBCoursePreList(BeanUtil.copyToList(list6, BCoursePreDto.class));
+
         QueryWrapper<BCourseStationPo> queryWrapper1 = new QueryWrapper<>();
         queryWrapper1.eq("course_id", id);
         queryWrapper1.orderByAsc("sort");
@@ -174,6 +182,11 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
         po.setFirstBusSpace(bCourseTimeList.get(0).getBusSpace());
         List<BCourseTimePo> bCourseTimePoList = handleCourseTime(bCourseTimeList, extInfo, po.getId(), false);
         bCourseTimeService.saveBatch(bCourseTimePoList);
+        //处理预约时刻
+        List<BCoursePreDto> bCoursePreList = dto.getBCoursePreList();
+        List<BCoursePrePo> bCoursePrePos = handleCoursePre(bCoursePreList, extInfo, po.getId(), false);
+        bCoursePreService.saveBatch(bCoursePrePos);
+
         //处理标志点
         List<BCourseStationDto> bCourseStationList = dto.getBCourseStationList();
 
@@ -192,13 +205,13 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
 
         //处理车辆
         List<BCourseBusDto> bCourseBusList = dto.getBCourseBusList();
-        List<String> busId = bCourseBusList.stream().map(BCourseBusDto::getBusId).collect(Collectors.toList());
-        QueryWrapper<BCourseBusPo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("bus_id", busId);
-        List<BCourseBusPo> list = bCourseBusService.list(queryWrapper);
-        if(CollectionUtil.isNotEmpty(list)){
-            throw new BusinessException("存在车辆已被绑定");
-        }
+//        List<String> busId = bCourseBusList.stream().map(BCourseBusDto::getBusId).collect(Collectors.toList());
+//        QueryWrapper<BCourseBusPo> queryWrapper = new QueryWrapper<>();
+//        queryWrapper.in("bus_id", busId);
+//        List<BCourseBusPo> list = bCourseBusService.list(queryWrapper);
+//        if(CollectionUtil.isNotEmpty(list)){
+//            throw new BusinessException("存在车辆已被绑定");
+//        }
         List<BCourseBusPo> bCourseBusPos = handleCourseBus(bCourseBusList, extInfo, po.getId(), true);
         bCourseBusService.saveBatch(bCourseBusPos);
         this.bCourseInfoMapper.insert(po);
@@ -237,6 +250,12 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
         po.setFirstBusSpace(bCourseTimeList.get(0).getBusSpace());
         List<BCourseTimePo> bCourseTimePoList = handleCourseTime(bCourseTimeList, extInfo, po.getId(), false);
         bCourseTimeService.saveBatch(bCourseTimePoList);
+
+        //处理预约时刻
+        bCoursePreService.deleteByCourseId(po.getId());
+        List<BCoursePreDto> bCoursePreList = dto.getBCoursePreList();
+        List<BCoursePrePo> bCoursePrePos = handleCoursePre(bCoursePreList, extInfo, po.getId(), false);
+        bCoursePreService.saveBatch(bCoursePrePos);
         //处理标志点
         bCourseStationService.deleteByCourseId(po.getId());
         List<BCourseStationDto> bCourseStationList = dto.getBCourseStationList();
@@ -250,14 +269,14 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
         //处理车辆
         bCourseBusService.deleteByCourseId(po.getId());
         List<BCourseBusDto> bCourseBusList = dto.getBCourseBusList();
-        List<String> busId = bCourseBusList.stream().map(BCourseBusDto::getBusId).collect(Collectors.toList());
-        QueryWrapper<BCourseBusPo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.in("bus_id", busId);
-        queryWrapper.ne("id",dto.getId());
-        List<BCourseBusPo> list = bCourseBusService.list(queryWrapper);
-        if(CollectionUtil.isNotEmpty(list)){
-            throw new BusinessException("存在车辆已被绑定");
-        }
+//        List<String> busId = bCourseBusList.stream().map(BCourseBusDto::getBusId).collect(Collectors.toList());
+//        QueryWrapper<BCourseBusPo> queryWrapper = new QueryWrapper<>();
+//        queryWrapper.in("bus_id", busId);
+//        queryWrapper.ne("id",dto.getId());
+//        List<BCourseBusPo> list = bCourseBusService.list(queryWrapper);
+//        if(CollectionUtil.isNotEmpty(list)){
+//            throw new BusinessException("存在车辆已被绑定");
+//        }
 
         List<BCourseBusPo> bCourseBusPos = handleCourseBus(bCourseBusList, extInfo, po.getId(), false);
         bCourseBusService.saveBatch(bCourseBusPos);
@@ -292,6 +311,30 @@ public class BCourseInfoServiceImpl extends ServiceImpl<BCourseInfoMapper, BCour
         }
         return bCourseTimePoList;
     }
+
+    private List<BCoursePrePo> handleCoursePre(List<BCoursePreDto> timeList,
+                                                 ExtInfo extInfo,
+                                                 String courseId,
+                                                 Boolean isCreate) {
+        List<BCoursePrePo> bCoursePrePoList = new ArrayList<>();
+        for (int i = 0; i < timeList.size(); i++) {
+            BCoursePreDto bCoursePreDto = timeList.get(i);
+            BCoursePrePo bCoursePrePo = BeanUtil.toBean(bCoursePreDto, BCoursePrePo.class);
+            bCoursePrePo.setId(snowflakeUtil.snowflakeId());
+            bCoursePrePo.setCourseId(courseId);
+            if(isCreate){
+                bCoursePrePo.setCreateTime(new Date());
+                bCoursePrePo.setCreatorId(extInfo.getUserId());
+                bCoursePrePo.setCreatorName(extInfo.getUserName());
+            }
+            bCoursePrePo.setUpdateTime(new Date());
+            bCoursePrePo.setUpdaterId(extInfo.getUserId());
+            bCoursePrePo.setUpdaterName(extInfo.getUserName());
+
+            bCoursePrePoList.add(bCoursePrePo);
+        }
+        return bCoursePrePoList;
+    }
     /**
      * 处理站点信息
      */

+ 90 - 0
bus-biz/src/main/java/bus/service/impl/BCoursePreServiceImpl.java

@@ -0,0 +1,90 @@
+package bus.service.impl;
+
+import bus.model.dto.BCoursePreDto;
+import bus.model.dto.BCoursePrePageDto;
+import bus.model.vo.BCoursePreVo;
+import bus.model.po.BCoursePrePo;
+import bus.mapper.BCoursePreMapper;
+
+import bus.service.BCoursePreService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.BeanUtils;
+import java.util.List;
+
+/**
+ * @Program: bus
+ * @Description: 描述
+ * @Author: zy
+ * @Date: 2025-03-17 21:07:12
+ **/
+@Service
+public class BCoursePreServiceImpl extends ServiceImpl<BCoursePreMapper, BCoursePrePo> implements BCoursePreService {
+
+    @Autowired
+    private BCoursePreMapper bCoursePreMapper;
+
+
+	/**
+     * 详情
+     * @param id
+     * @return
+     */
+    @Override
+    public BCoursePrePo getDetailById(String id){
+        return this.bCoursePreMapper.selectById(id);
+    }
+
+	/**
+     * 保存
+     * @param dto
+     * @return
+     */
+    @Override
+	public void save(BCoursePreDto dto){
+        BCoursePrePo po = new BCoursePrePo();
+        BeanUtils.copyProperties(dto,po);
+		this.bCoursePreMapper.insert(po);
+    }
+
+    /**
+    * 列表
+    * @param dto
+    * @return
+    */
+    @Override
+    public List<BCoursePreVo> list(BCoursePrePageDto dto){
+        return this.bCoursePreMapper.list(dto);
+    }
+
+	/**
+     * 修改
+     * @param dto
+     * @return
+     */
+    @Override
+    public void update(BCoursePreDto dto){
+        BCoursePrePo po = new BCoursePrePo();
+        BeanUtils.copyProperties(dto,po);
+		bCoursePreMapper.updateById(po);
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @Override
+    public void delete(String id){
+		bCoursePreMapper.deleteById(id);
+    }
+
+    @Override
+    public void deleteByCourseId(String courseId) {
+        QueryWrapper<BCoursePrePo> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("course_id",courseId);
+        bCoursePreMapper.delete(queryWrapper);
+    }
+}

+ 1 - 1
bus-biz/src/main/java/bus/service/impl/CommonServiceImpl.java

@@ -29,7 +29,7 @@ import java.util.stream.Collectors;
 * @Program: bus
 * @Description: 描述
 * @Author: zy
-* @Date: 2025-03-11 18:22:22
+* @Date: 2025-03-17 21:07:12
 **/
 @Service
 @Transactional

+ 23 - 0
bus-biz/src/main/resources/mapper/BCoursePreMapper.xml

@@ -0,0 +1,23 @@
+<?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="bus.mapper.BCoursePreMapper">
+
+ <select id="list" parameterType="bus.model.dto.BCoursePrePageDto" resultType="bus.model.vo.BCoursePreVo">
+   select
+   id,
+   course_id,
+   pre_time,
+   sort,
+   type,
+   create_time,
+   update_time,
+   creator_id,
+   updater_id,
+   creator_name,
+   updater_name,
+   is_delete
+   from
+   b_course_pre
+ </select>
+
+</mapper>

+ 4 - 4
bus-boot/src/test/java/bus/CodeGenerateTest.java

@@ -20,8 +20,8 @@ public class CodeGenerateTest {
 	public void codeGenerate(){
 		GenerateConfig generateConfig = new GenerateConfig();
 		//设置输出目录
-		//CodeGenerator.baseOutputDir="/Users/zhou/work/";
-		CodeGenerator.baseOutputDir="E:\\selfWork";
+		CodeGenerator.baseOutputDir="/Users/zhou/work/";
+		//CodeGenerator.baseOutputDir="E:\\selfWork";
 		//设置项目信息
 		ProjectInfo projectInfo = new ProjectInfo();
 		//1表示多模块0表示单模块
@@ -38,8 +38,8 @@ public class CodeGenerateTest {
 		//设置生成的表
 		List<TableInfo> tables = new ArrayList<>();
 		TableInfo tableInfo = new TableInfo();
-		tableInfo.setTableName("b_user_course");
-		tableInfo.setTableAlias("BUserCourse");
+		tableInfo.setTableName("b_course_pre");
+		tableInfo.setTableAlias("BCoursePre");
 		tables.add(tableInfo);
 		generateConfig.setTableInfos(tables);
 		//生成代码

+ 1 - 1
bus-common/src/main/java/bus/model/BaseEntity.java

@@ -5,7 +5,7 @@ import lombok.Data;
 * @Program: bus
 * @Description: 描述
 * @Author: zy
-* @Date: 2025-03-11 18:22:22
+* @Date: 2025-03-17 21:07:13
 **/
 @Data
 public class BaseEntity {

+ 6 - 0
bus-common/src/main/java/bus/model/dto/BCourseInfoDto.java

@@ -61,4 +61,10 @@ public class BCourseInfoDto{
     @ApiModelProperty("车辆LIST")
     @NotEmpty(message = "车辆列表不能为空")
     List<BCourseBusDto> bCourseBusList;
+
+    @ApiModelProperty("预约时刻LIST")
+    @NotEmpty(message = "预约时刻不能为空")
+    List<BCoursePreDto> bCoursePreList;
+
+
 }

+ 26 - 0
bus-common/src/main/java/bus/model/dto/BCoursePreDto.java

@@ -0,0 +1,26 @@
+package bus.model.dto;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import java.util.Date;
+/**
+* @Program: bus
+* @Description: 描述
+* @Author: zy
+* @Date: 2025-03-17 21:07:13
+**/
+@Data
+public class BCoursePreDto{
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("路线id")
+    private String courseId;
+    @ApiModelProperty("预约时间")
+    private String preTime;
+    @ApiModelProperty("排序")
+    private Integer sort;
+    @ApiModelProperty("备注")
+    private String remark;
+
+}

+ 40 - 0
bus-common/src/main/java/bus/model/dto/BCoursePrePageDto.java

@@ -0,0 +1,40 @@
+package bus.model.dto;
+
+import bus.model.BaseEntity;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import java.util.Date;
+/**
+* @Program: bus
+* @Description: 描述
+* @Author: zy
+* @Date: 2025-03-17 21:07:13
+**/
+@Data
+public class BCoursePrePageDto extends BaseEntity{
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("路线id")
+    private String courseId;
+    @ApiModelProperty("预约时间")
+    private String preTime;
+    @ApiModelProperty("排序")
+    private Integer sort;
+    @ApiModelProperty("备注")
+    private String type;
+    @ApiModelProperty("记录创建时间")
+    private Date createTime;
+    @ApiModelProperty("记录更新时间")
+    private Date updateTime;
+    @ApiModelProperty("创建人id")
+    private String creatorId;
+    @ApiModelProperty("修改人id")
+    private String updaterId;
+    @ApiModelProperty("创建人姓名")
+    private String creatorName;
+    @ApiModelProperty("修改人姓名")
+    private String updaterName;
+    @ApiModelProperty("是否删除")
+    private Integer isDelete;
+}

+ 1 - 1
bus-common/src/main/java/bus/model/dto/CommonLoginDto.java

@@ -8,7 +8,7 @@ import lombok.Data;
 * @Program: bus
 * @Description: 描述
 * @Author: zy
-* @Date: 2025-03-11 18:22:22
+* @Date: 2025-03-17 21:07:13
 **/
 @ApiModel(description = "账户登陆请求实体")
 @Data

+ 33 - 0
bus-common/src/main/java/bus/model/po/BCoursePrePo.java

@@ -0,0 +1,33 @@
+package bus.model.po;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.util.Date;
+
+/**
+* @Program: bus
+* @Description: 
+* @Author: zy
+* @Date: 2025-03-17 21:07:13
+**/
+@Data
+@TableName("b_course_pre")
+public class BCoursePrePo{
+    @TableId
+    private String id;
+    private String courseId;
+    private String preTime;
+    private Integer sort;
+    private String remark;
+    private Date createTime;
+    private Date updateTime;
+    private String creatorId;
+    private String updaterId;
+    private String creatorName;
+    private String updaterName;
+    @TableLogic
+    private Integer isDelete;
+}

+ 41 - 0
bus-common/src/main/java/bus/model/vo/BCoursePreVo.java

@@ -0,0 +1,41 @@
+package bus.model.vo;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import com.qzwisdom.qzframework.core.tool.base.vo.AbstractBaseVO;
+import java.util.Date;
+import java.util.Date;
+
+/**
+* @Program: bus
+* @Description: 描述
+* @Author: zy
+* @Date: 2025-03-17 21:07:13
+**/
+@Data
+public class BCoursePreVo extends AbstractBaseVO{
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("路线id")
+    private String courseId;
+    @ApiModelProperty("预约时间")
+    private String preTime;
+    @ApiModelProperty("排序")
+    private Integer sort;
+    @ApiModelProperty("备注")
+    private String type;
+    @ApiModelProperty("记录创建时间")
+    private Date createTime;
+    @ApiModelProperty("记录更新时间")
+    private Date updateTime;
+    @ApiModelProperty("创建人id")
+    private String creatorId;
+    @ApiModelProperty("修改人id")
+    private String updaterId;
+    @ApiModelProperty("创建人姓名")
+    private String creatorName;
+    @ApiModelProperty("修改人姓名")
+    private String updaterName;
+    @ApiModelProperty("是否删除")
+    private Integer isDelete;
+}

+ 2 - 2
bus-web/src/main/java/bus/controller/biz/BBusTrackController.java

@@ -62,8 +62,8 @@ public class BBusTrackController implements BaseController {
 
     @ApiOperation("根据车辆ID获取车辆所在路线经纬度")
     @GetMapping({"getPoint"})
-    public BTrackStationDto getPoint(String busId) {
-        BTrackStationDto point = this.bBusInfoService.getPoint(busId);
+    public List<BTrackStationDto> getPoint(@RequestParam String busId) {
+        List<BTrackStationDto> point = this.bBusInfoService.getPoint(busId);
         return point;
     }
 

+ 95 - 0
bus-web/src/main/java/bus/controller/biz/BCoursePreController.java

@@ -0,0 +1,95 @@
+package bus.controller.biz;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageSerializable;
+import bus.model.dto.BCoursePreDto;
+import bus.model.dto.BCoursePrePageDto;
+import bus.model.vo.BCoursePreVo;
+import bus.service.BCoursePreService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import com.qzwisdom.qzframework.core.tool.base.controller.BaseController;
+
+
+
+/**
+ * @Program: bus
+ * @Description: 描述
+ * @Author: zy
+ * @Date: 2025-03-17 21:07:11
+ **/
+@Slf4j
+@CrossOrigin
+@RestController
+@Api(tags = "bCoursePre接口")
+@RequestMapping(value="/bCoursePre")
+public class BCoursePreController implements BaseController {
+
+    @Autowired
+    private BCoursePreService bCoursePreService;
+
+
+
+    /**
+     * 详情
+     * @param id
+     * @return
+     */
+    @ApiOperation("详情")
+    @GetMapping(value = "getDetailById")
+    public BCoursePreVo getDetailById(@RequestParam String id){
+        return doSingle(bCoursePreService.getDetailById(id),BCoursePreVo::new);
+    }
+
+	/**
+     * 保存
+     * @param dto
+     * @return
+     */
+    @ApiOperation("保存")
+    @PostMapping(value = "save")
+    public String save(@RequestBody BCoursePreDto dto){
+		bCoursePreService.save(dto);
+        return "保存成功";
+    }
+
+    /**
+    * 列表
+    * @param dto
+    * @return
+    */
+    @ApiOperation("列表")
+    @PostMapping(value = "list")
+    public PageSerializable<BCoursePreVo> list(@RequestBody BCoursePrePageDto dto){
+       PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
+       return new PageSerializable<>(bCoursePreService.list(dto));
+    }
+
+	/**
+     * 修改
+     * @param dto
+     * @return
+     */
+    @ApiOperation("修改")
+    @PostMapping(value = "update")
+    public String update(@RequestBody BCoursePreDto dto){
+		bCoursePreService.update(dto);
+        return "修改成功";
+    }
+
+	/**
+     * 删除
+     * @param id
+     * @return
+     */
+    @ApiOperation("删除")
+    @GetMapping(value = "deleteById")
+    public String deleteById(@RequestParam String id){
+		bCoursePreService.delete(id);
+        return "删除成功";
+    }
+
+}

+ 1 - 1
bus-web/src/main/java/bus/controller/biz/CommonController.java

@@ -33,7 +33,7 @@ import java.util.Map;
 * @Program: bus
 * @Description: 描述
 * @Author: zy
-* @Date: 2025-03-11 18:22:22
+* @Date: 2025-03-17 21:07:11
 **/
 @RestController
 @RequestMapping("/common")