Commit 24249d24865da418127fbb744a9751ae5beff6ef

Authored by 潘钊
2 parents 6ec10fd9 f9376be6

Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang

Too many changes to show.

To preserve performance only 3 of 14 files are displayed.

src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
@@ -27,6 +27,13 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> { @@ -27,6 +27,13 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
27 /** 是偶分班 */ 27 /** 是偶分班 */
28 private Boolean isfb; 28 private Boolean isfb;
29 29
  30 + /** 起点站 */
  31 + private Integer qdz;
  32 + /** 终点站 */
  33 + private Integer zdz;
  34 + /** 停车场 */
  35 + private Integer tcc;
  36 +
30 public FcInfo() { 37 public FcInfo() {
31 } 38 }
32 39
@@ -35,7 +42,10 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> { @@ -35,7 +42,10 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
35 String bc_type, 42 String bc_type,
36 String fcsj, 43 String fcsj,
37 String xldir, 44 String xldir,
38 - String isfb) { 45 + String isfb,
  46 + String qdz,
  47 + String zdz,
  48 + String tcc) {
39 this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str); 49 this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
40 this.bc_type = bc_type; 50 this.bc_type = bc_type;
41 this.fcsj = fcsj; 51 this.fcsj = fcsj;
@@ -47,6 +57,16 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> { @@ -47,6 +57,16 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
47 else 57 else
48 this.isfb = false; 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 public Long getTtdid() { 72 public Long getTtdid() {
@@ -88,6 +108,30 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> { @@ -88,6 +108,30 @@ public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
88 public void setIsfb(Boolean isfb) { 108 public void setIsfb(Boolean isfb) {
89 this.isfb = isfb; 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,7 +257,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
257 for (int r = 1; r < sheet.getRows(); r++) { 257 for (int r = 1; r < sheet.getRows(); r++) {
258 List<FcInfo> fcInfos = new ArrayList<>(); 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 int bc_ks = 0; // 空驶班次 262 int bc_ks = 0; // 空驶班次
263 int bc_yy = 0; // 营运班次 263 int bc_yy = 0; // 营运班次
@@ -277,7 +277,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -277,7 +277,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
277 String xldir = content == null ? "" : content[5]; // 线路上下行 277 String xldir = content == null ? "" : content[5]; // 线路上下行
278 String isfb = content == null ? "" : content[6]; // 是否分班 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 if (StringUtils.isNotEmpty(fzdname)) 286 if (StringUtils.isNotEmpty(fzdname))
283 headarrays[c] = fzdname; 287 headarrays[c] = fzdname;
@@ -303,17 +307,17 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -303,17 +307,17 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
303 } 307 }
304 308
305 } catch (Exception exp) { 309 } catch (Exception exp) {
306 - LOGGER.info("{}行,{}数据有问题,数据={},异常message={}", r, c, content_str, exp); 310 + LOGGER.info("第{}行,第{}列数据有问题,数据={},异常message={}", r, c, content_str, exp.getCause());
307 break; 311 break;
308 } 312 }
309 313
310 } 314 }
311 315
312 // 添加一列 空驶班次/空驶里程,fcsj放置数据 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 // 添加一列 营运班次/营运里程,fcsj放置数据 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 editInfo.getContents().add(fcInfos); 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,7 +143,6 @@ public class IStrategyImpl implements IStrategy {
143 // return结果输出 143 // return结果输出
144 Map<Date, Multimap<Long, TTInfoDetail>> ttInfoDetailMultimap = new HashMap<>(); 144 Map<Date, Multimap<Long, TTInfoDetail>> ttInfoDetailMultimap = new HashMap<>();
145 145
146 - Map<String, Object> param = new HashMap<>();  
147 for (DateTime dateTime : outputMultimap.keySet()) { 146 for (DateTime dateTime : outputMultimap.keySet()) {
148 Collection<TTInfoResult_output> ttInfoResult_outputs = outputMultimap.get(dateTime); 147 Collection<TTInfoResult_output> ttInfoResult_outputs = outputMultimap.get(dateTime);
149 // 如果有多个,使用第一个 148 // 如果有多个,使用第一个
@@ -154,7 +153,7 @@ public class IStrategyImpl implements IStrategy { @@ -154,7 +153,7 @@ public class IStrategyImpl implements IStrategy {
154 // 查找时刻表明细 153 // 查找时刻表明细
155 Multimap<Long, TTInfoDetail> ttinfodetailMap2 = ArrayListMultimap.create(); 154 Multimap<Long, TTInfoDetail> ttinfodetailMap2 = ArrayListMultimap.create();
156 for (TTInfoDetail ttInfoDetail : ttInfoDetails) { 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 ttinfodetailMap2.put(ttInfoDetail.getLp().getId(), ttInfoDetail); 157 ttinfodetailMap2.put(ttInfoDetail.getLp().getId(), ttInfoDetail);
159 } 158 }
160 } 159 }