Commit 5c7a7e5281dc4136071f19915e74baa2688bd781
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
9 changed files
with
3873 additions
and
3861 deletions
src/main/java/com/bsth/data/summary/entity/FastAndSlow.java
| 1 | -package com.bsth.data.summary.entity; | |
| 2 | - | |
| 3 | -import javax.persistence.Column; | |
| 4 | -import javax.persistence.Entity; | |
| 5 | -import javax.persistence.Id; | |
| 6 | -import javax.persistence.Table; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 快慢误点 | |
| 10 | - * Created by panzhao on 2017/10/24. | |
| 11 | - */ | |
| 12 | -@Entity | |
| 13 | -@Table(name = "z_calc_fast_slow") | |
| 14 | -public class FastAndSlow { | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 班次ID | |
| 18 | - */ | |
| 19 | - @Id | |
| 20 | - @Column(name = "s_id") | |
| 21 | - private Long id; | |
| 22 | - | |
| 23 | - /** | |
| 24 | - * 发车站点 | |
| 25 | - */ | |
| 26 | - private String stationName; | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * 日期 | |
| 30 | - */ | |
| 31 | - @Column(name = "rq") | |
| 32 | - private String rq; | |
| 33 | - | |
| 34 | - /** | |
| 35 | - * 上下行 | |
| 36 | - */ | |
| 37 | - private int upDown; | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * 计发时间 | |
| 41 | - * HH:mm | |
| 42 | - */ | |
| 43 | - private String fcsj; | |
| 44 | - | |
| 45 | - /** | |
| 46 | - * 待发时间 | |
| 47 | - * HH:mm | |
| 48 | - */ | |
| 49 | - private String dfsj; | |
| 50 | - | |
| 51 | - /** | |
| 52 | - * 实际发车时间 | |
| 53 | - * HH:mm | |
| 54 | - */ | |
| 55 | - private String fcsjActual; | |
| 56 | - | |
| 57 | - /** | |
| 58 | - * 计发快误点 | |
| 59 | - */ | |
| 60 | - private int fcsjFast; | |
| 61 | - | |
| 62 | - /** | |
| 63 | - * 计发慢误点 | |
| 64 | - */ | |
| 65 | - private int fcsjSlow; | |
| 66 | - | |
| 67 | - /** | |
| 68 | - * 待发快误点 | |
| 69 | - */ | |
| 70 | - private int dfsjFast; | |
| 71 | - | |
| 72 | - /** | |
| 73 | - * 待发慢误点 | |
| 74 | - */ | |
| 75 | - private int dfsjSlow; | |
| 76 | - | |
| 77 | - /** | |
| 78 | - * 计划终点时间 | |
| 79 | - */ | |
| 80 | - private String zdsj; | |
| 81 | - | |
| 82 | - /** | |
| 83 | - * 待发终点时间 | |
| 84 | - */ | |
| 85 | - private String zdsjDf; | |
| 86 | - | |
| 87 | - /** | |
| 88 | - * 实际终点时间 | |
| 89 | - */ | |
| 90 | - private String zdsjActual; | |
| 91 | - | |
| 92 | - /** | |
| 93 | - * 计发终点快误点 | |
| 94 | - */ | |
| 95 | - private int zdsjFast; | |
| 96 | - | |
| 97 | - /** | |
| 98 | - * 计发终点慢误点 | |
| 99 | - */ | |
| 100 | - private int zdsjSlow; | |
| 101 | - | |
| 102 | - /** | |
| 103 | - * 待发终点快误点 | |
| 104 | - */ | |
| 105 | - private int zdsjDfFast; | |
| 106 | - | |
| 107 | - /** | |
| 108 | - * 待发终点慢误点 | |
| 109 | - */ | |
| 110 | - private int zdsjDfSlow; | |
| 111 | - | |
| 112 | - @Column(name = "line_code") | |
| 113 | - private String lineCode; | |
| 114 | - | |
| 115 | - private Long t; | |
| 116 | - | |
| 117 | - public String getStationName() { | |
| 118 | - return stationName; | |
| 119 | - } | |
| 120 | - | |
| 121 | - public void setStationName(String stationName) { | |
| 122 | - this.stationName = stationName; | |
| 123 | - } | |
| 124 | - | |
| 125 | - public String getRq() { | |
| 126 | - return rq; | |
| 127 | - } | |
| 128 | - | |
| 129 | - public void setRq(String rq) { | |
| 130 | - this.rq = rq; | |
| 131 | - } | |
| 132 | - | |
| 133 | - public int getUpDown() { | |
| 134 | - return upDown; | |
| 135 | - } | |
| 136 | - | |
| 137 | - public void setUpDown(int upDown) { | |
| 138 | - this.upDown = upDown; | |
| 139 | - } | |
| 140 | - | |
| 141 | - public String getFcsj() { | |
| 142 | - return fcsj; | |
| 143 | - } | |
| 144 | - | |
| 145 | - public void setFcsj(String fcsj) { | |
| 146 | - this.fcsj = fcsj; | |
| 147 | - } | |
| 148 | - | |
| 149 | - public String getDfsj() { | |
| 150 | - return dfsj; | |
| 151 | - } | |
| 152 | - | |
| 153 | - public void setDfsj(String dfsj) { | |
| 154 | - this.dfsj = dfsj; | |
| 155 | - } | |
| 156 | - | |
| 157 | - public String getFcsjActual() { | |
| 158 | - return fcsjActual; | |
| 159 | - } | |
| 160 | - | |
| 161 | - public void setFcsjActual(String fcsjActual) { | |
| 162 | - this.fcsjActual = fcsjActual; | |
| 163 | - } | |
| 164 | - | |
| 165 | - public int getFcsjFast() { | |
| 166 | - return fcsjFast; | |
| 167 | - } | |
| 168 | - | |
| 169 | - public void setFcsjFast(int fcsjFast) { | |
| 170 | - this.fcsjFast = fcsjFast; | |
| 171 | - } | |
| 172 | - | |
| 173 | - public int getFcsjSlow() { | |
| 174 | - return fcsjSlow; | |
| 175 | - } | |
| 176 | - | |
| 177 | - public void setFcsjSlow(int fcsjSlow) { | |
| 178 | - this.fcsjSlow = fcsjSlow; | |
| 179 | - } | |
| 180 | - | |
| 181 | - public int getDfsjFast() { | |
| 182 | - return dfsjFast; | |
| 183 | - } | |
| 184 | - | |
| 185 | - public void setDfsjFast(int dfsjFast) { | |
| 186 | - this.dfsjFast = dfsjFast; | |
| 187 | - } | |
| 188 | - | |
| 189 | - public int getDfsjSlow() { | |
| 190 | - return dfsjSlow; | |
| 191 | - } | |
| 192 | - | |
| 193 | - public void setDfsjSlow(int dfsjSlow) { | |
| 194 | - this.dfsjSlow = dfsjSlow; | |
| 195 | - } | |
| 196 | - | |
| 197 | - public String getZdsj() { | |
| 198 | - return zdsj; | |
| 199 | - } | |
| 200 | - | |
| 201 | - public void setZdsj(String zdsj) { | |
| 202 | - this.zdsj = zdsj; | |
| 203 | - } | |
| 204 | - | |
| 205 | - public String getZdsjDf() { | |
| 206 | - return zdsjDf; | |
| 207 | - } | |
| 208 | - | |
| 209 | - public void setZdsjDf(String zdsjDf) { | |
| 210 | - this.zdsjDf = zdsjDf; | |
| 211 | - } | |
| 212 | - | |
| 213 | - public String getZdsjActual() { | |
| 214 | - return zdsjActual; | |
| 215 | - } | |
| 216 | - | |
| 217 | - public void setZdsjActual(String zdsjActual) { | |
| 218 | - this.zdsjActual = zdsjActual; | |
| 219 | - } | |
| 220 | - | |
| 221 | - public int getZdsjFast() { | |
| 222 | - return zdsjFast; | |
| 223 | - } | |
| 224 | - | |
| 225 | - public void setZdsjFast(int zdsjFast) { | |
| 226 | - this.zdsjFast = zdsjFast; | |
| 227 | - } | |
| 228 | - | |
| 229 | - public int getZdsjSlow() { | |
| 230 | - return zdsjSlow; | |
| 231 | - } | |
| 232 | - | |
| 233 | - public void setZdsjSlow(int zdsjSlow) { | |
| 234 | - this.zdsjSlow = zdsjSlow; | |
| 235 | - } | |
| 236 | - | |
| 237 | - public int getZdsjDfFast() { | |
| 238 | - return zdsjDfFast; | |
| 239 | - } | |
| 240 | - | |
| 241 | - public void setZdsjDfFast(int zdsjDfFast) { | |
| 242 | - this.zdsjDfFast = zdsjDfFast; | |
| 243 | - } | |
| 244 | - | |
| 245 | - public int getZdsjDfSlow() { | |
| 246 | - return zdsjDfSlow; | |
| 247 | - } | |
| 248 | - | |
| 249 | - public void setZdsjDfSlow(int zdsjDfSlow) { | |
| 250 | - this.zdsjDfSlow = zdsjDfSlow; | |
| 251 | - } | |
| 252 | - | |
| 253 | - public String getLineCode() { | |
| 254 | - return lineCode; | |
| 255 | - } | |
| 256 | - | |
| 257 | - public void setLineCode(String lineCode) { | |
| 258 | - this.lineCode = lineCode; | |
| 259 | - } | |
| 260 | - | |
| 261 | - public Long getId() { | |
| 262 | - return id; | |
| 263 | - } | |
| 264 | - | |
| 265 | - public void setId(Long id) { | |
| 266 | - this.id = id; | |
| 267 | - } | |
| 268 | - | |
| 269 | - public Long getT() { | |
| 270 | - return t; | |
| 271 | - } | |
| 272 | - | |
| 273 | - public void setT(Long t) { | |
| 274 | - this.t = t; | |
| 275 | - } | |
| 276 | - | |
| 277 | - public boolean isSlow() { | |
| 278 | - return this.fcsjSlow>0 || this.dfsjSlow>0 || this.zdsjSlow>0 || this.zdsjDfSlow>0; | |
| 279 | - } | |
| 280 | - | |
| 281 | - public boolean isFast() { | |
| 282 | - return this.fcsjFast>0 || this.dfsjFast>0 || this.zdsjFast>0 || this.zdsjDfFast>0; | |
| 283 | - } | |
| 1 | +package com.bsth.data.summary.entity; | |
| 2 | + | |
| 3 | +import javax.persistence.Column; | |
| 4 | +import javax.persistence.Entity; | |
| 5 | +import javax.persistence.Id; | |
| 6 | +import javax.persistence.Table; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 快慢误点 | |
| 10 | + * Created by panzhao on 2017/10/24. | |
| 11 | + */ | |
| 12 | +@Entity | |
| 13 | +@Table(name = "z_calc_fast_slow") | |
| 14 | +public class FastAndSlow { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 班次ID | |
| 18 | + */ | |
| 19 | + @Id | |
| 20 | + @Column(name = "s_id") | |
| 21 | + private Long id; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 发车站点 | |
| 25 | + */ | |
| 26 | + private String stationName; | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 日期 | |
| 30 | + */ | |
| 31 | + @Column(name = "rq") | |
| 32 | + private String rq; | |
| 33 | + | |
| 34 | + /** | |
| 35 | + * 上下行 | |
| 36 | + */ | |
| 37 | + private int upDown; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 计发时间 | |
| 41 | + * HH:mm | |
| 42 | + */ | |
| 43 | + private String fcsj; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 待发时间 | |
| 47 | + * HH:mm | |
| 48 | + */ | |
| 49 | + private String dfsj; | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 实际发车时间 | |
| 53 | + * HH:mm | |
| 54 | + */ | |
| 55 | + private String fcsjActual; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 计发快误点 | |
| 59 | + */ | |
| 60 | + private int fcsjFast; | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 计发慢误点 | |
| 64 | + */ | |
| 65 | + private int fcsjSlow; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 待发快误点 | |
| 69 | + */ | |
| 70 | + private int dfsjFast; | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * 待发慢误点 | |
| 74 | + */ | |
| 75 | + private int dfsjSlow; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 计划终点时间 | |
| 79 | + */ | |
| 80 | + private String zdsj; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * 待发终点时间 | |
| 84 | + */ | |
| 85 | + private String zdsjDf; | |
| 86 | + | |
| 87 | + /** | |
| 88 | + * 实际终点时间 | |
| 89 | + */ | |
| 90 | + private String zdsjActual; | |
| 91 | + | |
| 92 | + /** | |
| 93 | + * 计发终点快误点 | |
| 94 | + */ | |
| 95 | + private int zdsjFast; | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 计发终点慢误点 | |
| 99 | + */ | |
| 100 | + private int zdsjSlow; | |
| 101 | + | |
| 102 | + /** | |
| 103 | + * 待发终点快误点 | |
| 104 | + */ | |
| 105 | + private int zdsjDfFast; | |
| 106 | + | |
| 107 | + /** | |
| 108 | + * 待发终点慢误点 | |
| 109 | + */ | |
| 110 | + private int zdsjDfSlow; | |
| 111 | + | |
| 112 | + @Column(name = "line_code") | |
| 113 | + private String lineCode; | |
| 114 | + | |
| 115 | + private Long t; | |
| 116 | + | |
| 117 | + public String getStationName() { | |
| 118 | + return stationName; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public void setStationName(String stationName) { | |
| 122 | + this.stationName = stationName; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public String getRq() { | |
| 126 | + return rq; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public void setRq(String rq) { | |
| 130 | + this.rq = rq; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public int getUpDown() { | |
| 134 | + return upDown; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public void setUpDown(int upDown) { | |
| 138 | + this.upDown = upDown; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public String getFcsj() { | |
| 142 | + return fcsj; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public void setFcsj(String fcsj) { | |
| 146 | + this.fcsj = fcsj; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public String getDfsj() { | |
| 150 | + return dfsj; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public void setDfsj(String dfsj) { | |
| 154 | + this.dfsj = dfsj; | |
| 155 | + } | |
| 156 | + | |
| 157 | + public String getFcsjActual() { | |
| 158 | + return fcsjActual; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public void setFcsjActual(String fcsjActual) { | |
| 162 | + this.fcsjActual = fcsjActual; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public int getFcsjFast() { | |
| 166 | + return fcsjFast; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public void setFcsjFast(int fcsjFast) { | |
| 170 | + this.fcsjFast = fcsjFast; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public int getFcsjSlow() { | |
| 174 | + return fcsjSlow; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public void setFcsjSlow(int fcsjSlow) { | |
| 178 | + this.fcsjSlow = fcsjSlow; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public int getDfsjFast() { | |
| 182 | + return dfsjFast; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public void setDfsjFast(int dfsjFast) { | |
| 186 | + this.dfsjFast = dfsjFast; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public int getDfsjSlow() { | |
| 190 | + return dfsjSlow; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public void setDfsjSlow(int dfsjSlow) { | |
| 194 | + this.dfsjSlow = dfsjSlow; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public String getZdsj() { | |
| 198 | + return zdsj; | |
| 199 | + } | |
| 200 | + | |
| 201 | + public void setZdsj(String zdsj) { | |
| 202 | + this.zdsj = zdsj; | |
| 203 | + } | |
| 204 | + | |
| 205 | + public String getZdsjDf() { | |
| 206 | + return zdsjDf; | |
| 207 | + } | |
| 208 | + | |
| 209 | + public void setZdsjDf(String zdsjDf) { | |
| 210 | + this.zdsjDf = zdsjDf; | |
| 211 | + } | |
| 212 | + | |
| 213 | + public String getZdsjActual() { | |
| 214 | + return zdsjActual; | |
| 215 | + } | |
| 216 | + | |
| 217 | + public void setZdsjActual(String zdsjActual) { | |
| 218 | + this.zdsjActual = zdsjActual; | |
| 219 | + } | |
| 220 | + | |
| 221 | + public int getZdsjFast() { | |
| 222 | + return zdsjFast; | |
| 223 | + } | |
| 224 | + | |
| 225 | + public void setZdsjFast(int zdsjFast) { | |
| 226 | + this.zdsjFast = zdsjFast; | |
| 227 | + } | |
| 228 | + | |
| 229 | + public int getZdsjSlow() { | |
| 230 | + return zdsjSlow; | |
| 231 | + } | |
| 232 | + | |
| 233 | + public void setZdsjSlow(int zdsjSlow) { | |
| 234 | + this.zdsjSlow = zdsjSlow; | |
| 235 | + } | |
| 236 | + | |
| 237 | + public int getZdsjDfFast() { | |
| 238 | + return zdsjDfFast; | |
| 239 | + } | |
| 240 | + | |
| 241 | + public void setZdsjDfFast(int zdsjDfFast) { | |
| 242 | + this.zdsjDfFast = zdsjDfFast; | |
| 243 | + } | |
| 244 | + | |
| 245 | + public int getZdsjDfSlow() { | |
| 246 | + return zdsjDfSlow; | |
| 247 | + } | |
| 248 | + | |
| 249 | + public void setZdsjDfSlow(int zdsjDfSlow) { | |
| 250 | + this.zdsjDfSlow = zdsjDfSlow; | |
| 251 | + } | |
| 252 | + | |
| 253 | + public String getLineCode() { | |
| 254 | + return lineCode; | |
| 255 | + } | |
| 256 | + | |
| 257 | + public void setLineCode(String lineCode) { | |
| 258 | + this.lineCode = lineCode; | |
| 259 | + } | |
| 260 | + | |
| 261 | + public Long getId() { | |
| 262 | + return id; | |
| 263 | + } | |
| 264 | + | |
| 265 | + public void setId(Long id) { | |
| 266 | + this.id = id; | |
| 267 | + } | |
| 268 | + | |
| 269 | + public Long getT() { | |
| 270 | + return t; | |
| 271 | + } | |
| 272 | + | |
| 273 | + public void setT(Long t) { | |
| 274 | + this.t = t; | |
| 275 | + } | |
| 276 | + | |
| 277 | + public boolean isSlow() { | |
| 278 | + return this.fcsjSlow>0 || this.dfsjSlow>0 || this.zdsjSlow>0 || this.zdsjDfSlow>0; | |
| 279 | + } | |
| 280 | + | |
| 281 | + public boolean isFast() { | |
| 282 | + return this.fcsjFast>0 || this.dfsjFast>0 || this.zdsjFast>0 || this.zdsjDfFast>0; | |
| 283 | + } | |
| 284 | 284 | } |
| 285 | 285 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/data/summary/service/impl/FastAndSlowServiceImpl.java
| 1 | -package com.bsth.data.summary.service.impl; | |
| 2 | - | |
| 3 | -import com.bsth.data.BasicData; | |
| 4 | -import com.bsth.data.summary.entity.FastAndSlow; | |
| 5 | -import com.bsth.data.summary.service.FastAndSlowService; | |
| 6 | -import com.bsth.data.utils.ConvertUtil; | |
| 7 | -import com.bsth.service.impl.BaseServiceImpl; | |
| 8 | -import com.google.common.collect.ArrayListMultimap; | |
| 9 | -import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 10 | -import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |
| 11 | -import org.apache.poi.ss.usermodel.Row; | |
| 12 | -import org.apache.poi.ss.usermodel.Sheet; | |
| 13 | -import org.apache.poi.ss.util.CellRangeAddress; | |
| 14 | -import org.joda.time.format.DateTimeFormat; | |
| 15 | -import org.joda.time.format.DateTimeFormatter; | |
| 16 | -import org.slf4j.Logger; | |
| 17 | -import org.slf4j.LoggerFactory; | |
| 18 | -import org.springframework.stereotype.Service; | |
| 19 | - | |
| 20 | -import javax.servlet.http.HttpServletRequest; | |
| 21 | -import javax.servlet.http.HttpServletResponse; | |
| 22 | -import java.io.FileInputStream; | |
| 23 | -import java.io.OutputStream; | |
| 24 | -import java.net.URLEncoder; | |
| 25 | -import java.text.ParseException; | |
| 26 | -import java.text.SimpleDateFormat; | |
| 27 | -import java.util.*; | |
| 28 | - | |
| 29 | -/** | |
| 30 | - * Created by panzhao on 2017/10/24. | |
| 31 | - */ | |
| 32 | -@Service | |
| 33 | -public class FastAndSlowServiceImpl extends BaseServiceImpl<FastAndSlow, Long> implements FastAndSlowService { | |
| 34 | - | |
| 35 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 36 | - | |
| 37 | - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | |
| 38 | - | |
| 39 | - @Override | |
| 40 | - public Iterable<FastAndSlow> list(Map<String, Object> map) { | |
| 41 | - try { | |
| 42 | - //最多5天 | |
| 43 | - map.put("rq_le", maxEndTime(map.get("rq_ge").toString() | |
| 44 | - , map.get("rq_le").toString(), 4)); | |
| 45 | - | |
| 46 | - List<FastAndSlow> list = (List) super.list(map); | |
| 47 | - String type = String.valueOf(map.get("type")); | |
| 48 | - | |
| 49 | - return filterByType(list, type); | |
| 50 | - } catch (Exception e) { | |
| 51 | - logger.error("", e); | |
| 52 | - } | |
| 53 | - return null; | |
| 54 | - } | |
| 55 | - | |
| 56 | - @Override | |
| 57 | - public void excel(String lineCode, String st, String et, int type, HttpServletRequest request, HttpServletResponse response) { | |
| 58 | - try { | |
| 59 | - Map<String, Object> params = new HashMap(); | |
| 60 | - //最多31天 | |
| 61 | - et = maxEndTime(st, et, 31); | |
| 62 | - params.put("rq_ge", st); | |
| 63 | - params.put("rq_le", et); | |
| 64 | - params.put("lineCode_eq", lineCode); | |
| 65 | - List<FastAndSlow> list = filterByType((List) super.list(params), type + ""); | |
| 66 | - | |
| 67 | - if(list.size() == 0){ | |
| 68 | - response.setHeader("Content-type", "text/html;charset=UTF-8"); | |
| 69 | - response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); | |
| 70 | - return ; | |
| 71 | - } | |
| 72 | - //排序 | |
| 73 | - Collections.sort(list, new Comparator<FastAndSlow>() { | |
| 74 | - @Override | |
| 75 | - public int compare(FastAndSlow fas1, FastAndSlow fas2) { | |
| 76 | - return (int) (fas1.getT() - fas2.getT()); | |
| 77 | - } | |
| 78 | - }); | |
| 79 | - //按日期分组 | |
| 80 | - ArrayListMultimap<String, FastAndSlow> multimap = | |
| 81 | - new ConvertUtil<FastAndSlow>().groupMultiList(list, "_", FastAndSlow.class.getDeclaredField("rq")); | |
| 82 | - //输出excel | |
| 83 | - String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); | |
| 84 | - String filePath = basePath + "/static/pages/summary/excel/快慢误点报表.xls"; | |
| 85 | - POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath)); | |
| 86 | - HSSFWorkbook wb = new HSSFWorkbook(fs); | |
| 87 | - | |
| 88 | - //写入数据 | |
| 89 | - List<String> ks = new ArrayList<>(multimap.keySet()); | |
| 90 | - Collections.sort(ks); | |
| 91 | - for(int i = 0; i < ks.size(); i++){ | |
| 92 | - Sheet sheet = wb.getSheetAt(i); | |
| 93 | - writeData(sheet, multimap.get(ks.get(i))); | |
| 94 | - //sheet name | |
| 95 | - wb.setSheetName(i, ks.get(i)); | |
| 96 | - } | |
| 97 | - //删除多余的sheet | |
| 98 | - for(int i = ks.size(); i <32; i++){ | |
| 99 | - wb.removeSheetAt(ks.size()); | |
| 100 | - } | |
| 101 | - | |
| 102 | - //response 输出 | |
| 103 | - String filename = BasicData.lineCode2NameMap.get(lineCode) + st + "至" + et + "快慢误点明细.xls"; | |
| 104 | - response.setContentType("application/x-msdownload"); | |
| 105 | - response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | |
| 106 | - | |
| 107 | - OutputStream os = response.getOutputStream(); | |
| 108 | - wb.write(os); | |
| 109 | - os.flush(); | |
| 110 | - os.close(); | |
| 111 | - } catch (Exception e) { | |
| 112 | - logger.error("", e); | |
| 113 | - } | |
| 114 | - } | |
| 115 | - | |
| 116 | - private void writeData(Sheet sheet, List<FastAndSlow> list) { | |
| 117 | - List<FastAndSlow> ups = new ArrayList<>() | |
| 118 | - ,downs = new ArrayList<>(); | |
| 119 | - //前4行是表头 | |
| 120 | - Row row; | |
| 121 | - row = sheet.getRow(0); | |
| 122 | - row.getCell(4).setCellValue(list.get(0).getRq()); | |
| 123 | - row.getCell(13).setCellValue(BasicData.lineCode2NameMap.get(list.get(0).getLineCode())); | |
| 124 | - FastAndSlow fas; | |
| 125 | - for(int i = 0; i < list.size(); i++){ | |
| 126 | - fas = list.get(i); | |
| 127 | - row = sheet.createRow(i + 4); | |
| 128 | - row.createCell(0).setCellValue(i + 1); | |
| 129 | - row.createCell(1).setCellValue(fas.getStationName()); | |
| 130 | - row.createCell(2).setCellValue(fas.getUpDown()); | |
| 131 | - row.createCell(3).setCellValue(fas.getFcsj()); | |
| 132 | - row.createCell(4).setCellValue(fas.getDfsj()); | |
| 133 | - row.createCell(5).setCellValue(fas.getFcsjActual()); | |
| 134 | - row.createCell(6).setCellValue(fas.getFcsjFast()); | |
| 135 | - row.createCell(7).setCellValue(fas.getFcsjSlow()); | |
| 136 | - row.createCell(8).setCellValue(fas.getDfsjFast()); | |
| 137 | - row.createCell(9).setCellValue(fas.getDfsjSlow()); | |
| 138 | - row.createCell(10).setCellValue(fas.getZdsj()); | |
| 139 | - row.createCell(11).setCellValue(fas.getZdsjDf()); | |
| 140 | - row.createCell(12).setCellValue(fas.getZdsjActual()); | |
| 141 | - row.createCell(13).setCellValue(fas.getZdsjFast()); | |
| 142 | - row.createCell(14).setCellValue(fas.getZdsjSlow()); | |
| 143 | - row.createCell(15).setCellValue(fas.getZdsjDfFast()); | |
| 144 | - row.createCell(16).setCellValue(fas.getZdsjDfSlow()); | |
| 145 | - | |
| 146 | - if(fas.getUpDown()==0) | |
| 147 | - ups.add(fas); | |
| 148 | - else | |
| 149 | - downs.add(fas); | |
| 150 | - } | |
| 151 | - //合计 | |
| 152 | - int size = list.size(); | |
| 153 | - row = sheet.createRow(size + 4); | |
| 154 | - row.createCell(1).setCellValue("发车:上行(计划快误点:"+jhfcFast(ups)+" 累计时间:"+jhfcFastTime(ups)+" 待发快误点:"+dffcFast(ups)+" 累计时间:"+dffcFastTime(ups)+") "); | |
| 155 | - row.createCell(9).setCellValue("下行(计划快误点:"+jhfcFast(downs)+" 累计时间:"+jhfcFastTime(downs)+" 待发快误点:"+dffcFast(downs)+" 累计时间:"+dffcFastTime(downs)+")"); | |
| 156 | - row = sheet.createRow(size + 5); | |
| 157 | - row.createCell(1).setCellValue("发车:上行(计划慢误点:"+jhfcSlow(ups)+" 累计时间:"+jhfcSlowTime(ups)+" 待发慢误点:"+dffcSlow(ups)+" 累计时间:"+dffcSlowTime(ups)+") "); | |
| 158 | - row.createCell(9).setCellValue("下行(计划慢误点:"+jhfcSlow(downs)+" 累计时间:"+jhfcSlowTime(downs)+" 待发慢误点:"+dffcSlow(downs)+" 累计时间:"+dffcSlowTime(downs)+")"); | |
| 159 | - row = sheet.createRow(size + 6); | |
| 160 | - row.createCell(1).setCellValue("到达:上行(计划快误点:"+jhzdFast(ups)+" 累计时间:"+jhzdFastTime(ups)+" 待发快误点:"+dfzdFast(ups)+" 累计时间:"+dfzdFastTime(ups)+") "); | |
| 161 | - row.createCell(9).setCellValue("下行(计划快误点:"+jhzdFast(downs)+" 累计时间:"+jhzdFastTime(downs)+" 待发快误点:"+dfzdFast(downs)+" 累计时间:"+dfzdFastTime(downs)+")"); | |
| 162 | - row = sheet.createRow(size + 7); | |
| 163 | - row.createCell(1).setCellValue("到达:上行(计划慢误点:"+jhzdSlow(ups)+" 累计时间:"+jhzdSlowTime(ups)+" 待发慢误点:"+dfzdSlow(ups)+" 累计时间:"+dfzdSlowTime(ups)+") "); | |
| 164 | - row.createCell(9).setCellValue("下行(计划慢误点:"+jhzdSlow(downs)+" 累计时间:"+jhzdSlowTime(downs)+" 待发慢误点:"+dfzdSlow(downs)+" 累计时间:"+dfzdSlowTime(downs)+")"); | |
| 165 | - //合并单元格 | |
| 166 | - sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 1, 8)); | |
| 167 | - sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 9, 16)); | |
| 168 | - sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 1, 8)); | |
| 169 | - sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 9, 16)); | |
| 170 | - sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 1, 8)); | |
| 171 | - sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 9, 16)); | |
| 172 | - sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7, 1, 8)); | |
| 173 | - sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7, 9, 16)); | |
| 174 | - | |
| 175 | - sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 7, 0, 0)); | |
| 176 | - } | |
| 177 | - | |
| 178 | - private List<FastAndSlow> filterByType(List<FastAndSlow> all, String type) { | |
| 179 | - List rsList = new ArrayList(); | |
| 180 | - if ("-1".equals(type)) {//慢误 | |
| 181 | - for (FastAndSlow fas : all) { | |
| 182 | - if (fas.isSlow()) | |
| 183 | - rsList.add(fas); | |
| 184 | - } | |
| 185 | - return rsList; | |
| 186 | - } else if ("1".equals(type)) {//快误 | |
| 187 | - for (FastAndSlow fas : all) { | |
| 188 | - if (fas.isFast()) | |
| 189 | - rsList.add(fas); | |
| 190 | - } | |
| 191 | - return rsList; | |
| 192 | - } | |
| 193 | - return all; | |
| 194 | - } | |
| 195 | - | |
| 196 | - | |
| 197 | - private String maxEndTime(String sStr, String eStr, int space) throws ParseException { | |
| 198 | - try { | |
| 199 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 200 | - long st = sdf.parse(sStr).getTime(); | |
| 201 | - long et = sdf.parse(eStr).getTime(); | |
| 202 | - long dayTime = 24 * 60 * 60 * 1000; | |
| 203 | - long spaceTime = dayTime * space; | |
| 204 | - | |
| 205 | - if (et - st > spaceTime) { | |
| 206 | - eStr = sdf.format(new Date(st + spaceTime)); | |
| 207 | - } | |
| 208 | - } catch (Exception e) { | |
| 209 | - throw e; | |
| 210 | - } | |
| 211 | - return eStr; | |
| 212 | - } | |
| 213 | - | |
| 214 | - /** | |
| 215 | - * 计划发出快误点 | |
| 216 | - * @param list | |
| 217 | - * @return | |
| 218 | - */ | |
| 219 | - private int jhfcFast(List<FastAndSlow> list){ | |
| 220 | - int count=0; | |
| 221 | - for(FastAndSlow fas : list){ | |
| 222 | - if(fas.getFcsjFast() > 0) | |
| 223 | - count++; | |
| 224 | - } | |
| 225 | - return count; | |
| 226 | - } | |
| 227 | - | |
| 228 | - /** | |
| 229 | - * 计划终点快误点 | |
| 230 | - * @param list | |
| 231 | - * @return | |
| 232 | - */ | |
| 233 | - private int jhzdFast(List<FastAndSlow> list){ | |
| 234 | - int count=0; | |
| 235 | - for(FastAndSlow fas : list){ | |
| 236 | - if(fas.getZdsjFast() > 0) | |
| 237 | - count++; | |
| 238 | - } | |
| 239 | - return count; | |
| 240 | - } | |
| 241 | - | |
| 242 | - /** | |
| 243 | - * 待发发出快误点 | |
| 244 | - * @param list | |
| 245 | - * @return | |
| 246 | - */ | |
| 247 | - private int dffcFast(List<FastAndSlow> list){ | |
| 248 | - int count=0; | |
| 249 | - for(FastAndSlow fas : list){ | |
| 250 | - if(fas.getDfsjFast() > 0) | |
| 251 | - count++; | |
| 252 | - } | |
| 253 | - return count; | |
| 254 | - } | |
| 255 | - | |
| 256 | - /** | |
| 257 | - * 待发终点快误点 | |
| 258 | - * @param list | |
| 259 | - * @return | |
| 260 | - */ | |
| 261 | - private int dfzdFast(List<FastAndSlow> list){ | |
| 262 | - int count=0; | |
| 263 | - for(FastAndSlow fas : list){ | |
| 264 | - if(fas.getZdsjDfFast() > 0) | |
| 265 | - count++; | |
| 266 | - } | |
| 267 | - return count; | |
| 268 | - } | |
| 269 | - | |
| 270 | - //---------- | |
| 271 | - | |
| 272 | - /** | |
| 273 | - * 计划发出慢误点 | |
| 274 | - * @param list | |
| 275 | - * @return | |
| 276 | - */ | |
| 277 | - private int jhfcSlow(List<FastAndSlow> list){ | |
| 278 | - int count=0; | |
| 279 | - for(FastAndSlow fas : list){ | |
| 280 | - if(fas.getFcsjSlow() > 0) | |
| 281 | - count++; | |
| 282 | - } | |
| 283 | - return count; | |
| 284 | - } | |
| 285 | - | |
| 286 | - /** | |
| 287 | - * 计划终点慢误点 | |
| 288 | - * @param list | |
| 289 | - * @return | |
| 290 | - */ | |
| 291 | - private int jhzdSlow(List<FastAndSlow> list){ | |
| 292 | - int count=0; | |
| 293 | - for(FastAndSlow fas : list){ | |
| 294 | - if(fas.getZdsjSlow() > 0) | |
| 295 | - count++; | |
| 296 | - } | |
| 297 | - return count; | |
| 298 | - } | |
| 299 | - | |
| 300 | - /** | |
| 301 | - * 待发发出慢误点 | |
| 302 | - * @param list | |
| 303 | - * @return | |
| 304 | - */ | |
| 305 | - private int dffcSlow(List<FastAndSlow> list){ | |
| 306 | - int count=0; | |
| 307 | - for(FastAndSlow fas : list){ | |
| 308 | - if(fas.getDfsjSlow() > 0) | |
| 309 | - count++; | |
| 310 | - } | |
| 311 | - return count; | |
| 312 | - } | |
| 313 | - | |
| 314 | - /** | |
| 315 | - * 待发终点慢误点 | |
| 316 | - * @param list | |
| 317 | - * @return | |
| 318 | - */ | |
| 319 | - private int dfzdSlow(List<FastAndSlow> list){ | |
| 320 | - int count=0; | |
| 321 | - for(FastAndSlow fas : list){ | |
| 322 | - if(fas.getZdsjDfSlow() > 0) | |
| 323 | - count++; | |
| 324 | - } | |
| 325 | - return count; | |
| 326 | - } | |
| 327 | - /** | |
| 328 | - * ################ | |
| 329 | - */ | |
| 330 | - /** | |
| 331 | - * 计划发出快误点 | |
| 332 | - * @param list | |
| 333 | - * @return | |
| 334 | - */ | |
| 335 | - private int jhfcFastTime(List<FastAndSlow> list){ | |
| 336 | - int sum=0; | |
| 337 | - for(FastAndSlow fas : list){ | |
| 338 | - sum+=fas.getFcsjFast(); | |
| 339 | - } | |
| 340 | - return sum; | |
| 341 | - } | |
| 342 | - | |
| 343 | - /** | |
| 344 | - * 计划终点快误点 | |
| 345 | - * @param list | |
| 346 | - * @return | |
| 347 | - */ | |
| 348 | - private int jhzdFastTime(List<FastAndSlow> list){ | |
| 349 | - int sum=0; | |
| 350 | - for(FastAndSlow fas : list){ | |
| 351 | - sum+=fas.getZdsjFast(); | |
| 352 | - } | |
| 353 | - return sum; | |
| 354 | - } | |
| 355 | - | |
| 356 | - /** | |
| 357 | - * 待发发出快误点 | |
| 358 | - * @param list | |
| 359 | - * @return | |
| 360 | - */ | |
| 361 | - private int dffcFastTime(List<FastAndSlow> list){ | |
| 362 | - int sum=0; | |
| 363 | - for(FastAndSlow fas : list){ | |
| 364 | - sum+=fas.getDfsjFast(); | |
| 365 | - } | |
| 366 | - return sum; | |
| 367 | - } | |
| 368 | - | |
| 369 | - /** | |
| 370 | - * 待发终点快误点 | |
| 371 | - * @param list | |
| 372 | - * @return | |
| 373 | - */ | |
| 374 | - private int dfzdFastTime(List<FastAndSlow> list){ | |
| 375 | - int sum=0; | |
| 376 | - for(FastAndSlow fas : list){ | |
| 377 | - sum+=fas.getZdsjDfFast(); | |
| 378 | - } | |
| 379 | - return sum; | |
| 380 | - } | |
| 381 | - | |
| 382 | - //---------- | |
| 383 | - | |
| 384 | - /** | |
| 385 | - * 计划发出慢误点 | |
| 386 | - * @param list | |
| 387 | - * @return | |
| 388 | - */ | |
| 389 | - private int jhfcSlowTime(List<FastAndSlow> list){ | |
| 390 | - int sum=0; | |
| 391 | - for(FastAndSlow fas : list){ | |
| 392 | - sum+=fas.getFcsjSlow(); | |
| 393 | - } | |
| 394 | - return sum; | |
| 395 | - } | |
| 396 | - | |
| 397 | - /** | |
| 398 | - * 计划终点慢误点 | |
| 399 | - * @param list | |
| 400 | - * @return | |
| 401 | - */ | |
| 402 | - private int jhzdSlowTime(List<FastAndSlow> list){ | |
| 403 | - int sum=0; | |
| 404 | - for(FastAndSlow fas : list){ | |
| 405 | - sum+=fas.getZdsjSlow(); | |
| 406 | - } | |
| 407 | - return sum; | |
| 408 | - } | |
| 409 | - | |
| 410 | - /** | |
| 411 | - * 待发发出慢误点 | |
| 412 | - * @param list | |
| 413 | - * @return | |
| 414 | - */ | |
| 415 | - private int dffcSlowTime(List<FastAndSlow> list){ | |
| 416 | - int sum=0; | |
| 417 | - for(FastAndSlow fas : list){ | |
| 418 | - sum+=fas.getDfsjSlow(); | |
| 419 | - } | |
| 420 | - return sum; | |
| 421 | - } | |
| 422 | - | |
| 423 | - /** | |
| 424 | - * 待发终点慢误点 | |
| 425 | - * @param list | |
| 426 | - * @return | |
| 427 | - */ | |
| 428 | - private int dfzdSlowTime(List<FastAndSlow> list){ | |
| 429 | - int sum=0; | |
| 430 | - for(FastAndSlow fas : list){ | |
| 431 | - sum+=fas.getZdsjDfSlow(); | |
| 432 | - } | |
| 433 | - return sum; | |
| 434 | - } | |
| 1 | +package com.bsth.data.summary.service.impl; | |
| 2 | + | |
| 3 | +import com.bsth.data.BasicData; | |
| 4 | +import com.bsth.data.summary.entity.FastAndSlow; | |
| 5 | +import com.bsth.data.summary.service.FastAndSlowService; | |
| 6 | +import com.bsth.data.utils.ConvertUtil; | |
| 7 | +import com.bsth.service.impl.BaseServiceImpl; | |
| 8 | +import com.google.common.collect.ArrayListMultimap; | |
| 9 | +import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |
| 10 | +import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |
| 11 | +import org.apache.poi.ss.usermodel.Row; | |
| 12 | +import org.apache.poi.ss.usermodel.Sheet; | |
| 13 | +import org.apache.poi.ss.util.CellRangeAddress; | |
| 14 | +import org.joda.time.format.DateTimeFormat; | |
| 15 | +import org.joda.time.format.DateTimeFormatter; | |
| 16 | +import org.slf4j.Logger; | |
| 17 | +import org.slf4j.LoggerFactory; | |
| 18 | +import org.springframework.stereotype.Service; | |
| 19 | + | |
| 20 | +import javax.servlet.http.HttpServletRequest; | |
| 21 | +import javax.servlet.http.HttpServletResponse; | |
| 22 | +import java.io.FileInputStream; | |
| 23 | +import java.io.OutputStream; | |
| 24 | +import java.net.URLEncoder; | |
| 25 | +import java.text.ParseException; | |
| 26 | +import java.text.SimpleDateFormat; | |
| 27 | +import java.util.*; | |
| 28 | + | |
| 29 | +/** | |
| 30 | + * Created by panzhao on 2017/10/24. | |
| 31 | + */ | |
| 32 | +@Service | |
| 33 | +public class FastAndSlowServiceImpl extends BaseServiceImpl<FastAndSlow, Long> implements FastAndSlowService { | |
| 34 | + | |
| 35 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 36 | + | |
| 37 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public Iterable<FastAndSlow> list(Map<String, Object> map) { | |
| 41 | + try { | |
| 42 | + //最多5天 | |
| 43 | + map.put("rq_le", maxEndTime(map.get("rq_ge").toString() | |
| 44 | + , map.get("rq_le").toString(), 4)); | |
| 45 | + | |
| 46 | + List<FastAndSlow> list = (List) super.list(map); | |
| 47 | + String type = String.valueOf(map.get("type")); | |
| 48 | + | |
| 49 | + return filterByType(list, type); | |
| 50 | + } catch (Exception e) { | |
| 51 | + logger.error("", e); | |
| 52 | + } | |
| 53 | + return null; | |
| 54 | + } | |
| 55 | + | |
| 56 | + @Override | |
| 57 | + public void excel(String lineCode, String st, String et, int type, HttpServletRequest request, HttpServletResponse response) { | |
| 58 | + try { | |
| 59 | + Map<String, Object> params = new HashMap(); | |
| 60 | + //最多31天 | |
| 61 | + et = maxEndTime(st, et, 31); | |
| 62 | + params.put("rq_ge", st); | |
| 63 | + params.put("rq_le", et); | |
| 64 | + params.put("lineCode_eq", lineCode); | |
| 65 | + List<FastAndSlow> list = filterByType((List) super.list(params), type + ""); | |
| 66 | + | |
| 67 | + if(list.size() == 0){ | |
| 68 | + response.setHeader("Content-type", "text/html;charset=UTF-8"); | |
| 69 | + response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); | |
| 70 | + return ; | |
| 71 | + } | |
| 72 | + //排序 | |
| 73 | + Collections.sort(list, new Comparator<FastAndSlow>() { | |
| 74 | + @Override | |
| 75 | + public int compare(FastAndSlow fas1, FastAndSlow fas2) { | |
| 76 | + return (int) (fas1.getT() - fas2.getT()); | |
| 77 | + } | |
| 78 | + }); | |
| 79 | + //按日期分组 | |
| 80 | + ArrayListMultimap<String, FastAndSlow> multimap = | |
| 81 | + new ConvertUtil<FastAndSlow>().groupMultiList(list, "_", FastAndSlow.class.getDeclaredField("rq")); | |
| 82 | + //输出excel | |
| 83 | + String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); | |
| 84 | + String filePath = basePath + "/static/pages/summary/excel/快慢误点报表.xls"; | |
| 85 | + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath)); | |
| 86 | + HSSFWorkbook wb = new HSSFWorkbook(fs); | |
| 87 | + | |
| 88 | + //写入数据 | |
| 89 | + List<String> ks = new ArrayList<>(multimap.keySet()); | |
| 90 | + Collections.sort(ks); | |
| 91 | + for(int i = 0; i < ks.size(); i++){ | |
| 92 | + Sheet sheet = wb.getSheetAt(i); | |
| 93 | + writeData(sheet, multimap.get(ks.get(i))); | |
| 94 | + //sheet name | |
| 95 | + wb.setSheetName(i, ks.get(i)); | |
| 96 | + } | |
| 97 | + //删除多余的sheet | |
| 98 | + for(int i = ks.size(); i <32; i++){ | |
| 99 | + wb.removeSheetAt(ks.size()); | |
| 100 | + } | |
| 101 | + | |
| 102 | + //response 输出 | |
| 103 | + String filename = BasicData.lineCode2NameMap.get(lineCode) + st + "至" + et + "快慢误点明细.xls"; | |
| 104 | + response.setContentType("application/x-msdownload"); | |
| 105 | + response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | |
| 106 | + | |
| 107 | + OutputStream os = response.getOutputStream(); | |
| 108 | + wb.write(os); | |
| 109 | + os.flush(); | |
| 110 | + os.close(); | |
| 111 | + } catch (Exception e) { | |
| 112 | + logger.error("", e); | |
| 113 | + } | |
| 114 | + } | |
| 115 | + | |
| 116 | + private void writeData(Sheet sheet, List<FastAndSlow> list) { | |
| 117 | + List<FastAndSlow> ups = new ArrayList<>() | |
| 118 | + ,downs = new ArrayList<>(); | |
| 119 | + //前4行是表头 | |
| 120 | + Row row; | |
| 121 | + row = sheet.getRow(0); | |
| 122 | + row.getCell(4).setCellValue(list.get(0).getRq()); | |
| 123 | + row.getCell(13).setCellValue(BasicData.lineCode2NameMap.get(list.get(0).getLineCode())); | |
| 124 | + FastAndSlow fas; | |
| 125 | + for(int i = 0; i < list.size(); i++){ | |
| 126 | + fas = list.get(i); | |
| 127 | + row = sheet.createRow(i + 4); | |
| 128 | + row.createCell(0).setCellValue(i + 1); | |
| 129 | + row.createCell(1).setCellValue(fas.getStationName()); | |
| 130 | + row.createCell(2).setCellValue(fas.getUpDown()); | |
| 131 | + row.createCell(3).setCellValue(fas.getFcsj()); | |
| 132 | + row.createCell(4).setCellValue(fas.getDfsj()); | |
| 133 | + row.createCell(5).setCellValue(fas.getFcsjActual()); | |
| 134 | + row.createCell(6).setCellValue(fas.getFcsjFast()); | |
| 135 | + row.createCell(7).setCellValue(fas.getFcsjSlow()); | |
| 136 | + row.createCell(8).setCellValue(fas.getDfsjFast()); | |
| 137 | + row.createCell(9).setCellValue(fas.getDfsjSlow()); | |
| 138 | + row.createCell(10).setCellValue(fas.getZdsj()); | |
| 139 | + row.createCell(11).setCellValue(fas.getZdsjDf()); | |
| 140 | + row.createCell(12).setCellValue(fas.getZdsjActual()); | |
| 141 | + row.createCell(13).setCellValue(fas.getZdsjFast()); | |
| 142 | + row.createCell(14).setCellValue(fas.getZdsjSlow()); | |
| 143 | + row.createCell(15).setCellValue(fas.getZdsjDfFast()); | |
| 144 | + row.createCell(16).setCellValue(fas.getZdsjDfSlow()); | |
| 145 | + | |
| 146 | + if(fas.getUpDown()==0) | |
| 147 | + ups.add(fas); | |
| 148 | + else | |
| 149 | + downs.add(fas); | |
| 150 | + } | |
| 151 | + //合计 | |
| 152 | + int size = list.size(); | |
| 153 | + row = sheet.createRow(size + 4); | |
| 154 | + row.createCell(1).setCellValue("发车:上行(计划快误点:"+jhfcFast(ups)+" 累计时间:"+jhfcFastTime(ups)+" 待发快误点:"+dffcFast(ups)+" 累计时间:"+dffcFastTime(ups)+") "); | |
| 155 | + row.createCell(9).setCellValue("下行(计划快误点:"+jhfcFast(downs)+" 累计时间:"+jhfcFastTime(downs)+" 待发快误点:"+dffcFast(downs)+" 累计时间:"+dffcFastTime(downs)+")"); | |
| 156 | + row = sheet.createRow(size + 5); | |
| 157 | + row.createCell(1).setCellValue("发车:上行(计划慢误点:"+jhfcSlow(ups)+" 累计时间:"+jhfcSlowTime(ups)+" 待发慢误点:"+dffcSlow(ups)+" 累计时间:"+dffcSlowTime(ups)+") "); | |
| 158 | + row.createCell(9).setCellValue("下行(计划慢误点:"+jhfcSlow(downs)+" 累计时间:"+jhfcSlowTime(downs)+" 待发慢误点:"+dffcSlow(downs)+" 累计时间:"+dffcSlowTime(downs)+")"); | |
| 159 | + row = sheet.createRow(size + 6); | |
| 160 | + row.createCell(1).setCellValue("到达:上行(计划快误点:"+jhzdFast(ups)+" 累计时间:"+jhzdFastTime(ups)+" 待发快误点:"+dfzdFast(ups)+" 累计时间:"+dfzdFastTime(ups)+") "); | |
| 161 | + row.createCell(9).setCellValue("下行(计划快误点:"+jhzdFast(downs)+" 累计时间:"+jhzdFastTime(downs)+" 待发快误点:"+dfzdFast(downs)+" 累计时间:"+dfzdFastTime(downs)+")"); | |
| 162 | + row = sheet.createRow(size + 7); | |
| 163 | + row.createCell(1).setCellValue("到达:上行(计划慢误点:"+jhzdSlow(ups)+" 累计时间:"+jhzdSlowTime(ups)+" 待发慢误点:"+dfzdSlow(ups)+" 累计时间:"+dfzdSlowTime(ups)+") "); | |
| 164 | + row.createCell(9).setCellValue("下行(计划慢误点:"+jhzdSlow(downs)+" 累计时间:"+jhzdSlowTime(downs)+" 待发慢误点:"+dfzdSlow(downs)+" 累计时间:"+dfzdSlowTime(downs)+")"); | |
| 165 | + //合并单元格 | |
| 166 | + sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 1, 8)); | |
| 167 | + sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 9, 16)); | |
| 168 | + sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 1, 8)); | |
| 169 | + sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 9, 16)); | |
| 170 | + sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 1, 8)); | |
| 171 | + sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 9, 16)); | |
| 172 | + sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7, 1, 8)); | |
| 173 | + sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7, 9, 16)); | |
| 174 | + | |
| 175 | + sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 7, 0, 0)); | |
| 176 | + } | |
| 177 | + | |
| 178 | + private List<FastAndSlow> filterByType(List<FastAndSlow> all, String type) { | |
| 179 | + List rsList = new ArrayList(); | |
| 180 | + if ("-1".equals(type)) {//慢误 | |
| 181 | + for (FastAndSlow fas : all) { | |
| 182 | + if (fas.isSlow()) | |
| 183 | + rsList.add(fas); | |
| 184 | + } | |
| 185 | + return rsList; | |
| 186 | + } else if ("1".equals(type)) {//快误 | |
| 187 | + for (FastAndSlow fas : all) { | |
| 188 | + if (fas.isFast()) | |
| 189 | + rsList.add(fas); | |
| 190 | + } | |
| 191 | + return rsList; | |
| 192 | + } | |
| 193 | + return all; | |
| 194 | + } | |
| 195 | + | |
| 196 | + | |
| 197 | + private String maxEndTime(String sStr, String eStr, int space) throws ParseException { | |
| 198 | + try { | |
| 199 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 200 | + long st = sdf.parse(sStr).getTime(); | |
| 201 | + long et = sdf.parse(eStr).getTime(); | |
| 202 | + long dayTime = 24 * 60 * 60 * 1000; | |
| 203 | + long spaceTime = dayTime * space; | |
| 204 | + | |
| 205 | + if (et - st > spaceTime) { | |
| 206 | + eStr = sdf.format(new Date(st + spaceTime)); | |
| 207 | + } | |
| 208 | + } catch (Exception e) { | |
| 209 | + throw e; | |
| 210 | + } | |
| 211 | + return eStr; | |
| 212 | + } | |
| 213 | + | |
| 214 | + /** | |
| 215 | + * 计划发出快误点 | |
| 216 | + * @param list | |
| 217 | + * @return | |
| 218 | + */ | |
| 219 | + private int jhfcFast(List<FastAndSlow> list){ | |
| 220 | + int count=0; | |
| 221 | + for(FastAndSlow fas : list){ | |
| 222 | + if(fas.getFcsjFast() > 0) | |
| 223 | + count++; | |
| 224 | + } | |
| 225 | + return count; | |
| 226 | + } | |
| 227 | + | |
| 228 | + /** | |
| 229 | + * 计划终点快误点 | |
| 230 | + * @param list | |
| 231 | + * @return | |
| 232 | + */ | |
| 233 | + private int jhzdFast(List<FastAndSlow> list){ | |
| 234 | + int count=0; | |
| 235 | + for(FastAndSlow fas : list){ | |
| 236 | + if(fas.getZdsjFast() > 0) | |
| 237 | + count++; | |
| 238 | + } | |
| 239 | + return count; | |
| 240 | + } | |
| 241 | + | |
| 242 | + /** | |
| 243 | + * 待发发出快误点 | |
| 244 | + * @param list | |
| 245 | + * @return | |
| 246 | + */ | |
| 247 | + private int dffcFast(List<FastAndSlow> list){ | |
| 248 | + int count=0; | |
| 249 | + for(FastAndSlow fas : list){ | |
| 250 | + if(fas.getDfsjFast() > 0) | |
| 251 | + count++; | |
| 252 | + } | |
| 253 | + return count; | |
| 254 | + } | |
| 255 | + | |
| 256 | + /** | |
| 257 | + * 待发终点快误点 | |
| 258 | + * @param list | |
| 259 | + * @return | |
| 260 | + */ | |
| 261 | + private int dfzdFast(List<FastAndSlow> list){ | |
| 262 | + int count=0; | |
| 263 | + for(FastAndSlow fas : list){ | |
| 264 | + if(fas.getZdsjDfFast() > 0) | |
| 265 | + count++; | |
| 266 | + } | |
| 267 | + return count; | |
| 268 | + } | |
| 269 | + | |
| 270 | + //---------- | |
| 271 | + | |
| 272 | + /** | |
| 273 | + * 计划发出慢误点 | |
| 274 | + * @param list | |
| 275 | + * @return | |
| 276 | + */ | |
| 277 | + private int jhfcSlow(List<FastAndSlow> list){ | |
| 278 | + int count=0; | |
| 279 | + for(FastAndSlow fas : list){ | |
| 280 | + if(fas.getFcsjSlow() > 0) | |
| 281 | + count++; | |
| 282 | + } | |
| 283 | + return count; | |
| 284 | + } | |
| 285 | + | |
| 286 | + /** | |
| 287 | + * 计划终点慢误点 | |
| 288 | + * @param list | |
| 289 | + * @return | |
| 290 | + */ | |
| 291 | + private int jhzdSlow(List<FastAndSlow> list){ | |
| 292 | + int count=0; | |
| 293 | + for(FastAndSlow fas : list){ | |
| 294 | + if(fas.getZdsjSlow() > 0) | |
| 295 | + count++; | |
| 296 | + } | |
| 297 | + return count; | |
| 298 | + } | |
| 299 | + | |
| 300 | + /** | |
| 301 | + * 待发发出慢误点 | |
| 302 | + * @param list | |
| 303 | + * @return | |
| 304 | + */ | |
| 305 | + private int dffcSlow(List<FastAndSlow> list){ | |
| 306 | + int count=0; | |
| 307 | + for(FastAndSlow fas : list){ | |
| 308 | + if(fas.getDfsjSlow() > 0) | |
| 309 | + count++; | |
| 310 | + } | |
| 311 | + return count; | |
| 312 | + } | |
| 313 | + | |
| 314 | + /** | |
| 315 | + * 待发终点慢误点 | |
| 316 | + * @param list | |
| 317 | + * @return | |
| 318 | + */ | |
| 319 | + private int dfzdSlow(List<FastAndSlow> list){ | |
| 320 | + int count=0; | |
| 321 | + for(FastAndSlow fas : list){ | |
| 322 | + if(fas.getZdsjDfSlow() > 0) | |
| 323 | + count++; | |
| 324 | + } | |
| 325 | + return count; | |
| 326 | + } | |
| 327 | + /** | |
| 328 | + * ################ | |
| 329 | + */ | |
| 330 | + /** | |
| 331 | + * 计划发出快误点 | |
| 332 | + * @param list | |
| 333 | + * @return | |
| 334 | + */ | |
| 335 | + private int jhfcFastTime(List<FastAndSlow> list){ | |
| 336 | + int sum=0; | |
| 337 | + for(FastAndSlow fas : list){ | |
| 338 | + sum+=fas.getFcsjFast(); | |
| 339 | + } | |
| 340 | + return sum; | |
| 341 | + } | |
| 342 | + | |
| 343 | + /** | |
| 344 | + * 计划终点快误点 | |
| 345 | + * @param list | |
| 346 | + * @return | |
| 347 | + */ | |
| 348 | + private int jhzdFastTime(List<FastAndSlow> list){ | |
| 349 | + int sum=0; | |
| 350 | + for(FastAndSlow fas : list){ | |
| 351 | + sum+=fas.getZdsjFast(); | |
| 352 | + } | |
| 353 | + return sum; | |
| 354 | + } | |
| 355 | + | |
| 356 | + /** | |
| 357 | + * 待发发出快误点 | |
| 358 | + * @param list | |
| 359 | + * @return | |
| 360 | + */ | |
| 361 | + private int dffcFastTime(List<FastAndSlow> list){ | |
| 362 | + int sum=0; | |
| 363 | + for(FastAndSlow fas : list){ | |
| 364 | + sum+=fas.getDfsjFast(); | |
| 365 | + } | |
| 366 | + return sum; | |
| 367 | + } | |
| 368 | + | |
| 369 | + /** | |
| 370 | + * 待发终点快误点 | |
| 371 | + * @param list | |
| 372 | + * @return | |
| 373 | + */ | |
| 374 | + private int dfzdFastTime(List<FastAndSlow> list){ | |
| 375 | + int sum=0; | |
| 376 | + for(FastAndSlow fas : list){ | |
| 377 | + sum+=fas.getZdsjDfFast(); | |
| 378 | + } | |
| 379 | + return sum; | |
| 380 | + } | |
| 381 | + | |
| 382 | + //---------- | |
| 383 | + | |
| 384 | + /** | |
| 385 | + * 计划发出慢误点 | |
| 386 | + * @param list | |
| 387 | + * @return | |
| 388 | + */ | |
| 389 | + private int jhfcSlowTime(List<FastAndSlow> list){ | |
| 390 | + int sum=0; | |
| 391 | + for(FastAndSlow fas : list){ | |
| 392 | + sum+=fas.getFcsjSlow(); | |
| 393 | + } | |
| 394 | + return sum; | |
| 395 | + } | |
| 396 | + | |
| 397 | + /** | |
| 398 | + * 计划终点慢误点 | |
| 399 | + * @param list | |
| 400 | + * @return | |
| 401 | + */ | |
| 402 | + private int jhzdSlowTime(List<FastAndSlow> list){ | |
| 403 | + int sum=0; | |
| 404 | + for(FastAndSlow fas : list){ | |
| 405 | + sum+=fas.getZdsjSlow(); | |
| 406 | + } | |
| 407 | + return sum; | |
| 408 | + } | |
| 409 | + | |
| 410 | + /** | |
| 411 | + * 待发发出慢误点 | |
| 412 | + * @param list | |
| 413 | + * @return | |
| 414 | + */ | |
| 415 | + private int dffcSlowTime(List<FastAndSlow> list){ | |
| 416 | + int sum=0; | |
| 417 | + for(FastAndSlow fas : list){ | |
| 418 | + sum+=fas.getDfsjSlow(); | |
| 419 | + } | |
| 420 | + return sum; | |
| 421 | + } | |
| 422 | + | |
| 423 | + /** | |
| 424 | + * 待发终点慢误点 | |
| 425 | + * @param list | |
| 426 | + * @return | |
| 427 | + */ | |
| 428 | + private int dfzdSlowTime(List<FastAndSlow> list){ | |
| 429 | + int sum=0; | |
| 430 | + for(FastAndSlow fas : list){ | |
| 431 | + sum+=fas.getZdsjDfSlow(); | |
| 432 | + } | |
| 433 | + return sum; | |
| 434 | + } | |
| 435 | 435 | } |
| 436 | 436 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -1909,7 +1909,19 @@ public class ReportServiceImpl implements ReportService{ |
| 1909 | 1909 | } |
| 1910 | 1910 | |
| 1911 | 1911 | List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date); |
| 1912 | - Map<String, Object> newMap=culateService.culateWdbcs(sList); | |
| 1912 | + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>(); | |
| 1913 | + for (int i = 0; i < sList.size(); i++) { | |
| 1914 | + ScheduleRealInfo s=sList.get(i); | |
| 1915 | + Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 1916 | + if(cts != null && cts.size() > 0){ | |
| 1917 | + lists.add(s); | |
| 1918 | + }else{ | |
| 1919 | + if(s.getZdsjActual()!=null){ | |
| 1920 | + lists.add(s); | |
| 1921 | + } | |
| 1922 | + } | |
| 1923 | + } | |
| 1924 | + Map<String, Object> newMap=culateService.culateWdbcs(lists); | |
| 1913 | 1925 | newMap.put("jhbc", culateService.culateJhbc(sList,"")); |
| 1914 | 1926 | newMap.put("jhbczgf", culateService.culateJhbc(sList,"zgf")); |
| 1915 | 1927 | newMap.put("jhbcwgf", culateService.culateJhbc(sList,"wgf")); |
| ... | ... | @@ -1917,35 +1929,35 @@ public class ReportServiceImpl implements ReportService{ |
| 1917 | 1929 | newMap.put("jhglzgf", culateService.culateJhgl_(sList,"zgf")); |
| 1918 | 1930 | newMap.put("jhglwgf", culateService.culateJhgl_(sList,"wgf")); |
| 1919 | 1931 | |
| 1920 | - newMap.put("sjbc", culateService.culateSjbc(sList,"")); | |
| 1921 | - newMap.put("sjbczgf", culateService.culateSjbc(sList,"zgf")); | |
| 1922 | - newMap.put("sjbcwgf", culateService.culateSjbc(sList,"wgf")); | |
| 1923 | - newMap.put("sjgl", culateService.culateSjgl(sList)); | |
| 1924 | - newMap.put("sjglzgf", culateService.culateSjgl_(sList,"zgf")); | |
| 1925 | - newMap.put("sjglwgf", culateService.culateSjgl_(sList,"wgf")); | |
| 1932 | + newMap.put("sjbc", culateService.culateSjbc(lists,"")); | |
| 1933 | + newMap.put("sjbczgf", culateService.culateSjbc(lists,"zgf")); | |
| 1934 | + newMap.put("sjbcwgf", culateService.culateSjbc(lists,"wgf")); | |
| 1935 | + newMap.put("sjgl", culateService.culateSjgl(lists)); | |
| 1936 | + newMap.put("sjglzgf", culateService.culateSjgl_(lists,"zgf")); | |
| 1937 | + newMap.put("sjglwgf", culateService.culateSjgl_(lists,"wgf")); | |
| 1926 | 1938 | |
| 1927 | - newMap.put("lbgl", culateService.culateLbgl(sList)); | |
| 1928 | - newMap.put("lbbc", culateService.culateLbbc(sList)); | |
| 1929 | - newMap.put("ljgl", culateService.culateLjgl(sList)); | |
| 1930 | - newMap.put("ljglzgf", culateService.culateLjgl_(sList,"zgf")); | |
| 1931 | - newMap.put("ljglwgf", culateService.culateLjgl_(sList,"wgf")); | |
| 1932 | - | |
| 1933 | - newMap.put("ljbc", culateService.culateLjbc(sList,"")); | |
| 1934 | - newMap.put("ksgl", culateService.culateKsgl(sList)); | |
| 1939 | + newMap.put("lbgl", culateService.culateLbgl(lists)); | |
| 1940 | + newMap.put("lbbc", culateService.culateLbbc(lists)); | |
| 1941 | + newMap.put("ljgl", culateService.culateLjgl(lists)); | |
| 1942 | + newMap.put("ljglzgf", culateService.culateLjgl_(lists,"zgf")); | |
| 1943 | + newMap.put("ljglwgf", culateService.culateLjgl_(lists,"wgf")); | |
| 1944 | + | |
| 1945 | + newMap.put("ljbc", culateService.culateLjbc(lists,"")); | |
| 1946 | + newMap.put("ksgl", culateService.culateKsgl(lists)); | |
| 1935 | 1947 | |
| 1936 | - newMap.put("jhfbbc",culateService.culateDtfzbc(sList, "venting", "jh", "")); | |
| 1937 | - newMap.put("jhfbbczgf",culateService.culateDtfzbc(sList, "venting", "jh", "zgf")); | |
| 1938 | - newMap.put("jhfbbcwgf",culateService.culateDtfzbc(sList, "venting", "jh", "wgf")); | |
| 1939 | - newMap.put("sjfbbc",culateService.culateDtfzbc(sList, "venting", "sj", "")); | |
| 1940 | - newMap.put("sjfbbczgf",culateService.culateDtfzbc(sList, "venting", "sj", "zgf")); | |
| 1941 | - newMap.put("sjfbbcwgf",culateService.culateDtfzbc(sList, "venting", "sj", "wgf")); | |
| 1948 | + newMap.put("jhfbbc",culateService.culateDtfzbc(lists, "venting", "jh", "")); | |
| 1949 | + newMap.put("jhfbbczgf",culateService.culateDtfzbc(lists, "venting", "jh", "zgf")); | |
| 1950 | + newMap.put("jhfbbcwgf",culateService.culateDtfzbc(lists, "venting", "jh", "wgf")); | |
| 1951 | + newMap.put("sjfbbc",culateService.culateDtfzbc(lists, "venting", "sj", "")); | |
| 1952 | + newMap.put("sjfbbczgf",culateService.culateDtfzbc(lists, "venting", "sj", "zgf")); | |
| 1953 | + newMap.put("sjfbbcwgf",culateService.culateDtfzbc(lists, "venting", "sj", "wgf")); | |
| 1942 | 1954 | |
| 1943 | - newMap.put("jhdtbc",culateService.culateDtfzbc(sList, "major", "jh", "")); | |
| 1944 | - newMap.put("jhdtbczgf",culateService.culateDtfzbc(sList, "major", "jh", "zgf")); | |
| 1945 | - newMap.put("jhdtbcwgf",culateService.culateDtfzbc(sList, "major", "jh", "wgf")); | |
| 1946 | - newMap.put("sjdtbc",culateService.culateDtfzbc(sList, "major", "sj", "")); | |
| 1947 | - newMap.put("sjdtbczgf",culateService.culateDtfzbc(sList, "major", "sj", "zgf")); | |
| 1948 | - newMap.put("sjdtbcwgf",culateService.culateDtfzbc(sList, "major", "sj", "wgf")); | |
| 1955 | + newMap.put("jhdtbc",culateService.culateDtfzbc(lists, "major", "jh", "")); | |
| 1956 | + newMap.put("jhdtbczgf",culateService.culateDtfzbc(lists, "major", "jh", "zgf")); | |
| 1957 | + newMap.put("jhdtbcwgf",culateService.culateDtfzbc(lists, "major", "jh", "wgf")); | |
| 1958 | + newMap.put("sjdtbc",culateService.culateDtfzbc(lists, "major", "sj", "")); | |
| 1959 | + newMap.put("sjdtbczgf",culateService.culateDtfzbc(lists, "major", "sj", "zgf")); | |
| 1960 | + newMap.put("sjdtbcwgf",culateService.culateDtfzbc(lists, "major", "sj", "wgf")); | |
| 1949 | 1961 | return newMap; |
| 1950 | 1962 | } |
| 1951 | 1963 | @Override | ... | ... |
src/main/resources/datatools/ktrs/employeesConfigDataInput.ktr
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<transformation> | |
| 3 | - <info> | |
| 4 | - <name>人员配置信息导入</name> | |
| 5 | - <description>人员配置信息导入</description> | |
| 6 | - <extended_description>人员配置信息</extended_description> | |
| 7 | - <trans_version/> | |
| 8 | - <trans_type>Normal</trans_type> | |
| 9 | - <trans_status>0</trans_status> | |
| 10 | - <directory>/</directory> | |
| 11 | - <parameters> | |
| 12 | - <parameter> | |
| 13 | - <name>erroroutputdir</name> | |
| 14 | - <default_value/> | |
| 15 | - <description>ktr step配置的错误输出目录</description> | |
| 16 | - </parameter> | |
| 17 | - <parameter> | |
| 18 | - <name>filepath</name> | |
| 19 | - <default_value/> | |
| 20 | - <description>待处理导入的excel文件</description> | |
| 21 | - </parameter> | |
| 22 | - </parameters> | |
| 23 | - <log> | |
| 24 | -<trans-log-table><connection/> | |
| 25 | -<schema/> | |
| 26 | -<table/> | |
| 27 | -<size_limit_lines/> | |
| 28 | -<interval/> | |
| 29 | -<timeout_days/> | |
| 30 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | |
| 31 | -<perf-log-table><connection/> | |
| 32 | -<schema/> | |
| 33 | -<table/> | |
| 34 | -<interval/> | |
| 35 | -<timeout_days/> | |
| 36 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | |
| 37 | -<channel-log-table><connection/> | |
| 38 | -<schema/> | |
| 39 | -<table/> | |
| 40 | -<timeout_days/> | |
| 41 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | |
| 42 | -<step-log-table><connection/> | |
| 43 | -<schema/> | |
| 44 | -<table/> | |
| 45 | -<timeout_days/> | |
| 46 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | |
| 47 | -<metrics-log-table><connection/> | |
| 48 | -<schema/> | |
| 49 | -<table/> | |
| 50 | -<timeout_days/> | |
| 51 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | |
| 52 | - </log> | |
| 53 | - <maxdate> | |
| 54 | - <connection/> | |
| 55 | - <table/> | |
| 56 | - <field/> | |
| 57 | - <offset>0.0</offset> | |
| 58 | - <maxdiff>0.0</maxdiff> | |
| 59 | - </maxdate> | |
| 60 | - <size_rowset>10000</size_rowset> | |
| 61 | - <sleep_time_empty>50</sleep_time_empty> | |
| 62 | - <sleep_time_full>50</sleep_time_full> | |
| 63 | - <unique_connections>N</unique_connections> | |
| 64 | - <feedback_shown>Y</feedback_shown> | |
| 65 | - <feedback_size>50000</feedback_size> | |
| 66 | - <using_thread_priorities>Y</using_thread_priorities> | |
| 67 | - <shared_objects_file/> | |
| 68 | - <capture_step_performance>N</capture_step_performance> | |
| 69 | - <step_performance_capturing_delay>1000</step_performance_capturing_delay> | |
| 70 | - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | |
| 71 | - <dependencies> | |
| 72 | - </dependencies> | |
| 73 | - <partitionschemas> | |
| 74 | - </partitionschemas> | |
| 75 | - <slaveservers> | |
| 76 | - </slaveservers> | |
| 77 | - <clusterschemas> | |
| 78 | - </clusterschemas> | |
| 79 | - <created_user>-</created_user> | |
| 80 | - <created_date>2016/06/29 15:12:27.273</created_date> | |
| 81 | - <modified_user>-</modified_user> | |
| 82 | - <modified_date>2016/06/29 15:12:27.273</modified_date> | |
| 83 | - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | |
| 84 | - <is_key_private>N</is_key_private> | |
| 85 | - </info> | |
| 86 | - <notepads> | |
| 87 | - <notepad> | |
| 88 | - <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | |
| 89 | - <xloc>101</xloc> | |
| 90 | - <yloc>264</yloc> | |
| 91 | - <width>333</width> | |
| 92 | - <heigth>90</heigth> | |
| 93 | - <fontname>YaHei Consolas Hybrid</fontname> | |
| 94 | - <fontsize>12</fontsize> | |
| 95 | - <fontbold>N</fontbold> | |
| 96 | - <fontitalic>N</fontitalic> | |
| 97 | - <fontcolorred>0</fontcolorred> | |
| 98 | - <fontcolorgreen>0</fontcolorgreen> | |
| 99 | - <fontcolorblue>0</fontcolorblue> | |
| 100 | - <backgroundcolorred>255</backgroundcolorred> | |
| 101 | - <backgroundcolorgreen>205</backgroundcolorgreen> | |
| 102 | - <backgroundcolorblue>112</backgroundcolorblue> | |
| 103 | - <bordercolorred>100</bordercolorred> | |
| 104 | - <bordercolorgreen>100</bordercolorgreen> | |
| 105 | - <bordercolorblue>100</bordercolorblue> | |
| 106 | - <drawshadow>Y</drawshadow> | |
| 107 | - </notepad> | |
| 108 | - </notepads> | |
| 109 | - <connection> | |
| 110 | - <name>192.168.168.1_jwgl_dw</name> | |
| 111 | - <server>192.168.168.1</server> | |
| 112 | - <type>ORACLE</type> | |
| 113 | - <access>Native</access> | |
| 114 | - <database>orcl</database> | |
| 115 | - <port>1521</port> | |
| 116 | - <username>jwgl_dw</username> | |
| 117 | - <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | |
| 118 | - <servername/> | |
| 119 | - <data_tablespace/> | |
| 120 | - <index_tablespace/> | |
| 121 | - <attributes> | |
| 122 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 123 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 124 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 125 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 126 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 127 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 128 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 129 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 130 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 131 | - </attributes> | |
| 132 | - </connection> | |
| 133 | - <connection> | |
| 134 | - <name>bus_control_variable</name> | |
| 135 | - <server>${v_db_ip}</server> | |
| 136 | - <type>MYSQL</type> | |
| 137 | - <access>Native</access> | |
| 138 | - <database>${v_db_dname}</database> | |
| 139 | - <port>3306</port> | |
| 140 | - <username>${v_db_uname}</username> | |
| 141 | - <password>${v_db_pwd}</password> | |
| 142 | - <servername/> | |
| 143 | - <data_tablespace/> | |
| 144 | - <index_tablespace/> | |
| 145 | - <attributes> | |
| 146 | - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | |
| 147 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 148 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 149 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 150 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 151 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 152 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 153 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 154 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 155 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 156 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 157 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 158 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 159 | - </attributes> | |
| 160 | - </connection> | |
| 161 | - <connection> | |
| 162 | - <name>bus_control_公司_201</name> | |
| 163 | - <server>localhost</server> | |
| 164 | - <type>MYSQL</type> | |
| 165 | - <access>Native</access> | |
| 166 | - <database>control</database> | |
| 167 | - <port>3306</port> | |
| 168 | - <username>root</username> | |
| 169 | - <password>Encrypted </password> | |
| 170 | - <servername/> | |
| 171 | - <data_tablespace/> | |
| 172 | - <index_tablespace/> | |
| 173 | - <attributes> | |
| 174 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 175 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 176 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 177 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 178 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 179 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 180 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 181 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 182 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 183 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 184 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 185 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 186 | - </attributes> | |
| 187 | - </connection> | |
| 188 | - <connection> | |
| 189 | - <name>bus_control_本机</name> | |
| 190 | - <server>localhost</server> | |
| 191 | - <type>MYSQL</type> | |
| 192 | - <access>Native</access> | |
| 193 | - <database>control</database> | |
| 194 | - <port>3306</port> | |
| 195 | - <username>root</username> | |
| 196 | - <password>Encrypted </password> | |
| 197 | - <servername/> | |
| 198 | - <data_tablespace/> | |
| 199 | - <index_tablespace/> | |
| 200 | - <attributes> | |
| 201 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 202 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 203 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 204 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 205 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 206 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 207 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 208 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 209 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 210 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 211 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 212 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 213 | - </attributes> | |
| 214 | - </connection> | |
| 215 | - <connection> | |
| 216 | - <name>xlab_mysql_youle</name> | |
| 217 | - <server>101.231.124.8</server> | |
| 218 | - <type>MYSQL</type> | |
| 219 | - <access>Native</access> | |
| 220 | - <database>xlab_youle</database> | |
| 221 | - <port>45687</port> | |
| 222 | - <username>xlab-youle</username> | |
| 223 | - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | |
| 224 | - <servername/> | |
| 225 | - <data_tablespace/> | |
| 226 | - <index_tablespace/> | |
| 227 | - <attributes> | |
| 228 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 229 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 230 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 231 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 232 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 233 | - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | |
| 234 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 235 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 236 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 237 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 238 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 239 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 240 | - </attributes> | |
| 241 | - </connection> | |
| 242 | - <connection> | |
| 243 | - <name>xlab_mysql_youle(本机)</name> | |
| 244 | - <server>localhost</server> | |
| 245 | - <type>MYSQL</type> | |
| 246 | - <access>Native</access> | |
| 247 | - <database>xlab_youle</database> | |
| 248 | - <port>3306</port> | |
| 249 | - <username>root</username> | |
| 250 | - <password>Encrypted </password> | |
| 251 | - <servername/> | |
| 252 | - <data_tablespace/> | |
| 253 | - <index_tablespace/> | |
| 254 | - <attributes> | |
| 255 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 256 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 257 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 258 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 259 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 260 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 261 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 262 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 263 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 264 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 265 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 266 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 267 | - </attributes> | |
| 268 | - </connection> | |
| 269 | - <connection> | |
| 270 | - <name>xlab_youle</name> | |
| 271 | - <server/> | |
| 272 | - <type>MYSQL</type> | |
| 273 | - <access>JNDI</access> | |
| 274 | - <database>xlab_youle</database> | |
| 275 | - <port>1521</port> | |
| 276 | - <username/> | |
| 277 | - <password>Encrypted </password> | |
| 278 | - <servername/> | |
| 279 | - <data_tablespace/> | |
| 280 | - <index_tablespace/> | |
| 281 | - <attributes> | |
| 282 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 283 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 284 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 285 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 286 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 287 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 288 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 289 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 290 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 291 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 292 | - </attributes> | |
| 293 | - </connection> | |
| 294 | - <order> | |
| 295 | - <hop> <from>插入/更新bsth_c_s_ecinfo</from><to>错误输出</to><enabled>Y</enabled> </hop> | |
| 296 | - <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 297 | - <hop> <from>原始系统导出的Excel输入</from><to>启用被数据flag</to><enabled>Y</enabled> </hop> | |
| 298 | - <hop> <from>启用被数据flag</from><to>线路id查询</to><enabled>Y</enabled> </hop> | |
| 299 | - <hop> <from>线路id查询</from><to>过滤线路id为空记录</to><enabled>Y</enabled> </hop> | |
| 300 | - <hop> <from>驾驶员id查找</from><to>过滤驾驶员id为空记录</to><enabled>Y</enabled> </hop> | |
| 301 | - <hop> <from>过滤驾驶员id为空记录</from><to>售票员id查找</to><enabled>Y</enabled> </hop> | |
| 302 | - <hop> <from>售票员id查找</from><to>插入/更新bsth_c_s_ecinfo</to><enabled>Y</enabled> </hop> | |
| 303 | - <hop> <from>过滤线路id为空记录</from><to>驾驶员id查找</to><enabled>Y</enabled> </hop> | |
| 304 | - </order> | |
| 305 | - <step> | |
| 306 | - <name>原始系统导出的Excel输入</name> | |
| 307 | - <type>ExcelInput</type> | |
| 308 | - <description/> | |
| 309 | - <distribute>Y</distribute> | |
| 310 | - <custom_distribution/> | |
| 311 | - <copies>1</copies> | |
| 312 | - <partitioning> | |
| 313 | - <method>none</method> | |
| 314 | - <schema_name/> | |
| 315 | - </partitioning> | |
| 316 | - <header>Y</header> | |
| 317 | - <noempty>Y</noempty> | |
| 318 | - <stoponempty>N</stoponempty> | |
| 319 | - <filefield/> | |
| 320 | - <sheetfield/> | |
| 321 | - <sheetrownumfield/> | |
| 322 | - <rownumfield/> | |
| 323 | - <sheetfield/> | |
| 324 | - <filefield/> | |
| 325 | - <limit>0</limit> | |
| 326 | - <encoding/> | |
| 327 | - <add_to_result_filenames>Y</add_to_result_filenames> | |
| 328 | - <accept_filenames>Y</accept_filenames> | |
| 329 | - <accept_field>filepath_</accept_field> | |
| 330 | - <accept_stepname>获取变量</accept_stepname> | |
| 331 | - <file> | |
| 332 | - <name/> | |
| 333 | - <filemask/> | |
| 334 | - <exclude_filemask/> | |
| 335 | - <file_required>N</file_required> | |
| 336 | - <include_subfolders>N</include_subfolders> | |
| 337 | - </file> | |
| 338 | - <fields> | |
| 339 | - <field> | |
| 340 | - <name>线路</name> | |
| 341 | - <type>String</type> | |
| 342 | - <length>-1</length> | |
| 343 | - <precision>-1</precision> | |
| 344 | - <trim_type>none</trim_type> | |
| 345 | - <repeat>N</repeat> | |
| 346 | - <format/> | |
| 347 | - <currency/> | |
| 348 | - <decimal/> | |
| 349 | - <group/> | |
| 350 | - </field> | |
| 351 | - <field> | |
| 352 | - <name>搭班编码</name> | |
| 353 | - <type>String</type> | |
| 354 | - <length>-1</length> | |
| 355 | - <precision>-1</precision> | |
| 356 | - <trim_type>none</trim_type> | |
| 357 | - <repeat>N</repeat> | |
| 358 | - <format>#</format> | |
| 359 | - <currency/> | |
| 360 | - <decimal/> | |
| 361 | - <group/> | |
| 362 | - </field> | |
| 363 | - <field> | |
| 364 | - <name>驾驶员工号</name> | |
| 365 | - <type>String</type> | |
| 366 | - <length>-1</length> | |
| 367 | - <precision>-1</precision> | |
| 368 | - <trim_type>none</trim_type> | |
| 369 | - <repeat>N</repeat> | |
| 370 | - <format>#</format> | |
| 371 | - <currency/> | |
| 372 | - <decimal/> | |
| 373 | - <group/> | |
| 374 | - </field> | |
| 375 | - <field> | |
| 376 | - <name>驾驶员</name> | |
| 377 | - <type>String</type> | |
| 378 | - <length>-1</length> | |
| 379 | - <precision>-1</precision> | |
| 380 | - <trim_type>none</trim_type> | |
| 381 | - <repeat>N</repeat> | |
| 382 | - <format/> | |
| 383 | - <currency/> | |
| 384 | - <decimal/> | |
| 385 | - <group/> | |
| 386 | - </field> | |
| 387 | - <field> | |
| 388 | - <name>售票员工号</name> | |
| 389 | - <type>String</type> | |
| 390 | - <length>-1</length> | |
| 391 | - <precision>-1</precision> | |
| 392 | - <trim_type>none</trim_type> | |
| 393 | - <repeat>N</repeat> | |
| 394 | - <format>#</format> | |
| 395 | - <currency/> | |
| 396 | - <decimal/> | |
| 397 | - <group/> | |
| 398 | - </field> | |
| 399 | - <field> | |
| 400 | - <name>售票员</name> | |
| 401 | - <type>String</type> | |
| 402 | - <length>-1</length> | |
| 403 | - <precision>-1</precision> | |
| 404 | - <trim_type>none</trim_type> | |
| 405 | - <repeat>N</repeat> | |
| 406 | - <format/> | |
| 407 | - <currency/> | |
| 408 | - <decimal/> | |
| 409 | - <group/> | |
| 410 | - </field> | |
| 411 | - </fields> | |
| 412 | - <sheets> | |
| 413 | - <sheet> | |
| 414 | - <name>工作表1</name> | |
| 415 | - <startrow>0</startrow> | |
| 416 | - <startcol>0</startcol> | |
| 417 | - </sheet> | |
| 418 | - </sheets> | |
| 419 | - <strict_types>N</strict_types> | |
| 420 | - <error_ignored>N</error_ignored> | |
| 421 | - <error_line_skipped>N</error_line_skipped> | |
| 422 | - <bad_line_files_destination_directory/> | |
| 423 | - <bad_line_files_extension>warning</bad_line_files_extension> | |
| 424 | - <error_line_files_destination_directory/> | |
| 425 | - <error_line_files_extension>error</error_line_files_extension> | |
| 426 | - <line_number_files_destination_directory/> | |
| 427 | - <line_number_files_extension>line</line_number_files_extension> | |
| 428 | - <shortFileFieldName/> | |
| 429 | - <pathFieldName/> | |
| 430 | - <hiddenFieldName/> | |
| 431 | - <lastModificationTimeFieldName/> | |
| 432 | - <uriNameFieldName/> | |
| 433 | - <rootUriNameFieldName/> | |
| 434 | - <extensionFieldName/> | |
| 435 | - <sizeFieldName/> | |
| 436 | - <spreadsheet_type>JXL</spreadsheet_type> | |
| 437 | - <cluster_schema/> | |
| 438 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 439 | - <xloc>93</xloc> | |
| 440 | - <yloc>51</yloc> | |
| 441 | - <draw>Y</draw> | |
| 442 | - </GUI> | |
| 443 | - </step> | |
| 444 | - | |
| 445 | - <step> | |
| 446 | - <name>启用被数据flag</name> | |
| 447 | - <type>Constant</type> | |
| 448 | - <description/> | |
| 449 | - <distribute>Y</distribute> | |
| 450 | - <custom_distribution/> | |
| 451 | - <copies>1</copies> | |
| 452 | - <partitioning> | |
| 453 | - <method>none</method> | |
| 454 | - <schema_name/> | |
| 455 | - </partitioning> | |
| 456 | - <fields> | |
| 457 | - <field> | |
| 458 | - <name>isCancel</name> | |
| 459 | - <type>Integer</type> | |
| 460 | - <format/> | |
| 461 | - <currency/> | |
| 462 | - <decimal/> | |
| 463 | - <group/> | |
| 464 | - <nullif>0</nullif> | |
| 465 | - <length>-1</length> | |
| 466 | - <precision>-1</precision> | |
| 467 | - <set_empty_string>N</set_empty_string> | |
| 468 | - </field> | |
| 469 | - </fields> | |
| 470 | - <cluster_schema/> | |
| 471 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 472 | - <xloc>225</xloc> | |
| 473 | - <yloc>53</yloc> | |
| 474 | - <draw>Y</draw> | |
| 475 | - </GUI> | |
| 476 | - </step> | |
| 477 | - | |
| 478 | - <step> | |
| 479 | - <name>售票员id查找</name> | |
| 480 | - <type>DBJoin</type> | |
| 481 | - <description/> | |
| 482 | - <distribute>Y</distribute> | |
| 483 | - <custom_distribution/> | |
| 484 | - <copies>1</copies> | |
| 485 | - <partitioning> | |
| 486 | - <method>none</method> | |
| 487 | - <schema_name/> | |
| 488 | - </partitioning> | |
| 489 | - <connection>bus_control_variable</connection> | |
| 490 | - <rowlimit>1</rowlimit> | |
| 491 | - <sql>select id as sid from bsth_c_personnel
where job_codeori = ? and personnel_name = ?</sql> | |
| 492 | - <outer_join>Y</outer_join> | |
| 493 | - <replace_vars>N</replace_vars> | |
| 494 | - <parameter> | |
| 495 | - <field> | |
| 496 | - <name>售票员工号</name> | |
| 497 | - <type>String</type> | |
| 498 | - </field> | |
| 499 | - <field> | |
| 500 | - <name>售票员</name> | |
| 501 | - <type>String</type> | |
| 502 | - </field> | |
| 503 | - </parameter> | |
| 504 | - <cluster_schema/> | |
| 505 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 506 | - <xloc>830</xloc> | |
| 507 | - <yloc>45</yloc> | |
| 508 | - <draw>Y</draw> | |
| 509 | - </GUI> | |
| 510 | - </step> | |
| 511 | - | |
| 512 | - <step> | |
| 513 | - <name>插入/更新bsth_c_s_ecinfo</name> | |
| 514 | - <type>InsertUpdate</type> | |
| 515 | - <description/> | |
| 516 | - <distribute>Y</distribute> | |
| 517 | - <custom_distribution/> | |
| 518 | - <copies>1</copies> | |
| 519 | - <partitioning> | |
| 520 | - <method>none</method> | |
| 521 | - <schema_name/> | |
| 522 | - </partitioning> | |
| 523 | - <connection>bus_control_variable</connection> | |
| 524 | - <commit>100</commit> | |
| 525 | - <update_bypassed>N</update_bypassed> | |
| 526 | - <lookup> | |
| 527 | - <schema/> | |
| 528 | - <table>bsth_c_s_ecinfo</table> | |
| 529 | - <key> | |
| 530 | - <name>xlid</name> | |
| 531 | - <field>xl</field> | |
| 532 | - <condition>=</condition> | |
| 533 | - <name2/> | |
| 534 | - </key> | |
| 535 | - <key> | |
| 536 | - <name>搭班编码</name> | |
| 537 | - <field>dbbm</field> | |
| 538 | - <condition>=</condition> | |
| 539 | - <name2/> | |
| 540 | - </key> | |
| 541 | - <key> | |
| 542 | - <name>isCancel</name> | |
| 543 | - <field>is_cancel</field> | |
| 544 | - <condition>=</condition> | |
| 545 | - <name2/> | |
| 546 | - </key> | |
| 547 | - <value> | |
| 548 | - <name>xl</name> | |
| 549 | - <rename>xlid</rename> | |
| 550 | - <update>Y</update> | |
| 551 | - </value> | |
| 552 | - <value> | |
| 553 | - <name>dbbm</name> | |
| 554 | - <rename>搭班编码</rename> | |
| 555 | - <update>Y</update> | |
| 556 | - </value> | |
| 557 | - <value> | |
| 558 | - <name>jsy</name> | |
| 559 | - <rename>jid</rename> | |
| 560 | - <update>Y</update> | |
| 561 | - </value> | |
| 562 | - <value> | |
| 563 | - <name>spy</name> | |
| 564 | - <rename>sid</rename> | |
| 565 | - <update>Y</update> | |
| 566 | - </value> | |
| 567 | - <value> | |
| 568 | - <name>is_cancel</name> | |
| 569 | - <rename>isCancel</rename> | |
| 570 | - <update>Y</update> | |
| 571 | - </value> | |
| 572 | - </lookup> | |
| 573 | - <cluster_schema/> | |
| 574 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 575 | - <xloc>833</xloc> | |
| 576 | - <yloc>198</yloc> | |
| 577 | - <draw>Y</draw> | |
| 578 | - </GUI> | |
| 579 | - </step> | |
| 580 | - | |
| 581 | - <step> | |
| 582 | - <name>线路id查询</name> | |
| 583 | - <type>DBLookup</type> | |
| 584 | - <description/> | |
| 585 | - <distribute>Y</distribute> | |
| 586 | - <custom_distribution/> | |
| 587 | - <copies>1</copies> | |
| 588 | - <partitioning> | |
| 589 | - <method>none</method> | |
| 590 | - <schema_name/> | |
| 591 | - </partitioning> | |
| 592 | - <connection>bus_control_variable</connection> | |
| 593 | - <cache>Y</cache> | |
| 594 | - <cache_load_all>Y</cache_load_all> | |
| 595 | - <cache_size>0</cache_size> | |
| 596 | - <lookup> | |
| 597 | - <schema/> | |
| 598 | - <table>bsth_c_line</table> | |
| 599 | - <orderby/> | |
| 600 | - <fail_on_multiple>N</fail_on_multiple> | |
| 601 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 602 | - <key> | |
| 603 | - <name>线路</name> | |
| 604 | - <field>name</field> | |
| 605 | - <condition>=</condition> | |
| 606 | - <name2/> | |
| 607 | - </key> | |
| 608 | - <key> | |
| 609 | - <name>isCancel</name> | |
| 610 | - <field>destroy</field> | |
| 611 | - <condition>=</condition> | |
| 612 | - <name2/> | |
| 613 | - </key> | |
| 614 | - <value> | |
| 615 | - <name>id</name> | |
| 616 | - <rename>xlid</rename> | |
| 617 | - <default/> | |
| 618 | - <type>Integer</type> | |
| 619 | - </value> | |
| 620 | - </lookup> | |
| 621 | - <cluster_schema/> | |
| 622 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 623 | - <xloc>397</xloc> | |
| 624 | - <yloc>144</yloc> | |
| 625 | - <draw>Y</draw> | |
| 626 | - </GUI> | |
| 627 | - </step> | |
| 628 | - | |
| 629 | - <step> | |
| 630 | - <name>获取变量</name> | |
| 631 | - <type>GetVariable</type> | |
| 632 | - <description/> | |
| 633 | - <distribute>Y</distribute> | |
| 634 | - <custom_distribution/> | |
| 635 | - <copies>1</copies> | |
| 636 | - <partitioning> | |
| 637 | - <method>none</method> | |
| 638 | - <schema_name/> | |
| 639 | - </partitioning> | |
| 640 | - <fields> | |
| 641 | - <field> | |
| 642 | - <name>filepath_</name> | |
| 643 | - <variable>${filepath}</variable> | |
| 644 | - <type>String</type> | |
| 645 | - <format/> | |
| 646 | - <currency/> | |
| 647 | - <decimal/> | |
| 648 | - <group/> | |
| 649 | - <length>-1</length> | |
| 650 | - <precision>-1</precision> | |
| 651 | - <trim_type>none</trim_type> | |
| 652 | - </field> | |
| 653 | - <field> | |
| 654 | - <name>erroroutputdir_</name> | |
| 655 | - <variable>${erroroutputdir}</variable> | |
| 656 | - <type>String</type> | |
| 657 | - <format/> | |
| 658 | - <currency/> | |
| 659 | - <decimal/> | |
| 660 | - <group/> | |
| 661 | - <length>-1</length> | |
| 662 | - <precision>-1</precision> | |
| 663 | - <trim_type>none</trim_type> | |
| 664 | - </field> | |
| 665 | - </fields> | |
| 666 | - <cluster_schema/> | |
| 667 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 668 | - <xloc>94</xloc> | |
| 669 | - <yloc>178</yloc> | |
| 670 | - <draw>Y</draw> | |
| 671 | - </GUI> | |
| 672 | - </step> | |
| 673 | - | |
| 674 | - <step> | |
| 675 | - <name>过滤线路id为空记录</name> | |
| 676 | - <type>FilterRows</type> | |
| 677 | - <description/> | |
| 678 | - <distribute>Y</distribute> | |
| 679 | - <custom_distribution/> | |
| 680 | - <copies>1</copies> | |
| 681 | - <partitioning> | |
| 682 | - <method>none</method> | |
| 683 | - <schema_name/> | |
| 684 | - </partitioning> | |
| 685 | -<send_true_to/> | |
| 686 | -<send_false_to/> | |
| 687 | - <compare> | |
| 688 | -<condition> | |
| 689 | - <negated>N</negated> | |
| 690 | - <leftvalue>xlid</leftvalue> | |
| 691 | - <function>IS NOT NULL</function> | |
| 692 | - <rightvalue/> | |
| 693 | - </condition> | |
| 694 | - </compare> | |
| 695 | - <cluster_schema/> | |
| 696 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 697 | - <xloc>395</xloc> | |
| 698 | - <yloc>49</yloc> | |
| 699 | - <draw>Y</draw> | |
| 700 | - </GUI> | |
| 701 | - </step> | |
| 702 | - | |
| 703 | - <step> | |
| 704 | - <name>过滤驾驶员id为空记录</name> | |
| 705 | - <type>FilterRows</type> | |
| 706 | - <description/> | |
| 707 | - <distribute>Y</distribute> | |
| 708 | - <custom_distribution/> | |
| 709 | - <copies>1</copies> | |
| 710 | - <partitioning> | |
| 711 | - <method>none</method> | |
| 712 | - <schema_name/> | |
| 713 | - </partitioning> | |
| 714 | -<send_true_to>售票员id查找</send_true_to> | |
| 715 | -<send_false_to/> | |
| 716 | - <compare> | |
| 717 | -<condition> | |
| 718 | - <negated>N</negated> | |
| 719 | - <leftvalue>jid</leftvalue> | |
| 720 | - <function>IS NOT NULL</function> | |
| 721 | - <rightvalue/> | |
| 722 | - </condition> | |
| 723 | - </compare> | |
| 724 | - <cluster_schema/> | |
| 725 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 726 | - <xloc>604</xloc> | |
| 727 | - <yloc>46</yloc> | |
| 728 | - <draw>Y</draw> | |
| 729 | - </GUI> | |
| 730 | - </step> | |
| 731 | - | |
| 732 | - <step> | |
| 733 | - <name>错误输出</name> | |
| 734 | - <type>ExcelOutput</type> | |
| 735 | - <description/> | |
| 736 | - <distribute>Y</distribute> | |
| 737 | - <custom_distribution/> | |
| 738 | - <copies>1</copies> | |
| 739 | - <partitioning> | |
| 740 | - <method>none</method> | |
| 741 | - <schema_name/> | |
| 742 | - </partitioning> | |
| 743 | - <header>Y</header> | |
| 744 | - <footer>N</footer> | |
| 745 | - <encoding>UTF-8</encoding> | |
| 746 | - <append>N</append> | |
| 747 | - <add_to_result_filenames>Y</add_to_result_filenames> | |
| 748 | - <file> | |
| 749 | - <name>${erroroutputdir}/人员配置_错误</name> | |
| 750 | - <extention>xls</extention> | |
| 751 | - <do_not_open_newfile_init>N</do_not_open_newfile_init> | |
| 752 | - <create_parent_folder>N</create_parent_folder> | |
| 753 | - <split>N</split> | |
| 754 | - <add_date>N</add_date> | |
| 755 | - <add_time>N</add_time> | |
| 756 | - <SpecifyFormat>N</SpecifyFormat> | |
| 757 | - <date_time_format/> | |
| 758 | - <sheetname>Sheet1</sheetname> | |
| 759 | - <autosizecolums>N</autosizecolums> | |
| 760 | - <nullisblank>N</nullisblank> | |
| 761 | - <protect_sheet>N</protect_sheet> | |
| 762 | - <password>Encrypted </password> | |
| 763 | - <splitevery>0</splitevery> | |
| 764 | - <usetempfiles>N</usetempfiles> | |
| 765 | - <tempdirectory/> | |
| 766 | - </file> | |
| 767 | - <template> | |
| 768 | - <enabled>N</enabled> | |
| 769 | - <append>N</append> | |
| 770 | - <filename>template.xls</filename> | |
| 771 | - </template> | |
| 772 | - <fields> | |
| 773 | - <field> | |
| 774 | - <name>线路</name> | |
| 775 | - <type>String</type> | |
| 776 | - <format/> | |
| 777 | - </field> | |
| 778 | - <field> | |
| 779 | - <name>搭班编码</name> | |
| 780 | - <type>String</type> | |
| 781 | - <format/> | |
| 782 | - </field> | |
| 783 | - <field> | |
| 784 | - <name>驾驶员工号</name> | |
| 785 | - <type>String</type> | |
| 786 | - <format/> | |
| 787 | - </field> | |
| 788 | - <field> | |
| 789 | - <name>驾驶员</name> | |
| 790 | - <type>String</type> | |
| 791 | - <format/> | |
| 792 | - </field> | |
| 793 | - <field> | |
| 794 | - <name>售票员工号</name> | |
| 795 | - <type>String</type> | |
| 796 | - <format/> | |
| 797 | - </field> | |
| 798 | - <field> | |
| 799 | - <name>售票员</name> | |
| 800 | - <type>String</type> | |
| 801 | - <format/> | |
| 802 | - </field> | |
| 803 | - <field> | |
| 804 | - <name>isCancel</name> | |
| 805 | - <type>Integer</type> | |
| 806 | - <format/> | |
| 807 | - </field> | |
| 808 | - <field> | |
| 809 | - <name>xlid</name> | |
| 810 | - <type>Integer</type> | |
| 811 | - <format/> | |
| 812 | - </field> | |
| 813 | - <field> | |
| 814 | - <name>jid</name> | |
| 815 | - <type>Integer</type> | |
| 816 | - <format/> | |
| 817 | - </field> | |
| 818 | - <field> | |
| 819 | - <name>sid</name> | |
| 820 | - <type>Integer</type> | |
| 821 | - <format/> | |
| 822 | - </field> | |
| 823 | - <field> | |
| 824 | - <name>error_count</name> | |
| 825 | - <type>Integer</type> | |
| 826 | - <format/> | |
| 827 | - </field> | |
| 828 | - <field> | |
| 829 | - <name>error_desc</name> | |
| 830 | - <type>String</type> | |
| 831 | - <format/> | |
| 832 | - </field> | |
| 833 | - <field> | |
| 834 | - <name>error_column1</name> | |
| 835 | - <type>String</type> | |
| 836 | - <format/> | |
| 837 | - </field> | |
| 838 | - <field> | |
| 839 | - <name>error_column2</name> | |
| 840 | - <type>String</type> | |
| 841 | - <format/> | |
| 842 | - </field> | |
| 843 | - </fields> | |
| 844 | - <custom> | |
| 845 | - <header_font_name>arial</header_font_name> | |
| 846 | - <header_font_size>10</header_font_size> | |
| 847 | - <header_font_bold>N</header_font_bold> | |
| 848 | - <header_font_italic>N</header_font_italic> | |
| 849 | - <header_font_underline>no</header_font_underline> | |
| 850 | - <header_font_orientation>horizontal</header_font_orientation> | |
| 851 | - <header_font_color>black</header_font_color> | |
| 852 | - <header_background_color>none</header_background_color> | |
| 853 | - <header_row_height>255</header_row_height> | |
| 854 | - <header_alignment>left</header_alignment> | |
| 855 | - <header_image/> | |
| 856 | - <row_font_name>arial</row_font_name> | |
| 857 | - <row_font_size>10</row_font_size> | |
| 858 | - <row_font_color>black</row_font_color> | |
| 859 | - <row_background_color>none</row_background_color> | |
| 860 | - </custom> | |
| 861 | - <cluster_schema/> | |
| 862 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 863 | - <xloc>833</xloc> | |
| 864 | - <yloc>321</yloc> | |
| 865 | - <draw>Y</draw> | |
| 866 | - </GUI> | |
| 867 | - </step> | |
| 868 | - | |
| 869 | - <step> | |
| 870 | - <name>驾驶员id查找</name> | |
| 871 | - <type>DBJoin</type> | |
| 872 | - <description/> | |
| 873 | - <distribute>Y</distribute> | |
| 874 | - <custom_distribution/> | |
| 875 | - <copies>1</copies> | |
| 876 | - <partitioning> | |
| 877 | - <method>none</method> | |
| 878 | - <schema_name/> | |
| 879 | - </partitioning> | |
| 880 | - <connection>bus_control_variable</connection> | |
| 881 | - <rowlimit>1</rowlimit> | |
| 882 | - <sql>select id as jid from bsth_c_personnel
where job_codeori = ? and personnel_name = ?</sql> | |
| 883 | - <outer_join>Y</outer_join> | |
| 884 | - <replace_vars>N</replace_vars> | |
| 885 | - <parameter> | |
| 886 | - <field> | |
| 887 | - <name>驾驶员工号</name> | |
| 888 | - <type>String</type> | |
| 889 | - </field> | |
| 890 | - <field> | |
| 891 | - <name>驾驶员</name> | |
| 892 | - <type>String</type> | |
| 893 | - </field> | |
| 894 | - </parameter> | |
| 895 | - <cluster_schema/> | |
| 896 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 897 | - <xloc>603</xloc> | |
| 898 | - <yloc>142</yloc> | |
| 899 | - <draw>Y</draw> | |
| 900 | - </GUI> | |
| 901 | - </step> | |
| 902 | - | |
| 903 | - <step_error_handling> | |
| 904 | - <error> | |
| 905 | - <source_step>插入/更新bsth_c_s_ecinfo</source_step> | |
| 906 | - <target_step>错误输出</target_step> | |
| 907 | - <is_enabled>Y</is_enabled> | |
| 908 | - <nr_valuename>error_count</nr_valuename> | |
| 909 | - <descriptions_valuename>error_desc</descriptions_valuename> | |
| 910 | - <fields_valuename>error_column1</fields_valuename> | |
| 911 | - <codes_valuename>error_column2</codes_valuename> | |
| 912 | - <max_errors/> | |
| 913 | - <max_pct_errors/> | |
| 914 | - <min_pct_rows/> | |
| 915 | - </error> | |
| 916 | - </step_error_handling> | |
| 917 | - <slave-step-copy-partition-distribution> | |
| 918 | -</slave-step-copy-partition-distribution> | |
| 919 | - <slave_transformation>N</slave_transformation> | |
| 920 | - | |
| 921 | -</transformation> | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<transformation> | |
| 3 | + <info> | |
| 4 | + <name>人员配置信息导入</name> | |
| 5 | + <description>人员配置信息导入</description> | |
| 6 | + <extended_description>人员配置信息</extended_description> | |
| 7 | + <trans_version/> | |
| 8 | + <trans_type>Normal</trans_type> | |
| 9 | + <trans_status>0</trans_status> | |
| 10 | + <directory>/</directory> | |
| 11 | + <parameters> | |
| 12 | + <parameter> | |
| 13 | + <name>erroroutputdir</name> | |
| 14 | + <default_value/> | |
| 15 | + <description>ktr step配置的错误输出目录</description> | |
| 16 | + </parameter> | |
| 17 | + <parameter> | |
| 18 | + <name>filepath</name> | |
| 19 | + <default_value/> | |
| 20 | + <description>待处理导入的excel文件</description> | |
| 21 | + </parameter> | |
| 22 | + </parameters> | |
| 23 | + <log> | |
| 24 | +<trans-log-table><connection/> | |
| 25 | +<schema/> | |
| 26 | +<table/> | |
| 27 | +<size_limit_lines/> | |
| 28 | +<interval/> | |
| 29 | +<timeout_days/> | |
| 30 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | |
| 31 | +<perf-log-table><connection/> | |
| 32 | +<schema/> | |
| 33 | +<table/> | |
| 34 | +<interval/> | |
| 35 | +<timeout_days/> | |
| 36 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | |
| 37 | +<channel-log-table><connection/> | |
| 38 | +<schema/> | |
| 39 | +<table/> | |
| 40 | +<timeout_days/> | |
| 41 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | |
| 42 | +<step-log-table><connection/> | |
| 43 | +<schema/> | |
| 44 | +<table/> | |
| 45 | +<timeout_days/> | |
| 46 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | |
| 47 | +<metrics-log-table><connection/> | |
| 48 | +<schema/> | |
| 49 | +<table/> | |
| 50 | +<timeout_days/> | |
| 51 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | |
| 52 | + </log> | |
| 53 | + <maxdate> | |
| 54 | + <connection/> | |
| 55 | + <table/> | |
| 56 | + <field/> | |
| 57 | + <offset>0.0</offset> | |
| 58 | + <maxdiff>0.0</maxdiff> | |
| 59 | + </maxdate> | |
| 60 | + <size_rowset>10000</size_rowset> | |
| 61 | + <sleep_time_empty>50</sleep_time_empty> | |
| 62 | + <sleep_time_full>50</sleep_time_full> | |
| 63 | + <unique_connections>N</unique_connections> | |
| 64 | + <feedback_shown>Y</feedback_shown> | |
| 65 | + <feedback_size>50000</feedback_size> | |
| 66 | + <using_thread_priorities>Y</using_thread_priorities> | |
| 67 | + <shared_objects_file/> | |
| 68 | + <capture_step_performance>N</capture_step_performance> | |
| 69 | + <step_performance_capturing_delay>1000</step_performance_capturing_delay> | |
| 70 | + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | |
| 71 | + <dependencies> | |
| 72 | + </dependencies> | |
| 73 | + <partitionschemas> | |
| 74 | + </partitionschemas> | |
| 75 | + <slaveservers> | |
| 76 | + </slaveservers> | |
| 77 | + <clusterschemas> | |
| 78 | + </clusterschemas> | |
| 79 | + <created_user>-</created_user> | |
| 80 | + <created_date>2016/06/29 15:12:27.273</created_date> | |
| 81 | + <modified_user>-</modified_user> | |
| 82 | + <modified_date>2016/06/29 15:12:27.273</modified_date> | |
| 83 | + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | |
| 84 | + <is_key_private>N</is_key_private> | |
| 85 | + </info> | |
| 86 | + <notepads> | |
| 87 | + <notepad> | |
| 88 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | |
| 89 | + <xloc>101</xloc> | |
| 90 | + <yloc>264</yloc> | |
| 91 | + <width>333</width> | |
| 92 | + <heigth>90</heigth> | |
| 93 | + <fontname>YaHei Consolas Hybrid</fontname> | |
| 94 | + <fontsize>12</fontsize> | |
| 95 | + <fontbold>N</fontbold> | |
| 96 | + <fontitalic>N</fontitalic> | |
| 97 | + <fontcolorred>0</fontcolorred> | |
| 98 | + <fontcolorgreen>0</fontcolorgreen> | |
| 99 | + <fontcolorblue>0</fontcolorblue> | |
| 100 | + <backgroundcolorred>255</backgroundcolorred> | |
| 101 | + <backgroundcolorgreen>205</backgroundcolorgreen> | |
| 102 | + <backgroundcolorblue>112</backgroundcolorblue> | |
| 103 | + <bordercolorred>100</bordercolorred> | |
| 104 | + <bordercolorgreen>100</bordercolorgreen> | |
| 105 | + <bordercolorblue>100</bordercolorblue> | |
| 106 | + <drawshadow>Y</drawshadow> | |
| 107 | + </notepad> | |
| 108 | + </notepads> | |
| 109 | + <connection> | |
| 110 | + <name>192.168.168.1_jwgl_dw</name> | |
| 111 | + <server>192.168.168.1</server> | |
| 112 | + <type>ORACLE</type> | |
| 113 | + <access>Native</access> | |
| 114 | + <database>orcl</database> | |
| 115 | + <port>1521</port> | |
| 116 | + <username>jwgl_dw</username> | |
| 117 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | |
| 118 | + <servername/> | |
| 119 | + <data_tablespace/> | |
| 120 | + <index_tablespace/> | |
| 121 | + <attributes> | |
| 122 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 123 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 124 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 125 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 126 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 127 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 128 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 129 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 130 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 131 | + </attributes> | |
| 132 | + </connection> | |
| 133 | + <connection> | |
| 134 | + <name>bus_control_variable</name> | |
| 135 | + <server>${v_db_ip}</server> | |
| 136 | + <type>MYSQL</type> | |
| 137 | + <access>Native</access> | |
| 138 | + <database>${v_db_dname}</database> | |
| 139 | + <port>3306</port> | |
| 140 | + <username>${v_db_uname}</username> | |
| 141 | + <password>${v_db_pwd}</password> | |
| 142 | + <servername/> | |
| 143 | + <data_tablespace/> | |
| 144 | + <index_tablespace/> | |
| 145 | + <attributes> | |
| 146 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | |
| 147 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 148 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 149 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 150 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 151 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 152 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 153 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 154 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 155 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 156 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 157 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 158 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 159 | + </attributes> | |
| 160 | + </connection> | |
| 161 | + <connection> | |
| 162 | + <name>bus_control_公司_201</name> | |
| 163 | + <server>localhost</server> | |
| 164 | + <type>MYSQL</type> | |
| 165 | + <access>Native</access> | |
| 166 | + <database>control</database> | |
| 167 | + <port>3306</port> | |
| 168 | + <username>root</username> | |
| 169 | + <password>Encrypted </password> | |
| 170 | + <servername/> | |
| 171 | + <data_tablespace/> | |
| 172 | + <index_tablespace/> | |
| 173 | + <attributes> | |
| 174 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 175 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 176 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 177 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 178 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 179 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 180 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 181 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 182 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 183 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 184 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 185 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 186 | + </attributes> | |
| 187 | + </connection> | |
| 188 | + <connection> | |
| 189 | + <name>bus_control_本机</name> | |
| 190 | + <server>localhost</server> | |
| 191 | + <type>MYSQL</type> | |
| 192 | + <access>Native</access> | |
| 193 | + <database>control</database> | |
| 194 | + <port>3306</port> | |
| 195 | + <username>root</username> | |
| 196 | + <password>Encrypted </password> | |
| 197 | + <servername/> | |
| 198 | + <data_tablespace/> | |
| 199 | + <index_tablespace/> | |
| 200 | + <attributes> | |
| 201 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 202 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 203 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 204 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 205 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 206 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 207 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 208 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 209 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 210 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 211 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 212 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 213 | + </attributes> | |
| 214 | + </connection> | |
| 215 | + <connection> | |
| 216 | + <name>xlab_mysql_youle</name> | |
| 217 | + <server>101.231.124.8</server> | |
| 218 | + <type>MYSQL</type> | |
| 219 | + <access>Native</access> | |
| 220 | + <database>xlab_youle</database> | |
| 221 | + <port>45687</port> | |
| 222 | + <username>xlab-youle</username> | |
| 223 | + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | |
| 224 | + <servername/> | |
| 225 | + <data_tablespace/> | |
| 226 | + <index_tablespace/> | |
| 227 | + <attributes> | |
| 228 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 229 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 230 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 231 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 232 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 233 | + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | |
| 234 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 235 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 236 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 237 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 238 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 239 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 240 | + </attributes> | |
| 241 | + </connection> | |
| 242 | + <connection> | |
| 243 | + <name>xlab_mysql_youle(本机)</name> | |
| 244 | + <server>localhost</server> | |
| 245 | + <type>MYSQL</type> | |
| 246 | + <access>Native</access> | |
| 247 | + <database>xlab_youle</database> | |
| 248 | + <port>3306</port> | |
| 249 | + <username>root</username> | |
| 250 | + <password>Encrypted </password> | |
| 251 | + <servername/> | |
| 252 | + <data_tablespace/> | |
| 253 | + <index_tablespace/> | |
| 254 | + <attributes> | |
| 255 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 256 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 257 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 258 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 259 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 260 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 261 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 262 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 263 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 264 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 265 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 266 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 267 | + </attributes> | |
| 268 | + </connection> | |
| 269 | + <connection> | |
| 270 | + <name>xlab_youle</name> | |
| 271 | + <server/> | |
| 272 | + <type>MYSQL</type> | |
| 273 | + <access>JNDI</access> | |
| 274 | + <database>xlab_youle</database> | |
| 275 | + <port>1521</port> | |
| 276 | + <username/> | |
| 277 | + <password>Encrypted </password> | |
| 278 | + <servername/> | |
| 279 | + <data_tablespace/> | |
| 280 | + <index_tablespace/> | |
| 281 | + <attributes> | |
| 282 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 283 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 284 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 285 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 286 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 287 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 288 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 289 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 290 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 291 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 292 | + </attributes> | |
| 293 | + </connection> | |
| 294 | + <order> | |
| 295 | + <hop> <from>插入/更新bsth_c_s_ecinfo</from><to>错误输出</to><enabled>Y</enabled> </hop> | |
| 296 | + <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 297 | + <hop> <from>原始系统导出的Excel输入</from><to>启用被数据flag</to><enabled>Y</enabled> </hop> | |
| 298 | + <hop> <from>启用被数据flag</from><to>线路id查询</to><enabled>Y</enabled> </hop> | |
| 299 | + <hop> <from>线路id查询</from><to>过滤线路id为空记录</to><enabled>Y</enabled> </hop> | |
| 300 | + <hop> <from>驾驶员id查找</from><to>过滤驾驶员id为空记录</to><enabled>Y</enabled> </hop> | |
| 301 | + <hop> <from>过滤驾驶员id为空记录</from><to>售票员id查找</to><enabled>Y</enabled> </hop> | |
| 302 | + <hop> <from>售票员id查找</from><to>插入/更新bsth_c_s_ecinfo</to><enabled>Y</enabled> </hop> | |
| 303 | + <hop> <from>过滤线路id为空记录</from><to>驾驶员id查找</to><enabled>Y</enabled> </hop> | |
| 304 | + </order> | |
| 305 | + <step> | |
| 306 | + <name>原始系统导出的Excel输入</name> | |
| 307 | + <type>ExcelInput</type> | |
| 308 | + <description/> | |
| 309 | + <distribute>Y</distribute> | |
| 310 | + <custom_distribution/> | |
| 311 | + <copies>1</copies> | |
| 312 | + <partitioning> | |
| 313 | + <method>none</method> | |
| 314 | + <schema_name/> | |
| 315 | + </partitioning> | |
| 316 | + <header>Y</header> | |
| 317 | + <noempty>Y</noempty> | |
| 318 | + <stoponempty>N</stoponempty> | |
| 319 | + <filefield/> | |
| 320 | + <sheetfield/> | |
| 321 | + <sheetrownumfield/> | |
| 322 | + <rownumfield/> | |
| 323 | + <sheetfield/> | |
| 324 | + <filefield/> | |
| 325 | + <limit>0</limit> | |
| 326 | + <encoding/> | |
| 327 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 328 | + <accept_filenames>Y</accept_filenames> | |
| 329 | + <accept_field>filepath_</accept_field> | |
| 330 | + <accept_stepname>获取变量</accept_stepname> | |
| 331 | + <file> | |
| 332 | + <name/> | |
| 333 | + <filemask/> | |
| 334 | + <exclude_filemask/> | |
| 335 | + <file_required>N</file_required> | |
| 336 | + <include_subfolders>N</include_subfolders> | |
| 337 | + </file> | |
| 338 | + <fields> | |
| 339 | + <field> | |
| 340 | + <name>线路</name> | |
| 341 | + <type>String</type> | |
| 342 | + <length>-1</length> | |
| 343 | + <precision>-1</precision> | |
| 344 | + <trim_type>none</trim_type> | |
| 345 | + <repeat>N</repeat> | |
| 346 | + <format/> | |
| 347 | + <currency/> | |
| 348 | + <decimal/> | |
| 349 | + <group/> | |
| 350 | + </field> | |
| 351 | + <field> | |
| 352 | + <name>搭班编码</name> | |
| 353 | + <type>String</type> | |
| 354 | + <length>-1</length> | |
| 355 | + <precision>-1</precision> | |
| 356 | + <trim_type>none</trim_type> | |
| 357 | + <repeat>N</repeat> | |
| 358 | + <format>#</format> | |
| 359 | + <currency/> | |
| 360 | + <decimal/> | |
| 361 | + <group/> | |
| 362 | + </field> | |
| 363 | + <field> | |
| 364 | + <name>驾驶员工号</name> | |
| 365 | + <type>String</type> | |
| 366 | + <length>-1</length> | |
| 367 | + <precision>-1</precision> | |
| 368 | + <trim_type>none</trim_type> | |
| 369 | + <repeat>N</repeat> | |
| 370 | + <format>#</format> | |
| 371 | + <currency/> | |
| 372 | + <decimal/> | |
| 373 | + <group/> | |
| 374 | + </field> | |
| 375 | + <field> | |
| 376 | + <name>驾驶员</name> | |
| 377 | + <type>String</type> | |
| 378 | + <length>-1</length> | |
| 379 | + <precision>-1</precision> | |
| 380 | + <trim_type>none</trim_type> | |
| 381 | + <repeat>N</repeat> | |
| 382 | + <format/> | |
| 383 | + <currency/> | |
| 384 | + <decimal/> | |
| 385 | + <group/> | |
| 386 | + </field> | |
| 387 | + <field> | |
| 388 | + <name>售票员工号</name> | |
| 389 | + <type>String</type> | |
| 390 | + <length>-1</length> | |
| 391 | + <precision>-1</precision> | |
| 392 | + <trim_type>none</trim_type> | |
| 393 | + <repeat>N</repeat> | |
| 394 | + <format>#</format> | |
| 395 | + <currency/> | |
| 396 | + <decimal/> | |
| 397 | + <group/> | |
| 398 | + </field> | |
| 399 | + <field> | |
| 400 | + <name>售票员</name> | |
| 401 | + <type>String</type> | |
| 402 | + <length>-1</length> | |
| 403 | + <precision>-1</precision> | |
| 404 | + <trim_type>none</trim_type> | |
| 405 | + <repeat>N</repeat> | |
| 406 | + <format/> | |
| 407 | + <currency/> | |
| 408 | + <decimal/> | |
| 409 | + <group/> | |
| 410 | + </field> | |
| 411 | + </fields> | |
| 412 | + <sheets> | |
| 413 | + <sheet> | |
| 414 | + <name>工作表1</name> | |
| 415 | + <startrow>0</startrow> | |
| 416 | + <startcol>0</startcol> | |
| 417 | + </sheet> | |
| 418 | + </sheets> | |
| 419 | + <strict_types>N</strict_types> | |
| 420 | + <error_ignored>N</error_ignored> | |
| 421 | + <error_line_skipped>N</error_line_skipped> | |
| 422 | + <bad_line_files_destination_directory/> | |
| 423 | + <bad_line_files_extension>warning</bad_line_files_extension> | |
| 424 | + <error_line_files_destination_directory/> | |
| 425 | + <error_line_files_extension>error</error_line_files_extension> | |
| 426 | + <line_number_files_destination_directory/> | |
| 427 | + <line_number_files_extension>line</line_number_files_extension> | |
| 428 | + <shortFileFieldName/> | |
| 429 | + <pathFieldName/> | |
| 430 | + <hiddenFieldName/> | |
| 431 | + <lastModificationTimeFieldName/> | |
| 432 | + <uriNameFieldName/> | |
| 433 | + <rootUriNameFieldName/> | |
| 434 | + <extensionFieldName/> | |
| 435 | + <sizeFieldName/> | |
| 436 | + <spreadsheet_type>JXL</spreadsheet_type> | |
| 437 | + <cluster_schema/> | |
| 438 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 439 | + <xloc>93</xloc> | |
| 440 | + <yloc>51</yloc> | |
| 441 | + <draw>Y</draw> | |
| 442 | + </GUI> | |
| 443 | + </step> | |
| 444 | + | |
| 445 | + <step> | |
| 446 | + <name>启用被数据flag</name> | |
| 447 | + <type>Constant</type> | |
| 448 | + <description/> | |
| 449 | + <distribute>Y</distribute> | |
| 450 | + <custom_distribution/> | |
| 451 | + <copies>1</copies> | |
| 452 | + <partitioning> | |
| 453 | + <method>none</method> | |
| 454 | + <schema_name/> | |
| 455 | + </partitioning> | |
| 456 | + <fields> | |
| 457 | + <field> | |
| 458 | + <name>isCancel</name> | |
| 459 | + <type>Integer</type> | |
| 460 | + <format/> | |
| 461 | + <currency/> | |
| 462 | + <decimal/> | |
| 463 | + <group/> | |
| 464 | + <nullif>0</nullif> | |
| 465 | + <length>-1</length> | |
| 466 | + <precision>-1</precision> | |
| 467 | + <set_empty_string>N</set_empty_string> | |
| 468 | + </field> | |
| 469 | + </fields> | |
| 470 | + <cluster_schema/> | |
| 471 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 472 | + <xloc>225</xloc> | |
| 473 | + <yloc>53</yloc> | |
| 474 | + <draw>Y</draw> | |
| 475 | + </GUI> | |
| 476 | + </step> | |
| 477 | + | |
| 478 | + <step> | |
| 479 | + <name>售票员id查找</name> | |
| 480 | + <type>DBJoin</type> | |
| 481 | + <description/> | |
| 482 | + <distribute>Y</distribute> | |
| 483 | + <custom_distribution/> | |
| 484 | + <copies>1</copies> | |
| 485 | + <partitioning> | |
| 486 | + <method>none</method> | |
| 487 | + <schema_name/> | |
| 488 | + </partitioning> | |
| 489 | + <connection>bus_control_variable</connection> | |
| 490 | + <rowlimit>1</rowlimit> | |
| 491 | + <sql>select id as sid from bsth_c_personnel
where job_codeori = ? and personnel_name = ?</sql> | |
| 492 | + <outer_join>Y</outer_join> | |
| 493 | + <replace_vars>N</replace_vars> | |
| 494 | + <parameter> | |
| 495 | + <field> | |
| 496 | + <name>售票员工号</name> | |
| 497 | + <type>String</type> | |
| 498 | + </field> | |
| 499 | + <field> | |
| 500 | + <name>售票员</name> | |
| 501 | + <type>String</type> | |
| 502 | + </field> | |
| 503 | + </parameter> | |
| 504 | + <cluster_schema/> | |
| 505 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 506 | + <xloc>830</xloc> | |
| 507 | + <yloc>45</yloc> | |
| 508 | + <draw>Y</draw> | |
| 509 | + </GUI> | |
| 510 | + </step> | |
| 511 | + | |
| 512 | + <step> | |
| 513 | + <name>插入/更新bsth_c_s_ecinfo</name> | |
| 514 | + <type>InsertUpdate</type> | |
| 515 | + <description/> | |
| 516 | + <distribute>Y</distribute> | |
| 517 | + <custom_distribution/> | |
| 518 | + <copies>1</copies> | |
| 519 | + <partitioning> | |
| 520 | + <method>none</method> | |
| 521 | + <schema_name/> | |
| 522 | + </partitioning> | |
| 523 | + <connection>bus_control_variable</connection> | |
| 524 | + <commit>100</commit> | |
| 525 | + <update_bypassed>N</update_bypassed> | |
| 526 | + <lookup> | |
| 527 | + <schema/> | |
| 528 | + <table>bsth_c_s_ecinfo</table> | |
| 529 | + <key> | |
| 530 | + <name>xlid</name> | |
| 531 | + <field>xl</field> | |
| 532 | + <condition>=</condition> | |
| 533 | + <name2/> | |
| 534 | + </key> | |
| 535 | + <key> | |
| 536 | + <name>搭班编码</name> | |
| 537 | + <field>dbbm</field> | |
| 538 | + <condition>=</condition> | |
| 539 | + <name2/> | |
| 540 | + </key> | |
| 541 | + <key> | |
| 542 | + <name>isCancel</name> | |
| 543 | + <field>is_cancel</field> | |
| 544 | + <condition>=</condition> | |
| 545 | + <name2/> | |
| 546 | + </key> | |
| 547 | + <value> | |
| 548 | + <name>xl</name> | |
| 549 | + <rename>xlid</rename> | |
| 550 | + <update>Y</update> | |
| 551 | + </value> | |
| 552 | + <value> | |
| 553 | + <name>dbbm</name> | |
| 554 | + <rename>搭班编码</rename> | |
| 555 | + <update>Y</update> | |
| 556 | + </value> | |
| 557 | + <value> | |
| 558 | + <name>jsy</name> | |
| 559 | + <rename>jid</rename> | |
| 560 | + <update>Y</update> | |
| 561 | + </value> | |
| 562 | + <value> | |
| 563 | + <name>spy</name> | |
| 564 | + <rename>sid</rename> | |
| 565 | + <update>Y</update> | |
| 566 | + </value> | |
| 567 | + <value> | |
| 568 | + <name>is_cancel</name> | |
| 569 | + <rename>isCancel</rename> | |
| 570 | + <update>Y</update> | |
| 571 | + </value> | |
| 572 | + </lookup> | |
| 573 | + <cluster_schema/> | |
| 574 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 575 | + <xloc>833</xloc> | |
| 576 | + <yloc>198</yloc> | |
| 577 | + <draw>Y</draw> | |
| 578 | + </GUI> | |
| 579 | + </step> | |
| 580 | + | |
| 581 | + <step> | |
| 582 | + <name>线路id查询</name> | |
| 583 | + <type>DBLookup</type> | |
| 584 | + <description/> | |
| 585 | + <distribute>Y</distribute> | |
| 586 | + <custom_distribution/> | |
| 587 | + <copies>1</copies> | |
| 588 | + <partitioning> | |
| 589 | + <method>none</method> | |
| 590 | + <schema_name/> | |
| 591 | + </partitioning> | |
| 592 | + <connection>bus_control_variable</connection> | |
| 593 | + <cache>Y</cache> | |
| 594 | + <cache_load_all>Y</cache_load_all> | |
| 595 | + <cache_size>0</cache_size> | |
| 596 | + <lookup> | |
| 597 | + <schema/> | |
| 598 | + <table>bsth_c_line</table> | |
| 599 | + <orderby/> | |
| 600 | + <fail_on_multiple>N</fail_on_multiple> | |
| 601 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 602 | + <key> | |
| 603 | + <name>线路</name> | |
| 604 | + <field>name</field> | |
| 605 | + <condition>=</condition> | |
| 606 | + <name2/> | |
| 607 | + </key> | |
| 608 | + <key> | |
| 609 | + <name>isCancel</name> | |
| 610 | + <field>destroy</field> | |
| 611 | + <condition>=</condition> | |
| 612 | + <name2/> | |
| 613 | + </key> | |
| 614 | + <value> | |
| 615 | + <name>id</name> | |
| 616 | + <rename>xlid</rename> | |
| 617 | + <default/> | |
| 618 | + <type>Integer</type> | |
| 619 | + </value> | |
| 620 | + </lookup> | |
| 621 | + <cluster_schema/> | |
| 622 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 623 | + <xloc>397</xloc> | |
| 624 | + <yloc>144</yloc> | |
| 625 | + <draw>Y</draw> | |
| 626 | + </GUI> | |
| 627 | + </step> | |
| 628 | + | |
| 629 | + <step> | |
| 630 | + <name>获取变量</name> | |
| 631 | + <type>GetVariable</type> | |
| 632 | + <description/> | |
| 633 | + <distribute>Y</distribute> | |
| 634 | + <custom_distribution/> | |
| 635 | + <copies>1</copies> | |
| 636 | + <partitioning> | |
| 637 | + <method>none</method> | |
| 638 | + <schema_name/> | |
| 639 | + </partitioning> | |
| 640 | + <fields> | |
| 641 | + <field> | |
| 642 | + <name>filepath_</name> | |
| 643 | + <variable>${filepath}</variable> | |
| 644 | + <type>String</type> | |
| 645 | + <format/> | |
| 646 | + <currency/> | |
| 647 | + <decimal/> | |
| 648 | + <group/> | |
| 649 | + <length>-1</length> | |
| 650 | + <precision>-1</precision> | |
| 651 | + <trim_type>none</trim_type> | |
| 652 | + </field> | |
| 653 | + <field> | |
| 654 | + <name>erroroutputdir_</name> | |
| 655 | + <variable>${erroroutputdir}</variable> | |
| 656 | + <type>String</type> | |
| 657 | + <format/> | |
| 658 | + <currency/> | |
| 659 | + <decimal/> | |
| 660 | + <group/> | |
| 661 | + <length>-1</length> | |
| 662 | + <precision>-1</precision> | |
| 663 | + <trim_type>none</trim_type> | |
| 664 | + </field> | |
| 665 | + </fields> | |
| 666 | + <cluster_schema/> | |
| 667 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 668 | + <xloc>94</xloc> | |
| 669 | + <yloc>178</yloc> | |
| 670 | + <draw>Y</draw> | |
| 671 | + </GUI> | |
| 672 | + </step> | |
| 673 | + | |
| 674 | + <step> | |
| 675 | + <name>过滤线路id为空记录</name> | |
| 676 | + <type>FilterRows</type> | |
| 677 | + <description/> | |
| 678 | + <distribute>Y</distribute> | |
| 679 | + <custom_distribution/> | |
| 680 | + <copies>1</copies> | |
| 681 | + <partitioning> | |
| 682 | + <method>none</method> | |
| 683 | + <schema_name/> | |
| 684 | + </partitioning> | |
| 685 | +<send_true_to/> | |
| 686 | +<send_false_to/> | |
| 687 | + <compare> | |
| 688 | +<condition> | |
| 689 | + <negated>N</negated> | |
| 690 | + <leftvalue>xlid</leftvalue> | |
| 691 | + <function>IS NOT NULL</function> | |
| 692 | + <rightvalue/> | |
| 693 | + </condition> | |
| 694 | + </compare> | |
| 695 | + <cluster_schema/> | |
| 696 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 697 | + <xloc>395</xloc> | |
| 698 | + <yloc>49</yloc> | |
| 699 | + <draw>Y</draw> | |
| 700 | + </GUI> | |
| 701 | + </step> | |
| 702 | + | |
| 703 | + <step> | |
| 704 | + <name>过滤驾驶员id为空记录</name> | |
| 705 | + <type>FilterRows</type> | |
| 706 | + <description/> | |
| 707 | + <distribute>Y</distribute> | |
| 708 | + <custom_distribution/> | |
| 709 | + <copies>1</copies> | |
| 710 | + <partitioning> | |
| 711 | + <method>none</method> | |
| 712 | + <schema_name/> | |
| 713 | + </partitioning> | |
| 714 | +<send_true_to>售票员id查找</send_true_to> | |
| 715 | +<send_false_to/> | |
| 716 | + <compare> | |
| 717 | +<condition> | |
| 718 | + <negated>N</negated> | |
| 719 | + <leftvalue>jid</leftvalue> | |
| 720 | + <function>IS NOT NULL</function> | |
| 721 | + <rightvalue/> | |
| 722 | + </condition> | |
| 723 | + </compare> | |
| 724 | + <cluster_schema/> | |
| 725 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 726 | + <xloc>604</xloc> | |
| 727 | + <yloc>46</yloc> | |
| 728 | + <draw>Y</draw> | |
| 729 | + </GUI> | |
| 730 | + </step> | |
| 731 | + | |
| 732 | + <step> | |
| 733 | + <name>错误输出</name> | |
| 734 | + <type>ExcelOutput</type> | |
| 735 | + <description/> | |
| 736 | + <distribute>Y</distribute> | |
| 737 | + <custom_distribution/> | |
| 738 | + <copies>1</copies> | |
| 739 | + <partitioning> | |
| 740 | + <method>none</method> | |
| 741 | + <schema_name/> | |
| 742 | + </partitioning> | |
| 743 | + <header>Y</header> | |
| 744 | + <footer>N</footer> | |
| 745 | + <encoding>UTF-8</encoding> | |
| 746 | + <append>N</append> | |
| 747 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 748 | + <file> | |
| 749 | + <name>${erroroutputdir}/人员配置_错误</name> | |
| 750 | + <extention>xls</extention> | |
| 751 | + <do_not_open_newfile_init>N</do_not_open_newfile_init> | |
| 752 | + <create_parent_folder>N</create_parent_folder> | |
| 753 | + <split>N</split> | |
| 754 | + <add_date>N</add_date> | |
| 755 | + <add_time>N</add_time> | |
| 756 | + <SpecifyFormat>N</SpecifyFormat> | |
| 757 | + <date_time_format/> | |
| 758 | + <sheetname>Sheet1</sheetname> | |
| 759 | + <autosizecolums>N</autosizecolums> | |
| 760 | + <nullisblank>N</nullisblank> | |
| 761 | + <protect_sheet>N</protect_sheet> | |
| 762 | + <password>Encrypted </password> | |
| 763 | + <splitevery>0</splitevery> | |
| 764 | + <usetempfiles>N</usetempfiles> | |
| 765 | + <tempdirectory/> | |
| 766 | + </file> | |
| 767 | + <template> | |
| 768 | + <enabled>N</enabled> | |
| 769 | + <append>N</append> | |
| 770 | + <filename>template.xls</filename> | |
| 771 | + </template> | |
| 772 | + <fields> | |
| 773 | + <field> | |
| 774 | + <name>线路</name> | |
| 775 | + <type>String</type> | |
| 776 | + <format/> | |
| 777 | + </field> | |
| 778 | + <field> | |
| 779 | + <name>搭班编码</name> | |
| 780 | + <type>String</type> | |
| 781 | + <format/> | |
| 782 | + </field> | |
| 783 | + <field> | |
| 784 | + <name>驾驶员工号</name> | |
| 785 | + <type>String</type> | |
| 786 | + <format/> | |
| 787 | + </field> | |
| 788 | + <field> | |
| 789 | + <name>驾驶员</name> | |
| 790 | + <type>String</type> | |
| 791 | + <format/> | |
| 792 | + </field> | |
| 793 | + <field> | |
| 794 | + <name>售票员工号</name> | |
| 795 | + <type>String</type> | |
| 796 | + <format/> | |
| 797 | + </field> | |
| 798 | + <field> | |
| 799 | + <name>售票员</name> | |
| 800 | + <type>String</type> | |
| 801 | + <format/> | |
| 802 | + </field> | |
| 803 | + <field> | |
| 804 | + <name>isCancel</name> | |
| 805 | + <type>Integer</type> | |
| 806 | + <format/> | |
| 807 | + </field> | |
| 808 | + <field> | |
| 809 | + <name>xlid</name> | |
| 810 | + <type>Integer</type> | |
| 811 | + <format/> | |
| 812 | + </field> | |
| 813 | + <field> | |
| 814 | + <name>jid</name> | |
| 815 | + <type>Integer</type> | |
| 816 | + <format/> | |
| 817 | + </field> | |
| 818 | + <field> | |
| 819 | + <name>sid</name> | |
| 820 | + <type>Integer</type> | |
| 821 | + <format/> | |
| 822 | + </field> | |
| 823 | + <field> | |
| 824 | + <name>error_count</name> | |
| 825 | + <type>Integer</type> | |
| 826 | + <format/> | |
| 827 | + </field> | |
| 828 | + <field> | |
| 829 | + <name>error_desc</name> | |
| 830 | + <type>String</type> | |
| 831 | + <format/> | |
| 832 | + </field> | |
| 833 | + <field> | |
| 834 | + <name>error_column1</name> | |
| 835 | + <type>String</type> | |
| 836 | + <format/> | |
| 837 | + </field> | |
| 838 | + <field> | |
| 839 | + <name>error_column2</name> | |
| 840 | + <type>String</type> | |
| 841 | + <format/> | |
| 842 | + </field> | |
| 843 | + </fields> | |
| 844 | + <custom> | |
| 845 | + <header_font_name>arial</header_font_name> | |
| 846 | + <header_font_size>10</header_font_size> | |
| 847 | + <header_font_bold>N</header_font_bold> | |
| 848 | + <header_font_italic>N</header_font_italic> | |
| 849 | + <header_font_underline>no</header_font_underline> | |
| 850 | + <header_font_orientation>horizontal</header_font_orientation> | |
| 851 | + <header_font_color>black</header_font_color> | |
| 852 | + <header_background_color>none</header_background_color> | |
| 853 | + <header_row_height>255</header_row_height> | |
| 854 | + <header_alignment>left</header_alignment> | |
| 855 | + <header_image/> | |
| 856 | + <row_font_name>arial</row_font_name> | |
| 857 | + <row_font_size>10</row_font_size> | |
| 858 | + <row_font_color>black</row_font_color> | |
| 859 | + <row_background_color>none</row_background_color> | |
| 860 | + </custom> | |
| 861 | + <cluster_schema/> | |
| 862 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 863 | + <xloc>833</xloc> | |
| 864 | + <yloc>321</yloc> | |
| 865 | + <draw>Y</draw> | |
| 866 | + </GUI> | |
| 867 | + </step> | |
| 868 | + | |
| 869 | + <step> | |
| 870 | + <name>驾驶员id查找</name> | |
| 871 | + <type>DBJoin</type> | |
| 872 | + <description/> | |
| 873 | + <distribute>Y</distribute> | |
| 874 | + <custom_distribution/> | |
| 875 | + <copies>1</copies> | |
| 876 | + <partitioning> | |
| 877 | + <method>none</method> | |
| 878 | + <schema_name/> | |
| 879 | + </partitioning> | |
| 880 | + <connection>bus_control_variable</connection> | |
| 881 | + <rowlimit>1</rowlimit> | |
| 882 | + <sql>select id as jid from bsth_c_personnel
where job_codeori = ? and personnel_name = ?</sql> | |
| 883 | + <outer_join>Y</outer_join> | |
| 884 | + <replace_vars>N</replace_vars> | |
| 885 | + <parameter> | |
| 886 | + <field> | |
| 887 | + <name>驾驶员工号</name> | |
| 888 | + <type>String</type> | |
| 889 | + </field> | |
| 890 | + <field> | |
| 891 | + <name>驾驶员</name> | |
| 892 | + <type>String</type> | |
| 893 | + </field> | |
| 894 | + </parameter> | |
| 895 | + <cluster_schema/> | |
| 896 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 897 | + <xloc>603</xloc> | |
| 898 | + <yloc>142</yloc> | |
| 899 | + <draw>Y</draw> | |
| 900 | + </GUI> | |
| 901 | + </step> | |
| 902 | + | |
| 903 | + <step_error_handling> | |
| 904 | + <error> | |
| 905 | + <source_step>插入/更新bsth_c_s_ecinfo</source_step> | |
| 906 | + <target_step>错误输出</target_step> | |
| 907 | + <is_enabled>Y</is_enabled> | |
| 908 | + <nr_valuename>error_count</nr_valuename> | |
| 909 | + <descriptions_valuename>error_desc</descriptions_valuename> | |
| 910 | + <fields_valuename>error_column1</fields_valuename> | |
| 911 | + <codes_valuename>error_column2</codes_valuename> | |
| 912 | + <max_errors/> | |
| 913 | + <max_pct_errors/> | |
| 914 | + <min_pct_rows/> | |
| 915 | + </error> | |
| 916 | + </step_error_handling> | |
| 917 | + <slave-step-copy-partition-distribution> | |
| 918 | +</slave-step-copy-partition-distribution> | |
| 919 | + <slave_transformation>N</slave_transformation> | |
| 920 | + | |
| 921 | +</transformation> | ... | ... |
src/main/resources/datatools/ktrs/employeesConfigDataOutput.ktr
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<transformation> | |
| 3 | - <info> | |
| 4 | - <name>人员配置信息导出</name> | |
| 5 | - <description/> | |
| 6 | - <extended_description/> | |
| 7 | - <trans_version/> | |
| 8 | - <trans_type>Normal</trans_type> | |
| 9 | - <trans_status>0</trans_status> | |
| 10 | - <directory>/</directory> | |
| 11 | - <parameters> | |
| 12 | - <parameter> | |
| 13 | - <name>filepath</name> | |
| 14 | - <default_value/> | |
| 15 | - <description>excel文件路径</description> | |
| 16 | - </parameter> | |
| 17 | - <parameter> | |
| 18 | - <name>xlid</name> | |
| 19 | - <default_value/> | |
| 20 | - <description>线路id</description> | |
| 21 | - </parameter> | |
| 22 | - </parameters> | |
| 23 | - <log> | |
| 24 | -<trans-log-table><connection/> | |
| 25 | -<schema/> | |
| 26 | -<table/> | |
| 27 | -<size_limit_lines/> | |
| 28 | -<interval/> | |
| 29 | -<timeout_days/> | |
| 30 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | |
| 31 | -<perf-log-table><connection/> | |
| 32 | -<schema/> | |
| 33 | -<table/> | |
| 34 | -<interval/> | |
| 35 | -<timeout_days/> | |
| 36 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | |
| 37 | -<channel-log-table><connection/> | |
| 38 | -<schema/> | |
| 39 | -<table/> | |
| 40 | -<timeout_days/> | |
| 41 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | |
| 42 | -<step-log-table><connection/> | |
| 43 | -<schema/> | |
| 44 | -<table/> | |
| 45 | -<timeout_days/> | |
| 46 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | |
| 47 | -<metrics-log-table><connection/> | |
| 48 | -<schema/> | |
| 49 | -<table/> | |
| 50 | -<timeout_days/> | |
| 51 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | |
| 52 | - </log> | |
| 53 | - <maxdate> | |
| 54 | - <connection/> | |
| 55 | - <table/> | |
| 56 | - <field/> | |
| 57 | - <offset>0.0</offset> | |
| 58 | - <maxdiff>0.0</maxdiff> | |
| 59 | - </maxdate> | |
| 60 | - <size_rowset>10000</size_rowset> | |
| 61 | - <sleep_time_empty>50</sleep_time_empty> | |
| 62 | - <sleep_time_full>50</sleep_time_full> | |
| 63 | - <unique_connections>N</unique_connections> | |
| 64 | - <feedback_shown>Y</feedback_shown> | |
| 65 | - <feedback_size>50000</feedback_size> | |
| 66 | - <using_thread_priorities>Y</using_thread_priorities> | |
| 67 | - <shared_objects_file/> | |
| 68 | - <capture_step_performance>N</capture_step_performance> | |
| 69 | - <step_performance_capturing_delay>1000</step_performance_capturing_delay> | |
| 70 | - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | |
| 71 | - <dependencies> | |
| 72 | - </dependencies> | |
| 73 | - <partitionschemas> | |
| 74 | - </partitionschemas> | |
| 75 | - <slaveservers> | |
| 76 | - </slaveservers> | |
| 77 | - <clusterschemas> | |
| 78 | - </clusterschemas> | |
| 79 | - <created_user>-</created_user> | |
| 80 | - <created_date>2017/01/11 15:36:10.101</created_date> | |
| 81 | - <modified_user>-</modified_user> | |
| 82 | - <modified_date>2017/01/11 15:36:10.101</modified_date> | |
| 83 | - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | |
| 84 | - <is_key_private>N</is_key_private> | |
| 85 | - </info> | |
| 86 | - <notepads> | |
| 87 | - <notepad> | |
| 88 | - <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | |
| 89 | - <xloc>66</xloc> | |
| 90 | - <yloc>151</yloc> | |
| 91 | - <width>333</width> | |
| 92 | - <heigth>90</heigth> | |
| 93 | - <fontname>YaHei Consolas Hybrid</fontname> | |
| 94 | - <fontsize>12</fontsize> | |
| 95 | - <fontbold>N</fontbold> | |
| 96 | - <fontitalic>N</fontitalic> | |
| 97 | - <fontcolorred>0</fontcolorred> | |
| 98 | - <fontcolorgreen>0</fontcolorgreen> | |
| 99 | - <fontcolorblue>0</fontcolorblue> | |
| 100 | - <backgroundcolorred>255</backgroundcolorred> | |
| 101 | - <backgroundcolorgreen>205</backgroundcolorgreen> | |
| 102 | - <backgroundcolorblue>112</backgroundcolorblue> | |
| 103 | - <bordercolorred>100</bordercolorred> | |
| 104 | - <bordercolorgreen>100</bordercolorgreen> | |
| 105 | - <bordercolorblue>100</bordercolorblue> | |
| 106 | - <drawshadow>Y</drawshadow> | |
| 107 | - </notepad> | |
| 108 | - </notepads> | |
| 109 | - <connection> | |
| 110 | - <name>192.168.168.1_jwgl_dw</name> | |
| 111 | - <server>192.168.168.1</server> | |
| 112 | - <type>ORACLE</type> | |
| 113 | - <access>Native</access> | |
| 114 | - <database>orcl</database> | |
| 115 | - <port>1521</port> | |
| 116 | - <username>jwgl_dw</username> | |
| 117 | - <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | |
| 118 | - <servername/> | |
| 119 | - <data_tablespace/> | |
| 120 | - <index_tablespace/> | |
| 121 | - <attributes> | |
| 122 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 123 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 124 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 125 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 126 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 127 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 128 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 129 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 130 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 131 | - </attributes> | |
| 132 | - </connection> | |
| 133 | - <connection> | |
| 134 | - <name>bus_control_variable</name> | |
| 135 | - <server>${v_db_ip}</server> | |
| 136 | - <type>MYSQL</type> | |
| 137 | - <access>Native</access> | |
| 138 | - <database>${v_db_dname}</database> | |
| 139 | - <port>3306</port> | |
| 140 | - <username>${v_db_uname}</username> | |
| 141 | - <password>${v_db_pwd}</password> | |
| 142 | - <servername/> | |
| 143 | - <data_tablespace/> | |
| 144 | - <index_tablespace/> | |
| 145 | - <attributes> | |
| 146 | - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | |
| 147 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 148 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 149 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 150 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 151 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 152 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 153 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 154 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 155 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 156 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 157 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 158 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 159 | - </attributes> | |
| 160 | - </connection> | |
| 161 | - <connection> | |
| 162 | - <name>bus_control_公司_201</name> | |
| 163 | - <server>localhost</server> | |
| 164 | - <type>MYSQL</type> | |
| 165 | - <access>Native</access> | |
| 166 | - <database>control</database> | |
| 167 | - <port>3306</port> | |
| 168 | - <username>root</username> | |
| 169 | - <password>Encrypted </password> | |
| 170 | - <servername/> | |
| 171 | - <data_tablespace/> | |
| 172 | - <index_tablespace/> | |
| 173 | - <attributes> | |
| 174 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 175 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 176 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 177 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 178 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 179 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 180 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 181 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 182 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 183 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 184 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 185 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 186 | - </attributes> | |
| 187 | - </connection> | |
| 188 | - <connection> | |
| 189 | - <name>bus_control_本机</name> | |
| 190 | - <server>localhost</server> | |
| 191 | - <type>MYSQL</type> | |
| 192 | - <access>Native</access> | |
| 193 | - <database>control</database> | |
| 194 | - <port>3306</port> | |
| 195 | - <username>root</username> | |
| 196 | - <password>Encrypted </password> | |
| 197 | - <servername/> | |
| 198 | - <data_tablespace/> | |
| 199 | - <index_tablespace/> | |
| 200 | - <attributes> | |
| 201 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 202 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 203 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 204 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 205 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 206 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 207 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 208 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 209 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 210 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 211 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 212 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 213 | - </attributes> | |
| 214 | - </connection> | |
| 215 | - <connection> | |
| 216 | - <name>xlab_mysql_youle</name> | |
| 217 | - <server>101.231.124.8</server> | |
| 218 | - <type>MYSQL</type> | |
| 219 | - <access>Native</access> | |
| 220 | - <database>xlab_youle</database> | |
| 221 | - <port>45687</port> | |
| 222 | - <username>xlab-youle</username> | |
| 223 | - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | |
| 224 | - <servername/> | |
| 225 | - <data_tablespace/> | |
| 226 | - <index_tablespace/> | |
| 227 | - <attributes> | |
| 228 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 229 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 230 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 231 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 232 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 233 | - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | |
| 234 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 235 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 236 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 237 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 238 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 239 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 240 | - </attributes> | |
| 241 | - </connection> | |
| 242 | - <connection> | |
| 243 | - <name>xlab_mysql_youle(本机)</name> | |
| 244 | - <server>localhost</server> | |
| 245 | - <type>MYSQL</type> | |
| 246 | - <access>Native</access> | |
| 247 | - <database>xlab_youle</database> | |
| 248 | - <port>3306</port> | |
| 249 | - <username>root</username> | |
| 250 | - <password>Encrypted </password> | |
| 251 | - <servername/> | |
| 252 | - <data_tablespace/> | |
| 253 | - <index_tablespace/> | |
| 254 | - <attributes> | |
| 255 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 256 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 257 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 258 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 259 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 260 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 261 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 262 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 263 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 264 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 265 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 266 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 267 | - </attributes> | |
| 268 | - </connection> | |
| 269 | - <connection> | |
| 270 | - <name>xlab_youle</name> | |
| 271 | - <server/> | |
| 272 | - <type>MYSQL</type> | |
| 273 | - <access>JNDI</access> | |
| 274 | - <database>xlab_youle</database> | |
| 275 | - <port>1521</port> | |
| 276 | - <username/> | |
| 277 | - <password>Encrypted </password> | |
| 278 | - <servername/> | |
| 279 | - <data_tablespace/> | |
| 280 | - <index_tablespace/> | |
| 281 | - <attributes> | |
| 282 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 283 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 284 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 285 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 286 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 287 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 288 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 289 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 290 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 291 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 292 | - </attributes> | |
| 293 | - </connection> | |
| 294 | - <order> | |
| 295 | - <hop> <from>人员配置(没有作废)</from><to>线路查询</to><enabled>Y</enabled> </hop> | |
| 296 | - <hop> <from>线路查询</from><to>驾驶员查询</to><enabled>Y</enabled> </hop> | |
| 297 | - <hop> <from>驾驶员查询</from><to>售票员查询</to><enabled>Y</enabled> </hop> | |
| 298 | - <hop> <from>售票员查询</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 299 | - <hop> <from>字段选择</from><to>排序记录</to><enabled>Y</enabled> </hop> | |
| 300 | - <hop> <from>排序记录</from><to>Excel输出</to><enabled>Y</enabled> </hop> | |
| 301 | - </order> | |
| 302 | - <step> | |
| 303 | - <name>Excel输出</name> | |
| 304 | - <type>ExcelOutput</type> | |
| 305 | - <description/> | |
| 306 | - <distribute>Y</distribute> | |
| 307 | - <custom_distribution/> | |
| 308 | - <copies>1</copies> | |
| 309 | - <partitioning> | |
| 310 | - <method>none</method> | |
| 311 | - <schema_name/> | |
| 312 | - </partitioning> | |
| 313 | - <header>Y</header> | |
| 314 | - <footer>N</footer> | |
| 315 | - <encoding/> | |
| 316 | - <append>N</append> | |
| 317 | - <add_to_result_filenames>Y</add_to_result_filenames> | |
| 318 | - <file> | |
| 319 | - <name>${filepath}</name> | |
| 320 | - <extention>xls</extention> | |
| 321 | - <do_not_open_newfile_init>N</do_not_open_newfile_init> | |
| 322 | - <create_parent_folder>N</create_parent_folder> | |
| 323 | - <split>N</split> | |
| 324 | - <add_date>N</add_date> | |
| 325 | - <add_time>N</add_time> | |
| 326 | - <SpecifyFormat>N</SpecifyFormat> | |
| 327 | - <date_time_format>yyyyMMddHHmmss</date_time_format> | |
| 328 | - <sheetname>工作表1</sheetname> | |
| 329 | - <autosizecolums>N</autosizecolums> | |
| 330 | - <nullisblank>N</nullisblank> | |
| 331 | - <protect_sheet>N</protect_sheet> | |
| 332 | - <password>Encrypted </password> | |
| 333 | - <splitevery>0</splitevery> | |
| 334 | - <usetempfiles>N</usetempfiles> | |
| 335 | - <tempdirectory/> | |
| 336 | - </file> | |
| 337 | - <template> | |
| 338 | - <enabled>N</enabled> | |
| 339 | - <append>N</append> | |
| 340 | - <filename>template.xls</filename> | |
| 341 | - </template> | |
| 342 | - <fields> | |
| 343 | - <field> | |
| 344 | - <name>线路</name> | |
| 345 | - <type>String</type> | |
| 346 | - <format/> | |
| 347 | - </field> | |
| 348 | - <field> | |
| 349 | - <name>搭班编码</name> | |
| 350 | - <type>String</type> | |
| 351 | - <format/> | |
| 352 | - </field> | |
| 353 | - <field> | |
| 354 | - <name>驾驶员工号</name> | |
| 355 | - <type>String</type> | |
| 356 | - <format/> | |
| 357 | - </field> | |
| 358 | - <field> | |
| 359 | - <name>驾驶员</name> | |
| 360 | - <type>String</type> | |
| 361 | - <format/> | |
| 362 | - </field> | |
| 363 | - <field> | |
| 364 | - <name>售票员工号</name> | |
| 365 | - <type>String</type> | |
| 366 | - <format/> | |
| 367 | - </field> | |
| 368 | - <field> | |
| 369 | - <name>售票员</name> | |
| 370 | - <type>String</type> | |
| 371 | - <format/> | |
| 372 | - </field> | |
| 373 | - </fields> | |
| 374 | - <custom> | |
| 375 | - <header_font_name>arial</header_font_name> | |
| 376 | - <header_font_size>10</header_font_size> | |
| 377 | - <header_font_bold>N</header_font_bold> | |
| 378 | - <header_font_italic>N</header_font_italic> | |
| 379 | - <header_font_underline>no</header_font_underline> | |
| 380 | - <header_font_orientation>horizontal</header_font_orientation> | |
| 381 | - <header_font_color>black</header_font_color> | |
| 382 | - <header_background_color>none</header_background_color> | |
| 383 | - <header_row_height>255</header_row_height> | |
| 384 | - <header_alignment>left</header_alignment> | |
| 385 | - <header_image/> | |
| 386 | - <row_font_name>arial</row_font_name> | |
| 387 | - <row_font_size>10</row_font_size> | |
| 388 | - <row_font_color>black</row_font_color> | |
| 389 | - <row_background_color>none</row_background_color> | |
| 390 | - </custom> | |
| 391 | - <cluster_schema/> | |
| 392 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 393 | - <xloc>696</xloc> | |
| 394 | - <yloc>257</yloc> | |
| 395 | - <draw>Y</draw> | |
| 396 | - </GUI> | |
| 397 | - </step> | |
| 398 | - | |
| 399 | - <step> | |
| 400 | - <name>人员配置(没有作废)</name> | |
| 401 | - <type>TableInput</type> | |
| 402 | - <description/> | |
| 403 | - <distribute>Y</distribute> | |
| 404 | - <custom_distribution/> | |
| 405 | - <copies>1</copies> | |
| 406 | - <partitioning> | |
| 407 | - <method>none</method> | |
| 408 | - <schema_name/> | |
| 409 | - </partitioning> | |
| 410 | - <connection>bus_control_variable</connection> | |
| 411 | - <sql>select * from bsth_c_s_ecinfo where is_cancel = 0 and xl = ${xlid}</sql> | |
| 412 | - <limit>0</limit> | |
| 413 | - <lookup/> | |
| 414 | - <execute_each_row>N</execute_each_row> | |
| 415 | - <variables_active>Y</variables_active> | |
| 416 | - <lazy_conversion_active>N</lazy_conversion_active> | |
| 417 | - <cluster_schema/> | |
| 418 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 419 | - <xloc>90</xloc> | |
| 420 | - <yloc>59</yloc> | |
| 421 | - <draw>Y</draw> | |
| 422 | - </GUI> | |
| 423 | - </step> | |
| 424 | - | |
| 425 | - <step> | |
| 426 | - <name>售票员查询</name> | |
| 427 | - <type>DBJoin</type> | |
| 428 | - <description/> | |
| 429 | - <distribute>Y</distribute> | |
| 430 | - <custom_distribution/> | |
| 431 | - <copies>1</copies> | |
| 432 | - <partitioning> | |
| 433 | - <method>none</method> | |
| 434 | - <schema_name/> | |
| 435 | - </partitioning> | |
| 436 | - <connection>bus_control_variable</connection> | |
| 437 | - <rowlimit>1</rowlimit> | |
| 438 | - <sql>select job_codeori as scode, personnel_name as sname from bsth_c_personnel
where id = ?</sql> | |
| 439 | - <outer_join>Y</outer_join> | |
| 440 | - <replace_vars>N</replace_vars> | |
| 441 | - <parameter> | |
| 442 | - <field> | |
| 443 | - <name>spy</name> | |
| 444 | - <type>Integer</type> | |
| 445 | - </field> | |
| 446 | - </parameter> | |
| 447 | - <cluster_schema/> | |
| 448 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 449 | - <xloc>491</xloc> | |
| 450 | - <yloc>60</yloc> | |
| 451 | - <draw>Y</draw> | |
| 452 | - </GUI> | |
| 453 | - </step> | |
| 454 | - | |
| 455 | - <step> | |
| 456 | - <name>字段选择</name> | |
| 457 | - <type>SelectValues</type> | |
| 458 | - <description/> | |
| 459 | - <distribute>Y</distribute> | |
| 460 | - <custom_distribution/> | |
| 461 | - <copies>1</copies> | |
| 462 | - <partitioning> | |
| 463 | - <method>none</method> | |
| 464 | - <schema_name/> | |
| 465 | - </partitioning> | |
| 466 | - <fields> <field> <name>xlmc</name> | |
| 467 | - <rename>线路</rename> | |
| 468 | - <length>-2</length> | |
| 469 | - <precision>-2</precision> | |
| 470 | - </field> <field> <name>dbbm</name> | |
| 471 | - <rename>搭班编码</rename> | |
| 472 | - <length>-2</length> | |
| 473 | - <precision>-2</precision> | |
| 474 | - </field> <field> <name>jcode</name> | |
| 475 | - <rename>驾驶员工号</rename> | |
| 476 | - <length>-2</length> | |
| 477 | - <precision>-2</precision> | |
| 478 | - </field> <field> <name>jname</name> | |
| 479 | - <rename>驾驶员</rename> | |
| 480 | - <length>-2</length> | |
| 481 | - <precision>-2</precision> | |
| 482 | - </field> <field> <name>scode</name> | |
| 483 | - <rename>售票员工号</rename> | |
| 484 | - <length>-2</length> | |
| 485 | - <precision>-2</precision> | |
| 486 | - </field> <field> <name>sname</name> | |
| 487 | - <rename>售票员</rename> | |
| 488 | - <length>-2</length> | |
| 489 | - <precision>-2</precision> | |
| 490 | - </field> <select_unspecified>N</select_unspecified> | |
| 491 | - </fields> <cluster_schema/> | |
| 492 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 493 | - <xloc>492</xloc> | |
| 494 | - <yloc>164</yloc> | |
| 495 | - <draw>Y</draw> | |
| 496 | - </GUI> | |
| 497 | - </step> | |
| 498 | - | |
| 499 | - <step> | |
| 500 | - <name>排序记录</name> | |
| 501 | - <type>SortRows</type> | |
| 502 | - <description/> | |
| 503 | - <distribute>Y</distribute> | |
| 504 | - <custom_distribution/> | |
| 505 | - <copies>1</copies> | |
| 506 | - <partitioning> | |
| 507 | - <method>none</method> | |
| 508 | - <schema_name/> | |
| 509 | - </partitioning> | |
| 510 | - <directory>%%java.io.tmpdir%%</directory> | |
| 511 | - <prefix>out</prefix> | |
| 512 | - <sort_size>1000000</sort_size> | |
| 513 | - <free_memory/> | |
| 514 | - <compress>N</compress> | |
| 515 | - <compress_variable/> | |
| 516 | - <unique_rows>N</unique_rows> | |
| 517 | - <fields> | |
| 518 | - <field> | |
| 519 | - <name>线路</name> | |
| 520 | - <ascending>Y</ascending> | |
| 521 | - <case_sensitive>N</case_sensitive> | |
| 522 | - <presorted>N</presorted> | |
| 523 | - </field> | |
| 524 | - <field> | |
| 525 | - <name>搭班编码</name> | |
| 526 | - <ascending>Y</ascending> | |
| 527 | - <case_sensitive>N</case_sensitive> | |
| 528 | - <presorted>N</presorted> | |
| 529 | - </field> | |
| 530 | - </fields> | |
| 531 | - <cluster_schema/> | |
| 532 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 533 | - <xloc>692</xloc> | |
| 534 | - <yloc>164</yloc> | |
| 535 | - <draw>Y</draw> | |
| 536 | - </GUI> | |
| 537 | - </step> | |
| 538 | - | |
| 539 | - <step> | |
| 540 | - <name>线路查询</name> | |
| 541 | - <type>DBLookup</type> | |
| 542 | - <description/> | |
| 543 | - <distribute>Y</distribute> | |
| 544 | - <custom_distribution/> | |
| 545 | - <copies>1</copies> | |
| 546 | - <partitioning> | |
| 547 | - <method>none</method> | |
| 548 | - <schema_name/> | |
| 549 | - </partitioning> | |
| 550 | - <connection>bus_control_variable</connection> | |
| 551 | - <cache>Y</cache> | |
| 552 | - <cache_load_all>Y</cache_load_all> | |
| 553 | - <cache_size>0</cache_size> | |
| 554 | - <lookup> | |
| 555 | - <schema/> | |
| 556 | - <table>bsth_c_line</table> | |
| 557 | - <orderby/> | |
| 558 | - <fail_on_multiple>N</fail_on_multiple> | |
| 559 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 560 | - <key> | |
| 561 | - <name>xl</name> | |
| 562 | - <field>id</field> | |
| 563 | - <condition>=</condition> | |
| 564 | - <name2/> | |
| 565 | - </key> | |
| 566 | - <value> | |
| 567 | - <name>name</name> | |
| 568 | - <rename>xlmc</rename> | |
| 569 | - <default/> | |
| 570 | - <type>String</type> | |
| 571 | - </value> | |
| 572 | - </lookup> | |
| 573 | - <cluster_schema/> | |
| 574 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 575 | - <xloc>227</xloc> | |
| 576 | - <yloc>59</yloc> | |
| 577 | - <draw>Y</draw> | |
| 578 | - </GUI> | |
| 579 | - </step> | |
| 580 | - | |
| 581 | - <step> | |
| 582 | - <name>驾驶员查询</name> | |
| 583 | - <type>DBJoin</type> | |
| 584 | - <description/> | |
| 585 | - <distribute>Y</distribute> | |
| 586 | - <custom_distribution/> | |
| 587 | - <copies>1</copies> | |
| 588 | - <partitioning> | |
| 589 | - <method>none</method> | |
| 590 | - <schema_name/> | |
| 591 | - </partitioning> | |
| 592 | - <connection>bus_control_variable</connection> | |
| 593 | - <rowlimit>1</rowlimit> | |
| 594 | - <sql>select job_codeori as jcode, personnel_name as jname from bsth_c_personnel
where id = ?</sql> | |
| 595 | - <outer_join>Y</outer_join> | |
| 596 | - <replace_vars>N</replace_vars> | |
| 597 | - <parameter> | |
| 598 | - <field> | |
| 599 | - <name>jsy</name> | |
| 600 | - <type>Integer</type> | |
| 601 | - </field> | |
| 602 | - </parameter> | |
| 603 | - <cluster_schema/> | |
| 604 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 605 | - <xloc>366</xloc> | |
| 606 | - <yloc>60</yloc> | |
| 607 | - <draw>Y</draw> | |
| 608 | - </GUI> | |
| 609 | - </step> | |
| 610 | - | |
| 611 | - <step_error_handling> | |
| 612 | - </step_error_handling> | |
| 613 | - <slave-step-copy-partition-distribution> | |
| 614 | -</slave-step-copy-partition-distribution> | |
| 615 | - <slave_transformation>N</slave_transformation> | |
| 616 | - | |
| 617 | -</transformation> | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<transformation> | |
| 3 | + <info> | |
| 4 | + <name>人员配置信息导出</name> | |
| 5 | + <description/> | |
| 6 | + <extended_description/> | |
| 7 | + <trans_version/> | |
| 8 | + <trans_type>Normal</trans_type> | |
| 9 | + <trans_status>0</trans_status> | |
| 10 | + <directory>/</directory> | |
| 11 | + <parameters> | |
| 12 | + <parameter> | |
| 13 | + <name>filepath</name> | |
| 14 | + <default_value/> | |
| 15 | + <description>excel文件路径</description> | |
| 16 | + </parameter> | |
| 17 | + <parameter> | |
| 18 | + <name>xlid</name> | |
| 19 | + <default_value/> | |
| 20 | + <description>线路id</description> | |
| 21 | + </parameter> | |
| 22 | + </parameters> | |
| 23 | + <log> | |
| 24 | +<trans-log-table><connection/> | |
| 25 | +<schema/> | |
| 26 | +<table/> | |
| 27 | +<size_limit_lines/> | |
| 28 | +<interval/> | |
| 29 | +<timeout_days/> | |
| 30 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | |
| 31 | +<perf-log-table><connection/> | |
| 32 | +<schema/> | |
| 33 | +<table/> | |
| 34 | +<interval/> | |
| 35 | +<timeout_days/> | |
| 36 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | |
| 37 | +<channel-log-table><connection/> | |
| 38 | +<schema/> | |
| 39 | +<table/> | |
| 40 | +<timeout_days/> | |
| 41 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | |
| 42 | +<step-log-table><connection/> | |
| 43 | +<schema/> | |
| 44 | +<table/> | |
| 45 | +<timeout_days/> | |
| 46 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | |
| 47 | +<metrics-log-table><connection/> | |
| 48 | +<schema/> | |
| 49 | +<table/> | |
| 50 | +<timeout_days/> | |
| 51 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | |
| 52 | + </log> | |
| 53 | + <maxdate> | |
| 54 | + <connection/> | |
| 55 | + <table/> | |
| 56 | + <field/> | |
| 57 | + <offset>0.0</offset> | |
| 58 | + <maxdiff>0.0</maxdiff> | |
| 59 | + </maxdate> | |
| 60 | + <size_rowset>10000</size_rowset> | |
| 61 | + <sleep_time_empty>50</sleep_time_empty> | |
| 62 | + <sleep_time_full>50</sleep_time_full> | |
| 63 | + <unique_connections>N</unique_connections> | |
| 64 | + <feedback_shown>Y</feedback_shown> | |
| 65 | + <feedback_size>50000</feedback_size> | |
| 66 | + <using_thread_priorities>Y</using_thread_priorities> | |
| 67 | + <shared_objects_file/> | |
| 68 | + <capture_step_performance>N</capture_step_performance> | |
| 69 | + <step_performance_capturing_delay>1000</step_performance_capturing_delay> | |
| 70 | + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | |
| 71 | + <dependencies> | |
| 72 | + </dependencies> | |
| 73 | + <partitionschemas> | |
| 74 | + </partitionschemas> | |
| 75 | + <slaveservers> | |
| 76 | + </slaveservers> | |
| 77 | + <clusterschemas> | |
| 78 | + </clusterschemas> | |
| 79 | + <created_user>-</created_user> | |
| 80 | + <created_date>2017/01/11 15:36:10.101</created_date> | |
| 81 | + <modified_user>-</modified_user> | |
| 82 | + <modified_date>2017/01/11 15:36:10.101</modified_date> | |
| 83 | + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | |
| 84 | + <is_key_private>N</is_key_private> | |
| 85 | + </info> | |
| 86 | + <notepads> | |
| 87 | + <notepad> | |
| 88 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | |
| 89 | + <xloc>66</xloc> | |
| 90 | + <yloc>151</yloc> | |
| 91 | + <width>333</width> | |
| 92 | + <heigth>90</heigth> | |
| 93 | + <fontname>YaHei Consolas Hybrid</fontname> | |
| 94 | + <fontsize>12</fontsize> | |
| 95 | + <fontbold>N</fontbold> | |
| 96 | + <fontitalic>N</fontitalic> | |
| 97 | + <fontcolorred>0</fontcolorred> | |
| 98 | + <fontcolorgreen>0</fontcolorgreen> | |
| 99 | + <fontcolorblue>0</fontcolorblue> | |
| 100 | + <backgroundcolorred>255</backgroundcolorred> | |
| 101 | + <backgroundcolorgreen>205</backgroundcolorgreen> | |
| 102 | + <backgroundcolorblue>112</backgroundcolorblue> | |
| 103 | + <bordercolorred>100</bordercolorred> | |
| 104 | + <bordercolorgreen>100</bordercolorgreen> | |
| 105 | + <bordercolorblue>100</bordercolorblue> | |
| 106 | + <drawshadow>Y</drawshadow> | |
| 107 | + </notepad> | |
| 108 | + </notepads> | |
| 109 | + <connection> | |
| 110 | + <name>192.168.168.1_jwgl_dw</name> | |
| 111 | + <server>192.168.168.1</server> | |
| 112 | + <type>ORACLE</type> | |
| 113 | + <access>Native</access> | |
| 114 | + <database>orcl</database> | |
| 115 | + <port>1521</port> | |
| 116 | + <username>jwgl_dw</username> | |
| 117 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | |
| 118 | + <servername/> | |
| 119 | + <data_tablespace/> | |
| 120 | + <index_tablespace/> | |
| 121 | + <attributes> | |
| 122 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 123 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 124 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 125 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 126 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 127 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 128 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 129 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 130 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 131 | + </attributes> | |
| 132 | + </connection> | |
| 133 | + <connection> | |
| 134 | + <name>bus_control_variable</name> | |
| 135 | + <server>${v_db_ip}</server> | |
| 136 | + <type>MYSQL</type> | |
| 137 | + <access>Native</access> | |
| 138 | + <database>${v_db_dname}</database> | |
| 139 | + <port>3306</port> | |
| 140 | + <username>${v_db_uname}</username> | |
| 141 | + <password>${v_db_pwd}</password> | |
| 142 | + <servername/> | |
| 143 | + <data_tablespace/> | |
| 144 | + <index_tablespace/> | |
| 145 | + <attributes> | |
| 146 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | |
| 147 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 148 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 149 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 150 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 151 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 152 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 153 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 154 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 155 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 156 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 157 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 158 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 159 | + </attributes> | |
| 160 | + </connection> | |
| 161 | + <connection> | |
| 162 | + <name>bus_control_公司_201</name> | |
| 163 | + <server>localhost</server> | |
| 164 | + <type>MYSQL</type> | |
| 165 | + <access>Native</access> | |
| 166 | + <database>control</database> | |
| 167 | + <port>3306</port> | |
| 168 | + <username>root</username> | |
| 169 | + <password>Encrypted </password> | |
| 170 | + <servername/> | |
| 171 | + <data_tablespace/> | |
| 172 | + <index_tablespace/> | |
| 173 | + <attributes> | |
| 174 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 175 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 176 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 177 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 178 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 179 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 180 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 181 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 182 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | |
| 183 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 184 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 185 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 186 | + </attributes> | |
| 187 | + </connection> | |
| 188 | + <connection> | |
| 189 | + <name>bus_control_本机</name> | |
| 190 | + <server>localhost</server> | |
| 191 | + <type>MYSQL</type> | |
| 192 | + <access>Native</access> | |
| 193 | + <database>control</database> | |
| 194 | + <port>3306</port> | |
| 195 | + <username>root</username> | |
| 196 | + <password>Encrypted </password> | |
| 197 | + <servername/> | |
| 198 | + <data_tablespace/> | |
| 199 | + <index_tablespace/> | |
| 200 | + <attributes> | |
| 201 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 202 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 203 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 204 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 205 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 206 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 207 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 208 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 209 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 210 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 211 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 212 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 213 | + </attributes> | |
| 214 | + </connection> | |
| 215 | + <connection> | |
| 216 | + <name>xlab_mysql_youle</name> | |
| 217 | + <server>101.231.124.8</server> | |
| 218 | + <type>MYSQL</type> | |
| 219 | + <access>Native</access> | |
| 220 | + <database>xlab_youle</database> | |
| 221 | + <port>45687</port> | |
| 222 | + <username>xlab-youle</username> | |
| 223 | + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | |
| 224 | + <servername/> | |
| 225 | + <data_tablespace/> | |
| 226 | + <index_tablespace/> | |
| 227 | + <attributes> | |
| 228 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 229 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 230 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 231 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 232 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 233 | + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | |
| 234 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 235 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 236 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 237 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 238 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 239 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 240 | + </attributes> | |
| 241 | + </connection> | |
| 242 | + <connection> | |
| 243 | + <name>xlab_mysql_youle(本机)</name> | |
| 244 | + <server>localhost</server> | |
| 245 | + <type>MYSQL</type> | |
| 246 | + <access>Native</access> | |
| 247 | + <database>xlab_youle</database> | |
| 248 | + <port>3306</port> | |
| 249 | + <username>root</username> | |
| 250 | + <password>Encrypted </password> | |
| 251 | + <servername/> | |
| 252 | + <data_tablespace/> | |
| 253 | + <index_tablespace/> | |
| 254 | + <attributes> | |
| 255 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | |
| 256 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | |
| 257 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 258 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 259 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 260 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | |
| 261 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 262 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 263 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 264 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 265 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | |
| 266 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 267 | + </attributes> | |
| 268 | + </connection> | |
| 269 | + <connection> | |
| 270 | + <name>xlab_youle</name> | |
| 271 | + <server/> | |
| 272 | + <type>MYSQL</type> | |
| 273 | + <access>JNDI</access> | |
| 274 | + <database>xlab_youle</database> | |
| 275 | + <port>1521</port> | |
| 276 | + <username/> | |
| 277 | + <password>Encrypted </password> | |
| 278 | + <servername/> | |
| 279 | + <data_tablespace/> | |
| 280 | + <index_tablespace/> | |
| 281 | + <attributes> | |
| 282 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | |
| 283 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | |
| 284 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | |
| 285 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | |
| 286 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | |
| 287 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | |
| 288 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | |
| 289 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 290 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | |
| 291 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | |
| 292 | + </attributes> | |
| 293 | + </connection> | |
| 294 | + <order> | |
| 295 | + <hop> <from>人员配置(没有作废)</from><to>线路查询</to><enabled>Y</enabled> </hop> | |
| 296 | + <hop> <from>线路查询</from><to>驾驶员查询</to><enabled>Y</enabled> </hop> | |
| 297 | + <hop> <from>驾驶员查询</from><to>售票员查询</to><enabled>Y</enabled> </hop> | |
| 298 | + <hop> <from>售票员查询</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 299 | + <hop> <from>字段选择</from><to>排序记录</to><enabled>Y</enabled> </hop> | |
| 300 | + <hop> <from>排序记录</from><to>Excel输出</to><enabled>Y</enabled> </hop> | |
| 301 | + </order> | |
| 302 | + <step> | |
| 303 | + <name>Excel输出</name> | |
| 304 | + <type>ExcelOutput</type> | |
| 305 | + <description/> | |
| 306 | + <distribute>Y</distribute> | |
| 307 | + <custom_distribution/> | |
| 308 | + <copies>1</copies> | |
| 309 | + <partitioning> | |
| 310 | + <method>none</method> | |
| 311 | + <schema_name/> | |
| 312 | + </partitioning> | |
| 313 | + <header>Y</header> | |
| 314 | + <footer>N</footer> | |
| 315 | + <encoding/> | |
| 316 | + <append>N</append> | |
| 317 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 318 | + <file> | |
| 319 | + <name>${filepath}</name> | |
| 320 | + <extention>xls</extention> | |
| 321 | + <do_not_open_newfile_init>N</do_not_open_newfile_init> | |
| 322 | + <create_parent_folder>N</create_parent_folder> | |
| 323 | + <split>N</split> | |
| 324 | + <add_date>N</add_date> | |
| 325 | + <add_time>N</add_time> | |
| 326 | + <SpecifyFormat>N</SpecifyFormat> | |
| 327 | + <date_time_format>yyyyMMddHHmmss</date_time_format> | |
| 328 | + <sheetname>工作表1</sheetname> | |
| 329 | + <autosizecolums>N</autosizecolums> | |
| 330 | + <nullisblank>N</nullisblank> | |
| 331 | + <protect_sheet>N</protect_sheet> | |
| 332 | + <password>Encrypted </password> | |
| 333 | + <splitevery>0</splitevery> | |
| 334 | + <usetempfiles>N</usetempfiles> | |
| 335 | + <tempdirectory/> | |
| 336 | + </file> | |
| 337 | + <template> | |
| 338 | + <enabled>N</enabled> | |
| 339 | + <append>N</append> | |
| 340 | + <filename>template.xls</filename> | |
| 341 | + </template> | |
| 342 | + <fields> | |
| 343 | + <field> | |
| 344 | + <name>线路</name> | |
| 345 | + <type>String</type> | |
| 346 | + <format/> | |
| 347 | + </field> | |
| 348 | + <field> | |
| 349 | + <name>搭班编码</name> | |
| 350 | + <type>String</type> | |
| 351 | + <format/> | |
| 352 | + </field> | |
| 353 | + <field> | |
| 354 | + <name>驾驶员工号</name> | |
| 355 | + <type>String</type> | |
| 356 | + <format/> | |
| 357 | + </field> | |
| 358 | + <field> | |
| 359 | + <name>驾驶员</name> | |
| 360 | + <type>String</type> | |
| 361 | + <format/> | |
| 362 | + </field> | |
| 363 | + <field> | |
| 364 | + <name>售票员工号</name> | |
| 365 | + <type>String</type> | |
| 366 | + <format/> | |
| 367 | + </field> | |
| 368 | + <field> | |
| 369 | + <name>售票员</name> | |
| 370 | + <type>String</type> | |
| 371 | + <format/> | |
| 372 | + </field> | |
| 373 | + </fields> | |
| 374 | + <custom> | |
| 375 | + <header_font_name>arial</header_font_name> | |
| 376 | + <header_font_size>10</header_font_size> | |
| 377 | + <header_font_bold>N</header_font_bold> | |
| 378 | + <header_font_italic>N</header_font_italic> | |
| 379 | + <header_font_underline>no</header_font_underline> | |
| 380 | + <header_font_orientation>horizontal</header_font_orientation> | |
| 381 | + <header_font_color>black</header_font_color> | |
| 382 | + <header_background_color>none</header_background_color> | |
| 383 | + <header_row_height>255</header_row_height> | |
| 384 | + <header_alignment>left</header_alignment> | |
| 385 | + <header_image/> | |
| 386 | + <row_font_name>arial</row_font_name> | |
| 387 | + <row_font_size>10</row_font_size> | |
| 388 | + <row_font_color>black</row_font_color> | |
| 389 | + <row_background_color>none</row_background_color> | |
| 390 | + </custom> | |
| 391 | + <cluster_schema/> | |
| 392 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 393 | + <xloc>696</xloc> | |
| 394 | + <yloc>257</yloc> | |
| 395 | + <draw>Y</draw> | |
| 396 | + </GUI> | |
| 397 | + </step> | |
| 398 | + | |
| 399 | + <step> | |
| 400 | + <name>人员配置(没有作废)</name> | |
| 401 | + <type>TableInput</type> | |
| 402 | + <description/> | |
| 403 | + <distribute>Y</distribute> | |
| 404 | + <custom_distribution/> | |
| 405 | + <copies>1</copies> | |
| 406 | + <partitioning> | |
| 407 | + <method>none</method> | |
| 408 | + <schema_name/> | |
| 409 | + </partitioning> | |
| 410 | + <connection>bus_control_variable</connection> | |
| 411 | + <sql>select * from bsth_c_s_ecinfo where is_cancel = 0 and xl = ${xlid}</sql> | |
| 412 | + <limit>0</limit> | |
| 413 | + <lookup/> | |
| 414 | + <execute_each_row>N</execute_each_row> | |
| 415 | + <variables_active>Y</variables_active> | |
| 416 | + <lazy_conversion_active>N</lazy_conversion_active> | |
| 417 | + <cluster_schema/> | |
| 418 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 419 | + <xloc>90</xloc> | |
| 420 | + <yloc>59</yloc> | |
| 421 | + <draw>Y</draw> | |
| 422 | + </GUI> | |
| 423 | + </step> | |
| 424 | + | |
| 425 | + <step> | |
| 426 | + <name>售票员查询</name> | |
| 427 | + <type>DBJoin</type> | |
| 428 | + <description/> | |
| 429 | + <distribute>Y</distribute> | |
| 430 | + <custom_distribution/> | |
| 431 | + <copies>1</copies> | |
| 432 | + <partitioning> | |
| 433 | + <method>none</method> | |
| 434 | + <schema_name/> | |
| 435 | + </partitioning> | |
| 436 | + <connection>bus_control_variable</connection> | |
| 437 | + <rowlimit>1</rowlimit> | |
| 438 | + <sql>select job_codeori as scode, personnel_name as sname from bsth_c_personnel
where id = ?</sql> | |
| 439 | + <outer_join>Y</outer_join> | |
| 440 | + <replace_vars>N</replace_vars> | |
| 441 | + <parameter> | |
| 442 | + <field> | |
| 443 | + <name>spy</name> | |
| 444 | + <type>Integer</type> | |
| 445 | + </field> | |
| 446 | + </parameter> | |
| 447 | + <cluster_schema/> | |
| 448 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 449 | + <xloc>491</xloc> | |
| 450 | + <yloc>60</yloc> | |
| 451 | + <draw>Y</draw> | |
| 452 | + </GUI> | |
| 453 | + </step> | |
| 454 | + | |
| 455 | + <step> | |
| 456 | + <name>字段选择</name> | |
| 457 | + <type>SelectValues</type> | |
| 458 | + <description/> | |
| 459 | + <distribute>Y</distribute> | |
| 460 | + <custom_distribution/> | |
| 461 | + <copies>1</copies> | |
| 462 | + <partitioning> | |
| 463 | + <method>none</method> | |
| 464 | + <schema_name/> | |
| 465 | + </partitioning> | |
| 466 | + <fields> <field> <name>xlmc</name> | |
| 467 | + <rename>线路</rename> | |
| 468 | + <length>-2</length> | |
| 469 | + <precision>-2</precision> | |
| 470 | + </field> <field> <name>dbbm</name> | |
| 471 | + <rename>搭班编码</rename> | |
| 472 | + <length>-2</length> | |
| 473 | + <precision>-2</precision> | |
| 474 | + </field> <field> <name>jcode</name> | |
| 475 | + <rename>驾驶员工号</rename> | |
| 476 | + <length>-2</length> | |
| 477 | + <precision>-2</precision> | |
| 478 | + </field> <field> <name>jname</name> | |
| 479 | + <rename>驾驶员</rename> | |
| 480 | + <length>-2</length> | |
| 481 | + <precision>-2</precision> | |
| 482 | + </field> <field> <name>scode</name> | |
| 483 | + <rename>售票员工号</rename> | |
| 484 | + <length>-2</length> | |
| 485 | + <precision>-2</precision> | |
| 486 | + </field> <field> <name>sname</name> | |
| 487 | + <rename>售票员</rename> | |
| 488 | + <length>-2</length> | |
| 489 | + <precision>-2</precision> | |
| 490 | + </field> <select_unspecified>N</select_unspecified> | |
| 491 | + </fields> <cluster_schema/> | |
| 492 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 493 | + <xloc>492</xloc> | |
| 494 | + <yloc>164</yloc> | |
| 495 | + <draw>Y</draw> | |
| 496 | + </GUI> | |
| 497 | + </step> | |
| 498 | + | |
| 499 | + <step> | |
| 500 | + <name>排序记录</name> | |
| 501 | + <type>SortRows</type> | |
| 502 | + <description/> | |
| 503 | + <distribute>Y</distribute> | |
| 504 | + <custom_distribution/> | |
| 505 | + <copies>1</copies> | |
| 506 | + <partitioning> | |
| 507 | + <method>none</method> | |
| 508 | + <schema_name/> | |
| 509 | + </partitioning> | |
| 510 | + <directory>%%java.io.tmpdir%%</directory> | |
| 511 | + <prefix>out</prefix> | |
| 512 | + <sort_size>1000000</sort_size> | |
| 513 | + <free_memory/> | |
| 514 | + <compress>N</compress> | |
| 515 | + <compress_variable/> | |
| 516 | + <unique_rows>N</unique_rows> | |
| 517 | + <fields> | |
| 518 | + <field> | |
| 519 | + <name>线路</name> | |
| 520 | + <ascending>Y</ascending> | |
| 521 | + <case_sensitive>N</case_sensitive> | |
| 522 | + <presorted>N</presorted> | |
| 523 | + </field> | |
| 524 | + <field> | |
| 525 | + <name>搭班编码</name> | |
| 526 | + <ascending>Y</ascending> | |
| 527 | + <case_sensitive>N</case_sensitive> | |
| 528 | + <presorted>N</presorted> | |
| 529 | + </field> | |
| 530 | + </fields> | |
| 531 | + <cluster_schema/> | |
| 532 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 533 | + <xloc>692</xloc> | |
| 534 | + <yloc>164</yloc> | |
| 535 | + <draw>Y</draw> | |
| 536 | + </GUI> | |
| 537 | + </step> | |
| 538 | + | |
| 539 | + <step> | |
| 540 | + <name>线路查询</name> | |
| 541 | + <type>DBLookup</type> | |
| 542 | + <description/> | |
| 543 | + <distribute>Y</distribute> | |
| 544 | + <custom_distribution/> | |
| 545 | + <copies>1</copies> | |
| 546 | + <partitioning> | |
| 547 | + <method>none</method> | |
| 548 | + <schema_name/> | |
| 549 | + </partitioning> | |
| 550 | + <connection>bus_control_variable</connection> | |
| 551 | + <cache>Y</cache> | |
| 552 | + <cache_load_all>Y</cache_load_all> | |
| 553 | + <cache_size>0</cache_size> | |
| 554 | + <lookup> | |
| 555 | + <schema/> | |
| 556 | + <table>bsth_c_line</table> | |
| 557 | + <orderby/> | |
| 558 | + <fail_on_multiple>N</fail_on_multiple> | |
| 559 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 560 | + <key> | |
| 561 | + <name>xl</name> | |
| 562 | + <field>id</field> | |
| 563 | + <condition>=</condition> | |
| 564 | + <name2/> | |
| 565 | + </key> | |
| 566 | + <value> | |
| 567 | + <name>name</name> | |
| 568 | + <rename>xlmc</rename> | |
| 569 | + <default/> | |
| 570 | + <type>String</type> | |
| 571 | + </value> | |
| 572 | + </lookup> | |
| 573 | + <cluster_schema/> | |
| 574 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 575 | + <xloc>227</xloc> | |
| 576 | + <yloc>59</yloc> | |
| 577 | + <draw>Y</draw> | |
| 578 | + </GUI> | |
| 579 | + </step> | |
| 580 | + | |
| 581 | + <step> | |
| 582 | + <name>驾驶员查询</name> | |
| 583 | + <type>DBJoin</type> | |
| 584 | + <description/> | |
| 585 | + <distribute>Y</distribute> | |
| 586 | + <custom_distribution/> | |
| 587 | + <copies>1</copies> | |
| 588 | + <partitioning> | |
| 589 | + <method>none</method> | |
| 590 | + <schema_name/> | |
| 591 | + </partitioning> | |
| 592 | + <connection>bus_control_variable</connection> | |
| 593 | + <rowlimit>1</rowlimit> | |
| 594 | + <sql>select job_codeori as jcode, personnel_name as jname from bsth_c_personnel
where id = ?</sql> | |
| 595 | + <outer_join>Y</outer_join> | |
| 596 | + <replace_vars>N</replace_vars> | |
| 597 | + <parameter> | |
| 598 | + <field> | |
| 599 | + <name>jsy</name> | |
| 600 | + <type>Integer</type> | |
| 601 | + </field> | |
| 602 | + </parameter> | |
| 603 | + <cluster_schema/> | |
| 604 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 605 | + <xloc>366</xloc> | |
| 606 | + <yloc>60</yloc> | |
| 607 | + <draw>Y</draw> | |
| 608 | + </GUI> | |
| 609 | + </step> | |
| 610 | + | |
| 611 | + <step_error_handling> | |
| 612 | + </step_error_handling> | |
| 613 | + <slave-step-copy-partition-distribution> | |
| 614 | +</slave-step-copy-partition-distribution> | |
| 615 | + <slave_transformation>N</slave_transformation> | |
| 616 | + | |
| 617 | +</transformation> | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/strategy/BcObj.js
| 1 | -/** | |
| 2 | - * 班次类型对象(最后转换成显示用bc对象) | |
| 3 | - * @param bcType | |
| 4 | - * @param isUp | |
| 5 | - * @param lp | |
| 6 | - * @param fcno | |
| 7 | - * @param fcTimeObj | |
| 8 | - * @param paramObj | |
| 9 | - * @returns {{}} | |
| 10 | - * @constructor | |
| 11 | - */ | |
| 12 | -var BcObj = function(bcType, isUp, lp, fcno, fcTimeObj, paramObj) { | |
| 13 | - | |
| 14 | - //---------- 内部属性 ----------// | |
| 15 | - var _bcType = bcType; // 班次类型(normal,in,out等) | |
| 16 | - var _isUp = isUp; // true表示上行,false表示下行 | |
| 17 | - var _lp = lp; // 路牌 | |
| 18 | - var _fcno = fcno; // 发车顺序号 | |
| 19 | - | |
| 20 | - // 计算的属性,TODO:还有其他属性 | |
| 21 | - // 上标线里属于第几圈(本班次方向和标线方向一致,才有意义) | |
| 22 | - var qCount; | |
| 23 | - | |
| 24 | - // 班次里程 | |
| 25 | - var _bclc = StrategyUtils.calcuTravelLcNumber(_isUp, _bcType, paramObj); | |
| 26 | - // 发车时间 | |
| 27 | - var _fcsjObj = moment(fcTimeObj); | |
| 28 | - // 班次时间 | |
| 29 | - var _bcsj = StrategyUtils.calcuTravelTime(_fcsjObj, _isUp, paramObj); | |
| 30 | - // 到达时间 | |
| 31 | - var _arrsj = StrategyUtils.addMinute(_fcsjObj, _bcsj); | |
| 32 | - // 到达后的停站时间(使用到达时间判定) | |
| 33 | - var _stopTime = StrategyUtils.calcuFixedStopNumber(_arrsj, !_isUp, paramObj); | |
| 34 | - | |
| 35 | - return { | |
| 36 | - /** | |
| 37 | - * 是否上行。 | |
| 38 | - * @returns boolean | |
| 39 | - */ | |
| 40 | - isUp: function() { | |
| 41 | - return _isUp; | |
| 42 | - }, | |
| 43 | - /** | |
| 44 | - * 获取发车时间。 | |
| 45 | - * @returns {*|moment.Moment} | |
| 46 | - */ | |
| 47 | - getFcTimeObj: function() { | |
| 48 | - return _fcsjObj; | |
| 49 | - }, | |
| 50 | - /** | |
| 51 | - * 获取班次时间。 | |
| 52 | - */ | |
| 53 | - getBcTime: function() { | |
| 54 | - return _bcsj; | |
| 55 | - }, | |
| 56 | - /** | |
| 57 | - * 获取停站时间。 | |
| 58 | - * @returns {*} | |
| 59 | - */ | |
| 60 | - getStopTime: function() { | |
| 61 | - return _stopTime; | |
| 62 | - }, | |
| 63 | - | |
| 64 | - /** | |
| 65 | - * 转换成显示用班次对象。 | |
| 66 | - */ | |
| 67 | - toGanttBcObj: function() { | |
| 68 | - var _bcObj = { | |
| 69 | - parent: _lp, | |
| 70 | - lpNo: _lp, | |
| 71 | - lp: null, | |
| 72 | - lpName: _lp, | |
| 73 | - lpType: '普通路牌', | |
| 74 | - bcType: _bcType, | |
| 75 | - fcno: _fcno, | |
| 76 | - isfb: 0, | |
| 77 | - isSwitchXl: null, | |
| 78 | - bz: null | |
| 79 | - }; | |
| 80 | - | |
| 81 | - // 线路上下行 | |
| 82 | - _bcObj.xlDir = _isUp ? "relationshipGraph-up" : "relationshipGraph-down"; | |
| 83 | - | |
| 84 | - // 里程 | |
| 85 | - _bcObj.jhlc = _bclc; | |
| 86 | - | |
| 87 | - // 停车场 | |
| 88 | - _bcObj.tcc = paramObj.getTccId(); | |
| 89 | - | |
| 90 | - // 时刻表 | |
| 91 | - _bcObj.ttinfo = paramObj.getTTinfoId(); | |
| 92 | - | |
| 93 | - // 线路 | |
| 94 | - _bcObj.xl = paramObj.getXlId(); | |
| 95 | - | |
| 96 | - // 起点站、终点站 | |
| 97 | - _bcObj.qdz = _isUp ? paramObj.getUpQdzObj().id : paramObj.getDownQdzObj().id; | |
| 98 | - _bcObj.zdz = _isUp ? paramObj.getUpZdzObj().id : paramObj.getDownZdzObj().id; | |
| 99 | - | |
| 100 | - // 发车时间,行驶时间,到达时间,停站时间 | |
| 101 | - _bcObj.fcsj = _fcsjObj.format("HH:mm"); | |
| 102 | - _bcObj.bcsj = _bcsj; | |
| 103 | - _bcObj.ARRIVALTIME = _arrsj.format("HH:mm"); | |
| 104 | - _bcObj.STOPTIME = _stopTime; | |
| 105 | - | |
| 106 | - return _bcObj; | |
| 107 | - } | |
| 108 | - }; | |
| 1 | +/** | |
| 2 | + * 班次类型对象(最后转换成显示用bc对象) | |
| 3 | + * @param bcType | |
| 4 | + * @param isUp | |
| 5 | + * @param lp | |
| 6 | + * @param fcno | |
| 7 | + * @param fcTimeObj | |
| 8 | + * @param paramObj | |
| 9 | + * @returns {{}} | |
| 10 | + * @constructor | |
| 11 | + */ | |
| 12 | +var BcObj = function(bcType, isUp, lp, fcno, fcTimeObj, paramObj) { | |
| 13 | + | |
| 14 | + //---------- 内部属性 ----------// | |
| 15 | + var _bcType = bcType; // 班次类型(normal,in,out等) | |
| 16 | + var _isUp = isUp; // true表示上行,false表示下行 | |
| 17 | + var _lp = lp; // 路牌 | |
| 18 | + var _fcno = fcno; // 发车顺序号 | |
| 19 | + | |
| 20 | + // 计算的属性,TODO:还有其他属性 | |
| 21 | + // 上标线里属于第几圈(本班次方向和标线方向一致,才有意义) | |
| 22 | + var qCount; | |
| 23 | + | |
| 24 | + // 班次里程 | |
| 25 | + var _bclc = StrategyUtils.calcuTravelLcNumber(_isUp, _bcType, paramObj); | |
| 26 | + // 发车时间 | |
| 27 | + var _fcsjObj = moment(fcTimeObj); | |
| 28 | + // 班次时间 | |
| 29 | + var _bcsj = StrategyUtils.calcuTravelTime(_fcsjObj, _isUp, paramObj); | |
| 30 | + // 到达时间 | |
| 31 | + var _arrsj = StrategyUtils.addMinute(_fcsjObj, _bcsj); | |
| 32 | + // 到达后的停站时间(使用到达时间判定) | |
| 33 | + var _stopTime = StrategyUtils.calcuFixedStopNumber(_arrsj, !_isUp, paramObj); | |
| 34 | + | |
| 35 | + return { | |
| 36 | + /** | |
| 37 | + * 是否上行。 | |
| 38 | + * @returns boolean | |
| 39 | + */ | |
| 40 | + isUp: function() { | |
| 41 | + return _isUp; | |
| 42 | + }, | |
| 43 | + /** | |
| 44 | + * 获取发车时间。 | |
| 45 | + * @returns {*|moment.Moment} | |
| 46 | + */ | |
| 47 | + getFcTimeObj: function() { | |
| 48 | + return _fcsjObj; | |
| 49 | + }, | |
| 50 | + /** | |
| 51 | + * 获取班次时间。 | |
| 52 | + */ | |
| 53 | + getBcTime: function() { | |
| 54 | + return _bcsj; | |
| 55 | + }, | |
| 56 | + /** | |
| 57 | + * 获取停站时间。 | |
| 58 | + * @returns {*} | |
| 59 | + */ | |
| 60 | + getStopTime: function() { | |
| 61 | + return _stopTime; | |
| 62 | + }, | |
| 63 | + | |
| 64 | + /** | |
| 65 | + * 转换成显示用班次对象。 | |
| 66 | + */ | |
| 67 | + toGanttBcObj: function() { | |
| 68 | + var _bcObj = { | |
| 69 | + parent: _lp, | |
| 70 | + lpNo: _lp, | |
| 71 | + lp: null, | |
| 72 | + lpName: _lp, | |
| 73 | + lpType: '普通路牌', | |
| 74 | + bcType: _bcType, | |
| 75 | + fcno: _fcno, | |
| 76 | + isfb: 0, | |
| 77 | + isSwitchXl: null, | |
| 78 | + bz: null | |
| 79 | + }; | |
| 80 | + | |
| 81 | + // 线路上下行 | |
| 82 | + _bcObj.xlDir = _isUp ? "relationshipGraph-up" : "relationshipGraph-down"; | |
| 83 | + | |
| 84 | + // 里程 | |
| 85 | + _bcObj.jhlc = _bclc; | |
| 86 | + | |
| 87 | + // 停车场 | |
| 88 | + _bcObj.tcc = paramObj.getTccId(); | |
| 89 | + | |
| 90 | + // 时刻表 | |
| 91 | + _bcObj.ttinfo = paramObj.getTTinfoId(); | |
| 92 | + | |
| 93 | + // 线路 | |
| 94 | + _bcObj.xl = paramObj.getXlId(); | |
| 95 | + | |
| 96 | + // 起点站、终点站 | |
| 97 | + _bcObj.qdz = _isUp ? paramObj.getUpQdzObj().id : paramObj.getDownQdzObj().id; | |
| 98 | + _bcObj.zdz = _isUp ? paramObj.getUpZdzObj().id : paramObj.getDownZdzObj().id; | |
| 99 | + | |
| 100 | + // 发车时间,行驶时间,到达时间,停站时间 | |
| 101 | + _bcObj.fcsj = _fcsjObj.format("HH:mm"); | |
| 102 | + _bcObj.bcsj = _bcsj; | |
| 103 | + _bcObj.ARRIVALTIME = _arrsj.format("HH:mm"); | |
| 104 | + _bcObj.STOPTIME = _stopTime; | |
| 105 | + | |
| 106 | + return _bcObj; | |
| 107 | + } | |
| 108 | + }; | |
| 109 | 109 | }; |
| 110 | 110 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/strategy/ParameterObj.js
| 1 | -/** | |
| 2 | - * 包装表单参数为内部参数对象。 | |
| 3 | - * @param formMap 表单form参数map | |
| 4 | - * @param dataMap | |
| 5 | - * @constructor | |
| 6 | - * | |
| 7 | - * 注意:moment是mutable,所有的moment操作都会改变原有对象的值, | |
| 8 | - * 所以所有的操作都要小心处理。 | |
| 9 | - */ | |
| 10 | -var ParameterObj = function(formMap, dataMap) { | |
| 11 | - // 内部保存的form参数 | |
| 12 | - var _formMap = formMap; | |
| 13 | - // 计算行驶时间对象 | |
| 14 | - var _travelTimeObj_fun = function() { | |
| 15 | - var upMoningPeakTravelTime = | |
| 16 | - isNaN(_formMap.earlyUpTime) ? | |
| 17 | - parseInt(_formMap.upTravelTime) : | |
| 18 | - parseInt(_formMap.earlyUpTime); | |
| 19 | - var downMoningPeakTravelTime = | |
| 20 | - isNaN(_formMap.earlyDownTime) ? | |
| 21 | - parseInt(_formMap.downTravelTime) : | |
| 22 | - parseInt(_formMap.earlyDownTime); | |
| 23 | - var upEveningPeakTravelTime = | |
| 24 | - isNaN(_formMap.lateUpTime) ? | |
| 25 | - parseInt(_formMap.upTravelTime) : | |
| 26 | - parseInt(_formMap.lateUpTime); | |
| 27 | - var downEveningPeakTravelTime = | |
| 28 | - isNaN(_formMap.lateDownTime) ? | |
| 29 | - parseInt(_formMap.downTravelTime) : | |
| 30 | - parseInt(_formMap.lateDownTime); | |
| 31 | - var upTroughTravelTime = | |
| 32 | - isNaN(_formMap.troughUpTime) ? | |
| 33 | - parseInt(_formMap.upTravelTime) : | |
| 34 | - parseInt(_formMap.troughUpTime); | |
| 35 | - var downTroughTravelTime = | |
| 36 | - isNaN(_formMap.troughDownTime) ? | |
| 37 | - parseInt(_formMap.downTravelTime) : | |
| 38 | - parseInt(_formMap.troughDownTime); | |
| 39 | - | |
| 40 | - return { // TODO:暂时获取标准信息,之后改成历史数据,可能需要使用promise封装 | |
| 41 | - "moningpeak": [ | |
| 42 | - upMoningPeakTravelTime, | |
| 43 | - downMoningPeakTravelTime | |
| 44 | - ], | |
| 45 | - "eveningpeak": [ | |
| 46 | - upEveningPeakTravelTime, | |
| 47 | - downEveningPeakTravelTime | |
| 48 | - ], | |
| 49 | - "trough": [ | |
| 50 | - upTroughTravelTime, | |
| 51 | - downTroughTravelTime | |
| 52 | - ] | |
| 53 | - } | |
| 54 | - }; | |
| 55 | - var _travelTimeObj = _travelTimeObj_fun(); | |
| 56 | - | |
| 57 | - // 计算行驶里程对象 | |
| 58 | - var _travelLcObj_fun = function() { | |
| 59 | - return [ | |
| 60 | - { // 上行里程 | |
| 61 | - "normalLc": isNaN(_formMap.upMileage) ? 0 : parseFloat(_formMap.upMileage), | |
| 62 | - "inLc": isNaN(_formMap.upInMileage) ? 0 : parseFloat(_formMap.upInMileage), | |
| 63 | - "outLc": isNaN(_formMap.upOutMileage) ? 0 : parseFloat(_formMap.upOutMileage) | |
| 64 | - }, | |
| 65 | - { // 下行里程 | |
| 66 | - "normalLc": isNaN(_formMap.downMileage) ? 0 : parseFloat(_formMap.downMileage), | |
| 67 | - "inLc": isNaN(_formMap.downInMileage) ? 0 : parseFloat(_formMap.downInMileage), | |
| 68 | - "outLc": isNaN(_formMap.downOutMileage) ? 0 : parseFloat(_formMap.downOutMileage) | |
| 69 | - } | |
| 70 | - ]; | |
| 71 | - }; | |
| 72 | - var _travelLcObj = _travelLcObj_fun(); | |
| 73 | - | |
| 74 | - // 计算首班车,末班车行驶时间字符串 | |
| 75 | - var _firstLastDepartureTimeStrObj_fun = function() { | |
| 76 | - return { | |
| 77 | - up: { // 上行 | |
| 78 | - firstVehicleDepartureTimeStr: _formMap.startStationFirstTime, | |
| 79 | - lastVehicleDepartureTimeStr: _formMap.startStationEndTime | |
| 80 | - }, | |
| 81 | - down: { // 下行 | |
| 82 | - firstVehicleDepartureTimeStr: _formMap.endStationFirstTime, | |
| 83 | - lastVehicleDepartureTimeStr: _formMap.endStationEndTime | |
| 84 | - } | |
| 85 | - }; | |
| 86 | - }; | |
| 87 | - var _firstLastDepartureTimeStrObj = _firstLastDepartureTimeStrObj_fun(); | |
| 88 | - | |
| 89 | - // 计算时间段划分对象 | |
| 90 | - var _timeIntervalObj_fun = function() { | |
| 91 | - return { | |
| 92 | - moningPeakTimeStrs: { | |
| 93 | - start: _formMap.earlyStartTime, | |
| 94 | - end: _formMap.earlyEndTime | |
| 95 | - }, | |
| 96 | - eveningPeakTimeStrs: { | |
| 97 | - start: _formMap.lateStartTime, | |
| 98 | - end: _formMap.lateEndTime | |
| 99 | - } | |
| 100 | - | |
| 101 | - // TODO:其他时间段以后再加 | |
| 102 | - }; | |
| 103 | - }; | |
| 104 | - var _timeIntervalObj = _timeIntervalObj_fun(); | |
| 105 | - | |
| 106 | - // 计算各个时段的发车间隙 | |
| 107 | - var _fcjxIntervalObj_fun = function() { | |
| 108 | - var _fcjxes = _formMap.fcjx.split(","); | |
| 109 | - var _rtn = { | |
| 110 | - mpeakfcjx : {}, // 早高峰 | |
| 111 | - epeakfcjx : {}, // 晚高峰 | |
| 112 | - troughfcjx: {} //低谷 | |
| 113 | - }; | |
| 114 | - var _fcjx = []; | |
| 115 | - var i = 0; | |
| 116 | - | |
| 117 | - // TODO:这里按照顺序判定发车间隔 | |
| 118 | - // 1、早高峰间隙 | |
| 119 | - // 2、晚高峰间隙 | |
| 120 | - // 3、早低谷 | |
| 121 | - // 4、平峰 | |
| 122 | - // 5、晚低谷 | |
| 123 | - | |
| 124 | - // 至少3个,系统暂时使用3个,有最小间隔,有最大间隔 | |
| 125 | - if (_fcjxes.length < 3) { | |
| 126 | - alert("发车间隙至少3个(早高峰,晚高峰,低谷)"); | |
| 127 | - throw "发车间隙至少3个(早高峰,晚高峰,低谷)"; | |
| 128 | - } else { | |
| 129 | - for (i = 0; i < 3; i++) { | |
| 130 | - _fcjx = _fcjxes[i].split("/"); | |
| 131 | - if (i == 0) { | |
| 132 | - _rtn.mpeakfcjx.min = parseInt(_fcjx[2].split("-")[0]); | |
| 133 | - _rtn.mpeakfcjx.max = parseInt(_fcjx[2].split("-")[1]); | |
| 134 | - } else if (i == 1) { | |
| 135 | - _rtn.epeakfcjx.min = parseInt(_fcjx[2].split("-")[0]); | |
| 136 | - _rtn.epeakfcjx.max = parseInt(_fcjx[2].split("-")[1]); | |
| 137 | - } else { | |
| 138 | - _rtn.troughfcjx.min = parseInt(_fcjx[2].split("-")[0]); | |
| 139 | - _rtn.troughfcjx.max = parseInt(_fcjx[2].split("-")[1]); | |
| 140 | - } | |
| 141 | - } | |
| 142 | - } | |
| 143 | - | |
| 144 | - return _rtn; | |
| 145 | - }; | |
| 146 | - var _fcjxIntervalObj = _fcjxIntervalObj_fun(); | |
| 147 | - | |
| 148 | - // 获取停站类型 | |
| 149 | - var _stopTypeObj_fun = function() { | |
| 150 | - var isMasterStop = false; // 是否主站停 | |
| 151 | - var isMasterUpStop = false; // 主站停是否上行站点 | |
| 152 | - if (_formMap) { | |
| 153 | - var fm_temp = _formMap.stt.split("/"); | |
| 154 | - if (fm_temp.length == 1) { // 双向停站 | |
| 155 | - isMasterStop = false; | |
| 156 | - } else { | |
| 157 | - isMasterStop = true; | |
| 158 | - if (fm_temp[1] == "0") { | |
| 159 | - isMasterUpStop = true; | |
| 160 | - } else { | |
| 161 | - isMasterUpStop = false; | |
| 162 | - } | |
| 163 | - } | |
| 164 | - } else { | |
| 165 | - throw "停站类型没有选择!"; | |
| 166 | - } | |
| 167 | - | |
| 168 | - return { | |
| 169 | - isMasterStop: isMasterStop, | |
| 170 | - isMasterUpStop: isMasterUpStop | |
| 171 | - } | |
| 172 | - }; | |
| 173 | - var _stopTypeObj = _stopTypeObj_fun(); | |
| 174 | - | |
| 175 | - // 计算线路对象 | |
| 176 | - var _xlObj_fun = function() { | |
| 177 | - return { // TODO:其他属性再议 | |
| 178 | - xl: { | |
| 179 | - id: _formMap.lineName.split('_')[0] | |
| 180 | - } | |
| 181 | - }; | |
| 182 | - }; | |
| 183 | - var _xlObj = _xlObj_fun(); | |
| 184 | - | |
| 185 | - // 计算停车场对象 | |
| 186 | - var _parkObj_fun = function() { | |
| 187 | - return { // TODO:其他属性再议 | |
| 188 | - park: { | |
| 189 | - id: _formMap.tcc_id | |
| 190 | - } | |
| 191 | - }; | |
| 192 | - }; | |
| 193 | - var _parkObj = _parkObj_fun(); | |
| 194 | - | |
| 195 | - // 计算时刻表对象 | |
| 196 | - var _ttInfoObj_fun = function() { | |
| 197 | - return { // TODO:其他属性再议 | |
| 198 | - ttinfo: { | |
| 199 | - id: _formMap.skbName | |
| 200 | - } | |
| 201 | - }; | |
| 202 | - }; | |
| 203 | - var _ttInfoObj = _ttInfoObj_fun(); | |
| 204 | - | |
| 205 | - // 计算起点站终点站对象 | |
| 206 | - var _startEndStopObj_fun = function() { | |
| 207 | - return { // TODO:其他属性再议 | |
| 208 | - up: { | |
| 209 | - qdz: { // 起点站 | |
| 210 | - id: dataMap.qdzArr[0] | |
| 211 | - }, | |
| 212 | - zdz: { // 终点站 | |
| 213 | - id: dataMap.zdzArr[0] | |
| 214 | - } | |
| 215 | - }, | |
| 216 | - down: { | |
| 217 | - qdz: { // 起点站 | |
| 218 | - id: dataMap.qdzArr[1] | |
| 219 | - }, | |
| 220 | - zdz: { // 终点站 | |
| 221 | - id: dataMap.zdzArr[1] | |
| 222 | - } | |
| 223 | - } | |
| 224 | - | |
| 225 | - }; | |
| 226 | - }; | |
| 227 | - var _startEndStopObj = _startEndStopObj_fun(); | |
| 228 | - | |
| 229 | - return { | |
| 230 | - /** | |
| 231 | - * 重置内部form参数。 | |
| 232 | - * @param formMap | |
| 233 | - */ | |
| 234 | - reset: function(formMap) { | |
| 235 | - _formMap = formMap; | |
| 236 | - | |
| 237 | - // 首班车,末班车行驶时间字符串 | |
| 238 | - _firstLastDepartureTimeStrObj = _firstLastDepartureTimeStrObj_fun(); | |
| 239 | - // 行驶时间对象 | |
| 240 | - _travelTimeObj = _travelTimeObj_fun(); | |
| 241 | - // 行驶里程对象 | |
| 242 | - _travelLcObj = _travelLcObj_fun(); | |
| 243 | - // 时间段划分对象 | |
| 244 | - _timeIntervalObj = _timeIntervalObj_fun(); | |
| 245 | - // 各个时段的发车间隙 | |
| 246 | - _fcjxIntervalObj = _fcjxIntervalObj_fun(); | |
| 247 | - // 停站类型 | |
| 248 | - _stopTypeObj = _stopTypeObj_fun(); | |
| 249 | - // 线路对象 | |
| 250 | - _xlObj = _xlObj_fun(); | |
| 251 | - // 停车场对象 | |
| 252 | - _parkObj = _parkObj_fun(); | |
| 253 | - // 时刻表对象 | |
| 254 | - _ttInfoObj = _ttInfoObj_fun(); | |
| 255 | - // 起点站终点站对象 | |
| 256 | - _startEndStopObj = _startEndStopObj_fun(); | |
| 257 | - | |
| 258 | - // TODO:其他再议 | |
| 259 | - }, | |
| 260 | - | |
| 261 | - //------------ 获取首班末班时间 ------------// | |
| 262 | - /** | |
| 263 | - * 获取上行首班时间对象。 | |
| 264 | - * @return moment obj | |
| 265 | - */ | |
| 266 | - getUpFirstDTimeObj: function() { | |
| 267 | - return StrategyUtils.toTimeObj( | |
| 268 | - _firstLastDepartureTimeStrObj.up.firstVehicleDepartureTimeStr | |
| 269 | - ); | |
| 270 | - }, | |
| 271 | - /** | |
| 272 | - * 获取上行末班时间对象。 | |
| 273 | - * @return moment obj | |
| 274 | - */ | |
| 275 | - getUpLastDtimeObj: function() { | |
| 276 | - return StrategyUtils.toTimeObj( | |
| 277 | - _firstLastDepartureTimeStrObj.up.lastVehicleDepartureTimeStr | |
| 278 | - ); | |
| 279 | - }, | |
| 280 | - /** | |
| 281 | - * 获取下行首班时间对象。 | |
| 282 | - * @return moment obj | |
| 283 | - */ | |
| 284 | - getDownFirstDTimeObj: function() { | |
| 285 | - return StrategyUtils.toTimeObj( | |
| 286 | - _firstLastDepartureTimeStrObj.down.firstVehicleDepartureTimeStr | |
| 287 | - ); | |
| 288 | - }, | |
| 289 | - /** | |
| 290 | - * 获取下行末班时间对象。 | |
| 291 | - * @return moment obj | |
| 292 | - */ | |
| 293 | - getDownLastDTimeObj: function() { | |
| 294 | - return StrategyUtils.toTimeObj( | |
| 295 | - _firstLastDepartureTimeStrObj.down.lastVehicleDepartureTimeStr | |
| 296 | - ); | |
| 297 | - }, | |
| 298 | - | |
| 299 | - //-------------- 获取行驶时间 ----------------// | |
| 300 | - /** | |
| 301 | - * 获取上行早高峰行驶时间。 | |
| 302 | - * @returns int number | |
| 303 | - */ | |
| 304 | - getUpMPeakTime: function() { | |
| 305 | - return _travelTimeObj.moningpeak[0]; | |
| 306 | - }, | |
| 307 | - /** | |
| 308 | - * 获取上行晚高峰行驶时间。 | |
| 309 | - * @returns int number | |
| 310 | - */ | |
| 311 | - getUpEPeakTime: function() { | |
| 312 | - return _travelTimeObj.eveningpeak[0]; | |
| 313 | - }, | |
| 314 | - /** | |
| 315 | - * 获取上行低谷行驶时间。 | |
| 316 | - * @returns int number | |
| 317 | - */ | |
| 318 | - getUpTroughTime: function() { | |
| 319 | - return _travelTimeObj.trough[0]; | |
| 320 | - }, | |
| 321 | - /** | |
| 322 | - * 获取下行早高峰行驶时间。 | |
| 323 | - * @returns int number | |
| 324 | - */ | |
| 325 | - getDownMPeakTime: function() { | |
| 326 | - return _travelTimeObj.moningpeak[1]; | |
| 327 | - }, | |
| 328 | - /** | |
| 329 | - * 获取下行晚高峰行驶时间。 | |
| 330 | - * @returns int number | |
| 331 | - */ | |
| 332 | - getDownEPeakTime: function() { | |
| 333 | - return _travelTimeObj.eveningpeak[1]; | |
| 334 | - }, | |
| 335 | - /** | |
| 336 | - * 获取下行低谷行驶时间。 | |
| 337 | - * @returns int number | |
| 338 | - */ | |
| 339 | - getDownTroughTime: function() { | |
| 340 | - return _travelTimeObj.trough[1]; | |
| 341 | - }, | |
| 342 | - | |
| 343 | - //---------------- 获取行驶里程 -----------------// | |
| 344 | - /** | |
| 345 | - * 获取上行normal班次里程。 | |
| 346 | - * @returns number | |
| 347 | - */ | |
| 348 | - getUpNormalLc: function() { | |
| 349 | - return _travelLcObj[0].normalLc; | |
| 350 | - }, | |
| 351 | - /** | |
| 352 | - * 获取上行进场班次类型。 | |
| 353 | - * @returns number | |
| 354 | - */ | |
| 355 | - getUpInLc: function() { | |
| 356 | - return _travelLcObj[0].inLc; | |
| 357 | - }, | |
| 358 | - /** | |
| 359 | - * 获取上行出场班次类型。 | |
| 360 | - * @returns number | |
| 361 | - */ | |
| 362 | - getUpOutLc: function() { | |
| 363 | - return _travelLcObj[0].outLc; | |
| 364 | - }, | |
| 365 | - /** | |
| 366 | - * 获取下行normal班次类型。 | |
| 367 | - * @returns number | |
| 368 | - */ | |
| 369 | - getDownNormalLc: function() { | |
| 370 | - return _travelLcObj[1].normalLc; | |
| 371 | - }, | |
| 372 | - /** | |
| 373 | - * 获取下行进场班次类型。 | |
| 374 | - * @returns number | |
| 375 | - */ | |
| 376 | - getDownInLc: function() { | |
| 377 | - return _travelLcObj[1].inLc; | |
| 378 | - }, | |
| 379 | - /** | |
| 380 | - * 获取下行出场班次类型。 | |
| 381 | - * @returns number | |
| 382 | - */ | |
| 383 | - getDownOutLc: function() { | |
| 384 | - return _travelLcObj[1].outLc; | |
| 385 | - }, | |
| 386 | - | |
| 387 | - //---------------- 获取时间段信息 --------------// | |
| 388 | - /** | |
| 389 | - * 获取早高峰开始时间对象。 | |
| 390 | - * @returns moment obj | |
| 391 | - */ | |
| 392 | - getMPeakStartTimeObj: function() { | |
| 393 | - return StrategyUtils.toTimeObj( | |
| 394 | - _timeIntervalObj.moningPeakTimeStrs.start | |
| 395 | - ); | |
| 396 | - }, | |
| 397 | - /** | |
| 398 | - * 获取早高峰结束时间对象。 | |
| 399 | - * @returns moment obj | |
| 400 | - */ | |
| 401 | - getMPeakEndTimeObj: function() { | |
| 402 | - return StrategyUtils.toTimeObj( | |
| 403 | - _timeIntervalObj.moningPeakTimeStrs.end | |
| 404 | - ); | |
| 405 | - }, | |
| 406 | - /** | |
| 407 | - * 获取晚高峰开始时间对象。 | |
| 408 | - * @returns moment obj | |
| 409 | - */ | |
| 410 | - getEPeakStartTimeObj: function() { | |
| 411 | - return StrategyUtils.toTimeObj( | |
| 412 | - _timeIntervalObj.eveningPeakTimeStrs.start | |
| 413 | - ); | |
| 414 | - }, | |
| 415 | - /** | |
| 416 | - * 获取晚高峰结束时间对象。 | |
| 417 | - * @returns moment obj | |
| 418 | - */ | |
| 419 | - getEPeakEndTimeObj: function() { | |
| 420 | - return StrategyUtils.toTimeObj( | |
| 421 | - _timeIntervalObj.eveningPeakTimeStrs.end | |
| 422 | - ); | |
| 423 | - }, | |
| 424 | - | |
| 425 | - //----------------- 获取发车间隙(TODO:以后通过客流估算)-----------------// | |
| 426 | - /** | |
| 427 | - * 获取早高峰最小发车间隙。 | |
| 428 | - * @returns int | |
| 429 | - */ | |
| 430 | - getMPeakMinFcjx: function() { | |
| 431 | - return _fcjxIntervalObj.mpeakfcjx.min; | |
| 432 | - }, | |
| 433 | - /** | |
| 434 | - * 获取早高峰最大发车间隙。 | |
| 435 | - * @returns int | |
| 436 | - */ | |
| 437 | - getMPeakMaxFcjx: function() { | |
| 438 | - return _fcjxIntervalObj.mpeakfcjx.max; | |
| 439 | - }, | |
| 440 | - /** | |
| 441 | - * 获取晚高峰最小发车间隙。 | |
| 442 | - * @returns int | |
| 443 | - */ | |
| 444 | - getEPeakMinFcjx: function() { | |
| 445 | - return _fcjxIntervalObj.epeakfcjx.min; | |
| 446 | - }, | |
| 447 | - /** | |
| 448 | - * 获取晚高峰最小发车间隙。 | |
| 449 | - * @returns int | |
| 450 | - */ | |
| 451 | - getEPeakMaxFcjx: function() { | |
| 452 | - return _fcjxIntervalObj.epeakfcjx.max; | |
| 453 | - }, | |
| 454 | - /** | |
| 455 | - * 获取低谷最小发车间隙。 | |
| 456 | - * @returns int | |
| 457 | - */ | |
| 458 | - getTroughMinFcjx: function() { | |
| 459 | - return _fcjxIntervalObj.troughfcjx.min; | |
| 460 | - }, | |
| 461 | - /** | |
| 462 | - * 获取低谷最大发车间隙。 | |
| 463 | - * @returns int | |
| 464 | - */ | |
| 465 | - getTroughMaxFcjx: function() { | |
| 466 | - return _fcjxIntervalObj.troughfcjx.max; | |
| 467 | - }, | |
| 468 | - | |
| 469 | - //----------------- 获取停站方式 -------------------// | |
| 470 | - /** | |
| 471 | - * 是否双向停站。 | |
| 472 | - * @returns {boolean} | |
| 473 | - */ | |
| 474 | - isTwoWayStop: function() { | |
| 475 | - return !_stopTypeObj.isMasterStop; | |
| 476 | - }, | |
| 477 | - /** | |
| 478 | - * 是否上行单向停站。 | |
| 479 | - * @returns {boolean} | |
| 480 | - */ | |
| 481 | - isUpOneWayStop: function() { | |
| 482 | - return _stopTypeObj.isMasterStop && _stopTypeObj.isMasterUpStop; | |
| 483 | - }, | |
| 484 | - /** | |
| 485 | - * 是否下行单向停站。 | |
| 486 | - * @returns {boolean} | |
| 487 | - */ | |
| 488 | - isDownOneWayStop: function() { | |
| 489 | - return _stopTypeObj.isMasterStop && (!_stopTypeObj.isMasterUpStop); | |
| 490 | - }, | |
| 491 | - | |
| 492 | - //----------------- 获取高峰配车数、加班路牌数 ----------------// | |
| 493 | - /** | |
| 494 | - * 获取高峰建议配车数(TODO:参照一下)。 | |
| 495 | - * @returns {Number|*} | |
| 496 | - */ | |
| 497 | - getAdvicePeakClzs: function() { | |
| 498 | - return parseInt(_formMap.gfjypcs); | |
| 499 | - }, | |
| 500 | - /** | |
| 501 | - * 获取加班路牌数(5休2路牌的个数)。 | |
| 502 | - * @returns {Number|*} | |
| 503 | - */ | |
| 504 | - getJBLpes: function() { | |
| 505 | - return parseInt(_formMap.jblps); | |
| 506 | - }, | |
| 507 | - | |
| 508 | - //----------------- 获取关联数据信息 -----------------// | |
| 509 | - /** | |
| 510 | - * 获取线路id。 | |
| 511 | - */ | |
| 512 | - getXlId: function() { | |
| 513 | - return _xlObj.xl.id; | |
| 514 | - }, | |
| 515 | - /** | |
| 516 | - * 获取停车场id。 | |
| 517 | - */ | |
| 518 | - getTccId: function() { | |
| 519 | - return _parkObj.park.id; | |
| 520 | - }, | |
| 521 | - /** | |
| 522 | - * 获取时刻表id。 | |
| 523 | - */ | |
| 524 | - getTTinfoId: function() { | |
| 525 | - return _ttInfoObj.ttinfo.id; | |
| 526 | - }, | |
| 527 | - /** | |
| 528 | - * 获取上行起点站对象。 | |
| 529 | - * @returns {{id: *}} | |
| 530 | - */ | |
| 531 | - getUpQdzObj: function() { | |
| 532 | - return { | |
| 533 | - id: _startEndStopObj.up.qdz.id | |
| 534 | - }; | |
| 535 | - }, | |
| 536 | - /** | |
| 537 | - * 获取上行终点站对象。 | |
| 538 | - * @returns {{id: *}} | |
| 539 | - */ | |
| 540 | - getUpZdzObj: function() { | |
| 541 | - return { | |
| 542 | - id: _startEndStopObj.up.zdz.id | |
| 543 | - }; | |
| 544 | - }, | |
| 545 | - /** | |
| 546 | - * 获取下行起点站对象。 | |
| 547 | - * @returns {{id: *}} | |
| 548 | - */ | |
| 549 | - getDownQdzObj: function() { | |
| 550 | - return { | |
| 551 | - id: _startEndStopObj.down.qdz.id | |
| 552 | - }; | |
| 553 | - }, | |
| 554 | - /** | |
| 555 | - * 获取下行终点站对象。 | |
| 556 | - * @returns {{id: *}} | |
| 557 | - */ | |
| 558 | - getDownZdzObj: function() { | |
| 559 | - return { | |
| 560 | - id: _startEndStopObj.down.zdz.id | |
| 561 | - }; | |
| 562 | - } | |
| 563 | - | |
| 564 | - | |
| 565 | - }; | |
| 1 | +/** | |
| 2 | + * 包装表单参数为内部参数对象。 | |
| 3 | + * @param formMap 表单form参数map | |
| 4 | + * @param dataMap | |
| 5 | + * @constructor | |
| 6 | + * | |
| 7 | + * 注意:moment是mutable,所有的moment操作都会改变原有对象的值, | |
| 8 | + * 所以所有的操作都要小心处理。 | |
| 9 | + */ | |
| 10 | +var ParameterObj = function(formMap, dataMap) { | |
| 11 | + // 内部保存的form参数 | |
| 12 | + var _formMap = formMap; | |
| 13 | + // 计算行驶时间对象 | |
| 14 | + var _travelTimeObj_fun = function() { | |
| 15 | + var upMoningPeakTravelTime = | |
| 16 | + isNaN(_formMap.earlyUpTime) ? | |
| 17 | + parseInt(_formMap.upTravelTime) : | |
| 18 | + parseInt(_formMap.earlyUpTime); | |
| 19 | + var downMoningPeakTravelTime = | |
| 20 | + isNaN(_formMap.earlyDownTime) ? | |
| 21 | + parseInt(_formMap.downTravelTime) : | |
| 22 | + parseInt(_formMap.earlyDownTime); | |
| 23 | + var upEveningPeakTravelTime = | |
| 24 | + isNaN(_formMap.lateUpTime) ? | |
| 25 | + parseInt(_formMap.upTravelTime) : | |
| 26 | + parseInt(_formMap.lateUpTime); | |
| 27 | + var downEveningPeakTravelTime = | |
| 28 | + isNaN(_formMap.lateDownTime) ? | |
| 29 | + parseInt(_formMap.downTravelTime) : | |
| 30 | + parseInt(_formMap.lateDownTime); | |
| 31 | + var upTroughTravelTime = | |
| 32 | + isNaN(_formMap.troughUpTime) ? | |
| 33 | + parseInt(_formMap.upTravelTime) : | |
| 34 | + parseInt(_formMap.troughUpTime); | |
| 35 | + var downTroughTravelTime = | |
| 36 | + isNaN(_formMap.troughDownTime) ? | |
| 37 | + parseInt(_formMap.downTravelTime) : | |
| 38 | + parseInt(_formMap.troughDownTime); | |
| 39 | + | |
| 40 | + return { // TODO:暂时获取标准信息,之后改成历史数据,可能需要使用promise封装 | |
| 41 | + "moningpeak": [ | |
| 42 | + upMoningPeakTravelTime, | |
| 43 | + downMoningPeakTravelTime | |
| 44 | + ], | |
| 45 | + "eveningpeak": [ | |
| 46 | + upEveningPeakTravelTime, | |
| 47 | + downEveningPeakTravelTime | |
| 48 | + ], | |
| 49 | + "trough": [ | |
| 50 | + upTroughTravelTime, | |
| 51 | + downTroughTravelTime | |
| 52 | + ] | |
| 53 | + } | |
| 54 | + }; | |
| 55 | + var _travelTimeObj = _travelTimeObj_fun(); | |
| 56 | + | |
| 57 | + // 计算行驶里程对象 | |
| 58 | + var _travelLcObj_fun = function() { | |
| 59 | + return [ | |
| 60 | + { // 上行里程 | |
| 61 | + "normalLc": isNaN(_formMap.upMileage) ? 0 : parseFloat(_formMap.upMileage), | |
| 62 | + "inLc": isNaN(_formMap.upInMileage) ? 0 : parseFloat(_formMap.upInMileage), | |
| 63 | + "outLc": isNaN(_formMap.upOutMileage) ? 0 : parseFloat(_formMap.upOutMileage) | |
| 64 | + }, | |
| 65 | + { // 下行里程 | |
| 66 | + "normalLc": isNaN(_formMap.downMileage) ? 0 : parseFloat(_formMap.downMileage), | |
| 67 | + "inLc": isNaN(_formMap.downInMileage) ? 0 : parseFloat(_formMap.downInMileage), | |
| 68 | + "outLc": isNaN(_formMap.downOutMileage) ? 0 : parseFloat(_formMap.downOutMileage) | |
| 69 | + } | |
| 70 | + ]; | |
| 71 | + }; | |
| 72 | + var _travelLcObj = _travelLcObj_fun(); | |
| 73 | + | |
| 74 | + // 计算首班车,末班车行驶时间字符串 | |
| 75 | + var _firstLastDepartureTimeStrObj_fun = function() { | |
| 76 | + return { | |
| 77 | + up: { // 上行 | |
| 78 | + firstVehicleDepartureTimeStr: _formMap.startStationFirstTime, | |
| 79 | + lastVehicleDepartureTimeStr: _formMap.startStationEndTime | |
| 80 | + }, | |
| 81 | + down: { // 下行 | |
| 82 | + firstVehicleDepartureTimeStr: _formMap.endStationFirstTime, | |
| 83 | + lastVehicleDepartureTimeStr: _formMap.endStationEndTime | |
| 84 | + } | |
| 85 | + }; | |
| 86 | + }; | |
| 87 | + var _firstLastDepartureTimeStrObj = _firstLastDepartureTimeStrObj_fun(); | |
| 88 | + | |
| 89 | + // 计算时间段划分对象 | |
| 90 | + var _timeIntervalObj_fun = function() { | |
| 91 | + return { | |
| 92 | + moningPeakTimeStrs: { | |
| 93 | + start: _formMap.earlyStartTime, | |
| 94 | + end: _formMap.earlyEndTime | |
| 95 | + }, | |
| 96 | + eveningPeakTimeStrs: { | |
| 97 | + start: _formMap.lateStartTime, | |
| 98 | + end: _formMap.lateEndTime | |
| 99 | + } | |
| 100 | + | |
| 101 | + // TODO:其他时间段以后再加 | |
| 102 | + }; | |
| 103 | + }; | |
| 104 | + var _timeIntervalObj = _timeIntervalObj_fun(); | |
| 105 | + | |
| 106 | + // 计算各个时段的发车间隙 | |
| 107 | + var _fcjxIntervalObj_fun = function() { | |
| 108 | + var _fcjxes = _formMap.fcjx.split(","); | |
| 109 | + var _rtn = { | |
| 110 | + mpeakfcjx : {}, // 早高峰 | |
| 111 | + epeakfcjx : {}, // 晚高峰 | |
| 112 | + troughfcjx: {} //低谷 | |
| 113 | + }; | |
| 114 | + var _fcjx = []; | |
| 115 | + var i = 0; | |
| 116 | + | |
| 117 | + // TODO:这里按照顺序判定发车间隔 | |
| 118 | + // 1、早高峰间隙 | |
| 119 | + // 2、晚高峰间隙 | |
| 120 | + // 3、早低谷 | |
| 121 | + // 4、平峰 | |
| 122 | + // 5、晚低谷 | |
| 123 | + | |
| 124 | + // 至少3个,系统暂时使用3个,有最小间隔,有最大间隔 | |
| 125 | + if (_fcjxes.length < 3) { | |
| 126 | + alert("发车间隙至少3个(早高峰,晚高峰,低谷)"); | |
| 127 | + throw "发车间隙至少3个(早高峰,晚高峰,低谷)"; | |
| 128 | + } else { | |
| 129 | + for (i = 0; i < 3; i++) { | |
| 130 | + _fcjx = _fcjxes[i].split("/"); | |
| 131 | + if (i == 0) { | |
| 132 | + _rtn.mpeakfcjx.min = parseInt(_fcjx[2].split("-")[0]); | |
| 133 | + _rtn.mpeakfcjx.max = parseInt(_fcjx[2].split("-")[1]); | |
| 134 | + } else if (i == 1) { | |
| 135 | + _rtn.epeakfcjx.min = parseInt(_fcjx[2].split("-")[0]); | |
| 136 | + _rtn.epeakfcjx.max = parseInt(_fcjx[2].split("-")[1]); | |
| 137 | + } else { | |
| 138 | + _rtn.troughfcjx.min = parseInt(_fcjx[2].split("-")[0]); | |
| 139 | + _rtn.troughfcjx.max = parseInt(_fcjx[2].split("-")[1]); | |
| 140 | + } | |
| 141 | + } | |
| 142 | + } | |
| 143 | + | |
| 144 | + return _rtn; | |
| 145 | + }; | |
| 146 | + var _fcjxIntervalObj = _fcjxIntervalObj_fun(); | |
| 147 | + | |
| 148 | + // 获取停站类型 | |
| 149 | + var _stopTypeObj_fun = function() { | |
| 150 | + var isMasterStop = false; // 是否主站停 | |
| 151 | + var isMasterUpStop = false; // 主站停是否上行站点 | |
| 152 | + if (_formMap) { | |
| 153 | + var fm_temp = _formMap.stt.split("/"); | |
| 154 | + if (fm_temp.length == 1) { // 双向停站 | |
| 155 | + isMasterStop = false; | |
| 156 | + } else { | |
| 157 | + isMasterStop = true; | |
| 158 | + if (fm_temp[1] == "0") { | |
| 159 | + isMasterUpStop = true; | |
| 160 | + } else { | |
| 161 | + isMasterUpStop = false; | |
| 162 | + } | |
| 163 | + } | |
| 164 | + } else { | |
| 165 | + throw "停站类型没有选择!"; | |
| 166 | + } | |
| 167 | + | |
| 168 | + return { | |
| 169 | + isMasterStop: isMasterStop, | |
| 170 | + isMasterUpStop: isMasterUpStop | |
| 171 | + } | |
| 172 | + }; | |
| 173 | + var _stopTypeObj = _stopTypeObj_fun(); | |
| 174 | + | |
| 175 | + // 计算线路对象 | |
| 176 | + var _xlObj_fun = function() { | |
| 177 | + return { // TODO:其他属性再议 | |
| 178 | + xl: { | |
| 179 | + id: _formMap.lineName.split('_')[0] | |
| 180 | + } | |
| 181 | + }; | |
| 182 | + }; | |
| 183 | + var _xlObj = _xlObj_fun(); | |
| 184 | + | |
| 185 | + // 计算停车场对象 | |
| 186 | + var _parkObj_fun = function() { | |
| 187 | + return { // TODO:其他属性再议 | |
| 188 | + park: { | |
| 189 | + id: _formMap.tcc_id | |
| 190 | + } | |
| 191 | + }; | |
| 192 | + }; | |
| 193 | + var _parkObj = _parkObj_fun(); | |
| 194 | + | |
| 195 | + // 计算时刻表对象 | |
| 196 | + var _ttInfoObj_fun = function() { | |
| 197 | + return { // TODO:其他属性再议 | |
| 198 | + ttinfo: { | |
| 199 | + id: _formMap.skbName | |
| 200 | + } | |
| 201 | + }; | |
| 202 | + }; | |
| 203 | + var _ttInfoObj = _ttInfoObj_fun(); | |
| 204 | + | |
| 205 | + // 计算起点站终点站对象 | |
| 206 | + var _startEndStopObj_fun = function() { | |
| 207 | + return { // TODO:其他属性再议 | |
| 208 | + up: { | |
| 209 | + qdz: { // 起点站 | |
| 210 | + id: dataMap.qdzArr[0] | |
| 211 | + }, | |
| 212 | + zdz: { // 终点站 | |
| 213 | + id: dataMap.zdzArr[0] | |
| 214 | + } | |
| 215 | + }, | |
| 216 | + down: { | |
| 217 | + qdz: { // 起点站 | |
| 218 | + id: dataMap.qdzArr[1] | |
| 219 | + }, | |
| 220 | + zdz: { // 终点站 | |
| 221 | + id: dataMap.zdzArr[1] | |
| 222 | + } | |
| 223 | + } | |
| 224 | + | |
| 225 | + }; | |
| 226 | + }; | |
| 227 | + var _startEndStopObj = _startEndStopObj_fun(); | |
| 228 | + | |
| 229 | + return { | |
| 230 | + /** | |
| 231 | + * 重置内部form参数。 | |
| 232 | + * @param formMap | |
| 233 | + */ | |
| 234 | + reset: function(formMap) { | |
| 235 | + _formMap = formMap; | |
| 236 | + | |
| 237 | + // 首班车,末班车行驶时间字符串 | |
| 238 | + _firstLastDepartureTimeStrObj = _firstLastDepartureTimeStrObj_fun(); | |
| 239 | + // 行驶时间对象 | |
| 240 | + _travelTimeObj = _travelTimeObj_fun(); | |
| 241 | + // 行驶里程对象 | |
| 242 | + _travelLcObj = _travelLcObj_fun(); | |
| 243 | + // 时间段划分对象 | |
| 244 | + _timeIntervalObj = _timeIntervalObj_fun(); | |
| 245 | + // 各个时段的发车间隙 | |
| 246 | + _fcjxIntervalObj = _fcjxIntervalObj_fun(); | |
| 247 | + // 停站类型 | |
| 248 | + _stopTypeObj = _stopTypeObj_fun(); | |
| 249 | + // 线路对象 | |
| 250 | + _xlObj = _xlObj_fun(); | |
| 251 | + // 停车场对象 | |
| 252 | + _parkObj = _parkObj_fun(); | |
| 253 | + // 时刻表对象 | |
| 254 | + _ttInfoObj = _ttInfoObj_fun(); | |
| 255 | + // 起点站终点站对象 | |
| 256 | + _startEndStopObj = _startEndStopObj_fun(); | |
| 257 | + | |
| 258 | + // TODO:其他再议 | |
| 259 | + }, | |
| 260 | + | |
| 261 | + //------------ 获取首班末班时间 ------------// | |
| 262 | + /** | |
| 263 | + * 获取上行首班时间对象。 | |
| 264 | + * @return moment obj | |
| 265 | + */ | |
| 266 | + getUpFirstDTimeObj: function() { | |
| 267 | + return StrategyUtils.toTimeObj( | |
| 268 | + _firstLastDepartureTimeStrObj.up.firstVehicleDepartureTimeStr | |
| 269 | + ); | |
| 270 | + }, | |
| 271 | + /** | |
| 272 | + * 获取上行末班时间对象。 | |
| 273 | + * @return moment obj | |
| 274 | + */ | |
| 275 | + getUpLastDtimeObj: function() { | |
| 276 | + return StrategyUtils.toTimeObj( | |
| 277 | + _firstLastDepartureTimeStrObj.up.lastVehicleDepartureTimeStr | |
| 278 | + ); | |
| 279 | + }, | |
| 280 | + /** | |
| 281 | + * 获取下行首班时间对象。 | |
| 282 | + * @return moment obj | |
| 283 | + */ | |
| 284 | + getDownFirstDTimeObj: function() { | |
| 285 | + return StrategyUtils.toTimeObj( | |
| 286 | + _firstLastDepartureTimeStrObj.down.firstVehicleDepartureTimeStr | |
| 287 | + ); | |
| 288 | + }, | |
| 289 | + /** | |
| 290 | + * 获取下行末班时间对象。 | |
| 291 | + * @return moment obj | |
| 292 | + */ | |
| 293 | + getDownLastDTimeObj: function() { | |
| 294 | + return StrategyUtils.toTimeObj( | |
| 295 | + _firstLastDepartureTimeStrObj.down.lastVehicleDepartureTimeStr | |
| 296 | + ); | |
| 297 | + }, | |
| 298 | + | |
| 299 | + //-------------- 获取行驶时间 ----------------// | |
| 300 | + /** | |
| 301 | + * 获取上行早高峰行驶时间。 | |
| 302 | + * @returns int number | |
| 303 | + */ | |
| 304 | + getUpMPeakTime: function() { | |
| 305 | + return _travelTimeObj.moningpeak[0]; | |
| 306 | + }, | |
| 307 | + /** | |
| 308 | + * 获取上行晚高峰行驶时间。 | |
| 309 | + * @returns int number | |
| 310 | + */ | |
| 311 | + getUpEPeakTime: function() { | |
| 312 | + return _travelTimeObj.eveningpeak[0]; | |
| 313 | + }, | |
| 314 | + /** | |
| 315 | + * 获取上行低谷行驶时间。 | |
| 316 | + * @returns int number | |
| 317 | + */ | |
| 318 | + getUpTroughTime: function() { | |
| 319 | + return _travelTimeObj.trough[0]; | |
| 320 | + }, | |
| 321 | + /** | |
| 322 | + * 获取下行早高峰行驶时间。 | |
| 323 | + * @returns int number | |
| 324 | + */ | |
| 325 | + getDownMPeakTime: function() { | |
| 326 | + return _travelTimeObj.moningpeak[1]; | |
| 327 | + }, | |
| 328 | + /** | |
| 329 | + * 获取下行晚高峰行驶时间。 | |
| 330 | + * @returns int number | |
| 331 | + */ | |
| 332 | + getDownEPeakTime: function() { | |
| 333 | + return _travelTimeObj.eveningpeak[1]; | |
| 334 | + }, | |
| 335 | + /** | |
| 336 | + * 获取下行低谷行驶时间。 | |
| 337 | + * @returns int number | |
| 338 | + */ | |
| 339 | + getDownTroughTime: function() { | |
| 340 | + return _travelTimeObj.trough[1]; | |
| 341 | + }, | |
| 342 | + | |
| 343 | + //---------------- 获取行驶里程 -----------------// | |
| 344 | + /** | |
| 345 | + * 获取上行normal班次里程。 | |
| 346 | + * @returns number | |
| 347 | + */ | |
| 348 | + getUpNormalLc: function() { | |
| 349 | + return _travelLcObj[0].normalLc; | |
| 350 | + }, | |
| 351 | + /** | |
| 352 | + * 获取上行进场班次类型。 | |
| 353 | + * @returns number | |
| 354 | + */ | |
| 355 | + getUpInLc: function() { | |
| 356 | + return _travelLcObj[0].inLc; | |
| 357 | + }, | |
| 358 | + /** | |
| 359 | + * 获取上行出场班次类型。 | |
| 360 | + * @returns number | |
| 361 | + */ | |
| 362 | + getUpOutLc: function() { | |
| 363 | + return _travelLcObj[0].outLc; | |
| 364 | + }, | |
| 365 | + /** | |
| 366 | + * 获取下行normal班次类型。 | |
| 367 | + * @returns number | |
| 368 | + */ | |
| 369 | + getDownNormalLc: function() { | |
| 370 | + return _travelLcObj[1].normalLc; | |
| 371 | + }, | |
| 372 | + /** | |
| 373 | + * 获取下行进场班次类型。 | |
| 374 | + * @returns number | |
| 375 | + */ | |
| 376 | + getDownInLc: function() { | |
| 377 | + return _travelLcObj[1].inLc; | |
| 378 | + }, | |
| 379 | + /** | |
| 380 | + * 获取下行出场班次类型。 | |
| 381 | + * @returns number | |
| 382 | + */ | |
| 383 | + getDownOutLc: function() { | |
| 384 | + return _travelLcObj[1].outLc; | |
| 385 | + }, | |
| 386 | + | |
| 387 | + //---------------- 获取时间段信息 --------------// | |
| 388 | + /** | |
| 389 | + * 获取早高峰开始时间对象。 | |
| 390 | + * @returns moment obj | |
| 391 | + */ | |
| 392 | + getMPeakStartTimeObj: function() { | |
| 393 | + return StrategyUtils.toTimeObj( | |
| 394 | + _timeIntervalObj.moningPeakTimeStrs.start | |
| 395 | + ); | |
| 396 | + }, | |
| 397 | + /** | |
| 398 | + * 获取早高峰结束时间对象。 | |
| 399 | + * @returns moment obj | |
| 400 | + */ | |
| 401 | + getMPeakEndTimeObj: function() { | |
| 402 | + return StrategyUtils.toTimeObj( | |
| 403 | + _timeIntervalObj.moningPeakTimeStrs.end | |
| 404 | + ); | |
| 405 | + }, | |
| 406 | + /** | |
| 407 | + * 获取晚高峰开始时间对象。 | |
| 408 | + * @returns moment obj | |
| 409 | + */ | |
| 410 | + getEPeakStartTimeObj: function() { | |
| 411 | + return StrategyUtils.toTimeObj( | |
| 412 | + _timeIntervalObj.eveningPeakTimeStrs.start | |
| 413 | + ); | |
| 414 | + }, | |
| 415 | + /** | |
| 416 | + * 获取晚高峰结束时间对象。 | |
| 417 | + * @returns moment obj | |
| 418 | + */ | |
| 419 | + getEPeakEndTimeObj: function() { | |
| 420 | + return StrategyUtils.toTimeObj( | |
| 421 | + _timeIntervalObj.eveningPeakTimeStrs.end | |
| 422 | + ); | |
| 423 | + }, | |
| 424 | + | |
| 425 | + //----------------- 获取发车间隙(TODO:以后通过客流估算)-----------------// | |
| 426 | + /** | |
| 427 | + * 获取早高峰最小发车间隙。 | |
| 428 | + * @returns int | |
| 429 | + */ | |
| 430 | + getMPeakMinFcjx: function() { | |
| 431 | + return _fcjxIntervalObj.mpeakfcjx.min; | |
| 432 | + }, | |
| 433 | + /** | |
| 434 | + * 获取早高峰最大发车间隙。 | |
| 435 | + * @returns int | |
| 436 | + */ | |
| 437 | + getMPeakMaxFcjx: function() { | |
| 438 | + return _fcjxIntervalObj.mpeakfcjx.max; | |
| 439 | + }, | |
| 440 | + /** | |
| 441 | + * 获取晚高峰最小发车间隙。 | |
| 442 | + * @returns int | |
| 443 | + */ | |
| 444 | + getEPeakMinFcjx: function() { | |
| 445 | + return _fcjxIntervalObj.epeakfcjx.min; | |
| 446 | + }, | |
| 447 | + /** | |
| 448 | + * 获取晚高峰最小发车间隙。 | |
| 449 | + * @returns int | |
| 450 | + */ | |
| 451 | + getEPeakMaxFcjx: function() { | |
| 452 | + return _fcjxIntervalObj.epeakfcjx.max; | |
| 453 | + }, | |
| 454 | + /** | |
| 455 | + * 获取低谷最小发车间隙。 | |
| 456 | + * @returns int | |
| 457 | + */ | |
| 458 | + getTroughMinFcjx: function() { | |
| 459 | + return _fcjxIntervalObj.troughfcjx.min; | |
| 460 | + }, | |
| 461 | + /** | |
| 462 | + * 获取低谷最大发车间隙。 | |
| 463 | + * @returns int | |
| 464 | + */ | |
| 465 | + getTroughMaxFcjx: function() { | |
| 466 | + return _fcjxIntervalObj.troughfcjx.max; | |
| 467 | + }, | |
| 468 | + | |
| 469 | + //----------------- 获取停站方式 -------------------// | |
| 470 | + /** | |
| 471 | + * 是否双向停站。 | |
| 472 | + * @returns {boolean} | |
| 473 | + */ | |
| 474 | + isTwoWayStop: function() { | |
| 475 | + return !_stopTypeObj.isMasterStop; | |
| 476 | + }, | |
| 477 | + /** | |
| 478 | + * 是否上行单向停站。 | |
| 479 | + * @returns {boolean} | |
| 480 | + */ | |
| 481 | + isUpOneWayStop: function() { | |
| 482 | + return _stopTypeObj.isMasterStop && _stopTypeObj.isMasterUpStop; | |
| 483 | + }, | |
| 484 | + /** | |
| 485 | + * 是否下行单向停站。 | |
| 486 | + * @returns {boolean} | |
| 487 | + */ | |
| 488 | + isDownOneWayStop: function() { | |
| 489 | + return _stopTypeObj.isMasterStop && (!_stopTypeObj.isMasterUpStop); | |
| 490 | + }, | |
| 491 | + | |
| 492 | + //----------------- 获取高峰配车数、加班路牌数 ----------------// | |
| 493 | + /** | |
| 494 | + * 获取高峰建议配车数(TODO:参照一下)。 | |
| 495 | + * @returns {Number|*} | |
| 496 | + */ | |
| 497 | + getAdvicePeakClzs: function() { | |
| 498 | + return parseInt(_formMap.gfjypcs); | |
| 499 | + }, | |
| 500 | + /** | |
| 501 | + * 获取加班路牌数(5休2路牌的个数)。 | |
| 502 | + * @returns {Number|*} | |
| 503 | + */ | |
| 504 | + getJBLpes: function() { | |
| 505 | + return parseInt(_formMap.jblps); | |
| 506 | + }, | |
| 507 | + | |
| 508 | + //----------------- 获取关联数据信息 -----------------// | |
| 509 | + /** | |
| 510 | + * 获取线路id。 | |
| 511 | + */ | |
| 512 | + getXlId: function() { | |
| 513 | + return _xlObj.xl.id; | |
| 514 | + }, | |
| 515 | + /** | |
| 516 | + * 获取停车场id。 | |
| 517 | + */ | |
| 518 | + getTccId: function() { | |
| 519 | + return _parkObj.park.id; | |
| 520 | + }, | |
| 521 | + /** | |
| 522 | + * 获取时刻表id。 | |
| 523 | + */ | |
| 524 | + getTTinfoId: function() { | |
| 525 | + return _ttInfoObj.ttinfo.id; | |
| 526 | + }, | |
| 527 | + /** | |
| 528 | + * 获取上行起点站对象。 | |
| 529 | + * @returns {{id: *}} | |
| 530 | + */ | |
| 531 | + getUpQdzObj: function() { | |
| 532 | + return { | |
| 533 | + id: _startEndStopObj.up.qdz.id | |
| 534 | + }; | |
| 535 | + }, | |
| 536 | + /** | |
| 537 | + * 获取上行终点站对象。 | |
| 538 | + * @returns {{id: *}} | |
| 539 | + */ | |
| 540 | + getUpZdzObj: function() { | |
| 541 | + return { | |
| 542 | + id: _startEndStopObj.up.zdz.id | |
| 543 | + }; | |
| 544 | + }, | |
| 545 | + /** | |
| 546 | + * 获取下行起点站对象。 | |
| 547 | + * @returns {{id: *}} | |
| 548 | + */ | |
| 549 | + getDownQdzObj: function() { | |
| 550 | + return { | |
| 551 | + id: _startEndStopObj.down.qdz.id | |
| 552 | + }; | |
| 553 | + }, | |
| 554 | + /** | |
| 555 | + * 获取下行终点站对象。 | |
| 556 | + * @returns {{id: *}} | |
| 557 | + */ | |
| 558 | + getDownZdzObj: function() { | |
| 559 | + return { | |
| 560 | + id: _startEndStopObj.down.zdz.id | |
| 561 | + }; | |
| 562 | + } | |
| 563 | + | |
| 564 | + | |
| 565 | + }; | |
| 566 | 566 | }; |
| 567 | 567 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/strategy/StrategyUtils.js
| 1 | -/** | |
| 2 | - * 工具类。 | |
| 3 | - * 注意:moment是mutable,所有的moment操作都会改变原有对象的值, | |
| 4 | - * 所以所有的操作都要小心处理。 | |
| 5 | - */ | |
| 6 | -var StrategyUtils = function() { | |
| 7 | - var date_wrap_prefix = "2000-01-01 "; // 包装日期的前缀 | |
| 8 | - var date_wrap_format = "YYYY-MM-DD HH:mm"; // 日期格式 | |
| 9 | - /** | |
| 10 | - * 将时间包装成日期,方便计算。 | |
| 11 | - * @param timeStr 时间格式,如 06:30 | |
| 12 | - * @returns moment对象 | |
| 13 | - */ | |
| 14 | - var _wrapTimeFun = function(timeStr) { | |
| 15 | - return moment( | |
| 16 | - date_wrap_prefix + timeStr, | |
| 17 | - date_wrap_format | |
| 18 | - ); | |
| 19 | - }; | |
| 20 | - /** | |
| 21 | - * 添加时间(注意,返回一个新的moment对象,此方法是immutable) | |
| 22 | - * @param timeObj moment 对象 | |
| 23 | - * @param time 时间 | |
| 24 | - * @param type 时间单位 | |
| 25 | - * @returns 重新创建一个moment返回 | |
| 26 | - */ | |
| 27 | - var _addTimeFun = function(timeObj, time, type) { | |
| 28 | - var _timeObj = moment(timeObj); // clone | |
| 29 | - _timeObj.add(time, type); | |
| 30 | - return _timeObj; | |
| 31 | - }; | |
| 32 | - | |
| 33 | - // 内部工厂类 | |
| 34 | - var _factoryFun = function() { | |
| 35 | - return { | |
| 36 | - // 创建参数 | |
| 37 | - createParameterObj: function(formMap, dataMap) { | |
| 38 | - return ParameterObj(formMap, dataMap); | |
| 39 | - }, | |
| 40 | - // 创建班次对象 | |
| 41 | - createBcObj: function(bcType, isUp, lp, fcno, fcTimeObj, paramObj) { | |
| 42 | - return BcObj(bcType, isUp, lp, fcno, fcTimeObj, paramObj); | |
| 43 | - } | |
| 44 | - }; | |
| 45 | - }; | |
| 46 | - | |
| 47 | - return { | |
| 48 | - /** | |
| 49 | - * 工厂对象,创建不同的对象。 | |
| 50 | - * @returns {{createParameterObj, createBcObj}} | |
| 51 | - */ | |
| 52 | - getFactory: function() { | |
| 53 | - return _factoryFun(); | |
| 54 | - }, | |
| 55 | - | |
| 56 | - //-------------- 时间操作 ------------// | |
| 57 | - /** | |
| 58 | - * 通过字符串创建时间对象。 | |
| 59 | - * @param timeStr 时间字符串 | |
| 60 | - * @returns {moment对象} | |
| 61 | - */ | |
| 62 | - toTimeObj: function(timeStr) { | |
| 63 | - return _wrapTimeFun(timeStr); | |
| 64 | - }, | |
| 65 | - /** | |
| 66 | - * 增加分钟。 | |
| 67 | - * @param timeObj 时间对象 | |
| 68 | - * @param minute 分钟 | |
| 69 | - * @returns {重新创建一个moment返回} | |
| 70 | - */ | |
| 71 | - addMinute: function(timeObj, minute) { | |
| 72 | - return _addTimeFun(timeObj, minute, "m"); | |
| 73 | - }, | |
| 74 | - | |
| 75 | - //-------------- 时间业务操作 ------------// | |
| 76 | - /** | |
| 77 | - * 判定某个班次是否是早高峰班次。 | |
| 78 | - * @param timeObj 班次时间 | |
| 79 | - * @param paramObj 参数对象 | |
| 80 | - * @returns true false | |
| 81 | - */ | |
| 82 | - isMPeakBc: function(timeObj, paramObj) { | |
| 83 | - // 早高峰开始时间 | |
| 84 | - var st = paramObj.getMPeakStartTimeObj(); | |
| 85 | - // 早高峰结束时间 | |
| 86 | - var et = paramObj.getMPeakEndTimeObj(); | |
| 87 | - // 包装日期 | |
| 88 | - return timeObj.isBetween(st, et, null, "[]"); | |
| 89 | - }, | |
| 90 | - /** | |
| 91 | - * 判定某个班次是否是晚高峰班次。 | |
| 92 | - * @param timeObj 班次时间 | |
| 93 | - * @param paramObj 参数对象 | |
| 94 | - * @returns true false | |
| 95 | - */ | |
| 96 | - isEPeakBc: function(timeObj, paramObj) { | |
| 97 | - // 晚高峰开始时间 | |
| 98 | - var st = paramObj.getEPeakStartTimeObj(); | |
| 99 | - // 晚高峰结束时间 | |
| 100 | - var et = paramObj.getEPeakEndTimeObj(); | |
| 101 | - // 包装日期 | |
| 102 | - return timeObj.isBetween(st, et, null, "[]"); | |
| 103 | - }, | |
| 104 | - /** | |
| 105 | - * 判定某个班次是否是低谷班次。 | |
| 106 | - * @param timeObj 班次时间 | |
| 107 | - * @param paramObj 参数对象 | |
| 108 | - * @returns true false | |
| 109 | - */ | |
| 110 | - isTroughBc: function(timeObj, paramObj) { | |
| 111 | - return ( | |
| 112 | - !this.isMPeakBc(timeObj, paramObj) && | |
| 113 | - !this.isEPeakBc(timeObj, paramObj) | |
| 114 | - ); | |
| 115 | - }, | |
| 116 | - /** | |
| 117 | - * 判定某个低谷班次是否在早高峰开始之前。 | |
| 118 | - * @param timeObj 班次时间 | |
| 119 | - * @param paramObj 参数对象 | |
| 120 | - * @returns true false | |
| 121 | - */ | |
| 122 | - isTroughBeforMPeakStartBc: function(timeObj, paramObj) { | |
| 123 | - // 早高峰开始时间 | |
| 124 | - var st = paramObj.getMPeakStartTimeObj(); | |
| 125 | - // 包装日期 | |
| 126 | - return timeObj.isBefore(st); | |
| 127 | - }, | |
| 128 | - /** | |
| 129 | - * 判定某个低谷班次是否在晚高峰结束之后。 | |
| 130 | - * @param timeObj 班次时间 | |
| 131 | - * @param paramObj 参数对象 | |
| 132 | - * @returns true false | |
| 133 | - */ | |
| 134 | - isTroughAfterEPeakEndBc: function(timeObj, paramObj) { | |
| 135 | - // 晚高峰结束时间 | |
| 136 | - var et = paramObj.getEPeakEndTimeObj(); | |
| 137 | - // 包装日期 | |
| 138 | - return timeObj.isAfter(et); | |
| 139 | - }, | |
| 140 | - | |
| 141 | - /** | |
| 142 | - * 获取固定的停站时间(固定停站时间都是选的最大值) | |
| 143 | - * @param timeObj 时间对象 | |
| 144 | - * @param isUp 是否上行 | |
| 145 | - * @param paramObj 参数对象 | |
| 146 | - * @returns number | |
| 147 | - */ | |
| 148 | - calcuFixedStopNumber: function(timeObj, isUp, paramObj) { | |
| 149 | - var peakStopTime; // 高峰停站时间 | |
| 150 | - var troughStopTime; // 低谷停站时间 | |
| 151 | - var secondaryStopTime; // 副站停站时间 | |
| 152 | - | |
| 153 | - // 双向停站 | |
| 154 | - if (paramObj.isTwoWayStop()) { | |
| 155 | - if (isUp) { // 上行 | |
| 156 | - if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 157 | - peakStopTime = Math.floor(paramObj.getUpMPeakTime() * 0.1); // 行驶时间的10% | |
| 158 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 159 | - peakStopTime = 3; | |
| 160 | - } | |
| 161 | - return peakStopTime; | |
| 162 | - } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 163 | - peakStopTime = Math.floor(paramObj.getUpEPeakTime() * 0.1); // 行驶时间的10% | |
| 164 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 165 | - peakStopTime = 3; | |
| 166 | - } | |
| 167 | - return peakStopTime; | |
| 168 | - } else { // 低谷 | |
| 169 | - if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 170 | - troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 171 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 172 | - troughStopTime = 10; | |
| 173 | - } | |
| 174 | - return troughStopTime; | |
| 175 | - } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 176 | - troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 177 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 178 | - troughStopTime = 10; | |
| 179 | - } | |
| 180 | - return troughStopTime; | |
| 181 | - } else { // 早高峰,晚高峰之间 | |
| 182 | - troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.15); // 行驶时间15% | |
| 183 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 184 | - troughStopTime = 10; | |
| 185 | - } | |
| 186 | - return troughStopTime; | |
| 187 | - } | |
| 188 | - } | |
| 189 | - } else { // 下行 | |
| 190 | - if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 191 | - peakStopTime = Math.floor(paramObj.getDownMPeakTime() * 0.1); // 行驶时间的10% | |
| 192 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 193 | - peakStopTime = 3; | |
| 194 | - } | |
| 195 | - return peakStopTime; | |
| 196 | - } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 197 | - peakStopTime = Math.floor(paramObj.getDownEPeakTime() * 0.1); // 行驶时间的10% | |
| 198 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 199 | - peakStopTime = 3; | |
| 200 | - } | |
| 201 | - return peakStopTime; | |
| 202 | - } else { // 低谷 | |
| 203 | - if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 204 | - troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 205 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 206 | - troughStopTime = 10; | |
| 207 | - } | |
| 208 | - return troughStopTime; | |
| 209 | - } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 210 | - troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 211 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 212 | - troughStopTime = 10; | |
| 213 | - } | |
| 214 | - return troughStopTime; | |
| 215 | - } else { // 早高峰,晚高峰之间 | |
| 216 | - troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.15); // 行驶时间15% | |
| 217 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 218 | - troughStopTime = 10; | |
| 219 | - } | |
| 220 | - return troughStopTime; | |
| 221 | - } | |
| 222 | - } | |
| 223 | - } | |
| 224 | - } else { // 主站停站 | |
| 225 | - if (isUp == paramObj.isUpOneWayStop()) { | |
| 226 | - if (isUp) { // 上行 | |
| 227 | - if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 228 | - peakStopTime = Math.floor(paramObj.getUpMPeakTime() * 0.1); // 行驶时间的10% | |
| 229 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 230 | - peakStopTime = 3; | |
| 231 | - } | |
| 232 | - return peakStopTime; | |
| 233 | - } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 234 | - peakStopTime = Math.floor(paramObj.getUpEPeakTime() * 0.1); // 行驶时间的10% | |
| 235 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 236 | - peakStopTime = 3; | |
| 237 | - } | |
| 238 | - return peakStopTime; | |
| 239 | - } else { // 低谷 | |
| 240 | - if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 241 | - troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 242 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 243 | - troughStopTime = 10; | |
| 244 | - } | |
| 245 | - return troughStopTime; | |
| 246 | - } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 247 | - troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 248 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 249 | - troughStopTime = 10; | |
| 250 | - } | |
| 251 | - return troughStopTime; | |
| 252 | - } else { // 早高峰,晚高峰之间 | |
| 253 | - troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.15); // 行驶时间15% | |
| 254 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 255 | - troughStopTime = 10; | |
| 256 | - } | |
| 257 | - return troughStopTime; | |
| 258 | - } | |
| 259 | - } | |
| 260 | - } else { // 下行 | |
| 261 | - if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 262 | - peakStopTime = Math.floor(paramObj.getDownMPeakTime() * 0.1); // 行驶时间的10% | |
| 263 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 264 | - peakStopTime = 3; | |
| 265 | - } | |
| 266 | - return peakStopTime; | |
| 267 | - } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 268 | - peakStopTime = Math.floor(paramObj.getDownEPeakTime() * 0.1); // 行驶时间的10% | |
| 269 | - if (peakStopTime < 3) { // 不少于3分钟 | |
| 270 | - peakStopTime = 3; | |
| 271 | - } | |
| 272 | - return peakStopTime; | |
| 273 | - } else { // 低谷 | |
| 274 | - if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 275 | - troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 276 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 277 | - troughStopTime = 10; | |
| 278 | - } | |
| 279 | - return troughStopTime; | |
| 280 | - } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 281 | - troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 282 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 283 | - troughStopTime = 10; | |
| 284 | - } | |
| 285 | - return troughStopTime; | |
| 286 | - } else { // 早高峰,晚高峰之间 | |
| 287 | - troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.15); // 行驶时间15% | |
| 288 | - if (troughStopTime < 10) { // 不少于10分钟 | |
| 289 | - troughStopTime = 10; | |
| 290 | - } | |
| 291 | - return troughStopTime; | |
| 292 | - } | |
| 293 | - } | |
| 294 | - } | |
| 295 | - } else { // 副站停战,2到3分钟 | |
| 296 | - secondaryStopTime = 3; | |
| 297 | - return secondaryStopTime; // 直接返回3分钟 | |
| 298 | - } | |
| 299 | - } | |
| 300 | - | |
| 301 | - }, | |
| 302 | - | |
| 303 | - /** | |
| 304 | - * 获取行驶时间。 | |
| 305 | - * @param timeObj 班次时间字符串 | |
| 306 | - * @param isUp 是否上行 | |
| 307 | - * @param paramObj 参数对象 | |
| 308 | - */ | |
| 309 | - calcuTravelTime: function(timeObj, isUp, paramObj) { | |
| 310 | - if (isUp) { | |
| 311 | - if (this.isMPeakBc(timeObj, paramObj)) { | |
| 312 | - return paramObj.getUpMPeakTime(); | |
| 313 | - } else if (this.isEPeakBc(timeObj, paramObj)) { | |
| 314 | - return paramObj.getUpEPeakTime(); | |
| 315 | - } else { | |
| 316 | - return paramObj.getUpTroughTime(); | |
| 317 | - } | |
| 318 | - } else { | |
| 319 | - if (this.isMPeakBc(timeObj, paramObj)) { | |
| 320 | - return paramObj.getDownMPeakTime(); | |
| 321 | - } else if (this.isEPeakBc(timeObj, paramObj)) { | |
| 322 | - return paramObj.getDownEPeakTime(); | |
| 323 | - } else { | |
| 324 | - return paramObj.getDownTroughTime(); | |
| 325 | - } | |
| 326 | - } | |
| 327 | - }, | |
| 328 | - | |
| 329 | - /** | |
| 330 | - * 获取行驶里程。 | |
| 331 | - * @param isUp 是否上行 | |
| 332 | - * @param bcType 班次类型 | |
| 333 | - * @param paramObj 参数对象 | |
| 334 | - */ | |
| 335 | - calcuTravelLcNumber: function(isUp, bcType, paramObj) { | |
| 336 | - if (isUp) { | |
| 337 | - if (bcType == "in") { | |
| 338 | - return paramObj.getUpInLc(); | |
| 339 | - } else if (bcType == "out") { | |
| 340 | - return paramObj.getUpOutLc(); | |
| 341 | - } else { | |
| 342 | - // 基本班次类型,暂时不考虑区间等其他班次类型 | |
| 343 | - // 暂时不考虑高峰低谷里程的区分 | |
| 344 | - return paramObj.getUpNormalLc(); | |
| 345 | - } | |
| 346 | - } else { | |
| 347 | - if (bcType == "in") { | |
| 348 | - return paramObj.getDownInLc(); | |
| 349 | - } else if (bcType == "out") { | |
| 350 | - return paramObj.getDownOutLc(); | |
| 351 | - } else { | |
| 352 | - // 基本班次类型,暂时不考虑区间等其他班次类型 | |
| 353 | - // 暂时不考虑高峰低谷里程的区分 | |
| 354 | - return paramObj.getDownNormalLc(); | |
| 355 | - } | |
| 356 | - } | |
| 357 | - }, | |
| 358 | - | |
| 359 | - /** | |
| 360 | - * 计算高峰周转时间。 | |
| 361 | - * @param paramObj 参数对象 | |
| 362 | - * @returns 周转时间 | |
| 363 | - */ | |
| 364 | - calcuPeakZzsj: function(paramObj) { | |
| 365 | - // 使用早高峰的周转时间 | |
| 366 | - var _time = paramObj.getMPeakStartTimeObj(); | |
| 367 | - var _zzsj = // 早高峰上行行驶时间+停站时间+早高峰下行行驶时间+停站时间 | |
| 368 | - this.calcuTravelTime(_time, true, paramObj) + | |
| 369 | - this.calcuFixedStopNumber(_time, true, paramObj) + | |
| 370 | - this.calcuTravelTime(_time, false, paramObj) + | |
| 371 | - this.calcuFixedStopNumber(_time, false, paramObj); | |
| 372 | - return _zzsj; | |
| 373 | - }, | |
| 374 | - | |
| 375 | - /** | |
| 376 | - * 计算低谷周转时间。 | |
| 377 | - * @param paramObj 参数对象 | |
| 378 | - * @returns 周转时间 | |
| 379 | - */ | |
| 380 | - calcuTroughZzsj: function(paramObj) { | |
| 381 | - // 使用低谷的周转时间 | |
| 382 | - var _time = this.addMinute(paramObj.getMPeakStartTimeObj(), -1); // 使用任意一个低谷时间 | |
| 383 | - var _zzsj = // 低谷上行行驶时间+停站时间+低谷下行行驶时间+停站时间 | |
| 384 | - this.calcuTravelTime(_time, true, paramObj) + | |
| 385 | - this.calcuFixedStopNumber(_time, true, paramObj) + | |
| 386 | - this.calcuTravelTime(_time, false, paramObj) + | |
| 387 | - this.calcuFixedStopNumber(_time, false, paramObj); | |
| 388 | - | |
| 389 | - return _zzsj; | |
| 390 | - }, | |
| 391 | - | |
| 392 | - /** | |
| 393 | - * 计算车辆总数。 | |
| 394 | - * @param paramObj 参数对象 | |
| 395 | - * @returns 车辆数 | |
| 396 | - */ | |
| 397 | - calcuClzx: function(paramObj) { | |
| 398 | - // 使用早高峰平均间隔 | |
| 399 | - var _fcjx_avg = Math.floor((paramObj.getMPeakMinFcjx() + paramObj.getMPeakMaxFcjx()) / 2); | |
| 400 | - return Math.round(this.calcuPeakZzsj(paramObj) / _fcjx_avg); | |
| 401 | - } | |
| 402 | - | |
| 403 | - }; | |
| 1 | +/** | |
| 2 | + * 工具类。 | |
| 3 | + * 注意:moment是mutable,所有的moment操作都会改变原有对象的值, | |
| 4 | + * 所以所有的操作都要小心处理。 | |
| 5 | + */ | |
| 6 | +var StrategyUtils = function() { | |
| 7 | + var date_wrap_prefix = "2000-01-01 "; // 包装日期的前缀 | |
| 8 | + var date_wrap_format = "YYYY-MM-DD HH:mm"; // 日期格式 | |
| 9 | + /** | |
| 10 | + * 将时间包装成日期,方便计算。 | |
| 11 | + * @param timeStr 时间格式,如 06:30 | |
| 12 | + * @returns moment对象 | |
| 13 | + */ | |
| 14 | + var _wrapTimeFun = function(timeStr) { | |
| 15 | + return moment( | |
| 16 | + date_wrap_prefix + timeStr, | |
| 17 | + date_wrap_format | |
| 18 | + ); | |
| 19 | + }; | |
| 20 | + /** | |
| 21 | + * 添加时间(注意,返回一个新的moment对象,此方法是immutable) | |
| 22 | + * @param timeObj moment 对象 | |
| 23 | + * @param time 时间 | |
| 24 | + * @param type 时间单位 | |
| 25 | + * @returns 重新创建一个moment返回 | |
| 26 | + */ | |
| 27 | + var _addTimeFun = function(timeObj, time, type) { | |
| 28 | + var _timeObj = moment(timeObj); // clone | |
| 29 | + _timeObj.add(time, type); | |
| 30 | + return _timeObj; | |
| 31 | + }; | |
| 32 | + | |
| 33 | + // 内部工厂类 | |
| 34 | + var _factoryFun = function() { | |
| 35 | + return { | |
| 36 | + // 创建参数 | |
| 37 | + createParameterObj: function(formMap, dataMap) { | |
| 38 | + return ParameterObj(formMap, dataMap); | |
| 39 | + }, | |
| 40 | + // 创建班次对象 | |
| 41 | + createBcObj: function(bcType, isUp, lp, fcno, fcTimeObj, paramObj) { | |
| 42 | + return BcObj(bcType, isUp, lp, fcno, fcTimeObj, paramObj); | |
| 43 | + } | |
| 44 | + }; | |
| 45 | + }; | |
| 46 | + | |
| 47 | + return { | |
| 48 | + /** | |
| 49 | + * 工厂对象,创建不同的对象。 | |
| 50 | + * @returns {{createParameterObj, createBcObj}} | |
| 51 | + */ | |
| 52 | + getFactory: function() { | |
| 53 | + return _factoryFun(); | |
| 54 | + }, | |
| 55 | + | |
| 56 | + //-------------- 时间操作 ------------// | |
| 57 | + /** | |
| 58 | + * 通过字符串创建时间对象。 | |
| 59 | + * @param timeStr 时间字符串 | |
| 60 | + * @returns {moment对象} | |
| 61 | + */ | |
| 62 | + toTimeObj: function(timeStr) { | |
| 63 | + return _wrapTimeFun(timeStr); | |
| 64 | + }, | |
| 65 | + /** | |
| 66 | + * 增加分钟。 | |
| 67 | + * @param timeObj 时间对象 | |
| 68 | + * @param minute 分钟 | |
| 69 | + * @returns {重新创建一个moment返回} | |
| 70 | + */ | |
| 71 | + addMinute: function(timeObj, minute) { | |
| 72 | + return _addTimeFun(timeObj, minute, "m"); | |
| 73 | + }, | |
| 74 | + | |
| 75 | + //-------------- 时间业务操作 ------------// | |
| 76 | + /** | |
| 77 | + * 判定某个班次是否是早高峰班次。 | |
| 78 | + * @param timeObj 班次时间 | |
| 79 | + * @param paramObj 参数对象 | |
| 80 | + * @returns true false | |
| 81 | + */ | |
| 82 | + isMPeakBc: function(timeObj, paramObj) { | |
| 83 | + // 早高峰开始时间 | |
| 84 | + var st = paramObj.getMPeakStartTimeObj(); | |
| 85 | + // 早高峰结束时间 | |
| 86 | + var et = paramObj.getMPeakEndTimeObj(); | |
| 87 | + // 包装日期 | |
| 88 | + return timeObj.isBetween(st, et, null, "[]"); | |
| 89 | + }, | |
| 90 | + /** | |
| 91 | + * 判定某个班次是否是晚高峰班次。 | |
| 92 | + * @param timeObj 班次时间 | |
| 93 | + * @param paramObj 参数对象 | |
| 94 | + * @returns true false | |
| 95 | + */ | |
| 96 | + isEPeakBc: function(timeObj, paramObj) { | |
| 97 | + // 晚高峰开始时间 | |
| 98 | + var st = paramObj.getEPeakStartTimeObj(); | |
| 99 | + // 晚高峰结束时间 | |
| 100 | + var et = paramObj.getEPeakEndTimeObj(); | |
| 101 | + // 包装日期 | |
| 102 | + return timeObj.isBetween(st, et, null, "[]"); | |
| 103 | + }, | |
| 104 | + /** | |
| 105 | + * 判定某个班次是否是低谷班次。 | |
| 106 | + * @param timeObj 班次时间 | |
| 107 | + * @param paramObj 参数对象 | |
| 108 | + * @returns true false | |
| 109 | + */ | |
| 110 | + isTroughBc: function(timeObj, paramObj) { | |
| 111 | + return ( | |
| 112 | + !this.isMPeakBc(timeObj, paramObj) && | |
| 113 | + !this.isEPeakBc(timeObj, paramObj) | |
| 114 | + ); | |
| 115 | + }, | |
| 116 | + /** | |
| 117 | + * 判定某个低谷班次是否在早高峰开始之前。 | |
| 118 | + * @param timeObj 班次时间 | |
| 119 | + * @param paramObj 参数对象 | |
| 120 | + * @returns true false | |
| 121 | + */ | |
| 122 | + isTroughBeforMPeakStartBc: function(timeObj, paramObj) { | |
| 123 | + // 早高峰开始时间 | |
| 124 | + var st = paramObj.getMPeakStartTimeObj(); | |
| 125 | + // 包装日期 | |
| 126 | + return timeObj.isBefore(st); | |
| 127 | + }, | |
| 128 | + /** | |
| 129 | + * 判定某个低谷班次是否在晚高峰结束之后。 | |
| 130 | + * @param timeObj 班次时间 | |
| 131 | + * @param paramObj 参数对象 | |
| 132 | + * @returns true false | |
| 133 | + */ | |
| 134 | + isTroughAfterEPeakEndBc: function(timeObj, paramObj) { | |
| 135 | + // 晚高峰结束时间 | |
| 136 | + var et = paramObj.getEPeakEndTimeObj(); | |
| 137 | + // 包装日期 | |
| 138 | + return timeObj.isAfter(et); | |
| 139 | + }, | |
| 140 | + | |
| 141 | + /** | |
| 142 | + * 获取固定的停站时间(固定停站时间都是选的最大值) | |
| 143 | + * @param timeObj 时间对象 | |
| 144 | + * @param isUp 是否上行 | |
| 145 | + * @param paramObj 参数对象 | |
| 146 | + * @returns number | |
| 147 | + */ | |
| 148 | + calcuFixedStopNumber: function(timeObj, isUp, paramObj) { | |
| 149 | + var peakStopTime; // 高峰停站时间 | |
| 150 | + var troughStopTime; // 低谷停站时间 | |
| 151 | + var secondaryStopTime; // 副站停站时间 | |
| 152 | + | |
| 153 | + // 双向停站 | |
| 154 | + if (paramObj.isTwoWayStop()) { | |
| 155 | + if (isUp) { // 上行 | |
| 156 | + if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 157 | + peakStopTime = Math.floor(paramObj.getUpMPeakTime() * 0.1); // 行驶时间的10% | |
| 158 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 159 | + peakStopTime = 3; | |
| 160 | + } | |
| 161 | + return peakStopTime; | |
| 162 | + } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 163 | + peakStopTime = Math.floor(paramObj.getUpEPeakTime() * 0.1); // 行驶时间的10% | |
| 164 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 165 | + peakStopTime = 3; | |
| 166 | + } | |
| 167 | + return peakStopTime; | |
| 168 | + } else { // 低谷 | |
| 169 | + if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 170 | + troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 171 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 172 | + troughStopTime = 10; | |
| 173 | + } | |
| 174 | + return troughStopTime; | |
| 175 | + } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 176 | + troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 177 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 178 | + troughStopTime = 10; | |
| 179 | + } | |
| 180 | + return troughStopTime; | |
| 181 | + } else { // 早高峰,晚高峰之间 | |
| 182 | + troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.15); // 行驶时间15% | |
| 183 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 184 | + troughStopTime = 10; | |
| 185 | + } | |
| 186 | + return troughStopTime; | |
| 187 | + } | |
| 188 | + } | |
| 189 | + } else { // 下行 | |
| 190 | + if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 191 | + peakStopTime = Math.floor(paramObj.getDownMPeakTime() * 0.1); // 行驶时间的10% | |
| 192 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 193 | + peakStopTime = 3; | |
| 194 | + } | |
| 195 | + return peakStopTime; | |
| 196 | + } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 197 | + peakStopTime = Math.floor(paramObj.getDownEPeakTime() * 0.1); // 行驶时间的10% | |
| 198 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 199 | + peakStopTime = 3; | |
| 200 | + } | |
| 201 | + return peakStopTime; | |
| 202 | + } else { // 低谷 | |
| 203 | + if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 204 | + troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 205 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 206 | + troughStopTime = 10; | |
| 207 | + } | |
| 208 | + return troughStopTime; | |
| 209 | + } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 210 | + troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 211 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 212 | + troughStopTime = 10; | |
| 213 | + } | |
| 214 | + return troughStopTime; | |
| 215 | + } else { // 早高峰,晚高峰之间 | |
| 216 | + troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.15); // 行驶时间15% | |
| 217 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 218 | + troughStopTime = 10; | |
| 219 | + } | |
| 220 | + return troughStopTime; | |
| 221 | + } | |
| 222 | + } | |
| 223 | + } | |
| 224 | + } else { // 主站停站 | |
| 225 | + if (isUp == paramObj.isUpOneWayStop()) { | |
| 226 | + if (isUp) { // 上行 | |
| 227 | + if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 228 | + peakStopTime = Math.floor(paramObj.getUpMPeakTime() * 0.1); // 行驶时间的10% | |
| 229 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 230 | + peakStopTime = 3; | |
| 231 | + } | |
| 232 | + return peakStopTime; | |
| 233 | + } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 234 | + peakStopTime = Math.floor(paramObj.getUpEPeakTime() * 0.1); // 行驶时间的10% | |
| 235 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 236 | + peakStopTime = 3; | |
| 237 | + } | |
| 238 | + return peakStopTime; | |
| 239 | + } else { // 低谷 | |
| 240 | + if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 241 | + troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 242 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 243 | + troughStopTime = 10; | |
| 244 | + } | |
| 245 | + return troughStopTime; | |
| 246 | + } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 247 | + troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.2); // 行驶时间20% | |
| 248 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 249 | + troughStopTime = 10; | |
| 250 | + } | |
| 251 | + return troughStopTime; | |
| 252 | + } else { // 早高峰,晚高峰之间 | |
| 253 | + troughStopTime = Math.floor(paramObj.getUpTroughTime() * 0.15); // 行驶时间15% | |
| 254 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 255 | + troughStopTime = 10; | |
| 256 | + } | |
| 257 | + return troughStopTime; | |
| 258 | + } | |
| 259 | + } | |
| 260 | + } else { // 下行 | |
| 261 | + if (this.isMPeakBc(timeObj, paramObj)) { // 早高峰 | |
| 262 | + peakStopTime = Math.floor(paramObj.getDownMPeakTime() * 0.1); // 行驶时间的10% | |
| 263 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 264 | + peakStopTime = 3; | |
| 265 | + } | |
| 266 | + return peakStopTime; | |
| 267 | + } else if (this.isEPeakBc(timeObj, paramObj)) { // 晚高峰 | |
| 268 | + peakStopTime = Math.floor(paramObj.getDownEPeakTime() * 0.1); // 行驶时间的10% | |
| 269 | + if (peakStopTime < 3) { // 不少于3分钟 | |
| 270 | + peakStopTime = 3; | |
| 271 | + } | |
| 272 | + return peakStopTime; | |
| 273 | + } else { // 低谷 | |
| 274 | + if (this.isTroughBeforMPeakStartBc(timeObj, paramObj)) { // 早高峰开始前 | |
| 275 | + troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 276 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 277 | + troughStopTime = 10; | |
| 278 | + } | |
| 279 | + return troughStopTime; | |
| 280 | + } else if (this.isTroughAfterEPeakEndBc(timeObj, paramObj)) { // 晚高峰结束后 | |
| 281 | + troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.2); // 行驶时间20% | |
| 282 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 283 | + troughStopTime = 10; | |
| 284 | + } | |
| 285 | + return troughStopTime; | |
| 286 | + } else { // 早高峰,晚高峰之间 | |
| 287 | + troughStopTime = Math.floor(paramObj.getDownTroughTime() * 0.15); // 行驶时间15% | |
| 288 | + if (troughStopTime < 10) { // 不少于10分钟 | |
| 289 | + troughStopTime = 10; | |
| 290 | + } | |
| 291 | + return troughStopTime; | |
| 292 | + } | |
| 293 | + } | |
| 294 | + } | |
| 295 | + } else { // 副站停战,2到3分钟 | |
| 296 | + secondaryStopTime = 3; | |
| 297 | + return secondaryStopTime; // 直接返回3分钟 | |
| 298 | + } | |
| 299 | + } | |
| 300 | + | |
| 301 | + }, | |
| 302 | + | |
| 303 | + /** | |
| 304 | + * 获取行驶时间。 | |
| 305 | + * @param timeObj 班次时间字符串 | |
| 306 | + * @param isUp 是否上行 | |
| 307 | + * @param paramObj 参数对象 | |
| 308 | + */ | |
| 309 | + calcuTravelTime: function(timeObj, isUp, paramObj) { | |
| 310 | + if (isUp) { | |
| 311 | + if (this.isMPeakBc(timeObj, paramObj)) { | |
| 312 | + return paramObj.getUpMPeakTime(); | |
| 313 | + } else if (this.isEPeakBc(timeObj, paramObj)) { | |
| 314 | + return paramObj.getUpEPeakTime(); | |
| 315 | + } else { | |
| 316 | + return paramObj.getUpTroughTime(); | |
| 317 | + } | |
| 318 | + } else { | |
| 319 | + if (this.isMPeakBc(timeObj, paramObj)) { | |
| 320 | + return paramObj.getDownMPeakTime(); | |
| 321 | + } else if (this.isEPeakBc(timeObj, paramObj)) { | |
| 322 | + return paramObj.getDownEPeakTime(); | |
| 323 | + } else { | |
| 324 | + return paramObj.getDownTroughTime(); | |
| 325 | + } | |
| 326 | + } | |
| 327 | + }, | |
| 328 | + | |
| 329 | + /** | |
| 330 | + * 获取行驶里程。 | |
| 331 | + * @param isUp 是否上行 | |
| 332 | + * @param bcType 班次类型 | |
| 333 | + * @param paramObj 参数对象 | |
| 334 | + */ | |
| 335 | + calcuTravelLcNumber: function(isUp, bcType, paramObj) { | |
| 336 | + if (isUp) { | |
| 337 | + if (bcType == "in") { | |
| 338 | + return paramObj.getUpInLc(); | |
| 339 | + } else if (bcType == "out") { | |
| 340 | + return paramObj.getUpOutLc(); | |
| 341 | + } else { | |
| 342 | + // 基本班次类型,暂时不考虑区间等其他班次类型 | |
| 343 | + // 暂时不考虑高峰低谷里程的区分 | |
| 344 | + return paramObj.getUpNormalLc(); | |
| 345 | + } | |
| 346 | + } else { | |
| 347 | + if (bcType == "in") { | |
| 348 | + return paramObj.getDownInLc(); | |
| 349 | + } else if (bcType == "out") { | |
| 350 | + return paramObj.getDownOutLc(); | |
| 351 | + } else { | |
| 352 | + // 基本班次类型,暂时不考虑区间等其他班次类型 | |
| 353 | + // 暂时不考虑高峰低谷里程的区分 | |
| 354 | + return paramObj.getDownNormalLc(); | |
| 355 | + } | |
| 356 | + } | |
| 357 | + }, | |
| 358 | + | |
| 359 | + /** | |
| 360 | + * 计算高峰周转时间。 | |
| 361 | + * @param paramObj 参数对象 | |
| 362 | + * @returns 周转时间 | |
| 363 | + */ | |
| 364 | + calcuPeakZzsj: function(paramObj) { | |
| 365 | + // 使用早高峰的周转时间 | |
| 366 | + var _time = paramObj.getMPeakStartTimeObj(); | |
| 367 | + var _zzsj = // 早高峰上行行驶时间+停站时间+早高峰下行行驶时间+停站时间 | |
| 368 | + this.calcuTravelTime(_time, true, paramObj) + | |
| 369 | + this.calcuFixedStopNumber(_time, true, paramObj) + | |
| 370 | + this.calcuTravelTime(_time, false, paramObj) + | |
| 371 | + this.calcuFixedStopNumber(_time, false, paramObj); | |
| 372 | + return _zzsj; | |
| 373 | + }, | |
| 374 | + | |
| 375 | + /** | |
| 376 | + * 计算低谷周转时间。 | |
| 377 | + * @param paramObj 参数对象 | |
| 378 | + * @returns 周转时间 | |
| 379 | + */ | |
| 380 | + calcuTroughZzsj: function(paramObj) { | |
| 381 | + // 使用低谷的周转时间 | |
| 382 | + var _time = this.addMinute(paramObj.getMPeakStartTimeObj(), -1); // 使用任意一个低谷时间 | |
| 383 | + var _zzsj = // 低谷上行行驶时间+停站时间+低谷下行行驶时间+停站时间 | |
| 384 | + this.calcuTravelTime(_time, true, paramObj) + | |
| 385 | + this.calcuFixedStopNumber(_time, true, paramObj) + | |
| 386 | + this.calcuTravelTime(_time, false, paramObj) + | |
| 387 | + this.calcuFixedStopNumber(_time, false, paramObj); | |
| 388 | + | |
| 389 | + return _zzsj; | |
| 390 | + }, | |
| 391 | + | |
| 392 | + /** | |
| 393 | + * 计算车辆总数。 | |
| 394 | + * @param paramObj 参数对象 | |
| 395 | + * @returns 车辆数 | |
| 396 | + */ | |
| 397 | + calcuClzx: function(paramObj) { | |
| 398 | + // 使用早高峰平均间隔 | |
| 399 | + var _fcjx_avg = Math.floor((paramObj.getMPeakMinFcjx() + paramObj.getMPeakMaxFcjx()) / 2); | |
| 400 | + return Math.round(this.calcuPeakZzsj(paramObj) / _fcjx_avg); | |
| 401 | + } | |
| 402 | + | |
| 403 | + }; | |
| 404 | 404 | }(); |
| 405 | 405 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/base/timesmodel/js/strategy/strategy-headway.js
| 1 | -/** | |
| 2 | - * 使用发车间隔模拟客流的策略,生成时刻表。 | |
| 3 | - */ | |
| 4 | -var StrategyHeadway = function() { | |
| 5 | - // 所有的时间使用moment.js计算 | |
| 6 | - | |
| 7 | - var _paramObj; // 参数对象 | |
| 8 | - | |
| 9 | - var _bxDesc = [ // 班型描述 | |
| 10 | - {'type':'六工一休','hoursV':6.66, 'minueV':'6:40', 'qcount': 0, 'avertime': 0}, | |
| 11 | - {'type':'五工一休','hoursV':6.85, 'minueV':'6:51', 'qcount': 0, 'avertime': 0}, | |
| 12 | - {'type':'四工一休','hoursV':7.14, 'minueV':'7:08', 'qcount': 0, 'avertime': 0}, | |
| 13 | - {'type':'三工一休','hoursV':7.61, 'minueV':'7:37', 'qcount': 0, 'avertime': 0}, | |
| 14 | - {'type':'二工一休','hoursV':8.57, 'minueV':'8:34', 'qcount': 0, 'avertime': 0}, | |
| 15 | - {'type':'一工一休','hoursV':11.42, 'minueV':'11:25', 'qcount': 0, 'avertime': 0}, | |
| 16 | - {'type':'五工二休','hoursV':7.99, 'minueV':'8:00', 'qcount': 0, 'avertime': 0}, | |
| 17 | - {'type':'无工休', 'hoursV':5.43, 'minueV':'5:43', 'qcount': 0, 'avertime': 0} | |
| 18 | - ]; | |
| 19 | - | |
| 20 | - // 重要数据结构,二维数组的形式保存班次信息 | |
| 21 | - // 行表示几个路牌,列表示几圈,每个元素表示一圈包含两个班次对象(一个也有可能) | |
| 22 | - // TODO:之后会把这个结构定义成一个类 | |
| 23 | - var _headWayBcArray = []; | |
| 24 | - | |
| 25 | - var headWayF = { | |
| 26 | - /** | |
| 27 | - * 使用发车间隔策略生成时刻表。 | |
| 28 | - * @param paramObj 参数对象 | |
| 29 | - * @param lpArray 路牌数组 | |
| 30 | - * @constructor | |
| 31 | - */ | |
| 32 | - BXPplaceClassesTime03 : function(paramObj, lpArray) { | |
| 33 | - //console.log(lpArray); | |
| 34 | - | |
| 35 | - _paramObj = paramObj; | |
| 36 | - | |
| 37 | - var i = 0; | |
| 38 | - var j = 0; | |
| 39 | - var data = []; | |
| 40 | - | |
| 41 | - // 第一步,计算标准线,计算所有班型工时,创建二维班次结构,并把标准线数据作为第一个路牌的班次数据 | |
| 42 | - this._01_buildBasicLine(lpArray); | |
| 43 | - // 第二步,构造所有高峰班次 | |
| 44 | - this._02_buildAllGfbc(lpArray); | |
| 45 | - // 第三步,计算班型类型(每个路牌的班型) | |
| 46 | - this._03_calcuBxtype(); | |
| 47 | - // 第四步,根据每个路牌的班型构造所有班次 | |
| 48 | - this._04_buildAllOtherBc(lpArray); | |
| 49 | - | |
| 50 | - | |
| 51 | - // TODO:先定死参数 | |
| 52 | - // 早高峰间隔时间 7分钟 | |
| 53 | - // 晚高峰间隔时间 7分钟 | |
| 54 | - // 早高峰之前 15分钟 | |
| 55 | - // 早高峰结束,晚高峰开始之前 15分钟 | |
| 56 | - // 晚高峰之后 20分钟 | |
| 57 | - | |
| 58 | - // 做5休2路牌数目 6 | |
| 59 | - //var data1 = {}; | |
| 60 | - // | |
| 61 | - //// TODO:计算基准线,不画,使用下行,以后根据哪个首班早,用哪个方向 | |
| 62 | - //data = data.concat(this._buildNormalLine(false, 12)); | |
| 63 | - //data = data.concat(this._01_buildBasicLine(lpArray)); | |
| 64 | - //console.log(_bxDesc); | |
| 65 | - | |
| 66 | - //// TODO:按照早高峰开始时间,以及间隔时间从头创建班次 | |
| 67 | - //var avertime = _bxDesc.avertime; // 平均周转时间 | |
| 68 | - //var maxgftime = 75 + 80 + 7 + 8; // 高峰最大周转时间 | |
| 69 | - //var data1 = this._buildAllGfBc(false); | |
| 70 | - //console.log(data1); | |
| 71 | - // | |
| 72 | - //// TODO:分割路牌,选出正路牌,从早高峰班次开始添加到晚高峰结束 | |
| 73 | - //// TODO:写死,使用奇数路牌添加正路牌 | |
| 74 | - //// TODO:按照做一休一来,4.5圈 | |
| 75 | - //var maxdgtime = 75 + 75 + 15 + 15; // 低谷最大周转时间 | |
| 76 | - //var zlp = [1, 4, 7, 10, 13, 16, 19, 22, 23]; // 9个正路牌,使用低谷最小配车数 | |
| 77 | - //var xldir_z = true; | |
| 78 | - //var bc_index = 1; | |
| 79 | - //var bc_obj; | |
| 80 | - //var kssj_gfstart; | |
| 81 | - //for (i = 0; i < zlp.length; i++) { | |
| 82 | - // // TODO:删除正路牌的bcWgf | |
| 83 | - // delete data1[zlp[i]].bcWgf; | |
| 84 | - // | |
| 85 | - // kssj_gfstart = StrategyUtils.toWrapTime(data1[zlp[i]].bcZgf.fcsj); | |
| 86 | - // kssj_gfstart = kssj_gfstart.add(data1[zlp[i]].bcZgf.bcsj, "m").add(data1[zlp[i]].bcZgf.STOPTIME, "m"); | |
| 87 | - // for (bc_index = 1; bc_index <= 9; bc_index++) { | |
| 88 | - // bc_obj = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 89 | - // "normal", | |
| 90 | - // xldir_z, zlp[i], 3, | |
| 91 | - // kssj_gfstart.format("HH:mm"), | |
| 92 | - // _paramObj | |
| 93 | - // ); | |
| 94 | - // data.push(bc_obj); | |
| 95 | - // | |
| 96 | - // xldir_z = !xldir_z; | |
| 97 | - // kssj_gfstart = StrategyUtils.toWrapTime(bc_obj.ARRIVALTIME).add(bc_obj.STOPTIME, "m"); | |
| 98 | - // } | |
| 99 | - // | |
| 100 | - // bc_index = 1; | |
| 101 | - // xldir_z = true; | |
| 102 | - //} | |
| 103 | - // | |
| 104 | - //// TODO:修正bcWgf | |
| 105 | - //for (var key in data1) { | |
| 106 | - // if (data1[key].bcWgf) { | |
| 107 | - // // TODO:第一块正路牌的bcWgf晚了18分钟,分班路牌的bcWgf向后移动18分钟 | |
| 108 | - // // TODO:还要改成上行 | |
| 109 | - // data1[key].bcWgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 110 | - // "normal", | |
| 111 | - // true, key, 3, | |
| 112 | - // StrategyUtils.toWrapTime(data1[key].bcWgf.fcsj).add(18, "m").format("HH:mm"), | |
| 113 | - // _paramObj | |
| 114 | - // ); | |
| 115 | - // } | |
| 116 | - // | |
| 117 | - //} | |
| 118 | - // | |
| 119 | - //// TODO:6个做5休二,大致3圈 | |
| 120 | - //// TODO:暂时写死路牌分割位置,然后以bcZgf,bcWgf为基准向左右两侧各加2各班次 | |
| 121 | - //var _5_2_lp = [5, 8, 11, 14, 17, 20]; | |
| 122 | - //for (i = 0; i < _5_2_lp.length; i++) { | |
| 123 | - // // TODO:先向后加一个班次 | |
| 124 | - // data.push(StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 125 | - // "normal", | |
| 126 | - // "relationshipGraph-down", _5_2_lp[i], 3, | |
| 127 | - // StrategyUtils.toWrapTime(data1[_5_2_lp[i]].bcZgf.ARRIVALTIME).add(data1[_5_2_lp[i]].bcZgf.STOPTIME, "m").format("HH:mm"), | |
| 128 | - // _paramObj | |
| 129 | - // )); | |
| 130 | - // data.push(StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 131 | - // "normal", | |
| 132 | - // "relationshipGraph-up", _5_2_lp[i], 3, | |
| 133 | - // StrategyUtils.toWrapTime(data1[_5_2_lp[i]].bcWgf.ARRIVALTIME).add(data1[_5_2_lp[i]].bcWgf.STOPTIME, "m").format("HH:mm"), | |
| 134 | - // _paramObj | |
| 135 | - // )); | |
| 136 | - //} | |
| 137 | - | |
| 138 | - | |
| 139 | - // TODO:8个其他形式分班 | |
| 140 | - | |
| 141 | - | |
| 142 | - // final: 添加班次 | |
| 143 | - for (i = 0; i < _headWayBcArray.length; i++) { | |
| 144 | - for (j = 0; j < _headWayBcArray[i]["qObj"].length; j++) { | |
| 145 | - if (_headWayBcArray[i]["qObj"][j].hasBc1) { | |
| 146 | - data.push(_headWayBcArray[i]["qObj"][j]["_bc1_"].toGanttBcObj()); | |
| 147 | - } | |
| 148 | - if (_headWayBcArray[i]["qObj"][j].hasBc2) { | |
| 149 | - data.push(_headWayBcArray[i]["qObj"][j]["_bc2_"].toGanttBcObj()); | |
| 150 | - } | |
| 151 | - } | |
| 152 | - } | |
| 153 | - | |
| 154 | - return {'json':data,'bxrcgs':null}; | |
| 155 | - }, | |
| 156 | - | |
| 157 | - // TODO:构造所有路牌早晚高峰班次(假设早高峰和晚高峰相同的车辆数) | |
| 158 | - _buildAllGfBc: function(isUp) { | |
| 159 | - // TODO:按照早高峰开始时间,以及间隔时间从头创建班次 | |
| 160 | - var _travelTimeObj = _paramObj.getTravelTimeObj(); | |
| 161 | - var _timeIntervalObj = _paramObj.getTimeIntervalObj(); | |
| 162 | - | |
| 163 | - var avertime = _bxDesc.avertime; // 平均周转时间 | |
| 164 | - var maxzgftime = // 早高峰最大周转时间 | |
| 165 | - _travelTimeObj.moningpeak[0] + | |
| 166 | - _travelTimeObj.moningpeak[1] + | |
| 167 | - Math.floor(_travelTimeObj.moningpeak[0] * 0.1) + | |
| 168 | - Math.floor(_travelTimeObj.moningpeak[1] * 0.1); | |
| 169 | - var maxwgftime = // 晚早高峰最大周转时间 | |
| 170 | - _travelTimeObj.eveningpeak[0] + | |
| 171 | - _travelTimeObj.eveningpeak[1] + | |
| 172 | - Math.floor(_travelTimeObj.eveningpeak[0] * 0.1) + | |
| 173 | - Math.floor(_travelTimeObj.eveningpeak[1] * 0.1); | |
| 174 | - | |
| 175 | - // 计算早高峰间隔 | |
| 176 | - var data1 = {}; | |
| 177 | - var kssj_gfstart = StrategyUtils.toWrapTime(_timeIntervalObj.moningPeakTimeStrs.start); | |
| 178 | - var clCount = _paramObj.getClzs(); | |
| 179 | - var c1 = Math.floor(maxzgftime / clCount); | |
| 180 | - var c2 = maxzgftime % clCount; | |
| 181 | - var i = 0; | |
| 182 | - for (i = 1; i <= clCount - c2; i ++) { | |
| 183 | - data1[i] = {}; | |
| 184 | - data1[i].bcZgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 185 | - "normal", | |
| 186 | - isUp, i, 3, | |
| 187 | - kssj_gfstart.format("HH:mm"), | |
| 188 | - _paramObj | |
| 189 | - ); | |
| 190 | - kssj_gfstart = kssj_gfstart.add(c1, "m"); | |
| 191 | - } | |
| 192 | - for (i = 1; i <= c2; i++) { | |
| 193 | - data1[clCount - c2 + i] = {}; | |
| 194 | - data1[clCount - c2 + i].bcZgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 195 | - "normal", | |
| 196 | - isUp, clCount - c2 + i, 3, | |
| 197 | - kssj_gfstart.format("HH:mm"), | |
| 198 | - _paramObj | |
| 199 | - ); | |
| 200 | - kssj_gfstart = kssj_gfstart.add(c1 + 1, "m"); | |
| 201 | - } | |
| 202 | - | |
| 203 | - // 计算晚高峰间隔 | |
| 204 | - kssj_gfstart = StrategyUtils.toWrapTime(_timeIntervalObj.eveningPeakTimeStrs.start); | |
| 205 | - c1 = Math.floor(maxwgftime / clCount); | |
| 206 | - c2 = maxwgftime % clCount; | |
| 207 | - for (i = 1; i <= clCount - c2; i ++) { | |
| 208 | - data1[i].bcWgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 209 | - "normal", | |
| 210 | - isUp, i, 3, | |
| 211 | - kssj_gfstart.format("HH:mm"), | |
| 212 | - _paramObj | |
| 213 | - ); | |
| 214 | - kssj_gfstart = kssj_gfstart.add(c1, "m"); | |
| 215 | - } | |
| 216 | - for (i = 1; i <= c2; i++) { | |
| 217 | - data1[clCount - c2 + i].bcWgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 218 | - "normal", | |
| 219 | - isUp, clCount - c2 + i, 3, | |
| 220 | - kssj_gfstart.format("HH:mm"), | |
| 221 | - _paramObj | |
| 222 | - ); | |
| 223 | - kssj_gfstart = kssj_gfstart.add(c1 + 1, "m"); | |
| 224 | - } | |
| 225 | - | |
| 226 | - return data1; | |
| 227 | - }, | |
| 228 | - | |
| 229 | - /** | |
| 230 | - * 第一步,创建标准线,并放置在第一个路牌上。 | |
| 231 | - * @param lpArray 路牌列表 | |
| 232 | - */ | |
| 233 | - _01_buildBasicLine: function(lpArray) { | |
| 234 | - // TODO:放置上标线,中标线在议 | |
| 235 | - | |
| 236 | - // 确定使用上行还是下行首班车作为上标线开始 | |
| 237 | - var _isUp = _paramObj.getUpFirstDTimeObj().isBefore(_paramObj.getDownFirstDTimeObj()) ? false : true; | |
| 238 | - var firstTime = _isUp ? _paramObj.getUpFirstDTimeObj() : _paramObj.getDownFirstDTimeObj(); | |
| 239 | - var downTime = _isUp ? _paramObj.getUpLastDtimeObj() : _paramObj.getDownLastDTimeObj(); | |
| 240 | - | |
| 241 | - var data = []; | |
| 242 | - var bcObj; | |
| 243 | - var kssj = firstTime; | |
| 244 | - var fcno = 1; // 发车顺序号 | |
| 245 | - var qBcCount = 1; // 班次数 | |
| 246 | - var qArray = [_isUp, !_isUp]; // 圈的方向(true:上行,false:下行) | |
| 247 | - var qIndex = 0; | |
| 248 | - do { | |
| 249 | - bcObj = StrategyUtils.getFactory().createBcObj( | |
| 250 | - "normal", qArray[qIndex], lpArray[0].lpNo, fcno, kssj, _paramObj); | |
| 251 | - kssj = StrategyUtils.addMinute(kssj, bcObj.getBcTime() + bcObj.getStopTime()); | |
| 252 | - fcno ++; | |
| 253 | - qBcCount ++; | |
| 254 | - qIndex = (qBcCount - 1) % 2; | |
| 255 | - data.push(bcObj); | |
| 256 | - } while(kssj.isBefore(downTime)); | |
| 257 | - qBcCount = data.length; | |
| 258 | - | |
| 259 | - // 根据圈数,初始化 | |
| 260 | - var i = 0; | |
| 261 | - var j = 0; | |
| 262 | - var n = 0; | |
| 263 | - for (i = 0; i < lpArray.length; i++) { | |
| 264 | - // 前后都预留一圈 | |
| 265 | - n = 1 + (Math.floor(qBcCount / 2) + qBcCount % 2) + 1; | |
| 266 | - _headWayBcArray[i] = { | |
| 267 | - "bxIndex" : 6, // 默认做五休二 | |
| 268 | - "qObj" : new Array(n) // 圈数 | |
| 269 | - }; | |
| 270 | - | |
| 271 | - for (j = 0; j < n; j++) { | |
| 272 | - _headWayBcArray[i]["qObj"][j] = { | |
| 273 | - "hasBc1" : false, // 是否有第一个班次 | |
| 274 | - "hasBc2" : false, // 是否有第二个班次 | |
| 275 | - "_bc1_" : {}, // 第一个班次 | |
| 276 | - "_bc2_" : {} // 第二个班次 | |
| 277 | - | |
| 278 | - // TODO:其他参数再议 | |
| 279 | - }; | |
| 280 | - } | |
| 281 | - } | |
| 282 | - for (i = 1; i <= Math.floor(qBcCount / 2); i++) { | |
| 283 | - _headWayBcArray[0]["qObj"][i]["hasBc1"] = true; | |
| 284 | - _headWayBcArray[0]["qObj"][i]["_bc1_"] = data[(i - 1) * 2]; | |
| 285 | - _headWayBcArray[0]["qObj"][i]["hasBc2"] = true; | |
| 286 | - _headWayBcArray[0]["qObj"][i]["_bc2_"] = data[(i - 1) * 2 + 1]; | |
| 287 | - } | |
| 288 | - if (qBcCount % 2 != 0) { | |
| 289 | - _headWayBcArray[0]["qObj"][Math.floor(qBcCount / 2) + 1]["hasBc1"] = true; | |
| 290 | - _headWayBcArray[0]["qObj"][Math.floor(qBcCount / 2) + 1]["_bc1_"] = data[qBcCount - 1]; | |
| 291 | - } | |
| 292 | - | |
| 293 | - //console.log(_headWayBcArray); | |
| 294 | - | |
| 295 | - // 计算每种班型在基准线下对应的大致圈数(1表示1圈2个班次,.5表示半圈1个班次) | |
| 296 | - i = 0; | |
| 297 | - var avertime = 0; | |
| 298 | - var sum = 0; | |
| 299 | - var size_sub = qBcCount % 2; // 剩下的班次 | |
| 300 | - if (qBcCount > 1) { | |
| 301 | - // 计算平均周转时间 | |
| 302 | - for (i = 0; i < data.length - size_sub; i ++) { | |
| 303 | - sum += data[i].getBcTime() + data[i].getStopTime(); | |
| 304 | - } | |
| 305 | - avertime = sum / ((qBcCount - size_sub) / 2); | |
| 306 | - // 计算班型圈数 | |
| 307 | - for (i = 0; i < _bxDesc.length; i ++) { | |
| 308 | - _bxDesc[i].avertime = avertime; | |
| 309 | - _bxDesc[i].qcount = _bxDesc[i].hoursV * 60 / avertime; | |
| 310 | - } | |
| 311 | - } | |
| 312 | - | |
| 313 | - console.log(_headWayBcArray); | |
| 314 | - console.log(_bxDesc); | |
| 315 | - | |
| 316 | - }, | |
| 317 | - | |
| 318 | - /** | |
| 319 | - * 第二步,构造所有高峰班次。 | |
| 320 | - */ | |
| 321 | - _02_buildAllGfbc: function(lpArray) { | |
| 322 | - // TODO:先设定死,以标准线为起点从哪个班次出来,以后再用算法确定 | |
| 323 | - // 早高峰,从第一圈,第一个班次全部出来 | |
| 324 | - // 晚高峰,从第四圈,第二个班次全部出来 | |
| 325 | - | |
| 326 | - var _kssj; | |
| 327 | - var _zzsj; | |
| 328 | - var _clCount = StrategyUtils.calcuClzx(_paramObj);; | |
| 329 | - var _c1; | |
| 330 | - var _c2; | |
| 331 | - var i; | |
| 332 | - var _bc1_; | |
| 333 | - var _bc2_; | |
| 334 | - | |
| 335 | - // 计算早高峰 | |
| 336 | - _bc1_ = _headWayBcArray[0]["qObj"][1]["_bc1_"]; | |
| 337 | - _bc2_ = _headWayBcArray[0]["qObj"][1]["_bc2_"]; | |
| 338 | - _zzsj = _bc1_.getBcTime() + _bc1_.getStopTime() + | |
| 339 | - _bc2_.getBcTime() + _bc2_.getStopTime(); | |
| 340 | - _c1 = Math.floor(_zzsj / _clCount); | |
| 341 | - _c2 = _zzsj % _clCount; | |
| 342 | - _kssj = _bc1_.getFcTimeObj(); | |
| 343 | - | |
| 344 | - for (i = 2; i <= _clCount - _c2; i++) { | |
| 345 | - _kssj = StrategyUtils.addMinute(_kssj, _c1); | |
| 346 | - _headWayBcArray[i - 1]["qObj"][1]["hasBc1"] = true; | |
| 347 | - _headWayBcArray[i - 1]["qObj"][1]["_bc1_"] = | |
| 348 | - StrategyUtils.getFactory().createBcObj( | |
| 349 | - "normal", true, lpArray[i - 1].lpNo, | |
| 350 | - 3, _kssj, _paramObj); | |
| 351 | - } | |
| 352 | - for (i = 1; i <= _c2; i++) { | |
| 353 | - _kssj = StrategyUtils.addMinute(_kssj, _c1 + 1); | |
| 354 | - _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][1]["hasBc1"] = true; | |
| 355 | - _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][1]["_bc1_"] = | |
| 356 | - StrategyUtils.getFactory().createBcObj( | |
| 357 | - "normal", true, lpArray[_clCount - _c2 + i - 1].lpNo, | |
| 358 | - 3, _kssj, _paramObj); | |
| 359 | - } | |
| 360 | - | |
| 361 | - // 计算晚高峰 | |
| 362 | - _bc1_ = _headWayBcArray[0]["qObj"][4]["_bc2_"]; | |
| 363 | - _bc2_ = _headWayBcArray[0]["qObj"][5]["_bc1_"]; | |
| 364 | - _zzsj = _bc1_.getBcTime() + _bc1_.getStopTime() + | |
| 365 | - _bc2_.getBcTime() + _bc2_.getStopTime(); | |
| 366 | - _c1 = Math.floor(_zzsj / _clCount); | |
| 367 | - _c2 = _zzsj % _clCount; | |
| 368 | - _kssj = _bc1_.getFcTimeObj(); | |
| 369 | - | |
| 370 | - for (i = 2; i <= _clCount - _c2; i++) { | |
| 371 | - _kssj = StrategyUtils.addMinute(_kssj, _c1); | |
| 372 | - _headWayBcArray[i - 1]["qObj"][4]["hasBc1"] = true; | |
| 373 | - _headWayBcArray[i - 1]["qObj"][4]["_bc1_"] = | |
| 374 | - StrategyUtils.getFactory().createBcObj( | |
| 375 | - "normal", false, lpArray[i - 1].lpNo, | |
| 376 | - 3, _kssj, _paramObj); | |
| 377 | - } | |
| 378 | - for (i = 1; i <= _c2; i++) { | |
| 379 | - _kssj = StrategyUtils.addMinute(_kssj, _c1 + 1); | |
| 380 | - _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][4]["hasBc1"] = true; | |
| 381 | - _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][4]["_bc1_"] = | |
| 382 | - StrategyUtils.getFactory().createBcObj( | |
| 383 | - "normal", false, lpArray[_clCount - _c2 + i - 1].lpNo, | |
| 384 | - 3, _kssj, _paramObj); | |
| 385 | - } | |
| 386 | - | |
| 387 | - | |
| 388 | - | |
| 389 | - | |
| 390 | - }, | |
| 391 | - | |
| 392 | - /** | |
| 393 | - * 第三步,计算班型类型(每个路牌的班型)。 | |
| 394 | - */ | |
| 395 | - _03_calcuBxtype: function() { | |
| 396 | - // 路牌数和车辆数是一致的 | |
| 397 | - | |
| 398 | - // 总共车辆数(高峰最大车辆数) | |
| 399 | - var cls = StrategyUtils.calcuClzx(_paramObj); | |
| 400 | - // 低谷最少配车 | |
| 401 | - var dgminpc = Math.round(StrategyUtils.calcuTroughZzsj(_paramObj) / _paramObj.getTroughMaxFcjx()); | |
| 402 | - // 加班车路牌数(做5休2的路牌数) | |
| 403 | - var _5_2_lpes = _paramObj.getJBLpes(); | |
| 404 | - | |
| 405 | - // 做些简单的验证 | |
| 406 | - if (cls < dgminpc) { | |
| 407 | - alert("总配车数小于低谷最小配车"); | |
| 408 | - throw "总配车数小于低谷最小配车"; | |
| 409 | - } | |
| 410 | - if (cls - dgminpc < _5_2_lpes) { | |
| 411 | - alert("总分班路牌数小于加班路牌数"); | |
| 412 | - throw "总分班路牌数小于加班路牌数"; | |
| 413 | - } | |
| 414 | - | |
| 415 | - // 早高峰间隔时间 7分钟 | |
| 416 | - // 晚高峰间隔时间 7分钟 | |
| 417 | - // 早高峰之前 15分钟 | |
| 418 | - // 早高峰结束,晚高峰开始之前 15分钟 | |
| 419 | - // 晚高峰之后 20分钟 | |
| 420 | - | |
| 421 | - // 做5休2路牌数目 6 | |
| 422 | - | |
| 423 | - | |
| 424 | - | |
| 425 | - // TODO:不用间隔法,直接拉,先正路牌,再分班 | |
| 426 | - var _zlpCount = dgminpc; | |
| 427 | - var _5_2_Count = _5_2_lpes; | |
| 428 | - var _otherfb_ = cls - dgminpc - _5_2_lpes; | |
| 429 | - var i = 0; | |
| 430 | - for (i = 0; i < _zlpCount; i++) { | |
| 431 | - _headWayBcArray[i].bxIndex = 5; // 做一休一 | |
| 432 | - } | |
| 433 | - for (i = _zlpCount; i < _5_2_Count; i++) { | |
| 434 | - _headWayBcArray[i].bxIndex = 6; // 做五休二 | |
| 435 | - } | |
| 436 | - for (i = _zlpCount + _5_2_Count; i < _otherfb_; i++) { | |
| 437 | - _headWayBcArray[i].bxIndex = 3; // 做三休一 | |
| 438 | - } | |
| 439 | - | |
| 440 | - }, | |
| 441 | - | |
| 442 | - /** | |
| 443 | - * 第四步,根据每个路牌的班型构造所有班次。 | |
| 444 | - */ | |
| 445 | - _04_buildAllOtherBc: function(lpArray) { | |
| 446 | - var _bcCount; | |
| 447 | - var _qArray; | |
| 448 | - var i; | |
| 449 | - var j; | |
| 450 | - var z; | |
| 451 | - var _kssj; | |
| 452 | - | |
| 453 | - // 构造正路牌,从早高峰一直加到晚高峰,不够晚高峰后再加 | |
| 454 | - _bcCount = Math.floor(_bxDesc[_headWayBcArray[0].bxIndex].qcount * 2); | |
| 455 | - // TODO:都是从第一圈第一个班次开始 | |
| 456 | - for (i = 1; i < _headWayBcArray.length; i++) { | |
| 457 | - _qArray = _headWayBcArray[i].qObj; | |
| 458 | - | |
| 459 | - j = 1; | |
| 460 | - _kssj = StrategyUtils.addMinute( | |
| 461 | - _qArray[1]._bc1_.getFcTimeObj(), | |
| 462 | - _qArray[1]._bc1_.getBcTime() + | |
| 463 | - _qArray[1]._bc1_.getStopTime() | |
| 464 | - ); | |
| 465 | - // TODO:向后拉6个班次 | |
| 466 | - _qArray[1].hasBc2 = true; | |
| 467 | - _qArray[1]._bc2_ = | |
| 468 | - StrategyUtils.getFactory().createBcObj( | |
| 469 | - "normal", false, lpArray[i].lpNo, | |
| 470 | - 3, _kssj, _paramObj); | |
| 471 | - _kssj = StrategyUtils.addMinute( | |
| 472 | - _qArray[1]._bc2_.getFcTimeObj(), | |
| 473 | - _qArray[1]._bc2_.getBcTime() + | |
| 474 | - _qArray[1]._bc2_.getStopTime() | |
| 475 | - ); | |
| 476 | - | |
| 477 | - _qArray[2].hasBc1 = true; | |
| 478 | - _qArray[2]._bc1_ = | |
| 479 | - StrategyUtils.getFactory().createBcObj( | |
| 480 | - "normal", true, lpArray[i].lpNo, | |
| 481 | - 3, _kssj, _paramObj); | |
| 482 | - _kssj = StrategyUtils.addMinute( | |
| 483 | - _qArray[2]._bc1_.getFcTimeObj(), | |
| 484 | - _qArray[2]._bc1_.getBcTime() + | |
| 485 | - _qArray[2]._bc1_.getStopTime() | |
| 486 | - ); | |
| 487 | - _qArray[2].hasBc2 = true; | |
| 488 | - _qArray[2]._bc2_ = | |
| 489 | - StrategyUtils.getFactory().createBcObj( | |
| 490 | - "normal", false, lpArray[i].lpNo, | |
| 491 | - 3, _kssj, _paramObj); | |
| 492 | - | |
| 493 | - | |
| 494 | - } | |
| 495 | - | |
| 496 | - } | |
| 497 | - | |
| 498 | - | |
| 499 | - | |
| 500 | - }; | |
| 501 | - | |
| 502 | - return headWayF; | |
| 503 | - | |
| 1 | +/** | |
| 2 | + * 使用发车间隔模拟客流的策略,生成时刻表。 | |
| 3 | + */ | |
| 4 | +var StrategyHeadway = function() { | |
| 5 | + // 所有的时间使用moment.js计算 | |
| 6 | + | |
| 7 | + var _paramObj; // 参数对象 | |
| 8 | + | |
| 9 | + var _bxDesc = [ // 班型描述 | |
| 10 | + {'type':'六工一休','hoursV':6.66, 'minueV':'6:40', 'qcount': 0, 'avertime': 0}, | |
| 11 | + {'type':'五工一休','hoursV':6.85, 'minueV':'6:51', 'qcount': 0, 'avertime': 0}, | |
| 12 | + {'type':'四工一休','hoursV':7.14, 'minueV':'7:08', 'qcount': 0, 'avertime': 0}, | |
| 13 | + {'type':'三工一休','hoursV':7.61, 'minueV':'7:37', 'qcount': 0, 'avertime': 0}, | |
| 14 | + {'type':'二工一休','hoursV':8.57, 'minueV':'8:34', 'qcount': 0, 'avertime': 0}, | |
| 15 | + {'type':'一工一休','hoursV':11.42, 'minueV':'11:25', 'qcount': 0, 'avertime': 0}, | |
| 16 | + {'type':'五工二休','hoursV':7.99, 'minueV':'8:00', 'qcount': 0, 'avertime': 0}, | |
| 17 | + {'type':'无工休', 'hoursV':5.43, 'minueV':'5:43', 'qcount': 0, 'avertime': 0} | |
| 18 | + ]; | |
| 19 | + | |
| 20 | + // 重要数据结构,二维数组的形式保存班次信息 | |
| 21 | + // 行表示几个路牌,列表示几圈,每个元素表示一圈包含两个班次对象(一个也有可能) | |
| 22 | + // TODO:之后会把这个结构定义成一个类 | |
| 23 | + var _headWayBcArray = []; | |
| 24 | + | |
| 25 | + var headWayF = { | |
| 26 | + /** | |
| 27 | + * 使用发车间隔策略生成时刻表。 | |
| 28 | + * @param paramObj 参数对象 | |
| 29 | + * @param lpArray 路牌数组 | |
| 30 | + * @constructor | |
| 31 | + */ | |
| 32 | + BXPplaceClassesTime03 : function(paramObj, lpArray) { | |
| 33 | + //console.log(lpArray); | |
| 34 | + | |
| 35 | + _paramObj = paramObj; | |
| 36 | + | |
| 37 | + var i = 0; | |
| 38 | + var j = 0; | |
| 39 | + var data = []; | |
| 40 | + | |
| 41 | + // 第一步,计算标准线,计算所有班型工时,创建二维班次结构,并把标准线数据作为第一个路牌的班次数据 | |
| 42 | + this._01_buildBasicLine(lpArray); | |
| 43 | + // 第二步,构造所有高峰班次 | |
| 44 | + this._02_buildAllGfbc(lpArray); | |
| 45 | + // 第三步,计算班型类型(每个路牌的班型) | |
| 46 | + this._03_calcuBxtype(); | |
| 47 | + // 第四步,根据每个路牌的班型构造所有班次 | |
| 48 | + this._04_buildAllOtherBc(lpArray); | |
| 49 | + | |
| 50 | + | |
| 51 | + // TODO:先定死参数 | |
| 52 | + // 早高峰间隔时间 7分钟 | |
| 53 | + // 晚高峰间隔时间 7分钟 | |
| 54 | + // 早高峰之前 15分钟 | |
| 55 | + // 早高峰结束,晚高峰开始之前 15分钟 | |
| 56 | + // 晚高峰之后 20分钟 | |
| 57 | + | |
| 58 | + // 做5休2路牌数目 6 | |
| 59 | + //var data1 = {}; | |
| 60 | + // | |
| 61 | + //// TODO:计算基准线,不画,使用下行,以后根据哪个首班早,用哪个方向 | |
| 62 | + //data = data.concat(this._buildNormalLine(false, 12)); | |
| 63 | + //data = data.concat(this._01_buildBasicLine(lpArray)); | |
| 64 | + //console.log(_bxDesc); | |
| 65 | + | |
| 66 | + //// TODO:按照早高峰开始时间,以及间隔时间从头创建班次 | |
| 67 | + //var avertime = _bxDesc.avertime; // 平均周转时间 | |
| 68 | + //var maxgftime = 75 + 80 + 7 + 8; // 高峰最大周转时间 | |
| 69 | + //var data1 = this._buildAllGfBc(false); | |
| 70 | + //console.log(data1); | |
| 71 | + // | |
| 72 | + //// TODO:分割路牌,选出正路牌,从早高峰班次开始添加到晚高峰结束 | |
| 73 | + //// TODO:写死,使用奇数路牌添加正路牌 | |
| 74 | + //// TODO:按照做一休一来,4.5圈 | |
| 75 | + //var maxdgtime = 75 + 75 + 15 + 15; // 低谷最大周转时间 | |
| 76 | + //var zlp = [1, 4, 7, 10, 13, 16, 19, 22, 23]; // 9个正路牌,使用低谷最小配车数 | |
| 77 | + //var xldir_z = true; | |
| 78 | + //var bc_index = 1; | |
| 79 | + //var bc_obj; | |
| 80 | + //var kssj_gfstart; | |
| 81 | + //for (i = 0; i < zlp.length; i++) { | |
| 82 | + // // TODO:删除正路牌的bcWgf | |
| 83 | + // delete data1[zlp[i]].bcWgf; | |
| 84 | + // | |
| 85 | + // kssj_gfstart = StrategyUtils.toWrapTime(data1[zlp[i]].bcZgf.fcsj); | |
| 86 | + // kssj_gfstart = kssj_gfstart.add(data1[zlp[i]].bcZgf.bcsj, "m").add(data1[zlp[i]].bcZgf.STOPTIME, "m"); | |
| 87 | + // for (bc_index = 1; bc_index <= 9; bc_index++) { | |
| 88 | + // bc_obj = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 89 | + // "normal", | |
| 90 | + // xldir_z, zlp[i], 3, | |
| 91 | + // kssj_gfstart.format("HH:mm"), | |
| 92 | + // _paramObj | |
| 93 | + // ); | |
| 94 | + // data.push(bc_obj); | |
| 95 | + // | |
| 96 | + // xldir_z = !xldir_z; | |
| 97 | + // kssj_gfstart = StrategyUtils.toWrapTime(bc_obj.ARRIVALTIME).add(bc_obj.STOPTIME, "m"); | |
| 98 | + // } | |
| 99 | + // | |
| 100 | + // bc_index = 1; | |
| 101 | + // xldir_z = true; | |
| 102 | + //} | |
| 103 | + // | |
| 104 | + //// TODO:修正bcWgf | |
| 105 | + //for (var key in data1) { | |
| 106 | + // if (data1[key].bcWgf) { | |
| 107 | + // // TODO:第一块正路牌的bcWgf晚了18分钟,分班路牌的bcWgf向后移动18分钟 | |
| 108 | + // // TODO:还要改成上行 | |
| 109 | + // data1[key].bcWgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 110 | + // "normal", | |
| 111 | + // true, key, 3, | |
| 112 | + // StrategyUtils.toWrapTime(data1[key].bcWgf.fcsj).add(18, "m").format("HH:mm"), | |
| 113 | + // _paramObj | |
| 114 | + // ); | |
| 115 | + // } | |
| 116 | + // | |
| 117 | + //} | |
| 118 | + // | |
| 119 | + //// TODO:6个做5休二,大致3圈 | |
| 120 | + //// TODO:暂时写死路牌分割位置,然后以bcZgf,bcWgf为基准向左右两侧各加2各班次 | |
| 121 | + //var _5_2_lp = [5, 8, 11, 14, 17, 20]; | |
| 122 | + //for (i = 0; i < _5_2_lp.length; i++) { | |
| 123 | + // // TODO:先向后加一个班次 | |
| 124 | + // data.push(StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 125 | + // "normal", | |
| 126 | + // "relationshipGraph-down", _5_2_lp[i], 3, | |
| 127 | + // StrategyUtils.toWrapTime(data1[_5_2_lp[i]].bcZgf.ARRIVALTIME).add(data1[_5_2_lp[i]].bcZgf.STOPTIME, "m").format("HH:mm"), | |
| 128 | + // _paramObj | |
| 129 | + // )); | |
| 130 | + // data.push(StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 131 | + // "normal", | |
| 132 | + // "relationshipGraph-up", _5_2_lp[i], 3, | |
| 133 | + // StrategyUtils.toWrapTime(data1[_5_2_lp[i]].bcWgf.ARRIVALTIME).add(data1[_5_2_lp[i]].bcWgf.STOPTIME, "m").format("HH:mm"), | |
| 134 | + // _paramObj | |
| 135 | + // )); | |
| 136 | + //} | |
| 137 | + | |
| 138 | + | |
| 139 | + // TODO:8个其他形式分班 | |
| 140 | + | |
| 141 | + | |
| 142 | + // final: 添加班次 | |
| 143 | + for (i = 0; i < _headWayBcArray.length; i++) { | |
| 144 | + for (j = 0; j < _headWayBcArray[i]["qObj"].length; j++) { | |
| 145 | + if (_headWayBcArray[i]["qObj"][j].hasBc1) { | |
| 146 | + data.push(_headWayBcArray[i]["qObj"][j]["_bc1_"].toGanttBcObj()); | |
| 147 | + } | |
| 148 | + if (_headWayBcArray[i]["qObj"][j].hasBc2) { | |
| 149 | + data.push(_headWayBcArray[i]["qObj"][j]["_bc2_"].toGanttBcObj()); | |
| 150 | + } | |
| 151 | + } | |
| 152 | + } | |
| 153 | + | |
| 154 | + return {'json':data,'bxrcgs':null}; | |
| 155 | + }, | |
| 156 | + | |
| 157 | + // TODO:构造所有路牌早晚高峰班次(假设早高峰和晚高峰相同的车辆数) | |
| 158 | + _buildAllGfBc: function(isUp) { | |
| 159 | + // TODO:按照早高峰开始时间,以及间隔时间从头创建班次 | |
| 160 | + var _travelTimeObj = _paramObj.getTravelTimeObj(); | |
| 161 | + var _timeIntervalObj = _paramObj.getTimeIntervalObj(); | |
| 162 | + | |
| 163 | + var avertime = _bxDesc.avertime; // 平均周转时间 | |
| 164 | + var maxzgftime = // 早高峰最大周转时间 | |
| 165 | + _travelTimeObj.moningpeak[0] + | |
| 166 | + _travelTimeObj.moningpeak[1] + | |
| 167 | + Math.floor(_travelTimeObj.moningpeak[0] * 0.1) + | |
| 168 | + Math.floor(_travelTimeObj.moningpeak[1] * 0.1); | |
| 169 | + var maxwgftime = // 晚早高峰最大周转时间 | |
| 170 | + _travelTimeObj.eveningpeak[0] + | |
| 171 | + _travelTimeObj.eveningpeak[1] + | |
| 172 | + Math.floor(_travelTimeObj.eveningpeak[0] * 0.1) + | |
| 173 | + Math.floor(_travelTimeObj.eveningpeak[1] * 0.1); | |
| 174 | + | |
| 175 | + // 计算早高峰间隔 | |
| 176 | + var data1 = {}; | |
| 177 | + var kssj_gfstart = StrategyUtils.toWrapTime(_timeIntervalObj.moningPeakTimeStrs.start); | |
| 178 | + var clCount = _paramObj.getClzs(); | |
| 179 | + var c1 = Math.floor(maxzgftime / clCount); | |
| 180 | + var c2 = maxzgftime % clCount; | |
| 181 | + var i = 0; | |
| 182 | + for (i = 1; i <= clCount - c2; i ++) { | |
| 183 | + data1[i] = {}; | |
| 184 | + data1[i].bcZgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 185 | + "normal", | |
| 186 | + isUp, i, 3, | |
| 187 | + kssj_gfstart.format("HH:mm"), | |
| 188 | + _paramObj | |
| 189 | + ); | |
| 190 | + kssj_gfstart = kssj_gfstart.add(c1, "m"); | |
| 191 | + } | |
| 192 | + for (i = 1; i <= c2; i++) { | |
| 193 | + data1[clCount - c2 + i] = {}; | |
| 194 | + data1[clCount - c2 + i].bcZgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 195 | + "normal", | |
| 196 | + isUp, clCount - c2 + i, 3, | |
| 197 | + kssj_gfstart.format("HH:mm"), | |
| 198 | + _paramObj | |
| 199 | + ); | |
| 200 | + kssj_gfstart = kssj_gfstart.add(c1 + 1, "m"); | |
| 201 | + } | |
| 202 | + | |
| 203 | + // 计算晚高峰间隔 | |
| 204 | + kssj_gfstart = StrategyUtils.toWrapTime(_timeIntervalObj.eveningPeakTimeStrs.start); | |
| 205 | + c1 = Math.floor(maxwgftime / clCount); | |
| 206 | + c2 = maxwgftime % clCount; | |
| 207 | + for (i = 1; i <= clCount - c2; i ++) { | |
| 208 | + data1[i].bcWgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 209 | + "normal", | |
| 210 | + isUp, i, 3, | |
| 211 | + kssj_gfstart.format("HH:mm"), | |
| 212 | + _paramObj | |
| 213 | + ); | |
| 214 | + kssj_gfstart = kssj_gfstart.add(c1, "m"); | |
| 215 | + } | |
| 216 | + for (i = 1; i <= c2; i++) { | |
| 217 | + data1[clCount - c2 + i].bcWgf = StrategyUtils.getFactory().creatBcObjWithFixedStopTime( | |
| 218 | + "normal", | |
| 219 | + isUp, clCount - c2 + i, 3, | |
| 220 | + kssj_gfstart.format("HH:mm"), | |
| 221 | + _paramObj | |
| 222 | + ); | |
| 223 | + kssj_gfstart = kssj_gfstart.add(c1 + 1, "m"); | |
| 224 | + } | |
| 225 | + | |
| 226 | + return data1; | |
| 227 | + }, | |
| 228 | + | |
| 229 | + /** | |
| 230 | + * 第一步,创建标准线,并放置在第一个路牌上。 | |
| 231 | + * @param lpArray 路牌列表 | |
| 232 | + */ | |
| 233 | + _01_buildBasicLine: function(lpArray) { | |
| 234 | + // TODO:放置上标线,中标线在议 | |
| 235 | + | |
| 236 | + // 确定使用上行还是下行首班车作为上标线开始 | |
| 237 | + var _isUp = _paramObj.getUpFirstDTimeObj().isBefore(_paramObj.getDownFirstDTimeObj()) ? false : true; | |
| 238 | + var firstTime = _isUp ? _paramObj.getUpFirstDTimeObj() : _paramObj.getDownFirstDTimeObj(); | |
| 239 | + var downTime = _isUp ? _paramObj.getUpLastDtimeObj() : _paramObj.getDownLastDTimeObj(); | |
| 240 | + | |
| 241 | + var data = []; | |
| 242 | + var bcObj; | |
| 243 | + var kssj = firstTime; | |
| 244 | + var fcno = 1; // 发车顺序号 | |
| 245 | + var qBcCount = 1; // 班次数 | |
| 246 | + var qArray = [_isUp, !_isUp]; // 圈的方向(true:上行,false:下行) | |
| 247 | + var qIndex = 0; | |
| 248 | + do { | |
| 249 | + bcObj = StrategyUtils.getFactory().createBcObj( | |
| 250 | + "normal", qArray[qIndex], lpArray[0].lpNo, fcno, kssj, _paramObj); | |
| 251 | + kssj = StrategyUtils.addMinute(kssj, bcObj.getBcTime() + bcObj.getStopTime()); | |
| 252 | + fcno ++; | |
| 253 | + qBcCount ++; | |
| 254 | + qIndex = (qBcCount - 1) % 2; | |
| 255 | + data.push(bcObj); | |
| 256 | + } while(kssj.isBefore(downTime)); | |
| 257 | + qBcCount = data.length; | |
| 258 | + | |
| 259 | + // 根据圈数,初始化 | |
| 260 | + var i = 0; | |
| 261 | + var j = 0; | |
| 262 | + var n = 0; | |
| 263 | + for (i = 0; i < lpArray.length; i++) { | |
| 264 | + // 前后都预留一圈 | |
| 265 | + n = 1 + (Math.floor(qBcCount / 2) + qBcCount % 2) + 1; | |
| 266 | + _headWayBcArray[i] = { | |
| 267 | + "bxIndex" : 6, // 默认做五休二 | |
| 268 | + "qObj" : new Array(n) // 圈数 | |
| 269 | + }; | |
| 270 | + | |
| 271 | + for (j = 0; j < n; j++) { | |
| 272 | + _headWayBcArray[i]["qObj"][j] = { | |
| 273 | + "hasBc1" : false, // 是否有第一个班次 | |
| 274 | + "hasBc2" : false, // 是否有第二个班次 | |
| 275 | + "_bc1_" : {}, // 第一个班次 | |
| 276 | + "_bc2_" : {} // 第二个班次 | |
| 277 | + | |
| 278 | + // TODO:其他参数再议 | |
| 279 | + }; | |
| 280 | + } | |
| 281 | + } | |
| 282 | + for (i = 1; i <= Math.floor(qBcCount / 2); i++) { | |
| 283 | + _headWayBcArray[0]["qObj"][i]["hasBc1"] = true; | |
| 284 | + _headWayBcArray[0]["qObj"][i]["_bc1_"] = data[(i - 1) * 2]; | |
| 285 | + _headWayBcArray[0]["qObj"][i]["hasBc2"] = true; | |
| 286 | + _headWayBcArray[0]["qObj"][i]["_bc2_"] = data[(i - 1) * 2 + 1]; | |
| 287 | + } | |
| 288 | + if (qBcCount % 2 != 0) { | |
| 289 | + _headWayBcArray[0]["qObj"][Math.floor(qBcCount / 2) + 1]["hasBc1"] = true; | |
| 290 | + _headWayBcArray[0]["qObj"][Math.floor(qBcCount / 2) + 1]["_bc1_"] = data[qBcCount - 1]; | |
| 291 | + } | |
| 292 | + | |
| 293 | + //console.log(_headWayBcArray); | |
| 294 | + | |
| 295 | + // 计算每种班型在基准线下对应的大致圈数(1表示1圈2个班次,.5表示半圈1个班次) | |
| 296 | + i = 0; | |
| 297 | + var avertime = 0; | |
| 298 | + var sum = 0; | |
| 299 | + var size_sub = qBcCount % 2; // 剩下的班次 | |
| 300 | + if (qBcCount > 1) { | |
| 301 | + // 计算平均周转时间 | |
| 302 | + for (i = 0; i < data.length - size_sub; i ++) { | |
| 303 | + sum += data[i].getBcTime() + data[i].getStopTime(); | |
| 304 | + } | |
| 305 | + avertime = sum / ((qBcCount - size_sub) / 2); | |
| 306 | + // 计算班型圈数 | |
| 307 | + for (i = 0; i < _bxDesc.length; i ++) { | |
| 308 | + _bxDesc[i].avertime = avertime; | |
| 309 | + _bxDesc[i].qcount = _bxDesc[i].hoursV * 60 / avertime; | |
| 310 | + } | |
| 311 | + } | |
| 312 | + | |
| 313 | + console.log(_headWayBcArray); | |
| 314 | + console.log(_bxDesc); | |
| 315 | + | |
| 316 | + }, | |
| 317 | + | |
| 318 | + /** | |
| 319 | + * 第二步,构造所有高峰班次。 | |
| 320 | + */ | |
| 321 | + _02_buildAllGfbc: function(lpArray) { | |
| 322 | + // TODO:先设定死,以标准线为起点从哪个班次出来,以后再用算法确定 | |
| 323 | + // 早高峰,从第一圈,第一个班次全部出来 | |
| 324 | + // 晚高峰,从第四圈,第二个班次全部出来 | |
| 325 | + | |
| 326 | + var _kssj; | |
| 327 | + var _zzsj; | |
| 328 | + var _clCount = StrategyUtils.calcuClzx(_paramObj);; | |
| 329 | + var _c1; | |
| 330 | + var _c2; | |
| 331 | + var i; | |
| 332 | + var _bc1_; | |
| 333 | + var _bc2_; | |
| 334 | + | |
| 335 | + // 计算早高峰 | |
| 336 | + _bc1_ = _headWayBcArray[0]["qObj"][1]["_bc1_"]; | |
| 337 | + _bc2_ = _headWayBcArray[0]["qObj"][1]["_bc2_"]; | |
| 338 | + _zzsj = _bc1_.getBcTime() + _bc1_.getStopTime() + | |
| 339 | + _bc2_.getBcTime() + _bc2_.getStopTime(); | |
| 340 | + _c1 = Math.floor(_zzsj / _clCount); | |
| 341 | + _c2 = _zzsj % _clCount; | |
| 342 | + _kssj = _bc1_.getFcTimeObj(); | |
| 343 | + | |
| 344 | + for (i = 2; i <= _clCount - _c2; i++) { | |
| 345 | + _kssj = StrategyUtils.addMinute(_kssj, _c1); | |
| 346 | + _headWayBcArray[i - 1]["qObj"][1]["hasBc1"] = true; | |
| 347 | + _headWayBcArray[i - 1]["qObj"][1]["_bc1_"] = | |
| 348 | + StrategyUtils.getFactory().createBcObj( | |
| 349 | + "normal", true, lpArray[i - 1].lpNo, | |
| 350 | + 3, _kssj, _paramObj); | |
| 351 | + } | |
| 352 | + for (i = 1; i <= _c2; i++) { | |
| 353 | + _kssj = StrategyUtils.addMinute(_kssj, _c1 + 1); | |
| 354 | + _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][1]["hasBc1"] = true; | |
| 355 | + _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][1]["_bc1_"] = | |
| 356 | + StrategyUtils.getFactory().createBcObj( | |
| 357 | + "normal", true, lpArray[_clCount - _c2 + i - 1].lpNo, | |
| 358 | + 3, _kssj, _paramObj); | |
| 359 | + } | |
| 360 | + | |
| 361 | + // 计算晚高峰 | |
| 362 | + _bc1_ = _headWayBcArray[0]["qObj"][4]["_bc2_"]; | |
| 363 | + _bc2_ = _headWayBcArray[0]["qObj"][5]["_bc1_"]; | |
| 364 | + _zzsj = _bc1_.getBcTime() + _bc1_.getStopTime() + | |
| 365 | + _bc2_.getBcTime() + _bc2_.getStopTime(); | |
| 366 | + _c1 = Math.floor(_zzsj / _clCount); | |
| 367 | + _c2 = _zzsj % _clCount; | |
| 368 | + _kssj = _bc1_.getFcTimeObj(); | |
| 369 | + | |
| 370 | + for (i = 2; i <= _clCount - _c2; i++) { | |
| 371 | + _kssj = StrategyUtils.addMinute(_kssj, _c1); | |
| 372 | + _headWayBcArray[i - 1]["qObj"][4]["hasBc1"] = true; | |
| 373 | + _headWayBcArray[i - 1]["qObj"][4]["_bc1_"] = | |
| 374 | + StrategyUtils.getFactory().createBcObj( | |
| 375 | + "normal", false, lpArray[i - 1].lpNo, | |
| 376 | + 3, _kssj, _paramObj); | |
| 377 | + } | |
| 378 | + for (i = 1; i <= _c2; i++) { | |
| 379 | + _kssj = StrategyUtils.addMinute(_kssj, _c1 + 1); | |
| 380 | + _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][4]["hasBc1"] = true; | |
| 381 | + _headWayBcArray[_clCount - _c2 + i - 1]["qObj"][4]["_bc1_"] = | |
| 382 | + StrategyUtils.getFactory().createBcObj( | |
| 383 | + "normal", false, lpArray[_clCount - _c2 + i - 1].lpNo, | |
| 384 | + 3, _kssj, _paramObj); | |
| 385 | + } | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + }, | |
| 391 | + | |
| 392 | + /** | |
| 393 | + * 第三步,计算班型类型(每个路牌的班型)。 | |
| 394 | + */ | |
| 395 | + _03_calcuBxtype: function() { | |
| 396 | + // 路牌数和车辆数是一致的 | |
| 397 | + | |
| 398 | + // 总共车辆数(高峰最大车辆数) | |
| 399 | + var cls = StrategyUtils.calcuClzx(_paramObj); | |
| 400 | + // 低谷最少配车 | |
| 401 | + var dgminpc = Math.round(StrategyUtils.calcuTroughZzsj(_paramObj) / _paramObj.getTroughMaxFcjx()); | |
| 402 | + // 加班车路牌数(做5休2的路牌数) | |
| 403 | + var _5_2_lpes = _paramObj.getJBLpes(); | |
| 404 | + | |
| 405 | + // 做些简单的验证 | |
| 406 | + if (cls < dgminpc) { | |
| 407 | + alert("总配车数小于低谷最小配车"); | |
| 408 | + throw "总配车数小于低谷最小配车"; | |
| 409 | + } | |
| 410 | + if (cls - dgminpc < _5_2_lpes) { | |
| 411 | + alert("总分班路牌数小于加班路牌数"); | |
| 412 | + throw "总分班路牌数小于加班路牌数"; | |
| 413 | + } | |
| 414 | + | |
| 415 | + // 早高峰间隔时间 7分钟 | |
| 416 | + // 晚高峰间隔时间 7分钟 | |
| 417 | + // 早高峰之前 15分钟 | |
| 418 | + // 早高峰结束,晚高峰开始之前 15分钟 | |
| 419 | + // 晚高峰之后 20分钟 | |
| 420 | + | |
| 421 | + // 做5休2路牌数目 6 | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + // TODO:不用间隔法,直接拉,先正路牌,再分班 | |
| 426 | + var _zlpCount = dgminpc; | |
| 427 | + var _5_2_Count = _5_2_lpes; | |
| 428 | + var _otherfb_ = cls - dgminpc - _5_2_lpes; | |
| 429 | + var i = 0; | |
| 430 | + for (i = 0; i < _zlpCount; i++) { | |
| 431 | + _headWayBcArray[i].bxIndex = 5; // 做一休一 | |
| 432 | + } | |
| 433 | + for (i = _zlpCount; i < _5_2_Count; i++) { | |
| 434 | + _headWayBcArray[i].bxIndex = 6; // 做五休二 | |
| 435 | + } | |
| 436 | + for (i = _zlpCount + _5_2_Count; i < _otherfb_; i++) { | |
| 437 | + _headWayBcArray[i].bxIndex = 3; // 做三休一 | |
| 438 | + } | |
| 439 | + | |
| 440 | + }, | |
| 441 | + | |
| 442 | + /** | |
| 443 | + * 第四步,根据每个路牌的班型构造所有班次。 | |
| 444 | + */ | |
| 445 | + _04_buildAllOtherBc: function(lpArray) { | |
| 446 | + var _bcCount; | |
| 447 | + var _qArray; | |
| 448 | + var i; | |
| 449 | + var j; | |
| 450 | + var z; | |
| 451 | + var _kssj; | |
| 452 | + | |
| 453 | + // 构造正路牌,从早高峰一直加到晚高峰,不够晚高峰后再加 | |
| 454 | + _bcCount = Math.floor(_bxDesc[_headWayBcArray[0].bxIndex].qcount * 2); | |
| 455 | + // TODO:都是从第一圈第一个班次开始 | |
| 456 | + for (i = 1; i < _headWayBcArray.length; i++) { | |
| 457 | + _qArray = _headWayBcArray[i].qObj; | |
| 458 | + | |
| 459 | + j = 1; | |
| 460 | + _kssj = StrategyUtils.addMinute( | |
| 461 | + _qArray[1]._bc1_.getFcTimeObj(), | |
| 462 | + _qArray[1]._bc1_.getBcTime() + | |
| 463 | + _qArray[1]._bc1_.getStopTime() | |
| 464 | + ); | |
| 465 | + // TODO:向后拉6个班次 | |
| 466 | + _qArray[1].hasBc2 = true; | |
| 467 | + _qArray[1]._bc2_ = | |
| 468 | + StrategyUtils.getFactory().createBcObj( | |
| 469 | + "normal", false, lpArray[i].lpNo, | |
| 470 | + 3, _kssj, _paramObj); | |
| 471 | + _kssj = StrategyUtils.addMinute( | |
| 472 | + _qArray[1]._bc2_.getFcTimeObj(), | |
| 473 | + _qArray[1]._bc2_.getBcTime() + | |
| 474 | + _qArray[1]._bc2_.getStopTime() | |
| 475 | + ); | |
| 476 | + | |
| 477 | + _qArray[2].hasBc1 = true; | |
| 478 | + _qArray[2]._bc1_ = | |
| 479 | + StrategyUtils.getFactory().createBcObj( | |
| 480 | + "normal", true, lpArray[i].lpNo, | |
| 481 | + 3, _kssj, _paramObj); | |
| 482 | + _kssj = StrategyUtils.addMinute( | |
| 483 | + _qArray[2]._bc1_.getFcTimeObj(), | |
| 484 | + _qArray[2]._bc1_.getBcTime() + | |
| 485 | + _qArray[2]._bc1_.getStopTime() | |
| 486 | + ); | |
| 487 | + _qArray[2].hasBc2 = true; | |
| 488 | + _qArray[2]._bc2_ = | |
| 489 | + StrategyUtils.getFactory().createBcObj( | |
| 490 | + "normal", false, lpArray[i].lpNo, | |
| 491 | + 3, _kssj, _paramObj); | |
| 492 | + | |
| 493 | + | |
| 494 | + } | |
| 495 | + | |
| 496 | + } | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + }; | |
| 501 | + | |
| 502 | + return headWayF; | |
| 503 | + | |
| 504 | 504 | }(); |
| 505 | 505 | \ No newline at end of file | ... | ... |