浏览代码

Merge remote-tracking branch 'origin/master'

yanliming 4 年之前
父节点
当前提交
cb175a9857
共有 53 个文件被更改,包括 3158 次插入229 次删除
  1. 24 0
      common/src/main/java/com/jpsoft/bus/modules/base/dao/HelpCenterDAO.java
  2. 30 0
      common/src/main/java/com/jpsoft/bus/modules/base/dao/RegionInfoDAO.java
  3. 19 0
      common/src/main/java/com/jpsoft/bus/modules/base/dto/RegionInfoDTO.java
  4. 37 0
      common/src/main/java/com/jpsoft/bus/modules/base/entity/HelpCenter.java
  5. 43 0
      common/src/main/java/com/jpsoft/bus/modules/base/entity/RegionInfo.java
  6. 23 0
      common/src/main/java/com/jpsoft/bus/modules/base/service/HelpCenterService.java
  7. 29 0
      common/src/main/java/com/jpsoft/bus/modules/base/service/RegionInfoService.java
  8. 75 0
      common/src/main/java/com/jpsoft/bus/modules/base/service/impl/HelpCenterServiceImpl.java
  9. 92 0
      common/src/main/java/com/jpsoft/bus/modules/base/service/impl/RegionInfoServiceImpl.java
  10. 6 2
      common/src/main/java/com/jpsoft/bus/modules/bus/callback/GpsDataCallbackImpl.java
  11. 4 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dao/PassengerInfoDAO.java
  12. 2 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dao/ShiftInfoDAO.java
  13. 24 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dao/StationRemindDAO.java
  14. 8 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dto/NearbyShiftDTO.java
  15. 4 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dto/NearbyStationDTO.java
  16. 46 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dto/PassengerRecordDetailDTO.java
  17. 5 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dto/RouteInfoDTO.java
  18. 25 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dto/RouteShiftDTO.java
  19. 17 0
      common/src/main/java/com/jpsoft/bus/modules/bus/dto/RouteStationDTO.java
  20. 2 2
      common/src/main/java/com/jpsoft/bus/modules/bus/entity/CompanyInfo.java
  21. 4 0
      common/src/main/java/com/jpsoft/bus/modules/bus/entity/RouteInfo.java
  22. 1 1
      common/src/main/java/com/jpsoft/bus/modules/bus/entity/ShiftInfo.java
  23. 101 0
      common/src/main/java/com/jpsoft/bus/modules/bus/entity/StationRemind.java
  24. 5 1
      common/src/main/java/com/jpsoft/bus/modules/bus/service/PassengerInfoService.java
  25. 2 0
      common/src/main/java/com/jpsoft/bus/modules/bus/service/ShiftInfoService.java
  26. 23 0
      common/src/main/java/com/jpsoft/bus/modules/bus/service/StationRemindService.java
  27. 41 9
      common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/PassengerInfoServiceImpl.java
  28. 5 0
      common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/ShiftInfoServiceImpl.java
  29. 90 0
      common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/StationRemindServiceImpl.java
  30. 142 0
      common/src/main/java/com/jpsoft/bus/modules/common/utils/SnowflakeIdWorker.java
  31. 162 11
      common/src/main/java/com/jpsoft/bus/modules/common/utils/WechatMessageUtil.java
  32. 90 0
      common/src/main/resources/mapper/base/HelpCenter.xml
  33. 124 0
      common/src/main/resources/mapper/base/RegionInfo.xml
  34. 30 1
      common/src/main/resources/mapper/bus/PassengerInfo.xml
  35. 3 0
      common/src/main/resources/mapper/bus/PassengerMessage.xml
  36. 22 5
      common/src/main/resources/mapper/bus/RouteInfo.xml
  37. 10 0
      common/src/main/resources/mapper/bus/ShiftInfo.xml
  38. 5 0
      common/src/main/resources/mapper/bus/StationInfo.xml
  39. 161 0
      common/src/main/resources/mapper/bus/StationRemind.xml
  40. 1 1
      common/src/main/resources/mapper/sys/User.xml
  41. 3 1
      gps/src/main/java/com/jpsoft/gps/handler/ProcessHandler.java
  42. 2 1
      web/src/main/java/com/jpsoft/bus/config/RabbitmqConfig.java
  43. 10 1
      web/src/main/java/com/jpsoft/bus/config/WebMvcConfig.java
  44. 245 0
      web/src/main/java/com/jpsoft/bus/modules/base/controller/MobileBannerInfoController.java
  45. 252 0
      web/src/main/java/com/jpsoft/bus/modules/base/controller/RegionInfoController.java
  46. 8 8
      web/src/main/java/com/jpsoft/bus/modules/bus/controller/RouteInfoController.java
  47. 535 154
      web/src/main/java/com/jpsoft/bus/modules/mobile/controller/PassengerApiController.java
  48. 399 0
      web/src/main/java/com/jpsoft/bus/modules/mobile/controller/StationRemindApiController.java
  49. 144 0
      web/src/main/java/com/jpsoft/bus/modules/mq/listener/StationRemindListener.java
  50. 11 20
      web/src/main/java/com/jpsoft/bus/modules/pay/wechat/WxPayController.java
  51. 9 9
      web/src/main/resources/application-dev.yml
  52. 2 2
      web/src/main/resources/application-test.yml
  53. 1 0
      web/src/main/resources/application.yml

+ 24 - 0
common/src/main/java/com/jpsoft/bus/modules/base/dao/HelpCenterDAO.java

@@ -0,0 +1,24 @@
+package com.jpsoft.bus.modules.base.dao;
+
+import com.jpsoft.bus.modules.base.entity.HelpCenter;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-25 17:52
+ */
+@Repository
+public interface HelpCenterDAO {
+
+    int insert(HelpCenter entity);
+    int update(HelpCenter entity);
+    int exist(String id);
+    HelpCenter get(String id);
+    int delete(String id);
+    List<HelpCenter> list();
+    List<HelpCenter> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 30 - 0
common/src/main/java/com/jpsoft/bus/modules/base/dao/RegionInfoDAO.java

@@ -0,0 +1,30 @@
+package com.jpsoft.bus.modules.base.dao;
+
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.base.entity.RegionInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-12 16:20
+ */
+@Repository
+public interface RegionInfoDAO {
+
+    int insert(RegionInfo entity);
+    int update(RegionInfo entity);
+    int exist(String id);
+    RegionInfo get(String id);
+    int delete(String id);
+    List<RegionInfo> list();
+    List<RegionInfo> search(Map<String, Object> searchParams, List<Sort> sortList);
+
+    List<RegionInfo> findByParentId(String parentId);
+
+    List<RegionInfo> findTopRegion();
+
+    RegionInfo findByName(String name);
+}

+ 19 - 0
common/src/main/java/com/jpsoft/bus/modules/base/dto/RegionInfoDTO.java

@@ -0,0 +1,19 @@
+package com.jpsoft.bus.modules.base.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-1-21 14:58
+ */
+@Data
+public class RegionInfoDTO {
+
+    private String value;
+
+    private String text;
+
+    private List<RegionInfoDTO> children;
+}

+ 37 - 0
common/src/main/java/com/jpsoft/bus/modules/base/entity/HelpCenter.java

@@ -0,0 +1,37 @@
+package com.jpsoft.bus.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-25 17:45
+ */
+@Data
+public class HelpCenter {
+
+    private String id;
+
+    private String titleName;
+
+    private String desc;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag = false;
+}

+ 43 - 0
common/src/main/java/com/jpsoft/bus/modules/base/entity/RegionInfo.java

@@ -0,0 +1,43 @@
+package com.jpsoft.bus.modules.base.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-12 16:16
+ */
+@Data
+@ApiModel(value = "base_region_info的实体类")
+public class RegionInfo {
+
+    @ApiModelProperty(value = "")
+    private String id;
+    @ApiModelProperty(value = "区域名称")
+    private String name;
+    @ApiModelProperty(value = "上级id")
+    private String parentId;
+    @ApiModelProperty(value = "备注")
+    private String remark;
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag = false;
+    @ApiModelProperty(value = "全称")
+    private String fullName;
+}

+ 23 - 0
common/src/main/java/com/jpsoft/bus/modules/base/service/HelpCenterService.java

@@ -0,0 +1,23 @@
+package com.jpsoft.bus.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.base.entity.HelpCenter;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-25 17:46
+ */
+public interface HelpCenterService {
+
+    HelpCenter get(String id);
+    boolean exist(String id);
+    int insert(HelpCenter model);
+    int update(HelpCenter model);
+    int delete(String id);
+    List<HelpCenter> list();
+    Page<HelpCenter> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+}

+ 29 - 0
common/src/main/java/com/jpsoft/bus/modules/base/service/RegionInfoService.java

@@ -0,0 +1,29 @@
+package com.jpsoft.bus.modules.base.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.base.entity.RegionInfo;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-12 16:17
+ */
+public interface RegionInfoService {
+
+    RegionInfo get(String id);
+    boolean exist(String id);
+    int insert(RegionInfo model);
+    int update(RegionInfo model);
+    int delete(String id);
+    List<RegionInfo> list();
+    Page<RegionInfo> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+
+    List<RegionInfo> findByParentId(String parentId);
+
+    List<RegionInfo> findTopRegion();
+
+    RegionInfo findByName(String name);
+}

+ 75 - 0
common/src/main/java/com/jpsoft/bus/modules/base/service/impl/HelpCenterServiceImpl.java

@@ -0,0 +1,75 @@
+package com.jpsoft.bus.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.bus.modules.base.dao.HelpCenterDAO;
+import com.jpsoft.bus.modules.base.entity.HelpCenter;
+import com.jpsoft.bus.modules.base.service.HelpCenterService;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-25 17:47
+ */
+@Transactional
+@Component(value="helpCenterService")
+public class HelpCenterServiceImpl implements HelpCenterService {
+
+    @Resource(name="helpCenterDAO")
+    private HelpCenterDAO helpCenterDAO;
+
+    @Override
+    public HelpCenter get(String id) {
+        // TODO Auto-generated method stub
+        return helpCenterDAO.get(id);
+    }
+
+    @Override
+    public int insert(HelpCenter model) {
+        // TODO Auto-generated method stub
+        //model.setId(UUID.randomUUID().toString());
+
+        return helpCenterDAO.insert(model);
+    }
+
+    @Override
+    public int update(HelpCenter model) {
+        // TODO Auto-generated method stub
+        return helpCenterDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return helpCenterDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = helpCenterDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<HelpCenter> list() {
+        // TODO Auto-generated method stub
+        return helpCenterDAO.list();
+    }
+
+    @Override
+    public Page<HelpCenter> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count, List<Sort> sortList) {
+        Page<HelpCenter> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            helpCenterDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+}

+ 92 - 0
common/src/main/java/com/jpsoft/bus/modules/base/service/impl/RegionInfoServiceImpl.java

@@ -0,0 +1,92 @@
+package com.jpsoft.bus.modules.base.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.bus.modules.base.dao.RegionInfoDAO;
+import com.jpsoft.bus.modules.base.entity.RegionInfo;
+import com.jpsoft.bus.modules.base.service.RegionInfoService;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2020-10-12 16:18
+ */
+@Transactional
+@Component(value="regionInfoService")
+public class RegionInfoServiceImpl implements RegionInfoService {
+
+    @Resource(name="regionInfoDAO")
+    private RegionInfoDAO regionInfoDAO;
+
+    @Override
+    public RegionInfo get(String id) {
+        // TODO Auto-generated method stub
+        return regionInfoDAO.get(id);
+    }
+
+    @Override
+    public int insert(RegionInfo model) {
+        // TODO Auto-generated method stub
+        //model.setId(UUID.randomUUID().toString());
+
+        return regionInfoDAO.insert(model);
+    }
+
+    @Override
+    public int update(RegionInfo model) {
+        // TODO Auto-generated method stub
+        return regionInfoDAO.update(model);
+    }
+
+    @Override
+    public int delete(String id) {
+        // TODO Auto-generated method stub
+        return regionInfoDAO.delete(id);
+    }
+
+    @Override
+    public boolean exist(String id) {
+        // TODO Auto-generated method stub
+        int count = regionInfoDAO.exist(id);
+
+        return count > 0 ? true : false;
+    }
+
+    @Override
+    public List<RegionInfo> list() {
+        // TODO Auto-generated method stub
+        return regionInfoDAO.list();
+    }
+
+    @Override
+    public Page<RegionInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize, boolean count, List<Sort> sortList) {
+        Page<RegionInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            regionInfoDAO.search(searchParams,sortList);
+        });
+
+        return page;
+    }
+
+    @Override
+    public List<RegionInfo> findByParentId(String parentId) {
+        return regionInfoDAO.findByParentId(parentId);
+    }
+
+    @Override
+    public List<RegionInfo> findTopRegion() {
+        return regionInfoDAO.findTopRegion();
+    }
+
+    @Override
+    public RegionInfo findByName(String name){
+        return regionInfoDAO.findByName(name);
+    }
+}

+ 6 - 2
common/src/main/java/com/jpsoft/bus/modules/bus/callback/GpsDataCallbackImpl.java

@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.joda.time.DateTime;
 import org.joda.time.Minutes;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.ValueOperations;
 import org.springframework.stereotype.Component;
@@ -62,6 +63,9 @@ public class GpsDataCallbackImpl implements GpsDataCallback {
     @Autowired
     private GpsParamConfig gpsParamConfig;
 
+    @Autowired
+    private RabbitTemplate rabbitTemplate;
+
     @Override
     public void receive(String deviceNo, String longitude, String latitude) {
         log.warn("保存实时数据:{},{},{}", deviceNo, longitude, latitude);
@@ -139,13 +143,13 @@ public class GpsDataCallbackImpl implements GpsDataCallback {
 
                         StationInfo currentStation = stationInfoService.get(stationId);
 
-
-
                         //站点发生变化时
                         if (!shiftInfo.getCurrentStationId().equals(stationId)){
                             shiftInfo.setCurrentStationId(stationId);
                             shiftInfoService.update(shiftInfo);
 
+                            rabbitTemplate.convertAndSend("stationRemindQueue", shiftInfo);
+
                             //当前站点
                           //  StationInfo currentStation = stationInfoService.get(stationId);
                             //此线路的所有站点

+ 4 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dao/PassengerInfoDAO.java

@@ -19,4 +19,8 @@ public interface PassengerInfoDAO {
     List<PassengerInfo> findByPersonIdShiftIdStatus(Long personId, String shiftId, String status);
 
     List<PassengerInfo> findByShiftStatusPayStatusNotTicketDown(String shiftId, String status, String payStatus,String ticketDownStationId);
+
+    List<PassengerInfo> findByOpenIdAndStatus(String openId, String status,String payStatus);
+
+	List<PassengerInfo> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId, String status, String payStatus);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dao/ShiftInfoDAO.java

@@ -21,4 +21,6 @@ public interface ShiftInfoDAO {
     List<ShiftInfo> findByVehicleIdAndStatus(String vehicleId, String status);
 
     List<ShiftInfo> findByRouteIdAndStatus(String routeId, String status);
+
+    List<ShiftInfo> findByRouteIdAndStatusAndStartStationId(String routeId, String status, String startStationId);
 }

+ 24 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dao/StationRemindDAO.java

@@ -0,0 +1,24 @@
+package com.jpsoft.bus.modules.bus.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.bus.modules.bus.entity.StationRemind;
+import java.util.Map;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+@Repository
+public interface StationRemindDAO {
+	int insert(StationRemind entity);
+	int update(StationRemind entity);
+	int exist(String id);
+	StationRemind get(String id);
+	int delete(String id);
+	List<StationRemind> list();
+	List<StationRemind> search(Map<String, Object> searchParams, List<Sort> sortList);
+    List<StationRemind> findByAdvanceStationId(String currentStationId);
+	List<StationRemind>  findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId);
+
+	List<StationRemind> findByOpenId(String openId);
+
+	List<StationRemind> findByOpenIdAndRouteId(String openId, String routeId);
+}

+ 8 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/NearbyShiftDTO.java

@@ -11,10 +11,16 @@ public class NearbyShiftDTO {
 
     private String id;
 
+    private String routeId;
+
     private String routeName;
 
+    private String startStationId;
+
     private String startStationName;
 
+    private String endStationId;
+
     private String endStationName;
 
     private String currentStationName;
@@ -24,4 +30,6 @@ public class NearbyShiftDTO {
     private Integer stationNum;
 
     private String licensePlateNumber;
+
+    private String des;
 }

+ 4 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/NearbyStationDTO.java

@@ -13,5 +13,9 @@ public class NearbyStationDTO {
 
     private String stationName;
 
+    private String stationId;
+
+    private Integer distance;
+
     private List<NearbyShiftDTO> nearbyShiftDTOList;
 }

+ 46 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/PassengerRecordDetailDTO.java

@@ -0,0 +1,46 @@
+package com.jpsoft.bus.modules.bus.dto;
+
+import com.jpsoft.bus.modules.bus.entity.DriverInfo;
+import com.jpsoft.bus.modules.bus.entity.RouteInfo;
+import com.jpsoft.bus.modules.bus.entity.ShiftInfo;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-25 11:45
+ */
+@Data
+public class PassengerRecordDetailDTO {
+
+    private DriverInfo driverInfo;
+
+    private ShiftInfo shiftInfo;
+
+    private RouteInfo routeInfo;
+
+    private String tripName;
+
+    private String ticketDes;
+
+    private String goodsTicket;
+
+    private BigDecimal totalFee;
+
+    private String payTime;
+
+    private String ticketStatus;
+
+    private String ticketStatusName;
+
+    public String getTicketStatusName(String ticketStatus){
+        String ticketStatusName = "乘车中";
+
+        if ("2".equals(ticketStatus)){
+            ticketStatusName = "已过期";
+        }
+        return ticketStatusName;
+
+    }
+}

+ 5 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/RouteInfoDTO.java

@@ -29,4 +29,9 @@ public class RouteInfoDTO {
     private List<StationInfoDTO> removeStationList;
 
     private List<String> pathList;
+
+    @ApiModelProperty(value = "地区id")
+    private String regionId;
+    @ApiModelProperty(value = "地区翻译")
+    private String regionName;
 }

+ 25 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/RouteShiftDTO.java

@@ -0,0 +1,25 @@
+package com.jpsoft.bus.modules.bus.dto;
+
+import com.jpsoft.bus.modules.bus.entity.DriverInfo;
+import lombok.Data;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-22 18:19
+ */
+@Data
+public class RouteShiftDTO {
+
+    private String currentStationId;
+
+    private String currentStationStatus;
+
+    private String longitude;
+
+    private String latitude;
+
+    private String licensePlateNumber;
+
+    private DriverInfo driverInfo;
+
+}

+ 17 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/RouteStationDTO.java

@@ -0,0 +1,17 @@
+package com.jpsoft.bus.modules.bus.dto;
+
+import lombok.Data;
+
+/**
+ * @author 墨鱼_mo
+ * @date 2021-4-26 9:03
+ */
+@Data
+public class RouteStationDTO {
+
+    private String id;
+
+    private String stationId;
+
+    private String name;
+}

+ 2 - 2
common/src/main/java/com/jpsoft/bus/modules/bus/entity/CompanyInfo.java

@@ -9,10 +9,10 @@ import org.springframework.format.annotation.DateTimeFormat;
 import java.util.Date;
 
 /**
-  描述:base_company_info的实体类
+  描述:bus_company_info的实体类
  */
 @Data
-@ApiModel(value = "base_company_info的实体类")
+@ApiModel(value = "bus_company_info的实体类")
 public class CompanyInfo {
     @ApiModelProperty(value = "公司编号")
 	private String id;

+ 4 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/entity/RouteInfo.java

@@ -47,4 +47,8 @@ public class RouteInfo {
 
     @ApiModelProperty(value = "单位编号")
     private String companyName;
+    @ApiModelProperty(value = "地区id")
+    private String regionId;
+    @ApiModelProperty(value = "地区翻译")
+    private String regionName;
 }

+ 1 - 1
common/src/main/java/com/jpsoft/bus/modules/bus/entity/ShiftInfo.java

@@ -16,7 +16,7 @@ import lombok.Data;
  */
 @Data
 @ApiModel(value = "bus_shift_info的实体类")
-public class ShiftInfo {
+public class ShiftInfo implements Serializable {
     @ApiModelProperty(value = "车辆班次编号")
     private String id;
     @ApiModelProperty(value = "司机")

+ 101 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/entity/StationRemind.java

@@ -0,0 +1,101 @@
+package com.jpsoft.bus.modules.bus.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 描述:bus_station_remind的实体类
+ */
+@Data
+@ApiModel(value = "bus_station_remind的实体类")
+public class StationRemind {
+    /**
+     * 雪花主键
+     */
+    @ApiModelProperty(value = "雪花主键")
+    private String id;
+    /**
+     * 起始站点编号
+     */
+    @ApiModelProperty(value = "起始站点编号")
+    private String startStationId;
+
+    @ApiModelProperty(value = "终点站id")
+    private String endStationId;
+    /**
+     * 提醒站点编号
+     */
+    @ApiModelProperty(value = "提醒站点编号")
+    private String remindStationId;
+    /**
+     * 提前多少站通知
+     */
+    @ApiModelProperty(value = "提前多少站通知")
+    private Integer stopInAdvance;
+    /**
+     * 提前通知编号
+     */
+    @ApiModelProperty(value = "提前通知编号")
+    private String advanceStationId;
+    /**
+     * 用户微信openid
+     */
+    @ApiModelProperty(value = "用户微信openid")
+    private String openId;
+    /**
+     * 1-上车提醒,2-下车提醒
+     */
+    @ApiModelProperty(value = "1-上车提醒,2-下车提醒")
+    private Integer remindType;
+    /**
+     * 班次编号(下车提醒用)
+     */
+    @ApiModelProperty(value = "班次编号(下车提醒用)")
+    private String vehicleShiftId;
+
+    @ApiModelProperty(value = "线路id")
+    private String routeId;
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 更新人
+     */
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+    /**
+     * 是否删除
+     */
+    @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+
+    private String routeName;
+
+    private String endStationName;
+
+    private String remindStationName;
+}

+ 5 - 1
common/src/main/java/com/jpsoft/bus/modules/bus/service/PassengerInfoService.java

@@ -30,7 +30,11 @@ public interface PassengerInfoService {
 
     List<PassengerInfo> findByShiftStatusPayStatusNotTicketDown(String shiftId, String status, String payStatus,String ticketDownStationId);
 
-	MergeOrderDTO createOrder(VehicleInfo vehicleInfo, ShiftInfo shiftInfo, String openId, String mergeOrderId, String passengerIds, String ticketUpStationId, String ticketDownStationId, String ticketType, String goodsTicket, String totalFee) throws Exception;
+	MergeOrderDTO createOrder(VehicleInfo vehicleInfo, ShiftInfo shiftInfo, String openId, String mergeOrderId, String passengerIds, String ticketUpStationId, String ticketDownStationId, String ticketTypes, String goodsTicket, String totalFee) throws Exception;
 
 	void updatePassengerOrder(OrderInfo orderInfo, String ticketUpStationId, String ticketDownStationId, String ticketType, String goodsTicket, String totalFee);
+
+    List<PassengerInfo> findByOpenIdAndStatus(String openId, String status,String payStatus);
+
+	List<PassengerInfo> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId, String status,String payStatus);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/service/ShiftInfoService.java

@@ -23,4 +23,6 @@ public interface ShiftInfoService {
 	ShiftInfo createShift(VehicleInfo vehicleInfo, Long driverId, String startStationId, String endStationId) throws Exception;
 
     List<ShiftInfo> findByRouteIdAndStatus(String routeId, String status);
+
+    List<ShiftInfo> findByRouteIdAndStatusAndStartStationId(String routeId, String status, String startStationId);
 }

+ 23 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/service/StationRemindService.java

@@ -0,0 +1,23 @@
+package com.jpsoft.bus.modules.bus.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.bus.modules.bus.entity.StationRemind;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+public interface StationRemindService {
+	StationRemind get(String id);
+	boolean exist(String id);
+	int insert(StationRemind model);
+	int update(StationRemind model);
+	int delete(String id);
+	List<StationRemind> list();
+	Page<StationRemind> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
+    List<StationRemind> findByAdvanceStationId(String currentStationId);
+    List<StationRemind> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId);
+
+    List<StationRemind> findByOpenId(String openId);
+
+	List<StationRemind> findByOpenIdAndRouteId(String openId, String routeId);
+}

+ 41 - 9
common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/PassengerInfoServiceImpl.java

@@ -290,16 +290,21 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
     }
 
     @Override
-    public MergeOrderDTO createOrder(VehicleInfo vehicleInfo, ShiftInfo shiftInfo, String openId, String mergeOrderId, String passengerIds, String ticketUpStationId, String ticketDownStationId, String ticketType, String goodsTicket, String totalFee) throws Exception {
+    public MergeOrderDTO createOrder(VehicleInfo vehicleInfo, ShiftInfo shiftInfo, String openId, String mergeOrderId, String passengerIds, String ticketUpStationId, String ticketDownStationId, String ticketTypes, String goodsTicket, String totalFee) throws Exception {
 
 
         MergeOrderDTO mergeOrderDTO = new MergeOrderDTO();
 
         //乘客id集合
         List<String> passengerList = Arrays.asList(passengerIds.split(","));
+        List<String> ticketTypeList = Arrays.asList(ticketTypes.split(","));
         if (passengerList.size() == 0) {
             throw new Exception("乘客不存在");
         }
+        if (passengerList.size() != ticketTypeList.size()){
+            throw new Exception("乘客数和购票类型数不一致");
+        }
+
 
         PriceInfo priceInfo = priceInfoService.findByStartStationAndEndStation(ticketUpStationId,ticketDownStationId);
         if (priceInfo == null || priceInfo.getPrice().compareTo(BigDecimal.ZERO) <=0){
@@ -311,18 +316,21 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
         }
 
         BigDecimal price = priceInfo.getPrice();
-        if ("1".equals(ticketType)) {
-            price = price.divide(new BigDecimal(2));
-        }
 
-        BigDecimal totalTicketPrice =price.multiply(new BigDecimal(passengerList.size()));
+        BigDecimal goodTicketPrice = new BigDecimal(goodsTicket);
+
+        BigDecimal total = goodTicketPrice;
+
+
+
+       /* BigDecimal totalTicketPrice =price.multiply(new BigDecimal(passengerList.size()));
 
         BigDecimal goodTicketPrice = new BigDecimal(goodsTicket);
 
         BigDecimal total = totalTicketPrice.add(goodTicketPrice);
         if (total.compareTo(new BigDecimal(totalFee)) != 0) {
             throw new Exception("票价有误,请重新创建");
-        }
+        }*/
 
 
         String paymentId = "";
@@ -372,7 +380,17 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
 
         Boolean goodTicketStatus = false;
         List<PassengerRecordDTO> passengerRecordDTOList = new ArrayList<>();
-        for (String passengerId : passengerList) {
+     //   for (String passengerId : passengerList) {
+
+        for (int n = 0;n<passengerList.size();n++){
+            BigDecimal price1 = price;
+            String passengerId = passengerList.get(n);
+            String ticketType = ticketTypeList.get(n);
+            if ("1".equals(ticketType)) {
+                price1 = price1.divide(new BigDecimal(2));
+            }
+
+            total = total.add(price1);
 
             PassengerRecordDTO passengerRecordDTO = new PassengerRecordDTO();
 
@@ -390,7 +408,7 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
                     //创建订单
                     OrderInfo orderInfo = new OrderInfo();
                     orderInfo.setId(UUID.randomUUID().toString());
-                    orderInfo.setTotalFee(price);
+                    orderInfo.setTotalFee(price1);
                     orderInfo.setBody("买车票");
                     orderInfo.setPayStatus(10);
                     orderInfo.setOutOrderNo(com.jpsoft.bus.modules.common.utils.StringUtils.getOutTradeNo());
@@ -401,7 +419,7 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
 
                     if (!goodTicketStatus){
                         orderInfo.setGoodsTicket(new BigDecimal(goodsTicket));
-                        orderInfo.setTotalFee(price.add(new BigDecimal(goodsTicket)));
+                        orderInfo.setTotalFee(price1.add(new BigDecimal(goodsTicket)));
                         goodTicketStatus = true;
                     }
 
@@ -436,6 +454,10 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
                 throw new Exception("乘客已下车");
             }
         }
+
+        if (total.compareTo(new BigDecimal(totalFee)) != 0) {
+            throw new Exception("票价有误,请重新创建");
+        }
         mergeOrderDTO.setPassengerRecordDTOList(passengerRecordDTOList);
 
 
@@ -452,4 +474,14 @@ public class PassengerInfoServiceImpl implements PassengerInfoService {
         orderInfo.setGoodsTicket(new BigDecimal(goodsTicket));
         orderInfoService.update(orderInfo);
     }
+
+    @Override
+    public List<PassengerInfo> findByOpenIdAndStatus(String openId, String status,String payStatus) {
+        return passengerInfoDAO.findByOpenIdAndStatus(openId,status,payStatus);
+    }
+
+    @Override
+    public List<PassengerInfo> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId, String status, String payStatus) {
+        return passengerInfoDAO.findByOpenIdAndVehicleShiftId(openId,vehicleShiftId,status,payStatus);
+    }
 }

+ 5 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/ShiftInfoServiceImpl.java

@@ -124,4 +124,9 @@ public class ShiftInfoServiceImpl implements ShiftInfoService {
 	public List<ShiftInfo> findByRouteIdAndStatus(String routeId, String status) {
 		return shiftInfoDAO.findByRouteIdAndStatus(routeId,status);
 	}
+
+	@Override
+	public List<ShiftInfo> findByRouteIdAndStatusAndStartStationId(String routeId, String status, String startStationId) {
+		return shiftInfoDAO.findByRouteIdAndStatusAndStartStationId(routeId,status,startStationId);
+	}
 }

+ 90 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/service/impl/StationRemindServiceImpl.java

@@ -0,0 +1,90 @@
+package com.jpsoft.bus.modules.bus.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.bus.modules.bus.dao.StationRemindDAO;
+import com.jpsoft.bus.modules.bus.entity.StationRemind;
+import com.jpsoft.bus.modules.bus.service.StationRemindService;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="stationRemindService")
+public class StationRemindServiceImpl implements StationRemindService {
+	@Resource(name="stationRemindDAO")
+	private StationRemindDAO stationRemindDAO;
+
+	@Override
+	public StationRemind get(String id) {
+		// TODO Auto-generated method stub
+		return stationRemindDAO.get(id);
+	}
+
+	@Override
+	public int insert(StationRemind model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+
+		return stationRemindDAO.insert(model);
+	}
+
+	@Override
+	public int update(StationRemind model) {
+		// TODO Auto-generated method stub
+		return stationRemindDAO.update(model);
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return stationRemindDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = stationRemindDAO.exist(id);
+
+		return count > 0 ? true : false;
+	}
+
+	@Override
+	public List<StationRemind> list() {
+		// TODO Auto-generated method stub
+		return stationRemindDAO.list();
+	}
+
+	@Override
+	public Page<StationRemind> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<StationRemind> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            stationRemindDAO.search(searchParams,sortList);
+        });
+
+        return page;
+	}
+
+	@Override
+	public List<StationRemind> findByAdvanceStationId(String currentStationId) {
+		return stationRemindDAO.findByAdvanceStationId(currentStationId);
+	}
+
+	@Override
+	public List<StationRemind> findByOpenIdAndVehicleShiftId(String openId, String vehicleShiftId) {
+		return stationRemindDAO.findByOpenIdAndVehicleShiftId(openId,vehicleShiftId);
+	}
+
+	@Override
+	public List<StationRemind> findByOpenId(String openId) {
+		return stationRemindDAO.findByOpenId(openId);
+	}
+
+	@Override
+	public List<StationRemind> findByOpenIdAndRouteId(String openId, String routeId) {
+		return stationRemindDAO.findByOpenIdAndRouteId(openId,routeId);
+	}
+}

+ 142 - 0
common/src/main/java/com/jpsoft/bus/modules/common/utils/SnowflakeIdWorker.java

@@ -0,0 +1,142 @@
+package com.jpsoft.bus.modules.common.utils;
+
+public class SnowflakeIdWorker {
+    private static SnowflakeIdWorker instance = new SnowflakeIdWorker(0,0);
+
+    /**
+     * 开始时间截 (2015-01-01)
+     */
+    private final long twepoch = 1420041600000L;
+    /**
+     * 机器id所占的位数
+     */
+    private final long workerIdBits = 5L;
+    /**
+     * 数据标识id所占的位数
+     */
+    private final long datacenterIdBits = 5L;
+    /**
+     * 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数)
+     */
+    private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
+    /**
+     * 支持的最大数据标识id,结果是31
+     */
+    private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
+    /**
+     * 序列在id中占的位数
+     */
+    private final long sequenceBits = 12L;
+    /**
+     * 机器ID向左移12位
+     */
+    private final long workerIdShift = sequenceBits;
+    /**
+     * 数据标识id向左移17位(12+5)
+     */
+    private final long datacenterIdShift = sequenceBits + workerIdBits;
+    /**
+     * 时间截向左移22位(5+5+12)
+     */
+    private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
+    /**
+     * 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095)
+     */
+    private final long sequenceMask = -1L ^ (-1L << sequenceBits);
+    /**
+     * 工作机器ID(0~31)
+     */
+    private long workerId;
+    /**
+     * 数据中心ID(0~31)
+     */
+    private long datacenterId;
+    /**
+     * 毫秒内序列(0~4095)
+     */
+    private long sequence = 0L;
+    /**
+     * 上次生成ID的时间截
+     */
+    private long lastTimestamp = -1L;
+    /**
+     * 构造函数
+     * @param workerId     工作ID (0~31)
+     * @param datacenterId 数据中心ID (0~31)
+     */
+    public SnowflakeIdWorker(long workerId, long datacenterId) {
+        if (workerId > maxWorkerId || workerId < 0) {
+            throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
+        }
+        if (datacenterId > maxDatacenterId || datacenterId < 0) {
+            throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
+        }
+        this.workerId = workerId;
+        this.datacenterId = datacenterId;
+    }
+    /**
+     * 获得下一个ID (该方法是线程安全的)
+     * @return SnowflakeId
+     */
+    public synchronized long nextId() {
+        long timestamp = timeGen();
+        // 如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常
+        if (timestamp < lastTimestamp) {
+            throw new RuntimeException(
+                    String.format("Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+        }
+        // 如果是同一时间生成的,则进行毫秒内序列
+        if (lastTimestamp == timestamp) {
+            sequence = (sequence + 1) & sequenceMask;
+            // 毫秒内序列溢出
+            if (sequence == 0) {
+                //阻塞到下一个毫秒,获得新的时间戳
+                timestamp = tilNextMillis(lastTimestamp);
+            }
+        }
+        // 时间戳改变,毫秒内序列重置
+        else {
+            sequence = 0L;
+        }
+        // 上次生成ID的时间截
+        lastTimestamp = timestamp;
+        // 移位并通过或运算拼到一起组成64位的ID
+        return ((timestamp - twepoch) << timestampLeftShift) //
+                | (datacenterId << datacenterIdShift) //
+                | (workerId << workerIdShift) //
+                | sequence;
+    }
+    /**
+     * 阻塞到下一个毫秒,直到获得新的时间戳
+     * @param lastTimestamp 上次生成ID的时间截
+     * @return 当前时间戳
+     */
+    protected long tilNextMillis(long lastTimestamp) {
+        long timestamp = timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = timeGen();
+        }
+        return timestamp;
+    }
+    /**
+     * 返回以毫秒为单位的当前时间
+     * @return 当前时间(毫秒)
+     */
+    protected long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+    public static SnowflakeIdWorker getInstance(){
+        return instance;
+    }
+
+
+    public static void main(String[] args) throws InterruptedException {
+        SnowflakeIdWorker idWorker = SnowflakeIdWorker.getInstance();
+        for (int i = 0; i < 10; i++) {
+            long id = idWorker.nextId();
+            Thread.sleep(1);
+            System.out.println(id);
+        }
+    }
+}

+ 162 - 11
common/src/main/java/com/jpsoft/bus/modules/common/utils/WechatMessageUtil.java

@@ -22,10 +22,8 @@ import java.util.regex.Pattern;
 @Slf4j
 @Component
 public class WechatMessageUtil {
-
-
     public static final String send_template = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=ACCESS_TOKEN";
-
+    public static final String send_subscribe_template = "https://api.weixin.qq.com/cgi-bin/message/subscribe/bizsend?access_token=ACCESS_TOKEN";
     /**
      * 微信发送模版
      *
@@ -144,6 +142,80 @@ public class WechatMessageUtil {
         return result;
     }
 
+    public String sendSubscribeTemplate(String appId, String appSecret, String templateId, String openId, JSONObject sendData, String urlPath) {
+        String result = "";
+
+        try {
+            AccessToken accessToken = WeixinUtil.getAccessToken(appId, appSecret);
+
+            if (accessToken == null) {
+                throw new Exception("token无法获取");
+            }
+
+            //发送模版内容
+            String sendTemplateUrl = send_subscribe_template.replace("ACCESS_TOKEN", accessToken.getToken());
+
+            JSONObject sendTemplateData = new JSONObject();
+
+            sendTemplateData.put("touser", openId);
+            sendTemplateData.put("template_id", templateId);
+            sendTemplateData.put("page", urlPath);
+            sendTemplateData.put("data", sendData);
+
+            URL url = new URL(sendTemplateUrl);
+            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+            conn.setRequestMethod("POST");
+            conn.setDoOutput(true);
+            conn.setDoInput(true);
+            conn.setUseCaches(false);
+            conn.setRequestProperty("Connection", "Keep-Alive");
+            conn.setRequestProperty("Charset", "UTF-8");
+
+            // 设置文件类型:
+            conn.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
+
+            // 设置接收类型否则返回415错误
+            //conn.setRequestProperty("accept","*/*")此处为暴力方法设置接受所有类型,以此来防范返回415;
+            conn.setRequestProperty("accept", "application/json");
+            conn.setConnectTimeout(5000);
+            conn.setReadTimeout(5000);
+
+            String dataStr = sendTemplateData.toString();
+
+            log.warn("发送数据:" + dataStr);
+            // 往服务器里面发送数据
+            byte[] buffer = dataStr.getBytes("UTF-8");
+
+            // 设置文件长度
+            conn.setRequestProperty("Content-Length", String.valueOf(buffer.length));
+            OutputStream output = conn.getOutputStream();
+            output.write(buffer);
+            output.flush();
+            output.close();
+
+            if (conn.getResponseCode() == 200) {
+                BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
+
+                StringBuilder sb = new StringBuilder();
+                String line = "";
+
+                while ((line = reader.readLine()) != null) {
+                    sb.append(line);
+                }
+
+                result = sb.toString();
+
+                log.warn("接收数据:" + result);
+
+                reader.close();
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+        }
+
+        return result;
+    }
+
     public static String getContent(String content) {
         String finallyContent = content;
         String regex = "<p.*?>(.*?)</p>";
@@ -308,6 +380,93 @@ public class WechatMessageUtil {
         return ret;
     }
 
+    /**
+     * 车票补缴
+     * @param openId
+     * @param detail 首行内容
+     * @param appId
+     * @param appSecret
+     * @return
+     */
+    public  boolean sendTicketMessage(String openId, String detail, String ticketName, String orderNo,String reason,String url,String appId, String appSecret) {
+
+
+        String templateId = "BBXlohJ3nFojCeF6pnUxIqq655RpgoqXYqelNhpFR20";
+        JSONObject sendData = new JSONObject();
+
+        JSONObject first = new JSONObject();
+        first.put("value", detail);
+        first.put("color", "#FF0000");
+
+        JSONObject keyword1 = new JSONObject();
+        keyword1.put("value", ticketName);
+        keyword1.put("color", "#173177");
+
+        JSONObject keyword2 = new JSONObject();
+        keyword2.put("value", orderNo);
+        keyword2.put("color", "#173177");
+
+        JSONObject keyword3 = new JSONObject();
+        keyword3.put("value", DateUtil.format(new Date(),"yyyy年MM月dd日"));
+        keyword3.put("color", "#173177");
+
+        JSONObject remark = new JSONObject();
+        remark.put("value", reason);
+        remark.put("color", "#ed1414");
+
+        sendData.put("first", first);
+        sendData.put("keyword1", keyword1);
+        sendData.put("keyword2", keyword2);
+        sendData.put("keyword3", keyword3);
+        sendData.put("remark", remark);
+
+
+        boolean ret = sendTemplate(sendData, appId, appSecret, templateId, openId, url);
+
+        return ret;
+    }
+
+    /**
+     * 车辆位置提醒
+     * @param openId
+     * @param detail 首行内容
+     * @param appId
+     * @param appSecret
+     * @return
+     */
+    public  boolean sendCarPosition(String openId, String detail, String carNum, String stationName,String reason,String url,String appId, String appSecret) {
+
+
+        String templateId = "nRMewS-cRnxetnf7J4h8gPwMHKud12f3fv36s2eFTQM";
+        JSONObject sendData = new JSONObject();
+
+        JSONObject first = new JSONObject();
+        first.put("value", detail);
+        first.put("color", "#FF0000");
+
+        JSONObject keyword1 = new JSONObject();
+        keyword1.put("value", carNum);
+        keyword1.put("color", "#173177");
+
+        JSONObject keyword2 = new JSONObject();
+        keyword2.put("value", stationName);
+        keyword2.put("color", "#173177");
+
+        JSONObject remark = new JSONObject();
+        remark.put("value", reason);
+        remark.put("color", "#ed1414");
+
+        sendData.put("first", first);
+        sendData.put("keyword1", keyword1);
+        sendData.put("keyword2", keyword2);
+        sendData.put("remark", remark);
+
+
+        boolean ret = sendTemplate(sendData, appId, appSecret, templateId, openId, url);
+
+        return ret;
+    }
+
     /**
      *
      * @param schoolName
@@ -374,12 +533,4 @@ public class WechatMessageUtil {
 
         return ret;
     }
-
-
-    public static void main(String[] args) {
-
-
-    }
-
-
 }

+ 90 - 0
common/src/main/resources/mapper/base/HelpCenter.xml

@@ -0,0 +1,90 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.bus.modules.base.dao.HelpCenterDAO">
+    <resultMap id="HelpCenterMap" type="com.jpsoft.bus.modules.base.entity.HelpCenter">
+        <id property="id" column="id_" />
+        <result property="titleName" column="title_name" />
+        <result property="desc" column="desc_" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.bus.modules.base.entity.HelpCenter">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_help_center
+	    (id_,title_name,desc_,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{titleName,jdbcType=VARCHAR}
+,#{desc,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_help_center where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.bus.modules.base.entity.HelpCenter">
+        update base_help_center
+        <set>
+            <if test="titleName!=null">
+                title_name=#{titleName,jdbcType=VARCHAR},
+            </if>
+            <if test="desc!=null">
+                desc_=#{desc,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="HelpCenterMap">
+        select * from base_help_center where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_help_center where id_=#{0}
+    </select>
+    <select id="list" resultMap="HelpCenterMap">
+		select * from base_help_center where del_flag = 0
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="HelpCenterMap">
+        <![CDATA[
+			select * from base_help_center
+		]]>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 124 - 0
common/src/main/resources/mapper/base/RegionInfo.xml

@@ -0,0 +1,124 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.bus.modules.base.dao.RegionInfoDAO">
+    <resultMap id="RegionInfoMap" type="com.jpsoft.bus.modules.base.entity.RegionInfo">
+        <id property="id" column="id_" />
+        <result property="name" column="name_" />
+        <result property="parentId" column="parent_id" />
+        <result property="remark" column="remark_" />
+        <result property="createBy" column="create_by" />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy" column="update_by" />
+        <result property="updateTime" column="update_time" />
+        <result property="delFlag" column="del_flag" />
+        <result property="fullName" column="full_name" />
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.bus.modules.base.entity.RegionInfo">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into base_region_info
+	    (id_,name_,parent_id,remark_,create_by,create_time,update_by,update_time,del_flag,full_name)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{name,jdbcType=VARCHAR}
+,#{parentId,jdbcType=VARCHAR}
+,#{remark,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+,#{fullName,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from base_region_info where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.bus.modules.base.entity.RegionInfo">
+        update base_region_info
+        <set>
+            <if test="name!=null">
+                name_=#{name,jdbcType=VARCHAR},
+            </if>
+            <if test="parentId!=null">
+                parent_id=#{parentId,jdbcType=VARCHAR},
+            </if>
+            <if test="remark!=null">
+                remark_=#{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="fullName!=null">
+                full_name=#{fullName,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="RegionInfoMap">
+        select * from base_region_info where id_=#{0} and del_flag = 0
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from base_region_info where id_=#{0}
+    </select>
+    <select id="list" resultMap="RegionInfoMap">
+		select * from base_region_info where del_flag = 0
+	</select>
+    <select id="search" parameterType="hashmap" resultMap="RegionInfoMap">
+        <![CDATA[
+			select * from base_region_info
+		]]>
+        <where>
+            and del_flag = 0
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList"  open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+
+    <select id="findByParentId" resultMap="RegionInfoMap">
+        <![CDATA[
+        select * from base_region_info
+        where parent_id = #{0}
+        and del_flag = 0
+        order by create_time desc
+        ]]>
+    </select>
+    <select id="findTopRegion" resultMap="RegionInfoMap">
+        <![CDATA[
+        select * from base_region_info
+        where parent_id is null
+        and del_flag = 0
+        ]]>
+    </select>
+
+    <select id="findByName" resultMap="RegionInfoMap">
+        <![CDATA[
+        select * from base_region_info
+        where name_ = #{0}
+        ]]>
+    </select>
+</mapper>

+ 30 - 1
common/src/main/resources/mapper/bus/PassengerInfo.xml

@@ -198,6 +198,9 @@
             <if test="searchParams.downStationId != null">
                 and a.down_station_id = #{searchParams.downStationId}
             </if>
+            <if test="searchParams.maxCreateTime != null">
+                and a.create_time >= #{searchParams.maxCreateTime}
+            </if>
         </where>
         <foreach item="sort" collection="sortList" open="order by" separator=",">
             ${sort.name} ${sort.order}
@@ -215,7 +218,6 @@
             and status_ = #{status}
         </if>
     </select>
-
     <select id="findByShiftStatusPayStatusNotTicketDown" resultMap="PassengerInfoMap">
         <![CDATA[
 		select  * from bus_passenger_info
@@ -226,4 +228,31 @@
 		and ticket_down_station_id <> #{ticketDownStationId}
 		]]>
     </select>
+    <select id="findByOpenIdAndStatus" resultMap="PassengerInfoMap">
+        select t1.* from
+        bus_passenger_info t1
+        inner join base_order_info t2 on t2.passenger_id = t1.id_
+        inner join bus_shift_info t3 on t1.vehicle_shift_id = t3.id_
+        inner join base_merge_order_info t4 on t2.merge_order_id = t4.id_
+        where t1.del_flag = 0
+        and t1.status_=#{status}
+        and t1.pay_status=#{payStatus}
+        and t3.status_='1'
+        and t4.open_id=#{openId}
+        order by t1.create_time desc
+    </select>
+    <select id="findByOpenIdAndVehicleShiftId" resultMap="PassengerInfoMap">
+        select t1.* from
+        bus_passenger_info t1
+        inner join base_order_info t2 on t2.passenger_id = t1.id_
+        inner join bus_shift_info t3 on t1.vehicle_shift_id = t3.id_
+        inner join base_merge_order_info t4 on t2.merge_order_id = t4.id_
+        where t1.del_flag = 0
+        and t1.status_=#{status}
+        and t1.pay_status=#{payStatus}
+        and t4.open_id=#{openId}
+        and t3.status_='1'
+        and t3.id_ = #{vehicleShiftId}
+        order by t1.create_time asc
+    </select>
 </mapper>

+ 3 - 0
common/src/main/resources/mapper/bus/PassengerMessage.xml

@@ -102,6 +102,9 @@ id_,open_id,passenger_id,read_status,create_by,create_time,update_by,update_time
 			<if test="searchParams.payStatus != null">
 				and b.pay_status = #{searchParams.payStatus}
 			</if>
+			<if test="searchParams.passengerStatus != null">
+				and b.status_ = #{searchParams.passengerStatus}
+			</if>
 			<if test="searchParams.readStatus != null">
 				and a.read_status = #{searchParams.readStatus}
 			</if>

+ 22 - 5
common/src/main/resources/mapper/bus/RouteInfo.xml

@@ -16,6 +16,9 @@
 			<result property="goodsId" column="goods_id" />
 			<result property="startTime" column="start_time" />
 			<result property="endTime" column="end_time" />
+			<result property="companyName" column="company_name" />
+			<result property="regionId" column="region_id"/>
+			<result property="regionName" column="region_name" />
 			</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.bus.modules.bus.entity.RouteInfo">
 	<!--
@@ -25,7 +28,8 @@
 	-->
 	<![CDATA[
 		insert into bus_route_info
-	    (id_,name_,create_by,create_time,update_by,update_time,del_flag,map_path,company_id,goods_id,start_time,end_time)
+	    (id_,name_,create_by,create_time,update_by,update_time,del_flag,map_path,company_id,goods_id,start_time,end_time,
+	    region_id)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -40,6 +44,7 @@
 ,#{goodsId,jdbcType=VARCHAR}
 ,#{startTime,jdbcType=VARCHAR}
 ,#{endTime,jdbcType=VARCHAR}
+            ,#{regionId,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -82,6 +87,9 @@
 				<if test="endTime!=null">
 		end_time=#{endTime,jdbcType=VARCHAR},
 		</if>
+			<if test="regionId!=null">
+				region_id=#{regionId,jdbcType= VARCHAR },
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
@@ -96,15 +104,24 @@
 	</select>
 	<select id="search" parameterType="hashmap" resultMap="RouteInfoMap">
 		<![CDATA[
-			select * from bus_route_info
+			select
+			a.*,
+			b.name_ as company_name,
+			c.name_ as region_name
+			from bus_route_info a
+			left join bus_company_info b on a.company_id = b.id_
+            left join base_region_info c on a.region_id = c.id_
 		]]>
 		<where>
-			del_flag = false
+			a.del_flag = false
 			<if test="searchParams.name != null">
-				and name_ like #{searchParams.name}
+				and a.name_ like #{searchParams.name}
 			</if>
 			<if test="searchParams.companyId != null">
-				and company_id = #{searchParams.companyId}
+				and a.company_id = #{searchParams.companyId}
+			</if>
+			<if test="searchParams.regionId != null">
+				and a.region_id = #{searchParams.regionId}
 			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">

+ 10 - 0
common/src/main/resources/mapper/bus/ShiftInfo.xml

@@ -176,4 +176,14 @@
 		and status_ = #{status}
 		]]>
 	</select>
+
+	<select id="findByRouteIdAndStatusAndStartStationId" resultMap="ShiftInfoMap">
+		<![CDATA[
+		select * from bus_shift_info
+		where del_flag = 0
+		and route_id = #{routeId}
+		and status_ = #{status}
+		and start_station_id = #{startStationId}
+		]]>
+	</select>
 </mapper>

+ 5 - 0
common/src/main/resources/mapper/bus/StationInfo.xml

@@ -101,9 +101,11 @@ id_,sort_no,route_id,name_,longitude_,latitude_,classify_,create_by,create_time,
 	<select id="search" parameterType="hashmap" resultMap="StationInfoMap">
 		<![CDATA[
 			select a.* from bus_station_info a
+			left join bus_route_info b on a.route_id = b.id_
 		]]>
 		<where>
 			a.del_flag = 0
+			and b.del_flag = 0
 			<if test="searchParams.id != null">
 				and a.ID_ like #{searchParams.id}
 			</if>
@@ -128,6 +130,9 @@ id_,sort_no,route_id,name_,longitude_,latitude_,classify_,create_by,create_time,
 			<if test="searchParams.routeId != null">
 				and a.route_id like #{searchParams.routeId}
 			</if>
+			<if test="searchParams.name !=null ">
+				and a.name_ like #{searchParams.name}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 161 - 0
common/src/main/resources/mapper/bus/StationRemind.xml

@@ -0,0 +1,161 @@
+<?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">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.bus.modules.bus.dao.StationRemindDAO">
+    <resultMap id="StationRemindMap" type="com.jpsoft.bus.modules.bus.entity.StationRemind">
+        <id property="id" column="id_"/>
+        <result property="startStationId" column="start_station_id"/>
+        <result property="endStationId" column="end_station_id"/>
+        <result property="remindStationId" column="remind_station_id"/>
+        <result property="advanceStationId" column="advance_station_id"/>
+        <result property="stopInAdvance" column="stop_in_advance"/>
+        <result property="openId" column="open_id"/>
+        <result property="remindType" column="remind_type"/>
+        <result property="vehicleShiftId" column="vehicle_shift_id"/>
+        <result property="routeId" column="route_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+    <insert id="insert" parameterType="com.jpsoft.bus.modules.bus.entity.StationRemind">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into bus_station_remind
+	    (id_,start_station_id,end_station_id,remind_station_id,advance_station_id,
+	    stop_in_advance,open_id,remind_type,vehicle_shift_id,route_id,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+            #{id,jdbcType= VARCHAR }
+            ,#{startStationId,jdbcType=VARCHAR}
+            ,#{endStationId,jdbcType=VARCHAR}
+            ,#{remindStationId,jdbcType=VARCHAR}
+            ,#{advanceStationId,jdbcType=VARCHAR}
+            ,#{stopInAdvance,jdbcType= NUMERIC }
+            ,#{openId,jdbcType=VARCHAR}
+            ,#{remindType,jdbcType= NUMERIC }
+            ,#{vehicleShiftId,jdbcType=VARCHAR}
+            ,#{routeId,jdbcType=VARCHAR}
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from bus_station_remind where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="com.jpsoft.bus.modules.bus.entity.StationRemind">
+        update bus_station_remind
+        <set>
+            <if test="startStationId!=null">
+                start_station_id=#{startStationId,jdbcType=VARCHAR},
+            </if>
+            <if test="endStationId!=null">
+                end_station_id=#{endStationId,jdbcType=VARCHAR},
+            </if>
+            <if test="remindStationId!=null">
+                remind_station_id=#{remindStationId,jdbcType=VARCHAR},
+            </if>
+            <if test="stopInAdvance!=null">
+                stop_in_advance=#{stopInAdvance,jdbcType= NUMERIC },
+            </if>
+            <if test="advanceStationId!=null">
+                advance_station_id=#{advanceStationId,jdbcType=VARCHAR},
+            </if>
+            <if test="openId!=null">
+                open_id=#{openId,jdbcType=VARCHAR},
+            </if>
+            <if test="remindType!=null">
+                remind_type=#{remindType,jdbcType= NUMERIC },
+            </if>
+            <if test="vehicleShiftId!=null">
+                vehicle_shift_id=#{vehicleShiftId,jdbcType=VARCHAR},
+            </if>
+            <if test="routeId!=null">
+                route_id=#{routeId,jdbcType=VARCHAR},
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="StationRemindMap">
+        select * from bus_station_remind
+        where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from bus_station_remind where id_=#{0}
+    </select>
+    <select id="list" resultMap="StationRemindMap">
+        select * from bus_station_remind
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="StationRemindMap">
+        <![CDATA[
+			select * from bus_station_remind
+		]]>
+        <where>
+            <if test="searchParams.openId != null">
+                and open_id = #{searchParams.openId}
+            </if>
+            <if test="searchParams.vehicleShiftId != null">
+                and vehicle_shift_id = #{searchParams.vehicleShiftId}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="findByAdvanceStationId" parameterType="string" resultMap="StationRemindMap">
+        select * from bus_station_remind
+        where del_flag=0
+        and advance_station_id = #{0}
+        order by create_time asc
+    </select>
+    <select id="findByOpenIdAndVehicleShiftId" parameterType="string" resultMap="StationRemindMap">
+        select * from bus_station_remind
+        where del_flag=0
+        and open_id = #{openId}
+        and vehicle_shift_id = #{vehicleShiftId}
+        order by create_time asc
+    </select>
+
+    <select id="findByOpenId" resultMap="StationRemindMap">
+        <![CDATA[
+        select a.* from bus_station_remind a
+        where a.del_flag = 0
+        and a.open_id = #{openId}
+        order by a.create_time desc
+        ]]>
+    </select>
+    <select id="findByOpenIdAndRouteId" resultMap="StationRemindMap">
+        <![CDATA[
+        select * from bus_station_remind
+        where del_flag = 0
+        and open_id = #{openId}
+        and route_id = #{routeId}
+        order by create_time asc
+        ]]>
+    </select>
+</mapper>

+ 1 - 1
common/src/main/resources/mapper/sys/User.xml

@@ -103,7 +103,7 @@
 			select a.*,
 			b.name_ as company_name
 			from sys_user a
-			LEFT JOIN base_company_info b ON a.company_id = b.id_
+			LEFT JOIN bus_company_info b ON a.company_id = b.id_
 			where a.del_flag = 0
 		]]>
         <if test="searchParams.userName != null">

+ 3 - 1
gps/src/main/java/com/jpsoft/gps/handler/ProcessHandler.java

@@ -44,7 +44,9 @@ public class ProcessHandler extends SimpleChannelInboundHandler<String> {
                     System.out.println(deviceNo + "," + df.format(gcj[1]) + "," + df.format(gcj[0]));
 
                     if (this.callback != null) {
-                        this.callback.receive(deviceNo, df.format(gcj[1]), df.format(gcj[0]));
+                        new Thread(()->{
+                            this.callback.receive(deviceNo, df.format(gcj[1]), df.format(gcj[0]));
+                        }).start();
                     }
                 }
             }

+ 2 - 1
web/src/main/java/com/jpsoft/bus/config/RabbitmqConfig.java

@@ -12,5 +12,6 @@ import java.util.Map;
 
 @Configuration
 public class RabbitmqConfig {
-
+    @Bean
+    public Queue StationRemindQueue() {return new Queue("stationRemindQueue", true);}
 }

+ 10 - 1
web/src/main/java/com/jpsoft/bus/config/WebMvcConfig.java

@@ -81,7 +81,16 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/passengerApi/passengerMessage")
 				.excludePathPatterns("/mobile/passengerApi/mergeInfo")
 				.excludePathPatterns("/mobile/passengerApi/passengerRecordList")
+				.excludePathPatterns("/mobile/passengerApi/routeShiftList")
+				.excludePathPatterns("/mobile/stationRemindApi/**")
+				.excludePathPatterns("/mobile/passengerApi/findCurrentVehicle")
+				.excludePathPatterns("/mobile/passengerApi/nearbyStationInfo")
+				.excludePathPatterns("/mobile/passengerApi/passengerRecordDetail")
+				.excludePathPatterns("/mobile/passengerApi/passengerRemindList")
+				.excludePathPatterns("/mobile/passengerApi/passengerShiftRemindList")
+				.excludePathPatterns("/mobile/passengerApi/helpCenterList")
 
-				;
+
+		;
 	}
 }

+ 245 - 0
web/src/main/java/com/jpsoft/bus/modules/base/controller/MobileBannerInfoController.java

@@ -0,0 +1,245 @@
+package com.jpsoft.bus.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.base.entity.MobileBannerInfo;
+import com.jpsoft.bus.modules.base.service.MobileBannerInfoService;
+import com.jpsoft.bus.modules.common.dto.MessageResult;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.common.utils.PojoUtils;
+import com.jpsoft.bus.modules.sys.entity.DataDictionary;
+import com.jpsoft.bus.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/base/mobileBannerInfo")
+@Api(description = "移动端广告栏管理")
+public class MobileBannerInfoController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private MobileBannerInfoService mobileBannerInfoService;
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<MobileBannerInfo> create(){
+        MessageResult<MobileBannerInfo> msgResult = new MessageResult<>();
+
+        MobileBannerInfo mobileBannerInfo = new MobileBannerInfo();
+
+        msgResult.setData(mobileBannerInfo);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<MobileBannerInfo> add(@RequestBody MobileBannerInfo mobileBannerInfo, @RequestAttribute String subject){
+        MessageResult<MobileBannerInfo> msgResult = new MessageResult<>();
+
+        try {
+            mobileBannerInfo.setId(UUID.randomUUID().toString());
+            mobileBannerInfo.setDelFlag(false);
+            mobileBannerInfo.setCreateBy(subject);
+            mobileBannerInfo.setCreateTime(new Date());
+            
+            int affectCount = mobileBannerInfoService.insert(mobileBannerInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(mobileBannerInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<MobileBannerInfo> edit(@PathVariable("id") String id){
+        MessageResult<MobileBannerInfo> msgResult = new MessageResult<>();
+
+        try {
+            MobileBannerInfo mobileBannerInfo = mobileBannerInfoService.get(id);
+
+            if (mobileBannerInfo != null) {
+                msgResult.setResult(true);
+                msgResult.setData(mobileBannerInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<MobileBannerInfo> update(@RequestBody MobileBannerInfo mobileBannerInfo, @RequestAttribute String subject){
+        MessageResult<MobileBannerInfo> msgResult = new MessageResult<>();
+
+        try {
+            mobileBannerInfo.setUpdateBy(subject);
+            mobileBannerInfo.setUpdateTime(new Date());
+            
+            int affectCount = mobileBannerInfoService.update(mobileBannerInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(mobileBannerInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id, @RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            MobileBannerInfo mobileBannerInfo = mobileBannerInfoService.get(id);
+            mobileBannerInfo.setDelFlag(true);
+            mobileBannerInfo.setUpdateBy(subject);
+            mobileBannerInfo.setUpdateTime(new Date());
+
+            int affectCount = mobileBannerInfoService.update(mobileBannerInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                MobileBannerInfo mobileBannerInfo = mobileBannerInfoService.get(id);
+                mobileBannerInfo.setDelFlag(true);
+                mobileBannerInfo.setUpdateBy(subject);
+                mobileBannerInfo.setUpdateTime(new Date());
+
+                affectCount += mobileBannerInfoService.update(mobileBannerInfo);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="分页列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String name,String classify,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("classify_","asc"));
+        sortList.add(new Sort("sort_no","asc"));
+
+        if (StringUtils.isNotEmpty(name)) {
+            searchParams.put("name","%" + name + "%");
+        }
+
+        if (StringUtils.isNotEmpty(classify)) {
+            searchParams.put("classify",classify);
+        }
+
+        List<DataDictionary> classifyList = dataDictionaryService.findByCatalogName("移动端广告栏分类");
+
+        Map<String,String> classifyMap = new HashMap<>();
+
+        for (DataDictionary dd : classifyList) {
+            classifyMap.put(dd.getValue(),dd.getName());
+        }
+
+        Page<MobileBannerInfo> page = mobileBannerInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        for (MobileBannerInfo mobileBannerInfo : page) {
+            mobileBannerInfo.setClassifyN(classifyMap.get(mobileBannerInfo.getClassify()));
+        }
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 252 - 0
web/src/main/java/com/jpsoft/bus/modules/base/controller/RegionInfoController.java

@@ -0,0 +1,252 @@
+package com.jpsoft.bus.modules.base.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.base.entity.RegionInfo;
+import com.jpsoft.bus.modules.base.service.RegionInfoService;
+import com.jpsoft.bus.modules.common.dto.MessageResult;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.common.utils.PojoUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+/**
+ * 地区区域信息表
+ * sz
+ * **/
+@RestController
+@RequestMapping("/base/regionInfo")
+@Api(description = "regionInfo")
+public class RegionInfoController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+    @Autowired
+    private RegionInfoService regionInfoService;
+
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<RegionInfo> create(){
+        MessageResult<RegionInfo> msgResult = new MessageResult<>();
+
+        RegionInfo regionInfo = new RegionInfo();
+
+        msgResult.setData(regionInfo);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<RegionInfo> add(@RequestBody RegionInfo regionInfo, @RequestAttribute String subject){
+        MessageResult<RegionInfo> msgResult = new MessageResult<>();
+
+        try {
+            regionInfo.setId(UUID.randomUUID().toString());
+            regionInfo.setDelFlag(false);
+            regionInfo.setCreateBy(subject);
+            regionInfo.setCreateTime(new Date());
+            
+            int affectCount = regionInfoService.insert(regionInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(regionInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<RegionInfo> edit(@PathVariable("id") String id){
+        MessageResult<RegionInfo> msgResult = new MessageResult<>();
+
+        try {
+            RegionInfo regionInfo = regionInfoService.get(id);
+
+            if (regionInfo != null) {
+                msgResult.setResult(true);
+                msgResult.setData(regionInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<RegionInfo> update(@RequestBody RegionInfo regionInfo, @RequestAttribute String subject){
+        MessageResult<RegionInfo> msgResult = new MessageResult<>();
+
+        try {
+            regionInfo.setUpdateBy(subject);
+            regionInfo.setUpdateTime(new Date());
+            
+            int affectCount = regionInfoService.update(regionInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(regionInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id, @RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            RegionInfo regionInfo = regionInfoService.get(id);
+            regionInfo.setDelFlag(true);
+            regionInfo.setUpdateBy(subject);
+            regionInfo.setUpdateTime(new Date());
+
+            int affectCount = regionInfoService.update(regionInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                RegionInfo regionInfo = regionInfoService.get(id);
+                regionInfo.setDelFlag(true);
+                regionInfo.setUpdateBy(subject);
+                regionInfo.setUpdateTime(new Date());
+
+                affectCount += regionInfoService.update(regionInfo);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="sceneId",defaultValue="") String sceneId,
+            @RequestParam(value="useEnable",defaultValue="") String useEnable,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("a.create_time","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        if (StringUtils.isNotEmpty(sceneId)) {
+            searchParams.put("sceneId",sceneId);
+        }
+
+        if (StringUtils.isNotEmpty(useEnable)) {
+            searchParams.put("useEnable",useEnable);
+        }
+
+        Page<RegionInfo> page = regionInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="所有地区区域列表")
+    @RequestMapping(value = "list",method = RequestMethod.POST)
+    public MessageResult<List<RegionInfo>> list(String companyId,String type,@RequestAttribute String subject){
+
+        MessageResult<List<RegionInfo>> msgResult = new MessageResult<>();
+
+        List<RegionInfo> list = regionInfoService.list();
+
+        msgResult.setResult(true);
+        msgResult.setData(list);
+
+        return msgResult;
+    }
+}

+ 8 - 8
web/src/main/java/com/jpsoft/bus/modules/bus/controller/RouteInfoController.java

@@ -161,6 +161,7 @@ public class RouteInfoController {
                 routeInfoDTO.setCompanyId(routeInfo.getCompanyId());
                 routeInfoDTO.setStartTime(routeInfo.getStartTime());
                 routeInfoDTO.setEndTime(routeInfo.getEndTime());
+                routeInfoDTO.setRegionId(routeInfo.getRegionId());
 
                 List<StationInfoDTO> stationInfoDTOList = new ArrayList<>();
 
@@ -232,6 +233,7 @@ public class RouteInfoController {
             routeInfo.setCompanyId(dto.getCompanyId());
             routeInfo.setStartTime(dto.getStartTime());
             routeInfo.setEndTime(dto.getEndTime());
+            routeInfo.setRegionId(dto.getRegionId());
             routeInfo.setUpdateBy(subject);
             routeInfo.setUpdateTime(new Date());
 
@@ -429,6 +431,7 @@ public class RouteInfoController {
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
             String companyId,String name,
+            @RequestParam(value="regionI",defaultValue="") String regionId,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             @RequestAttribute String subject){
@@ -441,7 +444,7 @@ public class RouteInfoController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("create_time","desc"));
+        sortList.add(new Sort("a.create_time","desc"));
 
         if (StringUtils.isNotEmpty(companyId)) {
             searchParams.put("companyId",companyId);
@@ -451,15 +454,12 @@ public class RouteInfoController {
             searchParams.put("name","%" + name + "%");
         }
 
-        Page<RouteInfo> page = routeInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
-
-        for (RouteInfo routeInfo:page) {
-            CompanyInfo companyInfo = companyInfoService.get(routeInfo.getCompanyId());
-            if(companyInfo!=null){
-                routeInfo.setCompanyName(companyInfo.getName());
-            }
+        if (StringUtils.isNotEmpty(regionId)) {
+            searchParams.put("regionId",regionId);
         }
 
+        Page<RouteInfo> page = routeInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));
 

文件差异内容过多而无法显示
+ 535 - 154
web/src/main/java/com/jpsoft/bus/modules/mobile/controller/PassengerApiController.java


+ 399 - 0
web/src/main/java/com/jpsoft/bus/modules/mobile/controller/StationRemindApiController.java

@@ -0,0 +1,399 @@
+package com.jpsoft.bus.modules.mobile.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.bus.entity.*;
+import com.jpsoft.bus.modules.bus.service.*;
+import com.jpsoft.bus.modules.common.utils.PojoUtils;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.common.dto.MessageResult;
+import com.jpsoft.bus.modules.common.utils.SnowflakeIdWorker;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/mobile/stationRemindApi")
+@Api(description = "站点订阅")
+public class StationRemindApiController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private StationRemindService stationRemindService;
+
+    @Autowired
+    private StationInfoService stationInfoService;
+
+    @Autowired
+    private RabbitTemplate rabbitTemplate;
+
+    @Autowired
+    private ShiftInfoService shiftInfoService;
+
+    @Autowired
+    private VehicleInfoService vehicleInfoService;
+
+    @Autowired
+    private RouteInfoService routeInfoService;
+
+    @Autowired
+    private PassengerInfoService passengerInfoService;
+
+    @ApiOperation(value = "添加订阅")
+    @PostMapping("add")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "startStationId", value = "起始站点编号", paramType = "form"),
+            @ApiImplicitParam(name = "endStationId", value = "终点站站点编号", paramType = "form"),
+            @ApiImplicitParam(name = "remindStationId", value = "提醒站点编号", paramType = "form"),
+            @ApiImplicitParam(name = "stopInAdvance", value = "提前多少站通知", paramType = "form"),
+            @ApiImplicitParam(name = "remindType", value = "提醒类型(1-上车,2-下车)", paramType = "form"),
+            @ApiImplicitParam(name = "vehicleShiftId", value = "车辆班次编号", paramType = "form", allowEmptyValue = true),
+            @ApiImplicitParam(name = "routeId", value = "线路id", paramType = "form", allowEmptyValue = true),
+            @ApiImplicitParam(name = "openId", value = "微信openId", paramType = "form")
+    })
+    public MessageResult<StationRemind> add(String startStationId, String endStationId, String remindStationId, Integer stopInAdvance,
+                                            Integer remindType, String vehicleShiftId, String routeId,String openId) {
+        MessageResult<StationRemind> msgResult = new MessageResult<>();
+
+        try {
+            StationRemind stationRemind = new StationRemind();
+            stationRemind.setId(UUID.randomUUID().toString());
+            stationRemind.setStartStationId(startStationId);
+            stationRemind.setRemindStationId(remindStationId);
+            stationRemind.setStopInAdvance(stopInAdvance);
+
+            StationInfo advanceStation = getAdvanceStation(startStationId, remindStationId, stopInAdvance);
+
+            if (advanceStation != null) {
+                stationRemind.setAdvanceStationId(advanceStation.getId());
+            }
+
+
+            stationRemind.setEndStationId(endStationId);
+            stationRemind.setRemindType(remindType);
+            stationRemind.setVehicleShiftId(vehicleShiftId);
+            stationRemind.setRouteId(routeId);
+            stationRemind.setOpenId(openId);
+            stationRemind.setDelFlag(false);
+            stationRemind.setCreateBy(openId);
+            stationRemind.setCreateTime(new Date());
+
+            int affectCount = stationRemindService.insert(stationRemind);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(stationRemind);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("订阅失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "更新订阅")
+    @PostMapping("update")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "remindId", value = "订阅编号", paramType = "form"),
+            @ApiImplicitParam(name = "startStationId", value = "起始站点编号", paramType = "form"),
+            @ApiImplicitParam(name = "remindStationId", value = "提醒站点编号", paramType = "form"),
+            @ApiImplicitParam(name = "stopInAdvance", value = "提前多少站通知", paramType = "form"),
+            @ApiImplicitParam(name = "remindType", value = "提醒类型(1-上车,2-下车)", paramType = "form"),
+            @ApiImplicitParam(name = "vehicleShiftId", value = "车辆班次编号", paramType = "form", allowEmptyValue = true),
+            @ApiImplicitParam(name = "openId", value = "微信openId", paramType = "form")
+    })
+    public MessageResult<StationRemind> update(String remindId, String startStationId, String remindStationId, Integer stopInAdvance,
+                                               Integer remindType, String vehicleShiftId, String openId) {
+        MessageResult<StationRemind> msgResult = new MessageResult<>();
+
+        try {
+            StationRemind stationRemind = stationRemindService.get(remindId);
+            stationRemind.setStartStationId(startStationId);
+            stationRemind.setRemindStationId(remindStationId);
+            stationRemind.setStopInAdvance(stopInAdvance);
+
+            StationInfo advanceStation = getAdvanceStation(startStationId, remindStationId, stopInAdvance);
+
+            if (advanceStation != null) {
+                stationRemind.setAdvanceStationId(advanceStation.getId());
+            }
+
+            stationRemind.setRemindType(remindType);
+            stationRemind.setVehicleShiftId(vehicleShiftId);
+            stationRemind.setOpenId(openId);
+            stationRemind.setDelFlag(false);
+            stationRemind.setCreateBy(openId);
+            stationRemind.setCreateTime(new Date());
+
+            int affectCount = stationRemindService.insert(stationRemind);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(stationRemind);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("订阅失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value = "更新订阅报站数量")
+    @PostMapping("updateStationNum")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "订阅编号", paramType = "form"),
+            @ApiImplicitParam(name = "num", value = "提前站数量", paramType = "form")
+    })
+    public MessageResult<StationRemind> updateStationNum(String id, String num) {
+        MessageResult<StationRemind> msgResult = new MessageResult<>();
+
+        try {
+            StationRemind stationRemind = stationRemindService.get(id);
+            stationRemind.setStopInAdvance(Integer.parseInt(num));
+            stationRemindService.update(stationRemind);
+            msgResult.setData(stationRemind);
+            msgResult.setCode(200);
+            msgResult.setResult(true);
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    private StationInfo getAdvanceStation(String startStationId, String remindStationId, Integer stopInAdvance) throws Exception {
+        StationInfo station = stationInfoService.get(remindStationId);
+
+        List<StationInfo> stationList = stationInfoService.findByRouteId(station.getRouteId());
+        StationInfo advanceStation = null;
+
+        if (stationList.size() > 0) {
+            StationInfo firstStation = stationList.get(0);
+
+            int curIndex = 0;
+
+            for (int i = 0; i < stationList.size(); i++) {
+                if (stationList.get(i).getId().equals(remindStationId)) {
+                    curIndex = i;
+                    break;
+                }
+            }
+
+            int advanceIndex = 0;
+
+            if (firstStation.getId().equals(startStationId)) {
+                //首站->终点站
+                advanceIndex = curIndex - stopInAdvance;
+            } else {
+                //终点站->首站
+                advanceIndex = curIndex + stopInAdvance;
+            }
+
+            if (advanceIndex < 0) {
+                advanceIndex = 0;
+            }
+
+            if (advanceIndex >= stationList.size()) {
+                advanceIndex = stationList.size() - 1;
+            }
+
+            advanceStation = stationList.get(advanceIndex);
+        } else {
+            throw new Exception("当前站点没有关联路线");
+        }
+        return advanceStation;
+    }
+
+    @ApiOperation(value = "取消订阅")
+    @PostMapping("cancel")
+    public MessageResult<Integer> cancel(String id) {
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            StationRemind stationRemind = stationRemindService.get(id);
+            stationRemind.setDelFlag(true);
+            stationRemind.setUpdateTime(new Date());
+
+            int affectCount = stationRemindService.update(stationRemind);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("取消订阅失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "列表")
+    @RequestMapping(value = "pageList", method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String openId,
+            String vehicleShiftId,
+            @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
+            @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time", "desc"));
+
+        if (StringUtils.isNotEmpty(openId)) {
+            searchParams.put("openId", openId);
+        }
+
+        if (StringUtils.isNotEmpty(vehicleShiftId)) {
+            searchParams.put("vehicleShiftId", vehicleShiftId);
+        }
+
+        Page<StationRemind> page = stationRemindService.pageSearch(searchParams, pageIndex, pageSize, true, sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @GetMapping("sendMessage")
+    @ApiOperation(value = "sendMessage")
+    public MessageResult<String> sendMessage(String shiftId) {
+        MessageResult<String> messageResult = new MessageResult<>();
+
+        try {
+            ShiftInfo shiftInfo = shiftInfoService.get(shiftId);
+            rabbitTemplate.convertAndSend("stationRemindQueue", shiftInfo);
+
+            messageResult.setResult(true);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+
+    @GetMapping("findCurrentVehicle")
+    @ApiOperation(value = "查询当前乘坐车辆")
+    public MessageResult<List> findCurrentVehicle(String openId) {
+        MessageResult<List> messageResult = new MessageResult<>();
+
+        try {
+            List<PassengerInfo> passengers = passengerInfoService.findByOpenIdAndStatus(openId, "1", "1");
+
+            Set<String> vehicleShiftSet = new HashSet<>();
+
+            for (PassengerInfo passenger : passengers) {
+                if (!vehicleShiftSet.contains(passenger.getVehicleShiftId())) {
+                    vehicleShiftSet.add(passenger.getVehicleShiftId());
+                }
+            }
+
+            List<Map> mapList = new ArrayList<>();
+
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+            for (String vehicleShiftId : vehicleShiftSet) {
+                Map<String, Object> map = new HashMap<>();
+                map.put("vehicleShiftId", vehicleShiftId);
+
+                ShiftInfo shiftInfo = shiftInfoService.get(vehicleShiftId);
+
+                VehicleInfo vehicleInfo = vehicleInfoService.get(shiftInfo.getVehicleId());
+                RouteInfo routeInfo = routeInfoService.get(shiftInfo.getRouteId());
+
+                map.put("createTime", sdf.format(shiftInfo.getCreateTime()));
+                map.put("licensePlateNumber", vehicleInfo.getLicensePlateNumber());
+                map.put("routeName", routeInfo.getName());
+
+                StationInfo startStation = stationInfoService.get(shiftInfo.getStartStationId());
+                StationInfo currentStation = stationInfoService.get(shiftInfo.getCurrentStationId());
+                StationInfo endStation = stationInfoService.get(shiftInfo.getEndStationId());
+
+                map.put("startStationId", startStation.getId());
+                map.put("startStationName", startStation.getName());
+                map.put("endStationId", endStation.getId());
+                map.put("endStationName", endStation.getName());
+
+                if (currentStation != null) {
+                    map.put("currentStationId", currentStation.getId());
+                    map.put("currentStationName", currentStation.getName());
+                }
+
+                //查询目的地
+                List<PassengerInfo> passengerInfos = passengerInfoService.findByOpenIdAndVehicleShiftId(openId, vehicleShiftId, "1", "1");
+
+                if (passengerInfos.size() > 0) {
+                    PassengerInfo passengerInfo = passengerInfos.get(0);
+                    StationInfo ticketDownStation = stationInfoService.get(passengerInfo.getTicketDownStationId());
+
+                    map.put("ticketDownStationId", ticketDownStation.getId());
+                    map.put("ticketDownStationName", ticketDownStation.getName());
+                }
+
+                //是否创建消息提醒,显示消息提醒的到达站点信息
+                map.put("openId", openId);
+
+                List<StationRemind> stationRemindList = stationRemindService.findByOpenIdAndVehicleShiftId(openId, vehicleShiftId);
+                if (stationRemindList.size() > 0) {
+                    map.put("remindId", stationRemindList.get(0).getId());
+                    map.put("stopInAdvance", stationRemindList.get(0).getStopInAdvance());
+
+
+                }
+
+
+                mapList.add(map);
+            }
+
+            //todo 填写具体代码
+            messageResult.setData(mapList);
+            messageResult.setResult(true);
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+}

+ 144 - 0
web/src/main/java/com/jpsoft/bus/modules/mq/listener/StationRemindListener.java

@@ -0,0 +1,144 @@
+package com.jpsoft.bus.modules.mq.listener;
+
+import com.jpsoft.bus.config.WxConfig;
+import com.jpsoft.bus.modules.bus.entity.*;
+import com.jpsoft.bus.modules.bus.service.RouteInfoService;
+import com.jpsoft.bus.modules.bus.service.StationInfoService;
+import com.jpsoft.bus.modules.bus.service.StationRemindService;
+import com.jpsoft.bus.modules.bus.service.VehicleInfoService;
+import com.jpsoft.bus.modules.common.utils.CommonUtil;
+import com.jpsoft.bus.modules.common.utils.WechatMessageUtil;
+import lombok.extern.slf4j.Slf4j;
+import net.sf.json.JSONObject;
+import org.gavaghan.geodesy.Ellipsoid;
+import org.gavaghan.geodesy.GlobalCoordinates;
+import org.springframework.amqp.rabbit.annotation.RabbitHandler;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import java.text.DecimalFormat;
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@Component
+@RabbitListener(queues = "stationRemindQueue")
+public class StationRemindListener {
+    @Autowired
+    private StationInfoService stationInfoService;
+
+    @Autowired
+    private VehicleInfoService vehicleInfoService;
+
+    @Autowired
+    private StationRemindService stationRemindService;
+
+    @Autowired
+    private RouteInfoService routeInfoService;
+
+    @Value("${wx.stationRemindTemplateId}")
+    private String stationRemindTemplateId;
+
+    @Autowired
+    private WxConfig wxConfig;
+
+    @Autowired
+    private WechatMessageUtil wechatMessageUtil;
+
+    @RabbitHandler
+    public void process(ShiftInfo shiftInfo) {
+        try {
+            //查询站点提醒中设置当前站点到站提醒
+            List<StationRemind> stationRemindList = stationRemindService.findByAdvanceStationId(shiftInfo.getCurrentStationId());
+
+            RouteInfo routeInfo = routeInfoService.get(shiftInfo.getRouteId());
+            StationInfo startStation = stationInfoService.get(shiftInfo.getStartStationId());
+            StationInfo endStation = stationInfoService.get(shiftInfo.getEndStationId());
+
+            VehicleInfo vehicleInfo = vehicleInfoService.get(shiftInfo.getVehicleId());
+
+            //当前车辆所在站点
+            StationInfo stationInfo = stationInfoService.get(shiftInfo.getCurrentStationId());
+
+            for (StationRemind stationRemind : stationRemindList) {
+                try {
+                    String remindStr = "上车刷脸听到“感谢乘车”通行,入座扫码手机购票。";
+
+                    if (stationRemind.getRemindType() != null && stationRemind.getRemindType() == 2) {
+                        //下车提醒要判断是不是同一个班次
+                        if (!stationRemind.getVehicleShiftId().equals(shiftInfo.getId())) {
+                            continue;
+                        }
+                        else{
+                            remindStr = "下车时刷脸听到“感谢乘车”即可下车!";
+                        }
+                    }
+
+                    String detail = "上车提醒";
+                    if (stationRemind.getRemindType() == 2){
+                        detail = "下车提醒";
+                    }
+
+
+                    StationInfo remindStation = stationInfoService.get(stationRemind.getRemindStationId());
+                    StationInfo advanceStation = stationInfoService.get(stationRemind.getAdvanceStationId());
+
+                    String templateId = stationRemindTemplateId;
+                    JSONObject sendData = new JSONObject();
+
+                    JSONObject thing4 = new JSONObject();
+                    thing4.put("value", routeInfo.getName() + "(" + startStation.getName() + "," + endStation.getName() + ")");
+                    sendData.put("thing4", thing4);
+
+                    JSONObject thing2 = new JSONObject();
+                    thing2.put("value", advanceStation.getName());
+                    sendData.put("thing2", thing2);
+
+                    JSONObject thing6 = new JSONObject();
+                    thing6.put("value", String.format("大约%s",
+                            getDistance(remindStation, advanceStation)));
+                    sendData.put("thing6", thing6);
+
+                    JSONObject thing3 = new JSONObject();
+                    //距离目的站点(%s)还有%s站 remindStation.getName(),stationRemind.getStopInAdvance()
+                    thing3.put("value", String.format("%s",remindStr));
+
+                    sendData.put("thing3", thing3);
+
+                 //   wechatMessageUtil.sendSubscribeTemplate(wxConfig.getAppId(), wxConfig.getAppSecret(), templateId, stationRemind.getOpenId(), sendData, "");
+
+                    wechatMessageUtil.sendCarPosition(stationRemind.getOpenId(),detail,vehicleInfo.getLicensePlateNumber(),stationInfo.getName(),remindStr,wxConfig.getPortalUrl()+"/pages/buytickets/selectSite?id="+shiftInfo.getVehicleId(),wxConfig.getAppId(), wxConfig.getAppSecret());
+
+                    stationRemind.setDelFlag(true);
+                    stationRemind.setUpdateTime(new Date());
+
+                    stationRemindService.update(stationRemind);
+                } catch (Exception ex) {
+                    log.error(ex.getMessage(), ex);
+                }
+            }
+        }
+        catch (Exception e){
+            log.error(e.getMessage(), e);
+        }
+    }
+
+    private String getDistance(StationInfo remindStation, StationInfo advanceStation) {
+        String distance = "";
+        GlobalCoordinates source = new GlobalCoordinates(Double.valueOf(advanceStation.getLatitude()), Double.valueOf(advanceStation.getLongitude()));
+        GlobalCoordinates target = new GlobalCoordinates(Double.valueOf(remindStation.getLatitude()), Double.valueOf(remindStation.getLongitude()));
+
+        Double meter = CommonUtil.getDistanceMeter(source, target, Ellipsoid.Sphere);
+        DecimalFormat df = new DecimalFormat("0.00");
+
+        if (meter>1000){
+            distance = df.format(meter/1000) + "千米";
+        }
+        else{
+            distance = meter.intValue() + "米";
+        }
+
+        return distance;
+    }
+}

+ 11 - 20
web/src/main/java/com/jpsoft/bus/modules/pay/wechat/WxPayController.java

@@ -189,7 +189,6 @@ public class WxPayController {
                                 mergeOrderInfo1.setDelFlag(true);
                                 mergeOrderInfoService.update(mergeOrderInfo1);
                             }
-
                         }
                     }
 
@@ -206,30 +205,22 @@ public class WxPayController {
                             orderInfo.setPayTime(payTime);
                             orderInfoService.update(orderInfo);
 
+                            try {
+                                PassengerInfo passengerInfo = passengerInfoService.get(orderInfo.getPassengerId());
 
-                            new Thread(() -> {
-                                try {
-                                    PassengerInfo passengerInfo = passengerInfoService.get(orderInfo.getPassengerId());
-                                    if (passengerInfo != null){
-                                        passengerInfo.setTicketUpStationId(orderInfo.getTicketUpStationId());
-                                        passengerInfo.setTicketDownStationId(orderInfo.getTicketDownStationId());
-                                        passengerInfo.setPayStatus("1");
-                                        passengerInfo.setTicketType(orderInfo.getTicketType());
-                                        passengerInfoService.update(passengerInfo);
-                                    }
-
-                                } catch (Exception ex) {
-                                    log.error(ex.getMessage(), ex);
+                                if (passengerInfo != null){
+                                    passengerInfo.setTicketUpStationId(orderInfo.getTicketUpStationId());
+                                    passengerInfo.setTicketDownStationId(orderInfo.getTicketDownStationId());
+                                    passengerInfo.setPayStatus("1");
+                                    passengerInfo.setTicketType(orderInfo.getTicketType());
+                                    passengerInfoService.update(passengerInfo);
                                 }
-
-
-                            }).start();
+                            } catch (Exception ex) {
+                                log.error(ex.getMessage(), ex);
+                            }
                         }
                     }
 
-
-
-
                     // 发送通知等
                     Map<String, String> xml = new HashMap<String, String>(2);
                     xml.put("return_code", "SUCCESS");

+ 9 - 9
web/src/main/resources/application-dev.yml

@@ -7,14 +7,14 @@ spring:
   datasource:
 
     #开发环境
-#     url: jdbc:log4jdbc:mysql://192.168.33.20:3306/smart-bus?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-#     username: root
-#     password: jpsoft2016
+     url: jdbc:log4jdbc:mysql://192.168.33.20:3306/smart-bus?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+     username: root
+     password: jpsoft2016
 
     #测试环境
-     url: jdbc:log4jdbc:mysql://47.92.161.104:3336/smart-bus?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
-     username: root
-     password: jpsoft8121234
+#     url: jdbc:log4jdbc:mysql://47.92.161.104:3336/smart-bus?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+#     username: root
+#     password: jpsoft8121234
 
     #正式环境
 #     url: jdbc:log4jdbc:mysql://122.189.98.152:3336/jp_housekeeper?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
@@ -37,9 +37,9 @@ logger:
 
 wx:
   pay:
-    #企业联合会
-    appId: wx343bf93d2a3dc8af
-    appSecret: ac61fa669a7a79c7d2a8188ff7ddaef6
+    #车信达
+    appId: wx93675268c87a5a46
+    appSecret: 8a55e8cc8cffbf2db66f3024311036bc
     mchId: 1500160622
     subMchId: 1505070291
     mchKey: jpsoft11111111111111111111111111

+ 2 - 2
web/src/main/resources/application-test.yml

@@ -27,7 +27,7 @@ spring:
     username: admin
     password: jpsoft
     #虚拟host 可以不设置,使用server默认host
-    virtual-host: housekeeper-test
+    virtual-host: smart-bus-test
 
 logger:
   level: WARN
@@ -50,7 +50,7 @@ wx:
     refreshOAuth2TokenUrl: "https://api.weixin.qq.com/sns/oauth2/refresh_token"
     createQrCodeUrl: "https://api.weixin.qq.com/cgi-bin/qrcode/create"
     showQrCodeUrl: "https://mp.weixin.qq.com/cgi-bin/showqrcode"
-    portalUrl: http://xpgj.xiaoxinda.com/test/business/#/
+    portalUrl: http://xpgj.xiaoxinda.com/jp-car/#
 
   jpsoft:
     appId: wx907e84ad32e6e142

+ 1 - 0
web/src/main/resources/application.yml

@@ -128,6 +128,7 @@ alipay:
 
 wx:
   commonAccessTokenUrl: "http://ykt.xiaoxinda.com/weixin/token"
+  stationRemindTemplateId: "Ilxy2TX264A3RHqRyDZqL_xUDxi9OuBNeJoDOBfMRHg"
   pay:
     appId: wxe598c699aa68cffe
     appSecret: ea20d2e9a36aace26b4f7654218129af

部分文件因为文件数量过多而无法显示