wenhongquan před 1 rokem
rodič
revize
089b203d38

+ 4 - 0
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/system/mapper/TblCarScheduleMapper.java

@@ -4,6 +4,8 @@ import org.dromara.system.domain.TblCarSchedule;
 import org.dromara.system.domain.vo.TblCarScheduleVo;
 import org.dromara.system.domain.vo.TblCarScheduleVo;
 import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
 import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
 
 
+import java.util.List;
+
 /**
 /**
  * 车及人员排班Mapper接口
  * 车及人员排班Mapper接口
  *
  *
@@ -12,4 +14,6 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
  */
  */
 public interface TblCarScheduleMapper extends BaseMapperPlus<TblCarSchedule, TblCarScheduleVo> {
 public interface TblCarScheduleMapper extends BaseMapperPlus<TblCarSchedule, TblCarScheduleVo> {
 
 
+    public List<String> getScheduleDay();
+
 }
 }

+ 3 - 0
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/system/service/impl/TblCarInfoServiceImpl.java

@@ -202,6 +202,9 @@ public class TblCarInfoServiceImpl implements ITblCarInfoService {
                     if(key.contains("ext2")){
                     if(key.contains("ext2")){
                         lqw.apply(StringUtils.format("ext2->'$.{}'='{}'",key.split("\\$")[1],bo.getParams().get(key)));
                         lqw.apply(StringUtils.format("ext2->'$.{}'='{}'",key.split("\\$")[1],bo.getParams().get(key)));
                     }
                     }
+                    if(key.contains("ext2")){
+                        lqw.apply(StringUtils.format("ext2->'$.{}'='{}'",key.split("\\$")[1],bo.getParams().get(key)));
+                    }
                 }
                 }
             }
             }
         }
         }

+ 14 - 4
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/system/service/impl/TblCarScheduleServiceImpl.java

@@ -18,10 +18,7 @@ import org.dromara.system.domain.TblCarSchedule;
 import org.dromara.system.mapper.TblCarScheduleMapper;
 import org.dromara.system.mapper.TblCarScheduleMapper;
 import org.dromara.system.service.ITblCarScheduleService;
 import org.dromara.system.service.ITblCarScheduleService;
 
 
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Collection;
+import java.util.*;
 
 
 /**
 /**
  * 车及人员排班Service业务层处理
  * 车及人员排班Service业务层处理
@@ -48,6 +45,15 @@ public class TblCarScheduleServiceImpl implements ITblCarScheduleService {
      */
      */
     @Override
     @Override
     public TableDataInfo<TblCarScheduleVo> queryPageList(TblCarScheduleBo bo, PageQuery pageQuery) {
     public TableDataInfo<TblCarScheduleVo> queryPageList(TblCarScheduleBo bo, PageQuery pageQuery) {
+        if(bo.getParams()!=null && bo.getParams().get("getallday")!=null){
+           List<String> data =  baseMapper.getScheduleDay();
+           List<TblCarScheduleVo> dr =  data.stream().map(e -> {
+               TblCarScheduleVo tblCarSchedule = new TblCarScheduleVo();
+               tblCarSchedule.setScheduleDate(DateUtils.parseDate(e));
+               return tblCarSchedule;
+           }).toList();
+            return TableDataInfo.build(dr);
+        }
         LambdaQueryWrapper<TblCarSchedule> lqw = buildQueryWrapper(bo);
         LambdaQueryWrapper<TblCarSchedule> lqw = buildQueryWrapper(bo);
         Page<TblCarScheduleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
         Page<TblCarScheduleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
 
 
@@ -58,9 +64,13 @@ public class TblCarScheduleServiceImpl implements ITblCarScheduleService {
             e.setStationInfo(StringUtils.format("{\"currentStation\":\"{}\",\"passStations\":\"{}\"}",stations,stationName));
             e.setStationInfo(StringUtils.format("{\"currentStation\":\"{}\",\"passStations\":\"{}\"}",stations,stationName));
         });
         });
 
 
+
         return TableDataInfo.build(result);
         return TableDataInfo.build(result);
     }
     }
 
 
+
+
+
     /**
     /**
      * 查询车及人员排班列表
      * 查询车及人员排班列表
      */
      */

+ 4 - 0
ruoyi-modules/ruoyi-khy/src/main/resources/mapper/system/TblCarScheduleMapper.xml

@@ -4,4 +4,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.dromara.system.mapper.TblCarScheduleMapper">
 <mapper namespace="org.dromara.system.mapper.TblCarScheduleMapper">
 
 
+    <select id="getScheduleDay" resultType="java.lang.String">
+        select  schedule_date from (select DATE_FORMAT(schedule_date,'%Y-%m-%d') schedule_date from tbl_car_schedule) a GROUP BY a.schedule_date
+    </select>
+
 </mapper>
 </mapper>