Commit ec12d3f3841dd986f039fd3ca19f251f65d75973

Authored by 潘钊
1 parent 1a7a7291

update...

src/main/java/com/bsth/server_rs/schedule/real/ScheduleRealService.java
... ... @@ -14,6 +14,7 @@ import org.slf4j.Logger;
14 14 import org.slf4j.LoggerFactory;
15 15 import org.springframework.beans.factory.annotation.Autowired;
16 16 import org.springframework.stereotype.Component;
  17 +import org.springframework.web.bind.annotation.RequestParam;
17 18  
18 19 import javax.ws.rs.GET;
19 20 import javax.ws.rs.Path;
... ... @@ -137,4 +138,25 @@ public class ScheduleRealService {
137 138 }
138 139 return rs;
139 140 }
  141 +
  142 + /**
  143 + * 读取指定日期线路的redis 数据,计算程序调用
  144 + * @param rq
  145 + * @return
  146 + */
  147 + @GET
  148 + @Path("/pz_vip/readByLine/{rq}")
  149 + public List<ScheduleRealInfo> readByLine(@PathParam("rq") String rq,@RequestParam String lineCode){
  150 + List<ScheduleRealInfo> all = redisService.read(rq, lineCode), rs = new ArrayList<>();
  151 +
  152 + for(ScheduleRealInfo sch : all){
  153 + if(sch.getBcType().equals("in") || sch.getBcType().equals("out") || sch.getBcType().equals("ldks"))
  154 + continue;
  155 +
  156 + //烂班,临加,有子任务的
  157 + if(sch.getStatus()==-1 || sch.isSflj() || (sch.getcTasks()!=null && sch.getcTasks().size() > 0))
  158 + rs.add(sch);
  159 + }
  160 + return rs;
  161 + }
140 162 }
... ...