Przeglądaj źródła

Merge branch 'master' of http://metapixels.top:9003/zhouyang/bus

zy 7 miesięcy temu
rodzic
commit
2a5d36a1ab
30 zmienionych plików z 971 dodań i 72 usunięć
  1. 20 0
      bus-biz/src/main/java/bus/mapper/BCoursePreMapper.java
  2. 20 0
      bus-biz/src/main/java/bus/mapper/BUserPreMapper.java
  3. 1 1
      bus-biz/src/main/java/bus/service/BBusInfoService.java
  4. 56 0
      bus-biz/src/main/java/bus/service/BCoursePreService.java
  5. 52 0
      bus-biz/src/main/java/bus/service/BUserPreService.java
  6. 1 1
      bus-biz/src/main/java/bus/service/CommonService.java
  7. 31 25
      bus-biz/src/main/java/bus/service/impl/BBusInfoServiceImpl.java
  8. 58 15
      bus-biz/src/main/java/bus/service/impl/BCourseInfoServiceImpl.java
  9. 90 0
      bus-biz/src/main/java/bus/service/impl/BCoursePreServiceImpl.java
  10. 81 0
      bus-biz/src/main/java/bus/service/impl/BUserPreServiceImpl.java
  11. 1 1
      bus-biz/src/main/java/bus/service/impl/CommonServiceImpl.java
  12. 23 0
      bus-biz/src/main/resources/mapper/BCoursePreMapper.xml
  13. 24 0
      bus-biz/src/main/resources/mapper/BUserPreMapper.xml
  14. 4 4
      bus-boot/src/test/java/bus/CodeGenerateTest.java
  15. 1 1
      bus-common/src/main/java/bus/model/BaseEntity.java
  16. 6 0
      bus-common/src/main/java/bus/model/dto/BCourseInfoDto.java
  17. 28 0
      bus-common/src/main/java/bus/model/dto/BCoursePreDto.java
  18. 40 0
      bus-common/src/main/java/bus/model/dto/BCoursePrePageDto.java
  19. 42 0
      bus-common/src/main/java/bus/model/dto/BUserPreDto.java
  20. 43 0
      bus-common/src/main/java/bus/model/dto/BUserPrePageDto.java
  21. 1 1
      bus-common/src/main/java/bus/model/dto/CommonLoginDto.java
  22. 34 0
      bus-common/src/main/java/bus/model/po/BCoursePrePo.java
  23. 33 0
      bus-common/src/main/java/bus/model/po/BUserPrePo.java
  24. 41 0
      bus-common/src/main/java/bus/model/vo/BCoursePreVo.java
  25. 44 0
      bus-common/src/main/java/bus/model/vo/BUserPreVo.java
  26. 2 2
      bus-web/src/main/java/bus/controller/biz/BBusTrackController.java
  27. 95 0
      bus-web/src/main/java/bus/controller/biz/BCoursePreController.java
  28. 3 20
      bus-web/src/main/java/bus/controller/biz/BNoticeUserController.java
  29. 95 0
      bus-web/src/main/java/bus/controller/biz/BUserPreController.java
  30. 1 1
      bus-web/src/main/java/bus/controller/biz/CommonController.java

+ 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);
+}

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

@@ -0,0 +1,20 @@
+package bus.mapper;
+
+import bus.model.dto.BUserPrePageDto;
+import bus.model.vo.BUserPreVo;
+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 23:24:43
+ **/
+@Mapper
+public interface BUserPreMapper extends BaseMapper<BUserPrePo> {
+
+    List<BUserPreVo> list(BUserPrePageDto 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);
+}

+ 52 - 0
bus-biz/src/main/java/bus/service/BUserPreService.java

@@ -0,0 +1,52 @@
+package bus.service;
+
+import bus.model.dto.BUserPreDto;
+import bus.model.dto.BUserPrePageDto;
+import bus.model.vo.BUserPreVo;
+import bus.model.po.BUserPrePo;
+import java.util.List;
+
+/**
+ * @Program: bus
+ * @Description: 描述
+ * @Author: zy
+ * @Date: 2025-03-17 23:24:43
+ **/
+public interface BUserPreService {
+
+
+    /**
+     * 详情
+     * @param id
+     * @return
+     */
+    BUserPrePo getDetailById(String id);
+
+	/**
+     * 保存
+     * @param dto
+     * @return
+     */
+    void save(BUserPreDto dto);
+
+    /**
+    * 列表
+    * @param dto
+    * @return
+    */
+    List<BUserPreVo> list(BUserPrePageDto dto);
+
+	/**
+     * 修改
+     * @param dto
+     * @return
+     */
+    void update(BUserPreDto dto);
+
+	/**
+     * 删除
+     * @param id
+     * @return
+     */
+    void delete(String id);
+}

+ 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 23:24:43
 **/
 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);
+    }
+}

+ 81 - 0
bus-biz/src/main/java/bus/service/impl/BUserPreServiceImpl.java

@@ -0,0 +1,81 @@
+package bus.service.impl;
+
+import bus.model.dto.BUserPreDto;
+import bus.model.dto.BUserPrePageDto;
+import bus.model.vo.BUserPreVo;
+import bus.model.po.BUserPrePo;
+import bus.mapper.BUserPreMapper;
+
+import bus.service.BUserPreService;
+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 23:24:43
+ **/
+@Service
+public class BUserPreServiceImpl implements BUserPreService {
+
+    @Autowired
+    private BUserPreMapper bUserPreMapper;
+
+
+	/**
+     * 详情
+     * @param id
+     * @return
+     */
+    @Override
+    public BUserPrePo getDetailById(String id){
+        return this.bUserPreMapper.selectById(id);
+    }
+
+	/**
+     * 保存
+     * @param dto
+     * @return
+     */
+    @Override
+	public void save(BUserPreDto dto){
+        BUserPrePo po = new BUserPrePo();
+        BeanUtils.copyProperties(dto,po);
+		this.bUserPreMapper.insert(po);
+    }
+
+    /**
+    * 列表
+    * @param dto
+    * @return
+    */
+    @Override
+    public List<BUserPreVo> list(BUserPrePageDto dto){
+        return this.bUserPreMapper.list(dto);
+    }
+
+	/**
+     * 修改
+     * @param dto
+     * @return
+     */
+    @Override
+    public void update(BUserPreDto dto){
+        BUserPrePo po = new BUserPrePo();
+        BeanUtils.copyProperties(dto,po);
+		bUserPreMapper.updateById(po);
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @Override
+    public void delete(String id){
+		bUserPreMapper.deleteById(id);
+    }
+}

+ 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 23:24:43
 **/
 @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>

+ 24 - 0
bus-biz/src/main/resources/mapper/BUserPreMapper.xml

@@ -0,0 +1,24 @@
+<?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.BUserPreMapper">
+
+ <select id="list" parameterType="bus.model.dto.BUserPrePageDto" resultType="bus.model.vo.BUserPreVo">
+   select
+   id,
+   course_id,
+   pre_time,
+   pre_date,
+   remark,
+   type,
+   create_time,
+   update_time,
+   creator_id,
+   updater_id,
+   creator_name,
+   updater_name,
+   is_delete
+   from
+   b_user_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_user_pre");
+		tableInfo.setTableAlias("BUserPre");
 		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 23:24:43
 **/
 @Data
 public class BaseEntity {

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

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

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

@@ -0,0 +1,28 @@
+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;
+    @ApiModelProperty("类型 0当前 1星期6 2星期天")
+    private String type;
+
+}

+ 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;
+}

+ 42 - 0
bus-common/src/main/java/bus/model/dto/BUserPreDto.java

@@ -0,0 +1,42 @@
+package bus.model.dto;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import java.util.Date;
+import java.util.Date;
+/**
+* @Program: bus
+* @Description: 描述
+* @Author: zy
+* @Date: 2025-03-17 23:24:43
+**/
+@Data
+public class BUserPreDto{
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("路线id")
+    private String courseId;
+    @ApiModelProperty("预约时刻")
+    private String preTime;
+    @ApiModelProperty("预约日期")
+    private Date preDate;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("类型,0-当天 1-星期6 2-星期天")
+    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;
+}

+ 43 - 0
bus-common/src/main/java/bus/model/dto/BUserPrePageDto.java

@@ -0,0 +1,43 @@
+package bus.model.dto;
+
+import bus.model.BaseEntity;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+import java.util.Date;
+import java.util.Date;
+/**
+* @Program: bus
+* @Description: 描述
+* @Author: zy
+* @Date: 2025-03-17 23:24:43
+**/
+@Data
+public class BUserPrePageDto extends BaseEntity{
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("路线id")
+    private String courseId;
+    @ApiModelProperty("预约时刻")
+    private String preTime;
+    @ApiModelProperty("预约日期")
+    private Date preDate;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("类型,0-当天 1-星期6 2-星期天")
+    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 23:24:43
 **/
 @ApiModel(description = "账户登陆请求实体")
 @Data

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

@@ -0,0 +1,34 @@
+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 String type;
+    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;
+}

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

@@ -0,0 +1,33 @@
+package bus.model.po;
+
+import lombok.Data;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+import java.util.Date;
+import java.util.Date;
+
+/**
+* @Program: bus
+* @Description: 
+* @Author: zy
+* @Date: 2025-03-17 23:24:43
+**/
+@Data
+@TableName("b_user_pre")
+public class BUserPrePo{
+    @TableId
+    private String id;
+    private String courseId;
+    private String preTime;
+    private Date preDate;
+    private String remark;
+    private String type;
+    private Date createTime;
+    private Date updateTime;
+    private String creatorId;
+    private String updaterId;
+    private String creatorName;
+    private String updaterName;
+    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;
+}

+ 44 - 0
bus-common/src/main/java/bus/model/vo/BUserPreVo.java

@@ -0,0 +1,44 @@
+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;
+import java.util.Date;
+
+/**
+* @Program: bus
+* @Description: 描述
+* @Author: zy
+* @Date: 2025-03-17 23:24:43
+**/
+@Data
+public class BUserPreVo extends AbstractBaseVO{
+    @ApiModelProperty("id")
+    private String id;
+    @ApiModelProperty("路线id")
+    private String courseId;
+    @ApiModelProperty("预约时刻")
+    private String preTime;
+    @ApiModelProperty("预约日期")
+    private Date preDate;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("类型,0-当天 1-星期6 2-星期天")
+    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 "删除成功";
+    }
+
+}

+ 3 - 20
bus-web/src/main/java/bus/controller/biz/BNoticeUserController.java

@@ -1,8 +1,5 @@
 package bus.controller.biz;
 
-import bus.model.BaseEntity;
-import bus.model.dto.BNoticeInfoDto;
-import bus.model.dto.page.BNoticeInfoPageDto;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageSerializable;
 import bus.model.dto.BNoticeUserDto;
@@ -16,7 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import com.qzwisdom.qzframework.core.tool.base.controller.BaseController;
 
-import java.util.List;
 
 
 /**
@@ -28,36 +24,23 @@ import java.util.List;
 @Slf4j
 @CrossOrigin
 @RestController
-@Api(tags = "公告用户接口")
+@Api(tags = "bNoticeUser接口")
 @RequestMapping(value="/bNoticeUser")
 public class BNoticeUserController implements BaseController {
 
     @Autowired
     private BNoticeUserService bNoticeUserService;
 
-    @ApiOperation("查看后已读")
+    @ApiOperation("添加通知用户")
     @PostMapping("/add")
     public void add(@RequestBody BNoticeUserDto dto) {
         bNoticeUserService.addNoticeUser(dto);
     }
 
-    @ApiOperation("一键已读")
+    @ApiOperation("批量添加通知用户")
     @PostMapping("/addAll")
     public void addAll() {
         bNoticeUserService.addNoticeUserAll();
     }
 
-    /**
-     * 查询 公告(包括是否已读)
-     * @return 公告列表,包含已读状态
-     */
-    @ApiOperation("小程序公告")
-    @PostMapping("/getNoticeInfoList")
-    public PageSerializable<BNoticeInfoDto> getNoticeInfoList(@RequestBody BaseEntity dto){
-        PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
-        List<BNoticeInfoDto> noticeInfoList = bNoticeUserService.getNoticeInfoList();
-        return new PageSerializable<>(noticeInfoList);
-    }
-
-
 }

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

@@ -0,0 +1,95 @@
+package bus.controller.biz;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageSerializable;
+import bus.model.dto.BUserPreDto;
+import bus.model.dto.BUserPrePageDto;
+import bus.model.vo.BUserPreVo;
+import bus.service.BUserPreService;
+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 23:24:41
+ **/
+@Slf4j
+@CrossOrigin
+@RestController
+@Api(tags = "bUserPre接口")
+@RequestMapping(value="/bUserPre")
+public class BUserPreController implements BaseController {
+
+    @Autowired
+    private BUserPreService bUserPreService;
+
+
+
+    /**
+     * 详情
+     * @param id
+     * @return
+     */
+    @ApiOperation("详情")
+    @GetMapping(value = "getDetailById")
+    public BUserPreVo getDetailById(@RequestParam String id){
+        return doSingle(bUserPreService.getDetailById(id),BUserPreVo::new);
+    }
+
+	/**
+     * 保存
+     * @param dto
+     * @return
+     */
+    @ApiOperation("保存")
+    @PostMapping(value = "save")
+    public String save(@RequestBody BUserPreDto dto){
+		bUserPreService.save(dto);
+        return "保存成功";
+    }
+
+    /**
+    * 列表
+    * @param dto
+    * @return
+    */
+    @ApiOperation("列表")
+    @PostMapping(value = "list")
+    public PageSerializable<BUserPreVo> list(@RequestBody BUserPrePageDto dto){
+       PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
+       return new PageSerializable<>(bUserPreService.list(dto));
+    }
+
+	/**
+     * 修改
+     * @param dto
+     * @return
+     */
+    @ApiOperation("修改")
+    @PostMapping(value = "update")
+    public String update(@RequestBody BUserPreDto dto){
+		bUserPreService.update(dto);
+        return "修改成功";
+    }
+
+	/**
+     * 删除
+     * @param id
+     * @return
+     */
+    @ApiOperation("删除")
+    @GetMapping(value = "deleteById")
+    public String deleteById(@RequestParam String id){
+		bUserPreService.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 23:24:41
 **/
 @RestController
 @RequestMapping("/common")