Commit 7413d94f776be1fe4699258f91a0d9f20d6cb5c1

Authored by 徐烜
1 parent cae18a65

Update

Too many changes to show.

To preserve performance only 3 of 10 files are displayed.

src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
... ... @@ -27,6 +27,13 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
27 27 /** 是偶分班 */
28 28 private Boolean isfb;
29 29  
  30 + /** 起点站 */
  31 + private Integer qdz;
  32 + /** 终点站 */
  33 + private Integer zdz;
  34 + /** 停车场 */
  35 + private Integer tcc;
  36 +
30 37 public FcInfo() {
31 38 }
32 39  
... ... @@ -35,7 +42,10 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
35 42 String bc_type,
36 43 String fcsj,
37 44 String xldir,
38   - String isfb) {
  45 + String isfb,
  46 + String qdz,
  47 + String zdz,
  48 + String tcc) {
39 49 this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
40 50 this.bc_type = bc_type;
41 51 this.fcsj = fcsj;
... ... @@ -47,6 +57,16 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
47 57 else
48 58 this.isfb = false;
49 59  
  60 + if (StringUtils.isNotEmpty(qdz) && !"null".equals(qdz)) {
  61 + this.qdz = Integer.valueOf(qdz);
  62 + }
  63 + if (StringUtils.isNotEmpty(zdz) && !"null".equals(zdz)) {
  64 + this.zdz = Integer.valueOf(zdz);
  65 + }
  66 + if (StringUtils.isNotEmpty(tcc) && !"null".equals(tcc)) {
  67 + this.tcc = Integer.valueOf(tcc);
  68 + }
  69 +
50 70 }
51 71  
52 72 public Long getTtdid() {
... ... @@ -88,6 +108,30 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
88 108 public void setIsfb(Boolean isfb) {
89 109 this.isfb = isfb;
90 110 }
  111 +
  112 + public Integer getQdz() {
  113 + return qdz;
  114 + }
  115 +
  116 + public void setQdz(Integer qdz) {
  117 + this.qdz = qdz;
  118 + }
  119 +
  120 + public Integer getZdz() {
  121 + return zdz;
  122 + }
  123 +
  124 + public void setZdz(Integer zdz) {
  125 + this.zdz = zdz;
  126 + }
  127 +
  128 + public Integer getTcc() {
  129 + return tcc;
  130 + }
  131 +
  132 + public void setTcc(Integer tcc) {
  133 + this.tcc = tcc;
  134 + }
91 135 }
92 136  
93 137 /**
... ...
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
... ... @@ -257,7 +257,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
257 257 for (int r = 1; r < sheet.getRows(); r++) {
258 258 List<FcInfo> fcInfos = new ArrayList<>();
259 259 // 每行第一列都是路牌
260   - fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null)); // 用fcsj放置路牌显示
  260 + fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null, null)); // 用fcsj放置路牌显示
261 261  
262 262 int bc_ks = 0; // 空驶班次
263 263 int bc_yy = 0; // 营运班次
... ... @@ -277,7 +277,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
277 277 String xldir = content == null ? "" : content[5]; // 线路上下行
278 278 String isfb = content == null ? "" : content[6]; // 是否分班
279 279  
280   - FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb);
  280 + String qdz = content == null ? "" : content[7]; // 起点站
  281 + String zdz = content == null ? "" : content[8]; // 终点站
  282 + String tcc = content == null ? "" : content[9]; // 停车场
  283 +
  284 + FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdz, zdz, tcc);
281 285  
282 286 if (StringUtils.isNotEmpty(fzdname))
283 287 headarrays[c] = fzdname;
... ... @@ -303,17 +307,17 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
303 307 }
304 308  
305 309 } catch (Exception exp) {
306   - LOGGER.info("{}行,{}数据有问题,数据={},异常message={}", r, c, content_str, exp);
  310 + LOGGER.info("第{}行,第{}列数据有问题,数据={},异常message={}", r, c, content_str, exp.getCause());
307 311 break;
308 312 }
309 313  
310 314 }
311 315  
312 316 // 添加一列 空驶班次/空驶里程,fcsj放置数据
313   - fcInfos.add(new FcInfo(null, null, String.format("%d/%.2f", bc_ks, lc_ks), null, null));
  317 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.2f", bc_ks, lc_ks), null, null, null, null, null));
314 318  
315 319 // 添加一列 营运班次/营运里程,fcsj放置数据
316   - fcInfos.add(new FcInfo(null, null, String.format("%d/%.2f", bc_yy, lc_yy), null, null));
  320 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.2f", bc_yy, lc_yy), null, null, null, null, null));
317 321  
318 322 editInfo.getContents().add(fcInfos);
319 323 }
... ...
src/main/java/com/bsth/service/schedule/rules/strategy/IStrategyImpl.java
... ... @@ -143,7 +143,6 @@ public class IStrategyImpl implements IStrategy {
143 143 // return结果输出
144 144 Map<Date, Multimap<Long, TTInfoDetail>> ttInfoDetailMultimap = new HashMap<>();
145 145  
146   - Map<String, Object> param = new HashMap<>();
147 146 for (DateTime dateTime : outputMultimap.keySet()) {
148 147 Collection<TTInfoResult_output> ttInfoResult_outputs = outputMultimap.get(dateTime);
149 148 // 如果有多个,使用第一个
... ... @@ -154,7 +153,7 @@ public class IStrategyImpl implements IStrategy {
154 153 // 查找时刻表明细
155 154 Multimap<Long, TTInfoDetail> ttinfodetailMap2 = ArrayListMultimap.create();
156 155 for (TTInfoDetail ttInfoDetail : ttInfoDetails) {
157   - if (ttInfoDetail.getTtinfo().getId() == Long.valueOf(ttInfoResult_output.getTtInfoId())) {
  156 + if (ttInfoDetail.getTtinfo().getId().equals(Long.valueOf(ttInfoResult_output.getTtInfoId()))) {
158 157 ttinfodetailMap2.put(ttInfoDetail.getLp().getId(), ttInfoDetail);
159 158 }
160 159 }
... ...