Commit 8bff9c0ec1e3f156b6f038588f12b2b005f69f72

Authored by 潘钊
2 parents 8aa8463f 3c109706

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

Showing 88 changed files with 5332 additions and 2403 deletions
... ... @@ -24,7 +24,12 @@
24 24 <artifactId>spring-boot-starter-tomcat</artifactId>
25 25 <scope>provided</scope>
26 26 </dependency>
27   -
  27 + <dependency>
  28 + <groupId>javax.servlet</groupId>
  29 + <artifactId>javax.servlet-api</artifactId>
  30 + <version>3.1.0</version>
  31 + <scope>provided</scope>
  32 + </dependency>
28 33 <dependency>
29 34 <groupId>org.springframework.boot</groupId>
30 35 <artifactId>spring-boot-starter-security</artifactId>
... ... @@ -229,6 +234,23 @@
229 234 <version>1.1</version>
230 235 </dependency>
231 236  
  237 + <dependency>
  238 + <groupId>org.apache.axis2</groupId>
  239 + <artifactId>axis2-adb</artifactId>
  240 + <version>1.7.4</version>
  241 + </dependency>
  242 + <dependency>
  243 + <groupId>org.apache.axis2</groupId>
  244 + <artifactId>axis2-transport-local</artifactId>
  245 + <version>1.7.4</version>
  246 + </dependency>
  247 + <dependency>
  248 + <groupId>org.apache.axis2</groupId>
  249 + <artifactId>axis2-transport-http</artifactId>
  250 + <version>1.7.4</version>
  251 + </dependency>
  252 +
  253 +
232 254 <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId>
233 255 <optional>true</optional> </dependency> -->
234 256 <dependency>
... ...
src/main/java/com/bsth/controller/oil/YlbController.java
... ... @@ -209,8 +209,8 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
209 209 return maps;
210 210 }
211 211 @RequestMapping(value="/oilListMonth")
212   - public List<Ylb> oilListMonth(@RequestParam String line,@RequestParam String date){
213   - return yblService.oilListMonth(line, date);
  212 + public List<Ylb> oilListMonth(@RequestParam String line,@RequestParam String date,@RequestParam String type){
  213 + return yblService.oilListMonth(line, date, type);
214 214 }
215 215  
216 216 @RequestMapping(value = "/checkJsy",method = RequestMethod.GET)
... ... @@ -244,8 +244,8 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
244 244 m.put("jsy", y.getJsy());
245 245 m.put("name", y.getName());
246 246 m.put("jzl", y.getJzl()<=0?"0":y.getJzl());
247   - m.put("czlc", y.getCzlc()<=0?"0":y.getCzlc());
248   - m.put("jzlc", y.getJzlc()<=0?"0":y.getJzlc());
  247 + m.put("czlc", "0");
  248 + m.put("jzlc", "0");
249 249 m.put("czyl", y.getCzyl()<=0?"0":y.getCzyl());
250 250 m.put("jzyl", y.getJzyl()<=0?"0":y.getJzyl());
251 251 m.put("yh", y.getYh()<=0?"0":y.getYh());
... ... @@ -255,7 +255,7 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
255 255 if(y.getRylx().equals("1")){rylx="负10号柴油";}
256 256 }
257 257 m.put("rylx", rylx);
258   - m.put("ns", y.getNs());
  258 + m.put("ns", y.getNs()==null?"0":y.getNs());
259 259 String shyy ="无";
260 260 if(y.getShyy()!=null){
261 261 shyy=y.getShyy();
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -7,6 +7,7 @@ import com.bsth.controller.realcontrol.dto.ChangePersonCar;
7 7 import com.bsth.controller.realcontrol.dto.DfsjChange;
8 8 import com.bsth.data.BasicData;
9 9 import com.bsth.data.schedule.DayOfSchedule;
  10 +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
10 11 import com.bsth.entity.realcontrol.ScheduleRealInfo;
11 12 import com.bsth.entity.schedule.SchedulePlanInfo;
12 13 import com.bsth.service.realcontrol.ScheduleRealInfoService;
... ... @@ -317,9 +318,9 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
317 318 }
318 319  
319 320 @RequestMapping(value = "/correctForm")
320   - public List<ScheduleRealInfo> correctForm(@RequestParam String line, @RequestParam String startDate,
321   - @RequestParam String endDate, @RequestParam String lpName, @RequestParam String code, @RequestParam String type) {
322   - return scheduleRealInfoService.correctForm(line, startDate, endDate, lpName, code, type);
  321 + public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date,
  322 + @RequestParam String lpName, @RequestParam String code, @RequestParam String type) {
  323 + return scheduleRealInfoService.correctForm(line, date, lpName, code, type);
323 324 }
324 325 /**
325 326 * @Title queryListWaybill
... ...
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
... ... @@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
8 8 import org.springframework.web.bind.annotation.RequestParam;
9 9 import org.springframework.web.bind.annotation.RestController;
10 10  
  11 +import java.util.Map;
  12 +
11 13 /**
12 14 *
13 15 * @author BSTH
... ... @@ -22,9 +24,9 @@ public class TrafficManageController {
22 24  
23 25  
24 26 @RequestMapping(value = "/setXL", method = RequestMethod.GET)
25   - public String setXL() throws Exception {
  27 + public String setXL(@RequestParam Map<String, Object> param) throws Exception {
26 28 try {
27   - return trManageService.setXL();
  29 + return trManageService.setXL(param);
28 30 } catch (Exception exp) {
29 31 throw new Exception(exp.getCause());
30 32 }
... ... @@ -57,6 +59,15 @@ public class TrafficManageController {
57 59 }
58 60 }
59 61  
  62 + @RequestMapping(value = "/setLDFile", method = RequestMethod.GET)
  63 + public String setLDFile() throws Exception {
  64 + try {
  65 + return trManageService.setLDFile();
  66 + } catch (Exception exp) {
  67 + throw new Exception(exp.getCause());
  68 + }
  69 + }
  70 +
60 71 @RequestMapping(value = "/setLCYH", method = RequestMethod.GET)
61 72 public String setLCYH() throws Exception {
62 73 try {
... ...
src/main/java/com/bsth/controller/traffic/SKBUploadLoggerController.java 0 → 100644
  1 +package com.bsth.controller.traffic;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.traffic.SKBUploadLogger;
  5 +import com.bsth.service.traffic.SKBUploadLoggerService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RestController;
  9 +
  10 +/**
  11 + *
  12 + * @author BSTH
  13 + *
  14 + */
  15 +@RestController
  16 +@RequestMapping("skb_log")
  17 +public class SKBUploadLoggerController extends BaseController<SKBUploadLogger,Integer> {
  18 +
  19 + @Autowired
  20 + private SKBUploadLoggerService skbUploadLoggerService;
  21 +
  22 +}
... ...
src/main/java/com/bsth/data/BasicData.java
... ... @@ -274,22 +274,23 @@ public class BasicData implements CommandLineRunner {
274 274 * 加载运管处的站点及序号
275 275 * 上行从1开始,下行顺序续编
276 276 */
277   - List<Object[]> ygcLines = stationRouteRepository.findAllLineWithYgc();
  277 + List<Map<String, String>> ygcLines = stationRouteRepository.findAllLineWithYgc();
278 278 if(ygcLines != null && ygcLines.size() > 0){
279 279 int size = ygcLines.size();
280   - Object[] tempArray ;
  280 + Map<String, String> tempMap ;
281 281 int num = 1;
282 282 String key;
283 283 String lineCode = "";
284 284 for (int i = 0; i < size; i ++){
285   - tempArray = ygcLines.get(i);
  285 + tempMap = ygcLines.get(i);
286 286 if(lineCode.equals("")){
287   - lineCode = tempArray[0]+"";
288   - }else if(!lineCode.equals(tempArray[0]+"")){
  287 + lineCode = tempMap.get("lineCode");
  288 + }else if(!lineCode.equals(tempMap.get("lineCode"))){
289 289 num = 1;
290   - lineCode = tempArray[0]+"";
  290 + lineCode = tempMap.get("lineCode");
291 291 }
292   - key = tempArray[0] + "_"+tempArray[1] + "_"+tempArray[3];
  292 + key = tempMap.get("lineCode") + "_"+String.valueOf(tempMap.get("directions"))
  293 + + "_"+tempMap.get("stationCode")+ "_"+tempMap.get("stationMark");
293 294 tempStationName2YgcNumber.put(key,num++);
294 295 }
295 296 }
... ...
src/main/java/com/bsth/data/schedule/thread/SubmitToTrafficManage.java
1 1 package com.bsth.data.schedule.thread;
2 2  
3 3 import com.bsth.service.TrafficManageService;
  4 +import com.bsth.service.traffic.YgcBasicDataService;
4 5 import org.slf4j.Logger;
5 6 import org.slf4j.LoggerFactory;
6 7 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -18,6 +19,9 @@ public class SubmitToTrafficManage extends Thread{
18 19 @Autowired
19 20 TrafficManageService trafficManageService;
20 21  
  22 + @Autowired
  23 + YgcBasicDataService ygcBasicDataService;
  24 +
21 25 @Override
22 26 public void run() {
23 27 logger.info("开始提交数据到运管处...");
... ... @@ -46,6 +50,12 @@ public class SubmitToTrafficManage extends Thread{
46 50 } catch (Exception e) {
47 51 logger.error("提交线路计划班次表到运管处失败", e);
48 52 }
  53 + try {
  54 + // 运管处基础数据更新
  55 + ygcBasicDataService.updateYgcBasicData();
  56 + } catch (Exception e) {
  57 + logger.error("运管处基础数据更新失败", e);
  58 + }
49 59 logger.info("提交数据到运管处结束!");
50 60 }
51 61 }
... ...
src/main/java/com/bsth/entity/Line.java
... ... @@ -104,6 +104,9 @@ public class Line implements Serializable {
104 104 /** 开辟日期 date*/
105 105 @DateTimeFormat(pattern ="yyyy-MM-dd")
106 106 private Date openDate;
  107 +
  108 + /** 大间隔等级 */
  109 + private Integer spacGrade;
107 110  
108 111 /** 线路沿革 varchar length(50) */
109 112 private String history;
... ... @@ -155,6 +158,14 @@ public class Line implements Serializable {
155 158 /** 是否在使用 <1:是;0:否> bit length(50) */
156 159 private Integer inUse;
157 160  
  161 + public Integer getSpacGrade() {
  162 + return spacGrade;
  163 + }
  164 +
  165 + public void setSpacGrade(Integer spacGrade) {
  166 + this.spacGrade = spacGrade;
  167 + }
  168 +
158 169 public Integer getWarrantCar() {
159 170 return warrantCar;
160 171 }
... ...
src/main/java/com/bsth/entity/traffic/SKBUploadLogger.java 0 → 100644
  1 +package com.bsth.entity.traffic;
  2 +
  3 +import com.bsth.entity.schedule.TTInfo;
  4 +import com.bsth.entity.sys.SysUser;
  5 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  6 +
  7 +import javax.persistence.*;
  8 +import java.util.Date;
  9 +
  10 +/**
  11 + *
  12 + * @ClassName : SKBUploadLogger(时刻表上传日志实体类)
  13 + *
  14 + * @Author : bsth@zq
  15 + *
  16 + * @Description :
  17 + *
  18 + * @Data : 2016-04-27
  19 + *
  20 + * @Version 公交调度系统BS版 0.1
  21 + *
  22 + */
  23 +
  24 +@Entity
  25 +@Table(name = "bsth_t_upload_logger")
  26 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
  27 +public class SKBUploadLogger {
  28 +
  29 + // ID
  30 + @Id
  31 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  32 + private Integer id;
  33 +
  34 + /** 时刻表信息 */
  35 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  36 + private TTInfo ttInfo;
  37 +
  38 + /** 用户 关联 */
  39 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  40 + private SysUser user;
  41 +
  42 + // 创建日期
  43 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  44 + private Date createDate;
  45 +
  46 + public Integer getId() {
  47 + return id;
  48 + }
  49 +
  50 + public void setId(Integer id) {
  51 + this.id = id;
  52 + }
  53 +
  54 + public TTInfo getTtInfo() {
  55 + return ttInfo;
  56 + }
  57 +
  58 + public void setTtInfo(TTInfo ttInfo) {
  59 + this.ttInfo = ttInfo;
  60 + }
  61 +
  62 + public SysUser getUser() {
  63 + return user;
  64 + }
  65 +
  66 + public void setUser(SysUser user) {
  67 + this.user = user;
  68 + }
  69 +
  70 + public Date getCreateDate() {
  71 + return createDate;
  72 + }
  73 +
  74 + public void setCreateDate(Date createDate) {
  75 + this.createDate = createDate;
  76 + }
  77 +}
... ...
src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -159,11 +159,11 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
159 159 */
160 160 @Query(value = "SELECT " +
161 161 "c.directions," +
162   - "ST_AsText(s.bsection_vector) as bsection_vector," +
  162 + "ST_AsText(s.gsection_vector) as gsection_vector," +
163 163 "s.speed_limit," +
164 164 "s.section_name " +
165 165 " FROM bsth_c_sectionroute c " +
166   - " LEFT JOIN bsth_c_section s on c.section = s.id where c.line = ?1 and c.directions = ?2", nativeQuery=true)
  166 + " LEFT JOIN bsth_c_section s on c.section = s.id where c.line = ?1 and c.directions = ?2 and c.destroy = 0", nativeQuery=true)
167 167 List<Object[]> sectionRouteVector(Integer lineId,Integer directions);
168 168  
169 169 @Transactional
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -153,7 +153,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
153 153 "s.station_route_code," +
154 154 "s.directions," +
155 155 "s.distances,"+
156   - "s.station FROM bsth_c_stationroute s where s.line = ?1) a " +
  156 + "s.station FROM bsth_c_stationroute s where s.line = ?1 and s.destroy=0) a " +
157 157 "LEFT JOIN bsth_c_station b " +
158 158 " on a.station = b.id ORDER BY a.directions ASC ) k ORDER BY k.directions,k.station_route_code ASC", nativeQuery=true)
159 159 List<Object[]> usingSingle(Integer lineId);
... ... @@ -259,8 +259,9 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
259 259 @Query("select s from StationRoute s where s.destroy=0 and s.lineCode=?1")
260 260 List<StationRoute> findByLineCode(String lineCode);
261 261  
262   - @Query("SELECT " +
263   - "lineCode,directions,stationName,stationCode " +
  262 + @Query("SELECT new map(" +
  263 + "lineCode as lineCode,directions as directions,stationName as stationName,stationCode as stationCode," +
  264 + "line.linePlayType as linePlayType,s.stationMark as stationMark) " +
264 265 "FROM " +
265 266 "StationRoute s " +
266 267 "WHERE " +
... ... @@ -268,7 +269,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
268 269 "and s.lineCode in(select lineCode from Line where inUse = 1) " +
269 270 "ORDER BY " +
270 271 "lineCode,directions,stationRouteCode")
271   - List<Object[]> findAllLineWithYgc();
  272 + List<Map<String, String>> findAllLineWithYgc();
272 273  
273 274 @Modifying
274 275 @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true)
... ...
src/main/java/com/bsth/repository/traffic/SKBUploadLoggerRepository.java 0 → 100644
  1 +package com.bsth.repository.traffic;
  2 +
  3 +import com.bsth.entity.traffic.SKBUploadLogger;
  4 +import com.bsth.repository.BaseRepository;
  5 +
  6 +public interface SKBUploadLoggerRepository extends BaseRepository<SKBUploadLogger, Integer> {
  7 +}
... ...
src/main/java/com/bsth/service/TrafficManageService.java
1 1 package com.bsth.service;
2 2  
  3 +import java.util.Map;
  4 +
3 5 /**
4 6 *
5 7 * @Interface: LineService(线路service业务层实现接口)
... ... @@ -22,7 +24,7 @@ public interface TrafficManageService {
22 24 *
23 25 * @return 调用接口返回信息
24 26 */
25   - String setXL();
  27 + String setXL(Map<String, Object> param);
26 28  
27 29 /**
28 30 * 上传车辆信息
... ... @@ -65,6 +67,8 @@ public interface TrafficManageService {
65 67  
66 68 String setLD();
67 69  
  70 + String setLDFile();
  71 +
68 72 String setLCYH();
69 73  
70 74 String setDDRB();
... ...
src/main/java/com/bsth/service/excep/impl/OutboundServiceImpl.java
... ... @@ -69,7 +69,7 @@ public class OutboundServiceImpl implements OutboundService{
69 69 }
70 70  
71 71 }
72   - sql +=" order by id limit ?,?";
  72 + sql +=" limit ?,?";
73 73  
74 74  
75 75 try {
... ...
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
1 1 package com.bsth.service.forms.impl;
2 2  
  3 +import java.math.BigDecimal;
3 4 import java.sql.ResultSet;
4 5 import java.sql.SQLException;
5 6 import java.text.DecimalFormat;
... ... @@ -151,6 +152,40 @@ public class FormsServiceImpl implements FormsService {
151 152 w.setSh(String.valueOf(sh));
152 153  
153 154 }
  155 +
  156 + Waybillday way = new Waybillday();
  157 + way.setNbbm("汇总合计");
  158 + BigDecimal ksgl = new BigDecimal("0.0");
  159 + BigDecimal jzl_ = new BigDecimal("0.0");
  160 + BigDecimal sh_ = new BigDecimal("0.0");
  161 + BigDecimal lc_ = new BigDecimal("0.0");
  162 + BigDecimal yh_ = new BigDecimal("0.0");
  163 + for(Waybillday w : list){
  164 + if(w.getJzl1() != null && w.getJzl1().trim().length() != 0){
  165 + ksgl = ksgl.add(new BigDecimal(w.getJzl1().trim()));
  166 + }
  167 + if(w.getJzl() != null && w.getJzl().trim().length() != 0){
  168 + jzl_ = jzl_.add(new BigDecimal(w.getJzl().trim()));
  169 + }
  170 + if(w.getSh() != null && w.getSh().trim().length() != 0){
  171 + sh_ = sh_.add(new BigDecimal(w.getSh().trim()));
  172 + }
  173 + if(w.getZlc() != null && w.getZlc().trim().length() != 0){
  174 + lc_ = lc_.add(new BigDecimal(w.getZlc().trim()));
  175 + }
  176 + if(w.getYh() != null && w.getYh().trim().length() != 0){
  177 + yh_ = yh_.add(new BigDecimal(w.getYh().trim()));
  178 + }
  179 + }
  180 + way.setJzl1(ksgl.toString());
  181 + way.setJzl(jzl_.toString());
  182 + way.setjName("");
  183 + way.setSh(sh_.toString());
  184 + way.setZlc(lc_.toString());
  185 + way.setYh(yh_.toString());
  186 + if(list.size() > 0)
  187 + list.add(way);
  188 +
154 189 return list;
155 190 }
156 191  
... ... @@ -205,12 +240,15 @@ public class FormsServiceImpl implements FormsService {
205 240 if(map.containsKey("fgsdmManth")){
206 241 fgsdmManth=map.get("fgsdmManth").toString();
207 242 }
208   - String sql = "select"
209   - + " r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name "
210   -// + "r.gs_bm,r.gs_name,"
211   -// + " r.fgs_bm,r.fgs_name,r.bc_type,r.lp_name "
212   - + " from bsth_c_s_sp_info_real r "
213   - + " where 1=1 ";
  243 + String sql ="select ";
  244 + if(empnames.equals("驾驶员")){
  245 + sql += " r.j_name,r.j_gh ";
  246 + }else if(empnames.equals("售票员")){
  247 + sql += " r.s_gh,r.s_name";
  248 + }else{
  249 + sql += " r.cl_zbh";
  250 + }
  251 + sql += " from bsth_c_s_sp_info_real r where 1=1 ";
214 252 if(map.get("startDate")!=null&&!map.get("startDate").equals("")){
215 253 sql+=" and to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') ";
216 254 }
... ... @@ -227,12 +265,16 @@ public class FormsServiceImpl implements FormsService {
227 265 // }
228 266 if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){
229 267 sql+=" and r.fgs_bm like'%"+fgsdmManth+"%' ";
230   - }
231   - if(empnames.equals("售票员")){
232   - sql+="and r.s_name is not null AND r.s_name !=''";
233 268 }
  269 + if(empnames.equals("驾驶员")){
234 270 sql += " GROUP BY "
235   - + "r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name ";
  271 + + "r.j_name,r.j_gh";
  272 + }else if(empnames.equals("售票员")){
  273 + sql+="and r.s_name is not null AND r.s_name !='' GROUP BY r.s_gh,r.s_name";
  274 + }else{
  275 + sql += " GROUP BY r.cl_zbh";
  276 + }
  277 +
236 278 // + ",r.gs_bm,r.gs_name,"
237 279 // + "r.fgs_bm,r.fgs_name,r.bc_type ";
238 280  
... ... @@ -244,15 +286,16 @@ public class FormsServiceImpl implements FormsService {
244 286 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
245 287 Shiftuehiclemanth shif = new Shiftuehiclemanth();
246 288 if(empnames.equals("驾驶员")){
247   - shif.setjName(arg0.getString("j_name"));
  289 + shif.setjName(arg0.getString("j_name")+"/"+arg0.getString("j_gh"));
  290 + shif.setJgh(arg0.getString("j_gh"));
248 291 }else if(empnames.equals("售票员")){
249   - shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name"));
  292 + shif.setjName(arg0.getString("s_name")+"/"+arg0.getString("s_gh"));
250 293 shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh"));
251 294 }else if(empnames.equals("车辆自编号")){
252 295 shif.setjName(arg0.getString("cl_zbh"));
253 296 }
254   - shif.setJgh(arg0.getString("j_gh"));
255   - shif.setZbh(arg0.getString("cl_zbh"));
  297 +// shif.setJgh(arg0.getString("j_gh"));
  298 +// shif.setZbh(arg0.getString("cl_zbh"));
256 299 // shif.setjName(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh"));
257 300 return shif;
258 301 }
... ... @@ -274,11 +317,11 @@ public class FormsServiceImpl implements FormsService {
274 317 }
275 318 }else if(empnames.equals("售票员")){
276 319 String sgh=s.getsGh()==null?"":s.getsGh();
277   - if(d.getSgh().equals(sgh) && d.getZbh().equals(s.getClZbh())){
  320 + if(d.getSgh().equals(sgh)){
278 321 sList.add(s);
279 322 }
280 323 }else if(empnames.equals("车辆自编号")){
281   - if(d.getZbh().equals(s.getClZbh())){
  324 + if(d.getjName().equals(s.getClZbh())){
282 325 sList.add(s);
283 326 }
284 327 }
... ... @@ -307,6 +350,34 @@ public class FormsServiceImpl implements FormsService {
307 350  
308 351 }
309 352  
  353 + Shiftuehiclemanth shif = new Shiftuehiclemanth();
  354 + shif.setjName("汇总合计");
  355 + BigDecimal yylc = new BigDecimal("0.0");
  356 + BigDecimal kslc = new BigDecimal("0.0");
  357 + BigDecimal cjlc = new BigDecimal("0.0");
  358 + BigDecimal zjlc = new BigDecimal("0.0");
  359 + BigDecimal zlc = new BigDecimal("0.0");
  360 + int cjbc = 0, zjbc = 0, sjbc = 0;
  361 + for(Shiftuehiclemanth s : list){
  362 + yylc = yylc.add(new BigDecimal(s.getJhlc()));
  363 + kslc = kslc.add(new BigDecimal(s.getEmptMileage()));
  364 + cjlc = cjlc.add(new BigDecimal(s.getRemMileage()));
  365 + zjlc = zjlc.add(new BigDecimal(s.getAddMileage()));
  366 + zlc = zlc.add(new BigDecimal(s.getTotalm()));
  367 + cjbc += Integer.valueOf(s.getCjbc());
  368 + zjbc += Integer.valueOf(s.getLjbc());
  369 + sjbc += Integer.valueOf(s.getSjbc());
  370 + }
  371 + shif.setJhlc(yylc.toString());
  372 + shif.setEmptMileage(kslc.toString());
  373 + shif.setRemMileage(cjlc.toString());
  374 + shif.setAddMileage(zjlc.toString());
  375 + shif.setTotalm(zlc.toString());
  376 + shif.setCjbc("" + cjbc);
  377 + shif.setLjbc("" + zjbc);
  378 + shif.setSjbc("" + sjbc);
  379 + if(list.size() > 0)
  380 + list.add(shif);
310 381  
311 382 return list;
312 383 }
... ... @@ -395,7 +466,47 @@ public class FormsServiceImpl implements FormsService {
395 466 d.setLjbc(String.valueOf(ljbc));//增加班次
396 467 d.setAddMileage(String.valueOf(zjgl));//增加公里
397 468 d.setSjjhbc(String.valueOf(sjbc));//实际计划班次
398   - }
  469 + }
  470 +
  471 + Shifday shif = new Shifday();
  472 + shif.setjName("汇总合计");
  473 + BigDecimal jhlc = new BigDecimal("0.0");
  474 + BigDecimal sjlc = new BigDecimal("0.0");
  475 + BigDecimal yylc = new BigDecimal("0.0");
  476 + BigDecimal kslc = new BigDecimal("0.0");
  477 + BigDecimal cjlc = new BigDecimal("0.0");
  478 + BigDecimal zjlc = new BigDecimal("0.0");
  479 + BigDecimal zlc = new BigDecimal("0.0");
  480 + int jhbc = 0, sjjhbc = 0, cjbc = 0, zjbc = 0, sjbc = 0;
  481 + for(Shifday s : list){
  482 + jhlc = jhlc.add(new BigDecimal(s.getJhlc()));
  483 + sjlc = sjlc.add(new BigDecimal(s.getSjjhlc()));
  484 + yylc = yylc.add(new BigDecimal(s.getYygl()));
  485 + kslc = kslc.add(new BigDecimal(s.getEmptMileage()));
  486 + cjlc = cjlc.add(new BigDecimal(s.getRemMileage()));
  487 + zjlc = zjlc.add(new BigDecimal(s.getAddMileage()));
  488 + zlc = zlc.add(new BigDecimal(s.getTotalm()));
  489 + jhbc += Integer.valueOf(s.getJhbc());
  490 + sjjhbc += Integer.valueOf(s.getSjjhbc());
  491 + cjbc += Integer.valueOf(s.getCjbc());
  492 + zjbc += Integer.valueOf(s.getLjbc());
  493 + sjbc += Integer.valueOf(s.getSjbc());
  494 + }
  495 + shif.setJhlc(jhlc.toString());
  496 + shif.setSjjhlc(sjlc.toString());
  497 + shif.setYygl(yylc.toString());
  498 + shif.setEmptMileage(kslc.toString());
  499 + shif.setRemMileage(cjlc.toString());
  500 + shif.setAddMileage(zjlc.toString());
  501 + shif.setTotalm(zlc.toString());
  502 + shif.setJhbc("" + jhbc);
  503 + shif.setSjjhbc("" + sjjhbc);
  504 + shif.setCjbc("" + cjbc);
  505 + shif.setLjbc("" + zjbc);
  506 + shif.setSjbc("" + sjbc);
  507 + if(list.size() > 0)
  508 + list.add(shif);
  509 +
399 510 return list;
400 511 }
401 512  
... ... @@ -866,9 +977,11 @@ public class FormsServiceImpl implements FormsService {
866 977  
867 978 List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, startDate, endDate, company, subCompany);
868 979 List<Line> lineList = lineRepository.findLineBygsBm(company, subCompany, line.length()==0?"%"+line+"%":line);
869   -
870   - String sql = "select * from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' "
871   - + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+startDate+"' and '"+endDate+"' ";
  980 +
  981 + String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date"
  982 + + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' "
  983 + + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' "
  984 + + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"' ";
872 985 if(line.trim().length() != 0){
873 986 sql += "and xl_bm = '"+line+"' ";
874 987 }
... ... @@ -957,12 +1070,10 @@ public class FormsServiceImpl implements FormsService {
957 1070 }
958 1071 }
959 1072 Map<String, Object> tempMap = new HashMap<String, Object>();
960   - int jhcc = 0;
961   - int sjcc = 0;
962   - int jhbc = 0;
963   - int sjbc = 0;
  1073 + int jhcc = 0, sjcc = 0;
  1074 + int jhbc = 0, sjbc = 0;
964 1075 int qz = 0;
965   - for(Map<String, Object> m : tempList){
  1076 + for(Map<String, Object> m : resList){
966 1077 jhcc += Integer.valueOf(m.get("jhcc").toString());
967 1078 sjcc += Integer.valueOf(m.get("sjcc").toString());
968 1079 jhbc += Integer.valueOf(m.get("jhbc").toString());
... ... @@ -970,7 +1081,7 @@ public class FormsServiceImpl implements FormsService {
970 1081 qz += Integer.valueOf(m.get("qz").toString());
971 1082 }
972 1083 tempMap.put("rq", "分类汇总");
973   - tempMap.put("line", "共" + tempList.size() + "条线路");
  1084 + tempMap.put("line", "共" + resList.size() + "条线路");
974 1085 tempMap.put("jhcc", jhcc);
975 1086 tempMap.put("sjcc", sjcc);
976 1087 tempMap.put("jhbc", jhbc);
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -421,10 +421,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
421 421 long fcsj1 = fcsjs.get(i - 1);
422 422 long fcsj2 = fcsjs.get(i);
423 423 Long time = fcsj1/60;
424   - if(!timeMap0.containsKey(time) && !timeMap1.containsKey(time)){
  424 + if(!timeMap0.containsKey(time)){
425 425 timeMap0.put(time, new ArrayList<Long>());
426   - timeMap1.put(time, new ArrayList<Long>());
427   - timeList.add(time);
  426 + if(!timeList.contains(time))
  427 + timeList.add(time);
428 428 }
429 429 timeMap0.get(time).add(fcsj2 - fcsj1);
430 430 }
... ... @@ -432,6 +432,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
432 432 long fcsj1 = fcsjAs.get(i - 1);
433 433 long fcsj2 = fcsjAs.get(i);
434 434 Long time = fcsj1/60;
  435 + if(!timeMap1.containsKey(time)){
  436 + timeMap1.put(time, new ArrayList<Long>());
  437 + if(!timeList.contains(time))
  438 + timeList.add(time);
  439 + }
435 440 if(timeMap1.containsKey(time)){
436 441 timeMap1.get(time).add(fcsj2 - fcsj1);
437 442 }
... ... @@ -440,9 +445,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
440 445 for(int i = 1; i < fcsjs.size(); i++){
441 446 long fcsj1 = fcsjs.get(i - 1);
442 447 long fcsj2 = fcsjs.get(i);
443   - if(!temp0.containsKey(key) && !temp1.containsKey(key)){
  448 + if(!temp0.containsKey(key)){
444 449 temp0.put(key, new ArrayList<Long>());
445   - temp1.put(key, new ArrayList<Long>());
446 450 if(!keyList.contains(key))
447 451 keyList.add(key);
448 452 }
... ... @@ -451,6 +455,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
451 455 for(int i = 1; i < fcsjAs.size(); i++){
452 456 long fcsj1 = fcsjAs.get(i - 1);
453 457 long fcsj2 = fcsjAs.get(i);
  458 + if(!temp1.containsKey(key)){
  459 + temp1.put(key, new ArrayList<Long>());
  460 + if(!keyList.contains(key))
  461 + keyList.add(key);
  462 + }
  463 + System.out.println("key:"+key+" fcsj2:"+fcsj2+" fcsj1:"+fcsj2+" temp1:"+temp1.get(key)+" tem0:"+temp0.get(key));
454 464 temp1.get(key).add(fcsj2 - fcsj1);
455 465 }
456 466 }
... ... @@ -461,14 +471,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
461 471 Map<String, Object> tempMap = new HashMap<String, Object>();
462 472 List<Long> fcsjs = new ArrayList<Long>();
463 473 List<Long> fcsjAs = new ArrayList<Long>();
464   - for(Long l : timeMap0.get(time)){
465   - if(l < 90)
466   - fcsjs.add(l);
467   - }
468   - for(Long l : timeMap1.get(time)){
469   - if(l < 90)
470   - fcsjAs.add(l);
471   - }
  474 + if(timeMap0.containsKey(time))
  475 + for(Long l : timeMap0.get(time)){
  476 + if(l < 90)
  477 + fcsjs.add(l);
  478 + }
  479 + if(timeMap1.containsKey(time))
  480 + for(Long l : timeMap1.get(time)){
  481 + if(l < 90)
  482 + fcsjAs.add(l);
  483 + }
472 484 Collections.sort(fcsjs);
473 485 Collections.sort(fcsjAs);
474 486 String[] split = key.split("/");
... ... @@ -495,7 +507,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
495 507 tempMap.put("deviation", df.format(Double.valueOf(tempMap.get("sjInterval").toString())
496 508 - Double.valueOf(tempMap.get("jhInterval").toString())));
497 509 }
498   - tempList.add(tempMap);
  510 + if(fcsjs.size() != 0 || fcsjAs.size() != 0)
  511 + tempList.add(tempMap);
499 512 }
500 513 }
501 514 }
... ... @@ -504,11 +517,24 @@ public class BusIntervalServiceImpl implements BusIntervalService {
504 517 List<Long> sortList = new ArrayList<Long>();
505 518 Map<Long, List<Map<String, Object>>> sortMap = new HashMap<Long, List<Map<String, Object>>>();
506 519 for(Map<String, Object> m : tempList){
507   - Long sort = Long.valueOf(m.get("times").toString().substring(0, 2));
  520 + String times = m.get("times").toString();
  521 + Long sort = Long.valueOf(times.substring(0, 2));
508 522 if(!sortMap.containsKey(sort)){
509 523 sortMap.put(sort, new ArrayList<Map<String, Object>>());
510 524 sortList.add(sort);
511 525 }
  526 + String[] split = times.split("-");
  527 + String[] split0 = split[0].split(":");
  528 + String[] split1 = split[1].split(":");
  529 + int t0 = Integer.valueOf(split0[0]);
  530 + int t1 = Integer.valueOf(split1[0]);
  531 + if(t0 >= 24){
  532 + t0 = t0 - 24;
  533 + }
  534 + if(t1 >= 24){
  535 + t1 = t1 - 24;
  536 + }
  537 + m.put("times", (t0>9?t0:("0"+t0))+":"+split0[1]+"-"+(t1>9?t1:("0"+t1))+":"+split1[1]);
512 538 sortMap.get(sort).add(m);
513 539 }
514 540 Collections.sort(sortList);
... ... @@ -531,14 +557,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
531 557 Map<String, Object> tempMap = new HashMap<String, Object>();
532 558 List<Long> fcsjs = new ArrayList<Long>();
533 559 List<Long> fcsjAs = new ArrayList<Long>();
534   - for(Long l : temp0.get(key)){
535   - if(l < 90)
536   - fcsjs.add(l);
537   - }
538   - for(Long l : temp1.get(key)){
539   - if(l < 90)
540   - fcsjAs.add(l);
541   - }
  560 + if(temp0.containsKey(key))
  561 + for(Long l : temp0.get(key)){
  562 + if(l < 90)
  563 + fcsjs.add(l);
  564 + }
  565 + if(temp0.containsKey(key))
  566 + for(Long l : temp1.get(key)){
  567 + if(l < 90)
  568 + fcsjAs.add(l);
  569 + }
542 570 Collections.sort(fcsjs);
543 571 Collections.sort(fcsjAs);
544 572 long fcsj = 0l;
... ... @@ -563,7 +591,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
563 591 tempMap.put("deviation", df.format(Double.valueOf(tempMap.get("sjInterval").toString())
564 592 - Double.valueOf(tempMap.get("jhInterval").toString())));
565 593 }
566   - resList.add(tempMap);
  594 + if(fcsjs.size() != 0 || fcsjAs.size() != 0)
  595 + resList.add(tempMap);
567 596 }
568 597 }
569 598 }
... ... @@ -601,6 +630,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
601 630 Map<String, List<ChildTaskPlan>> cMap = new HashMap<String, List<ChildTaskPlan>>();
602 631 Map<String, Object> modelMap = new HashMap<String, Object>();
603 632 Set<Long> tsSet = new HashSet<Long>();
  633 + Set<Long> ttSet = new HashSet<Long>();
604 634  
605 635 String company = map.get("company").toString();
606 636 String subCompany = map.get("subCompany").toString();
... ... @@ -639,7 +669,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
639 669 }
640 670 where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
641 671  
642   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'"
  672 + String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc,"
  673 + + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id"
  674 + + " from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'"
643 675 + " and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"+where+"";
644 676  
645 677 list = jdbcTemplate.query(sql,
... ... @@ -652,11 +684,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
652 684 schedule.setRealExecDate(rs.getString("real_exec_date"));
653 685 schedule.setXlName(rs.getString("xl_name"));
654 686 schedule.setLpName(rs.getString("lp_name"));
655   - schedule.setBcType(rs.getString("bc_type"));
656 687 schedule.setBcs(rs.getInt("bcs"));
657 688 schedule.setBcsj(rs.getInt("bcsj"));
658 689 schedule.setJhlc(rs.getDouble("jhlc"));
659   - schedule.setDfsj(rs.getString("dfsj"));
660 690 schedule.setFcsj(rs.getString("fcsj"));
661 691 schedule.setFcsjActual(rs.getString("fcsj_actual"));
662 692 schedule.setZdsj(rs.getString("zdsj"));
... ... @@ -668,12 +698,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
668 698 schedule.setRemarks(rs.getString("remarks"));
669 699 schedule.setGsName(rs.getString("gs_name"));
670 700 schedule.setFgsName(rs.getString("fgs_name"));
671   - schedule.setDfAuto(rs.getBoolean("df_auto"));
672   - schedule.setOnline(rs.getBoolean("online"));
673   - schedule.setClZbh(rs.getString("cl_zbh"));
674   - schedule.setjGh(rs.getString("j_gh"));
675   - schedule.setjName(rs.getString("j_name"));
676   - schedule.setStatus(rs.getInt("status"));
677 701 schedule.setSpId(rs.getLong("sp_id"));
678 702  
679 703 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
... ... @@ -726,7 +750,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
726 750 {
727 751 List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>();
728 752 List<Map<String, String>> temp2 = new ArrayList<Map<String, String>>();
729   - sql = "select * from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  753 + sql = "select id, lp, fcsj, xl_bm, tt_info from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
730 754  
731 755 if(startDate.equals(endDate)){
732 756 sql += " and schedule_date = '"+startDate+"'";
... ... @@ -782,7 +806,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
782 806 }
783 807 }
784 808  
785   - sql = "select * from bsth_c_s_child_task order by start_date";
  809 + sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task order by start_date";
786 810  
787 811 cList = jdbcTemplate.query(sql,
788 812 new RowMapper<ChildTaskPlan>(){
... ... @@ -798,10 +822,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
798 822 return cTask;
799 823 }
800 824 });
801   -
  825 +
802 826 if(model.length() != 0){
803   - sql = "select sp.id from bsth_c_s_sp_info sp left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj "
804   - + "where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  827 + sql = "select sp.id from "
  828 + + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"
  829 + + " and tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks') sp"
  830 + + " left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj";
805 831  
806 832 ttList = jdbcTemplate.query(sql,
807 833 new RowMapper<Map<String, Object>>(){
... ... @@ -809,10 +835,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
809 835 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
810 836 Map<String, Object> m = new HashMap<String, Object>();
811 837 m.put("id", rs.getString("id"));
812   - m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0");
  838 +// m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0");
813 839 return m;
814 840 }
815 841 });
  842 +
  843 + for(Map<String, Object> m : ttList){
  844 + ttSet.add(Long.valueOf(m.get("id").toString()));
  845 + }
816 846 }
817 847  
818 848 } catch (Exception e) {
... ... @@ -852,15 +882,21 @@ public class BusIntervalServiceImpl implements BusIntervalService {
852 882 if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0)
853 883 continue;
854 884 if(model.length() != 0){
855   - for(Map<String, Object> tt : ttList){
856   - long id = Long.valueOf(tt.get("id").toString());
857   - if(id == (long)schedule.getSpId()){
858   - String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();
859   - if(!keyMap.containsKey(key))
860   - keyMap.put(key, new ArrayList<ScheduleRealInfo>());
861   - keyMap.get(key).add(schedule);
862   - }
  885 + if(ttSet.contains(schedule.getSpId())){
  886 + String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();
  887 + if(!keyMap.containsKey(key))
  888 + keyMap.put(key, new ArrayList<ScheduleRealInfo>());
  889 + keyMap.get(key).add(schedule);
863 890 }
  891 +// for(Map<String, Object> tt : ttList){
  892 +// long id = Long.valueOf(tt.get("id").toString());
  893 +// if(id == (long)schedule.getSpId()){
  894 +// String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();
  895 +// if(!keyMap.containsKey(key))
  896 +// keyMap.put(key, new ArrayList<ScheduleRealInfo>());
  897 +// keyMap.get(key).add(schedule);
  898 +// }
  899 +// }
864 900 }else{
865 901 String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();
866 902 if(!keyMap.containsKey(key))
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
... ... @@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
24 24  
25 25 import java.io.ByteArrayInputStream;
26 26 import java.io.File;
  27 +import java.io.FileOutputStream;
27 28 import java.io.InputStream;
28 29 import java.text.DecimalFormat;
29 30 import java.util.*;
... ... @@ -511,57 +512,38 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
511 512 */
512 513 @Override
513 514 public Map<String, Object> usingSingle(Map<String, Object> map) {
514   -
515 515 // 返回值map
516 516 Map<String, Object> resultMap = new HashMap<String,Object>();
517   -
518 517 try {
519   -
520 518 // 获取线路ID
521 519 Integer lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString());
522   -
523 520 /** 查询线路信息 @param:<lineId:线路ID> */
524 521 Line line = lineRepository.findOne(lineId);
525   -
526 522 /** 查询线路信息下的站点路由信息 @param:<lineId:线路ID> */
527 523 List<Object[]> objects = repository.usingSingle(lineId);
528   -
529 524 if (objects.size()>0) {
530   -
531 525 /** 获取配置文件里的ftp登录参数 */
532 526 Map<String, Object> FTPParamMap = readPropertiesGetFTPParam();
533   -
534 527 // 压缩文件名
535 528 String odlGzFileName = line.getLineCode() + ".txt.gz";
536   -
537 529 // txt文件名
538 530 String textFileName = line.getLineCode() + ".txt";
539   -
540 531 // 创建一个ftp上传实例
541 532 FTPClientUtils clientUtils = new FTPClientUtils();
542   -
543 533 // IP
544 534 String url = FTPParamMap.get("url").toString();
545   -
546 535 // 端口
547 536 int port = Integer.valueOf(FTPParamMap.get("port").toString());
548   -
549 537 // 用户名
550 538 String username = FTPParamMap.get("username").toString();
551   -
552 539 // 密码
553 540 String password = FTPParamMap.get("password").toString();
554   -
555 541 // 相对路径
556 542 String remotePath = FTPParamMap.get("remotePath").toString();
557   -
558 543 /** 如果已存在相同行单文件名则先删除 */
559 544 clientUtils.deleteFtpFile(url, port, username, password, remotePath, odlGzFileName);
560   -
561 545 clientUtils.deleteFtpFile(url, port, username, password, remotePath, textFileName);
562   -
563 546 String textStr = "";
564   -
565 547 boolean tempTag = ishxType(objects);
566 548  
567 549 if(tempTag)
... ... @@ -575,6 +557,12 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
575 557  
576 558 InputStream input = new ByteArrayInputStream(textStr.getBytes("gbk"));
577 559  
  560 + // FileOutputStream fos = new FileOutputStream("test.txt");
  561 + /*int len = 0 ;
  562 + byte[] cbuf = new byte[1024];
  563 + while((len = input.read(cbuf)) != -1) {
  564 + fos.write(cbuf, 0, len);
  565 + }*/
578 566 /** 生成txt文件,上传ftp */
579 567 clientUtils.uploadFile(url, port, username, password, remotePath, textFileName, input);
580 568  
... ... @@ -645,25 +633,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
645 633 * @return String
646 634 */
647 635 public String newTextFileToFTP(List<Object[]> objects,Integer lineId) {
648   -
649 636 // 返回值String
650 637 String stationRStr = "";
651   -
652 638 // windows下的文本文件换行符
653 639 //String enterStr = "\r\n";
654   -
655 640 // linux/unix下的文本文件换行符
656 641 String enterStr = "\r";
657   -
  642 + int defaultZdxh = 0;
658 643 if(objects.size()>0) {
659   -
660 644 for(int i = 0; i<objects.size();i++) {
661   -
  645 + defaultZdxh ++ ;
662 646 // 经度
663   - String lng = objects.get(i)[0].equals("") ? "" : objects.get(i)[0].toString();
  647 + String lng = objects.get(i)[0].equals("") ? "0" : objects.get(i)[0].toString();
664 648  
665 649 // 纬度
666   - String lat = objects.get(i)[1].equals("") ? "" : objects.get(i)[1].toString();
  650 + String lat = objects.get(i)[1].equals("") ? "0" : objects.get(i)[1].toString();
  651 +
  652 + Point point = new Point(Double.valueOf(lng), Double.valueOf(lat));
667 653  
668 654 lat = "\t" + lat;
669 655  
... ... @@ -673,23 +659,32 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
673 659 String stationMake = "";
674 660  
675 661 if(stationMakeStr.equals("E")) {
676   -
677 662 stationMake = "\t2";
678   -
679 663 }else {
680   -
681 664 stationMake ="\t1";
682   -
683 665 }
684 666  
685 667 // 站点序号
686   - String stationNo = objects.get(i)[4].equals("") ? "" : objects.get(i)[4].toString();
  668 + // String stationNo = objects.get(i)[4].equals("") ? "" : objects.get(i)[4].toString();
  669 + String stationNo = String.valueOf(defaultZdxh);
687 670  
688 671 stationNo = "\t" + stationNo;
689 672  
690 673 // 站点编码
691 674 String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString();
692 675  
  676 + int len = stationCode.length();
  677 + if(len<8) {
  678 + int dx = 8 - len;
  679 + String addStr = "";
  680 + for(int p =0;p<dx;p++) {
  681 + addStr = addStr + "0";
  682 + }
  683 + stationCode = addStr + stationCode;
  684 + }else if(len>8){
  685 + stationCode = stationCode.substring(8);
  686 + }
  687 +
693 688 stationCode = "\t" +stationCode;
694 689  
695 690 double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000;
... ... @@ -709,41 +704,33 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
709 704  
710 705 // 限速
711 706 String sleepStr = "";
712   -
713 707 // 方向
714 708 int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString());
715   -
716 709 /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */
717 710 List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions);
718   -
719 711 if(sobje.size()==1) {
720   -
721   - double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString());
722   -
723   - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr);
724   -
  712 + int dsleepStr = sobje.get(0)[2] == null || sobje.get(0)[2].equals("") ? 60 : Integer.valueOf(sobje.get(0)[2].toString());
  713 + sleepStr = "\t" + String.valueOf(dsleepStr);
725 714 }else if(sobje.size()>1){
726   -
727   - /** 这里暂时只根据站点名称去匹配所在路段的限速值 ,如果路段名称"至"之前的地名与站点名称等同,就认为站点在路段上。 */
728 715 for(int j =0;j<sobje.size();j++) {
729   -
730   - String sectionName = sobje.get(j)[3].toString();
731   -
732   - String sectionNameA[] = sectionName.split("至");
733   -
734   - if(stationName.equals(sectionNameA[0])){
735   -
736   - /*sleepStr = sobje.get(j)[2].toString();*/
737   -
738   - double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString());
739   -
740   - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt);
741   -
  716 + double dsleepStrt = sobje.get(j)[2] == null || sobje.get(j)[2].equals("") ? 60d : Double.valueOf(sobje.get(j)[2].toString());
  717 + String pointsStr = sobje.get(j)[1]==null || sobje.get(j)[1].equals("") ? null : sobje.get(j)[1].toString();
  718 + pointsStr = pointsStr.substring(11, pointsStr.length()-1);
  719 + List<Point> ps = new ArrayList<>();
  720 + String[] pArray = pointsStr.split(",");
  721 + for(int a = 0; a <pArray.length; a++) {
  722 + String[] tmepA = pArray[a].split(" ");
  723 + Point temp = new Point(Double.valueOf(tmepA[0]), Double.valueOf(tmepA[1]));
  724 + ps.add(temp);
  725 + }
  726 + if(GeoUtils.isInSection(ps, point)) {
  727 + sleepStr = "\t" + String.valueOf((int)dsleepStrt);
  728 + break;
742 729 }
743   -
744 730 }
745 731 }
746   -
  732 + if(sleepStr.equals(""))
  733 + sleepStr = "\t" + "60";
747 734 stationRStr = stationRStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr;
748 735 }
749 736  
... ... @@ -762,9 +749,12 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
762 749 for(int i = 0; i<objects.size();i++) {
763 750 if(Integer.valueOf(objects.get(i)[8].toString())==0) {
764 751 // 经度
765   - String lng = objects.get(i)[0].equals("") ? "" : objects.get(i)[0].toString();
  752 + String lng = objects.get(i)[0].equals("") ? "0" : objects.get(i)[0].toString();
  753 +
766 754 // 纬度
767   - String lat = objects.get(i)[1].equals("") ? "" : objects.get(i)[1].toString();
  755 + String lat = objects.get(i)[1].equals("") ? "0" : objects.get(i)[1].toString();
  756 +
  757 + Point point = new Point(Double.valueOf(lng), Double.valueOf(lat));
768 758 lat = "\t" + lat;
769 759 // 站点类型
770 760 String stationMakeStr = objects.get(i)[3].equals("") ? "" : objects.get(i)[3].toString();
... ... @@ -779,6 +769,17 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
779 769 String stationNo = "\t" + xh;
780 770 // 站点编码
781 771 String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString();
  772 + int len = stationCode.length();
  773 + if(len<8) {
  774 + int dx = 8 - len;
  775 + String addStr = "";
  776 + for(int p =0;p<dx;p++) {
  777 + addStr = addStr + "0";
  778 + }
  779 + stationCode = addStr + stationCode;
  780 + }else if(len>8){
  781 + stationCode = stationCode.substring(8);
  782 + }
782 783 stationCode = "\t" +stationCode;
783 784 double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000;
784 785 String tempDistc = String.valueOf((int) dis);
... ... @@ -794,20 +795,28 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
794 795 /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */
795 796 List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions);
796 797 if(sobje.size()==1) {
797   - double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString());
798   - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr);
  798 + int dsleepStr = sobje.get(0)[2] == null || sobje.get(0)[2].equals("") ? 60 : Integer.valueOf(sobje.get(0)[2].toString());
  799 + sleepStr = "\t" + String.valueOf(dsleepStr);
799 800 }else if(sobje.size()>1){
800   - /** 这里暂时只根据站点名称去匹配所在路段的限速值 ,如果路段名称"至"之前的地名与站点名称等同,就认为站点在路段上。 */
801 801 for(int j =0;j<sobje.size();j++) {
802   - String sectionName = sobje.get(j)[3].toString();
803   - String sectionNameA[] = sectionName.split("至");
804   - if(stationName.equals(sectionNameA[0])){
805   - /*sleepStr = sobje.get(j)[2].toString();*/
806   - double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString());
807   - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt);
  802 + double dsleepStrt = sobje.get(j)[2] == null || sobje.get(j)[2].equals("") ? 60d : Double.valueOf(sobje.get(j)[2].toString());
  803 + String pointsStr = sobje.get(j)[1]==null || sobje.get(j)[1].equals("") ? null : sobje.get(j)[1].toString();
  804 + pointsStr = pointsStr.substring(11, pointsStr.length()-1);
  805 + List<Point> ps = new ArrayList<>();
  806 + String[] pArray = pointsStr.split(",");
  807 + for(int a = 0; a <pArray.length; a++) {
  808 + String[] tmepA = pArray[a].split(" ");
  809 + Point temp = new Point(Double.valueOf(tmepA[0]), Double.valueOf(tmepA[1]));
  810 + ps.add(temp);
  811 + }
  812 + if(GeoUtils.isInSection(ps, point)) {
  813 + sleepStr = "\t" + String.valueOf((int)dsleepStrt);
  814 + break;
808 815 }
809 816 }
810 817 }
  818 + if(sleepStr.equals(""))
  819 + sleepStr = "\t" + "60";
811 820 xh++;
812 821 restStr = restStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr;
813 822 }
... ...
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
... ... @@ -8,9 +8,13 @@ import com.bsth.entity.schedule.SchedulePlanInfo;
8 8 import com.bsth.entity.schedule.TTInfo;
9 9 import com.bsth.entity.schedule.TTInfoDetail;
10 10 import com.bsth.entity.search.CustomerSpecs;
  11 +import com.bsth.entity.sys.SysUser;
  12 +import com.bsth.entity.traffic.SKBUploadLogger;
11 13 import com.bsth.repository.*;
12 14 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
13 15 import com.bsth.repository.schedule.*;
  16 +import com.bsth.repository.traffic.SKBUploadLoggerRepository;
  17 +import com.bsth.security.util.SecurityUtils;
14 18 import com.bsth.service.TrafficManageService;
15 19 import com.bsth.util.TimeUtils;
16 20 import com.bsth.util.db.DBUtils_MS;
... ... @@ -101,6 +105,10 @@ public class TrafficManageServiceImpl implements TrafficManageService{
101 105 @Autowired
102 106 private ScheduleRealInfoRepository scheduleRealInfoRepository;
103 107  
  108 + // 时刻表上传记录repository
  109 + @Autowired
  110 + private SKBUploadLoggerRepository skbUploadLoggerRepository;
  111 +
104 112  
105 113 // 运管处接口
106 114 private InternalPortType portType = null;//new Internal().getInternalHttpSoap11Endpoint();
... ... @@ -134,12 +142,19 @@ public class TrafficManageServiceImpl implements TrafficManageService{
134 142 * 上传线路信息
135 143 */
136 144 @Override
137   - public String setXL() {
  145 + public String setXL(Map<String, Object> param) {
138 146 String result = "failure";
139 147 StringBuffer sBuffer = new StringBuffer();
140 148 try {
141   - Iterator<Line> lineIterator = lineRepository.findAll().iterator();
  149 + Map<String,Object> map = new HashMap<String,Object>();
  150 + map.put("lineCode_eq", param.get("xl.lineCode_like")+"");
  151 + Iterator<Line> lineIterator;
142 152 Line line = null;
  153 + if(param.get("xl.lineCode_like").equals("")){
  154 + lineIterator = lineRepository.findAll().iterator();
  155 + }else {
  156 + line = lineRepository.findOne(new CustomerSpecs<Line>(map));
  157 + }
143 158 List<StationRoute> upStationsList = null;// 上行站点路由集
144 159 List<StationRoute> downStationsList = null;// 下行站点路由集
145 160 List<LineInformation> lineInformationsList = null;
... ... @@ -147,14 +162,15 @@ public class TrafficManageServiceImpl implements TrafficManageService{
147 162 sBuffer.append("<Data>");
148 163 sBuffer.append("<RequestOrg>上海巴士拓华科技发展有限公司</RequestOrg>");
149 164 sBuffer.append("<DataList>");
150   - while(lineIterator.hasNext()){
151   - line = lineIterator.next();
152   - if(!line.getName().equals("浦江4路")){
153   - continue;
154   - }
155   - if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null
  165 +// while(lineIterator.hasNext()){
  166 +// line = lineIterator.next();
  167 +// if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null
  168 +// || line.getInUse() == 0){
  169 +// continue;
  170 +// }
  171 + if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null
156 172 || line.getInUse() == 0){
157   - continue;
  173 + return result;
158 174 }
159 175 sBuffer.append("<LINE_ID>").append(line.getId()).append("</LINE_ID>");
160 176 sBuffer.append("<LINE_CODE>").append(BasicData.lineId2ShangHaiCodeMap.get(line.getId())).append("</LINE_CODE>");
... ... @@ -165,18 +181,24 @@ public class TrafficManageServiceImpl implements TrafficManageService{
165 181 upStationsList = stationRouteRepository.findByLine(line.getLineCode(), 0);
166 182 int startId = 1;
167 183 startId = packagStationXml(upStationsList, sBuffer, startId);
168   - // 再查下行
169   - downStationsList = stationRouteRepository.findByLine(line.getLineCode(), 1);
170   - packagStationXml(downStationsList, sBuffer, startId);
  184 + // 环线不查下行
  185 + if(line.getLinePlayType() != 1){
  186 + // 再查下行
  187 + downStationsList = stationRouteRepository.findByLine(line.getLineCode(), 1);
  188 + packagStationXml(downStationsList, sBuffer, startId);
  189 + }
171 190 sBuffer.append("</LineStationList>");
172 191  
173 192 // 循环添加站点点位信息
174 193 sBuffer.append("<LinePointList>");
175 194 startId = 1;
176 195 startId = packagStationPointXml(upStationsList, sBuffer, startId);
177   - packagStationPointXml(downStationsList, sBuffer, startId);
  196 + // 环线不查下行
  197 + if(line.getLinePlayType() != 1){
  198 + packagStationPointXml(downStationsList, sBuffer, startId);
  199 + }
178 200 sBuffer.append("</LinePointList>");
179   - }
  201 +// }
180 202 sBuffer.append("</DataList>");
181 203 sBuffer.append("</Data>");
182 204 System.out.println(sBuffer.toString());
... ... @@ -301,6 +323,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{
301 323 List<ScheduleRealInfo> list = scheduleRealInfoRepository.setLD(date);
302 324 List<Map<String,Object>> listGroup = scheduleRealInfoRepository.setLDGroup(date);
303 325 Map<String,Object> map = new HashMap<String,Object>();
  326 + HashMap<String,String> paramMap;
  327 + HashMap<String,String> otherMap = new HashMap<String, String>();
304 328 for(Map<String,Object> schRealInfo:listGroup){
305 329 if(schRealInfo != null){
306 330 //根据车辆自编号查询车牌号
... ... @@ -347,16 +371,20 @@ public class TrafficManageServiceImpl implements TrafficManageService{
347 371 sf.append("<SJGH>"+scheduleRealInfo.getjGh()+"</SJGH>");
348 372 sf.append("<SXX>"+scheduleRealInfo.getXlDir()+"</SXX>");
349 373 sf.append("<FCZDMC>"+scheduleRealInfo.getQdzName()+"</FCZDMC>");
350   - sf.append("<FCZDXH>" + getYgcStationNumByLineCodeAndDirectionAndStationName(
351   - scheduleRealInfo.getXlBm(), scheduleRealInfo.getXlDir(), scheduleRealInfo.getQdzCode()) + "</FCZDXH>");
  374 + // 起点站的参数
  375 + otherMap.put("stationMark","B");
  376 + paramMap = packageYgcStationNumParam(scheduleRealInfo,otherMap);
  377 + sf.append("<FCZDXH>" + getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap) + "</FCZDXH>");
352 378 sf.append("<FCZDBM>"+scheduleRealInfo.getQdzCode()+"</FCZDBM>");
353 379 sf.append("<JHFCSJ>"+scheduleRealInfo.getFcsj()+"</JHFCSJ>");
354 380 sf.append("<DFSJ>"+scheduleRealInfo.getDfsj()+"</DFSJ>");
355 381 sf.append("<SJFCSJ>"+scheduleRealInfo.getFcsjActual()+"</SJFCSJ>");
356 382 sf.append("<FCZDLX>"+""+"</FCZDLX>");
357 383 sf.append("<DDZDMC>"+scheduleRealInfo.getZdzName()+"</DDZDMC>");
358   - sf.append("<DDZDXH>"+ getYgcStationNumByLineCodeAndDirectionAndStationName(
359   - scheduleRealInfo.getXlBm(), scheduleRealInfo.getXlDir(), scheduleRealInfo.getZdzCode()) +"</DDZDXH>");
  384 + // 终点站的参数
  385 + otherMap.put("stationMark","E");
  386 + paramMap = packageYgcStationNumParam(scheduleRealInfo,otherMap);
  387 + sf.append("<DDZDXH>"+ getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap) +"</DDZDXH>");
360 388 sf.append("<DDZDBM>"+scheduleRealInfo.getZdzCode()+"</DDZDBM>");
361 389 sf.append("<JHDDSJ>"+scheduleRealInfo.getZdsj()+"</JHDDSJ>");
362 390 sf.append("<SJDDSJ>"+scheduleRealInfo.getZdsjActual()+"</SJDDSJ>");
... ... @@ -650,6 +678,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{
650 678 List<SchedulePlanInfo> schedulePlanList = schedulePlanInfoRepository.findLineScheduleBc(tomorrow);
651 679 int j = 0; // 初始化标识
652 680 if(schedulePlanList != null ){
  681 + HashMap<String,String> paramMap;
  682 + HashMap<String,String> otherMap = new HashMap<String, String>();
653 683 int size = schedulePlanList.size();
654 684 for (int i = 0; i < size; i++) {
655 685 schedulePlanInfo = schedulePlanList.get(i);
... ... @@ -676,12 +706,16 @@ public class TrafficManageServiceImpl implements TrafficManageService{
676 706 sBuffer.append("<SJGH>").append(schedulePlanInfo.getjGh()).append("</SJGH>");
677 707 sBuffer.append("<SXX>").append(schedulePlanInfo.getXlDir()).append("</SXX>");
678 708 sBuffer.append("<FCZDMC>").append(schedulePlanInfo.getQdzName()).append("</FCZDMC>");
679   - sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
680   - schedulePlanInfo.getXlBm(), schedulePlanInfo.getXlDir(), schedulePlanInfo.getQdzCode())).append("</ZDXH>");
  709 + // 起点站的参数
  710 + otherMap.put("stationMark","B");
  711 + paramMap = packageYgcStationNumParam(schedulePlanInfo,otherMap);
  712 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</ZDXH>");
681 713 sBuffer.append("<JHFCSJ>").append(schedulePlanInfo.getFcsj()).append("</JHFCSJ>");
682 714 sBuffer.append("<DDZDMC>").append(schedulePlanInfo.getZdzName()).append("</DDZDMC>");
683   - sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
684   - schedulePlanInfo.getXlBm(), schedulePlanInfo.getXlDir(), schedulePlanInfo.getZdzCode())).append("</DDXH>");
  715 + // 起点站的参数
  716 + otherMap.put("stationMark","E");
  717 + paramMap = packageYgcStationNumParam(schedulePlanInfo,otherMap);
  718 + sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</DDXH>");
685 719 sBuffer.append("<JHDDSJ>").append(calcDdsj(schedulePlanInfo.getFcsj(),schedulePlanInfo.getBcsj()))
686 720 .append("</JHDDSJ>");
687 721 sBuffer.append("</BC>");
... ... @@ -737,16 +771,20 @@ public class TrafficManageServiceImpl implements TrafficManageService{
737 771 String[] idArray = ids.split(",");
738 772 StringBuffer sBufferA;
739 773 StringBuffer sBufferB;
  774 + // 上传的时刻表集合
  775 + List<TTInfo> ttinfoList = new ArrayList<>();
740 776 TTInfo ttInfo;
741 777 TTInfoDetail ttInfoDetail;
742 778 Iterator<TTInfoDetail> ttInfoDetailIterator;
743 779 HashMap<String,Object> param = new HashMap<String, Object>();
744   - String lineCode ;
745 780 sBuffer.append("<SKBs>");
  781 + HashMap<String,String> paramMap;
  782 + HashMap<String,String> otherMap = new HashMap<String, String>();
746 783 for (int i = 0; i < idArray.length; i++) {
747 784 ttInfo = ttInfoRepository.findOne(Long.valueOf(idArray[i]));
748 785 if(ttInfo == null)
749 786 continue;
  787 + ttinfoList.add(ttInfo); // 保存时刻表
750 788 param.put("ttinfo.id_eq", ttInfo.getId());
751 789 ttInfoDetailIterator = ttInfoDetailRepository.findAll(new CustomerSpecs<TTInfoDetail>(param),
752 790 new Sort(Direction.ASC, "xlDir")).iterator();
... ... @@ -774,7 +812,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{
774 812 sBufferA.append("<JHYYLC>").append(ttInfoDetail.getJhlc()).append("</JHYYLC>");
775 813 sBuffer.append(sBufferA).append(sBufferB);
776 814 }
777   - lineCode = ttInfoDetail.getXl().getLineCode();
778 815 // 如果发车时间格式错误,忽略此条
779 816 if(changeTimeFormat(ttInfoDetail) == null){
780 817 continue;
... ... @@ -783,12 +820,16 @@ public class TrafficManageServiceImpl implements TrafficManageService{
783 820 sBuffer.append("<LPBH>").append(ttInfoDetail.getLp().getLpNo()).append("</LPBH>");
784 821 sBuffer.append("<SXX>").append(ttInfoDetail.getXlDir()).append("</SXX>");
785 822 sBuffer.append("<FCZDMC>").append(ttInfoDetail.getQdz().getStationName()).append("</FCZDMC>");
786   - sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
787   - lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getQdz().getStationCod())).append("</ZDXH>");
  823 + // 起点站的参数
  824 + otherMap.put("stationMark","B");
  825 + paramMap = packageYgcStationNumParam(ttInfoDetail,otherMap);
  826 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</ZDXH>");
788 827 sBuffer.append("<JHFCSJ>").append(changeTimeFormat(ttInfoDetail)).append("</JHFCSJ>");
789 828 sBuffer.append("<DDZDMC>").append(ttInfoDetail.getZdz().getStationName()).append("</DDZDMC>");
790   - sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
791   - lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getZdz().getStationCod())).append("</DDXH>");
  829 + // 起点站的参数
  830 + otherMap.put("stationMark","E");
  831 + paramMap = packageYgcStationNumParam(ttInfoDetail,otherMap);
  832 + sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</DDXH>");
792 833 sBuffer.append("<JHDDSJ>").append(calcDdsj(ttInfoDetail.getFcsj(),ttInfoDetail.getBcsj())).append("</JHDDSJ>");
793 834 sBuffer.append("</BC>");
794 835 }
... ... @@ -799,6 +840,15 @@ public class TrafficManageServiceImpl implements TrafficManageService{
799 840 sBuffer.append("</SKBs>");
800 841 if(ssop.setSKB(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){
801 842 result = "success";
  843 + SKBUploadLogger skbUploadLogger ;
  844 + SysUser user = SecurityUtils.getCurrentUser();
  845 + // 保存时刻表上传记录
  846 + for(TTInfo ttInfo1 : ttinfoList){
  847 + skbUploadLogger = new SKBUploadLogger();
  848 + skbUploadLogger.setTtInfo(ttInfo1);
  849 + skbUploadLogger.setUser(user);
  850 + skbUploadLoggerRepository.save(skbUploadLogger);
  851 + }
802 852 }
803 853 } catch (Exception e) {
804 854 logger.error("setSKB:", e);
... ... @@ -1136,6 +1186,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1136 1186 private int packagStationXml(List<StationRoute> stationsList,StringBuffer sBuffer,int startId){
1137 1187 int size = stationsList.size();
1138 1188 StationRoute srRoute;
  1189 + HashMap<String,String> paraMap;
1139 1190 String zdlx ;// 站点类型:0:起点站、1:终点站、2:中途站
1140 1191 for (int i = 0; i < size; i++) {
1141 1192 srRoute = stationsList.get(i);
... ... @@ -1147,10 +1198,11 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1147 1198 }else{
1148 1199 zdlx = "2";
1149 1200 }
  1201 + paraMap = packageYgcStationNumParam(srRoute,null);
1150 1202 sBuffer.append("<Station>");
1151   - sBuffer.append("<STATION_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationCode())).append("</STATION_ID>");
  1203 + sBuffer.append("<STATION_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paraMap)).append("</STATION_ID>");
1152 1204 sBuffer.append("<UPDDOWN>").append(srRoute.getDirections()).append("</UPDDOWN>");
1153   - sBuffer.append("<STATION_NO>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationCode())).append("</STATION_NO>");
  1205 + sBuffer.append("<STATION_NO>").append(i).append("</STATION_NO>");
1154 1206 sBuffer.append("<STATION_CODE>").append(srRoute.getStationCode()).append("</STATION_CODE>");
1155 1207 sBuffer.append("<STATION_NAME>").append(srRoute.getStationName()).append("</STATION_NAME>");
1156 1208 sBuffer.append("<STATION_LON>").append(srRoute.getStation().getgLonx()).append("</STATION_LON>");
... ... @@ -1173,6 +1225,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1173 1225 private int packagStationPointXml(List<StationRoute> stationsList,StringBuffer sBuffer,int startId){
1174 1226 int size = stationsList.size();
1175 1227 StationRoute srRoute;
  1228 + HashMap<String,String> paraMap;
1176 1229 String zdlx ;// 站点类型:0:起点站、1:终点站、2:中途站
1177 1230 for (int i = 0; i < size; i++) {
1178 1231 srRoute = stationsList.get(i);
... ... @@ -1184,8 +1237,9 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1184 1237 }else{
1185 1238 zdlx = "2";
1186 1239 }
  1240 + paraMap = packageYgcStationNumParam(srRoute,null);
1187 1241 sBuffer.append("<Point>");
1188   - sBuffer.append("<POINT_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationCode())).append("</POINT_ID>");
  1242 + sBuffer.append("<POINT_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paraMap)).append("</POINT_ID>");
1189 1243 sBuffer.append("<UPDDOWN>").append(srRoute.getDirections()).append("</UPDDOWN>");
1190 1244 sBuffer.append("<POINTLON>").append(srRoute.getStation().getgLonx()).append("</POINTLON>");
1191 1245 sBuffer.append("<POINTLAT>").append(srRoute.getStation().getgLaty()).append("</POINTLAT>");
... ... @@ -1196,15 +1250,94 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1196 1250 }
1197 1251  
1198 1252 /**
1199   - *
1200   - * @param lineCode 线路编码
1201   - * @param direction 线路方向
1202   - * @param stationCode 让点名称
  1253 + * 获取运管处站点序号
  1254 + * @param map
1203 1255 * @return 运管处站点序号
1204 1256 */
1205   - private Integer getYgcStationNumByLineCodeAndDirectionAndStationName(String lineCode,String direction,String stationCode){
1206   - Integer number = 0;
1207   - number = BasicData.stationName2YgcNumber.get(lineCode+"_"+direction+"_"+stationCode);
  1257 + private Integer getYgcStationNumByLineCodeAndDirectionAndStationName(HashMap<String,String> map){
  1258 + // 线路编码
  1259 + String lineCode = map.get("lineCode");
  1260 + // 线路走向 0:上行 1:下行
  1261 + String direction = map.get("direction");
  1262 + // 站点编码
  1263 + String stationCode = map.get("stationCode");
  1264 + // 站点类型:B:起点站 Z:中途站 E:终点站 T:停车场
  1265 + String stationMark = map.get("stationMark");
  1266 + String[] marks = null;
  1267 + // 起点站,先从起点找,找不到再从中途站找,最后从终点找
  1268 + if(stationMark.equals("B")){
  1269 + marks= new String[]{"B","Z","E"};
  1270 + }else if(stationMark.equals("E")){// 终点站相反
  1271 + marks= new String[]{"E","Z","B"};
  1272 + }else if(stationMark.equals("Z")){
  1273 + marks= new String[]{"Z"};
  1274 + }
  1275 + Integer number = null;
  1276 + for (int i = 0 ;i < marks.length ; i ++){
  1277 + number = BasicData.stationName2YgcNumber.get(lineCode+"_"+direction+"_"+stationCode+"_"+marks[i]);
  1278 + if(number != null){
  1279 + break;
  1280 + }
  1281 + }
1208 1282 return number == null ? 0 : number;
1209 1283 }
  1284 +
  1285 + /**
  1286 + * 封装查询站序条件
  1287 + * @param obj
  1288 + * @return
  1289 + */
  1290 + private HashMap packageYgcStationNumParam(Object obj,HashMap<String,String> otherParam){
  1291 + HashMap<String,String> map = new HashMap<String,String>();
  1292 + String lineCode = "",direction = "",stationCode = "",stationMark = "";
  1293 + // 站点路由
  1294 + if(obj instanceof StationRoute){
  1295 + StationRoute sr = (StationRoute)obj;
  1296 + lineCode = sr.getLineCode();
  1297 + direction = String.valueOf(sr.getDirections());
  1298 + stationCode = sr.getStationCode();
  1299 + stationMark = sr.getStationMark();
  1300 + }else if(obj instanceof ScheduleRealInfo){ //实际排班计划明细。
  1301 + ScheduleRealInfo sri = (ScheduleRealInfo)obj;
  1302 + lineCode = sri.getXlBm();
  1303 + direction = sri.getXlDir();
  1304 + if(otherParam != null && otherParam.get("stationMark") != null){
  1305 + stationMark = otherParam.get("stationMark");
  1306 + if(stationMark.equals("B")){ // 起点站
  1307 + stationCode = sri.getQdzCode();
  1308 + }else if(stationMark.equals("E")){ // 终点站
  1309 + stationCode = sri.getZdzCode();
  1310 + }
  1311 + }
  1312 + }else if(obj instanceof SchedulePlanInfo){ //排班计划明细
  1313 + SchedulePlanInfo spi = (SchedulePlanInfo)obj;
  1314 + lineCode = spi.getXlBm();
  1315 + direction = spi.getXlDir();
  1316 + if(otherParam != null && otherParam.get("stationMark") != null){
  1317 + stationMark = otherParam.get("stationMark");
  1318 + if(stationMark.equals("B")){ // 起点站
  1319 + stationCode = spi.getQdzCode();
  1320 + }else if(stationMark.equals("E")){ // 终点站
  1321 + stationCode = spi.getZdzCode();
  1322 + }
  1323 + }
  1324 + }else if(obj instanceof TTInfoDetail){ //时刻表明细
  1325 + TTInfoDetail ttid = (TTInfoDetail)obj;
  1326 + lineCode = ttid.getXl().getLineCode();
  1327 + direction = ttid.getXlDir();
  1328 + if(otherParam != null && otherParam.get("stationMark") != null){
  1329 + stationMark = otherParam.get("stationMark");
  1330 + if(stationMark.equals("B")){ // 起点站
  1331 + stationCode = ttid.getQdz().getStationCod();
  1332 + }else if(stationMark.equals("E")){ // 终点站
  1333 + stationCode = ttid.getZdz().getStationCod();
  1334 + }
  1335 + }
  1336 + }
  1337 + map.put("lineCode",lineCode);// 站点编码
  1338 + map.put("direction",direction); // 上下行
  1339 + map.put("stationCode",stationCode); // 站点编号
  1340 + map.put("stationMark",stationMark); // 站点类型
  1341 + return map;
  1342 + }
1210 1343 }
... ...
src/main/java/com/bsth/service/oil/YlbService.java
... ... @@ -19,7 +19,7 @@ public interface YlbService extends BaseService&lt;Ylb, Integer&gt;{
19 19  
20 20 Map<String, Object> sumYlb(Map<String, Object> map);
21 21 String checkJsy(Map<String, Object> map);
22   - List<Ylb> oilListMonth(String line,String date);
  22 + List<Ylb> oilListMonth(String line,String date,String type);
23 23 List<Ylb> listYlb(Map<String, Object> map);
24 24 StringBuffer checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int lx);
25 25  
... ...
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
... ... @@ -315,7 +315,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
315 315 return t;
316 316 }
317 317 });
318   - List<Ylxxb> list= ylxxbRepository.checkYlxx(rq, gsdm);
  318 + /*List<Ylxxb> list= ylxxbRepository.checkYlxx(rq, gsdm);
319 319 for (int i = 0; i < yList.size(); i++) {
320 320 Ylxxb t=yList.get(i);
321 321 Double zjzl=0.0;
... ... @@ -327,7 +327,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
327 327  
328 328 }
329 329 t.setZjzl(zjzl);
330   - }
  330 + }*/
331 331 return yList;
332 332 }
333 333  
... ...
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
... ... @@ -31,6 +31,7 @@ import com.bsth.common.ResponseCode;
31 31 import com.bsth.data.BasicData;
32 32 import com.bsth.entity.Cars;
33 33 import com.bsth.entity.Line;
  34 +import com.bsth.entity.mcy_forms.Daily;
34 35 import com.bsth.entity.oil.Cyl;
35 36 import com.bsth.entity.oil.Ylb;
36 37 import com.bsth.entity.oil.Ylxxb;
... ... @@ -44,6 +45,7 @@ import com.bsth.service.oil.YlbService;
44 45 import com.bsth.service.realcontrol.ScheduleRealInfoService;
45 46 import com.bsth.util.Arith;
46 47 import com.bsth.util.BatchSaveUtils;
  48 +import com.bsth.util.ReportUtils;
47 49 import com.github.abel533.echarts.code.Y;
48 50  
49 51 @Service
... ... @@ -100,7 +102,8 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
100 102 // TODO Auto-generated method stub
101 103 Map<String, Object> newMap=new HashMap<String,Object>();
102 104 //当天YLB信息
103   - List<Ylb> ylList=repository.obtainYl(rq,"","","","","nbbm");
  105 +// List<Ylb> ylList=repository.obtainYl(rq,"","","","","nbbm");
  106 + List<Ylb> ylList=this.listOrderBy(rq,"","","","","nbbm");
104 107 //当天YLXXB信息
105 108 // List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq);
106 109 //前一天所有车辆最后进场班次信息
... ... @@ -258,7 +261,8 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
258 261 DecimalFormat df = new DecimalFormat("#.00");
259 262 // TODO Auto-generated method stub
260 263 // 当天YLB信息
261   - List<Ylb> ylList = repository.obtainYl(rq,gsbm,fgsbm,line,nbbm,"nbbm");
  264 + List<Ylb> ylList = this.listOrderBy(rq,gsbm,fgsbm,line,nbbm,"nbbm");
  265 +// repository.obtainYl(rq,gsbm,fgsbm,line,nbbm,"nbbm");
262 266 // 当天YLXXB信息
263 267 List<Ylxxb> ylxxList = ylxxbRepository.obtainYlxx(rq, 0,gsbm);
264 268 // 前一天所有车辆最后进场班次信息
... ... @@ -376,18 +380,42 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
376 380 if(ylMap.get(map.get("clZbh").toString()+"_"+ map.get("jGh").toString())!=null){
377 381  
378 382 }else{
379   - // 把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断)
380   - for (int j = 0; j < ylxxList.size(); j++) {
381   - Ylxxb ylxxb = ylxxList.get(j);
  383 + boolean fage2=false;
  384 + for (int i = 0; i < ylxxList.size(); i++) {
  385 + Ylxxb ylxxb = ylxxList.get(i);
382 386 if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
383   - && map.get("jGh").toString().equals(ylxxb.getJsy())) {
384   - jzl =Arith.add(jzl, ylxxb.getJzl());
  387 + && ylxxb.getJylx()==1) {
  388 + if(ylxxb.getJzl()>0){
  389 + fage2=true;
  390 + }
  391 +
385 392 }
386 393 }
387   - ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString());
  394 + //车辆的加注量如果有任工干预,略接口过来 数据
  395 + if(fage2){
  396 + // 把当天手工输入的的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断,加油类型为1)
  397 + for (int j = 0; j < ylxxList.size(); j++) {
  398 + Ylxxb ylxxb = ylxxList.get(j);
  399 + if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
  400 + && map.get("jGh").toString().equals(ylxxb.getJsy())
  401 + && ylxxb.getJylx()==1) {
  402 + jzl =Arith.add(jzl, ylxxb.getJzl());
  403 + }
  404 + }
  405 + ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString());
  406 + }else{
  407 + // 把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断)
  408 + for (int j = 0; j < ylxxList.size(); j++) {
  409 + Ylxxb ylxxb = ylxxList.get(j);
  410 + if (map.get("clZbh").toString().equals(ylxxb.getNbbm())
  411 + && map.get("jGh").toString().equals(ylxxb.getJsy())) {
  412 + jzl =Arith.add(jzl, ylxxb.getJzl());
  413 + }
  414 + }
  415 + ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString());
  416 + }
  417 +
388 418 }
389   -
390   -
391 419 t.setJzl(jzl);
392 420 t.setNbbm(map.get("clZbh").toString());
393 421 t.setJsy(map.get("jGh") == null ? "" : map.get("jGh").toString());
... ... @@ -482,13 +510,15 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
482 510 List<Ylb> ylbList =new ArrayList<Ylb>();
483 511 List<Ylb> ylbLists =new ArrayList<Ylb>();
484 512 List<Ylb> iterator2=new ArrayList<Ylb>();
485   - if(xlbm.equals("")){
486   - ylbLists=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
487   - iterator2=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
488   - }else{
489   - ylbLists=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
490   - iterator2=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
491   - }
  513 +// if(xlbm.equals("")){
  514 + ylbLists=this.listOrderBy(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
  515 +// repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
  516 + iterator2=this.listOrderBy(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
  517 +// repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
  518 +// }else{
  519 +// ylbLists=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx");
  520 +// iterator2=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");
  521 +// }
492 522  
493 523 // 从排班表中计算出行驶的总里程
494 524  
... ... @@ -602,8 +632,14 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
602 632 if(j==iterator2.size()-1){
603 633 ylxs=czyl;
604 634 }else{
605   - l=Math.round(nextJzyl);
606   - ylxs=l*100/100;
  635 +// l=Math.round(nextJzyl);
  636 +// ylxs=l*100/100;
  637 + if(iterator2.get(j+1).getNbbm().equals(t.getNbbm())){
  638 + l=Math.round(nextJzyl);
  639 + ylxs=l*100/100;
  640 + }else{
  641 + ylxs=czyl;
  642 + }
607 643  
608 644 }
609 645 yh=Arith.add(yh, Arith.sub(nextJzyl,ylxs));
... ... @@ -833,7 +869,8 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
833 869 }
834 870 // List<Ylb> ylListBe=repository.obtainYlbefore(rq, gsbm, "", xlbm, nbbm);
835 871 List<Ylb> ylListBe=repository.listMaxRqJcsx(rq, gsbm, fgsbm, xlbm, nbbm);
836   - List<Ylb> ylbList=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm");
  872 + List<Ylb> ylbList=this.listOrderBy(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm");
  873 +// repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm");
837 874 List<Ylxxb> ylxxbList=ylxxbRepository.obtainYlxx(rq,0,gsbm);
838 875 for (int i = 0; i < ylxxbList.size(); i++) {
839 876 Boolean fage=true;
... ... @@ -913,7 +950,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
913 950  
914 951  
915 952 @Override
916   - public List<Ylb> oilListMonth(String line, String date) {
  953 + public List<Ylb> oilListMonth(String line, String date, String type) {
917 954 String date2=date.substring(0, 8)+"01";
918 955 String lineStr="";
919 956 if(line !=null && !line.equals("")){
... ... @@ -943,6 +980,34 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
943 980 return s;
944 981 }
945 982 });
  983 +
  984 + if(type != null && type.equals("export")){
  985 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  986 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  987 +
  988 + List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
  989 + for(Ylb ylb : list){
  990 + Map<String, Object> m = new HashMap<String, Object>();
  991 + m.put("nbbm", ylb.getNbbm()!=null?ylb.getNbbm():"");
  992 + m.put("rq", ylb.getRq()!=null?sdfMonth.format(ylb.getRq()):"");
  993 + m.put("jzyl", ylb.getJzyl()!=null?ylb.getJzyl():"");
  994 + mapList.add(m);
  995 + }
  996 +
  997 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  998 + Map<String, Object> m = new HashMap<String, Object>();
  999 + ReportUtils ee = new ReportUtils();
  1000 + try {
  1001 + listI.add(mapList.iterator());
  1002 + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
  1003 + ee.excelReplace(listI, new Object[] { m }, path+"mould/oilListMonth.xls",
  1004 + path+"export/月存油报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  1005 + } catch (Exception e) {
  1006 + // TODO: handle exception
  1007 + e.printStackTrace();
  1008 + }
  1009 + }
  1010 +
946 1011 return list;
947 1012 }
948 1013  
... ... @@ -1278,8 +1343,10 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1278 1343 map.put("nbbm_eq", nbbm_eq);
1279 1344 map.put("rq_eq", rq_eq);
1280 1345  
1281   - List<Ylb> iterator2=repository.obtainYl(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"",
  1346 + List<Ylb> iterator2=this.listOrderBy(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"",
1282 1347 ylb.getNbbm(),"jcsx");
  1348 +// repository.obtainYl(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"",
  1349 +// ylb.getNbbm(),"jcsx");
1283 1350 DecimalFormat df = new DecimalFormat("#.00");
1284 1351 Double zyl = 0.0;
1285 1352 Double nextJzyl = 0.0;
... ... @@ -1395,7 +1462,8 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1395 1462 t.setCreatetime(new Date());
1396 1463 String[] jhsjStr = jhsj.split(":");
1397 1464 long fcsjL= Long.parseLong(jhsjStr[0])*60+Long.parseLong(jhsjStr[1]);
1398   - List<Ylb> list=repository.obtainYl(rq, gsdm, fgsdm, xlbm, nbbm, "jhsj");
  1465 + List<Ylb> list=this.listOrderBy(rq, gsdm, fgsdm, xlbm, nbbm, "jhsj");
  1466 +// repository.obtainYl(rq, gsdm, fgsdm, xlbm, nbbm, "jhsj");
1399 1467 int jcsx=1;
1400 1468 if(list.size()>0){
1401 1469 for (int i = 0; i < list.size(); i++) {
... ... @@ -1439,4 +1507,43 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1439 1507 }
1440 1508 return maps;
1441 1509 }
  1510 +
  1511 + public List<Ylb> listOrderBy(String rq,String gsdm,
  1512 + String fgsdm,String xlbm,String nbbm,
  1513 + String px) {
  1514 + // TODO Auto-generated method stub
  1515 + String sql="SELECT * FROM bsth_c_ylb "
  1516 + + " where to_days('"+rq+"')=to_days(rq) and ssgsdm like '%"+gsdm+"%' "
  1517 + + " and fgsdm like '%"+fgsdm+"%'";
  1518 + if(xlbm.equals("")){
  1519 + sql+= " and xlbm like '%"+xlbm+"%' ";
  1520 + }else{
  1521 + sql+= " and xlbm = '"+xlbm+"' ";
  1522 + }
  1523 +
  1524 + sql += "and nbbm like '%"+nbbm+"%' order by "+px+" asc ";
  1525 +
  1526 + List<Ylb> list = jdbcTemplate.query(sql, new RowMapper<Ylb>() {
  1527 + @Override
  1528 + public Ylb mapRow(ResultSet arg0, int arg1) throws SQLException {
  1529 + Ylb y = new Ylb();
  1530 + y.setId(arg0.getInt("id"));
  1531 + return y;
  1532 + }
  1533 + });
  1534 + List<Ylb> lists=new ArrayList<Ylb>();
  1535 + List<Ylb> ylbLists=repository.obtainYl(rq,gsdm,fgsdm,xlbm,nbbm,"jcsx");
  1536 + for (int i = 0; i < list.size(); i++) {
  1537 + Ylb t=list.get(i);
  1538 + for (int j = 0; j < ylbLists.size(); j++) {
  1539 + Ylb t2=ylbLists.get(j);
  1540 + if(t.getId().intValue()==t2.getId().intValue()){
  1541 + lists.add(t2);
  1542 + break;
  1543 + }
  1544 + }
  1545 + }
  1546 +
  1547 + return lists;
  1548 + }
1442 1549 }
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -2,6 +2,7 @@ package com.bsth.service.realcontrol;
2 2  
3 3 import com.bsth.controller.realcontrol.dto.ChangePersonCar;
4 4 import com.bsth.controller.realcontrol.dto.DfsjChange;
  5 +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
5 6 import com.bsth.entity.realcontrol.ScheduleRealInfo;
6 7 import com.bsth.entity.schedule.SchedulePlanInfo;
7 8 import com.bsth.service.BaseService;
... ... @@ -104,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
104 105 List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px);
105 106  
106 107  
107   - List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code, String type);
  108 + List<SchEditInfoDto> correctForm(String line,String date,String lpName,String code, String type);
108 109  
109 110 List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line);
110 111  
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -16,6 +16,7 @@ import com.bsth.data.schedule.ScheduleComparator;
16 16 import com.bsth.data.schedule.edit_logs.FormLogger;
17 17 import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger;
18 18 import com.bsth.data.schedule.edit_logs.loggers.FcxxwtLogger;
  19 +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
19 20 import com.bsth.data.schedule.late_adjust.LateAdjustHandle;
20 21 import com.bsth.entity.Cars;
21 22 import com.bsth.entity.Line;
... ... @@ -58,9 +59,11 @@ import org.apache.commons.lang3.StringEscapeUtils;
58 59 import org.apache.commons.lang3.StringUtils;
59 60 import org.joda.time.format.DateTimeFormat;
60 61 import org.joda.time.format.DateTimeFormatter;
  62 +import org.mvel2.optimizers.impl.refl.nodes.ArrayLength;
61 63 import org.slf4j.Logger;
62 64 import org.slf4j.LoggerFactory;
63 65 import org.springframework.beans.factory.annotation.Autowired;
  66 +import org.springframework.jdbc.core.BeanPropertyRowMapper;
64 67 import org.springframework.jdbc.core.JdbcTemplate;
65 68 import org.springframework.jdbc.core.RowMapper;
66 69 import org.springframework.stereotype.Service;
... ... @@ -1904,7 +1907,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1904 1907 return listMap;
1905 1908 }
1906 1909  
1907   - @Override
  1910 + /* @Override
1908 1911 public List<ScheduleRealInfo> correctForm(String line, String startDate,
1909 1912 String endDate, String lpName, String code, String type) {
1910 1913 List<ScheduleRealInfo> list = scheduleRealInfoRepository.correctForm(line, startDate, endDate, lpName, code);
... ... @@ -1959,8 +1962,93 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1959 1962 }
1960 1963  
1961 1964 return list;
  1965 + }*/
  1966 +
  1967 + @Override
  1968 + public List<SchEditInfoDto> correctForm(String line,String date,
  1969 + String lpName,String code, String type) {
  1970 +
  1971 +// var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班',
  1972 +// 'CXZX': '撤销执行', 'CXSF': '撤销实发', 'SFTZ': '实发调整', 'TZRC': '调整人车'};
  1973 + Map<String, Object> map=new HashMap<String,Object>();
  1974 + map.put("DFTZ", "待发调整");
  1975 + map.put("FCXXWT", "发车信息微调");
  1976 + map.put("JHLB", "计划烂班");
  1977 + map.put("CXLB", "撤销烂班");
  1978 + map.put("CXZX","撤销执行");
  1979 + map.put("CXSF", "撤销实发");
  1980 + map.put("SFTZ", "实发调整");
  1981 + map.put("TZRC", "调整人车");
  1982 +
  1983 + String cont = "";
  1984 + cont = " and xl_bm ='"+line +"'";
  1985 + if(!lpName.equals("")){
  1986 + cont +=" and lp_name = '"+lpName+"'";
  1987 + }
  1988 + if(!code.equals("")){
  1989 + cont +=" and cl_zbh ='"+code+"'";
  1990 + }
  1991 + String sql = "select t1.*, "
  1992 + + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name,"
  1993 + + "t2.xl_dir,t2.real_exec_date from (select * from "
  1994 + + "logger_sch_modify where rq=? and line_code=? )"
  1995 + + " t1 INNER JOIN bsth_c_s_sp_info_real t2 on "
  1996 + + "t1.sch_id=t2.id where 1=1 " + cont;
  1997 +
  1998 + List<SchEditInfoDto> list = jdbcTemplate.query(sql,
  1999 + new BeanPropertyRowMapper(SchEditInfoDto.class),date, line);
  2000 + List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>();
  2001 + for (int i = 0; i < list.size(); i++) {
  2002 + SchEditInfoDto t=list.get(i);
  2003 + if(map.get(t.getType())!=null){
  2004 + t.setType2(t.getTimeStr()+":"+map.get(t.getType()).toString());
  2005 + }else{
  2006 + t.setType2("");
  2007 + }
  2008 + boolean fage=true;
  2009 + for (int j = 0; j < lists.size(); j++) {
  2010 + SchEditInfoDto s=lists.get(j);
  2011 + if(s.getSchId()==t.getSchId()){
  2012 + s.setType2(s.getType2()+" "+t.getType2());
  2013 + fage=false;
  2014 + }
  2015 + }
  2016 + if(fage){
  2017 + lists.add(t);
  2018 + }
  2019 + }
  2020 +
  2021 + if (type != null && type.length() != 0 && type.equals("export")) {
  2022 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  2023 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  2024 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  2025 + Map<String, Object> m = new HashMap<String, Object>();
  2026 + m.put("dates",date);
  2027 + ReportUtils ee = new ReportUtils();
  2028 + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
  2029 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  2030 + for (SchEditInfoDto d : lists) {
  2031 + Map<String, Object> tempMap = new HashMap<String, Object>();
  2032 + tempMap.put("lpName", d.getLpName());
  2033 + tempMap.put("clZbh", d.getClZbh());
  2034 + tempMap.put("jName", d.getjName()+"/"+d.getjGh());
  2035 + tempMap.put("fcsj", d.getFcsj());
  2036 + tempMap.put("type", d.getType2());
  2037 + tempList.add(tempMap);
  2038 + }
  2039 + try {
  2040 + listI.add(tempList.iterator());
  2041 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  2042 + ee.excelReplace(listI, new Object[]{m}, path + "mould/correctForm.xls",
  2043 + path + "export/修正报表" + date+ ".xls");
  2044 + } catch (Exception e) {
  2045 + // TODO: handle exception
  2046 + e.printStackTrace();
  2047 + }
  2048 +// Map<String, Object> maps = tempList.get(tempList.size() - 1);
  2049 + }
  2050 + return lists;
1962 2051 }
1963   -
1964 2052 @Override
1965 2053 public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh,
1966 2054 String lpName, String date, String line) {
... ... @@ -3267,26 +3355,28 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3267 3355 yesterdayDataList.get(x).put("totalKilometers", zlc);
3268 3356  
3269 3357 }
  3358 + List<Map<String, Object>> yesterdayDataLists = new ArrayList<Map<String, Object>>();
  3359 +
3270 3360 for (int i = 0; i < yesterdayDataList.size(); i++) {
3271 3361 Map<String, Object> map=yesterdayDataList.get(i);
3272 3362 Double zlc=map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString());
3273   - if(zlc<=0){
3274   - yesterdayDataList.remove(map);
  3363 + if(zlc>0){
  3364 + yesterdayDataLists.add(map);
3275 3365 }
3276 3366 }
3277 3367 //增加顺序号
3278   - for (int i = 0; i < yesterdayDataList.size(); i++) {
  3368 + for (int i = 0; i < yesterdayDataLists.size(); i++) {
3279 3369 if (i == 0) {
3280   - yesterdayDataList.get(i).put("seqNumber", 1);
  3370 + yesterdayDataLists.get(i).put("seqNumber", 1);
3281 3371 } else {
3282   - if (yesterdayDataList.get(i - 1).get("clZbh").equals(yesterdayDataList.get(i).get("clZbh"))) {
3283   - yesterdayDataList.get(i).put("seqNumber", 1 + (int) yesterdayDataList.get(i - 1).get("seqNumber"));
  3372 + if (yesterdayDataLists.get(i - 1).get("clZbh").equals(yesterdayDataLists.get(i).get("clZbh"))) {
  3373 + yesterdayDataLists.get(i).put("seqNumber", 1 + (int) yesterdayDataLists.get(i - 1).get("seqNumber"));
3284 3374 } else {
3285   - yesterdayDataList.get(i).put("seqNumber", 1);
  3375 + yesterdayDataLists.get(i).put("seqNumber", 1);
3286 3376 }
3287 3377 }
3288 3378 }
3289   - return yesterdayDataList;
  3379 + return yesterdayDataLists;
3290 3380 }
3291 3381  
3292 3382 /**
... ...
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
... ... @@ -239,7 +239,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{
239 239 }
240 240 }else{
241 241 Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
242   - if(!childTaskPlans.isEmpty()){
  242 + if(childTaskPlans.isEmpty()){
243 243 double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
244 244 double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig();
245 245 double zjlc=Arith.sub(jhlc, jhlcOrig);
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -720,36 +720,40 @@ public class ReportServiceImpl implements ReportService{
720 720 Map<String, Object> tempMap = new HashMap<String, Object>();
721 721 List<Map<String, Object>> list2 = keyMap.get(key);
722 722 List<Integer> cjs = new ArrayList<Integer>();
723   - int sxsj = 0, xxsj = 0, zcj = 0, tssj = 0;
724   - int sxbc = 0, xxbc = 0;
725   - int temp = 24*60+1;
  723 + int sxsj = 0, xxsj = 0, sxtssj = 0, xxtssj = 0;
  724 + int sxbc = 0, xxbc = 0, sxtsbc = 0, xxtsbc = 0;
  725 + int temp = 24*60+1, zcj = 0;
726 726 boolean ists = false;
727 727 for(Map<String, Object> m : list2){
728 728 String[] split = m.get("fcsj").toString().split(":");
729 729 int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
730 730 int xlDir = Integer.valueOf(m.get("dir").toString());
731 731 int bcsj = Integer.valueOf(m.get("bcsj").toString());
  732 + if(temp >= fcsj){
  733 + temp = fcsj;
  734 + ists = false;
  735 + }
732 736 if(xlDir == 0){
733 737 sxsj += bcsj;
734 738 sxbc ++;
  739 + if(ists){
  740 + sxtssj += fcsj - temp;
  741 + sxtsbc++;
  742 + }
735 743 } else {
736 744 xxsj += bcsj;
737 745 xxbc ++;
738   - }
739   - if(temp >= fcsj){
740   - temp = fcsj;
741   - ists = false;
742   - } else {
743 746 if(ists){
744   - tssj += fcsj - temp;
745   - ists = false;
746   - } else {
747   - cjs.add(fcsj - temp);
  747 + xxtssj += fcsj - temp;
  748 + xxtsbc++;
748 749 }
  750 + }
  751 + if(temp < fcsj){
  752 + cjs.add(fcsj - temp);
749 753 temp = fcsj;
750   - if(m.get("ists").equals("1")){
751   - ists = true;
752   - }
  754 + }
  755 + if(m.get("ists").toString().trim().equals("1")){
  756 + ists = true;
753 757 }
754 758 }
755 759 Collections.sort(cjs);
... ... @@ -757,12 +761,14 @@ public class ReportServiceImpl implements ReportService{
757 761 zcj += i;
758 762 }
759 763 tempMap.put("sjd", key);
760   - tempMap.put("sxsj", sxsj / sxbc);
761   - tempMap.put("xxsj", xxsj / xxbc);
762   - tempMap.put("fqsj", (sxsj + xxsj) / list2.size());
  764 + tempMap.put("sxsj", sxbc != 0 ? sxsj / sxbc : "0");
  765 + tempMap.put("xxsj", xxbc != 0 ? xxsj / xxbc : "0");
  766 + tempMap.put("sxtssj", sxtsbc != 0 ? sxtssj / sxtsbc : "0");
  767 + tempMap.put("xxtssj", xxtsbc != 0 ? xxtssj / xxtsbc : "0");
  768 + tempMap.put("fqsj", Integer.valueOf(tempMap.get("sxsj").toString()) + Integer.valueOf(tempMap.get("xxsj").toString())
  769 + + Integer.valueOf(tempMap.get("sxtssj").toString()) + Integer.valueOf(tempMap.get("xxtssj").toString()));
763 770 tempMap.put("cjqj", cjs.size()>0?cjs.get(0)+"——"+cjs.get(cjs.size()-1):"——");
764 771 tempMap.put("pjcj", cjs.size()>0?zcj/cjs.size():"/");
765   - tempMap.put("tssj", tssj);
766 772 maps.put(key, tempMap);
767 773 }
768 774 newList.add(maps.get("(首)——6:30"));
... ... @@ -920,7 +926,7 @@ public class ReportServiceImpl implements ReportService{
920 926  
921 927 } else {
922 928 Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
923   - if (scheduleRealInfo.getStatus() == -1) {
  929 + /*if (scheduleRealInfo.getStatus() == -1) {
924 930 while (it.hasNext()) {
925 931 ChildTaskPlan childTaskPlan = it.next();
926 932 if (childTaskPlan.isDestroy()) {
... ... @@ -947,7 +953,7 @@ public class ReportServiceImpl implements ReportService{
947 953  
948 954 }
949 955 }
950   - }else{
  956 + }else{*/
951 957 while (it.hasNext()) {
952 958 ChildTaskPlan childTaskPlan = it.next();
953 959 if (childTaskPlan.isDestroy()) {
... ... @@ -974,7 +980,7 @@ public class ReportServiceImpl implements ReportService{
974 980  
975 981 }
976 982 }
977   - }
  983 +// }
978 984  
979 985 }
980 986 }
... ...
src/main/java/com/bsth/service/schedule/impl/BServiceImpl.java
... ... @@ -4,11 +4,9 @@ import com.bsth.entity.search.CustomerSpecs;
4 4 import com.bsth.repository.BaseRepository;
5 5 import com.bsth.service.schedule.BService;
6 6 import com.bsth.service.schedule.exception.ScheduleException;
7   -import com.bsth.service.schedule.utils.DataToolsService;
8 7 import org.slf4j.Logger;
9 8 import org.slf4j.LoggerFactory;
10 9 import org.springframework.beans.factory.annotation.Autowired;
11   -import org.springframework.beans.factory.annotation.Qualifier;
12 10 import org.springframework.beans.factory.annotation.Value;
13 11 import org.springframework.data.domain.Page;
14 12 import org.springframework.data.domain.Pageable;
... ... @@ -32,10 +30,6 @@ public class BServiceImpl&lt;T, ID extends Serializable&gt; implements BService&lt;T, ID&gt;
32 30 @Value("${hibernate.jdbc.batch_size}")
33 31 private int batchSize;
34 32  
35   - @Autowired
36   - @Qualifier(value = "dataToolsServiceImpl")
37   - private DataToolsService dataToolsService;
38   -
39 33 /** 日志记录器 */
40 34 protected Logger logger = LoggerFactory.getLogger(this.getClass());
41 35  
... ...
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
... ... @@ -516,6 +516,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
516 516 String endDate = map.get("endDate").toString();
517 517 String model = map.get("model").toString();
518 518 String type = map.get("type").toString();
  519 + String bcType = map.get("bcType").toString();
519 520  
520 521 if(startDate.length() == 0){
521 522 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
... ... @@ -533,7 +534,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
533 534 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";
534 535 // }
535 536 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
536   -
  537 + if(Integer.valueOf(bcType) == 1){
  538 + sql += " and bc_type != 'region'";
  539 + } else if(Integer.valueOf(bcType) == 2){
  540 + sql += " and bc_type = 'region'";
  541 + }
537 542 list = jdbcTemplate.query(sql,
538 543 new RowMapper<ScheduleRealInfo>(){
539 544 @Override
... ... @@ -798,6 +803,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
798 803 String line = map.get("line").toString();
799 804 String startDate = map.get("startDate").toString();
800 805 String endDate = map.get("endDate").toString();
  806 + String bcType = map.get("bcType").toString();
801 807 String nbbm = map.get("nbbm").toString();
802 808 String type = map.get("type").toString();
803 809  
... ... @@ -824,6 +830,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
824 830 sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'";
825 831 // }
826 832 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  833 + if(bcType.trim().equals("1")){
  834 + sql += " and bc_type != 'region'";
  835 + } else if(bcType.trim().equals("2")){
  836 + sql += " and bc_type = 'region'";
  837 + }
827 838  
828 839 list = jdbcTemplate.query(sql,
829 840 new RowMapper<ScheduleRealInfo>(){
... ... @@ -1180,8 +1191,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1180 1191  
1181 1192 @Override
1182 1193 public List<Map<String, Object>> firstAndLastBus(Map<String, Object> map) {
  1194 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  1195 + NumberFormat nf = NumberFormat.getNumberInstance();
  1196 + nf.setMinimumFractionDigits(2);
  1197 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1183 1198 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1184   - Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
1185 1199  
1186 1200 String company = map.get("company").toString();
1187 1201 String subCompany = map.get("subCompany").toString();
... ... @@ -1190,151 +1204,173 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1190 1204 String type = map.get("type").toString();
1191 1205  
1192 1206 if(date.length() == 0)
1193   - date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
  1207 + date = sdf.format(new Date());
1194 1208  
1195   - List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
  1209 + try {
  1210 + String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
  1211 + + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
  1212 + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"
  1213 + + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  1214 + if(line.length() != 0)
  1215 + sql += " and xl_bm = '"+line+"'";
  1216 + if(company.length() != 0)
  1217 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  1218 +
  1219 + list = jdbcTemplate.query(sql,
  1220 + new RowMapper<ScheduleRealInfo>(){
  1221 + @Override
  1222 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  1223 + ScheduleRealInfo schedule = new ScheduleRealInfo();
  1224 + schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  1225 + schedule.setRealExecDate(rs.getString("real_exec_date"));
  1226 + schedule.setXlName(rs.getString("xl_name"));
  1227 + schedule.setFcsj(rs.getString("fcsj"));
  1228 + schedule.setFcsjActual(rs.getString("fcsj_actual"));
  1229 + schedule.setZdsj(rs.getString("zdsj"));
  1230 + schedule.setZdsjActual(rs.getString("zdsj_actual"));
  1231 + schedule.setQdzName(rs.getString("qdz_name"));
  1232 + schedule.setZdzName(rs.getString("zdz_name"));
  1233 + schedule.setXlDir(rs.getString("xl_dir"));
  1234 + schedule.setStatus(rs.getInt("status"));
  1235 + schedule.setGsName(rs.getString("gs_name"));
  1236 + schedule.setFgsName(rs.getString("fgs_name"));
  1237 +
  1238 + int startOpt = 0;
  1239 + if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){
  1240 + String[] split = rs.getString("start_opt").split(":");
  1241 + startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  1242 + }
  1243 +
  1244 + if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
  1245 + schedule.setFcsjActual(null);
  1246 + }
  1247 + if(schedule.getZdsjActual() != null && schedule.getZdsjActual().trim().length() == 0){
  1248 + schedule.setZdsjActual(null);
  1249 + }
  1250 + if(schedule.getFcsj() != null){
  1251 + String[] split = schedule.getFcsj().split(":");
  1252 + int fcsj = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]);
  1253 + if(fcsj < startOpt)
  1254 + fcsj += 1440;
  1255 + schedule.setFcsjT((long)fcsj);
  1256 + }
  1257 + if(schedule.getFcsjActual() != null){
  1258 + String[] split = schedule.getFcsjActual().split(":");
  1259 + int fcsjA = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]);
  1260 + if(fcsjA < startOpt || !schedule.getRealExecDate().equals(schedule.getScheduleDateStr()))
  1261 + fcsjA += 1440;
  1262 + schedule.setFcsjActualTime((long)fcsjA);
  1263 + }
  1264 +
  1265 + return schedule;
  1266 + }
  1267 + });
  1268 +
  1269 + } catch (Exception e) {
  1270 + // TODO: handle exception
  1271 + e.printStackTrace();
  1272 + }
1196 1273  
1197   - for(ScheduleRealInfo schedule : list){
1198   - if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out") || schedule.getBcType().equals("ldks"))
1199   - continue;
1200   - if(schedule.getStatus() == -1){
1201   - continue;
1202   - }
1203   - String key = schedule.getXlName();
1204   - if(key == null || key.trim().length() == 0)
1205   - continue;
1206   - if(!keyMap.containsKey(key))
1207   - keyMap.put(key, new ArrayList<ScheduleRealInfo>());
1208   - keyMap.get(key).add(schedule);
  1274 + Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
  1275 + String companyName = "", subCompanyName = "";
  1276 +
  1277 + for(ScheduleRealInfo s : list){
  1278 + String xlName = s.getXlName();
  1279 + if(!keyMap.containsKey(xlName))
  1280 + keyMap.put(xlName, new ArrayList<ScheduleRealInfo>());
  1281 + keyMap.get(xlName).add(s);
  1282 + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0)
  1283 + companyName = s.getGsName();
  1284 + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0)
  1285 + subCompanyName = s.getFgsName();
1209 1286 }
1210   - for(String key : keyMap.keySet()){
  1287 +
  1288 + for(String xlName : keyMap.keySet()){
1211 1289 Map<String, Object> tempMap = new HashMap<String, Object>();
1212   - Map<Long, ScheduleRealInfo> temp0 = new HashMap<Long, ScheduleRealInfo>();
1213   - List<Long> longList0 = new ArrayList<Long>();
1214   - Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>();
1215   - List<Long> longList1 = new ArrayList<Long>();
1216   - String companyName = "", subCompanyName = "";
1217   - for(ScheduleRealInfo schedule : keyMap.get(key)){
1218   - if(schedule.getFcsjActual() == null || schedule.getFcsjActual().trim().length() == 0){
1219   - continue;
1220   - }
1221   - if(schedule.getGsName() != null && companyName.length() == 0)
1222   - companyName = schedule.getGsName();
1223   - if(schedule.getFgsName() != null && subCompanyName.length() == 0)
1224   - subCompanyName = schedule.getFgsName();
1225   - String[] split = schedule.getFcsj().split(":");
1226   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1227   - schedule.setFcsjT(min);
1228   - if(schedule.getXlDir().equals("0")){
1229   - temp0.put(min, schedule);
1230   - longList0.add(min);
1231   - } else {
1232   - temp1.put(min, schedule);
1233   - longList1.add(min);
  1290 + tempMap.put("date", date.substring(5));
  1291 + tempMap.put("line", xlName);
  1292 + List<Long> up1 = new ArrayList<Long>();
  1293 + List<Long> up2 = new ArrayList<Long>();;
  1294 + List<Long> dn1 = new ArrayList<Long>();
  1295 + List<Long> dn2 = new ArrayList<Long>();
  1296 + Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>();
  1297 + Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>();
  1298 + Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>();
  1299 + Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>();
  1300 + for(ScheduleRealInfo s : keyMap.get(xlName)){
  1301 + if(s.getXlDir().equals("0")){
  1302 + up1.add(s.getFcsjT());
  1303 + up2.add(s.getFcsjActualTime());
  1304 + up1Map.put(s.getFcsjT(), s);
  1305 + up2Map.put(s.getFcsjActualTime(), s);
  1306 + } else if(s.getXlDir().equals("1")){
  1307 + dn1.add(s.getFcsjT());
  1308 + dn2.add(s.getFcsjActualTime());
  1309 + dn1Map.put(s.getFcsjT(), s);
  1310 + dn2Map.put(s.getFcsjActualTime(), s);
1234 1311 }
1235 1312 }
1236   -
1237   - if(longList0.size() == 0 && longList1.size() == 0){
1238   - continue;
1239   - }
1240   -
1241   - if(longList0.size() != 0){
1242   - Collections.sort(longList0);
1243   - ScheduleRealInfo shouban0 = temp0.get(longList0.get(0));
1244   - ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1));
1245   - tempMap.put("qdzFirst0", shouban0.getQdzName());
1246   - tempMap.put("jhfcFirst0", shouban0.getFcsj());
1247   - tempMap.put("qdzLast0", moban0.getQdzName());
1248   - tempMap.put("jhfcLast0", moban0.getFcsj());
1249   - if(shouban0.getFcsjActual() != null){
1250   - String[] split = shouban0.getFcsjActual().split(":");
1251   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1252   - long delay = shouban0.getFcsjT() - min;
1253   - tempMap.put("sjfcFirst0", shouban0.getFcsjActual());
1254   - if(delay > 0)
1255   - tempMap.put("delayFirst0", "+" + delay);
1256   - else
1257   - tempMap.put("delayFirst0", delay);
1258   - } else {
1259   - tempMap.put("sjfcFirst0", "/");
1260   - tempMap.put("delayFirst0", "/");
1261   - }
1262   - if(moban0.getFcsjActual() != null){
1263   - String[] split = moban0.getFcsjActual().split(":");
1264   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1265   - long delay = moban0.getFcsjT() - min;
1266   - tempMap.put("sjfcLast0", moban0.getFcsjActual());
1267   - if(delay > 0)
1268   - tempMap.put("delayLast0", "+" + delay);
1269   - else
1270   - tempMap.put("delayLast0", delay);
1271   - } else {
1272   - tempMap.put("sjfcLast0", "/");
1273   - tempMap.put("delayLast0", "/");
1274   - }
1275   - }else{
  1313 + if(up1.size() > 0 && up2.size() > 0){
  1314 + Collections.sort(up1);
  1315 + Collections.sort(up2);
  1316 + ScheduleRealInfo s1 = up1Map.get(up1.get(0));
  1317 + ScheduleRealInfo s2 = up2Map.get(up2.get(0));
  1318 + ScheduleRealInfo s3 = up1Map.get(up1.get(up1.size()-1));
  1319 + ScheduleRealInfo s4 = up2Map.get(up2.get(up2.size()-1));
  1320 + long delayFirst0 = up1.get(0) - up2.get(0);
  1321 + long delayLast0 = up1.get(up1.size()-1) - up2.get(up2.size()-1);
  1322 + tempMap.put("qdzFirst0", s1.getQdzName());
  1323 + tempMap.put("jhfcFirst0", s1.getFcsj());
  1324 + tempMap.put("sjfcFirst0", s2.getFcsjActual());
  1325 + tempMap.put("delayFirst0", delayFirst0>0?"+"+delayFirst0:delayFirst0);
  1326 + tempMap.put("qdzLast0", s3.getQdzName());
  1327 + tempMap.put("jhfcLast0", s3.getFcsj());
  1328 + tempMap.put("sjfcLast0", s4.getFcsjActual());
  1329 + tempMap.put("delayLast0", delayLast0>0?"+"+delayLast0:delayLast0);
  1330 + } else {
1276 1331 tempMap.put("qdzFirst0", "--");
1277 1332 tempMap.put("jhfcFirst0", "/");
1278   - tempMap.put("qdzLast0", "--");
1279   - tempMap.put("jhfcLast0", "/");
1280 1333 tempMap.put("sjfcFirst0", "/");
1281 1334 tempMap.put("delayFirst0", "/");
  1335 + tempMap.put("qdzLast0", "--");
  1336 + tempMap.put("jhfcLast0", "/");
1282 1337 tempMap.put("sjfcLast0", "/");
1283 1338 tempMap.put("delayLast0", "/");
1284 1339 }
1285   -
1286   - if(longList1.size() != 0){
1287   - Collections.sort(longList1);
1288   - ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));
1289   - ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1));
1290   - tempMap.put("qdzFirst1", shouban1.getQdzName());
1291   - tempMap.put("jhfcFirst1", shouban1.getFcsj());
1292   - tempMap.put("qdzLast1", moban1.getQdzName());
1293   - tempMap.put("jhfcLast1", moban1.getFcsj());
1294   - if(shouban1.getFcsjActual() != null){
1295   - String[] split = shouban1.getFcsjActual().split(":");
1296   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1297   - long delay = shouban1.getFcsjT() - min;
1298   - tempMap.put("sjfcFirst1", shouban1.getFcsjActual());
1299   - if(delay > 0)
1300   - tempMap.put("delayFirst1", "+" + delay);
1301   - else
1302   - tempMap.put("delayFirst1", delay);
1303   - } else {
1304   - tempMap.put("sjfcFirst1", "/");
1305   - tempMap.put("delayFirst1", "/");
1306   - }
1307   - if(moban1.getFcsjActual() != null){
1308   - String[] split = moban1.getFcsjActual().split(":");
1309   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1310   - long delay = moban1.getFcsjT() - min;
1311   - tempMap.put("sjfcLast1", moban1.getFcsjActual());
1312   - if(delay > 0)
1313   - tempMap.put("delayLast1", "+" + delay);
1314   - else
1315   - tempMap.put("delayLast1", delay);
1316   - } else {
1317   - tempMap.put("sjfcLast1", "/");
1318   - tempMap.put("delayLast1", "/");
1319   - }
1320   - }else{
  1340 + if(dn1.size() > 0 && dn2.size() > 0){
  1341 + Collections.sort(dn1);
  1342 + Collections.sort(dn2);
  1343 + ScheduleRealInfo s1 = dn1Map.get(dn1.get(0));
  1344 + ScheduleRealInfo s2 = dn2Map.get(dn2.get(0));
  1345 + ScheduleRealInfo s3 = dn1Map.get(dn1.get(dn1.size()-1));
  1346 + ScheduleRealInfo s4 = dn2Map.get(dn2.get(dn2.size()-1));
  1347 + long delayFirst1 = dn1.get(0) - dn2.get(0);
  1348 + long delayLast1 = dn1.get(dn1.size()-1) - dn2.get(dn2.size()-1);
  1349 + tempMap.put("qdzFirst1", s1.getQdzName());
  1350 + tempMap.put("jhfcFirst1", s1.getFcsj());
  1351 + tempMap.put("sjfcFirst1", s2.getFcsjActual());
  1352 + tempMap.put("delayFirst1", delayFirst1>0?"+"+delayFirst1:delayFirst1);
  1353 + tempMap.put("qdzLast1", s3.getQdzName());
  1354 + tempMap.put("jhfcLast1", s3.getFcsj());
  1355 + tempMap.put("sjfcLast1", s4.getFcsjActual());
  1356 + tempMap.put("delayLast1", delayLast1>0?"+"+delayLast1:delayLast1);
  1357 + } else {
1321 1358 tempMap.put("qdzFirst1", "--");
1322 1359 tempMap.put("jhfcFirst1", "/");
1323   - tempMap.put("qdzLast1", "--");
1324   - tempMap.put("jhfcLast1", "/");
1325 1360 tempMap.put("sjfcFirst1", "/");
1326 1361 tempMap.put("delayFirst1", "/");
  1362 + tempMap.put("qdzLast1", "--");
  1363 + tempMap.put("jhfcLast1", "/");
1327 1364 tempMap.put("sjfcLast1", "/");
1328 1365 tempMap.put("delayLast1", "/");
1329 1366 }
1330   -
1331   - tempMap.put("date", date);
1332 1367 tempMap.put("company", companyName);
1333 1368 tempMap.put("subCompany", subCompanyName);
1334   - tempMap.put("line", key);
  1369 + tempMap.put("date", date);
  1370 + tempMap.put("line", xlName);
1335 1371 resList.add(tempMap);
1336 1372 }
1337   -
  1373 +
1338 1374 if(type.equals("export")){
1339 1375 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
1340 1376 sdfSimple = new SimpleDateFormat("yyyyMMdd");
... ... @@ -1357,164 +1393,248 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1357 1393  
1358 1394 @Override
1359 1395 public List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map) {
  1396 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
1360 1397 NumberFormat nf = NumberFormat.getNumberInstance();
1361 1398 nf.setMinimumFractionDigits(2);
  1399 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1362 1400 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1363   - Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
1364 1401  
1365 1402 String company = map.get("company").toString();
1366 1403 String subCompany = map.get("subCompany").toString();
1367 1404 String line = map.get("line").toString();
1368   - String date = map.get("date").toString();
  1405 +// String date = map.get("date").toString();
  1406 + String startDate = map.get("startDate").toString();
  1407 + String endDate = map.get("endDate").toString();
1369 1408 String type = map.get("type").toString();
1370 1409  
1371   - if(date.length() == 0)
1372   - date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
1373   -
1374   - List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
  1410 + if(startDate.length() == 0)
  1411 + startDate = sdf.format(new Date());
  1412 + if(endDate.length() == 0)
  1413 + endDate = sdf.format(new Date());
1375 1414  
1376   - for(ScheduleRealInfo schedule : list){
1377   - if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out") || schedule.getBcType().equals("ldks"))
1378   - continue;
1379   - if(schedule.getStatus() == -1){
1380   - continue;
1381   - }
1382   - String key = schedule.getXlName();
1383   - if(key == null || key.trim().length() == 0)
1384   - continue;
1385   - if(!keyMap.containsKey(key))
1386   - keyMap.put(key, new ArrayList<ScheduleRealInfo>());
1387   - keyMap.get(key).add(schedule);
  1415 + String dates = "";
  1416 + if(startDate.equals(endDate)){
  1417 + String[] split = startDate.split("-");
  1418 + dates = split[0]+"年"+split[1]+"月"+split[2]+"日";
  1419 + } else {
  1420 + String[] split1 = startDate.split("-");
  1421 + String[] split2 = endDate.split("-");
  1422 + dates = split1[0]+"年"+split1[1]+"月"+split1[2]+"日--"
  1423 + +split2[0]+"年"+split2[1]+"月"+split2[2]+"日";
1388 1424 }
1389   - for(String key : keyMap.keySet()){
1390   - Map<String, Object> tempMap = new HashMap<String, Object>();
1391   - Map<String, Object> m = new HashMap<String, Object>();
1392   - Map<Long, ScheduleRealInfo> temp0 = new HashMap<Long, ScheduleRealInfo>();
1393   - List<Long> longList0 = new ArrayList<Long>();
1394   - Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>();
1395   - List<Long> longList1 = new ArrayList<Long>();
1396   - String companyName = "", subCompanyName = "";
1397   - for(ScheduleRealInfo schedule : keyMap.get(key)){
1398   - if(schedule.getFcsjActual() == null || schedule.getFcsjActual().trim().length() == 0){
1399   - continue;
1400   - }
1401   - if(schedule.getGsName() != null && companyName.length() == 0)
1402   - companyName = schedule.getGsName();
1403   - if(schedule.getFgsName() != null && subCompanyName.length() == 0)
1404   - subCompanyName = schedule.getFgsName();
1405   - String[] split = schedule.getFcsj().split(":");
1406   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1407   - schedule.setFcsjT(min);
1408   - if(schedule.getXlDir().equals("0")){
1409   - temp0.put(min, schedule);
1410   - longList0.add(min);
1411   - } else {
1412   - temp1.put(min, schedule);
1413   - longList1.add(min);
  1425 +
  1426 + try {
  1427 + String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
  1428 + + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
  1429 + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"
  1430 + + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  1431 + if(line.length() != 0)
  1432 + sql += " and xl_bm = '"+line+"'";
  1433 + if(company.length() != 0)
  1434 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  1435 +
  1436 + list = jdbcTemplate.query(sql,
  1437 + new RowMapper<ScheduleRealInfo>(){
  1438 + @Override
  1439 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  1440 + ScheduleRealInfo schedule = new ScheduleRealInfo();
  1441 + schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  1442 + schedule.setRealExecDate(rs.getString("real_exec_date"));
  1443 + schedule.setXlName(rs.getString("xl_name"));
  1444 + schedule.setFcsj(rs.getString("fcsj"));
  1445 + schedule.setFcsjActual(rs.getString("fcsj_actual"));
  1446 + schedule.setZdsj(rs.getString("zdsj"));
  1447 + schedule.setZdsjActual(rs.getString("zdsj_actual"));
  1448 + schedule.setQdzName(rs.getString("qdz_name"));
  1449 + schedule.setZdzName(rs.getString("zdz_name"));
  1450 + schedule.setXlDir(rs.getString("xl_dir"));
  1451 + schedule.setStatus(rs.getInt("status"));
  1452 + schedule.setGsName(rs.getString("gs_name"));
  1453 + schedule.setFgsName(rs.getString("fgs_name"));
  1454 +
  1455 + int startOpt = 0;
  1456 + if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){
  1457 + String[] split = rs.getString("start_opt").split(":");
  1458 + startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  1459 + }
  1460 +
  1461 + if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
  1462 + schedule.setFcsjActual(null);
  1463 + }
  1464 + if(schedule.getZdsjActual() != null && schedule.getZdsjActual().trim().length() == 0){
  1465 + schedule.setZdsjActual(null);
  1466 + }
  1467 + if(schedule.getFcsj() != null){
  1468 + String[] split = schedule.getFcsj().split(":");
  1469 + int fcsj = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]);
  1470 + if(fcsj < startOpt)
  1471 + fcsj += 1440;
  1472 + schedule.setFcsjT((long)fcsj);
  1473 + }
  1474 + if(schedule.getFcsjActual() != null){
  1475 + String[] split = schedule.getFcsjActual().split(":");
  1476 + int fcsjA = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]);
  1477 + if(fcsjA < startOpt || !schedule.getRealExecDate().equals(schedule.getScheduleDateStr()))
  1478 + fcsjA += 1440;
  1479 + schedule.setFcsjActualTime((long)fcsjA);
  1480 + }
  1481 +
  1482 + return schedule;
1414 1483 }
1415   - }
  1484 + });
1416 1485  
1417   - if(longList0.size() == 0 && longList1.size() == 0){
1418   - continue;
  1486 + } catch (Exception e) {
  1487 + // TODO: handle exception
  1488 + e.printStackTrace();
  1489 + }
  1490 +
  1491 + Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>();
  1492 + String companyName = "", subCompanyName = "";
  1493 +
  1494 + for(ScheduleRealInfo s : list){
  1495 + String xlName = s.getXlName();
  1496 + String date = s.getScheduleDateStr();
  1497 + if(!keyMap.containsKey(xlName))
  1498 + keyMap.put(xlName, new HashMap<String, List<ScheduleRealInfo>>());
  1499 + if(!keyMap.get(xlName).containsKey(date))
  1500 + keyMap.get(xlName).put(date, new ArrayList<ScheduleRealInfo>());
  1501 + keyMap.get(xlName).get(date).add(s);
  1502 + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0)
  1503 + companyName = s.getGsName();
  1504 + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0)
  1505 + subCompanyName = s.getFgsName();
  1506 + }
  1507 +
  1508 + for(String xlName : keyMap.keySet()){
  1509 + List<Map<String, Object>> tempList = new ArrayList<Map<String,Object>>();
  1510 + Map<String, Object> tempMap = new HashMap<String, Object>();
  1511 + Map<Long, String> dateMap = new HashMap<Long, String>();
  1512 + List<Long> Longs = new ArrayList<Long>();
  1513 + int jhbc = 0, sjbc = 0;
  1514 + for(String date : keyMap.get(xlName).keySet()){
  1515 + String[] split = date.split("-");
  1516 + long l = Long.valueOf(split[0])*10000 + Long.valueOf(split[1])*100 + Long.valueOf(split[2]);
  1517 + dateMap.put(l, date);
  1518 + Longs.add(l);
1419 1519 }
1420   - int jhbc = 0;
1421   - int sjbc = 0;
1422   -
1423   - if(longList0.size() != 0){
1424   - Collections.sort(longList0);
1425   - ScheduleRealInfo shouban0 = temp0.get(longList0.get(0));
1426   - ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1));
1427   - if(shouban0.getFcsjActual() != null){
1428   - jhbc++;
1429   - String[] split = shouban0.getFcsjActual().split(":");
1430   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1431   - long delay = shouban0.getFcsjT() - min;
1432   - if(delay >= -3 && delay <= 1){
1433   - sjbc++;
  1520 + Collections.sort(Longs);
  1521 + for(long l : Longs){
  1522 + String date = dateMap.get(l);
  1523 + Map<String, Object> temp = new HashMap<String, Object>();
  1524 + temp.put("date", date.substring(5));
  1525 + temp.put("line", xlName);
  1526 + List<Long> up1 = new ArrayList<Long>();
  1527 + List<Long> up2 = new ArrayList<Long>();;
  1528 + List<Long> dn1 = new ArrayList<Long>();
  1529 + List<Long> dn2 = new ArrayList<Long>();
  1530 + Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>();
  1531 + Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>();
  1532 + Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>();
  1533 + Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>();
  1534 + for(ScheduleRealInfo s : keyMap.get(xlName).get(date)){
  1535 + if(s.getXlDir().equals("0")){
  1536 + up1.add(s.getFcsjT());
  1537 + up2.add(s.getFcsjActualTime());
  1538 + up1Map.put(s.getFcsjT(), s);
  1539 + up2Map.put(s.getFcsjActualTime(), s);
  1540 + } else if(s.getXlDir().equals("1")){
  1541 + dn1.add(s.getFcsjT());
  1542 + dn2.add(s.getFcsjActualTime());
  1543 + dn1Map.put(s.getFcsjT(), s);
  1544 + dn2Map.put(s.getFcsjActualTime(), s);
1434 1545 }
1435   - m.put("qdzFirst0", shouban0.getQdzName());
1436   - m.put("jhfcFirst0", shouban0.getFcsj());
1437   - m.put("sjfcFirst0", shouban0.getFcsjActual());
1438   - m.put("delayFirst0", delay>0?"+"+delay:delay);
1439 1546 }
1440   -
1441   - if(moban0.getFcsjActual() != null){
1442   - jhbc++;
1443   - String[] split = moban0.getFcsjActual().split(":");
1444   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1445   - long delay = moban0.getFcsjT() - min;
1446   - if(delay >= -3 && delay <= 1){
  1547 + if(up1.size() > 0 && up2.size() > 0){
  1548 + Collections.sort(up1);
  1549 + Collections.sort(up2);
  1550 + ScheduleRealInfo s1 = up1Map.get(up1.get(0));
  1551 + ScheduleRealInfo s2 = up2Map.get(up2.get(0));
  1552 + ScheduleRealInfo s3 = up1Map.get(up1.get(up1.size()-1));
  1553 + ScheduleRealInfo s4 = up2Map.get(up2.get(up2.size()-1));
  1554 + long delayFirst0 = up1.get(0) - up2.get(0);
  1555 + long delayLast0 = up1.get(up1.size()-1) - up2.get(up2.size()-1);
  1556 + temp.put("qdzFirst0", s1.getQdzName());
  1557 + temp.put("jhfcFirst0", s1.getFcsj());
  1558 + temp.put("sjfcFirst0", s2.getFcsjActual());
  1559 + temp.put("delayFirst0", delayFirst0>0?"+"+delayFirst0:delayFirst0);
  1560 + temp.put("qdzLast0", s3.getQdzName());
  1561 + temp.put("jhfcLast0", s3.getFcsj());
  1562 + temp.put("sjfcLast0", s4.getFcsjActual());
  1563 + temp.put("delayLast0", delayLast0>0?"+"+delayLast0:delayLast0);
  1564 + jhbc += 2;
  1565 + if(delayFirst0 <= 1l && delayFirst0 >= -3l)
1447 1566 sjbc++;
1448   - }
1449   - m.put("qdzLast0", moban0.getQdzName());
1450   - m.put("jhfcLast0", moban0.getFcsj());
1451   - m.put("sjfcLast0", moban0.getFcsjActual());
1452   - m.put("delayLast0", delay>0?"+"+delay:delay);
1453   - }
1454   - } else {
1455   - m.put("qdzFirst0", "--");
1456   - m.put("jhfcFirst0", "/");
1457   - m.put("sjfcFirst0", "/");
1458   - m.put("delayFirst0", "/");
1459   - m.put("qdzLast0", "--");
1460   - m.put("jhfcLast0", "/");
1461   - m.put("sjfcLast0", "/");
1462   - m.put("delayLast0", "/");
1463   - }
1464   -
1465   - if(longList1.size() != 0){
1466   - Collections.sort(longList1);
1467   - ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));
1468   - ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1));
1469   - if(shouban1.getFcsjActual() != null){
1470   - jhbc++;
1471   - String[] split = shouban1.getFcsjActual().split(":");
1472   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1473   - long delay = shouban1.getFcsjT() - min;
1474   - if(delay >= -3 && delay <= 1){
  1567 + if(delayLast0 <= 1l && delayLast0 >= -3l)
1475 1568 sjbc++;
1476   - }
1477   - m.put("qdzFirst1", shouban1.getQdzName());
1478   - m.put("jhfcFirst1", shouban1.getFcsj());
1479   - m.put("sjfcFirst1", shouban1.getFcsjActual());
1480   - m.put("delayFirst1", delay>0?"+"+delay:delay);
  1569 + } else {
  1570 + temp.put("qdzFirst0", "--");
  1571 + temp.put("jhfcFirst0", "/");
  1572 + temp.put("sjfcFirst0", "/");
  1573 + temp.put("delayFirst0", "/");
  1574 + temp.put("qdzLast0", "--");
  1575 + temp.put("jhfcLast0", "/");
  1576 + temp.put("sjfcLast0", "/");
  1577 + temp.put("delayLast0", "/");
1481 1578 }
1482   -
1483   - if(moban1.getFcsjActual() != null){
1484   - jhbc++;
1485   - String[] split = moban1.getFcsjActual().split(":");
1486   - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
1487   - long delay = moban1.getFcsjT() - min;
1488   - if(delay >= -3 && delay <= 1){
  1579 + if(dn1.size() > 0 && dn2.size() > 0){
  1580 + Collections.sort(dn1);
  1581 + Collections.sort(dn2);
  1582 + ScheduleRealInfo s1 = dn1Map.get(dn1.get(0));
  1583 + ScheduleRealInfo s2 = dn2Map.get(dn2.get(0));
  1584 + ScheduleRealInfo s3 = dn1Map.get(dn1.get(dn1.size()-1));
  1585 + ScheduleRealInfo s4 = dn2Map.get(dn2.get(dn2.size()-1));
  1586 + long delayFirst1 = dn1.get(0) - dn2.get(0);
  1587 + long delayLast1 = dn1.get(dn1.size()-1) - dn2.get(dn2.size()-1);
  1588 + temp.put("qdzFirst1", s1.getQdzName());
  1589 + temp.put("jhfcFirst1", s1.getFcsj());
  1590 + temp.put("sjfcFirst1", s2.getFcsjActual());
  1591 + temp.put("delayFirst1", delayFirst1>0?"+"+delayFirst1:delayFirst1);
  1592 + temp.put("qdzLast1", s3.getQdzName());
  1593 + temp.put("jhfcLast1", s3.getFcsj());
  1594 + temp.put("sjfcLast1", s4.getFcsjActual());
  1595 + temp.put("delayLast1", delayLast1>0?"+"+delayLast1:delayLast1);
  1596 + jhbc += 2;
  1597 + if(delayFirst1 <= 1l && delayFirst1 >= -3l)
1489 1598 sjbc++;
1490   - }
1491   - m.put("qdzLast1", moban1.getQdzName());
1492   - m.put("jhfcLast1", moban1.getFcsj());
1493   - m.put("sjfcLast1", moban1.getFcsjActual());
1494   - m.put("delayLast1", delay>0?"+"+delay:delay);
  1599 + if(delayLast1 <= 1l && delayLast1 >= -3l)
  1600 + sjbc++;
  1601 + } else {
  1602 + temp.put("qdzFirst1", "--");
  1603 + temp.put("jhfcFirst1", "/");
  1604 + temp.put("sjfcFirst1", "/");
  1605 + temp.put("delayFirst1", "/");
  1606 + temp.put("qdzLast1", "--");
  1607 + temp.put("jhfcLast1", "/");
  1608 + temp.put("sjfcLast1", "/");
  1609 + temp.put("delayLast1", "/");
1495 1610 }
1496   - } else {
1497   - m.put("qdzFirst1", "--");
1498   - m.put("jhfcFirst1", "/");
1499   - m.put("sjfcFirst1", "/");
1500   - m.put("delayFirst1", "/");
1501   - m.put("qdzLast1", "--");
1502   - m.put("jhfcLast1", "/");
1503   - m.put("sjfcLast1", "/");
1504   - m.put("delayLast1", "/");
  1611 + tempList.add(temp);
1505 1612 }
1506   -
1507   - m.put("line", key);
1508   - tempMap.put("map", m);
  1613 + tempMap.put("map", tempList);
  1614 + tempMap.put("company", companyName);
  1615 + tempMap.put("subCompany", subCompanyName);
  1616 + tempMap.put("date", dates);
  1617 + tempMap.put("line", xlName);
1509 1618 tempMap.put("jhbc", jhbc);
1510 1619 tempMap.put("sjbc", sjbc);
1511 1620 tempMap.put("zdl", nf.format((float) sjbc / jhbc *100) + "%");
1512   - tempMap.put("date", date);
1513   - tempMap.put("company", companyName);
1514   - tempMap.put("subCompany", subCompanyName);
1515   - tempMap.put("line", key);
1516 1621 resList.add(tempMap);
1517 1622 }
  1623 +
  1624 + Map<String, Object> tempMap = new HashMap<String, Object>();
  1625 + if(resList.size() > 0){
  1626 + tempMap.put("date", "合计汇总");
  1627 + int jhbc = 0, sjbc = 0;
  1628 + for(Map<String, Object> m : resList){
  1629 + jhbc += Integer.valueOf(m.get("jhbc").toString());
  1630 + sjbc += Integer.valueOf(m.get("sjbc").toString());
  1631 + }
  1632 + tempMap.put("jhbc", jhbc);
  1633 + tempMap.put("sjbc", sjbc);
  1634 + tempMap.put("zdl", nf.format((float) sjbc / jhbc *100) + "%");
  1635 + if(!type.equals("export"))
  1636 + resList.add(tempMap);
  1637 + }
1518 1638  
1519 1639 if(type.equals("export")){
1520 1640 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
... ... @@ -1525,8 +1645,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1525 1645 try {
1526 1646 listI.add(resList.iterator());
1527 1647 String path = this.getClass().getResource("/").getPath()+"static/pages/forms/";
1528   - ee.excelReplace(listI, new Object[] { m }, path+"mould/firstAndLastBus_sum.xls",
1529   - path+"export/线路首末班准点率" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  1648 + ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_sum.xls",
  1649 + path+"export/线路首末班准点率" + sdfSimple.format(sdfMonth.parse(startDate)) +
  1650 + (startDate.equals(endDate)?"":"-"+sdfSimple.format(sdfMonth.parse(endDate))) + ".xls");
1530 1651 } catch (Exception e) {
1531 1652 // TODO: handle exception
1532 1653 e.printStackTrace();
... ...
src/main/java/com/bsth/service/traffic/SKBUploadLoggerService.java 0 → 100644
  1 +package com.bsth.service.traffic;
  2 +
  3 +import com.bsth.entity.traffic.SKBUploadLogger;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +
  7 +/**
  8 + * 时刻模板上传日志
  9 + */
  10 +public interface SKBUploadLoggerService extends BaseService<SKBUploadLogger,Integer> {
  11 +
  12 +}
... ...
src/main/java/com/bsth/service/traffic/YgcBasicDataService.java 0 → 100644
  1 +package com.bsth.service.traffic;
  2 +
  3 +/**
  4 + * 运管处基础数据操作接口类
  5 + * Created by zlz on 2017/6/16.
  6 + */
  7 +public interface YgcBasicDataService {
  8 + /**
  9 + * 更新运管处基础数据
  10 + */
  11 + void updateYgcBasicData();
  12 +}
  13 +
... ...
src/main/java/com/bsth/service/traffic/impl/SKBUploadLoggerServiceImpl.java 0 → 100644
  1 +package com.bsth.service.traffic.impl;
  2 +
  3 +import com.bsth.entity.traffic.SKBUploadLogger;
  4 +import com.bsth.service.impl.BaseServiceImpl;
  5 +import com.bsth.service.traffic.SKBUploadLoggerService;
  6 +import org.slf4j.Logger;
  7 +import org.slf4j.LoggerFactory;
  8 +import org.springframework.stereotype.Service;
  9 +
  10 +/**
  11 + *
  12 + * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类)
  13 + *
  14 + * @Extends : BaseService
  15 + *
  16 + * @Description:
  17 + *
  18 + * @Author bsth@zq
  19 + *
  20 + * @Date 2016年10月28日 上午9:21:17
  21 + *
  22 + * @Version 公交调度系统BS版 0.1
  23 + *
  24 + */
  25 +
  26 +@Service
  27 +public class SKBUploadLoggerServiceImpl extends BaseServiceImpl<SKBUploadLogger,Integer> implements SKBUploadLoggerService{
  28 +
  29 + Logger logger = LoggerFactory.getLogger(this.getClass());
  30 +
  31 +}
... ...
src/main/java/com/bsth/service/traffic/impl/YgcBasicDataServiceImpl.java 0 → 100644
  1 +package com.bsth.service.traffic.impl;
  2 +
  3 +import com.bsth.service.impl.TrafficManageServiceImpl;
  4 +import com.bsth.service.traffic.YgcBasicDataService;
  5 +import com.bsth.util.db.DBUtils_oldSystem;
  6 +import org.apache.axiom.om.*;
  7 +import org.apache.axis2.addressing.EndpointReference;
  8 +import org.apache.axis2.client.Options;
  9 +import org.apache.axis2.client.ServiceClient;
  10 +import org.apache.commons.codec.digest.DigestUtils;
  11 +import org.slf4j.Logger;
  12 +import org.slf4j.LoggerFactory;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.jdbc.core.BatchPreparedStatementSetter;
  15 +import org.springframework.jdbc.core.JdbcTemplate;
  16 +import org.springframework.stereotype.Service;
  17 +import org.w3c.dom.Document;
  18 +import org.w3c.dom.NodeList;
  19 +
  20 +import javax.activation.DataHandler;
  21 +import javax.xml.parsers.DocumentBuilder;
  22 +import javax.xml.parsers.DocumentBuilderFactory;
  23 +import java.io.*;
  24 +import java.sql.PreparedStatement;
  25 +import java.sql.SQLException;
  26 +import java.util.ArrayList;
  27 +import java.util.HashMap;
  28 +import java.util.List;
  29 +import java.util.zip.ZipEntry;
  30 +import java.util.zip.ZipFile;
  31 +import java.util.zip.ZipInputStream;
  32 +
  33 +/**
  34 + * 运管处基础数据操作类
  35 + * Created by zq on 2017/6/15.
  36 + */
  37 +@Service
  38 +public class YgcBasicDataServiceImpl implements YgcBasicDataService{
  39 + Logger logger = LoggerFactory.getLogger(TrafficManageServiceImpl.class);
  40 +
  41 + @Autowired
  42 + JdbcTemplate jdbcTemplate;
  43 +
  44 + private static String IP = "218.242.195.76:9091";
  45 + private static String targetEndpoint = "http://" + IP +"/ygc.TransManager.Basicdown?wsdl";
  46 + private static String namespace = "http://service.shygc.com";
  47 + private static String userName = "admin";
  48 + private static String passWord = "000000";
  49 + private static EndpointReference targetEPR;
  50 + {
  51 + try {
  52 + targetEPR = new EndpointReference(targetEndpoint);
  53 + } catch (Exception e) {
  54 + e.printStackTrace();
  55 + }
  56 + }
  57 +
  58 + /**
  59 + * 更新运管处基础数据
  60 + */
  61 + public void updateYgcBasicData(){
  62 + String saveFile = "ygcBasicData.zip";
  63 + String flag = "failure";
  64 + try {
  65 + // 调用接口下载基础数据
  66 + if(download(userName, DigestUtils.md5Hex(passWord), saveFile)){
  67 + // 读取基础数据zip
  68 + StringBuffer sb = readZipFile(saveFile);
  69 + // 解析xml
  70 + List<HashMap<String,String>> result = parseXml(sb);
  71 + // 插入数据库
  72 + if(result != null && result.size() > 0){
  73 + insertRecord(result);
  74 + }
  75 + }
  76 + flag = "success";
  77 + }catch (Exception e){
  78 + e.printStackTrace();
  79 + }
  80 + finally {
  81 + // 删除文件
  82 + File fill = new File(saveFile);
  83 + logger.info("updateYgcBasicData:"+fill.getAbsolutePath());
  84 + logger.info("updateYgcBasicData:"+flag);
  85 + if(fill.exists()){
  86 + fill.delete();
  87 + }
  88 + }
  89 + }
  90 + /**
  91 + * 下载基础数据,并生成rar文件
  92 + * @param userName
  93 + * @param password
  94 + * @param saveFile
  95 + * @return
  96 + */
  97 + private boolean download(String userName, String password, String saveFile)
  98 + {
  99 + try
  100 + {
  101 + OMElement data = buildDownloadEnvelope(userName, password);
  102 + ServiceClient sender = new ServiceClient();
  103 + Options options = sender.getOptions();
  104 + options.setProperty("SO_TIMEOUT", Integer.valueOf(1800000));
  105 + options.setTo(targetEPR);
  106 + sender.setOptions(options);
  107 + System.out.println("The data in method download: " + data);
  108 + data.build();
  109 + OMElement ome = sender.sendReceive(data);
  110 +
  111 + OMText binaryNode = (OMText)ome.getFirstOMChild();
  112 + binaryNode.setOptimize(true);
  113 + DataHandler actualDH = (DataHandler)binaryNode.getDataHandler();
  114 + FileOutputStream imageOutStream = new FileOutputStream(saveFile);
  115 + InputStream is = actualDH.getInputStream();
  116 + int read ;
  117 + byte[] buffer = new byte[1024];
  118 + while ((read = is.read(buffer)) != -1) {
  119 + imageOutStream.write(buffer, 0, read);
  120 + }
  121 + return true;
  122 + } catch (Exception e) {
  123 + e.printStackTrace();
  124 + }return false;
  125 + }
  126 +
  127 + /**
  128 + * 构建webservice接口参数
  129 + * @param userName
  130 + * @param password
  131 + * @return
  132 + */
  133 + private OMElement buildDownloadEnvelope(String userName, String password)
  134 + {
  135 + OMFactory fac = OMAbstractFactory.getOMFactory();
  136 + OMNamespace omNs = fac.createOMNamespace(namespace,
  137 + "ser");
  138 + OMElement data = fac.createOMElement("downloadAllDataFile", omNs);
  139 + OMElement _userName = fac.createOMElement("userName", omNs);
  140 + _userName.setText(userName);
  141 + OMElement _passWord = fac.createOMElement("passWord", omNs);
  142 + _passWord.setText(String.valueOf(password));
  143 +
  144 + data.addChild(_userName);
  145 + data.addChild(_passWord);
  146 +
  147 + OMElement soap = fac.createOMElement("downloadAllDataFile", omNs);
  148 + soap.addChild(data);
  149 + return soap;
  150 + }
  151 +
  152 + /**
  153 + * 读取zip文件的内容
  154 + * @param file
  155 + * @return
  156 + * @throws Exception
  157 + */
  158 + public StringBuffer readZipFile(String file) throws Exception {
  159 + ZipFile zf = new ZipFile(file);
  160 + InputStream in = new BufferedInputStream(new FileInputStream(file));
  161 + ZipInputStream zin = new ZipInputStream(in);
  162 + ZipEntry ze;
  163 + StringBuffer sb = new StringBuffer();
  164 + while ((ze = zin.getNextEntry()) != null) {
  165 + System.out.print(ze);
  166 + if (ze.isDirectory()) {
  167 + } else {
  168 + System.err.println("file - " + ze.getName() + " : "
  169 + + ze.getSize() + " bytes");
  170 + long size = ze.getSize();
  171 + if (size > 0) {
  172 + BufferedReader br = new BufferedReader(
  173 + new InputStreamReader(zf.getInputStream(ze),"GBK"));
  174 + String line;
  175 + boolean addFlag = false;
  176 + while ((line = br.readLine()) != null) {
  177 + if(line.indexOf("BusLineList") != -1){
  178 + addFlag = true;
  179 + }
  180 + if(addFlag){
  181 + sb.append(line);
  182 + }
  183 +
  184 + if(line.indexOf("/BusLineList") != -1){
  185 + break;
  186 + }
  187 + }
  188 + br.close();
  189 + }
  190 + }
  191 + }
  192 + zin.closeEntry();
  193 + return sb;
  194 + }
  195 +
  196 + /**
  197 + * 解析xml
  198 + * @param sb
  199 + */
  200 + private List<HashMap<String,String>> parseXml(StringBuffer sb){
  201 + List<HashMap<String,String>> list = new ArrayList<>();
  202 + HashMap<String,String> map;
  203 + try {
  204 + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  205 + DocumentBuilder builder = factory.newDocumentBuilder();
  206 + Document doc = builder.parse(new ByteArrayInputStream(sb.toString().getBytes()));
  207 + NodeList nl = doc.getElementsByTagName("BusLine");
  208 + String lineName; //线路名称
  209 + String lineId; // 线路ID
  210 + String abbreviation ; // 公司名称
  211 + String ddfs ; // 调度方式
  212 + String lineStandardCode; // 上海市线路编码
  213 + String parentUnitName ; // 总公司
  214 + for (int i = 0; i < nl.getLength(); i++) {
  215 + parentUnitName = doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild() == null ?"":
  216 + doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild().getNodeValue();
  217 + if(parentUnitName.indexOf("浦东") != -1){// 只查找浦东的数据
  218 + lineName = doc.getElementsByTagName("LineName").item(i).getFirstChild() == null ?"":
  219 + doc.getElementsByTagName("LineName").item(i).getFirstChild().getNodeValue();
  220 + lineId = doc.getElementsByTagName("LineId").item(i).getFirstChild() == null ?"":
  221 + doc.getElementsByTagName("LineId").item(i).getFirstChild().getNodeValue();
  222 + abbreviation = doc.getElementsByTagName("Abbreviation").item(i).getFirstChild() == null ?"":
  223 + doc.getElementsByTagName("Abbreviation").item(i).getFirstChild().getNodeValue();
  224 + ddfs = doc.getElementsByTagName("DDFS").item(i).getFirstChild() == null ?"":
  225 + doc.getElementsByTagName("DDFS").item(i).getFirstChild().getNodeValue();
  226 + lineStandardCode = doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild() == null ?"":
  227 + doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild().getNodeValue();
  228 + map = new HashMap<>();
  229 + map.put("lineName",lineName);
  230 + map.put("lineId",lineId);
  231 + map.put("abbreviation",abbreviation);
  232 + map.put("ddfs",ddfs);
  233 + map.put("lineStandardCode",lineStandardCode);
  234 + list.add(map);
  235 + }
  236 + }
  237 + }catch (Exception e){
  238 + e.printStackTrace();;
  239 + }
  240 + return list;
  241 + }
  242 +
  243 + /**
  244 + * 批量插入用法
  245 + * @param list
  246 + */
  247 + public boolean insertRecord(List<HashMap<String,String>> list)
  248 + {
  249 + boolean flag = false;
  250 + final List<HashMap<String,String>> tempList=list;
  251 + String sql="INSERT INTO JJWGPS_T_SHSXLFILE(XLID,SHSXLBM,XLMC,GSMC,DDFS,CREATETIME,XLMC_ALL) VALUES (?,?,?,?,?,SYSDATE,?)";
  252 + jdbcTemplate = new JdbcTemplate(DBUtils_oldSystem.getDataSource());
  253 + jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter()
  254 + {
  255 + public void setValues(PreparedStatement ps, int i)throws SQLException
  256 + {
  257 + String lineId =tempList.get(i).get("lineId");
  258 + String lineStandardCode =tempList.get(i).get("lineStandardCode");
  259 + String lineName =tempList.get(i).get("lineName");
  260 + String abbreviation =tempList.get(i).get("abbreviation");
  261 + String ddfs =tempList.get(i).get("ddfs");
  262 + String lineNameAll = lineName;
  263 + if(ddfs.equals("2")){
  264 + lineNameAll = lineName+"区间(走向部分在全程线路之外)";
  265 + }else if(ddfs.equals("7")){
  266 + lineNameAll = lineName+"区间(走向在全程线路之内)";
  267 + }
  268 + ps.setString(1, lineId);
  269 + ps.setString(2, lineStandardCode);
  270 + ps.setString(3, lineName);
  271 + ps.setString(4, abbreviation);
  272 + ps.setString(5, ddfs);
  273 + ps.setString(6, lineNameAll);
  274 + }
  275 + public int getBatchSize()
  276 + {
  277 + return tempList.size();
  278 + }
  279 + });
  280 + flag = true;
  281 + return flag;
  282 + }
  283 +}
... ...
src/main/resources/datatools/ktrs/legecy/scheduleRuleDataInput_insertupdate.ktr 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x6392;&#x73ed;&#x89c4;&#x5219;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</name>
  5 + <description/>
  6 + <extended_description/>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + <parameter>
  13 + <name>erroroutputdir</name>
  14 + <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;bsth_project&#x2f;bsth_control_etl&#x2f;&#x5bfc;&#x5165;&#x5bfc;&#x51fa;1</default_value>
  15 + <description>ktr step&#x914d;&#x7f6e;&#x7684;&#x9519;&#x8bef;&#x8f93;&#x51fa;&#x76ee;&#x5f55;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>filepath</name>
  19 + <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;bsth_project&#x2f;bsth_control_etl&#x2f;&#x5bfc;&#x5165;&#x5bfc;&#x51fa;1&#x2f;&#x6392;&#x7248;&#x89c4;&#x5219;&#x4fe1;&#x606f;.xls</default_value>
  20 + <description>&#x5f85;&#x5904;&#x7406;&#x5bfc;&#x5165;&#x7684;excel&#x6587;&#x4ef6;</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&#x2f;01&#x2f;09 10&#x3a;10&#x3a;36.915</created_date>
  81 + <modified_user>-</modified_user>
  82 + <modified_date>2017&#x2f;01&#x2f;09 10&#x3a;10&#x3a;36.915</modified_date>
  83 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  84 + <is_key_private>N</is_key_private>
  85 + </info>
  86 + <notepads>
  87 + </notepads>
  88 + <connection>
  89 + <name>192.168.168.1_jwgl_dw</name>
  90 + <server>192.168.168.1</server>
  91 + <type>ORACLE</type>
  92 + <access>Native</access>
  93 + <database>orcl</database>
  94 + <port>1521</port>
  95 + <username>jwgl_dw</username>
  96 + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password>
  97 + <servername/>
  98 + <data_tablespace/>
  99 + <index_tablespace/>
  100 + <attributes>
  101 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  102 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  103 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  104 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  105 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  106 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  107 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  108 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  109 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  110 + </attributes>
  111 + </connection>
  112 + <connection>
  113 + <name>bus_control_variable</name>
  114 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  115 + <type>MYSQL</type>
  116 + <access>Native</access>
  117 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  118 + <port>3306</port>
  119 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  120 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  121 + <servername/>
  122 + <data_tablespace/>
  123 + <index_tablespace/>
  124 + <attributes>
  125 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  126 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  127 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  128 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  129 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  130 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  131 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  132 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  133 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  134 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  135 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  136 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  137 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  138 + </attributes>
  139 + </connection>
  140 + <connection>
  141 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  142 + <server>localhost</server>
  143 + <type>MYSQL</type>
  144 + <access>Native</access>
  145 + <database>control</database>
  146 + <port>3306</port>
  147 + <username>root</username>
  148 + <password>Encrypted </password>
  149 + <servername/>
  150 + <data_tablespace/>
  151 + <index_tablespace/>
  152 + <attributes>
  153 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  154 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  155 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  156 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  157 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  158 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  159 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  160 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  161 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  162 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  163 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  164 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  165 + </attributes>
  166 + </connection>
  167 + <connection>
  168 + <name>bus_control_&#x672c;&#x673a;</name>
  169 + <server>localhost</server>
  170 + <type>MYSQL</type>
  171 + <access>Native</access>
  172 + <database>control</database>
  173 + <port>3306</port>
  174 + <username>root</username>
  175 + <password>Encrypted </password>
  176 + <servername/>
  177 + <data_tablespace/>
  178 + <index_tablespace/>
  179 + <attributes>
  180 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  181 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  182 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  183 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  184 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  185 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  186 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  187 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  188 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  189 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  190 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  191 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  192 + </attributes>
  193 + </connection>
  194 + <connection>
  195 + <name>xlab_mysql_youle</name>
  196 + <server>101.231.124.8</server>
  197 + <type>MYSQL</type>
  198 + <access>Native</access>
  199 + <database>xlab_youle</database>
  200 + <port>45687</port>
  201 + <username>xlab-youle</username>
  202 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  203 + <servername/>
  204 + <data_tablespace/>
  205 + <index_tablespace/>
  206 + <attributes>
  207 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  208 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  209 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  210 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  211 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  212 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  213 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  214 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  215 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  216 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  217 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  218 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  219 + </attributes>
  220 + </connection>
  221 + <connection>
  222 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  223 + <server>localhost</server>
  224 + <type>MYSQL</type>
  225 + <access>Native</access>
  226 + <database>xlab_youle</database>
  227 + <port>3306</port>
  228 + <username>root</username>
  229 + <password>Encrypted </password>
  230 + <servername/>
  231 + <data_tablespace/>
  232 + <index_tablespace/>
  233 + <attributes>
  234 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  235 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  236 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  237 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  238 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  239 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  240 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  241 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  242 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  243 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  244 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  245 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  246 + </attributes>
  247 + </connection>
  248 + <connection>
  249 + <name>xlab_youle</name>
  250 + <server/>
  251 + <type>MYSQL</type>
  252 + <access>JNDI</access>
  253 + <database>xlab_youle</database>
  254 + <port>1521</port>
  255 + <username/>
  256 + <password>Encrypted </password>
  257 + <servername/>
  258 + <data_tablespace/>
  259 + <index_tablespace/>
  260 + <attributes>
  261 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  262 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  263 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  264 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  265 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  266 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  267 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  268 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  269 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  270 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  271 + </attributes>
  272 + </connection>
  273 + <order>
  274 + <hop> <from>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</from><to>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</to><enabled>Y</enabled> </hop>
  275 + <hop> <from>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</from><to>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</to><enabled>Y</enabled> </hop>
  276 + <hop> <from>&#x62c6;&#x5206;&#x8def;&#x724c;&#x8303;&#x56f4;</from><to>&#x8def;&#x724c;id&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  277 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x8def;&#x724c;id</to><enabled>Y</enabled> </hop>
  278 + <hop> <from>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x8def;&#x724c;id</from><to>&#x62c6;&#x5206;&#x4eba;&#x5458;&#x8303;&#x56f4;</to><enabled>Y</enabled> </hop>
  279 + <hop> <from>&#x62c6;&#x5206;&#x4eba;&#x5458;&#x8303;&#x56f4;</from><to>&#x62c6;&#x5206;&#x5206;&#x73ed;&#x642d;&#x73ed;&#x7f16;&#x7801;&#x5b57;&#x6bb5;</to><enabled>Y</enabled> </hop>
  280 + <hop> <from>&#x62c6;&#x5206;&#x5206;&#x73ed;&#x642d;&#x73ed;&#x7f16;&#x7801;&#x5b57;&#x6bb5;</from><to>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  281 + <hop> <from>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</from><to>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2; 2</to><enabled>Y</enabled> </hop>
  282 + <hop> <from>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</from><to>&#x7ebf;&#x8def;id&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  283 + <hop> <from>&#x7ebf;&#x8def;id&#x67e5;&#x8be2;</from><to>&#x8fc7;&#x6ee4;&#x7ebf;&#x8def;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  284 + <hop> <from>&#x8fc7;&#x6ee4;&#x7ebf;&#x8def;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</from><to>&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  285 + <hop> <from>&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</from><to>&#x8fc7;&#x6ee4;&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  286 + <hop> <from>&#x8fc7;&#x6ee4;&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</from><to>&#x62c6;&#x5206;&#x8def;&#x724c;&#x8303;&#x56f4;</to><enabled>Y</enabled> </hop>
  287 + <hop> <from>&#x8def;&#x724c;id&#x67e5;&#x8be2;</from><to>&#x8fc7;&#x6ee4;&#x8def;&#x724c;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  288 + <hop> <from>&#x8fc7;&#x6ee4;&#x8def;&#x724c;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  289 + <hop> <from>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2; 2</from><to>&#x8fc7;&#x6ee4;&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  290 + <hop> <from>&#x8fc7;&#x6ee4;&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</from><to>&#x5408;&#x5e76;&#x5206;&#x73ed;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</to><enabled>Y</enabled> </hop>
  291 + <hop> <from>&#x5408;&#x5e76;&#x5206;&#x73ed;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</to><enabled>Y</enabled> </hop>
  292 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</from><to>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</to><enabled>Y</enabled> </hop>
  293 + <hop> <from>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</to><enabled>Y</enabled> </hop>
  294 + <hop> <from>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</from><to>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</to><enabled>Y</enabled> </hop>
  295 + <hop> <from>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</from><to>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</to><enabled>Y</enabled> </hop>
  296 + </order>
  297 + <step>
  298 + <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</name>
  299 + <type>DBLookup</type>
  300 + <description/>
  301 + <distribute>Y</distribute>
  302 + <custom_distribution/>
  303 + <copies>1</copies>
  304 + <partitioning>
  305 + <method>none</method>
  306 + <schema_name/>
  307 + </partitioning>
  308 + <connection>bus_control_variable</connection>
  309 + <cache>N</cache>
  310 + <cache_load_all>Y</cache_load_all>
  311 + <cache_size>0</cache_size>
  312 + <lookup>
  313 + <schema/>
  314 + <table>bsth_c_s_ecinfo</table>
  315 + <orderby/>
  316 + <fail_on_multiple>N</fail_on_multiple>
  317 + <eat_row_on_failure>N</eat_row_on_failure>
  318 + <key>
  319 + <name>xlid</name>
  320 + <field>xl</field>
  321 + <condition>&#x3d;</condition>
  322 + <name2/>
  323 + </key>
  324 + <key>
  325 + <name>dbbm1</name>
  326 + <field>dbbm</field>
  327 + <condition>&#x3d;</condition>
  328 + <name2/>
  329 + </key>
  330 + <key>
  331 + <name>isCancel</name>
  332 + <field>is_cancel</field>
  333 + <condition>&#x3d;</condition>
  334 + <name2/>
  335 + </key>
  336 + <value>
  337 + <name>id</name>
  338 + <rename>rycid1</rename>
  339 + <default/>
  340 + <type>Integer</type>
  341 + </value>
  342 + </lookup>
  343 + <cluster_schema/>
  344 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  345 + <xloc>904</xloc>
  346 + <yloc>101</yloc>
  347 + <draw>Y</draw>
  348 + </GUI>
  349 + </step>
  350 +
  351 + <step>
  352 + <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2; 2</name>
  353 + <type>DBLookup</type>
  354 + <description/>
  355 + <distribute>Y</distribute>
  356 + <custom_distribution/>
  357 + <copies>1</copies>
  358 + <partitioning>
  359 + <method>none</method>
  360 + <schema_name/>
  361 + </partitioning>
  362 + <connection>bus_control_variable</connection>
  363 + <cache>N</cache>
  364 + <cache_load_all>Y</cache_load_all>
  365 + <cache_size>0</cache_size>
  366 + <lookup>
  367 + <schema/>
  368 + <table>bsth_c_s_ecinfo</table>
  369 + <orderby/>
  370 + <fail_on_multiple>N</fail_on_multiple>
  371 + <eat_row_on_failure>N</eat_row_on_failure>
  372 + <key>
  373 + <name>xlid</name>
  374 + <field>xl</field>
  375 + <condition>&#x3d;</condition>
  376 + <name2/>
  377 + </key>
  378 + <key>
  379 + <name>dbbm2</name>
  380 + <field>dbbm</field>
  381 + <condition>&#x3d;</condition>
  382 + <name2/>
  383 + </key>
  384 + <key>
  385 + <name>isCancel</name>
  386 + <field>is_cancel</field>
  387 + <condition>&#x3d;</condition>
  388 + <name2/>
  389 + </key>
  390 + <value>
  391 + <name>id</name>
  392 + <rename>rycid2</rename>
  393 + <default/>
  394 + <type>Integer</type>
  395 + </value>
  396 + </lookup>
  397 + <cluster_schema/>
  398 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  399 + <xloc>778</xloc>
  400 + <yloc>103</yloc>
  401 + <draw>Y</draw>
  402 + </GUI>
  403 + </step>
  404 +
  405 + <step>
  406 + <name>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</name>
  407 + <type>GroupBy</type>
  408 + <description/>
  409 + <distribute>Y</distribute>
  410 + <custom_distribution/>
  411 + <copies>1</copies>
  412 + <partitioning>
  413 + <method>none</method>
  414 + <schema_name/>
  415 + </partitioning>
  416 + <all_rows>N</all_rows>
  417 + <ignore_aggregate>N</ignore_aggregate>
  418 + <field_ignore/>
  419 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  420 + <prefix>grp</prefix>
  421 + <add_linenr>N</add_linenr>
  422 + <linenr_fieldname/>
  423 + <give_back_row>N</give_back_row>
  424 + <group>
  425 + <field>
  426 + <name>xlid</name>
  427 + </field>
  428 + <field>
  429 + <name>cid</name>
  430 + </field>
  431 + <field>
  432 + <name>lpnames</name>
  433 + </field>
  434 + <field>
  435 + <name>lpids</name>
  436 + </field>
  437 + <field>
  438 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  439 + </field>
  440 + <field>
  441 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  442 + </field>
  443 + <field>
  444 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  445 + </field>
  446 + <field>
  447 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  448 + </field>
  449 + <field>
  450 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  451 + </field>
  452 + <field>
  453 + <name>isCancel</name>
  454 + </field>
  455 + </group>
  456 + <fields>
  457 + <field>
  458 + <aggregate>rycids</aggregate>
  459 + <subject>rycid</subject>
  460 + <type>CONCAT_STRING</type>
  461 + <valuefield>,</valuefield>
  462 + </field>
  463 + <field>
  464 + <aggregate>rybms</aggregate>
  465 + <subject>rybm</subject>
  466 + <type>CONCAT_STRING</type>
  467 + <valuefield>,</valuefield>
  468 + </field>
  469 + </fields>
  470 + <cluster_schema/>
  471 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  472 + <xloc>780</xloc>
  473 + <yloc>291</yloc>
  474 + <draw>Y</draw>
  475 + </GUI>
  476 + </step>
  477 +
  478 + <step>
  479 + <name>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x8def;&#x724c;id</name>
  480 + <type>GroupBy</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 + <all_rows>N</all_rows>
  490 + <ignore_aggregate>N</ignore_aggregate>
  491 + <field_ignore/>
  492 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  493 + <prefix>grp</prefix>
  494 + <add_linenr>N</add_linenr>
  495 + <linenr_fieldname/>
  496 + <give_back_row>N</give_back_row>
  497 + <group>
  498 + <field>
  499 + <name>xlid</name>
  500 + </field>
  501 + <field>
  502 + <name>cid</name>
  503 + </field>
  504 + <field>
  505 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  506 + </field>
  507 + <field>
  508 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  509 + </field>
  510 + <field>
  511 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  512 + </field>
  513 + <field>
  514 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  515 + </field>
  516 + <field>
  517 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  518 + </field>
  519 + <field>
  520 + <name>isCancel</name>
  521 + </field>
  522 + </group>
  523 + <fields>
  524 + <field>
  525 + <aggregate>lpids</aggregate>
  526 + <subject>lpid</subject>
  527 + <type>CONCAT_STRING</type>
  528 + <valuefield>,</valuefield>
  529 + </field>
  530 + <field>
  531 + <aggregate>lpnames</aggregate>
  532 + <subject>lpname</subject>
  533 + <type>CONCAT_STRING</type>
  534 + <valuefield>,</valuefield>
  535 + </field>
  536 + </fields>
  537 + <cluster_schema/>
  538 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  539 + <xloc>653</xloc>
  540 + <yloc>119</yloc>
  541 + <draw>Y</draw>
  542 + </GUI>
  543 + </step>
  544 +
  545 + <step>
  546 + <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
  547 + <type>ExcelInput</type>
  548 + <description/>
  549 + <distribute>Y</distribute>
  550 + <custom_distribution/>
  551 + <copies>1</copies>
  552 + <partitioning>
  553 + <method>none</method>
  554 + <schema_name/>
  555 + </partitioning>
  556 + <header>Y</header>
  557 + <noempty>Y</noempty>
  558 + <stoponempty>N</stoponempty>
  559 + <filefield/>
  560 + <sheetfield/>
  561 + <sheetrownumfield/>
  562 + <rownumfield/>
  563 + <sheetfield/>
  564 + <filefield/>
  565 + <limit>0</limit>
  566 + <encoding/>
  567 + <add_to_result_filenames>Y</add_to_result_filenames>
  568 + <accept_filenames>Y</accept_filenames>
  569 + <accept_field>filepath_</accept_field>
  570 + <accept_stepname>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</accept_stepname>
  571 + <file>
  572 + <name/>
  573 + <filemask/>
  574 + <exclude_filemask/>
  575 + <file_required>N</file_required>
  576 + <include_subfolders>N</include_subfolders>
  577 + </file>
  578 + <fields>
  579 + <field>
  580 + <name>&#x7ebf;&#x8def;</name>
  581 + <type>String</type>
  582 + <length>-1</length>
  583 + <precision>-1</precision>
  584 + <trim_type>none</trim_type>
  585 + <repeat>N</repeat>
  586 + <format/>
  587 + <currency/>
  588 + <decimal/>
  589 + <group/>
  590 + </field>
  591 + <field>
  592 + <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>
  593 + <type>String</type>
  594 + <length>-1</length>
  595 + <precision>-1</precision>
  596 + <trim_type>none</trim_type>
  597 + <repeat>N</repeat>
  598 + <format/>
  599 + <currency/>
  600 + <decimal/>
  601 + <group/>
  602 + </field>
  603 + <field>
  604 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  605 + <type>String</type>
  606 + <length>-1</length>
  607 + <precision>-1</precision>
  608 + <trim_type>none</trim_type>
  609 + <repeat>N</repeat>
  610 + <format/>
  611 + <currency/>
  612 + <decimal/>
  613 + <group/>
  614 + </field>
  615 + <field>
  616 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  617 + <type>String</type>
  618 + <length>-1</length>
  619 + <precision>-1</precision>
  620 + <trim_type>none</trim_type>
  621 + <repeat>N</repeat>
  622 + <format>&#x23;</format>
  623 + <currency/>
  624 + <decimal/>
  625 + <group/>
  626 + </field>
  627 + <field>
  628 + <name>&#x8def;&#x724c;&#x8303;&#x56f4;</name>
  629 + <type>String</type>
  630 + <length>-1</length>
  631 + <precision>-1</precision>
  632 + <trim_type>none</trim_type>
  633 + <repeat>N</repeat>
  634 + <format>&#x23;</format>
  635 + <currency/>
  636 + <decimal/>
  637 + <group/>
  638 + </field>
  639 + <field>
  640 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  641 + <type>String</type>
  642 + <length>-1</length>
  643 + <precision>-1</precision>
  644 + <trim_type>none</trim_type>
  645 + <repeat>N</repeat>
  646 + <format>&#x23;</format>
  647 + <currency/>
  648 + <decimal/>
  649 + <group/>
  650 + </field>
  651 + <field>
  652 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  653 + <type>String</type>
  654 + <length>-1</length>
  655 + <precision>-1</precision>
  656 + <trim_type>none</trim_type>
  657 + <repeat>N</repeat>
  658 + <format>&#x23;</format>
  659 + <currency/>
  660 + <decimal/>
  661 + <group/>
  662 + </field>
  663 + <field>
  664 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  665 + <type>String</type>
  666 + <length>-1</length>
  667 + <precision>-1</precision>
  668 + <trim_type>none</trim_type>
  669 + <repeat>N</repeat>
  670 + <format>&#x23;</format>
  671 + <currency/>
  672 + <decimal/>
  673 + <group/>
  674 + </field>
  675 + </fields>
  676 + <sheets>
  677 + <sheet>
  678 + <name>&#x5de5;&#x4f5c;&#x8868;1</name>
  679 + <startrow>0</startrow>
  680 + <startcol>0</startcol>
  681 + </sheet>
  682 + </sheets>
  683 + <strict_types>N</strict_types>
  684 + <error_ignored>N</error_ignored>
  685 + <error_line_skipped>N</error_line_skipped>
  686 + <bad_line_files_destination_directory/>
  687 + <bad_line_files_extension>warning</bad_line_files_extension>
  688 + <error_line_files_destination_directory/>
  689 + <error_line_files_extension>error</error_line_files_extension>
  690 + <line_number_files_destination_directory/>
  691 + <line_number_files_extension>line</line_number_files_extension>
  692 + <shortFileFieldName/>
  693 + <pathFieldName/>
  694 + <hiddenFieldName/>
  695 + <lastModificationTimeFieldName/>
  696 + <uriNameFieldName/>
  697 + <rootUriNameFieldName/>
  698 + <extensionFieldName/>
  699 + <sizeFieldName/>
  700 + <spreadsheet_type>JXL</spreadsheet_type>
  701 + <cluster_schema/>
  702 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  703 + <xloc>208</xloc>
  704 + <yloc>21</yloc>
  705 + <draw>Y</draw>
  706 + </GUI>
  707 + </step>
  708 +
  709 + <step>
  710 + <name>&#x5408;&#x5e76;&#x5206;&#x73ed;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</name>
  711 + <type>ScriptValueMod</type>
  712 + <description/>
  713 + <distribute>Y</distribute>
  714 + <custom_distribution/>
  715 + <copies>1</copies>
  716 + <partitioning>
  717 + <method>none</method>
  718 + <schema_name/>
  719 + </partitioning>
  720 + <compatible>N</compatible>
  721 + <optimizationLevel>9</optimizationLevel>
  722 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  723 + <jsScript_name>Script 1</jsScript_name>
  724 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var rycid&#x3b;&#xa;var rybm&#x3b;&#xa;&#xa;if &#x28;rycid2 &#x3d;&#x3d; null&#x29; &#x7b;&#xa; rycid &#x3d; rycid1&#x3b;&#xa; rybm &#x3d; dbbm1&#x3b;&#xa;&#x7d; else &#x7b;&#xa; rycid &#x3d; rycid1 &#x2b; &#x22;-&#x22; &#x2b; rycid2&#x3b;&#xa; rybm &#x3d; dbbm1 &#x2b; &#x22;-&#x22; &#x2b; dbbm2&#x3b;&#xa;&#x7d;</jsScript_script>
  725 + </jsScript> </jsScripts> <fields> <field> <name>rycid</name>
  726 + <rename>rycid</rename>
  727 + <type>String</type>
  728 + <length>-1</length>
  729 + <precision>-1</precision>
  730 + <replace>N</replace>
  731 + </field> <field> <name>rybm</name>
  732 + <rename>rybm</rename>
  733 + <type>String</type>
  734 + <length>-1</length>
  735 + <precision>-1</precision>
  736 + <replace>N</replace>
  737 + </field> </fields> <cluster_schema/>
  738 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  739 + <xloc>917</xloc>
  740 + <yloc>201</yloc>
  741 + <draw>Y</draw>
  742 + </GUI>
  743 + </step>
  744 +
  745 + <step>
  746 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</name>
  747 + <type>SelectValues</type>
  748 + <description/>
  749 + <distribute>Y</distribute>
  750 + <custom_distribution/>
  751 + <copies>1</copies>
  752 + <partitioning>
  753 + <method>none</method>
  754 + <schema_name/>
  755 + </partitioning>
  756 + <fields> <select_unspecified>N</select_unspecified>
  757 + <meta> <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  758 + <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>
  759 + <type>Timestamp</type>
  760 + <length>-2</length>
  761 + <precision>-2</precision>
  762 + <conversion_mask>yyyy-MM-dd</conversion_mask>
  763 + <date_format_lenient>false</date_format_lenient>
  764 + <date_format_locale/>
  765 + <date_format_timezone/>
  766 + <lenient_string_to_number>false</lenient_string_to_number>
  767 + <encoding/>
  768 + <decimal_symbol/>
  769 + <grouping_symbol/>
  770 + <currency_symbol/>
  771 + <storage_type/>
  772 + </meta> </fields> <cluster_schema/>
  773 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  774 + <xloc>777</xloc>
  775 + <yloc>368</yloc>
  776 + <draw>Y</draw>
  777 + </GUI>
  778 + </step>
  779 +
  780 + <step>
  781 + <name>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</name>
  782 + <type>Constant</type>
  783 + <description/>
  784 + <distribute>Y</distribute>
  785 + <custom_distribution/>
  786 + <copies>1</copies>
  787 + <partitioning>
  788 + <method>none</method>
  789 + <schema_name/>
  790 + </partitioning>
  791 + <fields>
  792 + <field>
  793 + <name>isCancel</name>
  794 + <type>Integer</type>
  795 + <format/>
  796 + <currency/>
  797 + <decimal/>
  798 + <group/>
  799 + <nullif>0</nullif>
  800 + <length>-1</length>
  801 + <precision>-1</precision>
  802 + <set_empty_string>N</set_empty_string>
  803 + </field>
  804 + </fields>
  805 + <cluster_schema/>
  806 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  807 + <xloc>361</xloc>
  808 + <yloc>22</yloc>
  809 + <draw>Y</draw>
  810 + </GUI>
  811 + </step>
  812 +
  813 + <step>
  814 + <name>&#x62c6;&#x5206;&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  815 + <type>SplitFieldToRows3</type>
  816 + <description/>
  817 + <distribute>Y</distribute>
  818 + <custom_distribution/>
  819 + <copies>1</copies>
  820 + <partitioning>
  821 + <method>none</method>
  822 + <schema_name/>
  823 + </partitioning>
  824 + <splitfield>&#x4eba;&#x5458;&#x8303;&#x56f4;</splitfield>
  825 + <delimiter>,</delimiter>
  826 + <newfield>dbbm</newfield>
  827 + <rownum>N</rownum>
  828 + <rownum_field/>
  829 + <resetrownumber>Y</resetrownumber>
  830 + <delimiter_is_regex>N</delimiter_is_regex>
  831 + <cluster_schema/>
  832 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  833 + <xloc>777</xloc>
  834 + <yloc>22</yloc>
  835 + <draw>Y</draw>
  836 + </GUI>
  837 + </step>
  838 +
  839 + <step>
  840 + <name>&#x62c6;&#x5206;&#x5206;&#x73ed;&#x642d;&#x73ed;&#x7f16;&#x7801;&#x5b57;&#x6bb5;</name>
  841 + <type>FieldSplitter</type>
  842 + <description/>
  843 + <distribute>Y</distribute>
  844 + <custom_distribution/>
  845 + <copies>1</copies>
  846 + <partitioning>
  847 + <method>none</method>
  848 + <schema_name/>
  849 + </partitioning>
  850 + <splitfield>dbbm</splitfield>
  851 + <delimiter>-</delimiter>
  852 + <enclosure/>
  853 + <fields> <field> <name>dbbm1</name>
  854 + <id/>
  855 + <idrem>N</idrem>
  856 + <type>String</type>
  857 + <format/>
  858 + <group/>
  859 + <decimal/>
  860 + <currency/>
  861 + <length>-1</length>
  862 + <precision>-1</precision>
  863 + <nullif/>
  864 + <ifnull/>
  865 + <trimtype>none</trimtype>
  866 + </field> <field> <name>dbbm2</name>
  867 + <id/>
  868 + <idrem>N</idrem>
  869 + <type>String</type>
  870 + <format/>
  871 + <group/>
  872 + <decimal/>
  873 + <currency/>
  874 + <length>-1</length>
  875 + <precision>-1</precision>
  876 + <nullif/>
  877 + <ifnull/>
  878 + <trimtype>none</trimtype>
  879 + </field> </fields> <cluster_schema/>
  880 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  881 + <xloc>901</xloc>
  882 + <yloc>22</yloc>
  883 + <draw>Y</draw>
  884 + </GUI>
  885 + </step>
  886 +
  887 + <step>
  888 + <name>&#x62c6;&#x5206;&#x8def;&#x724c;&#x8303;&#x56f4;</name>
  889 + <type>SplitFieldToRows3</type>
  890 + <description/>
  891 + <distribute>Y</distribute>
  892 + <custom_distribution/>
  893 + <copies>1</copies>
  894 + <partitioning>
  895 + <method>none</method>
  896 + <schema_name/>
  897 + </partitioning>
  898 + <splitfield>&#x8def;&#x724c;&#x8303;&#x56f4;</splitfield>
  899 + <delimiter>,</delimiter>
  900 + <newfield>lpname</newfield>
  901 + <rownum>N</rownum>
  902 + <rownum_field/>
  903 + <resetrownumber>Y</resetrownumber>
  904 + <delimiter_is_regex>N</delimiter_is_regex>
  905 + <cluster_schema/>
  906 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  907 + <xloc>364</xloc>
  908 + <yloc>259</yloc>
  909 + <draw>Y</draw>
  910 + </GUI>
  911 + </step>
  912 +
  913 + <step>
  914 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  915 + <type>SortRows</type>
  916 + <description/>
  917 + <distribute>Y</distribute>
  918 + <custom_distribution/>
  919 + <copies>1</copies>
  920 + <partitioning>
  921 + <method>none</method>
  922 + <schema_name/>
  923 + </partitioning>
  924 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  925 + <prefix>out</prefix>
  926 + <sort_size>1000000</sort_size>
  927 + <free_memory/>
  928 + <compress>N</compress>
  929 + <compress_variable/>
  930 + <unique_rows>N</unique_rows>
  931 + <fields>
  932 + <field>
  933 + <name>xlid</name>
  934 + <ascending>Y</ascending>
  935 + <case_sensitive>N</case_sensitive>
  936 + <presorted>N</presorted>
  937 + </field>
  938 + <field>
  939 + <name>cid</name>
  940 + <ascending>Y</ascending>
  941 + <case_sensitive>N</case_sensitive>
  942 + <presorted>N</presorted>
  943 + </field>
  944 + <field>
  945 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  946 + <ascending>Y</ascending>
  947 + <case_sensitive>N</case_sensitive>
  948 + <presorted>N</presorted>
  949 + </field>
  950 + <field>
  951 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  952 + <ascending>Y</ascending>
  953 + <case_sensitive>N</case_sensitive>
  954 + <presorted>N</presorted>
  955 + </field>
  956 + <field>
  957 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  958 + <ascending>Y</ascending>
  959 + <case_sensitive>N</case_sensitive>
  960 + <presorted>N</presorted>
  961 + </field>
  962 + <field>
  963 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  964 + <ascending>Y</ascending>
  965 + <case_sensitive>N</case_sensitive>
  966 + <presorted>N</presorted>
  967 + </field>
  968 + <field>
  969 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  970 + <ascending>Y</ascending>
  971 + <case_sensitive>N</case_sensitive>
  972 + <presorted>N</presorted>
  973 + </field>
  974 + <field>
  975 + <name>isCancel</name>
  976 + <ascending>Y</ascending>
  977 + <case_sensitive>N</case_sensitive>
  978 + <presorted>N</presorted>
  979 + </field>
  980 + </fields>
  981 + <cluster_schema/>
  982 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  983 + <xloc>516</xloc>
  984 + <yloc>119</yloc>
  985 + <draw>Y</draw>
  986 + </GUI>
  987 + </step>
  988 +
  989 + <step>
  990 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</name>
  991 + <type>SortRows</type>
  992 + <description/>
  993 + <distribute>Y</distribute>
  994 + <custom_distribution/>
  995 + <copies>1</copies>
  996 + <partitioning>
  997 + <method>none</method>
  998 + <schema_name/>
  999 + </partitioning>
  1000 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  1001 + <prefix>out</prefix>
  1002 + <sort_size>1000000</sort_size>
  1003 + <free_memory/>
  1004 + <compress>N</compress>
  1005 + <compress_variable/>
  1006 + <unique_rows>N</unique_rows>
  1007 + <fields>
  1008 + <field>
  1009 + <name>xlid</name>
  1010 + <ascending>Y</ascending>
  1011 + <case_sensitive>N</case_sensitive>
  1012 + <presorted>N</presorted>
  1013 + </field>
  1014 + <field>
  1015 + <name>cid</name>
  1016 + <ascending>Y</ascending>
  1017 + <case_sensitive>N</case_sensitive>
  1018 + <presorted>N</presorted>
  1019 + </field>
  1020 + <field>
  1021 + <name>lpnames</name>
  1022 + <ascending>Y</ascending>
  1023 + <case_sensitive>N</case_sensitive>
  1024 + <presorted>N</presorted>
  1025 + </field>
  1026 + <field>
  1027 + <name>lpids</name>
  1028 + <ascending>Y</ascending>
  1029 + <case_sensitive>N</case_sensitive>
  1030 + <presorted>N</presorted>
  1031 + </field>
  1032 + <field>
  1033 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  1034 + <ascending>Y</ascending>
  1035 + <case_sensitive>N</case_sensitive>
  1036 + <presorted>N</presorted>
  1037 + </field>
  1038 + <field>
  1039 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  1040 + <ascending>Y</ascending>
  1041 + <case_sensitive>N</case_sensitive>
  1042 + <presorted>N</presorted>
  1043 + </field>
  1044 + <field>
  1045 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  1046 + <ascending>Y</ascending>
  1047 + <case_sensitive>N</case_sensitive>
  1048 + <presorted>N</presorted>
  1049 + </field>
  1050 + <field>
  1051 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  1052 + <ascending>Y</ascending>
  1053 + <case_sensitive>N</case_sensitive>
  1054 + <presorted>N</presorted>
  1055 + </field>
  1056 + <field>
  1057 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  1058 + <ascending>Y</ascending>
  1059 + <case_sensitive>N</case_sensitive>
  1060 + <presorted>N</presorted>
  1061 + </field>
  1062 + <field>
  1063 + <name>isCancel</name>
  1064 + <ascending>Y</ascending>
  1065 + <case_sensitive>N</case_sensitive>
  1066 + <presorted>N</presorted>
  1067 + </field>
  1068 + </fields>
  1069 + <cluster_schema/>
  1070 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1071 + <xloc>919</xloc>
  1072 + <yloc>289</yloc>
  1073 + <draw>Y</draw>
  1074 + </GUI>
  1075 + </step>
  1076 +
  1077 + <step>
  1078 + <name>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</name>
  1079 + <type>InsertUpdate</type>
  1080 + <description/>
  1081 + <distribute>Y</distribute>
  1082 + <custom_distribution/>
  1083 + <copies>1</copies>
  1084 + <partitioning>
  1085 + <method>none</method>
  1086 + <schema_name/>
  1087 + </partitioning>
  1088 + <connection>bus_control_variable</connection>
  1089 + <commit>100</commit>
  1090 + <update_bypassed>N</update_bypassed>
  1091 + <lookup>
  1092 + <schema/>
  1093 + <table>bsth_c_s_sr1_flat</table>
  1094 + <key>
  1095 + <name>xlid</name>
  1096 + <field>xl</field>
  1097 + <condition>&#x3d;</condition>
  1098 + <name2/>
  1099 + </key>
  1100 + <key>
  1101 + <name>cid</name>
  1102 + <field>car_config_info</field>
  1103 + <condition>&#x3d;</condition>
  1104 + <name2/>
  1105 + </key>
  1106 + <value>
  1107 + <name>xl</name>
  1108 + <rename>xlid</rename>
  1109 + <update>Y</update>
  1110 + </value>
  1111 + <value>
  1112 + <name>car_config_info</name>
  1113 + <rename>cid</rename>
  1114 + <update>Y</update>
  1115 + </value>
  1116 + <value>
  1117 + <name>lp_names</name>
  1118 + <rename>lpnames</rename>
  1119 + <update>Y</update>
  1120 + </value>
  1121 + <value>
  1122 + <name>lp_ids</name>
  1123 + <rename>lpids</rename>
  1124 + <update>Y</update>
  1125 + </value>
  1126 + <value>
  1127 + <name>lp_start</name>
  1128 + <rename>&#x8d77;&#x59cb;&#x8def;&#x724c;</rename>
  1129 + <update>Y</update>
  1130 + </value>
  1131 + <value>
  1132 + <name>ry_start</name>
  1133 + <rename>&#x8d77;&#x59cb;&#x4eba;&#x5458;</rename>
  1134 + <update>Y</update>
  1135 + </value>
  1136 + <value>
  1137 + <name>ry_dbbms</name>
  1138 + <rename>rybms</rename>
  1139 + <update>Y</update>
  1140 + </value>
  1141 + <value>
  1142 + <name>qyrq</name>
  1143 + <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>
  1144 + <update>Y</update>
  1145 + </value>
  1146 + <value>
  1147 + <name>ry_config_ids</name>
  1148 + <rename>rycids</rename>
  1149 + <update>Y</update>
  1150 + </value>
  1151 + <value>
  1152 + <name>fbgs</name>
  1153 + <rename>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</rename>
  1154 + <update>Y</update>
  1155 + </value>
  1156 + </lookup>
  1157 + <cluster_schema/>
  1158 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1159 + <xloc>532</xloc>
  1160 + <yloc>297</yloc>
  1161 + <draw>Y</draw>
  1162 + </GUI>
  1163 + </step>
  1164 +
  1165 + <step>
  1166 + <name>&#x7ebf;&#x8def;id&#x67e5;&#x8be2;</name>
  1167 + <type>DBLookup</type>
  1168 + <description/>
  1169 + <distribute>Y</distribute>
  1170 + <custom_distribution/>
  1171 + <copies>1</copies>
  1172 + <partitioning>
  1173 + <method>none</method>
  1174 + <schema_name/>
  1175 + </partitioning>
  1176 + <connection>bus_control_variable</connection>
  1177 + <cache>N</cache>
  1178 + <cache_load_all>Y</cache_load_all>
  1179 + <cache_size>0</cache_size>
  1180 + <lookup>
  1181 + <schema/>
  1182 + <table>bsth_c_line</table>
  1183 + <orderby/>
  1184 + <fail_on_multiple>N</fail_on_multiple>
  1185 + <eat_row_on_failure>N</eat_row_on_failure>
  1186 + <key>
  1187 + <name>&#x7ebf;&#x8def;</name>
  1188 + <field>name</field>
  1189 + <condition>&#x3d;</condition>
  1190 + <name2/>
  1191 + </key>
  1192 + <key>
  1193 + <name>isCancel</name>
  1194 + <field>destroy</field>
  1195 + <condition>&#x3d;</condition>
  1196 + <name2/>
  1197 + </key>
  1198 + <value>
  1199 + <name>id</name>
  1200 + <rename>xlid</rename>
  1201 + <default/>
  1202 + <type>Integer</type>
  1203 + </value>
  1204 + </lookup>
  1205 + <cluster_schema/>
  1206 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1207 + <xloc>359</xloc>
  1208 + <yloc>110</yloc>
  1209 + <draw>Y</draw>
  1210 + </GUI>
  1211 + </step>
  1212 +
  1213 + <step>
  1214 + <name>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</name>
  1215 + <type>GetVariable</type>
  1216 + <description/>
  1217 + <distribute>Y</distribute>
  1218 + <custom_distribution/>
  1219 + <copies>1</copies>
  1220 + <partitioning>
  1221 + <method>none</method>
  1222 + <schema_name/>
  1223 + </partitioning>
  1224 + <fields>
  1225 + <field>
  1226 + <name>filepath_</name>
  1227 + <variable>&#x24;&#x7b;filepath&#x7d;</variable>
  1228 + <type>String</type>
  1229 + <format/>
  1230 + <currency/>
  1231 + <decimal/>
  1232 + <group/>
  1233 + <length>-1</length>
  1234 + <precision>-1</precision>
  1235 + <trim_type>none</trim_type>
  1236 + </field>
  1237 + <field>
  1238 + <name>erroroutputdir_</name>
  1239 + <variable>&#x24;&#x7b;erroroutputdir&#x7d;</variable>
  1240 + <type>String</type>
  1241 + <format/>
  1242 + <currency/>
  1243 + <decimal/>
  1244 + <group/>
  1245 + <length>-1</length>
  1246 + <precision>-1</precision>
  1247 + <trim_type>none</trim_type>
  1248 + </field>
  1249 + </fields>
  1250 + <cluster_schema/>
  1251 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1252 + <xloc>53</xloc>
  1253 + <yloc>23</yloc>
  1254 + <draw>Y</draw>
  1255 + </GUI>
  1256 + </step>
  1257 +
  1258 + <step>
  1259 + <name>&#x8def;&#x724c;id&#x67e5;&#x8be2;</name>
  1260 + <type>DBLookup</type>
  1261 + <description/>
  1262 + <distribute>Y</distribute>
  1263 + <custom_distribution/>
  1264 + <copies>1</copies>
  1265 + <partitioning>
  1266 + <method>none</method>
  1267 + <schema_name/>
  1268 + </partitioning>
  1269 + <connection>bus_control_variable</connection>
  1270 + <cache>N</cache>
  1271 + <cache_load_all>Y</cache_load_all>
  1272 + <cache_size>0</cache_size>
  1273 + <lookup>
  1274 + <schema/>
  1275 + <table>bsth_c_s_gbi</table>
  1276 + <orderby/>
  1277 + <fail_on_multiple>N</fail_on_multiple>
  1278 + <eat_row_on_failure>N</eat_row_on_failure>
  1279 + <key>
  1280 + <name>xlid</name>
  1281 + <field>xl</field>
  1282 + <condition>&#x3d;</condition>
  1283 + <name2/>
  1284 + </key>
  1285 + <key>
  1286 + <name>lpname</name>
  1287 + <field>lp_name</field>
  1288 + <condition>&#x3d;</condition>
  1289 + <name2/>
  1290 + </key>
  1291 + <key>
  1292 + <name>isCancel</name>
  1293 + <field>is_cancel</field>
  1294 + <condition>&#x3d;</condition>
  1295 + <name2/>
  1296 + </key>
  1297 + <value>
  1298 + <name>id</name>
  1299 + <rename>lpid</rename>
  1300 + <default/>
  1301 + <type>Integer</type>
  1302 + </value>
  1303 + </lookup>
  1304 + <cluster_schema/>
  1305 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1306 + <xloc>516</xloc>
  1307 + <yloc>21</yloc>
  1308 + <draw>Y</draw>
  1309 + </GUI>
  1310 + </step>
  1311 +
  1312 + <step>
  1313 + <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</name>
  1314 + <type>DBJoin</type>
  1315 + <description/>
  1316 + <distribute>Y</distribute>
  1317 + <custom_distribution/>
  1318 + <copies>1</copies>
  1319 + <partitioning>
  1320 + <method>none</method>
  1321 + <schema_name/>
  1322 + </partitioning>
  1323 + <connection>bus_control_variable</connection>
  1324 + <rowlimit>1</rowlimit>
  1325 + <sql>select t1.id as cid from bsth_c_s_ccinfo t1 left join bsth_c_cars t2 on t1.cl &#x3d; t2.id&#xa;where t1.xl &#x3d; &#x3f; and t2.inside_code &#x3d; &#x3f; and t1.is_cancel &#x3d; &#x3f;</sql>
  1326 + <outer_join>Y</outer_join>
  1327 + <replace_vars>N</replace_vars>
  1328 + <parameter>
  1329 + <field>
  1330 + <name>xlid</name>
  1331 + <type>Integer</type>
  1332 + </field>
  1333 + <field>
  1334 + <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>
  1335 + <type>String</type>
  1336 + </field>
  1337 + <field>
  1338 + <name>isCancel</name>
  1339 + <type>Integer</type>
  1340 + </field>
  1341 + </parameter>
  1342 + <cluster_schema/>
  1343 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1344 + <xloc>360</xloc>
  1345 + <yloc>184</yloc>
  1346 + <draw>Y</draw>
  1347 + </GUI>
  1348 + </step>
  1349 +
  1350 + <step>
  1351 + <name>&#x8fc7;&#x6ee4;&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</name>
  1352 + <type>FilterRows</type>
  1353 + <description/>
  1354 + <distribute>Y</distribute>
  1355 + <custom_distribution/>
  1356 + <copies>1</copies>
  1357 + <partitioning>
  1358 + <method>none</method>
  1359 + <schema_name/>
  1360 + </partitioning>
  1361 +<send_true_to/>
  1362 +<send_false_to/>
  1363 + <compare>
  1364 +<condition>
  1365 + <negated>N</negated>
  1366 + <conditions>
  1367 + <condition>
  1368 + <negated>N</negated>
  1369 + <leftvalue>rycid1</leftvalue>
  1370 + <function>IS NOT NULL</function>
  1371 + <rightvalue/>
  1372 + </condition>
  1373 + <condition>
  1374 + <negated>N</negated>
  1375 + <operator>OR</operator>
  1376 + <leftvalue>rycid2</leftvalue>
  1377 + <function>IS NOT NULL</function>
  1378 + <rightvalue/>
  1379 + </condition>
  1380 + </conditions>
  1381 + </condition>
  1382 + </compare>
  1383 + <cluster_schema/>
  1384 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1385 + <xloc>776</xloc>
  1386 + <yloc>204</yloc>
  1387 + <draw>Y</draw>
  1388 + </GUI>
  1389 + </step>
  1390 +
  1391 + <step>
  1392 + <name>&#x8fc7;&#x6ee4;&#x7ebf;&#x8def;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</name>
  1393 + <type>FilterRows</type>
  1394 + <description/>
  1395 + <distribute>Y</distribute>
  1396 + <custom_distribution/>
  1397 + <copies>1</copies>
  1398 + <partitioning>
  1399 + <method>none</method>
  1400 + <schema_name/>
  1401 + </partitioning>
  1402 +<send_true_to>&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</send_true_to>
  1403 +<send_false_to/>
  1404 + <compare>
  1405 +<condition>
  1406 + <negated>N</negated>
  1407 + <leftvalue>xlid</leftvalue>
  1408 + <function>IS NOT NULL</function>
  1409 + <rightvalue/>
  1410 + </condition>
  1411 + </compare>
  1412 + <cluster_schema/>
  1413 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1414 + <xloc>203</xloc>
  1415 + <yloc>110</yloc>
  1416 + <draw>Y</draw>
  1417 + </GUI>
  1418 + </step>
  1419 +
  1420 + <step>
  1421 + <name>&#x8fc7;&#x6ee4;&#x8def;&#x724c;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</name>
  1422 + <type>FilterRows</type>
  1423 + <description/>
  1424 + <distribute>Y</distribute>
  1425 + <custom_distribution/>
  1426 + <copies>1</copies>
  1427 + <partitioning>
  1428 + <method>none</method>
  1429 + <schema_name/>
  1430 + </partitioning>
  1431 +<send_true_to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</send_true_to>
  1432 +<send_false_to/>
  1433 + <compare>
  1434 +<condition>
  1435 + <negated>N</negated>
  1436 + <leftvalue>lpid</leftvalue>
  1437 + <function>IS NOT NULL</function>
  1438 + <rightvalue/>
  1439 + </condition>
  1440 + </compare>
  1441 + <cluster_schema/>
  1442 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1443 + <xloc>653</xloc>
  1444 + <yloc>23</yloc>
  1445 + <draw>Y</draw>
  1446 + </GUI>
  1447 + </step>
  1448 +
  1449 + <step>
  1450 + <name>&#x8fc7;&#x6ee4;&#x8f66;&#x8f86;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</name>
  1451 + <type>FilterRows</type>
  1452 + <description/>
  1453 + <distribute>Y</distribute>
  1454 + <custom_distribution/>
  1455 + <copies>1</copies>
  1456 + <partitioning>
  1457 + <method>none</method>
  1458 + <schema_name/>
  1459 + </partitioning>
  1460 +<send_true_to>&#x62c6;&#x5206;&#x8def;&#x724c;&#x8303;&#x56f4;</send_true_to>
  1461 +<send_false_to/>
  1462 + <compare>
  1463 +<condition>
  1464 + <negated>N</negated>
  1465 + <leftvalue>cid</leftvalue>
  1466 + <function>IS NOT NULL</function>
  1467 + <rightvalue/>
  1468 + </condition>
  1469 + </compare>
  1470 + <cluster_schema/>
  1471 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1472 + <xloc>208</xloc>
  1473 + <yloc>182</yloc>
  1474 + <draw>Y</draw>
  1475 + </GUI>
  1476 + </step>
  1477 +
  1478 + <step>
  1479 + <name>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</name>
  1480 + <type>ExcelOutput</type>
  1481 + <description/>
  1482 + <distribute>Y</distribute>
  1483 + <custom_distribution/>
  1484 + <copies>1</copies>
  1485 + <partitioning>
  1486 + <method>none</method>
  1487 + <schema_name/>
  1488 + </partitioning>
  1489 + <header>Y</header>
  1490 + <footer>N</footer>
  1491 + <encoding>UTF-8</encoding>
  1492 + <append>N</append>
  1493 + <add_to_result_filenames>Y</add_to_result_filenames>
  1494 + <file>
  1495 + <name>&#x24;&#x7b;erroroutputdir&#x7d;&#x2f;&#x6392;&#x7248;&#x89c4;&#x5219;&#x4fe1;&#x606f;&#x5bfc;&#x5165;_&#x9519;&#x8bef;</name>
  1496 + <extention>xls</extention>
  1497 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  1498 + <create_parent_folder>N</create_parent_folder>
  1499 + <split>N</split>
  1500 + <add_date>N</add_date>
  1501 + <add_time>N</add_time>
  1502 + <SpecifyFormat>N</SpecifyFormat>
  1503 + <date_time_format/>
  1504 + <sheetname>Sheet1</sheetname>
  1505 + <autosizecolums>N</autosizecolums>
  1506 + <nullisblank>N</nullisblank>
  1507 + <protect_sheet>N</protect_sheet>
  1508 + <password>Encrypted </password>
  1509 + <splitevery>0</splitevery>
  1510 + <usetempfiles>N</usetempfiles>
  1511 + <tempdirectory/>
  1512 + </file>
  1513 + <template>
  1514 + <enabled>N</enabled>
  1515 + <append>N</append>
  1516 + <filename>template.xls</filename>
  1517 + </template>
  1518 + <fields>
  1519 + <field>
  1520 + <name>xlid</name>
  1521 + <type>Integer</type>
  1522 + <format/>
  1523 + </field>
  1524 + <field>
  1525 + <name>cid</name>
  1526 + <type>Integer</type>
  1527 + <format/>
  1528 + </field>
  1529 + <field>
  1530 + <name>lpnames</name>
  1531 + <type>String</type>
  1532 + <format/>
  1533 + </field>
  1534 + <field>
  1535 + <name>lpids</name>
  1536 + <type>String</type>
  1537 + <format/>
  1538 + </field>
  1539 + <field>
  1540 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  1541 + <type>String</type>
  1542 + <format/>
  1543 + </field>
  1544 + <field>
  1545 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  1546 + <type>String</type>
  1547 + <format/>
  1548 + </field>
  1549 + <field>
  1550 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  1551 + <type>String</type>
  1552 + <format/>
  1553 + </field>
  1554 + <field>
  1555 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  1556 + <type>Timestamp</type>
  1557 + <format/>
  1558 + </field>
  1559 + <field>
  1560 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  1561 + <type>String</type>
  1562 + <format/>
  1563 + </field>
  1564 + <field>
  1565 + <name>isCancel</name>
  1566 + <type>Integer</type>
  1567 + <format/>
  1568 + </field>
  1569 + <field>
  1570 + <name>rycids</name>
  1571 + <type>String</type>
  1572 + <format/>
  1573 + </field>
  1574 + <field>
  1575 + <name>rybms</name>
  1576 + <type>String</type>
  1577 + <format/>
  1578 + </field>
  1579 + <field>
  1580 + <name>error_count</name>
  1581 + <type>Integer</type>
  1582 + <format/>
  1583 + </field>
  1584 + <field>
  1585 + <name>error_desc</name>
  1586 + <type>String</type>
  1587 + <format/>
  1588 + </field>
  1589 + <field>
  1590 + <name>error_column1</name>
  1591 + <type>String</type>
  1592 + <format/>
  1593 + </field>
  1594 + <field>
  1595 + <name>error_column2</name>
  1596 + <type>String</type>
  1597 + <format/>
  1598 + </field>
  1599 + </fields>
  1600 + <custom>
  1601 + <header_font_name>arial</header_font_name>
  1602 + <header_font_size>10</header_font_size>
  1603 + <header_font_bold>N</header_font_bold>
  1604 + <header_font_italic>N</header_font_italic>
  1605 + <header_font_underline>no</header_font_underline>
  1606 + <header_font_orientation>horizontal</header_font_orientation>
  1607 + <header_font_color>black</header_font_color>
  1608 + <header_background_color>none</header_background_color>
  1609 + <header_row_height>255</header_row_height>
  1610 + <header_alignment>left</header_alignment>
  1611 + <header_image/>
  1612 + <row_font_name>arial</row_font_name>
  1613 + <row_font_size>10</row_font_size>
  1614 + <row_font_color>black</row_font_color>
  1615 + <row_background_color>none</row_background_color>
  1616 + </custom>
  1617 + <cluster_schema/>
  1618 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1619 + <xloc>534</xloc>
  1620 + <yloc>392</yloc>
  1621 + <draw>Y</draw>
  1622 + </GUI>
  1623 + </step>
  1624 +
  1625 + <step_error_handling>
  1626 + <error>
  1627 + <source_step>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</source_step>
  1628 + <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</target_step>
  1629 + <is_enabled>Y</is_enabled>
  1630 + <nr_valuename>error_count</nr_valuename>
  1631 + <descriptions_valuename>error_desc</descriptions_valuename>
  1632 + <fields_valuename>error_column1</fields_valuename>
  1633 + <codes_valuename>error_column2</codes_valuename>
  1634 + <max_errors/>
  1635 + <max_pct_errors/>
  1636 + <min_pct_rows/>
  1637 + </error>
  1638 + </step_error_handling>
  1639 + <slave-step-copy-partition-distribution>
  1640 +</slave-step-copy-partition-distribution>
  1641 + <slave_transformation>N</slave_transformation>
  1642 +
  1643 +</transformation>
... ...
src/main/resources/datatools/ktrs/scheduleRuleDataInput.ktr
... ... @@ -290,9 +290,11 @@
290 290 <hop> <from>&#x8fc7;&#x6ee4;&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x4e3a;&#x7a7a;&#x8bb0;&#x5f55;</from><to>&#x5408;&#x5e76;&#x5206;&#x73ed;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</to><enabled>Y</enabled> </hop>
291 291 <hop> <from>&#x5408;&#x5e76;&#x5206;&#x73ed;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</to><enabled>Y</enabled> </hop>
292 292 <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</from><to>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</to><enabled>Y</enabled> </hop>
293   - <hop> <from>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</to><enabled>Y</enabled> </hop>
294 293 <hop> <from>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</from><to>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</to><enabled>Y</enabled> </hop>
295   - <hop> <from>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</from><to>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</to><enabled>Y</enabled> </hop>
  294 + <hop> <from>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</from><to>&#x5220;&#x9664;</to><enabled>Y</enabled> </hop>
  295 + <hop> <from>&#x5220;&#x9664;</from><to>&#x963b;&#x585e;&#x6570;&#x636e;&#x76f4;&#x5230;&#x6b65;&#x9aa4;&#x90fd;&#x5b8c;&#x6210;</to><enabled>Y</enabled> </hop>
  296 + <hop> <from>&#x963b;&#x585e;&#x6570;&#x636e;&#x76f4;&#x5230;&#x6b65;&#x9aa4;&#x90fd;&#x5b8c;&#x6210;</from><to>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  297 + <hop> <from>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</to><enabled>Y</enabled> </hop>
296 298 </order>
297 299 <step>
298 300 <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</name>
... ... @@ -1075,94 +1077,6 @@
1075 1077 </step>
1076 1078  
1077 1079 <step>
1078   - <name>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</name>
1079   - <type>InsertUpdate</type>
1080   - <description/>
1081   - <distribute>Y</distribute>
1082   - <custom_distribution/>
1083   - <copies>1</copies>
1084   - <partitioning>
1085   - <method>none</method>
1086   - <schema_name/>
1087   - </partitioning>
1088   - <connection>bus_control_variable</connection>
1089   - <commit>100</commit>
1090   - <update_bypassed>N</update_bypassed>
1091   - <lookup>
1092   - <schema/>
1093   - <table>bsth_c_s_sr1_flat</table>
1094   - <key>
1095   - <name>xlid</name>
1096   - <field>xl</field>
1097   - <condition>&#x3d;</condition>
1098   - <name2/>
1099   - </key>
1100   - <key>
1101   - <name>cid</name>
1102   - <field>car_config_info</field>
1103   - <condition>&#x3d;</condition>
1104   - <name2/>
1105   - </key>
1106   - <value>
1107   - <name>xl</name>
1108   - <rename>xlid</rename>
1109   - <update>Y</update>
1110   - </value>
1111   - <value>
1112   - <name>car_config_info</name>
1113   - <rename>cid</rename>
1114   - <update>Y</update>
1115   - </value>
1116   - <value>
1117   - <name>lp_names</name>
1118   - <rename>lpnames</rename>
1119   - <update>Y</update>
1120   - </value>
1121   - <value>
1122   - <name>lp_ids</name>
1123   - <rename>lpids</rename>
1124   - <update>Y</update>
1125   - </value>
1126   - <value>
1127   - <name>lp_start</name>
1128   - <rename>&#x8d77;&#x59cb;&#x8def;&#x724c;</rename>
1129   - <update>Y</update>
1130   - </value>
1131   - <value>
1132   - <name>ry_start</name>
1133   - <rename>&#x8d77;&#x59cb;&#x4eba;&#x5458;</rename>
1134   - <update>Y</update>
1135   - </value>
1136   - <value>
1137   - <name>ry_dbbms</name>
1138   - <rename>rybms</rename>
1139   - <update>Y</update>
1140   - </value>
1141   - <value>
1142   - <name>qyrq</name>
1143   - <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>
1144   - <update>Y</update>
1145   - </value>
1146   - <value>
1147   - <name>ry_config_ids</name>
1148   - <rename>rycids</rename>
1149   - <update>Y</update>
1150   - </value>
1151   - <value>
1152   - <name>fbgs</name>
1153   - <rename>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</rename>
1154   - <update>Y</update>
1155   - </value>
1156   - </lookup>
1157   - <cluster_schema/>
1158   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1159   - <xloc>532</xloc>
1160   - <yloc>297</yloc>
1161   - <draw>Y</draw>
1162   - </GUI>
1163   - </step>
1164   -
1165   - <step>
1166 1080 <name>&#x7ebf;&#x8def;id&#x67e5;&#x8be2;</name>
1167 1081 <type>DBLookup</type>
1168 1082 <description/>
... ... @@ -1527,7 +1441,7 @@
1527 1441 <format/>
1528 1442 </field>
1529 1443 <field>
1530   - <name>&#x8def;&#x724c;&#x8303;&#x56f4;</name>
  1444 + <name>lpnames</name>
1531 1445 <type>String</type>
1532 1446 <format/>
1533 1447 </field>
... ... @@ -1572,6 +1486,11 @@
1572 1486 <format/>
1573 1487 </field>
1574 1488 <field>
  1489 + <name>rybms</name>
  1490 + <type>String</type>
  1491 + <format/>
  1492 + </field>
  1493 + <field>
1575 1494 <name>error_count</name>
1576 1495 <type>Integer</type>
1577 1496 <format/>
... ... @@ -1611,15 +1530,149 @@
1611 1530 </custom>
1612 1531 <cluster_schema/>
1613 1532 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1614   - <xloc>534</xloc>
1615   - <yloc>392</yloc>
  1533 + <xloc>253</xloc>
  1534 + <yloc>501</yloc>
  1535 + <draw>Y</draw>
  1536 + </GUI>
  1537 + </step>
  1538 +
  1539 + <step>
  1540 + <name>&#x5220;&#x9664;</name>
  1541 + <type>Delete</type>
  1542 + <description/>
  1543 + <distribute>Y</distribute>
  1544 + <custom_distribution/>
  1545 + <copies>1</copies>
  1546 + <partitioning>
  1547 + <method>none</method>
  1548 + <schema_name/>
  1549 + </partitioning>
  1550 + <connection>bus_control_variable</connection>
  1551 + <commit>100</commit>
  1552 + <lookup>
  1553 + <schema/>
  1554 + <table>bsth_c_s_sr1_flat</table>
  1555 + <key>
  1556 + <name>xlid</name>
  1557 + <field>xl</field>
  1558 + <condition>&#x3d;</condition>
  1559 + <name2/>
  1560 + </key>
  1561 + </lookup>
  1562 + <cluster_schema/>
  1563 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1564 + <xloc>619</xloc>
  1565 + <yloc>370</yloc>
  1566 + <draw>Y</draw>
  1567 + </GUI>
  1568 + </step>
  1569 +
  1570 + <step>
  1571 + <name>&#x963b;&#x585e;&#x6570;&#x636e;&#x76f4;&#x5230;&#x6b65;&#x9aa4;&#x90fd;&#x5b8c;&#x6210;</name>
  1572 + <type>BlockUntilStepsFinish</type>
  1573 + <description/>
  1574 + <distribute>Y</distribute>
  1575 + <custom_distribution/>
  1576 + <copies>1</copies>
  1577 + <partitioning>
  1578 + <method>none</method>
  1579 + <schema_name/>
  1580 + </partitioning>
  1581 + <steps>
  1582 + <step>
  1583 + <name>&#x5220;&#x9664;</name>
  1584 + <CopyNr>0</CopyNr>
  1585 + </step>
  1586 + </steps>
  1587 + <cluster_schema/>
  1588 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1589 + <xloc>450</xloc>
  1590 + <yloc>370</yloc>
  1591 + <draw>Y</draw>
  1592 + </GUI>
  1593 + </step>
  1594 +
  1595 + <step>
  1596 + <name>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</name>
  1597 + <type>TableOutput</type>
  1598 + <description/>
  1599 + <distribute>Y</distribute>
  1600 + <custom_distribution/>
  1601 + <copies>1</copies>
  1602 + <partitioning>
  1603 + <method>none</method>
  1604 + <schema_name/>
  1605 + </partitioning>
  1606 + <connection>bus_control_variable</connection>
  1607 + <schema/>
  1608 + <table>bsth_c_s_sr1_flat</table>
  1609 + <commit>1000</commit>
  1610 + <truncate>N</truncate>
  1611 + <ignore_errors>N</ignore_errors>
  1612 + <use_batch>Y</use_batch>
  1613 + <specify_fields>Y</specify_fields>
  1614 + <partitioning_enabled>N</partitioning_enabled>
  1615 + <partitioning_field/>
  1616 + <partitioning_daily>N</partitioning_daily>
  1617 + <partitioning_monthly>Y</partitioning_monthly>
  1618 + <tablename_in_field>N</tablename_in_field>
  1619 + <tablename_field/>
  1620 + <tablename_in_table>Y</tablename_in_table>
  1621 + <return_keys>N</return_keys>
  1622 + <return_field/>
  1623 + <fields>
  1624 + <field>
  1625 + <column_name>xl</column_name>
  1626 + <stream_name>xlid</stream_name>
  1627 + </field>
  1628 + <field>
  1629 + <column_name>car_config_info</column_name>
  1630 + <stream_name>cid</stream_name>
  1631 + </field>
  1632 + <field>
  1633 + <column_name>lp_names</column_name>
  1634 + <stream_name>lpnames</stream_name>
  1635 + </field>
  1636 + <field>
  1637 + <column_name>lp_ids</column_name>
  1638 + <stream_name>lpids</stream_name>
  1639 + </field>
  1640 + <field>
  1641 + <column_name>lp_start</column_name>
  1642 + <stream_name>&#x8d77;&#x59cb;&#x8def;&#x724c;</stream_name>
  1643 + </field>
  1644 + <field>
  1645 + <column_name>ry_start</column_name>
  1646 + <stream_name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</stream_name>
  1647 + </field>
  1648 + <field>
  1649 + <column_name>qyrq</column_name>
  1650 + <stream_name>&#x542f;&#x7528;&#x65e5;&#x671f;</stream_name>
  1651 + </field>
  1652 + <field>
  1653 + <column_name>fbgs</column_name>
  1654 + <stream_name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</stream_name>
  1655 + </field>
  1656 + <field>
  1657 + <column_name>ry_dbbms</column_name>
  1658 + <stream_name>rybms</stream_name>
  1659 + </field>
  1660 + <field>
  1661 + <column_name>ry_config_ids</column_name>
  1662 + <stream_name>rycids</stream_name>
  1663 + </field>
  1664 + </fields>
  1665 + <cluster_schema/>
  1666 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1667 + <xloc>259</xloc>
  1668 + <yloc>369</yloc>
1616 1669 <draw>Y</draw>
1617 1670 </GUI>
1618 1671 </step>
1619 1672  
1620 1673 <step_error_handling>
1621 1674 <error>
1622   - <source_step>&#x63d2;&#x5165; &#x2f; &#x66f4;&#x65b0;bsth_c_s_sr1_flat</source_step>
  1675 + <source_step>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</source_step>
1623 1676 <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</target_step>
1624 1677 <is_enabled>Y</is_enabled>
1625 1678 <nr_valuename>error_count</nr_valuename>
... ...
src/main/resources/static/pages/base/line/add.html
... ... @@ -289,14 +289,20 @@
289 289 </div>
290 290 <!-- 线路规划类型 (* 必填项) END -->
291 291  
292   - <!-- 开辟日期 START -->
  292 + <!--大间隔等级 START -->
293 293 <div class="col-md-6">
294   - <label class="control-label col-md-5"> 开辟日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  294 + <label class="control-label col-md-5"> 大间隔等级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
295 295 <div class="col-md-4">
296   - <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期">
  296 + <select name="spacGrade" class="form-control" id="spacGradeSelect">
  297 + <option value="">-- 请选择大间隔等级 --</option>
  298 + <option value="1">一级</option>
  299 + <option value="2">二级</option>
  300 + <option value="3">三级</option>
  301 + <option value="4">四级</option>
  302 + </select>
297 303 </div>
298 304 </div>
299   - <!-- 开辟日期 END -->
  305 + <!-- 大间隔等级END -->
300 306 </div>
301 307 <!-- 表单分组组件 form-group START -->
302 308  
... ... @@ -398,6 +404,15 @@
398 404 </div>
399 405 </div>
400 406 <!-- 空调车辆数 END -->
  407 +
  408 + <!-- 开辟日期 START -->
  409 + <div class="col-md-6">
  410 + <label class="control-label col-md-5"> 开辟日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  411 + <div class="col-md-4">
  412 + <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期">
  413 + </div>
  414 + </div>
  415 + <!-- 开辟日期 END -->
401 416 </div>
402 417 <!-- 表单分组组件 form-group END -->
403 418  
... ...
src/main/resources/static/pages/base/line/details.html
... ... @@ -282,14 +282,20 @@
282 282 </div>
283 283 <!-- 线路规划类型 (* 必填项) END -->
284 284  
285   - <!-- 开辟日期 START -->
  285 + <!--大间隔等级 START -->
286 286 <div class="col-md-6">
287   - <label class="control-label col-md-5"> 开辟日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  287 + <label class="control-label col-md-5"> 大间隔等级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
288 288 <div class="col-md-4">
289   - <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期">
  289 + <select name="spacGrade" class="form-control" id="spacGradeSelect">
  290 + <option value="">-- 请选择大间隔等级 --</option>
  291 + <option value="1">一级</option>
  292 + <option value="2">二级</option>
  293 + <option value="3">三级</option>
  294 + <option value="4">四级</option>
  295 + </select>
290 296 </div>
291 297 </div>
292   - <!-- 开辟日期 END -->
  298 + <!-- 大间隔等级END -->
293 299 </div>
294 300 <!-- 表单分组组件 form-group START -->
295 301  
... ... @@ -391,6 +397,15 @@
391 397 </div>
392 398 </div>
393 399 <!-- 空调车辆数 END -->
  400 +
  401 + <!-- 开辟日期 START -->
  402 + <div class="col-md-6">
  403 + <label class="control-label col-md-5"> 开辟日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  404 + <div class="col-md-4">
  405 + <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期">
  406 + </div>
  407 + </div>
  408 + <!-- 开辟日期 END -->
394 409 </div>
395 410 <!-- 表单分组组件 form-group END -->
396 411  
... ...
src/main/resources/static/pages/base/line/edit.html
... ... @@ -290,14 +290,20 @@
290 290 </div>
291 291 <!-- 线路规划类型 (* 必填项) END -->
292 292  
293   - <!-- 开辟日期 START -->
  293 + <!--大间隔等级 START -->
294 294 <div class="col-md-6">
295   - <label class="control-label col-md-5"> 开辟日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  295 + <label class="control-label col-md-5"> 大间隔等级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
296 296 <div class="col-md-4">
297   - <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期">
  297 + <select name="spacGrade" class="form-control" id="spacGradeSelect">
  298 + <option value="">-- 请选择大间隔等级 --</option>
  299 + <option value="1">一级</option>
  300 + <option value="2">二级</option>
  301 + <option value="3">三级</option>
  302 + <option value="4">四级</option>
  303 + </select>
298 304 </div>
299 305 </div>
300   - <!-- 开辟日期 END -->
  306 + <!-- 大间隔等级END -->
301 307 </div>
302 308 <!-- 表单分组组件 form-group START -->
303 309  
... ... @@ -399,6 +405,15 @@
399 405 </div>
400 406 </div>
401 407 <!-- 空调车辆数 END -->
  408 +
  409 + <!-- 开辟日期 START -->
  410 + <div class="col-md-6">
  411 + <label class="control-label col-md-5"> 开辟日期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  412 + <div class="col-md-4">
  413 + <input type="text" class="form-control" name="openDate" id="openDateInput" placeholder="开辟日期">
  414 + </div>
  415 + </div>
  416 + <!-- 开辟日期 END -->
402 417 </div>
403 418 <!-- 表单分组组件 form-group END -->
404 419  
... ...
src/main/resources/static/pages/base/timesmodel/bctz.html
... ... @@ -18,9 +18,10 @@
18 18 <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_bctz">
19 19 <thead>
20 20 <tr role="row" class="heading">
21   - <th width="33%">路牌</th>
22   - <th width="33%">当前班次数</th>
23   - <th width="33%">调整班次数</th>
  21 + <th width="25%">路牌编码</th>
  22 + <th width="25%">路牌名称</th>
  23 + <th width="25%">当前班次数</th>
  24 + <th width="25%">调整班次数</th>
24 25 </tr>
25 26 </thead>
26 27 <tbody></tbody>
... ... @@ -40,13 +41,16 @@
40 41 {{each list as obj i }}
41 42 <tr role="row" class="filter">
42 43 <td>
43   - <input type="text" readonly class="form-control form-filter input-sm" name="lpname_{{i+1}}" value="{{obj.lpNo}}">
  44 + <input type="text" readonly class="form-control form-filter input-sm" name="lpno_{{i+1}}" value="{{obj.lpNo}}">
  45 + </td>
  46 + <td>
  47 + <input type="text" readonly class="form-control form-filter input-sm" name="lpname_{{i+1}}" value="{{obj.lpName}}">
44 48 </td>
45 49 <td>
46 50 <input type="text" readonly class="form-control form-filter input-sm" name="dqbc_{{i+1}}" value="{{obj.bcs}}">
47 51 </td>
48 52 <td>
49   - <input type="number" class="form-control form-filter input-sm" name="{{i+1}}" value="{{obj.bcs}}">
  53 + <input type="number" class="form-control form-filter input-sm" name="{{i+1}}" value="{{obj.bcs}}" min="0">
50 54 </td>
51 55 </tr>
52 56 {{/each}}
... ... @@ -57,230 +61,239 @@
57 61 {{/if}}
58 62 </script>
59 63 <script type="text/javascript">
60   -$('#tzbc_mobal').on('tzbcMobal.show', function(e,obj,cardata,bf){
61   - setTimeout(function(){
62   - // 加载延迟200毫秒显示mobal
63   - $('#tzbc_mobal').modal({show : true,backdrop: 'static', keyboard: false});
64   - },200);
65   - // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。
66   - $('#tzbc_mobal').on('show.bs.modal', function () {
67   - // 把数据填充到模版中
68   - var tbodyHtml = template('bctz_temp',{list:cardata});
69   - // 把渲染好的模版html文本追加到表格中
70   - $('#datatable_bctz tbody').html(tbodyHtml);
71   - });
72   - // 获取表单元素
73   - var form = $('#tzbcForm');
74   - // 错误提示元素
75   - var tzbcAlert = $('#tzbcAlert', form);
76   - // 下一步点击事件
77   - $('#tzbcnext').on('click', function() {
78   - form.submit();// 表单提交
79   - });
80   - // 表单验证
81   - form.validate({
82   - errorElement : 'span',
83   - errorClass : 'help-block help-block-error',
84   - focusInvalid : false,
85   - rules : {
86   - },
87   - invalidHandler : function(event, validator) {
88   - tzbcAlert.show();
89   - App.scrollTo(reladplusname, -200);
90   - },
91   - highlight : function(element) {
92   - $(element).closest('.form-group').addClass('has-error');
93   - },
94   - unhighlight : function(element) {
95   - $(element).closest('.form-group').removeClass('has-error');
96   - },
97   - success : function(label) {
98   - label.closest('.form-group').removeClass('has-error');
99   - },
100   - submitHandler : function(f) {
101   - // 1、 获取表单内容,并序列化
102   - var params = form.serializeJSON();
103   - // 2、 调整路牌对应的班次总数
104   - updFormParams(params);
105   - // 3、调整班次.并重新给定班次序号和发车序号.再确定首末班车时间.最后渲染数据
106   - obj.data(bf.tzsmbcsj(bf.setbcsAndfcno(tzbcDate()),
107   - obj.configuration.dataMap.smbcsjArr,
108   - obj.configuration.dataMap.ccsjArr,
109   - obj.configuration.dataMap.cclcArr,
110   - obj.configuration.dataMap.qdzArr,
111   - obj.configuration.dataMap.lbsj));
112   - // 3、记录早操.并保存历史班次数据
113   - obj.addHistory();
114   - // 5、隐藏错误提示
115   - tzbcAlert.hide();
116   - // 6、隐藏 reladplus_mobal 弹出层
117   - $('#tzbc_mobal').modal('hide');
118   - }
119   - });
120   -
121   - /**
122   - * @description : (TODO) 调整路牌对应的班次总数.
123   - *
124   - * ❀ 根据路牌对应班次的数值,把路牌对应的当前班次总数修改成调整后的班次总数,并转为数值类型以及把空值转为0.
125   - *
126   - * @params : [p--表单序列化对象].
127   - */
128   - function updFormParams(p) {
129   - for(var i= 0;i<cardata.length;i++) {
130   - if(p[i+1] != undefined) {
131   - if(p[i+1]=='')
132   - cardata[i].tzbc = 0;
133   - else
134   - cardata[i].tzbc = parseInt(p[i+1]);
  64 +$('#tzbc_mobal').on('tzbcMobal.show', function(e,obj,cardata,bf,error){
  65 + if(obj != null && obj !='' && bf != null && bf!='' && cardata.length>0){
  66 + // 延迟200毫秒显示mobal
  67 + setTimeout(function(){$('#tzbc_mobal').modal({show : true,backdrop: 'static', keyboard: false});},200);
  68 + // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。
  69 + $('#tzbc_mobal').on('show.bs.modal', function () {
  70 + // 把数据填充到模版中
  71 + var tbodyHtml = template('bctz_temp',{list:cardata});
  72 + // 把渲染好的模版html文本追加到表格中
  73 + $('#datatable_bctz tbody').html(tbodyHtml);
  74 + });
  75 + // 获取表单元素
  76 + var form = $('#tzbcForm');
  77 + // 错误提示元素
  78 + var tzbcAlert = $('#tzbcAlert', form);
  79 + // 下一步点击事件
  80 + $('#tzbcnext').on('click', function() {
  81 + form.submit();// 表单提交
  82 + });
  83 + // 表单验证
  84 + form.validate({
  85 + errorElement : 'span',
  86 + errorClass : 'help-block help-block-error',
  87 + focusInvalid : false,
  88 + rules : {
  89 + },
  90 + invalidHandler : function(event, validator) {
  91 + tzbcAlert.show();
  92 + App.scrollTo(reladplusname, -200);
  93 + },
  94 + highlight : function(element) {
  95 + $(element).closest('.form-group').addClass('has-error');
  96 + },
  97 + unhighlight : function(element) {
  98 + $(element).closest('.form-group').removeClass('has-error');
  99 + },
  100 + success : function(label) {
  101 + label.closest('.form-group').removeClass('has-error');
  102 + },
  103 + submitHandler : function(f) {
  104 + // 1、 获取表单内容,并序列化
  105 + var params = form.serializeJSON();
  106 + var dataMap = obj.configuration.dataMap;
  107 + // 2、 调整路牌对应的班次总数
  108 + updFormParams(params);
  109 + // 3、调整班次.并重新给定班次序号和发车序号.再确定首末班车时间.最后渲染数据.
  110 + var jar = bf.tzsmbcsj01(bf.setbcsAndfcno(tzbcDate()),
  111 + obj.configuration.dataMap.smbcsjArr,
  112 + obj.configuration.dataMap.ccsjArr,
  113 + obj.configuration.dataMap.cclcArr,
  114 + obj.configuration.dataMap.qdzArr,
  115 + obj.configuration.dataMap.lbsj,dataMap);
  116 + obj.data(bf.addjcclcbc01(obj.configuration.taskTypes,jar,dataMap,
  117 + obj.configuration.stopAraay,obj.configuration.dataMap.map));
  118 + // 3、记录早操.并保存历史班次数据
  119 + obj.addHistory();
  120 + // 5、隐藏错误提示
  121 + tzbcAlert.hide();
  122 + // 6、隐藏 reladplus_mobal 弹出层
  123 + $('#tzbc_mobal').modal('hide');
  124 + }
  125 + });
  126 +
  127 + /**
  128 + * @description : (TODO) 调整路牌对应的班次总数.
  129 + *
  130 + * ❀ 根据路牌对应班次的数值,把路牌对应的当前班次总数修改成调整后的班次总数,并转为数值类型以及把空值转为0.
  131 + *
  132 + * @params : [p--表单序列化对象].
  133 + */
  134 + function updFormParams(p) {
  135 + for(var i= 0;i<cardata.length;i++) {
  136 + if(p[i+1] != undefined) {
  137 + if(p[i+1]=='')
  138 + cardata[i].tzbc = 0;
  139 + else
  140 + cardata[i].tzbc = parseInt(p[i+1]);
  141 + }
135 142 }
136 143 }
137   - }
138   -
139   - /**
140   - * @description : (TODO)调整班次.
141   - *
142   - * @return : 返回一个数组.这里返回的是一个调整完班次数后的数组.
143   - */
144   - function tzbcDate() {
145   - // 1、获取当前所有的班次数.
146   - var dr = obj.getDataArray(),
147   - result = new Array();// 定义返回数组对象.
148   - // 2、遍历路牌对应的班次总数.
149   - for(var i = 0 ; i<cardata.length;i++) {
150   - var zcbcsz = new Array(),// 定义当前路牌下的正常班次数组.
151   - zwlbbcsz = new Array(),// 定义当前路牌下的早晚例保、吃饭班次数组.
152   - jccbcs = 0,// 进出场班次数.这个值是为了计算总班次数时除去时间为空的班次
153   - jccbcsz = new Array();// 定义当前路牌下的进出场班次数组.
154   - // 3、遍历当前所有的班次数.
155   - for(var j = 0 ;j<dr.length;j++) {
156   - // 4、判断当前遍历的班次是否属于当前路牌对应的班次数组对象.
157   - if(cardata[i].lpNo == dr[j].parent && dr[j].bcsj>0 ){
158   - // 5、把当前班次添加到上序定义的不同班次数组中.
159   - if(dr[j].bcType =='bd' || dr[j].bcType=='lc' || dr[j].bcType =='cf')
160   - zwlbbcsz.push(dr[j]);// 添加到早晚例保、吃饭班次数组中.
161   - else if(dr[j].bcType=='in' || dr[j].bcType =='out')
162   - jccbcs++;
163   - else
164   - zcbcsz.push(dr[j]);// 添加到正常班次数组.
165   - }
166   - if(cardata[i].lpNo == dr[j].parent && (dr[j].bcType=='in' || dr[j].bcType =='out')) {
167   - jccbcsz.push(dr[j]);// 添加到进出场班次数组中.
  144 +
  145 + /**
  146 + * @description : (TODO)调整班次.
  147 + *
  148 + * @return : 返回一个数组.这里返回的是一个调整完班次数后的数组.
  149 + */
  150 + function tzbcDate() {
  151 + // 1、获取当前所有的班次数.
  152 + var dr = obj.getDataArray(),
  153 + result = new Array();// 定义返回数组对象.
  154 + // 2、遍历路牌对应的班次总数.
  155 + for(var i = 0 ; i<cardata.length;i++) {
  156 + var zcbcsz = new Array(),// 定义当前路牌下的正常班次数组.
  157 + zwlbbcsz = new Array(),// 定义当前路牌下的早晚例保、吃饭班次数组.
  158 + jccbcs = 0,// 进出场班次数.这个值是为了计算总班次数时除去时间为空的班次
  159 + jccbcsz = new Array();// 定义当前路牌下的进出场班次数组.
  160 + // 3、遍历当前所有的班次数.
  161 + for(var j = 0 ;j<dr.length;j++) {
  162 + // 4、判断当前遍历的班次是否属于当前路牌对应的班次数组对象.
  163 + if(cardata[i].lpNo == dr[j].parent && dr[j].bcsj>0 ){
  164 + // 5、把当前班次添加到上序定义的不同班次数组中.
  165 + if(dr[j].bcType =='bd' || dr[j].bcType=='lc' || dr[j].bcType =='cf')
  166 + zwlbbcsz.push(dr[j]);// 添加到早晚例保、吃饭班次数组中.
  167 + else if(dr[j].bcType=='in' || dr[j].bcType =='out')
  168 + jccbcs++;
  169 + else
  170 + zcbcsz.push(dr[j]);// 添加到正常班次数组.
  171 + }
  172 + if(cardata[i].lpNo == dr[j].parent && (dr[j].bcType=='in' || dr[j].bcType =='out')) {
  173 + jccbcsz.push(dr[j]);// 添加到进出场班次数组中.
  174 + }
168 175 }
169   - }
170   - // 6、调整班次
171   - result = result.concat(tcbcgz(bf.pxarr(zcbcsz),cardata[i].tzbc,zwlbbcsz,bf.pxarr(jccbcsz),jccbcs,cardata[i]));
  176 + // 6、调整班次
  177 + result = result.concat(tcbcgz(bf.pxarr(zcbcsz),cardata[i].tzbc,zwlbbcsz,bf.pxarr(jccbcsz),jccbcs,cardata[i]));
  178 + }
  179 + return result;
172 180 }
173   - return result;
174   - }
175   -
176   - /**
177   - * @description : (TODO)
178   - *
179   - * @params : [ar-- 当前路牌下的正常班次数组;num--当前路牌对应的班次总数;qa--当前路牌下的早晚例保、吃饭班次数组,ja--当前路牌下的进出场班次数组]
180   - *
181   - * @return : 返回一个数组.这里返回一个根据班次总数调整过车班次数组
182   - */
183   - function tcbcgz(ar,num,qa,ja,jccbcs,cara) {
184   - var rsbcA = new Array();
185   - if(ar.length>0) {
186   - var ra_ = new Array();
187   - var _dx = num-jccbcs;// 班次总数值 - 进出时间大于零的班次 = 正常班次数
188   - var lastbcsjStr = ar[ar.length-1].ARRIVALTIME;// 标记调整班次之前最后一个班次的达到时间
189   - var fcno_ = Math.abs(ar.length+jccbcs-num),// 调整班次差
190   - tempS = '';// 标记调整班次是添加还是剔除[jq--剔除;add--添加]
191   - var fxdm = bf.dirDmToIndex(ar[ar.length-1].xlDir);// 标记调整班次之前最后一个班次的方向
192   - // 如果调整班次差是成对的,那么方向一致.否则改变方向
193   - if(fcno_%2!=0)
194   - fxdm = bf.getfx(1,fxdm);// 改变方向
195   - // 如果当前路牌的班次总数大于等于调整后的班次总数则截取班次,反之添加班次
196   - if(ar.length>=_dx) {
197   - ra_ = ar.splice(0,_dx);// 截取班次数(这里从下标0开始截取到 对应的班次总数值)
198   - tempS = 'jq';
199   - }else if(ar.length<_dx) {
200   - var tzsj_ = obj.configuration.dataMap.ztjxA[fxdm],sh = ar[ar.length-1];
201   - var startTime = new Date();
202   - var strArray = sh.ARRIVALTIME.split(':');
203   - startTime.setHours(parseInt(strArray[0]));
204   - startTime.setMinutes(parseInt(strArray[1]) + tzsj_);
205   - bf.addbc(obj,sh,startTime,tzsj_,sh.fcno + 1,ar,_dx - ar.length);
206   - ra_ = ar;
207   - tempS = 'add';
208   - }
209   - rsbcA = tzsj(ra_,qa,ja,lastbcsjStr,fcno_,tempS,fxdm);
210   - }else if(ar.length==0) {
211   - rsbcA = bf.addlpbc(obj,bf,cara.lpNo,num);
  181 +
  182 + /**
  183 + * @description : (TODO)
  184 + *
  185 + * @params : [ar-- 当前路牌下的正常班次数组;num--当前路牌对应的班次总数;qa--当前路牌下的早晚例保、吃饭班次数组,ja--当前路牌下的进出场班次数组]
  186 + *
  187 + * @return : 返回一个数组.这里返回一个根据班次总数调整过车班次数组
  188 + */
  189 + function tcbcgz(ar,num,qa,ja,jccbcs,cara) {
  190 + var rsbcA = new Array();
  191 + if(ar.length>0) {
  192 + var ra_ = new Array();
  193 + var _dx = num-jccbcs;// 班次总数值 - 进出时间大于零的班次 = 正常班次数
  194 + var lastbcsjStr = ar[ar.length-1].ARRIVALTIME;// 标记调整班次之前最后一个班次的达到时间
  195 + var fcno_ = Math.abs(ar.length+jccbcs-num),// 调整班次差
  196 + tempS = '';// 标记调整班次是添加还是剔除[jq--剔除;add--添加]
  197 + var fxdm = bf.dirDmToIndex(ar[ar.length-1].xlDir);// 标记调整班次之前最后一个班次的方向
  198 + // 如果调整班次差是成对的,那么方向一致.否则改变方向
  199 + if(fcno_%2!=0)
  200 + fxdm = bf.getfx(1,fxdm);// 改变方向
  201 + // 如果当前路牌的班次总数大于等 于调整后的班次总数则截取班次,反之添加班次
  202 + if(ar.length>=_dx) {
  203 + ra_ = ar.splice(0,_dx);// 截取班次数(这里从下标0开始截取到 对应的班次总数值)
  204 + tempS = 'jq';
  205 + }else if(ar.length<_dx) {
  206 + var sh = ar[ar.length-1];
  207 + var cctag = bf.dirDmToIndex(ar[ar.length-1].xlDir);// 标记调整班次之前最后一个班次的方向
  208 + cctag = bf.getfx(1,cctag);// 改变方向
  209 + var startTime = new Date();
  210 + var strArray = sh.ARRIVALTIME.split(':');
  211 + startTime.setHours(parseInt(strArray[0]));
  212 + startTime.setMinutes(parseInt(strArray[1]));
  213 + var tzjx = bf.isgfsjd01(startTime,obj.configuration.dataMap) ? obj.configuration.dataMap.gftzsj[cctag] : obj.configuration.dataMap.dgtzsj[cctag];
  214 + startTime.setMinutes(parseInt(strArray[1]) + tzjx);
  215 + bf.addbc(obj , sh , startTime , tzjx, (sh.fcno + 1),ar, (_dx - ar.length));
  216 + ra_ = ar;
  217 + tempS = 'add';
  218 + }
  219 + // rsbcA = tzsj(ra_,qa,ja,lastbcsjStr,fcno_,tempS,fxdm);
  220 + rsbcA = ra_;
  221 + }else if(ar.length==0) {
  222 + rsbcA = bf.addlpbc(obj,bf,cara.lpNo,num);
  223 + }
  224 + return rsbcA;
212 225 }
213   - return rsbcA;
214   - }
215   -
216   - /**
217   - * @description : (TODO) 调整时间
218   - *
219   - * @params : [a1-- 当前路牌下的正常班次数组;a2--当前路牌下的早晚例保、吃饭班次数组;a3--当前路牌下的进出场班次数组]
220   - *
221   - * @return : 返回一个数组.这里返回的是一个调整时间后的班次数组
222   - */
223   - function tzsj(a1,a2,a3,sjstr,fcno_,tempS,fxdm) {
224   - return a1.concat(jsjclc(a1[a1.length-1].ARRIVALTIME,a2,a3,sjstr,fcno_,tempS,fxdm));
225   - }
226   -
227   - /**
228   - * @description : (TODO)调整进出场、离场班次
229   - *
230   - * @params : [st--当前路牌最后一个班次的到达时间;ar--当前路牌下的早晚例保、吃饭班次数组,pa--当前路牌下的进出场班次数组]
231   - *
232   - * @return
233   - */
234   - function jsjclc(st,ar,pa,sjstr,fcno_,tempS,fxdm) {
235   - console.log('{' + tempS + '......}')
236   - // 1、修改进出场班次.
237   - for(var p = 0;p<pa.length;p++) {
238   - // A)、如果当前班次的发车时间等于 在没有调整班次总数之前的最后一个班次的到达时间,则这个班次是在没有调整班次之前的那个进场班次
239   - if(pa[p].fcsj == sjstr && pa[p].bcType =='in') {
240   - pa[p].fcsj = st;
241   - pa[p].bcsj = obj.configuration.dataMap.ccsjArr[fxdm];
242   - pa[p].xlDir = obj.configuration.dataMap.dira[fxdm];
243   - var _s = bf.getDateTime(st);
244   - var _tt = new Date(_s);
245   - _tt.setMinutes(_tt.getMinutes()+pa[p].bcsj);
246   - var ddsjStr = bf.getTimeStr(_tt);
247   - pa[p].ARRIVALTIME = ddsjStr;
248   - if(tempS =='add')
249   - pa[p].fcno = pa[p].fcno+fcno_;
250   - else if(tempS =='jq')
251   - pa[p].fcno = pa[p].fcno-fcno_;
252   - }
253   - // B)、剔除掉 当前班次的到达时间大于调整班次过后最后一个班次到达时间的班次
254   - if((bf.getDateTime(pa[p].ARRIVALTIME)-bf.getDateTime(st))/60000 > pa[p].bcsj) {
255   - console.log('{' + pa[p].lpNo + '----' + pa[p].ARRIVALTIME + '----' + st + '}');
256   - console.log('修改进出场班次时...该班次的到达时间大于了最后一个班次的到达时间,应该剔除掉!');
257   - pa.splice(p,1);
258   - }
  226 +
  227 + /**
  228 + * @description : (TODO) 调整时间
  229 + *
  230 + * @params : [a1-- 当前路牌下的正常班次数组;a2--当前路牌下的早晚例保、吃饭班次数组;a3--当前路牌下的进出场班次数组]
  231 + *
  232 + * @return : 返回一个数组.这里返回的是一个调整时间后的班次数组
  233 + */
  234 + function tzsj(a1,a2,a3,sjstr,fcno_,tempS,fxdm) {
  235 + return a1.concat(jsjclc(a1[a1.length-1].ARRIVALTIME,a2,a3,sjstr,fcno_,tempS,fxdm));
259 236 }
260   - // 2、修改晚例保班次.
261   - for(var i = 0 ; i<ar.length;i++) {
262   - // A)、修改离场班次属性值
263   - if(ar[i].bcType=='lc') {
264   - ar[i].fcsj = ddsjStr;
265   - ar[i].xlDir = obj.configuration.dataMap.dira[fxdm];
266   - var _lcs = bf.getDateTime(ddsjStr);
267   - var _lctt = new Date(_lcs);
268   - _lctt.setMinutes(_lctt.getMinutes()+ar[i].bcsj);
269   - ar[i].ARRIVALTIME = bf.getTimeStr(_lctt);
270   - if(tempS =='add')
271   - ar[i].fcno = ar[i].fcno+fcno_;
272   - else if(tempS =='jq')
273   - ar[i].fcno = ar[i].fcno-fcno_;
  237 +
  238 + /**
  239 + * @description : (TODO)调整进出场、离场班次
  240 + *
  241 + * @params : [st--当前路牌最后一个班次的到达时间;ar--当前路牌下的早晚例保、吃饭班次数组,pa--当前路牌下的进出场班次数组]
  242 + *
  243 + * @return
  244 + */
  245 + function jsjclc(st,ar,pa,sjstr,fcno_,tempS,fxdm) {
  246 + // 1、修改进出场班次.
  247 + for(var p = 0;p<pa.length;p++) {
  248 + // A)、如果当前班次的发车时间等于 在没有调整班次总数之前的最后一个班次的到达时间,则这个班次是在没有调整班次之前的那个进场班次
  249 + if(pa[p].fcsj == sjstr && pa[p].bcType =='in') {
  250 + pa[p].fcsj = st;
  251 + pa[p].bcsj = obj.configuration.dataMap.ccsjArr[fxdm];
  252 + pa[p].xlDir = obj.configuration.dataMap.dira[fxdm];
  253 + var _s = bf.getDateTime(st);
  254 + var _tt = new Date(_s);
  255 + _tt.setMinutes(_tt.getMinutes()+pa[p].bcsj);
  256 + var ddsjStr = bf.getTimeStr(_tt);
  257 + pa[p].ARRIVALTIME = ddsjStr;
  258 + if(tempS =='add')
  259 + pa[p].fcno = pa[p].fcno+fcno_;
  260 + else if(tempS =='jq')
  261 + pa[p].fcno = pa[p].fcno-fcno_;
  262 + }
  263 + // B)、剔除掉 当前班次的到达时间大于调整班次过后最后一个班次到达时间的班次
  264 + if((bf.getDateTime(pa[p].ARRIVALTIME)-bf.getDateTime(st))/60000 > pa[p].bcsj) {
  265 + console.log('{' + pa[p].lpNo + '----' + pa[p].ARRIVALTIME + '----' + st + '}');
  266 + console.log('修改进出场班次时...该班次的到达时间大于了最后一个班次的到达时间,应该剔除掉!');
  267 + pa.splice(p,1);
  268 + }
274 269 }
275   - // B)、剔除掉 当前班次的到达时间大于调整班次过后最后一个班次到达时间的班次
276   - if(bf.getDateTime(ar[i].ARRIVALTIME)>bf.getDateTime(st) && ar[i].bcType!='lc') {
277   - console.log('{' + ar[i].lpNo + '----' + ar[i].ARRIVALTIME + '----' + st + '}')
278   - console.log('修改晚例保班次时...该班次的到达时间大于了最后一个班次的到达时间,应该剔除掉!');
279   - ar.splice(i,1);
  270 + // 2、修改晚例保班次.
  271 + for(var i = 0 ; i<ar.length;i++) {
  272 + // A)、修改离场班次属性值
  273 + if(ar[i].bcType=='lc') {
  274 + ar[i].fcsj = ddsjStr;
  275 + ar[i].xlDir = obj.configuration.dataMap.dira[fxdm];
  276 + var _lcs = bf.getDateTime(ddsjStr);
  277 + var _lctt = new Date(_lcs);
  278 + _lctt.setMinutes(_lctt.getMinutes()+ar[i].bcsj);
  279 + ar[i].ARRIVALTIME = bf.getTimeStr(_lctt);
  280 + if(tempS =='add')
  281 + ar[i].fcno = ar[i].fcno+fcno_;
  282 + else if(tempS =='jq')
  283 + ar[i].fcno = ar[i].fcno-fcno_;
  284 + }
  285 + // B)、剔除掉 当前班次的到达时间大于调整班次过后最后一个班次到达时间的班次
  286 + if(bf.getDateTime(ar[i].ARRIVALTIME)>bf.getDateTime(st) && ar[i].bcType!='lc') {
  287 + console.log('{' + ar[i].lpNo + '----' + ar[i].ARRIVALTIME + '----' + st + '}')
  288 + console.log('修改晚例保班次时...该班次的到达时间大于了最后一个班次的到达时间,应该剔除掉!');
  289 + ar.splice(i,1);
  290 + }
280 291 }
281   - }
282   - // 3、合并进出场、例保班次,并返回.
283   - return pa.concat(ar);
284   - }
  292 + // 3、合并进出场、例保班次,并返回.
  293 + return pa.concat(ar);
  294 + }
  295 + } else{
  296 + error.show('参数异常!','【 obj:' + obj + ' , cardata:' + cardata + ' , bf:' + bf + '】');
  297 + }
285 298 });
286 299 </script>
287 300 \ No newline at end of file
... ...
src/main/resources/static/pages/base/timesmodel/editlp.html 0 → 100644
  1 +<!-- 修改路牌名称 -->
  2 +<div class="modal fade" id="editlp_mobal" tabindex="-1" role="basic" aria-hidden="true">
  3 + <div class="modal-dialog">
  4 + <div class="modal-content">
  5 + <div class="modal-header">
  6 + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
  7 + <h4 class="modal-title">修改路牌名称</h4>
  8 + </div>
  9 + <div class="modal-body">
  10 + <form class="form-horizontal" action="/" method="post" id="editlpForm" role="form">
  11 + <!-- alert-danger 组件START -->
  12 + <div class="alert alert-danger display-hide" id="editlpAlert">
  13 + <button class="close" data-close="alert"></button>
  14 + 您的输入有误,请检查下面的输入项
  15 + </div>
  16 + <div class="portlet-body">
  17 + <div class="table-container" style="margin-top: 10px">
  18 + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_bctz">
  19 + <thead>
  20 + <tr role="row" class="heading">
  21 + <th width="50%">当前路牌名称</th>
  22 + <th width="50%" style="text-align: center;max-width: 50px;min-width: 40px;padding-left: 0;padding-right: 0;">修改路牌名称</th>
  23 + </tr>
  24 + </thead>
  25 + <tbody></tbody>
  26 + </table>
  27 + </div>
  28 + </div>
  29 + </form>
  30 + </div>
  31 + <div class="modal-footer">
  32 + <button type="button" class="btn default" data-dismiss="modal">取消</button>
  33 + <button type="button" class="btn btn-primary" id="editlpnext">确定</button>
  34 + </div>
  35 + </div>
  36 + </div>
  37 +</div>
  38 +<script type="text/html" id="editlp_temp">
  39 +{{each list as obj i }}
  40 + <tr role="row" class="filter">
  41 + <td>
  42 + <input type="text" readonly class="form-control form-filter input-sm" name="lpname_{{i+1}}" value="{{obj.lpName}}">
  43 + </td>
  44 + <td>
  45 + <input type="text" class="form-control form-filter input-sm" name="{{i+1}}" value="{{obj.lpName}}" required>
  46 + </td>
  47 + </tr>
  48 +{{/each}}
  49 +{{if list.length == 0}}
  50 + <tr>
  51 + <td colspan=3><h6 class="muted">没有找到相关数据</h6></td>
  52 + </tr>
  53 + {{/if}}
  54 +</script>
  55 +<script type="text/javascript">
  56 +$('#editlp_mobal').on('editlpMobal.show', function(e,obj,bf){
  57 + var lpArray = obj.configuration.taskTypes;
  58 + setTimeout(function(){
  59 + // 加载延迟200毫秒显示mobal
  60 + $('#editlp_mobal').modal({show : true,backdrop: 'static', keyboard: false});
  61 + },200);
  62 + // 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。
  63 + $('#editlp_mobal').on('show.bs.modal', function () {
  64 + // 把数据填充到模版中
  65 + var tbodyHtml = template('editlp_temp',{list:lpArray});
  66 + // 把渲染好的模版html文本追加到表格中
  67 + $('#datatable_bctz tbody').html(tbodyHtml);
  68 + });
  69 + // 获取表单元素
  70 + var form = $('#editlpForm');
  71 + // 错误提示元素
  72 + var editlpAlert = $('#editlpAlert', form);
  73 + // 下一步点击事件
  74 + $('#editlpnext').on('click', function() {
  75 + form.submit();// 表单提交
  76 + });
  77 + // 表单验证
  78 + form.validate({
  79 + errorElement : 'span',
  80 + errorClass : 'help-block help-block-error',
  81 + focusInvalid : false,
  82 + rules : {
  83 + },
  84 + invalidHandler : function(event, validator) {
  85 + editlpAlert.show();
  86 + App.scrollTo(editlpAlert, -200);
  87 + },
  88 + highlight : function(element) {
  89 + $(element).closest('.form-group').addClass('has-error');
  90 + },
  91 + unhighlight : function(element) {
  92 + $(element).closest('.form-group').removeClass('has-error');
  93 + },
  94 + success : function(label) {
  95 + label.closest('.form-group').removeClass('has-error');
  96 + },
  97 + submitHandler : function(f) {
  98 + // 1、 获取表单内容,并序列化
  99 + var params = form.serializeJSON();
  100 + var data = obj.getDataArray();
  101 + // 2、 调整路牌对应的班次总数
  102 + updFormParams(params,data);
  103 + // 删除图形.
  104 + $('svg.svg-chart').remove();
  105 + // 重新创建图形.
  106 + var graph_ = d3.select('#ganttSvg').relationshipGraph(obj.configuration);
  107 + // 根据数据重新渲染图形.
  108 + obj.data(data);
  109 + // 记录早操.并保存历史班次数据
  110 + obj.addHistory();
  111 + // 隐藏错误提示
  112 + editlpAlert.hide();
  113 + // 隐藏 reladplus_mobal 弹出层
  114 + $('#editlp_mobal').modal('hide');
  115 + layer.msg('修改路牌名称成功!');
  116 + }
  117 + });
  118 + function updFormParams(p,data) {
  119 + for(var i= 0;i<lpArray.length;i++) {
  120 + if(p[i+1] != undefined) {
  121 + if(lpArray[i].lpName != p[i+1]) {
  122 + for(var d = 0 ; d< data.length;d++) {
  123 + if(data[d].lpName == lpArray[i].lpName) {
  124 + data[d].lpName = p[i+1];
  125 + }
  126 +
  127 + }
  128 + lpArray[i].lpName = p[i+1];
  129 + obj.configuration.lpNameA[i] = p[i+1];
  130 + }
  131 + }
  132 + }
  133 + }
  134 +});
  135 +</script>
0 136 \ No newline at end of file
... ...
src/main/resources/static/pages/base/timesmodel/gantt.html
... ... @@ -87,7 +87,7 @@
87 87 </li>
88 88 <li>
89 89 <a href="javascript:" class="tool-action aboutread">
90   - <i class="fa fa-arrows-v"></i>&nbsp;调整班次
  90 + <i class="fa fa-arrows-v"></i>&nbsp;班次调整
91 91 </a>
92 92 </li>
93 93 </ul>
... ... @@ -116,4 +116,5 @@
116 116 <script src="/pages/base/timesmodel/js/ContextJS/js/context.js"></script>
117 117 <script src="/pages/base/timesmodel/js/base-fun.js"></script>
118 118 <script src="/pages/base/timesmodel/js/d3.relationshipgraph.js"></script>
  119 +<script src="/pages/base/timesmodel/js/errorinfo.js"></script>
119 120 <script src="/pages/base/timesmodel/js/gantt.js"></script>
120 121 \ No newline at end of file
... ...
src/main/resources/static/pages/base/timesmodel/js/add-form-reload.js
... ... @@ -46,7 +46,8 @@
46 46 obj.jhlc = d[i].jhlc;// 计划里程
47 47 obj.lp = d[i].lp==null ? null : d[i].lp.id;// 路牌id
48 48 obj.lpType = d[i].lp==null ? null : d[i].lp.lpType;// 路牌类型
49   - obj.parent = d[i].lp.lpName;// 路牌名称
  49 + obj.parent = d[i].lp.lpNo;// 路牌名称
  50 + obj.lpName = d[i].lp.lpName;
50 51 obj.lpNo = d[i].lp.lpNo;// 路牌编码
51 52 obj.tcc = d[i].tcc==null ? null : d[i].tcc.id;// 停车场id
52 53 obj.ttinfo = d[i].ttinfo==null ? null : d[i].ttinfo.id;// 时刻表id
... ... @@ -60,7 +61,7 @@
60 61 resultD.push(obj);
61 62 if(lpA.indexOf(obj.lpNo)<0) {
62 63 lpA.push(obj.lpNo);
63   - rsLpA.push({'lp':obj.lp,'lpNo':obj.lpNo,'lpName':obj.parent,'lpType':obj.lpType});
  64 + rsLpA.push({'lp':obj.lp,'lpNo':obj.lpNo,'lpName':obj.lpName,'lpType':obj.lpType});
64 65 }
65 66 }
66 67 // 返回渲染图形的数据格式.
... ...
src/main/resources/static/pages/base/timesmodel/js/add-form-wizard.js
... ... @@ -407,7 +407,9 @@ var SKBFormWizard = function() {
407 407 obj.jhlc = d[i].jhlc;// 计划里程
408 408 obj.lp = d[i].lp==null ? null : d[i].lp.id;// 路牌id
409 409 obj.lpType = d[i].lp==null ? null : d[i].lp.lpType;// 路牌类型
410   - obj.parent = d[i].lp.lpName;// 路牌名称
  410 + // obj.parent = d[i].lp.lpName;// 路牌名称
  411 + // obj.parent = parseInt(d[i].lp.lpNo);// 路牌名称
  412 + obj.lpName = d[i].lp.lpName;
411 413 obj.lpNo = d[i].lp.lpNo;// 路牌编码
412 414 obj.tcc = d[i].tcc==null ? null : d[i].tcc.id;// 停车场id
413 415 obj.ttinfo = d[i].ttinfo==null ? null : d[i].ttinfo.id;// 时刻表id
... ... @@ -421,7 +423,7 @@ var SKBFormWizard = function() {
421 423 resultD.push(obj);
422 424 if(lpA.indexOf(obj.lpNo)<0) {
423 425 lpA.push(obj.lpNo);
424   - rsLpA.push({'lp':obj.lp,'lpNo':obj.lpNo,'lpName':obj.parent,'lpType':obj.lpType});
  426 + rsLpA.push({'lp':obj.lp,'lpNo':obj.lpNo,'lpName':obj.lpName,'lpType':obj.lpType});
425 427 }
426 428 }
427 429 // 返回渲染图形的数据格式.
... ...
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
... ... @@ -332,6 +332,8 @@ var BaseFun = function() {
332 332 var rs = new Array(),bxrcgs= new Array();
333 333 // 遍历已分配好路牌的班型人次数组.
334 334 for(var x = 0 ; x < bxrclist.length; x++) {
  335 + /*if(x>0)
  336 + continue;*/
335 337 // 定义当前班型人次下的路牌数组.
336 338 var cla = bxrclist[x].sslp;
337 339 var dsdnmb = bxrclist[x].rs/bxrclist[x].fpcls;
... ... @@ -339,12 +341,13 @@ var BaseFun = function() {
339 341 var hoursV = bxrclist[x].hoursV*dsdnmb;
340 342 // 遍历路牌
341 343 for(var s = 0 ; s < cla.length; s++) {
  344 + /*if(s>1 || s==0)
  345 + continue;*/
342 346 //cla[s].lpName = bxrclist[x].type;
343 347 // 获取路牌编号.
344 348 var lpNo = cla[s].lpNo;
345 349 // 定义路牌下的所有班次.
346 350 var lpbc = new Array();
347   - bxrcgs.push({'lpNo':lpNo,'hoursV':hoursV,'type':bxrclist[x].type});
348 351 // 遍历班次数.
349 352 for(var i =0 ; i <jsonArray.length; i++) {
350 353 // 判断当期遍历的班次是否属于当前的路牌.
... ... @@ -359,10 +362,20 @@ var BaseFun = function() {
359 362 cara[l].lpName = bxrclist[x].type + '_' + lpNo ;
360 363 }
361 364 }
  365 + var _obj = baseF.getsxAndxxbc(lpbc,dataMap);
  366 + baseF.tcbc(_obj.sxbc,dataMap.smbcsjArr[0].kssj,dataMap.smbcsjArr[0].jssj);// 剔除上行不在时间范围内的班次
  367 + baseF.tcbc(_obj.xxbc,dataMap.smbcsjArr[1].kssj,dataMap.smbcsjArr[1].jssj);// 剔除下行不在时间范围内的班次
  368 + var tcnofwlpbc = _obj.sxbc.concat(_obj.xxbc);
362 369 // 按照发车序号顺序排序.
363   - lpbc.sort(function(a,b){return b.fcno-a.fcno});
  370 + tcnofwlpbc.sort(function(a,b){return b.fcno-a.fcno});
  371 + /*var gsv = 0 ;
  372 + for(var z = 0 ;z < tza.length;z++) {
  373 + gsv = gsv + tza[z].bcsj + tza[z].STOPTIME;
  374 + }*/
  375 + // parseFloat((gsv/60).toFixed(2))
  376 + bxrcgs.push({'lpNo':lpNo,'hoursV':hoursV,'type':bxrclist[x].type});
364 377 // 调整班次数.也就是说调整工时.
365   - rs = rs.concat(baseF.tzlpgs01(lpbc,hoursV,map,dataMap,lpNo,saa,bxrclist[x].type,lpNo,cara.length));
  378 + rs = rs.concat(baseF.tzlpgs01(tcnofwlpbc,hoursV,map,dataMap,lpNo,saa,bxrclist[x].type,lpNo,cara.length));
366 379 }
367 380 }
368 381 var jar01 = baseF.tzsmbcsj01(
... ... @@ -375,25 +388,329 @@ var BaseFun = function() {
375 388 var jar = baseF.tzsmbcsj01(
376 389 baseF.setbcsAndfcno(baseF.tzsmbcsj01(baseF.setbcsAndfcno(baseF.tzsztest(cara,jar01,dataMap)),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap)),
377 390 dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap);
378   - var resultJA = new Array();
  391 + // return {'json':jar,'bxrcgs':bxrcgs};
  392 + for(var r = 0 ; r < bxrcgs.length; r++) {
  393 + var lpNo = bxrcgs[r].lpNo;
  394 + var gsv = 0 , bczs = 0;
  395 + for(var g = 0 ; g< jar.length; g++) {
  396 + if(jar[g].lpNo == lpNo) {
  397 + gsv = gsv + jar[g].bcsj + jar[g].STOPTIME;
  398 + bczs++;
  399 + }
  400 + }
  401 + bxrcgs[r].sjgsV = gsv;
  402 + bxrcgs[r].bczs = bczs;
  403 + }
  404 + //debugger;
  405 + var jar3 = baseF.dqbcsAndgs(bxrcgs,jar,dataMap,cara.length);
  406 + // return {'json':jar3,'bxrcgs':bxrcgs};
  407 + /*var jar4 = baseF.tzsmbcsj01(
  408 + baseF.setbcsAndfcno(baseF.tzsmbcsj01(baseF.setbcsAndfcno(baseF.tzsztest(cara,jar3,dataMap)),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap)),
  409 + dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj,dataMap);*/
  410 + var rsjar = baseF.tzsztest(cara,jar3,dataMap);
  411 + // return {'json':rsjar,'bxrcgs':bxrcgs};
  412 + return {'json':baseF.addjcclcbc01(cara,rsjar,dataMap,saa,map),'bxrcgs':bxrcgs};
  413 + },
  414 +
  415 + addjcclcbc01 : function(cara,rsjar,dataMap,saa,map) {
  416 + var resultJA = new Array(),bcs = 0;
379 417 for(var m = 0 ; m < cara.length; m++) {
380 418 // 获取路牌编号.
381 419 var lpNo_ = cara[m].lpNo;
382 420 // 定义路牌下的所有班次.
383 421 var lpbc_ = new Array();
384 422 // 遍历班次数.
385   - for(var x =0 ; x <jar.length; x++) {
  423 + for(var x =0 ; x <rsjar.length; x++) {
386 424 // 判断当期遍历的班次是否属于当前的路牌.
387   - if(jar[x].lpNo == lpNo_) {
388   - delete jar[x].fcint;
389   - lpbc_.push(jar[x]);
  425 + if(rsjar[x].lpNo == lpNo_) {
  426 + delete rsjar[x].fcint;
  427 + lpbc_.push(rsjar[x]);
390 428 }
391 429 }
392 430 // 按照发车序号顺序排序.
393 431 lpbc_.sort(function(a,b){return a.fcno-b.fcno});
394   - resultJA = resultJA.concat(baseF.addjclbbc01(lpbc_,dataMap,saa[0].lbsj,map));
  432 + baseF.addcfbc01(lpbc_,dataMap,map);
  433 + // 按照发车序号顺序排序.
  434 + // lpbc_.sort(function(a,b){return a.fcno-b.fcno});
  435 + var tt = baseF.addjclbbc01(lpbc_,dataMap,saa[0].lbsj,map);
  436 + bcs = baseF.updfcno01(tt,bcs);
  437 + resultJA = resultJA.concat(tt);
  438 + }
  439 + return resultJA;
  440 + },
  441 +
  442 + updfcno01 : function(bcArr,bcs) {
  443 + for(var i =0; i < bcArr.length;i++) {
  444 + bcArr[i].fcint = baseF.getDateTime(bcArr[i].fcsj).getTime();
  445 + }
  446 + bcArr.sort(function(a,b){return a.fcint-b.fcint});
  447 + for(var t = 0 ; t <bcArr.length;t++) {
  448 + bcs++;
  449 + bcArr[t].bcs = bcs;
  450 + bcArr[t].fcno = t+1;
  451 + delete bcArr[t].fcint;
  452 + }
  453 + return bcs;
  454 + },
  455 +
  456 + addcfbc01 : function(lpbcar,dataMap,map) {
  457 + var gs = 0 ,sicftag = true;
  458 + for(var g = 0 ; g <lpbcar.length-1;g++ ) {
  459 + if( parseInt((baseF.getDateTime(lpbcar[g+1].fcsj) - baseF.getDateTime(lpbcar[g].ARRIVALTIME))/60000) > 80
  460 + && lpbcar[g].STOPTIME==0 ) {
  461 + lpbcar[g].isfb = 1;
  462 + }
  463 + /*gs = gs + lpbcar[g].bcsj + lpbcar[g].STOPTIME;
  464 + if(lpbcar[g].STOPTIME==0 && g>0 && g<(lpbcar.length-1)) {
  465 + debugger;
  466 + lpbcar[g].isfb = 1;
  467 + sicftag = false;
  468 + }*/
  469 + }
  470 + /*if(sicftag) {
  471 + for(var j = 0 ; j <lpbcar.length;j ++ ) {
  472 + var kssj = baseF.getDateTime(lpbcar[j].fcsj);
  473 + var tzsj = lpbcar[j].STOPTIME;
  474 + var cctag = baseF.dirDmToIndex(lpbcar[j].xlDir);
  475 + var cfdd = baseF.getcfdd(map.cfdd,cctag);
  476 + if(kssj> new Date (baseF.getCFDate(10,30)) &&
  477 + kssj<new Date (baseF.getCFDate(11,30)) && cfdd == cctag) {
  478 + console.log(tzsj,lpbcar[j].fcsj);
  479 + rs.push(baseF.getbcObj(
  480 + kssj,dataMap.zwcArr[0],cara[c],dataMap.bcTypeArr.cf,
  481 + dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));
  482 +
  483 + }else if(kssj > new Date (baseF.getCFDate(18,30)) &&
  484 + kssj < new Date (baseF.getCFDate(19,30)) && cfdd == cctag ) {
  485 + console.log(tzsj,lpbcar[j].fcsj);
  486 + rs.push(baseF.getbcObj(
  487 + kssj,dataMap.zwcArr[1],cara[c],dataMap.bcTypeArr.cf,
  488 + dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));
  489 +
  490 + }
  491 + }
  492 + }*/
  493 + },
  494 +
  495 + dqbcsAndgs : function(bxrcgs,jar,dataMap,cla) {
  496 + var bxA = new Array(),rsA = new Array();
  497 + for(var b = 0 ;b <bxrcgs.length; b++) {
  498 + if(bxA.indexOf(bxrcgs[b].type)<0)
  499 + bxA.push(bxrcgs[b].type);
  500 + }
  501 + var maxXxsjA = [parseInt(dataMap.map.upTravelTime),parseInt(dataMap.map.downTravelTime)];
  502 + var v1 = Math.max.apply(null, maxXxsjA) *1.5;
  503 + for(var a = 0 ;a < bxA.length;a++) {
  504 + var type = bxA[a],bxszA = new Array();
  505 + for(var s = 0 ; s < bxrcgs.length; s++) {
  506 + if(type == bxrcgs[s].type)
  507 + bxszA.push({'szgs':bxrcgs[s].sjgsV,'szbc' : bxrcgs[s].bczs, 'lpNo':bxrcgs[s].lpNo,'type' :bxrcgs[s].type});
  508 + }
  509 + var lpA = new Array();
  510 + if(bxszA.length>1) {
  511 + /*bxszA.sort(function(c,d){return ((c.szbc - d.szbc) && (c.szgs - d.szgs))});*/
  512 + bxszA.sort(function(c,d){return d.szgs - c.szgs});
  513 + for(var t = 0 ;t < bxszA.length;t++) {
  514 + var lpN_ = bxszA[t].lpNo;
  515 + /*if(lpN_==bxszA[0].lpNo)
  516 + continue;*/
  517 + var dx = bxszA[t].szbc - bxszA[0].szbc;
  518 + var type_ = bxszA[t].type;
  519 + lpA = baseF.getlpbcA(lpN_,jar);
  520 + lpA.sort(function(x,y){return y.fcno - x.fcno});
  521 + var tempTag = false;
  522 + var isyddygbc = !baseF.issmbcsjArr(lpA[lpA.length-1].fcsj,dataMap.smbcsjArr);
  523 + var isydzhygbc = !baseF.issmbcsjArr(lpA[0].fcsj,dataMap.smbcsjArr);
  524 + if(dx>0) {
  525 + for(var j = 0 ; j < dx ; j++) {
  526 + for(var k = 0 ; k<lpA.length;k++) {
  527 + // 得到当前路牌下的发车时间.
  528 + var dqbcfcsj = baseF.getDateTime(lpA[k].fcsj);
  529 + // 判断时间范围.
  530 + if(dataMap.zgfsjd[0].ed < dqbcfcsj && dqbcfcsj < dataMap.wgfsjd[0].st) {
  531 + lpA.splice(k,1);
  532 + break;
  533 + }
  534 + }
  535 + }
  536 + tempTag = true;
  537 + }else if(bxszA[t].szgs < bxszA[0].szgs) {
  538 + var gsdx = bxszA[0].szgs - bxszA[t].szgs;
  539 + // console.log(gsdx + '---' + lpN_);
  540 + if(gsdx<=v1) {
  541 + if(isyddygbc && isydzhygbc) {
  542 + var dygbcydx = 0,zhygbcydx = 0;
  543 + if(gsdx%2==0) {
  544 + dygbcydx = gsdx/2;
  545 + zhygbcydx = dygbcydx;
  546 + }else {
  547 + dygbcydx = gsdx%2;
  548 + zhygbcydx = gsdx - dygbcydx;
  549 + }
  550 + baseF.dygbcUpd(lpA[lpA.length-1],dygbcydx);
  551 + baseF.zhygbcUpd(lpA[0],lpA[1],zhygbcydx);
  552 + }else if(isyddygbc) {
  553 + baseF.dygbcUpd(lpA[lpA.length-1],gsdx);
  554 + }else if(isydzhygbc) {
  555 + baseF.zhygbcUpd(lpA[0],lpA[1],gsdx);
  556 + }
  557 + }else {
  558 + var isZerInt = baseF.istzsjZero(lpA,dataMap);
  559 + var vag = 0,avgdx = 0;
  560 + if(gsdx % isZerInt==0) {
  561 + vag = gsdx / isZerInt;
  562 + }else {
  563 + vag = parseInt(gsdx / isZerInt);
  564 + avgdx = gsdx - vag*isZerInt;
  565 + if(isyddygbc && isydzhygbc) {
  566 + var dygbcydx = 0,zhygbcydx = 0;
  567 + if(avgdx%2==0) {
  568 + dygbcydx = avgdx/2;
  569 + zhygbcydx = dygbcydx;
  570 + }else {
  571 + dygbcydx = avgdx%2;
  572 + zhygbcydx = avgdx - dygbcydx;
  573 + }
  574 + baseF.dygbcUpd(lpA[lpA.length-1],dygbcydx);
  575 + baseF.zhygbcUpd(lpA[0],lpA[1],zhygbcydx);
  576 + }else if(isyddygbc) {
  577 + baseF.dygbcUpd(lpA[lpA.length-1],avgdx);
  578 + }else if(isydzhygbc) {
  579 + baseF.zhygbcUpd(lpA[0],lpA[1],avgdx);
  580 + }
  581 + }
  582 + var qbbfbc = new Array();
  583 + for(var v = 1 ; v < lpA.length;v++) {
  584 + var ddsj = baseF.getDateTime(lpA[v-1].fcsj);
  585 + if(baseF.getDateTime("13:00") <= baseF.getDateTime(lpA[v].fcsj)) {
  586 + if(lpA[v].STOPTIME > 0 && !baseF.issmbcsjArr(lpA[v].fcsj,dataMap.smbcsjArr) ) {
  587 + lpA[v].STOPTIME = lpA[v].STOPTIME + vag;
  588 + ddsj.setMinutes(ddsj.getMinutes() - lpA[v].STOPTIME);
  589 + lpA[v].ARRIVALTIME = baseF.getTimeStr(ddsj);
  590 + ddsj.setMinutes(ddsj.getMinutes() - lpA[v].bcsj);
  591 + lpA[v].fcsj = baseF.getTimeStr(ddsj);
  592 +
  593 + }
  594 + }else {
  595 + if(!baseF.issmbcsjArr(lpA[v].fcsj,dataMap.smbcsjArr)) {
  596 + qbbfbc.push(lpA[v]);
  597 + }
  598 + }
  599 + }
  600 + qbbfbc.sort(function(x,y){return x.fcno - y.fcno});
  601 + for(var q = 0 ; q < qbbfbc.length; q++) {
  602 + if(q<(qbbfbc.length-1))
  603 + qbbfbc[q].STOPTIME = qbbfbc[q].STOPTIME + vag;
  604 + if(q==0) {
  605 + var fcsj_ = baseF.getDateTime(qbbfbc[q].fcsj);
  606 + fcsj_.setMinutes(fcsj_.getMinutes() + qbbfbc[q].bcsj);
  607 + qbbfbc[q].ARRIVALTIME = baseF.getTimeStr(fcsj_);
  608 + }else {
  609 + var ddsj_ = baseF.getDateTime(qbbfbc[q-1].ARRIVALTIME);
  610 + ddsj_.setMinutes(ddsj_.getMinutes() + qbbfbc[q-1].STOPTIME);
  611 + qbbfbc[q].fcsj = baseF.getTimeStr(ddsj_);
  612 + ddsj_.setMinutes(ddsj_.getMinutes() + qbbfbc[q].bcsj);
  613 + qbbfbc[q].ARRIVALTIME = baseF.getTimeStr(ddsj_);
  614 + }
  615 + }
  616 + }
  617 + }
  618 + var start = baseF.getDateTime(lpA[0].ARRIVALTIME);
  619 + var end = baseF.getDateTime(lpA[lpA.length-1].fcsj);
  620 + var hourdx = start.getHours() - end.getHours();
  621 + var minuedx = hourdx* 60 + (start.getMinutes() - end.getMinutes()) + lpA[0].STOPTIME;
  622 + var dx = 0;
  623 + /*if(minuedx > bxszA[0].szgs && tempTag) {
  624 + dx = minuedx - bxszA[0].szgs;
  625 + console.log(dx);
  626 + }else */
  627 + if(minuedx < bxszA[0].szgs && tempTag) {
  628 + dx = bxszA[0].szgs - minuedx;
  629 + if(dx > v1 && isyddygbc && isydzhygbc) {
  630 + var dygbcydx = 0,zhygbcydx = 0;
  631 + if(dx%2==0) {
  632 + dygbcydx = dx/2;
  633 + zhygbcydx = dygbcydx;
  634 + }else {
  635 + dygbcydx = dx%2;
  636 + zhygbcydx = dx - dygbcydx;
  637 + }
  638 + baseF.dygbcUpd(lpA[lpA.length-1],dygbcydx);
  639 + baseF.zhygbcUpd(lpA[0],lpA[1],zhygbcydx);
  640 + }else {
  641 + if(isyddygbc && isydzhygbc) {
  642 + var dygbcydx = 0,zhygbcydx = 0;
  643 + if(dx%2==0) {
  644 + dygbcydx = dx/2;
  645 + zhygbcydx = dygbcydx;
  646 + }else {
  647 + dygbcydx = dx%2;
  648 + zhygbcydx = dx - dygbcydx;
  649 + }
  650 + baseF.dygbcUpd(lpA[lpA.length-1],dygbcydx);
  651 + baseF.zhygbcUpd(lpA[0],lpA[1],zhygbcydx);
  652 + }else if(isyddygbc) {
  653 + baseF.dygbcUpd(lpA[lpA.length-1],dx);
  654 + }else if(isydzhygbc) {
  655 + baseF.zhygbcUpd(lpA[0],lpA[1],dx);
  656 + }
  657 + }
  658 + }
  659 + rsA = rsA.concat(lpA);
  660 + }
  661 +
  662 + }else {
  663 + rsA = rsA.concat(baseF.getlpbcA(bxszA[0].lpNo,jar));
  664 + }
  665 + }
  666 + return rsA;
  667 + },
  668 +
  669 + istzsjZero : function(arr,dataMap) {
  670 + var rsint = 0;
  671 + for(var r = 1 ; r<arr.length;r++) {
  672 + if(arr[r].STOPTIME>0 && !baseF.issmbcsjArr(arr[r].fcsj,dataMap.smbcsjArr)) {
  673 + rsint++;
  674 + }
395 675 }
396   - return {'json':resultJA,'bxrcgs':bxrcgs};
  676 + return rsint;
  677 + },
  678 +
  679 + dygbcUpd : function(obj,dx) {
  680 + obj.STOPTIME = obj.STOPTIME + dx;
  681 + var dygbcfcsj = baseF.getDateTime(obj.fcsj);
  682 + dygbcfcsj.setMinutes(dygbcfcsj.getMinutes() - dx);
  683 + obj.fcsj = baseF.getTimeStr(dygbcfcsj);
  684 +
  685 + dygbcfcsj.setMinutes(dygbcfcsj.getMinutes() + obj.bcsj);
  686 + obj.ARRIVALTIME = baseF.getTimeStr(dygbcfcsj);
  687 + },
  688 +
  689 + zhygbcUpd: function(obj,xgOjb,dx) {
  690 + xgOjb.STOPTIME = xgOjb.STOPTIME + dx;
  691 + var zhygbcydx = baseF.getDateTime(obj.fcsj);
  692 + zhygbcydx.setMinutes(zhygbcydx.getMinutes() + dx);
  693 + obj.fcsj = baseF.getTimeStr(zhygbcydx);
  694 + zhygbcydx.setMinutes(zhygbcydx.getMinutes() + obj.bcsj);
  695 + obj.ARRIVALTIME = baseF.getTimeStr(zhygbcydx);
  696 + },
  697 +
  698 + issmbcsjArr : function(str,arr) {
  699 + var tag = false;
  700 + for(var a = 0 ;a < arr.length;a++) {
  701 + if(str == arr[a].kssj || str == arr[a].jssj)
  702 + tag = true;
  703 + }
  704 + return tag;
  705 + },
  706 +
  707 + getlpbcA : function(lpN_,jar) {
  708 + var lpA = new Array();
  709 + for(var p = 0 ; p < jar.length; p++ ) {
  710 + if(jar[p].lpNo == lpN_)
  711 + lpA.push(jar[p]);
  712 + }
  713 + return lpA;
397 714 },
398 715  
399 716 tzsztest : function(cara,tempa,dataMap) {
... ... @@ -445,22 +762,36 @@ var BaseFun = function() {
445 762 },
446 763  
447 764 tztzsjInit01 : function(ar,dataMap) {
  765 + var maxXxsjA = [parseInt(dataMap.map.upTravelTime),parseInt(dataMap.map.downTravelTime)];
  766 + var v1 = Math.max.apply(null, maxXxsjA) *1.5;
448 767 for(var r = 0 ; r< ar.length-1;r++) {
449 768 var sgbcfcsj = baseF.getDateTime(ar[r+1].fcsj),dqbcddsj = baseF.getDateTime(ar[r].ARRIVALTIME);
450 769 var dxmin = parseInt( (sgbcfcsj - dqbcddsj)/60000);
451 770 if(dxmin<0 || ar[r].STOPTIME<0) {
452 771 var cctag = baseF.dirDmToIndex(ar[r].xlDir);
453 772 dxmin = ar[r].bcType == dataMap.bcTypeArr.cf ? 0 : baseF.isgfsjd01(baseF.getDateTime(ar[r].fcsj),dataMap) ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag];
454   - dqbcddsj.setMinutes(dqbcddsj.getMinutes() + dxmin);
  773 + /*dqbcddsj.setMinutes(dqbcddsj.getMinutes() + dxmin);
455 774 ar[r+1].fcsj = baseF.getTimeStr(dqbcddsj);
456 775 dqbcddsj.setMinutes(dqbcddsj.getMinutes() + ar[r+1].bcsj);
457   - ar[r+1].ARRIVALTIME = baseF.getTimeStr(dqbcddsj);
  776 + ar[r+1].ARRIVALTIME = baseF.getTimeStr(dqbcddsj);*/
458 777 /*sgbcfcsj.setMinutes(sgbcfcsj.getMinutes() - dxmin);
459 778 ar[r].ARRIVALTIME = baseF.getTimeStr(sgbcfcsj);
460 779 sgbcfcsj.setMinutes(sgbcfcsj.getMinutes() - ar[r].bcsj);
461 780 ar[r].fcsj = baseF.getTimeStr(sgbcfcsj);*/
  781 + }else if(dxmin >= v1 && dxmin < 180) {
  782 + if(r==ar.length-2 || baseF.issmbcsjArr(ar[r+1].fcsj,dataMap.smbcsjArr)) {
  783 + dxmin = dxmin;
  784 + }else {
  785 + dxmin = v1;
  786 + }
  787 + }
  788 + if(ar[r].STOPTIME >0) {
  789 + dqbcddsj.setMinutes(dqbcddsj.getMinutes() + dxmin);
  790 + ar[r+1].fcsj = baseF.getTimeStr(dqbcddsj);
  791 + dqbcddsj.setMinutes(dqbcddsj.getMinutes() + ar[r+1].bcsj);
  792 + ar[r+1].ARRIVALTIME = baseF.getTimeStr(dqbcddsj);
  793 + ar[r].STOPTIME = dxmin >= 180 ? 0 : parseInt(dxmin);
462 794 }
463   - ar[r].STOPTIME = dxmin>180 ? 0 : dxmin;
464 795 }
465 796 },
466 797  
... ... @@ -475,6 +806,7 @@ var BaseFun = function() {
475 806 if(bcArr.length<=0)
476 807 return;
477 808 var dirA = dataMap.dira;
  809 + var clzs = parseInt(dataMap.map.clzs);
478 810 for(var d = 0 ; d < dirA.length; d++) {
479 811 var fxdm = dirA[d],fxbc = new Array();
480 812 var cctag = baseF.dirDmToIndex(fxdm);
... ... @@ -500,6 +832,10 @@ var BaseFun = function() {
500 832 var _fcjx = parseInt(Math.ceil(zzsj/bcCount));
501 833 var fcnosj = new Date(kssj);
502 834 for(var l = 0 ; l< len_ ; l++) {
  835 + // 每个路牌的末班车发车时间不准动.
  836 + if(baseF.iszhclzsbc(fxbc, sjdbcArr[l].fcno , clzs)) {
  837 + continue;
  838 + }
503 839 sjdbcArr[l].fcsj = baseF.getTimeStr(fcnosj);
504 840 var _xxsj = baseF.getxssj(dataMap.zgfsjd,
505 841 dataMap.wgfsjd,fcnosj,dataMap.pcxssjArr,
... ... @@ -518,6 +854,16 @@ var BaseFun = function() {
518 854 }
519 855 },
520 856  
  857 + iszhclzsbc : function(dirA , fcno , clzs) {
  858 + var flag = false;
  859 + for(var a =1 ; a < clzs ; a++) {
  860 + if(fcno == dirA[dirA.length-a].fcno) {
  861 + flag = true;
  862 + }
  863 + }
  864 + return flag;
  865 + },
  866 +
521 867 /**
522 868 * @description : (TODO) 添加进出场班次、早晚例保班次.
523 869 *
... ... @@ -541,7 +887,25 @@ var BaseFun = function() {
541 887 dqbcfcsj,dataMap.ccsjArr[fxdm],car,dataMap.bcTypeArr.out,
542 888 dataMap.dira[fxdm],2,dataMap.cclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 出场班次
543 889 fcno ++;
544   - }else if(b==bc.length-1){
  890 + }/*else if(b > 0 && b < bc.length-1){
  891 + var jcbckssj = baseF.getDateTime(bc[b].ARRIVALTIME)
  892 + var ccbckssj = baseF.getDateTime(bc[b+1].fcsj)
  893 + var dx = parseInt((ccbckssj - jcbckssj)/60000);
  894 + if(bc[b].STOPTIME==0) {
  895 + // bc[b].STOPTIME = 0;
  896 + //console.log(bc[b].fcno);
  897 + var fcno_ = bc[b].fcno + 2;
  898 + stas = true;
  899 + // console.log(bc[b],bc[b+1],b);
  900 + result.push(baseF.getbcObj(
  901 + jcbckssj,dataMap.jcsjArr[fxdm],car,dataMap.bcTypeArr.in_,
  902 + dataMap.dira[fxdm],fcno_++,dataMap.jclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 进场班次
  903 + var ccfx = baseF.dirDmToIndex(bc[b+1].xlDir);
  904 + result.push(baseF.getbcObj(
  905 + ccbckssj,dataMap.ccsjArr[ccfx],car,dataMap.bcTypeArr.out,
  906 + dataMap.dira[ccfx],fcno_++,dataMap.cclcArr[ccfx],gatps,0,dataMap.qdzArr[ccfx],null,null,0,0));// 出场班次
  907 + }
  908 + }*/else if(b==bc.length-1){
545 909 var fcno_ = dxfno + 2;
546 910 var qdbcddsj = baseF.getDateTime(bc[b].ARRIVALTIME);
547 911 result.push(baseF.getbcObj(
... ... @@ -573,64 +937,129 @@ var BaseFun = function() {
573 937 var jczwsj = saa[0].lbsj*2 + dataMap.ccsjArr[baseF.dirDmToIndex(arr[0].xlDir)] +
574 938 dataMap.jcsjArr[baseF.dirDmToIndex(arr[arr.length-1].xlDir)];
575 939 // 定义路牌总工时.第一次切高峰之间和晚高峰之后的班次.
576   - var lpdqzgs = parseFloat(((baseF.getlpzgs(arr) + jczwsj)/60).toFixed(2));
577   - while(lpdqzgs>gs) {
578   - for(var t = 0 ; t<arr.length;t++) {
579   - // 得到当前路牌下的发车时间.
580   - var dqbcfcsj = baseF.getDateTime(arr[t].fcsj);
581   - // 判断时间范围.
582   - if(!baseF.issplice(dqbcfcsj,dataMap,type,lpNo,cla)) {
583   - arr.splice(t,1);
584   - break;
  940 + var lpdqzgs = parseFloat(((baseF.getlpzgs(arr) + jczwsj)/60).toFixed(2)),tagboolean = true;
  941 + while(tagboolean) {
  942 + if(lpdqzgs>gs) {
  943 + var temp = true ;
  944 + for(var t = 0 ; t<arr.length;t++) {
  945 + // 得到当前路牌下的发车时间.
  946 + var dqbcfcsj = baseF.getDateTime(arr[t].fcsj);
  947 + // 判断时间范围.
  948 + if(!baseF.issplice(dqbcfcsj,dataMap,type,lpNo,cla)) {
  949 + arr.splice(t,1);
  950 + temp = false;
  951 + break;
  952 + }
585 953 }
  954 + lpdqzgs = parseFloat(((baseF.getlpzgs(arr) + jczwsj)/60).toFixed(2));
  955 + if(temp)
  956 + tagboolean = false;
  957 + }else {
  958 + tagboolean = false;
586 959 }
587   - lpdqzgs = parseFloat(((baseF.getlpzgs(arr) + jczwsj)/60).toFixed(2));
588 960 }
  961 + if(arr[0].xlDir == arr[arr.length-1].xlDir) {
  962 + baseF.addbc01(arr,arr[0],dataMap);
  963 + }
  964 + var gfzjst = null
589 965 for(var c = 0 ; c<arr.length;c++) {
590 966 var cfsjbc = baseF.getDateTime(arr[c].fcsj);
591 967 if(dataMap.gfzjsjd[0].st <= cfsjbc && cfsjbc <= dataMap.gfzjsjd[0].ed && arr[c].bcType == dataMap.bcTypeArr.cf )
592 968 gfzjst = baseF.getDateTime(arr[c].ARRIVALTIME);
593 969 }
594   - gfzjst == null ? dataMap.gfzjsjd[0].st : gfzjst;
  970 + gfzjst = gfzjst == null ? dataMap.gfzjsjd[0].st : gfzjst;
595 971 var gfzjbc = new Array(),wgfbc = new Array(),zgfbc = new Array();
596   - for(var a = 0 ; a<arr.length;a++) {
597   - var tmkssj = baseF.getDateTime(arr[a].fcsj)
  972 + for(var x = 0 ; x<arr.length;x++) {
  973 + var tmkssj = baseF.getDateTime(arr[x].fcsj)
598 974 if(gfzjst <= tmkssj && tmkssj <= dataMap.gfzjsjd[0].ed)
599   - gfzjbc.push(arr[a]);
  975 + gfzjbc.push(arr[x]);
600 976 else if(dataMap.wgfsjd[0].st <= tmkssj && tmkssj <= dataMap.wgfsjd[0].ed)
601   - wgfbc.push(arr[a]);
  977 + wgfbc.push(arr[x]);
602 978 else
603   - zgfbc.push(arr[a]);
  979 + zgfbc.push(arr[x]);
604 980 }
605 981 gfzjbc.sort(function(a,b){return a.fcno-b.fcno});
606 982 wgfbc.sort(function(a,b){return a.fcno-b.fcno});
607   - if(gfzjbc[gfzjbc.length-1].xlDir == wgfbc[0].xlDir)
608   - gfzjbc.splice(gfzjbc.length-1,1);
609   - if(type!='五工二休') {
610   - var gfzjst = null;
611   - var dxmin = parseInt((baseF.getDateTime(wgfbc[0].fcsj) - baseF.getDateTime(gfzjbc[gfzjbc.length-1].ARRIVALTIME))/60000);
612   - var addmin = parseInt(dxmin/gfzjbc.length);
613   - for(var g = 0 ;g < gfzjbc.length;g++) {
614   - if(gfzjbc[g].bcType != dataMap.bcTypeArr.cf)
615   - gfzjbc[g].STOPTIME = gfzjbc[g].STOPTIME + addmin;
616   - if(g==0) {
617   - continue;
618   - }else {
619   - var tempd = baseF.getDateTime(gfzjbc[g-1].ARRIVALTIME);
620   - tempd.setMinutes(tempd.getMinutes() + gfzjbc[g-1].STOPTIME);
621   - gfzjbc[g].fcsj = baseF.getTimeStr(tempd);
622   - tempd.setMinutes(tempd.getMinutes() + gfzjbc[g].bcsj);
623   - gfzjbc[g].ARRIVALTIME = baseF.getTimeStr(tempd);
  983 + if(gfzjbc.length>0 && wgfbc.length>0) {
  984 + if(gfzjbc[gfzjbc.length-1].xlDir == wgfbc[0].xlDir && dataMap.map.linePlayType == "0"){
  985 + // addbc
  986 + baseF.addbc01(gfzjbc,gfzjbc[gfzjbc.length-1],dataMap);
  987 + }
  988 + if(type!='五工二休') {
  989 + var dxmin = parseInt((baseF.getDateTime(wgfbc[0].fcsj) - baseF.getDateTime(gfzjbc[gfzjbc.length-1].ARRIVALTIME))/60000);
  990 + var addmin = parseInt(dxmin/gfzjbc.length);
  991 + var rsM = baseF.gettzsjbs(gfzjbc,addmin,dataMap);
  992 + if(rsM.tag) {
  993 + for(var g = 0 ;g < gfzjbc.length;g++) {
  994 + if(gfzjbc[g].bcType != dataMap.bcTypeArr.cf)
  995 + gfzjbc[g].STOPTIME = gfzjbc[g].STOPTIME + addmin;
  996 + if(g==0) {
  997 + continue;
  998 + }else {
  999 + var tempd = baseF.getDateTime(gfzjbc[g-1].ARRIVALTIME);
  1000 + tempd.setMinutes(tempd.getMinutes() + gfzjbc[g-1].STOPTIME);
  1001 + gfzjbc[g].fcsj = baseF.getTimeStr(tempd);
  1002 + tempd.setMinutes(tempd.getMinutes() + gfzjbc[g].bcsj);
  1003 + gfzjbc[g].ARRIVALTIME = baseF.getTimeStr(tempd);
  1004 + }
  1005 + }
624 1006 }
  1007 + gfzjbc[gfzjbc.length-1].STOPTIME = parseInt((baseF.getDateTime(wgfbc[0].fcsj) - baseF.getDateTime(gfzjbc[gfzjbc.length-1].ARRIVALTIME))/60000);
625 1008 }
626   - gfzjbc[gfzjbc.length-1].STOPTIME = parseInt((baseF.getDateTime(wgfbc[0].fcsj) - baseF.getDateTime(gfzjbc[gfzjbc.length-1].ARRIVALTIME))/60000);
627 1009 }
628   - return gfzjbc.concat(wgfbc).concat(zgfbc);
  1010 + var rsAy = gfzjbc.concat(wgfbc).concat(zgfbc);
  1011 + rsAy.sort(function(a,b){return b.fcno-a.fcno});
  1012 + rsAy[0].STOPTIME= 0;
  1013 + return rsAy;
  1014 + },
  1015 +
  1016 + addbc01 : function(gfzjbc,lastObj,dataMap) {
  1017 + var kssj = new Date(),strArray = lastObj.ARRIVALTIME.split(':');
  1018 + kssj.setHours(parseInt(strArray[0]));
  1019 + kssj.setMinutes(parseInt(strArray[1]) + lastObj.STOPTIME);
  1020 + var cctag = baseF.dirDmToIndex(lastObj.xlDir);
  1021 + cctag = baseF.getfx(1,cctag);
  1022 + var tzsj = baseF.isgfsjd01(kssj,dataMap) ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag];
  1023 + var _xxsj = baseF.getxssj(dataMap.zgfsjd,dataMap.wgfsjd,kssj,dataMap.pcxssjArr,dataMap.gfxxsjArr,cctag);// 获取行驶时间
  1024 + // 定义班次序号
  1025 + var xhNo = lastObj.fcno+1;
  1026 + var carArray = {'lp':lastObj.lp,'lpNo':lastObj.lpNo,'lpName':lastObj.lpName,'lpType':lastObj.lpType};
  1027 + var ags = {'tcc_id':lastObj.tcc,'skbName':lastObj.ttinfo,'lineName':lastObj.xl+'_'};
  1028 + gfzjbc.push(baseF.getbcObj( kssj,
  1029 + _xxsj,
  1030 + carArray,
  1031 + 'normal',
  1032 + dataMap.dira[cctag],
  1033 + xhNo++,
  1034 + dataMap.pcxslcArr[cctag],
  1035 + ags,0,
  1036 + dataMap.qdzArr[cctag],
  1037 + dataMap.zdzArr[cctag],
  1038 + null,tzsj,0));
  1039 + },
  1040 +
  1041 + gettzsjbs : function(array,bs,dataMap) {
  1042 + var tag = true,dx = 0;
  1043 + var tempA = new Array(),maxXxsjA = [parseInt(dataMap.map.upTravelTime),parseInt(dataMap.map.downTravelTime)];
  1044 + for(var r = 0 ; r<array.length;r++) {
  1045 + tempA.push(array[r].STOPTIME + bs);
  1046 + }
  1047 + var v1 = Math.max.apply(null, maxXxsjA) *1.5;
  1048 + var v2 = Math.max.apply(null, tempA);
  1049 + if( v2 > v1) {
  1050 + tag = false;
  1051 + dx = parseInt(v2 -v1);
  1052 + }
  1053 + return {tag:tag,dx:dx};
629 1054 },
630 1055  
631 1056 issplice : function (kssj,dataMap,type,lpNo,cla){
632   - var tag = false;
633   - if(type=='五工二休' || lpNo <Math.round(cla/2)) {
  1057 + var tag = false,booleanTag = false ;
  1058 + if(cla % 2 ==0)
  1059 + booleanTag = lpNo <= Math.round(cla/2);
  1060 + else
  1061 + booleanTag = lpNo < Math.round(cla/2);
  1062 + if(type=='五工二休' || booleanTag) {
634 1063 if((dataMap.zgfsjd[0].st <=kssj && kssj<= dataMap.zgfsjd[0].ed ) ||
635 1064 ( dataMap.wgfsjd[0].st <= kssj && kssj <= dataMap.wgfsjd[0].ed))
636 1065 tag = true;
... ... @@ -1152,12 +1581,12 @@ var BaseFun = function() {
1152 1581 while(kssj<=endTime) {
1153 1582 cctag = map.linePlayType=='1' ? 0 : baseF.getfx(fxTagDm,cctag);
1154 1583 fxTagDm = 1;
1155   - var cfdd = baseF.getcfdd(map.cfdd,cctag);
  1584 + /*var cfdd = baseF.getcfdd(map.cfdd,cctag);
1156 1585 if(kssj> new Date (baseF.getCFDate(10,30)) &&
1157 1586 kssj<new Date (baseF.getCFDate(11,30)) && $_cfn<1 && cfdd == cctag) {
1158 1587 $_cfn++;
1159 1588 rs.push(baseF.getbcObj(
1160   - kssj,dataMap.zwcArr[0],cara[c],dataMap.bcTypeArr.cf,
  1589 + kssj,dataMap.zwcAr r[0],cara[c],dataMap.bcTypeArr.cf,
1161 1590 dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));// 午餐班次
1162 1591 }else if(kssj> new Date (baseF.getCFDate(18,30)) &&
1163 1592 kssj<new Date (baseF.getCFDate(19,30)) && $_cfw<1 && cfdd == cctag &&
... ... @@ -1166,15 +1595,15 @@ var BaseFun = function() {
1166 1595 rs.push(baseF.getbcObj(
1167 1596 kssj,dataMap.zwcArr[1],cara[c],dataMap.bcTypeArr.cf,
1168 1597 dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));// 晚餐班次
1169   - }
  1598 + }*/
1170 1599 var tzsj = baseF.isgfsjd01(kssj,dataMap) ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag];
1171 1600 // var tzsj = dataMap.ztjxA[cctag];
1172 1601 var _xxsj = baseF.getxssj(dataMap.zgfsjd,dataMap.wgfsjd,kssj,dataMap.pcxssjArr,dataMap.gfxxsjArr,cctag);// 获取行驶时间
1173   - tzsj = baseF.isLastbc(kssj,endTime,tzsj,_xxsj) ? 0 : tzsj;
  1602 + var xs_tzsj = baseF.isLastbc(kssj,endTime,tzsj,_xxsj) ? 0 : tzsj;
1174 1603 rs.push(baseF.getbcObj(
1175 1604 kssj,_xxsj,cara[c],dataMap.bcTypeArr.normal,
1176 1605 dataMap.dira[cctag],xhNo++,dataMap.pcxslcArr[cctag],map,0,
1177   - dataMap.qdzArr[cctag],dataMap.zdzArr[cctag],null,tzsj,0));// 正常班次
  1606 + dataMap.qdzArr[cctag],dataMap.zdzArr[cctag],null,xs_tzsj,0));// 正常班次
1178 1607 kssj = new Date(kssj.setMinutes(kssj.getMinutes() + tzsj));
1179 1608 }
1180 1609 }
... ... @@ -1266,32 +1695,7 @@ var BaseFun = function() {
1266 1695 {'type':'无工休', 'hoursV':5.43, 'minueV':'5:43'}];
1267 1696 },
1268 1697 setbcsAndfcno : function(listA) {
1269   - /*var array = new Array();
1270   - var len = listA.length;
1271   - for(var i =0;i<len;i++) {
1272   - if(array.indexOf(listA[i].lpNo)<0)
1273   - array.push(listA[i].lpNo);
1274   - }
1275   - array.sort(baseF.compare);
1276   - console.log(array);
1277   - var sortGattArray = new Array();
1278   - for(var k =0;k<array.length;k++) {
1279   - var index = array[k];
1280   - var temp = new Array();
1281   - for(var x=0;x<listA.length;x++) {
1282   - if(index==listA[x].lpNo)
1283   - temp.push(listA[x]);
1284   - }
1285   - var lpbc = baseF.sortDirArray(temp);
1286   - for(var p = 0 ;p<lpbc.length;p++) {
1287   - lpbc[p].fcno = (p+1);
1288   - }
1289   - sortGattArray = sortGattArray.concat(lpbc);
1290   - }
1291   - for(var b = 0 ; b <sortGattArray.length;b++) {
1292   - sortGattArray[b].bcs = (b+1);
1293   - }
1294   - return sortGattArray;*/
  1698 +
1295 1699 var array = new Array();
1296 1700 var len = listA.length;
1297 1701 for(var i =0;i<len;i++) {
... ... @@ -1336,8 +1740,8 @@ var BaseFun = function() {
1336 1740 var _obj = baseF.getsxAndxxbc(list);
1337 1741 baseF.tcbc(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj);// 剔除上行不在时间范围内的班次
1338 1742 baseF.tcbc(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj);// 剔除下行不在时间范围内的班次
1339   - baseF.dzsmsj(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj,_obj.xxbc);// 调整上行首末班车时间
1340 1743 baseF.dzsmsj(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 调整下行首末班车时间
  1744 + baseF.dzsmsj(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj,_obj.xxbc);// 调整上行首末班车时间
1341 1745 baseF.tzqtbc(_obj.sxbc,_obj.qt,sj,cl,zd,lbsj);
1342 1746 baseF.tzqtbc(_obj.xxbc,_obj.qt,sj,cl,zd,lbsj);
1343 1747 return _obj.sxbc.concat(_obj.xxbc).concat(_obj.qt);
... ... @@ -1353,8 +1757,14 @@ var BaseFun = function() {
1353 1757 var _obj = baseF.getsxAndxxbc(list,dm);
1354 1758 baseF.tcbc(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj ,_obj.xxbc);// 剔除上行不在时间范围内的班次
1355 1759 baseF.tcbc(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 剔除下行不在时间范围内的班次
1356   - baseF.dzsmsj(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj,_obj.xxbc);// 调整上行首末班车时间
1357   - baseF.dzsmsj(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 调整下行首末班车时间
  1760 + if(smbcsj[1].jssj < smbcsj[0].jssj ) {
  1761 + baseF.dzsmsj(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 调整下行首末班车时间
  1762 + baseF.dzsmsj(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj,_obj.xxbc);// 调整上行首末班车时间
  1763 + }else {
  1764 + baseF.dzsmsj(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj,_obj.xxbc);// 调整上行首末班车时间
  1765 + baseF.dzsmsj(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 调整下行首末班车时间
  1766 + }
  1767 +
1358 1768 return _obj.sxbc.concat(_obj.xxbc).concat(_obj.qt);
1359 1769 },
1360 1770 tcbc : function(ar,kssj,jssj,ppar) {
... ... @@ -1505,14 +1915,13 @@ var BaseFun = function() {
1505 1915 getsxAndxxbc : function(json,dataMap) {
1506 1916 var upArray = new Array(),downArray = new Array(),qt = new Array();
1507 1917 for(var j = 0 ; j< json.length ; j++) {
1508   - //json[j].fcint = baseF.getDateTime(json[j].fcsj).getTime();
1509 1918 if(json[j].bcType== dataMap.bcTypeArr.normal ||
1510 1919 json[j].bcType== dataMap.bcTypeArr.region ||
1511 1920 json[j].bcType== dataMap.bcTypeArr.major ||
1512 1921 json[j].bcType== dataMap.bcTypeArr.venting) {
1513   - if(json[j].xlDir == 'relationshipGraph-up')
  1922 + if(json[j].xlDir == dataMap.dira[0])
1514 1923 upArray.push(json[j]);
1515   - else if(json[j].xlDir == 'relationshipGraph-down')
  1924 + else if(json[j].xlDir == dataMap.dira[1])
1516 1925 downArray.push(json[j]);
1517 1926 }else if(json[j].bcType == dataMap.bcTypeArr.cf) {
1518 1927 qt.push(json[j]);
... ... @@ -1556,8 +1965,10 @@ var BaseFun = function() {
1556 1965 kssj,
1557 1966 obj.configuration.dataMap.pcxssjArr,
1558 1967 obj.configuration.dataMap.gfxxsjArr,cctag);// 获取行驶时间
1559   - tzsj = obj.configuration.dataMap.ztjxA[cctag];
1560   - var temptzsj = t == num-1 ? 0 : tzsj;
  1968 + // tzsj = obj.configuration.dataMap.ztjxA[cctag];
  1969 + var tzjx = baseF.isgfsjd01(kssj,obj.configuration.dataMap) ? obj.configuration.dataMap.gftzsj[cctag] : obj.configuration.dataMap.dgtzsj[cctag];
  1970 + var temptzsj = ((t == num-1) ? 0 : tzsj);
  1971 + /*var xs_tzsj = baseF.isLastbc(kssj,endTime,tzsj,_xxsj) ? 0 : tzsj;*/
1561 1972 jsonArray.push(baseF.getbcObj( kssj,
1562 1973 _xxsj,
1563 1974 carArray,
... ... @@ -1570,7 +1981,7 @@ var BaseFun = function() {
1570 1981 obj.configuration.dataMap.zdzArr[cctag],
1571 1982 null,temptzsj,0));
1572 1983 // kssj = new Date(kssj.setMinutes(kssj.getMinutes() + temptzsj));
1573   - kssj.setMinutes(kssj.getMinutes() + temptzsj)
  1984 + kssj.setMinutes(kssj.getMinutes() + tzjx)
1574 1985 }
1575 1986 lastObj.STOPTIME = 10;
1576 1987 },
... ...
src/main/resources/static/pages/base/timesmodel/js/d3.relationshipgraph.js
... ... @@ -229,7 +229,7 @@ $(&#39;.updownread&#39;).on(&#39;click&#39;,function() {
229 229 /************************************************************************************************************************************************/
230 230  
231 231 /**
232   - * @description : (TODO) 调整班次点击事件
  232 + * @description : (TODO) 班次调整点击事件
233 233 *
234 234 * @status OK.
235 235 ************************************************************************************************************************************************/
... ... @@ -417,31 +417,6 @@ $(&#39;.editlp&#39;).on(&#39;click&#39;,function() {
417 417 });
418 418 /************************************************************************************************************************************************/
419 419  
420   -/**
421   - * @description : (TODO)获取路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间)
422   - *
423   - * @params : [a1--班次数组;a2--路牌数组]
424   - *
425   - * @return : 返回一个数组.这里返回的是一个封装的每个路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间、班次时间为0的班次)
426   - ************************************************************************************************************************************************/
427   -var getbczs = function (a1,a2) {
428   - var array = new Array();
429   - // 1、遍历路牌数组
430   - for(var i = 0;i<a2.length;i++) {
431   - var bcs = 0;
432   - // 2、遍历班次数组
433   - for(var j =0;j<a1.length;j++) {
434   - // 3、判断当前班次j是否属于当前路牌i下,除去早晚例保班次、吃饭时间、班次时间为0的班次
435   - if(a1[j].parent == a2[i].lpA.lpNo && a1[j].bcType!='bd' && a1[j].bcType!='lc' && a1[j].bcType!='cf' && a1[j].bcsj>0)
436   - bcs++;
437   - }
438   - // 4、把每个路牌下的对应班次数一一封装在一起,并添加到返回数组里边
439   - array.push({lpNo:a2[i].lpA.lpNo,bcs:bcs});
440   - }
441   - return array;
442   -}
443   -/************************************************************************************************************************************************/
444   -
445 420  
446 421 /**
447 422 * d3动画过度
... ... @@ -647,7 +622,6 @@ var RelationshipGraph = function () {
647 622 .ordinal()
648 623 .domain(this.configuration.lpNameA)
649 624 .rangeRoundBands([ 0, this.configuration.height], .1);
650   -
651 625 this.configuration.y = y;
652 626 // 创建X轴
653 627 var xAxis = d3.svg
... ... @@ -733,7 +707,7 @@ var RelationshipGraph = function () {
733 707 yAxisYArray.splice(0,yAxisYArray.length);
734 708 for(var t = 0;t<this.configuration.taskTypes.length;t++) {
735 709 yAxisYArray.push({
736   - y:y(this.configuration.taskTypes[t].lpNo)+this.configuration.offsetY,
  710 + y:y(this.configuration.taskTypes[t].lpName)+this.configuration.offsetY,
737 711 carname:this.configuration.taskTypes[t].lpName,
738 712 lpA : this.configuration.taskTypes[t]});
739 713 }
... ... @@ -938,6 +912,44 @@ var RelationshipGraph = function () {
938 912 return dataArray;
939 913 }
940 914 }, {
  915 + /**
  916 + * @description : (TODO) 获取路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间)
  917 + *
  918 + * @params : [a1--班次数组;a2--路牌数组]
  919 + *
  920 + * @return : 返回一个数组.这里返回的是一个封装的每个路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间、班次时间为0的班次)
  921 + **/
  922 + key : 'getbczs',
  923 + value : function getbczs(a1,a2,dataMap) {
  924 + // 定义返回数组.
  925 + var array = new Array();
  926 + // 判断参数数组长度大于〇,dataMap不能为空.
  927 + if(a1.length>0 && a2.length>0 && dataMap!=null && dataMap!='') {
  928 + // 遍历路牌数组
  929 + for(var i = 0 ;i < a2.length ; i++) {
  930 + // 定义当前路牌下班次数,初始化为0.
  931 + var bcs = 0;
  932 + // 遍历班次数组
  933 + for(var j = 0 ; j < a1.length ; j++) {
  934 + // 判断当前班次j是否属于当前路牌i下,除去早晚例保班次、吃饭时间、班次时间为0的班次
  935 + if(a1[j].parent == a2[i].lpA.lpNo &&
  936 + a1[j].bcType != dataMap.bcTypeArr.bd &&
  937 + a1[j].bcType != dataMap.bcTypeArr.lc &&
  938 + a1[j].bcType != dataMap.bcTypeArr.cf &&
  939 + a1[j].bcsj > 0) {
  940 + bcs++;
  941 + }
  942 + }
  943 + // 把每个路牌下的对应班次数一一封装在一起,并添加到返回数组里边
  944 + array.push({lpNo : a2[i].lpA.lpNo , lpName:a2[i].lpA.lpName , bcs:bcs});
  945 + }
  946 + }else {
  947 + error.show('参数异常!','【 a1:' + a1 + ' , a2:' + a2 + ' , dataMap:' + dataMap + '】');
  948 + // console.log("您传入的参数异常!【 a1:" + a1 + ", a2:" + a2 + ", dataMap:" + dataMap);
  949 + }
  950 + return array;
  951 + }
  952 + }, {
941 953 key : 'addHistory' ,
942 954 value : function addHistory() {
943 955 historyArray.push({'data':JSON.stringify(this.getDataArray()),'granph':JSON.stringify(this.configuration)});
... ... @@ -947,11 +959,30 @@ var RelationshipGraph = function () {
947 959 key : 'statistics',
948 960 value : function statistics() {
949 961 var $_this = this,
950   - array = $_this.getSvgyAxisTransformY(),
951   - gdata = d3.selectAll('rect.data')[0],
952   - arrayTemp = new Array(),
953   - minValue = 0,timeNum;
  962 + // array = $_this.getSvgyAxisTransformY(),
  963 + array = $_this.configuration.taskTypes,
  964 + tza = $_this.getDataArray();
954 965 for(var a=0;a<array.length;a++) {
  966 + var lpNo = array[a].lpNo;
  967 + var timeNum = 0 ,tempNum = 0;
  968 + for(var z = 0 ;z < tza.length;z++) {
  969 + if(tza[z].lpNo == lpNo) {
  970 + timeNum = timeNum + tza[z].bcsj + tza[z].STOPTIME;
  971 + tempNum ++;
  972 + }
  973 + }
  974 + var className = 'statis_container_' + lpNo;
  975 + var textNodes = $("."+className).children("text");
  976 + var hours = parseInt(timeNum/60);
  977 + var mimus = timeNum%60, zgs = hours + (mimus==0? "": "." + mimus);
  978 + var zgs = parseFloat((timeNum/60).toFixed(2));
  979 + // var zgs = timeNum;
  980 + $(textNodes[0]).text("总工时:" + zgs);
  981 + $(textNodes[1]).text("总班次:"+(tempNum));
  982 + // $_this.pptjbx($("."+className).children("rect")[2],zgs*1,lpNo,$_this);
  983 + }
  984 + /*for(var a=0;a<array.length;a++) {
  985 + debugger;
955 986 var tempNum = 0,timeNum = 0,lpNo = '';
956 987 for(var g = 0 ; g <gdata.length;g++) {
957 988 var temp_i = parseInt(d3.select(gdata[g]).attr('y'))-this.configuration.offsetY;
... ... @@ -968,13 +999,14 @@ var RelationshipGraph = function () {
968 999 minValue = array[a];
969 1000 var className = 'statis_container_' + array[a];
970 1001 var textNodes = $("."+className).children("text");
971   - /*var hours = parseInt(timeNum/60);
972   - var mimus = timeNum%60,zgs = hours + (mimus==0? "": "." + mimus);*/
  1002 + var hours = parseInt(timeNum/60);
  1003 + var mimus = timeNum%60,zgs = hours + (mimus==0? "": "." + mimus);
973 1004 var zgs = parseFloat((timeNum/60).toFixed(2));
  1005 + var zgs = timeNum;
974 1006 $(textNodes[0]).text("总工时:" + zgs);
975 1007 $(textNodes[1]).text("总班次:"+(tempNum));
976 1008 $_this.pptjbx($("."+className).children("rect")[2],zgs*1,lpNo,$_this);
977   - }
  1009 + }*/
978 1010 }
979 1011  
980 1012 }, {
... ... @@ -1025,11 +1057,12 @@ var RelationshipGraph = function () {
1025 1057 value : function createStatistics() {
1026 1058 var svg = d3.select('.gantt-chart'),
1027 1059 _this = this,
1028   - array = _this.getSvgyAxisTransformY();
  1060 + yAyxisA = _this.getSvgyAxisTransformY();
  1061 + array = _this.configuration.taskTypes;
1029 1062 var g_statis = svg.selectAll('.g_statis').data([1]).enter().append('g').classed({'g_statis':true}).attr("transform", "translate(" + _this.configuration.offsetX + ", " + _this.configuration.offsetY + ")");
1030 1063 for(var c = 0 ;c<array.length;c++) {
1031   - var className = 'statis_container_' + array[c];
1032   - var statis_container = g_statis.append('g').attr("class",className).attr("transform", "translate(" + 0 + ", " + array[c] + ")");
  1064 + var className = 'statis_container_' + array[c].lpNo;
  1065 + var statis_container = g_statis.append('g').attr("class",className).attr("transform", "translate(" + 0 + ", " + yAyxisA[c] + ")");
1033 1066 statis_container.append('rect').classed({'rect_shift':true})
1034 1067 .attr("x",-_this.configuration.offsetX)
1035 1068 .attr("y",9)
... ... @@ -1255,34 +1288,44 @@ var RelationshipGraph = function () {
1255 1288 }
1256 1289 }
1257 1290 }, {
  1291 + /**
  1292 + * 均匀发车间隙
  1293 + *
  1294 + */
1258 1295 key : 'updownread01',
1259 1296 value : function updownread01() {
1260   - // 1、获取所有班次数.
1261 1297 var list = $_GlobalGraph.getDataArray();
1262 1298 var dataMap = $_GlobalGraph.configuration.dataMap;
1263   - var rsmap = BaseFun.getsxAndxxbc(list,dataMap);
1264 1299 var cara = $_GlobalGraph.configuration.taskTypes;
1265   - var jar01 = rsmap.qt.concat(rsmap.sxbc).concat(rsmap.xxbc);
1266   - BaseFun.jhfcjx01(jar01,dataMap);
1267   - var jar = BaseFun.tzsmbcsj01(
1268   - BaseFun.setbcsAndfcno(BaseFun.tzsmbcsj01(BaseFun.setbcsAndfcno(BaseFun.tzsztest(cara,jar01,dataMap)),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,dataMap.lbsj,dataMap)),
1269   - dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,dataMap.lbsj,dataMap);
1270   - var resultJA = new Array();
1271   - for(var m = 0 ; m < cara.length; m++) {
1272   - // 获取路牌编号.
1273   - var lpNo_ = cara[m].lpNo;
1274   - // 定义路牌下的所有班次.
1275   - var lpbc_ = new Array();
1276   - // 遍历班次数.
1277   - for(var x =0 ; x <jar.length; x++) {
1278   - // 判断当期遍历的班次是否属于当前的路牌.
1279   - if(jar[x].lpNo == lpNo_)
1280   - lpbc_.push(jar[x]);
1281   - }
1282   - // 按照发车序号顺序排序.
1283   - lpbc_.sort(function(a,b){return a.fcno-b.fcno});
1284   - resultJA = resultJA.concat(BaseFun.addjclbbc01(lpbc_,dataMap,dataMap.lbsj,dataMap.map));
1285   - }
  1300 + var bxrcgs = $_GlobalGraph.configuration.bxrcgs;
  1301 + var resultJA = new Array();
  1302 + if(list.length !=0 && dataMap!=null && dataMap!='' && cara.length !=0) {
  1303 + var rsmap = BaseFun.getsxAndxxbc(list,dataMap);
  1304 + var jar01 = rsmap.qt.concat(rsmap.sxbc).concat(rsmap.xxbc);
  1305 + BaseFun.jhfcjx01(jar01,dataMap);
  1306 + var jar = BaseFun.tzsmbcsj01(
  1307 + BaseFun.setbcsAndfcno(BaseFun.tzsmbcsj01(BaseFun.setbcsAndfcno(BaseFun.tzsztest(cara,jar01,dataMap)),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,dataMap.lbsj,dataMap)),
  1308 + dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,dataMap.lbsj,dataMap);
  1309 + for(var r = 0 ; r < bxrcgs.length; r++) {
  1310 + var lpNo = bxrcgs[r].lpNo;
  1311 + var gsv = 0 , bczs = 0;
  1312 + for(var g = 0 ; g< jar.length; g++) {
  1313 + if(jar[g].lpNo == lpNo) {
  1314 + gsv = gsv + jar[g].bcsj + jar[g].STOPTIME;
  1315 + bczs++;
  1316 + }
  1317 + }
  1318 + bxrcgs[r].sjgsV = gsv;
  1319 + bxrcgs[r].bczs = bczs;
  1320 + }
  1321 + var jar3 = BaseFun.dqbcsAndgs(bxrcgs,jar,dataMap,cara.length);
  1322 + var rsjar = BaseFun.tzsztest(cara,jar3,dataMap);
  1323 + resultJA = BaseFun.addjcclcbc01(cara,rsjar,dataMap,$_GlobalGraph.configuration.stopAraay,dataMap.map);
  1324 + } else {
  1325 + resultJA = list;
  1326 + error.show('参数异常!','【 list:' + list + ' , dataMap:'
  1327 + + dataMap + ' , cara:' + cara + ' , bxrcgs:' + bxrcgs + '】');
  1328 + }
1286 1329 // 删除图形.
1287 1330 $('svg.svg-chart').remove();
1288 1331 // 重新创建图形.
... ... @@ -1389,7 +1432,7 @@ var RelationshipGraph = function () {
1389 1432 }
1390 1433 }, {
1391 1434 /**
1392   - * @description : (TODO) 调整班次函数.
  1435 + * @description : (TODO) 班次调整函数.
1393 1436 *
1394 1437 * @status OK.
1395 1438 * */
... ... @@ -1398,7 +1441,9 @@ var RelationshipGraph = function () {
1398 1441 // 弹出层mobal页面
1399 1442 $.get('/pages/base/timesmodel/bctz.html', function(m){
1400 1443 $(pjaxContainer).append(m);
1401   - $('#tzbc_mobal').trigger('tzbcMobal.show',[$_GlobalGraph,getbczs($_GlobalGraph.getDataArray(),yAxisYArray),BaseFun]);
  1444 + // 获取各路牌下的班次数
  1445 + var lpbcs = $_GlobalGraph.getbczs($_GlobalGraph.getDataArray() , yAxisYArray , $_GlobalGraph.configuration.dataMap);
  1446 + $('#tzbc_mobal').trigger('tzbcMobal.show',[$_GlobalGraph , lpbcs , BaseFun , ErrorInfo]);
1402 1447 });
1403 1448 }
1404 1449  
... ... @@ -1527,7 +1572,8 @@ var RelationshipGraph = function () {
1527 1572 key : 'setIdValue',
1528 1573 value : function setIdValue(obj) {
1529 1574 // 设置id属性值. 由一个 常量字符串 + 班次数 + 常量字符串 + 发车序号 + 常量字符 + 对应的y轴值.
1530   - return 'shift-rect-' + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent);
  1575 + // return 'shift-rect-' + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent);
  1576 + return 'shift-rect-' + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.lpName);
1531 1577 }
1532 1578 }, {
1533 1579 /**
... ... @@ -1615,7 +1661,8 @@ var RelationshipGraph = function () {
1615 1661 * */
1616 1662 key : 'setRectParenNodeIdV',
1617 1663 value : function setRectParenNodeIdV(obj) {
1618   - return 'parent_' + $_GlobalGraph.configuration.y(obj.parent) + '_' + obj.bcs + "_node_" + obj.fcno;
  1664 + // return 'parent_' + $_GlobalGraph.configuration.y(obj.parent) + '_' + obj.bcs + "_node_" + obj.fcno;
  1665 + return 'parent_' + $_GlobalGraph.configuration.y(obj.lpName) + '_' + obj.bcs + "_node_" + obj.fcno;
1619 1666 }
1620 1667 }, {
1621 1668 /**
... ... @@ -1629,7 +1676,8 @@ var RelationshipGraph = function () {
1629 1676 * */
1630 1677 key : 'setNextNodeIdV',
1631 1678 value : function setNextNodeIdV(obj) {
1632   - return "shift-rect-" + (obj.bcs+1) + '_' + (obj.fcno+1) + '_' + $_GlobalGraph.configuration.y(obj.parent);
  1679 + // return "shift-rect-" + (obj.bcs+1) + '_' + (obj.fcno+1) + '_' + $_GlobalGraph.configuration.y(obj.parent);
  1680 + return "shift-rect-" + (obj.bcs+1) + '_' + (obj.fcno+1) + '_' + $_GlobalGraph.configuration.y(obj.lpName);
1633 1681 }
1634 1682 }, {
1635 1683 /**
... ... @@ -1643,7 +1691,8 @@ var RelationshipGraph = function () {
1643 1691 * */
1644 1692 key : 'setLastNodeIdV',
1645 1693 value : function setLastNodeIdV(obj) {
1646   - return "shift-rect-" + (obj.bcs-1) + '_' + (obj.fcno-1)+ '_' + $_GlobalGraph.configuration.y(obj.parent);
  1694 + // return "shift-rect-" + (obj.bcs-1) + '_' + (obj.fcno-1)+ '_' + $_GlobalGraph.configuration.y(obj.parent);
  1695 + return "shift-rect-" + (obj.bcs-1) + '_' + (obj.fcno-1)+ '_' + $_GlobalGraph.configuration.y(obj.lpName);
1647 1696 }
1648 1697 }, {
1649 1698 /**
... ... @@ -1671,7 +1720,8 @@ var RelationshipGraph = function () {
1671 1720 * */
1672 1721 key : 'setText01IdV',
1673 1722 value : function setText01IdV(obj) {
1674   - return "shift-rect-text01-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1723 + // return "shift-rect-text01-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1724 + return "shift-rect-text01-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.lpName);
1675 1725 }
1676 1726 }, {
1677 1727 /**
... ... @@ -1755,7 +1805,8 @@ var RelationshipGraph = function () {
1755 1805 * */
1756 1806 key : 'setCircleIdV',
1757 1807 value : function setCircleIdV(obj) {
1758   - return "shift-rect-circle-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1808 + // return "shift-rect-circle-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1809 + return "shift-rect-circle-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.lpName);
1759 1810 }
1760 1811 }, {
1761 1812 /**
... ... @@ -1833,7 +1884,8 @@ var RelationshipGraph = function () {
1833 1884 * */
1834 1885 key : 'setText02IdV',
1835 1886 value : function setText02IdV(obj) {
1836   - return "shift-rect-text02-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1887 + // return "shift-rect-text02-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1888 + return "shift-rect-text02-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.lpName);
1837 1889 }
1838 1890 }, {
1839 1891 /**
... ... @@ -1873,7 +1925,9 @@ var RelationshipGraph = function () {
1873 1925 * */
1874 1926 key : 'setText03IdV',
1875 1927 value : function setText03IdV(obj) {
1876   - return "shift-rect-text03-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1928 + /*return "shift-rect-text03-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);*/
  1929 + return "shift-rect-text03-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.lpName);
  1930 +
1877 1931 }
1878 1932 }, {
1879 1933 /**
... ... @@ -1911,7 +1965,8 @@ var RelationshipGraph = function () {
1911 1965 * */
1912 1966 key : 'setText04IdV',
1913 1967 value : function (obj) {
1914   - return "shift-rect-text04-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1968 + /*return "shift-rect-text04-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);*/
  1969 + return "shift-rect-text04-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.lpName);
1915 1970 }
1916 1971 }, {
1917 1972 /**
... ... @@ -2011,7 +2066,8 @@ var RelationshipGraph = function () {
2011 2066 * */
2012 2067 key : 'setCoverRectIdV',
2013 2068 value : function setCoverRectIdV(obj) {
2014   - return "shift-rect-cover-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  2069 + /*return "shift-rect-cover-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);*/
  2070 + return "shift-rect-cover-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.lpName);
2015 2071 }
2016 2072 }, {
2017 2073 /**
... ... @@ -2039,7 +2095,8 @@ var RelationshipGraph = function () {
2039 2095 * */
2040 2096 key : 'setCoverRectParentV',
2041 2097 value : function setCoverRectParentV(obj) {
2042   - return "shift-rect-" + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent) + '-cover';
  2098 + //return "shift-rect-" + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent) + '-cover';
  2099 + return "shift-rect-" + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.lpName) + '-cover';
2043 2100 }
2044 2101 }, {
2045 2102 /**
... ... @@ -2053,7 +2110,8 @@ var RelationshipGraph = function () {
2053 2110 * */
2054 2111 key : 'setCoverRectLastIdV',
2055 2112 value : function setCoverRectLastIdV(obj) {
2056   - return "shift-rect-cover-" + obj.bcs + '_' + (obj.fcno+1) + $_GlobalGraph.configuration.y(obj.parent);
  2113 + // return "shift-rect-cover-" + obj.bcs + '_' + (obj.fcno+1) + $_GlobalGraph.configuration.y(obj.parent);
  2114 + return "shift-rect-cover-" + obj.bcs + '_' + (obj.fcno+1) + $_GlobalGraph.configuration.y(obj.lpName);
2057 2115 }
2058 2116 }, {
2059 2117 key : 'mouseUpEvent',
... ... @@ -2442,9 +2500,11 @@ var RelationshipGraph = function () {
2442 2500 for(var s = 0 ; s < len ; s++) {
2443 2501 var rectNodesAttr = RelationshipGraph.getContextNodeAndData(d3.select(shiftRectA[s]).attr('id'));
2444 2502 if(rectNodesAttr.dqbcData.STOPTIME<0) {
2445   - var nextTzsjDx = $_GlobalGraph.configuration.dataMap.minztjx - rectNodesAttr.dqbcData.STOPTIME;
  2503 + // var nextTzsjDx = $_GlobalGraph.configuration.dataMap.minztjx - rectNodesAttr.dqbcData.STOPTIME;
  2504 + var nextTzsjDx = 0 - rectNodesAttr.dqbcData.STOPTIME;
2446 2505 // 修改遍历的当前元素数据的停站时间为最小停站时间.
2447   - rectNodesAttr.dqbcData.STOPTIME = $_GlobalGraph.configuration.dataMap.minztjx;
  2506 + // rectNodesAttr.dqbcData.STOPTIME = $_GlobalGraph.configuration.dataMap.minztjx;
  2507 + rectNodesAttr.dqbcData.STOPTIME = 0;
2448 2508 // 修改遍历的当前元素数据的文本展示停站时间
2449 2509 for(var t = 0 ; t < rectNodesAttr.dqbctextNodes.length ; t++) {
2450 2510 if(d3.select(rectNodesAttr.dqbctextNodes[t]).attr('text-type')=='gap')
... ... @@ -2467,6 +2527,7 @@ var RelationshipGraph = function () {
2467 2527 * 修改下个班次的元素坐标属性值
2468 2528 *
2469 2529 * */
  2530 +
2470 2531 rectNodesAttr.nextbcNode.attr('x',$_x);
2471 2532 var rectCover = d3.select(d3.selectAll('rect[parent-node='+ rectNodesAttr.nextbcNodeId + '-cover' +']')[0][0]);
2472 2533 rectCover.attr('x',$_x);
... ... @@ -2962,7 +3023,7 @@ var RelationshipGraph = function () {
2962 3023 nowDate.setMinutes(parseInt(tm.min)+d.bcsj);// 10.3.1、设置分钟.
2963 3024 // 9.1.4、修改当前班次的到达时间.
2964 3025 d.ARRIVALTIME = BaseFun.getTimeStr(nowDate);
2965   - d.STOPTIME = parseInt((BaseFun.getDateTime(nodeContext.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME))/ 60000);
  3026 + d.STOPTIME = d.isfb ==1 ? 0 : parseInt((BaseFun.getDateTime(nodeContext.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME))/ 60000);
2966 3027 /**
2967 3028 * 9.2、修改元素沿X轴方向的X坐标属性值.
2968 3029 *
... ... @@ -2983,6 +3044,8 @@ var RelationshipGraph = function () {
2983 3044 }
2984 3045 /****************************************** update 当前的班次数据以及相关元素对象属性值. END ************************************/
2985 3046  
  3047 + //console.log(nodeContext);
  3048 + //debugger;
2986 3049 // 10、计算与上个班次的停站时间.
2987 3050 var dxMinues = parseInt((BaseFun.getDateTime(d.fcsj) - BaseFun.getDateTime(nodeContext.lastData.ARRIVALTIME)) / 60000);
2988 3051  
... ... @@ -3129,7 +3192,8 @@ var RelationshipGraph = function () {
3129 3192 **/
3130 3193 var _obj = RelationshipGraph.getContextNodeAndData(d3.select(this).attr('parent-node').replace('-cover',''));
3131 3194 // 1.3、定义最小停站间隙.
3132   - var minSoptTime = $_GlobalGraph.configuration.dataMap.minztjx;
  3195 + // var minSoptTime = $_GlobalGraph.configuration.dataMap.minztjx;
  3196 + var minSoptTime = 0;
3133 3197 // 1.4、创建当前时间对象.
3134 3198 var $_date = new Date();
3135 3199 // 1.5、判断 如果当前班次的停站时间小于零,则修改成最小停站时间.
... ...
src/main/resources/static/pages/base/timesmodel/js/errorinfo.js 0 → 100644
  1 +ErrorInfo = function() {
  2 + var error = {
  3 + show : function(title , content) {
  4 + layer.open({
  5 + title: title,
  6 + content: content
  7 + });
  8 + }
  9 + }
  10 + return error;
  11 +}();
0 12 \ No newline at end of file
... ...
src/main/resources/static/pages/base/timesmodel/js/gantt.js
... ... @@ -70,8 +70,28 @@
70 70 }else {
71 71 var jsonA = JSON.parse(objD);
72 72 // 使用已有的时刻表明细数据渲染视图.
73   - data = {'json':jsonA.rsD,'bxrcgs':null};
  73 + // data = {'json':jsonA.rsD,'bxrcgs':null};
74 74 CSMap = {'gattA':null,'stopSpace': Math.round(map.zzsj/map.clzs),'maxCar':jsonA.rsLP};
  75 + var cara = jsonA.rsLP;
  76 + var rsjar = jsonA.rsD;
  77 + var resultJA = new Array();
  78 + for(var m = 0 ; m < cara.length; m++) {
  79 + // 获取路牌编号.
  80 + var lpNo_ = cara[m].lpNo;
  81 + // 定义路牌下的所有班次.
  82 + var lpbc_ = new Array();
  83 + // 遍历班次数.
  84 + for(var x =0 ; x <rsjar.length; x++) {
  85 + // 判断当期遍历的班次是否属于当前的路牌.
  86 + if(rsjar[x].lpNo == lpNo_) {
  87 + lpbc_.push(rsjar[x]);
  88 + }
  89 + }
  90 + // 按照发车序号顺序排序.
  91 + lpbc_.sort(function(a,b){return a.fcno-b.fcno});
  92 + resultJA = resultJA.concat(BaseFun.addjclbbc01(lpbc_,dataMap,stopAraay[0].lbsj,map));
  93 + }
  94 + data = {'json':rsjar,'bxrcgs':null};
75 95 }
76 96 // 创建甘特图对象.
77 97 var graph = d3.select('#ganttSvg').relationshipGraph(
... ... @@ -388,7 +408,8 @@
388 408 * @return 返回甘特图的参数配置信息.
389 409 * */
390 410 function getGraphArgus(p) {
391   - var VALUEKEYNAME = 'Worldwide Gross',MULTIPLE = Math.round(105/parseInt(p.stopAraay[0].sxsj)) >=4 ? Math.round(90/parseInt(p.stopAraay[0].sxsj)) : 3 ,
  411 + var MULTIPLE = Math.round(105/parseInt(p.stopAraay[0].sxsj)) >=4 ? Math.round(90/parseInt(p.stopAraay[0].sxsj)) : Math.round(90/parseInt(p.stopAraay[0].sxsj)) *2;
  412 + var VALUEKEYNAME = 'Worldwide Gross' ,
392 413 DXHOURS = 24,MINUTE = 60,WIDTH = DXHOURS*MINUTE,MARGINLEFT = 380,HEIGHT = p.yAxisCarArray.length*60 + 240,
393 414 MARGINBOTTOM = 240,OFFSETX = 90,OFFSETY = 180,OFFSETUPY = 120,OFFSETDOWNY = 60,
394 415 STARTDATETIME = p.startDateTime ,ENDDATETIME = p.endDateTime ,TASKTYPES =p.yAxisCarArray ,TICKFORMAT ='%H:%M' ,SHOWTOOLTIPS = true;
... ... @@ -400,6 +421,7 @@
400 421 var hours=Math.floor(leave1/(3600*1000));
401 422 DXHOURS = days*24+hours;
402 423 WIDTH = DXHOURS*MINUTE*MULTIPLE;
  424 + // debugger;
403 425 var lpsplitA = getylp(p.yAxisCarArray);
404 426 var args = {
405 427 'valueKeyName': VALUEKEYNAME,
... ... @@ -506,8 +528,15 @@
506 528 }else {
507 529 data = graph.getDataArray();
508 530 }
  531 + var rsjar = BaseFun.tzsztest(graph.configuration.taskTypes,data,graph.configuration.dataMap);
  532 + /*var resultJA = BaseFun.addjcclcbc01(graph.configuration.taskTypes,rsjar,
  533 + graph.configuration.dataMap,graph.configuration.stopAraay,data,
  534 + graph.configuration.dataMap.map);*/
509 535 // 获取图形数据.重新绘制.
510   - graph.data(data);
  536 + graph.data(BaseFun.addjcclcbc01(graph.configuration.taskTypes,rsjar,
  537 + graph.configuration.dataMap,
  538 + graph.configuration.stopAraay,
  539 + graph.configuration.dataMap.map));
511 540 // 记录当前操作.
512 541 graph.addHistory();
513 542 stateSuccess('删除');
... ...
src/main/resources/static/pages/base/timesmodel/tepms/bctype_temp.html
... ... @@ -538,10 +538,10 @@
538 538 </select>
539 539 </div>
540 540 <div class="margin-top-10">
541   - <input type="number" class="form-control" placeholder="请输入分配人次数" id="state_tagsinput_rcsvalue">
  541 + <input type="number" class="form-control" placeholder="请输入分配人次数" id="state_tagsinput_rcsvalue" min="1">
542 542 </div>
543 543 <div class="margin-top-10">
544   - <input type="number" class="form-control" placeholder="请输入分配车辆数" id="state_tagsinput_clsvalue">
  544 + <input type="number" class="form-control" placeholder="请输入分配车辆数" id="state_tagsinput_clsvalue" min="1">
545 545 </div>
546 546 <div class="margin-top-10">
547 547 <a href="javascript:;" class="btn red" id="state_tagsinput_add">添加</a>
... ...
src/main/resources/static/pages/excep/boundList.html
... ... @@ -157,7 +157,7 @@ $(function(){
157 157 increaseArea: '20%'
158 158 }
159 159  
160   - jsDoQuery(null,true);
  160 +// jsDoQuery(null,true);
161 161  
162 162 //重置
163 163 $('tr.filter .filter-cancel').on('click', function(){
... ...
src/main/resources/static/pages/forms/mould/correctForm.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/firstAndLastBus_sum.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/oilListMonth.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/correctForm.html
... ... @@ -32,13 +32,13 @@
32 32 <select class="form-control" name="line" id="line" style="width: 136px;"></select>
33 33 </div>
34 34 <div style="display: inline-block;margin-left: 15px;">
35   - <span class="item-label" style="width: 80px;">开始时间: </span>
36   - <input class="form-control" type="text" id="startDate" style="width: 120px;"/>
37   - </div>
38   - <div style="display: inline-block;margin-left: 15px;">
39   - <span class="item-label" style="width: 80px;">结束时间: </span>
40   - <input class="form-control" type="text" id="endDate" style="width: 120px;"/>
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date" style="width: 120px;"/>
41 37 </div>
  38 +<!-- <div style="display: inline-block;margin-left: 15px;"> -->
  39 +<!-- <span class="item-label" style="width: 80px;">结束时间: </span> -->
  40 +<!-- <input class="form-control" type="text" id="endDate" style="width: 120px;"/> -->
  41 +<!-- </div> -->
42 42 <div style="display: inline-block;margin-left: 15px">
43 43 <span class="item-label" style="width: 140px;">路牌: </span>
44 44 <select class="form-control" name="lpName" id="lpName" style="width: 136px;"></select>
... ... @@ -46,6 +46,7 @@
46 46 <div style="display: inline-block;margin-left: 15px">
47 47 <span class="item-label" style="width: 140px;">内部编码: </span>
48 48 <select class="form-control" name="code" id="code" style="width: 145px;"></select>
  49 + <input class="btn btn-default" type="button" id="czcl" value="X"/>
49 50 </div>
50 51 <div class="form-group">
51 52 <input class="btn btn-default" type="button" id="query" value="筛选"/>
... ... @@ -58,28 +59,15 @@
58 59 <table class="table table-bordered table-hover table-checkable" id="forms">
59 60 <thead>
60 61 <tr>
61   - <th colspan="12">营运车辆修正统计表</th>
62   - </tr>
63   - <tr>
64   - <td colspan="12">车队 站 <span id="sDate"></span>至<span id="eDate"></span></td>
  62 + <th colspan="6">营运车辆修正统计表</th>
65 63 </tr>
66 64 <tr>
67   - <td rowspan="2">线路名</td>
68   - <td rowspan="2">路牌</td>
69   - <td rowspan="2">车号</td>
70   - <td rowspan="2">司机</td>
71   - <td rowspan="2">售票员</td>
72   - <td colspan="2">发车时间</td>
73   - <td colspan="2">结束时间</td>
74   - <td rowspan="2">修改人</td>
75   - <td rowspan="2">修改时间</td>
76   - <td rowspan="2">备注</td>
77   - </tr>
78   - <tr>
79   - <td>计划</td>
80   - <td>实际</td>
81   - <td>计划</td>
82   - <td>实际</td>
  65 + <td>编号</td>
  66 + <td>路牌</td>
  67 + <td>车号</td>
  68 + <td>司机</td>
  69 + <td>计发</td>
  70 + <td>修改详细</td>
83 71 </tr>
84 72 </thead>
85 73 <tbody class="list_correctForm">
... ... @@ -104,11 +92,19 @@
104 92 if (!$('body').hasClass('page-sidebar-closed'))
105 93 $('.menu-toggler.sidebar-toggler').click();
106 94  
107   - $("#startDate,#endDate").datetimepicker({
  95 + $("#date").datetimepicker({
108 96 format : 'YYYY-MM-DD',
109 97 locale : 'zh-cn'
110 98 });
111   -
  99 + var d = new Date();
  100 + var year = d.getFullYear();
  101 + var month = d.getMonth() + 1;
  102 + var day = d.getDate();
  103 + if(month < 10)
  104 + month = "0" + month;
  105 + if(day < 10)
  106 + day = "0" + day;
  107 + $("#date").val(year + "-" + month + "-" + day);
112 108  
113 109 $.get('/basic/lineCode2Name',function(result){
114 110 var data=[];
... ... @@ -116,11 +112,12 @@
116 112 for(var code in result){
117 113 data.push({id: code, text: result[code]});
118 114 }
119   - console.log(data);
120 115 initPinYinSelect2('#line',data,'');
121 116  
122 117 })
123   -
  118 + $('#czcl').on('click', function () {
  119 + $('#code').val('').change();
  120 + });
124 121  
125 122 $('#lpName').select2({
126 123 ajax: {
... ... @@ -200,44 +197,16 @@
200 197 });
201 198  
202 199 var line = $("#line").val();
203   - var startDate = $("#startDate").val();
204   - var endDate = $("#endDate").val();
  200 + var date = $("#startDate").val();
205 201 var lpName = $("#lpName").val();
206 202 var code = $("#code").val();
207 203 $("#query").on("click",function(){
208   - if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
209   - layer.msg("请选择范围!");
210   - return;
211   - }
212   - if($("#endDate").val() == null || $("#endDate").val().trim().length == 0){
213   - layer.msg("请选择范围!");
214   - return;
215   - }
216 204 line = $("#line").val();
217   - startDate = $("#startDate").val();
218   - endDate = $("#endDate").val();
  205 + date = $("#date").val();
219 206 lpName = $("#lpName").val();
220 207 code = $("#code").val();
221 208 var type = "query";
222   - $post("/realSchedule/correctForm",{line:line,startDate:startDate,endDate:endDate,lpName:lpName,code:code,type:type},function(result){
223   - $("#sDate").text(startDate);
224   - $("#eDate").text(endDate);
225   - var temp = {};
226   - var today_account = 0;
227   - temp["line"] = $("#line").text() ;
228   - temp["totalAdjustment"] = result.length;
229   -
230   - $.each(result, function(i, obj) {
231   - if(moment(obj.scheduleDate).format("YYYY-MM-DD") == moment(obj.updateDate).format("YYYY-MM-DD")){
232   - today_account++;
233   - }
234   - obj.updateDate = moment(obj.updateDate).format("YYYY-MM-DD HH:mm:ss");
235   - });
236   -
237   - temp["todayAdjustment"] = today_account;
238   - temp["beforeAdjustment"] = result.length-today_account;
239   - temp["historyAdjustment"] = 0;
240   -
  209 + $get("/realSchedule/correctForm",{line:line,date:date,lpName:lpName,code:code,type:type},function(result){
241 210 var list_correctForm = template('list_correctForm',{list:result});
242 211 // 把渲染好的模版html文本追加到表格中
243 212 $('#forms .list_correctForm').html(list_correctForm);
... ... @@ -255,8 +224,8 @@
255 224  
256 225 $("#export").on("click",function(){
257 226 var type = "export";
258   - $get('/realSchedule/correctForm',{line:line,startDate:startDate,endDate:endDate,lpName:lpName,code:code,type:type},function(result){
259   - window.open("/downloadFile/download?fileName=修正报表"+moment(startDate).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD"));
  227 + $get('/realSchedule/correctForm',{line:line,date:date,lpName:lpName,code:code,type:type},function(result){
  228 + window.open("/downloadFile/download?fileName=修正报表"+date);
260 229 });
261 230 });
262 231  
... ... @@ -264,38 +233,18 @@
264 233 </script>
265 234 <script type="text/html" id="list_correctForm">
266 235 {{each list as obj i}}
267   - <tr>
268   - <td>{{obj.xlName}}</td>
  236 + <tr>
  237 + <td>{{i+1}}</td>
269 238 <td>{{obj.lpName}}</td>
270 239 <td>{{obj.clZbh}}</td>
271   - <td>{{obj.jName}}</td>
272   - <td>{{obj.sName}}</td>
  240 + <td>{{obj.jName}}/{{obj.jGh}}</td>
273 241 <td>{{obj.fcsj}}</td>
274   - <td>{{obj.fcsjActual}}</td>
275   - <td>{{obj.zdsj}}</td>
276   - <td>{{obj.zdsjActual}}</td>
277   - <td>{{obj.updateBy}}</td>
278   - <td>{{obj.updateDate}}</td>
279   - <td>{{obj.remarks}}</td>
  242 + <td>{{obj.type2}}</td>
280 243 </tr>
281 244 {{/each}}
282 245 {{if list.length == 0}}
283 246 <tr>
284   - <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td>
  247 + <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
285 248 </tr>
286 249 {{/if}}
287 250 </script>
288   -<script type="text/html" id="list_correctForm_statistics">
289   - <tr>
290   - <td colspan="2">线路:</td>
291   - <td>{{line}}</td>
292   - <td>调整总数</td>
293   - <td>{{totalAdjustment}}</td>
294   - <td>事先调整</td>
295   - <td>{{beforeAdjustment}}</td>
296   - <td>当日调整</td>
297   - <td>{{todayAdjustment}}</td>
298   - <td>历史调整</td>
299   - <td colspan="2">{{historyAdjustment}}</td>
300   - </tr>
301   -</script>
302 251 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/correctStatis.html
... ... @@ -7,7 +7,8 @@
7 7 .table-bordered > tbody > tr > td,
8 8 .table-bordered > tfoot > tr > th,
9 9 .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
  10 + border: 1px solid;
  11 + text-align: center; }
11 12 .table-bordered > thead > tr > th,
12 13 .table-bordered > thead > tr > td {
13 14 border-bottom-width: 2px; }
... ...
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
... ... @@ -7,7 +7,8 @@
7 7 .table-bordered > tbody > tr > td,
8 8 .table-bordered > tfoot > tr > th,
9 9 .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
  10 + border: 1px solid;
  11 + text-align: center; }
11 12 .table-bordered > thead > tr > th,
12 13 .table-bordered > thead > tr > td {
13 14 border-bottom-width: 2px; }
... ... @@ -250,7 +251,7 @@
250 251 <td>{{obj.company}}</td>
251 252 <td>{{obj.subCompany}}</td>
252 253 <td>{{obj.line}}</td>
253   - {{if obj.delayFirst0 != '/' && obj.delayFirst0 != '0'}}
  254 + {{if obj.delayFirst0 != '/' && (obj.delayFirst0 > 1 || obj.delayFirst0 < -2)}}
254 255 <td style="background-color: #FF9999">{{obj.qdzFirst0}}</td>
255 256 <td style="background-color: #FF9999">{{obj.jhfcFirst0}}</td>
256 257 <td style="background-color: #FF9999">{{obj.sjfcFirst0}}</td>
... ... @@ -261,7 +262,7 @@
261 262 <td>{{obj.sjfcFirst0}}</td>
262 263 <td>{{obj.delayFirst0}}</td>
263 264 {{/if}}
264   - {{if obj.delayLast0 != '/' && obj.delayLast0 != '0'}}
  265 + {{if obj.delayLast0 != '/' && (obj.delayLast0 > 1 || obj.delayLast0 < -2)}}
265 266 <td style="background-color: #FF9999">{{obj.qdzLast0}}</td>
266 267 <td style="background-color: #FF9999">{{obj.jhfcLast0}}</td>
267 268 <td style="background-color: #FF9999">{{obj.sjfcLast0}}</td>
... ... @@ -272,7 +273,7 @@
272 273 <td>{{obj.sjfcLast0}}</td>
273 274 <td>{{obj.delayLast0}}</td>
274 275 {{/if}}
275   - {{if obj.delayFirst1 != '/' && obj.delayFirst1 != '0'}}
  276 + {{if obj.delayFirst1 != '/' && (obj.delayFirst1 > 1 || obj.delayFirst1 < -2)}}
276 277 <td style="background-color: #FF9999">{{obj.qdzFirst1}}</td>
277 278 <td style="background-color: #FF9999">{{obj.jhfcFirst1}}</td>
278 279 <td style="background-color: #FF9999">{{obj.sjfcFirst1}}</td>
... ... @@ -283,7 +284,7 @@
283 284 <td>{{obj.sjfcFirst1}}</td>
284 285 <td>{{obj.delayFirst1}}</td>
285 286 {{/if}}
286   - {{if obj.delayLast1 != '/' && obj.delayLast1 != '0'}}
  287 + {{if obj.delayLast1 != '/' && (obj.delayLast1 > 1 || obj.delayLast1 < -2)}}
287 288 <td style="background-color: #FF9999">{{obj.qdzLast1}}</td>
288 289 <td style="background-color: #FF9999">{{obj.jhfcLast1}}</td>
289 290 <td style="background-color: #FF9999">{{obj.sjfcLast1}}</td>
... ...
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
... ... @@ -7,7 +7,8 @@
7 7 .table-bordered > tbody > tr > td,
8 8 .table-bordered > tfoot > tr > th,
9 9 .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
  10 + border: 1px solid;
  11 + text-align: center; }
11 12 .table-bordered > thead > tr > th,
12 13 .table-bordered > thead > tr > td {
13 14 border-bottom-width: 2px; }
... ... @@ -27,11 +28,11 @@
27 28 <div class="portlet light porttlet-fit bordered">
28 29 <div class="portlet-title">
29 30 <form id="history" class="form-inline" action="">
30   - <div style="display: inline-block;margin-left: 10px;" id="company1">
  31 + <div style="display: inline-block;margin-left: 28px;" id="company1">
31 32 <span class="item-label" style="width: 80px;">公司: </span>
32 33 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 34 </div>
34   - <div style="display: inline-block;margin-left: 10px;" id="subCompany1">
  35 + <div style="display: inline-block;margin-left: 24px;" id="subCompany1">
35 36 <span class="item-label" style="width: 80px;">分公司: </span>
36 37 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 38 </div>
... ... @@ -39,11 +40,16 @@
39 40 <span class="item-label" style="width: 80px;">线路: </span>
40 41 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 42 </div>
  43 + <div style="margin-top: 10px"></div>
  44 + <div style="display: inline-block;margin-left: 0px;">
  45 + <span class="item-label" style="width: 80px;">开始时间: </span>
  46 + <input class="form-control" type="text" id="startDate" style="width: 160px;"/>
  47 + </div>
42 48 <div style="display: inline-block;margin-left: 10px;">
43   - <span class="item-label" style="width: 80px;">时间: </span>
44   - <input class="form-control" type="text" id="date" style="width: 160px;"/>
  49 + <span class="item-label" style="width: 80px;">结束时间: </span>
  50 + <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
45 51 </div>
46   - <div class="form-group">
  52 + <div class="form-group" style="margin-left: 10px;">
47 53 <input class="btn btn-default" type="button" id="query" value="筛选"/>
48 54 <input class="btn btn-default" type="button" id="export" value="导出"/>
49 55 </div>
... ... @@ -54,7 +60,7 @@
54 60 <table class="table table-bordered table-hover table-checkable" id="forms">
55 61 <thead>
56 62 <tr class="hidden">
57   - <th>日期</th>
  63 + <th width="240px">日期</th>
58 64 <th>公司</th>
59 65 <th>分公司</th>
60 66 <th>线路</th>
... ... @@ -73,6 +79,7 @@
73 79 <thead>
74 80 <tr class="hidden">
75 81 <th style="display: none;"></th>
  82 + <th rowspan="2">日期</th>
76 83 <th rowspan="2">线路</th>
77 84 <th colspan="4">上行首发</th>
78 85 <th colspan="4">上行末发</th>
... ... @@ -116,12 +123,12 @@
116 123 // 关闭左侧栏
117 124 if (!$('body').hasClass('page-sidebar-closed'))
118 125 $('.menu-toggler.sidebar-toggler').click();
119   -
120   - $("#date").datetimepicker({
  126 +
  127 + $("#startDate,#endDate").datetimepicker({
121 128 format : 'YYYY-MM-DD',
122 129 locale : 'zh-cn'
123 130 });
124   -
  131 +
125 132 var d = new Date();
126 133 var year = d.getFullYear();
127 134 var month = d.getMonth() + 1;
... ... @@ -130,7 +137,7 @@
130 137 month = "0" + month;
131 138 if(day < 10)
132 139 day = "0" + day;
133   - $("#date").val(year + "-" + month + "-" + day);
  140 + $("#startDate,#endDate").val(year + "-" + month + "-" + day);
134 141  
135 142 var fage=false;
136 143 var xlList;
... ... @@ -216,9 +223,14 @@
216 223 var company = $("#company").val();
217 224 var subCompany = $("#subCompany").val();
218 225 var line = $("#line").val();
219   - var date = $("#date").val();
  226 + var startDate = $("#startDate").val();
  227 + var endDate = $("#endDate").val();
220 228 function jsDoQuery(pagination){
221   - if($("#date").val() == null || $("#date").val().trim().length == 0){
  229 + if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
  230 + layer.msg("请选择时间!");
  231 + return;
  232 + }
  233 + if($("#endDate").val() == null || $("#endDate").val().trim().length == 0){
222 234 layer.msg("请选择时间!");
223 235 return;
224 236 }
... ... @@ -226,14 +238,15 @@
226 238 company = $("#company").val();
227 239 subCompany = $("#subCompany").val();
228 240 line = $("#line").val();
229   - date = $("#date").val();
  241 + startDate = $("#startDate").val();
  242 + endDate = $("#endDate").val();
230 243 if(line == " ")
231 244 line = "";
232 245 params['company'] = company;
233 246 params['subCompany'] = subCompany;
234 247 params['line'] = line;
235   - params['line'] = line;
236   - params['date'] = date;
  248 + params['startDate'] = startDate;
  249 + params['endDate'] = endDate;
237 250 params['type'] = "query";
238 251 $("#forms .hidden").removeClass("hidden");
239 252 $("#map tr").addClass("hidden");
... ... @@ -253,19 +266,15 @@
253 266 }
254 267  
255 268 $("#export").on("click",function(){
256   - if($("#date").val() == null || $("#date").val().trim().length == 0){
257   - layer.msg("请选择时间!");
258   - return;
259   - }
260 269 var params = {};
261 270 params['company'] = company;
262 271 params['subCompany'] = subCompany;
263 272 params['line'] = line;
264   - params['line'] = line;
265   - params['date'] = date;
  273 + params['startDate'] = startDate;
  274 + params['endDate'] = endDate;
266 275 params['type'] = "export";
267 276 $get('/pcpc/firstAndLastBus_sum', params, function(result){
268   - window.open("/downloadFile/download?fileName=线路首末班准点率"+moment(date).format("YYYYMMDD"));
  277 + window.open("/downloadFile/download?fileName=线路首末班准点率"+moment(startDate).format("YYYYMMDD")+(startDate==endDate?"":("-"+moment(endDate).format("YYYYMMDD"))));
269 278 });
270 279 });
271 280  
... ... @@ -276,13 +285,20 @@
276 285 <script type="text/html" id="list_firstAndLastBus">
277 286 {{each list as obj i}}
278 287 <tr>
279   - <td>{{obj.date}}</td>
280   - <td>{{obj.company}}</td>
281   - <td>{{obj.subCompany}}</td>
282   - <td>{{obj.line}}</td>
283   - <td>{{obj.jhbc}}</td>
284   - <td>{{obj.sjbc}}</td>
285   - <td><a id='delay'>{{obj.zdl}}</a></td>
  288 + {{if obj.date != '合计汇总'}}
  289 + <td>{{obj.date}}</td>
  290 + <td>{{obj.company}}</td>
  291 + <td>{{obj.subCompany}}</td>
  292 + <td>{{obj.line}}</td>
  293 + <td>{{obj.jhbc}}</td>
  294 + <td>{{obj.sjbc}}</td>
  295 + <td><a id='delay'>{{obj.zdl}}</a></td>
  296 + {{else}}
  297 + <td colspan='4'>{{obj.date}}</td>
  298 + <td>{{obj.jhbc}}</td>
  299 + <td>{{obj.sjbc}}</td>
  300 + <td>{{obj.zdl}}</td>
  301 + {{/if}}
286 302 </tr>
287 303 {{/each}}
288 304 {{if list.length == 0}}
... ... @@ -292,23 +308,26 @@
292 308 {{/if}}
293 309 </script>
294 310 <script type="text/html" id="list_maps">
  311 + {{each list as obj i}}
295 312 <tr>
296   - <td>{{list.line}}</td>
297   - <td>{{list.qdzFirst0}}</td>
298   - <td>{{list.jhfcFirst0}}</td>
299   - <td>{{list.sjfcFirst0}}</td>
300   - <td>{{list.delayFirst0}}</td>
301   - <td>{{list.qdzLast0}}</td>
302   - <td>{{list.jhfcLast0}}</td>
303   - <td>{{list.sjfcLast0}}</td>
304   - <td>{{list.delayLast0}}</td>
305   - <td>{{list.qdzFirst1}}</td>
306   - <td>{{list.jhfcFirst1}}</td>
307   - <td>{{list.sjfcFirst1}}</td>
308   - <td>{{list.delayFirst1}}</td>
309   - <td>{{list.qdzLast1}}</td>
310   - <td>{{list.jhfcLast1}}</td>
311   - <td>{{list.sjfcLast1}}</td>
312   - <td>{{list.delayLast1}}</td>
  313 + <td>{{obj.date}}</td>
  314 + <td>{{obj.line}}</td>
  315 + <td>{{obj.qdzFirst0}}</td>
  316 + <td>{{obj.jhfcFirst0}}</td>
  317 + <td>{{obj.sjfcFirst0}}</td>
  318 + <td>{{obj.delayFirst0}}</td>
  319 + <td>{{obj.qdzLast0}}</td>
  320 + <td>{{obj.jhfcLast0}}</td>
  321 + <td>{{obj.sjfcLast0}}</td>
  322 + <td>{{obj.delayLast0}}</td>
  323 + <td>{{obj.qdzFirst1}}</td>
  324 + <td>{{obj.jhfcFirst1}}</td>
  325 + <td>{{obj.sjfcFirst1}}</td>
  326 + <td>{{obj.delayFirst1}}</td>
  327 + <td>{{obj.qdzLast1}}</td>
  328 + <td>{{obj.jhfcLast1}}</td>
  329 + <td>{{obj.sjfcLast1}}</td>
  330 + <td>{{obj.delayLast1}}</td>
313 331 </tr>
  332 + {{/each}}
314 333 </script>
315 334 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/historyMessage.html
... ... @@ -46,7 +46,7 @@
46 46 </form>
47 47 </div>
48 48 <div class="portlet-body">
49   - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  49 + <div class="table-container" id="table" style="margin-top: 10px;overflow:auto;min-width: 906px;">
50 50 <table class="table table-bordered table-hover table-checkable" id="forms">
51 51 <thead>
52 52 <tr class="hidden">
... ... @@ -80,6 +80,7 @@
80 80 format : 'YYYY-MM-DD',
81 81 locale : 'zh-cn'
82 82 });
  83 + $("#table").height($(window).height()-280);
83 84  
84 85 $.get('/basic/lineCode2Name',function(result){
85 86 var data=[];
... ...
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
... ... @@ -57,7 +57,7 @@
57 57 <span class="item-label" style="width: 80px;">选择线路: </span>
58 58 <select class="form-control" name="line" id="line" style="width: 150px;"></select>
59 59 </div>
60   - <div style="display: inline-block; margin-left: 10px">
  60 + <div style="display: inline-block; margin-left: 10px; display: none;">
61 61 <span class="item-label" style="width: 80px;">时刻类型: </span>
62 62 <select class="form-control" name="model" id="model" style="width: 165px;">
63 63 <option value="">请选择...</option>
... ... @@ -93,7 +93,7 @@
93 93 </form>
94 94 </div>
95 95 <div class="portlet-body">
96   - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  96 + <div class="table-container" id="table" style="margin-top: 0px;overflow:auto;min-width: 906px;height:481px;">
97 97 <table class="table table-bordered table-hover table-checkable" id="forms">
98 98 <thead>
99 99  
... ... @@ -135,6 +135,7 @@
135 135 format : 'HH:mm',
136 136 locale : 'zh-cn'
137 137 });
  138 + $("#table").height($(window).height()-320);
138 139  
139 140 var d = new Date();
140 141 var year = d.getFullYear();
... ... @@ -239,6 +240,7 @@
239 240 $("#subCompany").on("change",initXl);
240 241 function initXl(){
241 242 var data=[];
  243 + data.push({id:" ", text:"全部线路"});
242 244 if(fage){
243 245 $("#line").select2("destroy").html('');
244 246 }
... ... @@ -310,6 +312,8 @@
310 312 }
311 313 var reason = $("input[name='reason']");
312 314 var params = {};
  315 + if(line == " ")
  316 + line = "";
313 317 // line = $("#line").val();
314 318 startDate = $("#startDate").val();
315 319 endDate = $("#endDate").val();
... ... @@ -454,7 +458,7 @@
454 458 <thead>
455 459 <tr>
456 460 <th class="hidden"></th>
457   - <th rowspan="3">日期</th>
  461 + <th rowspan="3" style=" width:120px;">日期</th>
458 462 <th rowspan="3">时段</th>
459 463 <th rowspan="3">公司</th>
460 464 <th rowspan="3">分公司</th>
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -7,7 +7,8 @@
7 7 .table-bordered > tbody > tr > td,
8 8 .table-bordered > tfoot > tr > th,
9 9 .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
  10 + border: 1px solid;
  11 + text-align: center; }
11 12 .table-bordered > thead > tr > th,
12 13 .table-bordered > thead > tr > td {
13 14 border-bottom-width: 2px; }
... ... @@ -39,6 +40,14 @@
39 40 <span class="item-label" style="width: 80px;">线路: </span>
40 41 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 42 </div>
  43 + <div style="display: inline-block;margin-left: 10px;">
  44 + <span class="item-label" style="width: 80px;">班次类型: </span>
  45 + <select class="form-control" name="line" id="bcType" style="width: 160px;">
  46 + <option value="0">全部班次</option>
  47 + <option value="1">全程</option>
  48 + <option value="2">区间</option>
  49 + </select>
  50 + </div>
42 51 <div style="margin-top: 10px"></div>
43 52 <div style="display: inline-block;margin-left: 10px;">
44 53 <span class="item-label" style="width: 80px;">开始时间: </span>
... ... @@ -54,7 +63,7 @@
54 63 <option value="">请选择...</option>
55 64 </select>
56 65 </div>
57   - <div class="form-group">
  66 + <div class="form-group" style="margin-left: 10px">
58 67 <input class="btn btn-default" type="button" id="query" value="筛选"/>
59 68 <input class="btn btn-default" type="button" id="export" value="导出"/>
60 69 </div>
... ... @@ -202,6 +211,7 @@
202 211 var startDate = $("#startDate").val();
203 212 var endDate = $("#endDate").val();
204 213 var model = $("#model").val();
  214 + var bcType = $('#bcType').val();
205 215 var company = $("#company").val();
206 216 var subCompany = $("#subCompany").val();
207 217 function jsDoQuery(pagination){
... ... @@ -218,6 +228,7 @@
218 228 startDate = $("#startDate").val();
219 229 endDate = $("#endDate").val();
220 230 model = $("#model").val();
  231 + bcType = $("#bcType").val();
221 232 company = $("#company").val();
222 233 subCompany = $("#subCompany").val();
223 234 params['page'] = page;
... ... @@ -225,6 +236,7 @@
225 236 params['startDate'] = startDate;
226 237 params['endDate'] = endDate;
227 238 params['model'] = model;
  239 + params['bcType'] = bcType;
228 240 params['company'] = company;
229 241 params['subCompany'] = subCompany;
230 242 params['type'] = "query";
... ... @@ -274,12 +286,7 @@
274 286 line = "";
275 287 updateModel();
276 288 });
277   - $('#startDate').on("blur", function(){
278   - startDate = $("#startDate").val();
279   - endDate = $("#endDate").val();
280   - updateModel();
281   - });
282   - $('#endDate').on("blur", function(){
  289 + $('#startDate, #endDate').on("blur", function(){
283 290 startDate = $("#startDate").val();
284 291 endDate = $("#endDate").val();
285 292 updateModel();
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly_sum.html
... ... @@ -41,6 +41,14 @@
41 41 <span class="item-label" style="width: 80px;">线路: </span>
42 42 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
43 43 </div>
  44 + <div style="display: inline-block;margin-left: 10px;">
  45 + <span class="item-label" style="width: 80px;">班次类型: </span>
  46 + <select class="form-control" name="bcType" id="bcType" style="width: 160px;">
  47 + <option value="0">全部</option>
  48 + <option value="1">全程</option>
  49 + <option value="2">区间</option>
  50 + </select>
  51 + </div>
44 52 <div style="margin-top: 10px"></div>
45 53 <div style="display: inline-block;margin-left: 10px;">
46 54 <span class="item-label" style="width: 80px;">开始时间: </span>
... ... @@ -60,7 +68,7 @@
60 68 <!-- <option value="">请选择...</option> -->
61 69 <!-- </select> -->
62 70 <!-- </div> -->
63   - <div class="form-group">
  71 + <div class="form-group" style="margin-left: 10px">
64 72 <input class="btn btn-default" type="button" id="query" value="筛选"/>
65 73 <input class="btn btn-default" type="button" id="export" value="导出"/>
66 74 </div>
... ... @@ -207,6 +215,7 @@
207 215 var startDate = $("#startDate").val();
208 216 var endDate = $("#endDate").val();
209 217 var model = $("#model").val();
  218 + var bcType = "0";
210 219 var nbbm = "";
211 220 var company = $("#company").val();
212 221 var subCompany = $("#subCompany").val();
... ... @@ -224,6 +233,7 @@
224 233 startDate = $("#startDate").val();
225 234 endDate = $("#endDate").val();
226 235 // model = $("#model").val();
  236 + bcType = $("#bcType").val();
227 237 nbbm = $("#nbbm").val()!=null?$("#nbbm").val():"";
228 238 company = $("#company").val();
229 239 subCompany = $("#subCompany").val();
... ... @@ -231,6 +241,7 @@
231 241 params['line'] = line;
232 242 params['startDate'] = startDate;
233 243 params['endDate'] = endDate;
  244 + params['bcType'] = bcType;
234 245 // params['model'] = model;
235 246 params['company'] = company;
236 247 params['subCompany'] = subCompany;
... ... @@ -265,6 +276,7 @@
265 276 params['line'] = line;
266 277 params['startDate'] = startDate;
267 278 params['endDate'] = endDate;
  279 + params['bcType'] = bcType;
268 280 // params['model'] = model;
269 281 params['company'] = company;
270 282 params['subCompany'] = subCompany;
... ...
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -7,7 +7,8 @@
7 7 .table-bordered > tbody > tr > td,
8 8 .table-bordered > tfoot > tr > th,
9 9 .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
  10 + border: 1px solid;
  11 + text-align: center; }
11 12 .table-bordered > thead > tr > th,
12 13 .table-bordered > thead > tr > td {
13 14 border-bottom-width: 2px; }
... ... @@ -19,7 +20,7 @@
19 20  
20 21 width: 5px;
21 22 word-wrap: break-word;
22   -letter-spacing: 20px;
  23 +/* letter-spacing: 20px; */
23 24 }
24 25  
25 26 #forms tr> td >label{
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -55,7 +55,7 @@
55 55 <div class="portlet-body">
56 56 <div class="row">
57 57 <div class="col-md-3">
58   - <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  58 + <div class="" style="margin-top: 10px;overflow:auto;height: 520px">
59 59 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
60 60 <thead>
61 61 <tr class="hidden">
... ... @@ -71,7 +71,7 @@
71 71 </div>
72 72 </div>
73 73 <div class="col-md-9" id="printArea">
74   - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  74 + <div class="table-container" id="xcld_height" style="margin-top: 10px;overflow:auto;min-width: 906px;">
75 75 <table class="table table-bordered table-checkable" id="forms">
76 76 <tbody class="ludan_1">
77 77  
... ... @@ -106,6 +106,7 @@
106 106 locale : 'zh-cn'
107 107 });
108 108  
  109 + $("#xcld_height").height($(window).height()-100);
109 110 var d = new Date();
110 111 var year = d.getFullYear();
111 112 var month = d.getMonth() + 1;
... ... @@ -257,13 +258,14 @@
257 258 if($(this).children().size() < 2){
258 259 return;
259 260 }
260   -
  261 + $("#xcld_height").height($(window).height()-100);
261 262 $(this).children().each(function(index){
262 263 params[index] = $(this).text();
263 264 });
264 265 jName = params[0].split("\\")[0];
265 266 jGh = params[0].split("\\")[1];
266 267 var id = params[3];
  268 + var obj = $(this);
267 269 $get('/realSchedule/MapById',{id:id},function(result){
268 270 result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
269 271 var ludan_1 = template('ludan_1',result);
... ... @@ -279,8 +281,11 @@
279 281 $get('/realSchedule/findKMBC',{jGh:jGh,clZbh:params[1],lpName:params[2],date:date,line:line},function(result){
280 282 var ludan_3 = template('ludan_3',result);
281 283 $('#forms .ludan_3').html(ludan_3);
  284 + $("#info tbody tr").css('background-color', '');
  285 + obj.css('background-color', '#99CCFF');
282 286 });
283 287  
  288 +
284 289 });
285 290  
286 291 $("#export").on("click",function(){
... ... @@ -303,9 +308,12 @@
303 308 $("#info tbody tr").each(function(index){
304 309 param[index] = new Array();
305 310 $(this).children().each(function(i){
306   - param[index][i] = $(this).text().split("\\")[0];
307   - if(i==0){
308   - param[index][3] = $(this).text().split("\\")[1];
  311 + if(i<3){
  312 + param[index][i] = $(this).text().split("\\")[0];
  313 + if(i==0){
  314 + param[index][3] = $(this).text().split("\\")[1];
  315 +
  316 + }
309 317 }
310 318 });
311 319 });
... ...
src/main/resources/static/pages/mforms/operationservices/operationservice.html
... ... @@ -78,7 +78,7 @@
78 78 <th>线路名称</th>
79 79 <th>加注量</th>
80 80 <th>消耗量</th>
81   - <th>行驶公里(含空放里程)</th>
  81 + <th>行驶总公里(含空驶里程)</th>
82 82 <th>空驶里程</th>
83 83 <th>实际班次(包含空放班次)</th>
84 84 </tr>
... ...
src/main/resources/static/pages/mforms/shifdays/shifday.html
... ... @@ -104,6 +104,16 @@ $(function(){
104 104 format : 'YYYY-MM-DD',
105 105 locale : 'zh-cn'
106 106 });
  107 + var d = new Date();
  108 + var year = d.getFullYear();
  109 + var month = d.getMonth() + 1;
  110 + var day = d.getDate();
  111 + if(month < 10)
  112 + month = "0" + month;
  113 + if(day < 10)
  114 + day = "0" + day;
  115 + $("#date").val(year + "-" + month + "-" + day);
  116 +
107 117 var fage=false;
108 118 var obj = [];
109 119 var xlList;
... ... @@ -227,10 +237,14 @@ $(function(){
227 237 <script type="text/html" id="shifday">
228 238 {{each list as obj i}}
229 239 <tr>
230   - <td>{{obj.jName}}</td>
231   - <td>{{obj.sName}}</td>
232   - <td>{{obj.lpName}}</td>
233   - <td>{{obj.carPlate}}</td>
  240 + {{if obj.jName == '汇总合计'}}
  241 + <td colspan='4'>{{obj.jName}}</td>
  242 + {{else}}
  243 + <td>{{obj.jName}}</td>
  244 + <td>{{obj.sName}}</td>
  245 + <td>{{obj.lpName}}</td>
  246 + <td>{{obj.carPlate}}</td>
  247 + {{/if}}
234 248 <td>{{obj.jhlc}}</td>
235 249 <td>{{obj.sjjhlc}}</td>
236 250 <td>{{obj.yygl}}</td>
... ...
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
1   -<style type="text/css">
2   - .table-bordered {
3   - border: 1px solid; }
4   - .table-bordered > thead > tr > th,
5   - .table-bordered > thead > tr > td,
6   - .table-bordered > tbody > tr > th,
7   - .table-bordered > tbody > tr > td,
8   - .table-bordered > tfoot > tr > th,
9   - .table-bordered > tfoot > tr > td {
10   - border: 1px solid; }
11   - .table-bordered > thead > tr > th,
12   - .table-bordered > thead > tr > td {
13   - border-bottom-width: 2px;
14   - text-align: center; }
15   -
16   - .table > tbody + tbody {
17   - border-top: 1px solid; }
18   -</style>
19   -
20   -<div class="page-head">
21   - <div class="page-title">
22   - <h1>班次车辆人员月报表</h1>
23   - </div>
24   -</div>
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid;
  11 + text-align: center; }
  12 + .table-bordered > thead > tr > th,
  13 + .table-bordered > thead > tr > td {
  14 + border-bottom-width: 2px;
  15 + text-align: center; }
  16 +
  17 + .table > tbody + tbody {
  18 + border-top: 1px solid; }
  19 +</style>
  20 +
  21 +<div class="page-head">
  22 + <div class="page-title">
  23 + <h1>班次车辆人员月报表</h1>
  24 + </div>
  25 +</div>
25 26  
26 27 <div class="row">
27 28 <div class="col-md-12">
28 29 <div class="portlet light porttlet-fit bordered">
29 30 <div class="portlet-title">
30   - <form class="form-inline" action="">
31   - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_manth">
32   - <span class="item-label" style="width: 80px;">公司: </span>
33   - <select class="form-control" name="company" id="gsdmManth" style="width: 140px;"></select>
34   - </div>
35   - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_manth">
36   - <span class="item-label" style="width: 80px;">分公司: </span>
37   - <select class="form-control" name="subCompany" id="fgsdmManth" style="width: 140px;"></select>
  31 + <form class="form-inline" action="">
  32 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_manth">
  33 + <span class="item-label" style="width: 80px;">公司: </span>
  34 + <select class="form-control" name="company" id="gsdmManth" style="width: 140px;"></select>
  35 + </div>
  36 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_manth">
  37 + <span class="item-label" style="width: 80px;">分公司: </span>
  38 + <select class="form-control" name="subCompany" id="fgsdmManth" style="width: 140px;"></select>
38 39 </div>
39   - <div style="display: inline-block;margin-left: 10px">
40   - <span class="item-label" style="width: 150px;">线路: </span>
41   - <select class="form-control" name="line" id="line" style="width: 136px;"></select>
42   - </div>
43   - <div style="margin-top: 10px">
44   -
45   - </div>
46   - <div style="display: inline-block;margin-left: 5px;">
47   - <span class="item-label" style="width: 80px;">开始时间: </span>
48   - <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
49   - </div>
50   - <div style="display: inline-block;margin-left: 10px;">
51   - <span class="item-label" style="width: 80px;">结束时间: </span>
52   - <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
53   - </div>
54   - <div style="display: inline-block;margin-left: 10px">
55   - <span class="item-label" style="width: 80px;">统计: </span>
56   - <select class="form-control" style="width: 136px;" id='empnames'>
57   - <option value="驾驶员">驾驶员</option>
58   - <option value="售票员">售票员</option>
59   - <option value="车辆自编号">车辆自编号</option>
60   - </select>
61   - </div>
62   - <div class="form-group">
63   - <input class="btn btn-default" type="button" id="query" value="筛选"/>
64   - <input class="btn btn-default" type="button" id="export" value="导出"/>
  40 + <div style="display: inline-block;margin-left: 10px">
  41 + <span class="item-label" style="width: 150px;">线路: </span>
  42 + <select class="form-control" name="line" id="line" style="width: 136px;"></select>
  43 + </div>
  44 + <div style="margin-top: 10px">
  45 +
  46 + </div>
  47 + <div style="display: inline-block;margin-left: 5px;">
  48 + <span class="item-label" style="width: 80px;">开始时间: </span>
  49 + <input class="form-control" type="text" id="startDate" style="width: 140px;"/>
  50 + </div>
  51 + <div style="display: inline-block;margin-left: 10px;">
  52 + <span class="item-label" style="width: 80px;">结束时间: </span>
  53 + <input class="form-control" type="text" id="endDate" style="width: 140px;"/>
  54 + </div>
  55 + <div style="display: inline-block;margin-left: 10px">
  56 + <span class="item-label" style="width: 80px;">统计: </span>
  57 + <select class="form-control" style="width: 136px;" id='empnames'>
  58 + <option value="驾驶员">驾驶员</option>
  59 + <option value="售票员">售票员</option>
  60 + <option value="车辆自编号">车辆自编号</option>
  61 + </select>
  62 + </div>
  63 + <div class="form-group">
  64 + <input class="btn btn-default" type="button" id="query" value="筛选"/>
  65 + <input class="btn btn-default" type="button" id="export" value="导出"/>
65 66 </div>
66 67 </form>
67 68 </div>
68 69 <div class="portlet-body">
69   - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
70   - <table class="table table-bordered table-hover table-checkable" id="forms">
71   - <thead>
72   - <tr>
73   - <th>序号</th>
74   - <th id='empname'>驾驶员</th>
75   - <th>运营里程</th>
76   - <th>空驶里程</th>
77   - <th>抽减里程</th>
78   - <th>增加里程</th>
79   - <th>总里程</th>
80   - <th>抽减班次</th>
81   - <th>增加班次</th>
82   - <th>实际班次</th>
83   - </tr>
84   - </thead>
85   - <tbody>
86   -
87   - </tbody>
88   - </table>
  70 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  71 + <table class="table table-bordered table-hover table-checkable" id="forms">
  72 + <thead>
  73 + <tr>
  74 + <th>序号</th>
  75 + <th id='empname'>驾驶员</th>
  76 + <th>运营里程</th>
  77 + <th>空驶里程</th>
  78 + <th>抽减里程</th>
  79 + <th>增加里程</th>
  80 + <th>总里程</th>
  81 + <th>抽减班次</th>
  82 + <th>增加班次</th>
  83 + <th>实际班次</th>
  84 + </tr>
  85 + </thead>
  86 + <tbody>
  87 +
  88 + </tbody>
  89 + </table>
89 90 </div>
90 91 </div>
91 92 </div>
... ... @@ -96,155 +97,165 @@
96 97 $(function(){
97 98 // 关闭左侧栏
98 99 if (!$('body').hasClass('page-sidebar-closed'))
99   - $('.menu-toggler.sidebar-toggler').click();
  100 + $('.menu-toggler.sidebar-toggler').click();
100 101  
101 102 $("#startDate,#endDate").datetimepicker({
102 103 format : 'YYYY-MM-DD',
103 104 locale : 'zh-cn'
104   - });
105   - var fage=false;
106   - var obj = [];
107   - var xlList;
108   - $.get('/report/lineList',function(result){
109   - xlList=result;
110   - $.get('/user/companyData', function(result){
111   - obj = result;
112   - var options = '';
113   - for(var i = 0; i < obj.length; i++){
114   - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
115   - }
116   -
117   - if(obj.length ==0){
118   - $("#gsdmDiv_manth").css('display','none');
119   - $('#fgsdmDiv_manth').css('display','none');
120   - }else if(obj.length ==1){
121   - $("#gsdmDiv_manth").css('display','none');
122   - if(obj[0].children.length == 1 || obj[0].children.length ==0)
123   - $('#fgsdmDiv_manth').css('display','none');
124   - }
125   - $('#gsdmManth').html(options);
126   - updateCompany();
127   - });
128   - })
129   - $("#gsdmManth").on("change",updateCompany);
130   - function updateCompany(){
131   - var company = $('#gsdmManth').val();
132   - var options = '';
133   - for(var i = 0; i < obj.length; i++){
134   - if(obj[i].companyCode == company){
135   - var children = obj[i].children;
136   - for(var j = 0; j < children.length; j++){
137   - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
138   - }
139   - }
140   - }
141   - $('#fgsdmManth').html(options);
142   - initXl();
143   - }
144   - $("#fgsdmManth").on("change",initXl);
145   - function initXl(){
146   - var data=[];
147   - if(fage){
148   - $("#line").select2("destroy").html('');
149   - }
150   - var fgs=$('#fgsdmManth').val();
151   - var gs=$('#gsdmManth').val();
152   - for(var i=0;i<xlList.length;i++){
153   - if(gs!=""){
154   - if(fgs!=""){
155   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
156   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
157   - }
158   - }else{
159   - if(xlList[i]["gsbm"]==gs){
160   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
161   - }
162   - }
163   - }
164   - }
165   - initPinYinSelect2('#line',data,'');
166   - fage=true;
167   - }
168   - $("#query").on("click",function(){
169   - if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
170   - layer.msg("请选择时间范围!");
171   - return;
172   - }
173   - if($("#endDate").val() == null || $("#endDate").val().trim().length == 0){
174   - layer.msg("请选择时间范围!");
175   - return;
176   - }
177   - $("#empname").html($("#empnames").val())
178   - var params={};
179   - params.empnames=$("#empnames").val();
180   - params.line = $("#line").val();
181   - params.startDate = $("#startDate").val();
182   - params.endDate = $("#endDate").val();
183   - params.lpName = $("#lpName").val();
184   - params.gsdmManth= $("#gsdmManth").val();
185   - params.fgsdmManth= $("#fgsdmManth").val();
186   - $get("/mcy_forms/shiftuehiclemanth",params,function(result){
187   - $("#sDate").text(startDate);
188   - $("#eDate").text(endDate);
189   - var temp = {};
190   - var today_account = 0;
191   - temp["line"] = $("#line").text();
192   - $.each(result, function(i, obj) {
193   - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
194   - today_account++;
195   - }
196   - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
197   - });
198   -
199   - var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result});
200   - // 把渲染好的模版html文本追加到表格中
201   - $('#forms tbody').html(list_shiftuehiclemanth);
202   -
203   - });
204   - });
205   -
206   - $("#export").on("click",function(){
207   - var params={};
208   - params.empnames=$("#empnames").val();
209   - params.line = $("#line").val();
210   - params.startDate = $("#startDate").val();
211   - params.endDate = $("#endDate").val();
212   - params.lpName = $("#lpName").val();
213   - params.gsdmManth= $("#gsdmManth").val();
214   - params.fgsdmManth= $("#fgsdmManth").val();
215   - params.type='export';
216   - $get('/mcy_export/shiftuehiclemanthExport',params,function(result){
217   - window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD"));
218   - });
219   - });
  105 + });
  106 + var d = new Date();
  107 + var year = d.getFullYear();
  108 + var month = d.getMonth() + 1;
  109 + var day = d.getDate();
  110 + if(month < 10)
  111 + month = "0" + month;
  112 + if(day < 10)
  113 + day = "0" + day;
  114 + $("#startDate,#endDate").val(year + "-" + month + "-" + day);
  115 +
  116 + var fage=false;
  117 + var obj = [];
  118 + var xlList;
  119 + $.get('/report/lineList',function(result){
  120 + xlList=result;
  121 + $.get('/user/companyData', function(result){
  122 + obj = result;
  123 + var options = '';
  124 + for(var i = 0; i < obj.length; i++){
  125 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  126 + }
  127 +
  128 + if(obj.length ==0){
  129 + $("#gsdmDiv_manth").css('display','none');
  130 + $('#fgsdmDiv_manth').css('display','none');
  131 + }else if(obj.length ==1){
  132 + $("#gsdmDiv_manth").css('display','none');
  133 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  134 + $('#fgsdmDiv_manth').css('display','none');
  135 + }
  136 + $('#gsdmManth').html(options);
  137 + updateCompany();
  138 + });
  139 + })
  140 + $("#gsdmManth").on("change",updateCompany);
  141 + function updateCompany(){
  142 + var company = $('#gsdmManth').val();
  143 + var options = '';
  144 + for(var i = 0; i < obj.length; i++){
  145 + if(obj[i].companyCode == company){
  146 + var children = obj[i].children;
  147 + for(var j = 0; j < children.length; j++){
  148 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  149 + }
  150 + }
  151 + }
  152 + $('#fgsdmManth').html(options);
  153 + initXl();
  154 + }
  155 + $("#fgsdmManth").on("change",initXl);
  156 + function initXl(){
  157 + var data=[];
  158 + if(fage){
  159 + $("#line").select2("destroy").html('');
  160 + }
  161 + var fgs=$('#fgsdmManth').val();
  162 + var gs=$('#gsdmManth').val();
  163 + for(var i=0;i<xlList.length;i++){
  164 + if(gs!=""){
  165 + if(fgs!=""){
  166 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  167 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  168 + }
  169 + }else{
  170 + if(xlList[i]["gsbm"]==gs){
  171 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  172 + }
  173 + }
  174 + }
  175 + }
  176 + initPinYinSelect2('#line',data,'');
  177 + fage=true;
  178 + }
  179 + $("#query").on("click",function(){
  180 + if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
  181 + layer.msg("请选择时间范围!");
  182 + return;
  183 + }
  184 + if($("#endDate").val() == null || $("#endDate").val().trim().length == 0){
  185 + layer.msg("请选择时间范围!");
  186 + return;
  187 + }
  188 + $("#empname").html($("#empnames").val())
  189 + var params={};
  190 + params.empnames=$("#empnames").val();
  191 + params.line = $("#line").val();
  192 + params.startDate = $("#startDate").val();
  193 + params.endDate = $("#endDate").val();
  194 + params.lpName = $("#lpName").val();
  195 + params.gsdmManth= $("#gsdmManth").val();
  196 + params.fgsdmManth= $("#fgsdmManth").val();
  197 + $get("/mcy_forms/shiftuehiclemanth",params,function(result){
  198 + $("#sDate").text(startDate);
  199 + $("#eDate").text(endDate);
  200 + var temp = {};
  201 + var today_account = 0;
  202 + temp["line"] = $("#line").text();
  203 + $.each(result, function(i, obj) {
  204 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  205 + today_account++;
  206 + }
  207 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  208 + });
  209 +
  210 + var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result});
  211 + // 把渲染好的模版html文本追加到表格中
  212 + $('#forms tbody').html(list_shiftuehiclemanth);
  213 +
  214 + });
  215 + });
  216 +
  217 + $("#export").on("click",function(){
  218 + var params={};
  219 + params.empnames=$("#empnames").val();
  220 + params.line = $("#line").val();
  221 + params.startDate = $("#startDate").val();
  222 + params.endDate = $("#endDate").val();
  223 + params.lpName = $("#lpName").val();
  224 + params.gsdmManth= $("#gsdmManth").val();
  225 + params.fgsdmManth= $("#fgsdmManth").val();
  226 + params.type='export';
  227 + $get('/mcy_export/shiftuehiclemanthExport',params,function(result){
  228 + window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD"));
  229 + });
  230 + });
220 231  
221   - });
222   -
223   -// $("#empnames").change(function(){
224   -// $("#empname").html($("#empnames").val())
225   -// // $("#query").click();
226   -
227   -// });
  232 + });
  233 +
  234 +// $("#empnames").change(function(){
  235 +// $("#empname").html($("#empnames").val())
  236 +// // $("#query").click();
  237 +
  238 +// });
228 239  
229 240 </script>
230 241 <script type="text/html" id="list_shiftuehiclemanth">
231 242 {{each list as obj i}}
232   - <tr>
  243 + <tr>
233 244 <td>{{i+1}}</td>
234   - <td>{{obj.jName}}</td>
235   - <td>{{obj.jhlc}}</td>
236   - <td>{{obj.emptMileage}}</td>
237   - <td>{{obj.remMileage}}</td>
238   - <td>{{obj.addMileage}}</td>
239   - <td>{{obj.totalm}}</td>
240   - <td>{{obj.cjbc}}</td>
241   - <td>{{obj.ljbc}}</td>
  245 + <td>{{obj.jName}}</td>
  246 + <td>{{obj.jhlc}}</td>
  247 + <td>{{obj.emptMileage}}</td>
  248 + <td>{{obj.remMileage}}</td>
  249 + <td>{{obj.addMileage}}</td>
  250 + <td>{{obj.totalm}}</td>
  251 + <td>{{obj.cjbc}}</td>
  252 + <td>{{obj.ljbc}}</td>
242 253 <td>{{obj.sjbc}}</td>
243 254 </tr>
244   - {{/each}}
245   - {{if list.length == 0}}
246   - <tr>
247   - <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
248   - </tr>
  255 + {{/each}}
  256 + {{if list.length == 0}}
  257 + <tr>
  258 + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
  259 + </tr>
249 260 {{/if}}
250 261 </script>
251 262 \ No newline at end of file
... ...
src/main/resources/static/pages/oil/add.html
... ... @@ -74,7 +74,7 @@
74 74 <div class="form-group">
75 75 <label class="col-md-3 control-label">出场里程</label>
76 76 <div class="col-md-4">
77   - <input type="text" class="form-control" name="czlc" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  77 + <input type="text" value="0" class="form-control" name="czlc" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
78 78 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
79 79 </div>
80 80 </div>
... ... @@ -82,7 +82,7 @@
82 82 <div class="form-group">
83 83 <label class="col-md-3 control-label">出场油量</label>
84 84 <div class="col-md-4">
85   - <input type="text" class="form-control" name="czyl" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  85 + <input type="text" value="0" class="form-control" name="czyl" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
86 86 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
87 87 </div>
88 88 </div>
... ... @@ -90,7 +90,7 @@
90 90 <div class="form-group">
91 91 <label class="col-md-3 control-label">加油量</label>
92 92 <div class="col-md-4">
93   - <input type="text" class="form-control" name="jzl" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  93 + <input type="text" value="0" class="form-control" name="jzl" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
94 94 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
95 95 </div>
96 96 </div>
... ... @@ -98,7 +98,7 @@
98 98 <div class="form-group">
99 99 <label class="col-md-3 control-label">进场油量</label>
100 100 <div class="col-md-4">
101   - <input type="text" class="form-control" name="jzyl" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  101 + <input type="text" value="0" class="form-control" name="jzyl" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
102 102 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
103 103 </div>
104 104 </div>
... ... @@ -106,7 +106,7 @@
106 106 <div class="form-group">
107 107 <label class="col-md-3 control-label">油耗</label>
108 108 <div class="col-md-4">
109   - <input type="text" class="form-control" name="yh" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  109 + <input type="text" value="0" class="form-control" name="yh" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
110 110 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
111 111 </div>
112 112 </div>
... ... @@ -124,7 +124,7 @@
124 124 <div class="form-group">
125 125 <label class="col-md-3 control-label">尿素</label>
126 126 <div class="col-md-4">
127   - <input type="text" class="form-control" name="ns" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  127 + <input type="text" value="0" class="form-control" name="ns" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
128 128 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
129 129 </div>
130 130 </div>
... ... @@ -132,7 +132,7 @@
132 132 <div class="form-group">
133 133 <label class="col-md-3 control-label">进场里程</label>
134 134 <div class="col-md-4">
135   - <input type="text" class="form-control" name="jzlc" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  135 + <input type="text" value="0" class="form-control" name="jzlc" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
136 136 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
137 137 </div>
138 138 </div>
... ... @@ -155,14 +155,14 @@
155 155 <div class="form-group">
156 156 <label class="col-md-3 control-label">损耗油量</label>
157 157 <div class="col-md-4">
158   - <input type="text" class="form-control" name="sh" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  158 + <input type="text" value="0" class="form-control" name="sh" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
159 159 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
160 160 </div>
161 161 </div>
162 162 <div class="form-group">
163 163 <label class="col-md-3 control-label">行驶总里程</label>
164 164 <div class="col-md-4">
165   - <input type="text" class="form-control" name="zlc" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
  165 + <input type="text" value="0" class="form-control" name="zlc" onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"
166 166 onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')">
167 167 </div>
168 168 </div>
... ...
src/main/resources/static/pages/oil/jyglList.html
... ... @@ -69,7 +69,7 @@
69 69 <th width="3%">油价</th>
70 70 <th width="4%">路单工号</th>
71 71 <th width="4%">备注</th>
72   - <th width="10%">总加注量</th>
  72 + <th width="10%">操作</th>
73 73 </tr>
74 74 <tr role="row" class="filter">
75 75 <td></td>
... ... @@ -160,7 +160,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
160 160 type="text" value="{{obj.bz}}" style=" width:45px" />
161 161 </td>
162 162 <td>
163   - {{obj.zjzl}}
  163 +
164 164 </td>
165 165 </tr>
166 166 {{/each}}
... ...
src/main/resources/static/pages/report/oil/oilListMonth.html
... ... @@ -37,7 +37,7 @@
37 37 </div>
38 38 <div class="form-group">
39 39 <input class="btn btn-default" type="button" id="query" value="查询"/>
40   -<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
  40 + <input class="btn btn-default" type="button" id="export" value="导出"/>
41 41 </div>
42 42 </form>
43 43 </div>
... ... @@ -115,18 +115,36 @@
115 115 initPinYinSelect2('#line',data,'');
116 116  
117 117 })
  118 +
118 119 //查询
119 120 $("#query").on('click',function(){
  121 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  122 + layer.msg("请选择日期!");
  123 + return;
  124 + }
120 125 var line = $("#line").val();
121 126 var date = $("#date").val();
122   - $get('/ylb/oilListMonth',{line:line,date:date},function(result){
123   - $.each(result, function(i, obj) {
124   - obj.rq = moment(obj.rq).format("DD");
125   - });
  127 + $get('/ylb/oilListMonth',{line:line,date:date,type:'query'},function(result){
  128 +// $.each(result, function(i, obj) {
  129 +// obj.rq = moment(obj.rq).format("DD");
  130 +// });
126 131 var oilListMonth = template('oilListMonth',{list:result});
127 132 $('#forms tbody').html(oilListMonth);
128 133 });
129 134 });
  135 +
  136 + //导出
  137 + $("#export").on("click",function(){
  138 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  139 + layer.msg("请选择日期!");
  140 + return;
  141 + }
  142 + var line = $("#line").val();
  143 + var date = $("#date").val();
  144 + $get('/ylb/oilListMonth', {line:line,date:date,type:'export'}, function(result){
  145 + window.open("/downloadFile/download?fileName=月存油报表"+moment(date).format("YYYYMMDD"));
  146 + });
  147 + });
130 148 });
131 149 </script>
132 150 <script type="text/html" id="oilListMonth">
... ...
src/main/resources/static/pages/report/timetable/timetable.html
... ... @@ -165,19 +165,21 @@
165 165 <div class="col-md-6" >
166 166 <table class="table table-bordered table-checkable" id="formsTime5">
167 167 <tr>
168   - <td colspan="7">全日分组行驶时间(区间除外)</td>
  168 + <td colspan="8">全日分组行驶时间(区间除外)</td>
169 169 </tr>
170 170 <tr>
171 171 <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分组 时间</td>
172   - <td width="23%" colspan="2" style="text-align:center;vertical-align:middle;">计划行驶(分)</td>
173   - <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈时间</td>
174   - <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">停驶时间</td>
175   - <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">车距区间</td>
176   - <td width="12%" rowspan="2" style="text-align:center;vertical-align:middle;">平均车距</td>
  172 + <td width="19%" colspan="2" style="text-align:center;vertical-align:middle;">计划行驶(分)</td>
  173 + <td width="19%" colspan="2" style="text-align:center;vertical-align:middle;">停站时间</td>
  174 + <td width="14%" rowspan="2" style="text-align:center;vertical-align:middle;">周转时间</td>
  175 + <td width="14%" rowspan="2" style="text-align:center;vertical-align:middle;">车距区间</td>
  176 + <td width="14%" rowspan="2" style="text-align:center;vertical-align:middle;">平均车距</td>
177 177 </tr>
178 178 <tr>
179 179 <td>上行</td>
180 180 <td style="text-align:center;">下行</td>
  181 + <td>上行</td>
  182 + <td style="text-align:center;">下行</td>
181 183 </tr>
182 184 <tbody class="tbody_time_5">
183 185  
... ... @@ -405,15 +407,16 @@
405 407 <td align="center">{{result.sjd}}</td>
406 408 <td align="center">{{result.sxsj}}</td>
407 409 <td align="center">{{result.xxsj}}</td>
  410 + <td align="center">{{result.sxtssj}}</td>
  411 + <td align="center">{{result.xxtssj}}</td>
408 412 <td align="center">{{result.fqsj}}</td>
409   - <td align="center">{{result.tssj}}</td>
410 413 <td align="center">{{result.cjqj}}</td>
411 414 <td align="center">{{result.pjcj}}</td>
412 415 </tr>
413 416 {{/each}}
414 417 {{if list.length == 0}}
415 418 <tr>
416   - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  419 + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td>
417 420 </tr>
418 421 {{/if}}
419 422 </script>
... ...
src/main/resources/static/pages/trafficManage/js/timeTempletUpload.js
1 1 /**
2 2 *
3   - * @JSName : common.js(运管功能公共js)
4   - *
5   - * @Author : bsth@lq
6   - *
7   - * @Description : TODO(运管功能公共js)
8   - *
  3 + * @JSName : timeTempletUpload.js(运管处js)
  4 + *
  5 + * @Author : bsth@zq
  6 + *
  7 + * @Description : TODO(运管功能公共js)
  8 + *
9 9 * @Data : 2016年6月29日 上午9:21:17
10 10 *
11 11 * @Version 公交调度系统BS版 0.1
12   - *
  12 + *
13 13 */
14 14  
15 15 (function(){
... ... @@ -34,7 +34,7 @@
34 34 }
35 35 var lines = new Array();
36 36 var gsmap = getBusMap();
37   -
  37 +
38 38 $('#line').select2({
39 39 ajax: {
40 40 url: '/realSchedule/findLine',
... ... @@ -73,7 +73,7 @@
73 73 }
74 74 }
75 75 });
76   -
  76 +
77 77 // 绑定查询事件
78 78 $("#search").click(searchM);
79 79 // 绑定上传事件
... ... @@ -92,16 +92,17 @@
92 92 $("#right_div table tbody").empty();
93 93 var params = {};
94 94 // 取得输入框的值
95   - var inputs = $(".param input,select");debugger;
  95 + var inputs = $(".param input,select");
96 96 // 遍历数组
97 97 $.each(inputs, function(i, element) {
98 98 params[$(element).attr("name")] = $(element).val();
99 99 });
100 100 var i = layer.load(2);
101   - $get('/tic', params, function(data) {
102   - _dateFormat(data.content);
  101 + $get('/tic_ec', params, function(data) {
  102 + var content = data.data.content;
  103 + _dateFormat(content);
103 104 var bodyHtm = template('timeTemplet_list_temp', {
104   - list : data.content
  105 + list : content
105 106 });
106 107 $("#left_div table tbody").empty();
107 108 $("#left_div table tbody").append(bodyHtm);
... ... @@ -112,7 +113,7 @@
112 113  
113 114 // 上传方法
114 115 function uploadM() {
115   -
  116 +
116 117 // 取得输入框的值
117 118 var trs = $("#right_div tbody tr input");
118 119 if (trs.length == 0) {
... ... @@ -128,14 +129,14 @@
128 129 $.ajax({
129 130 type: 'get',url: '/trmg/setSKB',
130 131 data: params ,dataType:'text',
131   - success:function(data) {
  132 + success:function(data) {
132 133 if(data == 'success'){
133 134 alert("上传成功");
134 135 }else{
135 136 alert("上传失败");
136 137 }
137   -
138   - }, error : function() {
  138 +
  139 + }, error : function() {
139 140 alert("操作失败");
140 141 }
141 142  
... ... @@ -180,23 +181,30 @@
180 181 obj.qyrq = moment(obj.qyrq).format(fs);
181 182 });
182 183 }
183   - /*
  184 +
184 185 // 绑定查询事件
185 186 $("#setXL").click(setXLF);
186   - var params = {};
  187 +
187 188 function setXLF() {
  189 + var params = {};
  190 + // 取得输入框的值
  191 + var inputs = $(".param input,select");debugger;
  192 + // 遍历数组
  193 + $.each(inputs, function(i, element) {
  194 + params[$(element).attr("name")] = $(element).val();
  195 + });
188 196 $.ajax({
189 197 type: 'get',url: '/trmg/setXL',
190 198 data: params ,dataType:'text',
191   - success:function(data) {
  199 + success:function(data) {
192 200 alert(data);
193   - }, error : function() {
  201 + }, error : function() {
194 202 alert("操作失败");
195 203 }
196 204  
197 205 });
198 206 }
199   -
  207 +
200 208 // 绑定查询事件
201 209 $("#setCL").click(setCLF);
202 210 var params = {};
... ... @@ -204,15 +212,15 @@
204 212 $.ajax({
205 213 type: 'get',url: '/trmg/setCL',
206 214 data: params ,dataType:'text',
207   - success:function(data) {
  215 + success:function(data) {
208 216 alert(data);
209   - }, error : function() {
  217 + }, error : function() {
210 218 alert("操作失败");
211 219 }
212 220  
213 221 });
214 222 }
215   -
  223 +
216 224 // 绑定查询事件
217 225 $("#setSJ").click(setSJF);
218 226 var params = {};
... ... @@ -220,47 +228,79 @@
220 228 $.ajax({
221 229 type: 'get',url: '/trmg/setSJ',
222 230 data: params ,dataType:'text',
223   - success:function(data) {
  231 + success:function(data) {
224 232 alert(data);
225   - }, error : function() {
  233 + }, error : function() {
226 234 alert("操作失败");
227 235 }
228 236  
229 237 });
230 238 }
231   -
  239 +
232 240 // 绑定查询事件
233   - $("#setCS").click(setCSF);
  241 + $("#setLD").click(setLDF);
234 242 var params = {};
235   - function setCSF() {
  243 + function setLDF() {
236 244 $.ajax({
237   - type: 'get',url: '/trmg/setCS',
  245 + type: 'get',url: '/trmg/setLD',
238 246 data: params ,dataType:'text',
239   - success:function(data) {
  247 + success:function(data) {
240 248 alert(data);
241   - }, error : function() {
  249 + }, error : function() {
242 250 alert("操作失败");
243 251 }
244 252  
245 253 });
246 254 }
247   -
  255 +
  256 + // 绑定查询事件
  257 + $("#setLDFile").click(setLDFileF);
  258 + var params = {};
  259 + function setLDFileF() {
  260 + $.ajax({
  261 + type: 'get',url: '/trmg/setLDFile',
  262 + data: params ,dataType:'text',
  263 + success:function(data) {
  264 + alert(data);
  265 + }, error : function() {
  266 + alert("操作失败");
  267 + }
  268 +
  269 + });
  270 + }
  271 +
248 272 // 绑定查询事件
249   - $("#setXLPC").click(setXLPCF);
  273 + $("#setLCYH").click(setLCYHF);
250 274 var params = {};
251   - function setXLPCF() {
  275 + function setLCYHF() {
252 276 $.ajax({
253   - type: 'get',url: '/trmg/setXLPC',
  277 + type: 'get',url: '/trmg/setLCYH',
254 278 data: params ,dataType:'text',
255   - success:function(data) {
  279 + success:function(data) {
256 280 alert(data);
257   - }, error : function() {
  281 + }, error : function() {
258 282 alert("操作失败");
259 283 }
260 284  
261 285 });
262 286 }
263   -
  287 +
  288 + // 绑定查询事件
  289 + $("#setDDRB").click(setDDRBF);
  290 + var params = {};
  291 + function setDDRBF() {
  292 + $.ajax({
  293 + type: 'get',url: '/trmg/setDDRB',
  294 + data: params ,dataType:'text',
  295 + success:function(data) {
  296 + alert(data);
  297 + }, error : function() {
  298 + alert("操作失败");
  299 + }
  300 +
  301 + });
  302 + }
  303 +
264 304 // 绑定查询事件
265 305 $("#setJHBC").click(setJHBCF);
266 306 var params = {};
... ... @@ -268,13 +308,62 @@
268 308 $.ajax({
269 309 type: 'get',url: '/trmg/setJHBC',
270 310 data: params ,dataType:'text',
271   - success:function(data) {
  311 + success:function(data) {
  312 + alert(data);
  313 + }, error : function() {
  314 + alert("操作失败");
  315 + }
  316 +
  317 + });
  318 + }
  319 +
  320 + // 绑定查询事件
  321 + $("#setXLPC").click(setXLPCF);
  322 + var params = {};
  323 + function setXLPCF() {
  324 + $.ajax({
  325 + type: 'get',url: '/trmg/setXLPC',
  326 + data: params ,dataType:'text',
  327 + success:function(data) {
272 328 alert(data);
273   - }, error : function() {
  329 + }, error : function() {
274 330 alert("操作失败");
275 331 }
276 332  
277 333 });
278   - }*/
  334 + }
  335 +
  336 +
  337 + // 绑定查询事件
  338 + $("#setCS").click(setCSF);
  339 + var params = {};
  340 + function setCSF() {
  341 + $.ajax({
  342 + type: 'get',url: '/trmg/setCS',
  343 + data: params ,dataType:'text',
  344 + success:function(data) {
  345 + alert(data);
  346 + }, error : function() {
  347 + alert("操作失败");
  348 + }
  349 +
  350 + });
  351 + }
  352 +
  353 + // 绑定查询事件
  354 + $("#downloadAllDataFile").click(getDownLoadAllDataFileF);
  355 + var params = {};
  356 + function getDownLoadAllDataFileF() {
  357 + $.ajax({
  358 + type: 'get',url: '/trmg/getDownLoadAllDataFile',
  359 + data: params ,dataType:'text',
  360 + success:function(data) {
  361 + alert(data);
  362 + }, error : function() {
  363 + alert("操作失败");
  364 + }
  365 +
  366 + });
  367 + }
279 368  
280 369 })();
281 370 \ No newline at end of file
... ...
src/main/resources/static/pages/trafficManage/js/timeTempletUploadRecord.js
... ... @@ -13,6 +13,7 @@
13 13 */
14 14  
15 15 (function(){
  16 + var page = 0, initPagination;
16 17 // 关闭左侧栏
17 18 if (!$('body').hasClass('page-sidebar-closed'))
18 19 $('.menu-toggler.sidebar-toggler').click();
... ... @@ -69,6 +70,49 @@
69 70 $('#brancheCompanySelect').html(options).on('change', setLineAutocompleteOptions);
70 71 }
71 72 }
  73 +
  74 + function setLineAutocompleteOptions(){
  75 + // 搜索参数集合
  76 + var params = {};
  77 + // 搜索字段名称
  78 + var name;
  79 + var items = $("ul.breadcrumb select");
  80 + // 遍历items集合
  81 + for(var j = 0, item; item = items[j++];){
  82 + // 获取字段名称
  83 + name = $(item).attr('name');
  84 + if(name){
  85 + // 赋取相对应的值
  86 + params[name] = $(item).val();
  87 + }
  88 + }
  89 + var lines = new Array();
  90 + var gsmap = getBusMap();
  91 + // 取得所有线路
  92 + $get('/line/all', params, function(allLine) {
  93 + // 遍历数组
  94 + $.each(allLine, function(i, e) {
  95 + var companyCode = e.company;
  96 + e.company = gsmap[e.company];
  97 + e.brancheCompany = gsmap[companyCode+"_"+e.brancheCompany];
  98 + var line = '{"hex":"'+e.company+'","label":"'+e.name+'"}';
  99 + var obj = jQuery.parseJSON(line);
  100 + lines[i]= obj;
  101 + });
  102 +
  103 +
  104 + });
  105 + // 给输入框绑定autocomplete事件
  106 + $("#line_name").autocompleter({
  107 + highlightMatches: true,
  108 + source: lines,
  109 + template: '{{ label }} <span>({{ hex }})</span>',
  110 + hint: true,
  111 + empty: false,
  112 + limit: 5,
  113 + });
  114 + }
  115 +
72 116 // 日期控件
73 117 $('#dateInput').datetimepicker({
74 118 // 日期控件时间格式
... ... @@ -140,7 +184,7 @@
140 184 });
141 185 });
142 186 // 给输入框绑定autocomplete事件
143   - $("input[name='xl.name_eq']").autocompleter({
  187 + $("#line_name").autocompleter({
144 188 highlightMatches : true,
145 189 source : lines,
146 190 template : '{{ label }} <span>({{ hex }})</span>',
... ... @@ -150,5 +194,66 @@
150 194 });
151 195 // 设置autocompleter的宽度和输入框一样
152 196 $(".autocompleter").css("width",
153   - $("input[name='xl.name_eq']").css("width"));
  197 + $("#line_name").css("width"));
  198 +
  199 + searchM(null, true);
  200 + // 绑定查询事件
  201 + $("#search").click(searchM);
  202 + // 查询方法
  203 + function searchM(p, pagination) {
  204 + var params = {};
  205 + // 取得输入框的值
  206 + var inputs = $(".breadcrumb input,select");
  207 + // 遍历数组
  208 + $.each(inputs, function(i, element) {
  209 + params[$(element).attr("name")] = $(element).val();
  210 + });
  211 + var i = layer.load(2);
  212 + $get('/skb_log', params, function(data) {
  213 + var content = data.content;
  214 + _dateFormat(content);
  215 + var bodyHtm = template('timeTempletUploadRecord_list_temp', {
  216 + list : content
  217 + });
  218 + $('#datatable_logger tbody').html(bodyHtm);
  219 + if(pagination && data.content.length > 0){
  220 + //重新分页
  221 + initPagination = true;
  222 + showPagination(data);
  223 + }
  224 + layer.close(i);
  225 + });
  226 + }
  227 +
  228 + //转换时间格式
  229 + function _dateFormat(list) {
  230 + var fs = 'YYYY-MM-DD HH:mm';
  231 + $.each(list, function(i, obj) {
  232 + obj.createDate = moment(obj.createDate).format(fs);
  233 + });
  234 + }
  235 +
  236 + function showPagination(data){
  237 + //分页
  238 + $('#pagination').jqPaginator({
  239 + totalPages: data.totalPages,
  240 + visiblePages: 6,
  241 + currentPage: page + 1,
  242 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
  243 + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
  244 + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
  245 + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
  246 + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
  247 + onPageChange: function (num, type) {
  248 + if(initPagination){
  249 + initPagination = false;
  250 + return;
  251 + }
  252 +
  253 +
  254 + page = num - 1;
  255 + searchM(null, false);
  256 + }
  257 + });
  258 + }
154 259 })();
155 260 \ No newline at end of file
... ...
src/main/resources/static/pages/trafficManage/timeTempletUploadRecord.html
... ... @@ -10,16 +10,16 @@
10 10 <div class="col-md-12">
11 11 <ul class="breadcrumb">
12 12 <li>筛选数据:</li>
13   - <li><select name="company_eq" class="form-control" id="companySelect"></select></li>
14   - <li><select name="brancheCompany_eq" class="form-control" id="brancheCompanySelect"></select></li>
  13 + <li><select name="ttInfo.xl.company_eq" class="form-control" id="companySelect"></select></li>
  14 + <li><select name="ttInfo.xl.brancheCompany_eq" class="form-control" id="brancheCompanySelect"></select></li>
15 15 <li>日期:</li>
16   - <li><input type="text" class="inputCommon dateTime" name="date" id="dateInput" placeholder="日期"></li>
  16 + <li><input type="text" class="inputCommon dateTime" name="createDate_date_eq" id="dateInput" placeholder="日期"></li>
17 17 <li>线路名称:</li>
18 18 <li><input type="text" class="form-control form-filter input-sm"
19   - name="xl.name_eq" maxlength="40" /></li>
  19 + name="ttInfo.xl.name_eq" id="line_name" maxlength="40" /></li>
20 20 <li>上传用户:</li>
21 21 <li><input type="text" class="inputCommon inputCarPlate"
22   - name="xl.user_eq" maxlength="40" /></li>
  22 + name="user.name_like" maxlength="40" /></li>
23 23 <li><a class="btn btn-circle blue" id="search">筛选</a></li>
24 24 </ul>
25 25 </div>
... ... @@ -27,7 +27,8 @@
27 27 <div class="_panel">
28 28 <div class="table-container">
29 29 <table
30   - class="table table-striped table-bordered table-advance pb-table head">
  30 + class="table table-striped table-bordered table-advance pb-table head"
  31 + id="datatable_logger">
31 32 <thead>
32 33 <tr>
33 34 <th>序号</th>
... ... @@ -49,35 +50,97 @@
49 50 </div>
50 51 </div>
51 52 </div>
52   -<script id="lineStationRecord_list_temp" type="text/html">
  53 +<script id="timeTempletUploadRecord_list_temp" type="text/html">
53 54 {{each list as obj i}}
54 55 <tr>
55 56 <td class="seq" style="vertical-align: middle;">
56 57 {{i+1}}
57 58 </td>
58 59 <td>
59   - {{obj.name}}
  60 + {{if obj.ttInfo.xl.company == '55'}}
  61 + 上南公司
  62 + {{else if obj.ttInfo.xl.company == '22'}}
  63 + 金高公司
  64 + {{else if obj.ttInfo.xl.company == '05'}}
  65 + 杨高公司
  66 + {{else if obj.ttInfo.xl.company == '26'}}
  67 + 南汇公司
  68 + {{else if obj.ttInfo.xl.company == '77'}}
  69 + 闵行公司
  70 + {{/if}}
60 71 </td>
61   - <td class="ttInfoId">
62   - {{obj.company}}
  72 + <td>
  73 + {{if obj.ttInfo.xl.company == '55'}}
  74 +
  75 + {{if obj.ttInfo.xl.brancheCompany == '1'}}
  76 + 上南二分公司
  77 + {{else if obj.ttInfo.xl.brancheCompany == '2'}}
  78 + 上南三分公司
  79 + {{else if obj.ttInfo.xl.brancheCompany == '3'}}
  80 + 上南六分公司
  81 + {{else if obj.ttInfo.xl.brancheCompany == '4'}}
  82 + 上南一分公司
  83 + {{/if}}
  84 +
  85 + {{else if obj.ttInfo.xl.company == '22'}}
  86 +
  87 + {{if obj.ttInfo.xl.brancheCompany == '1'}}
  88 + 四分公司
  89 + {{else if obj.ttInfo.xl.brancheCompany == '2'}}
  90 + 二分公司
  91 + {{else if obj.ttInfo.xl.brancheCompany == '3'}}
  92 + 三分公司
  93 + {{else if obj.ttInfo.xl.brancheCompany == '5'}}
  94 + 一分公司
  95 + {{/if}}
  96 +
  97 + {{else if obj.ttInfo.xl.company == '05'}}
  98 +
  99 + {{if obj.ttInfo.xl.brancheCompany == '1'}}
  100 + 川沙分公司
  101 + {{else if obj.ttInfo.xl.brancheCompany == '2'}}
  102 + 金桥分公司
  103 + {{else if obj.ttInfo.xl.brancheCompany == '3'}}
  104 + 芦潮港分公司
  105 + {{else if obj.ttInfo.xl.brancheCompany == '5'}}
  106 + 杨高分公司
  107 + {{else if obj.ttInfo.xl.brancheCompany == '6'}}
  108 + 周浦分公司
  109 + {{/if}}
  110 +
  111 + {{else if obj.ttInfo.xl.company == '26'}}
  112 +
  113 + {{if obj.ttInfo.xl.brancheCompany == '1'}}
  114 + 南汇一分
  115 + {{else if obj.ttInfo.xl.brancheCompany == '2'}}
  116 + 南汇二分
  117 + {{else if obj.ttInfo.xl.brancheCompany == '3'}}
  118 + 南汇三分
  119 + {{else if obj.ttInfo.xl.brancheCompany == '4'}}
  120 + 南汇维修公司
  121 + {{else if obj.ttInfo.xl.brancheCompany == '5'}}
  122 + 南汇公司
  123 + {{/if}}
  124 +
  125 + {{/if}}
63 126 </td>
64 127 <td>
65   - {{obj.name}}
  128 + {{obj.ttInfo.xl.name}}
66 129 </td>
67 130 <td>
68   - {{obj.company}}
  131 + {{obj.ttInfo.name}}
69 132 </td>
70 133 <td>
71   -
  134 + {{obj.user.name}}
72 135 </td>
73   - <td >
74   -
  136 + <td>
  137 + {{obj.createDate}}
75 138 </td>
76 139 </tr>
77 140 {{/each}}
78 141 {{if list.length == 0}}
79 142 <tr class="muted">
80   - <td colspan=5 style="text-align: center;"><h6>没有找到相关数据</h6></td>
  143 + <td colspan=7 style="text-align: center;"><h6>没有找到相关数据</h6></td>
81 144 </tr>
82 145 {{/if}}
83 146 </script>
... ...
src/test/java/com/bsth/service/schedule/BaseTest.java deleted 100644 → 0
1   -package com.bsth.service.schedule;
2   -
3   -import org.junit.runner.RunWith;
4   -import org.springframework.boot.test.SpringApplicationConfiguration;
5   -import org.springframework.test.context.ActiveProfiles;
6   -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
7   -
8   -/**
9   - * 基础测试类。
10   - */
11   -@RunWith(SpringJUnit4ClassRunner.class)
12   -@SpringApplicationConfiguration(classes = ScheduleTestApp.class)
13   -@ActiveProfiles("scheduletest")
14   -//@WebIntegrationTest({"server.port=0","management.port=0"})
15   -public class BaseTest {
16   -}
src/test/java/com/bsth/service/schedule/ScheduleTestApp.java deleted 100644 → 0
1   -package com.bsth.service.schedule;
2   -
3   -import com.bsth.service.schedule.impl.SchedulePlanRuleResultServiceImpl;
4   -import com.bsth.service.schedule.impl.SchedulePlanServiceImpl;
5   -import com.bsth.service.schedule.rules.MyDroolsConfiguration;
6   -import com.bsth.service.schedule.utils.DataToolsServiceImpl;
7   -import org.springframework.boot.autoconfigure.SpringBootApplication;
8   -import org.springframework.boot.orm.jpa.EntityScan;
9   -import org.springframework.context.annotation.ComponentScan;
10   -import org.springframework.context.annotation.Configuration;
11   -import org.springframework.context.annotation.FilterType;
12   -import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
13   -
14   -/**
15   - * 基础测试类(用于计划调度模块测试测试)。
16   - * 配置计划调度的模块的用到的entity,repository,service
17   - *
18   - * 注意:测试环境下测试类 TestApp 和springdata的类不在统一级包里,必须指定EnableJpaRepositories
19   - */
20   -@Configuration
21   -@EntityScan(
22   - basePackages = {"com.bsth.entity"}
23   -)
24   -@ComponentScan(
25   - basePackages = {"com.bsth.repository", "com.bsth.service"},
26   - useDefaultFilters = false,
27   - includeFilters = {
28   - @ComponentScan.Filter(
29   - type = FilterType.ASSIGNABLE_TYPE,
30   - value = SchedulePlanRuleResultServiceImpl.class
31   - ),
32   - @ComponentScan.Filter(
33   - type = FilterType.ASSIGNABLE_TYPE,
34   - value = SchedulePlanServiceImpl.class
35   - ),
36   - @ComponentScan.Filter(
37   - type = FilterType.ASSIGNABLE_TYPE,
38   - value = MyDroolsConfiguration.class
39   - ),
40   - @ComponentScan.Filter(
41   - type = FilterType.ASSIGNABLE_TYPE,
42   - value = DataToolsServiceImpl.class
43   - )
44   - }
45   -)
46   -@EnableJpaRepositories(
47   - basePackages = {"com.bsth.repository"}
48   -)
49   -@SpringBootApplication
50   -public class ScheduleTestApp {
51   -}
src/test/java/com/bsth/service/schedule/rules/RuleTest1.java deleted 100644 → 0
1   -package com.bsth.service.schedule.rules;
2   -
3   -import com.bsth.entity.sys.SysUser;
4   -import com.bsth.repository.sys.SysUserRepository;
5   -import com.bsth.service.schedule.BaseTest;
6   -import com.vividsolutions.jts.util.Assert;
7   -import org.dbunit.database.DatabaseConnection;
8   -import org.dbunit.database.IDatabaseConnection;
9   -import org.dbunit.dataset.IDataSet;
10   -import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
11   -import org.dbunit.operation.DatabaseOperation;
12   -import org.junit.After;
13   -import org.junit.Before;
14   -import org.slf4j.Logger;
15   -import org.slf4j.LoggerFactory;
16   -import org.springframework.beans.factory.annotation.Autowired;
17   -import org.springframework.core.io.ClassPathResource;
18   -import org.springframework.core.io.Resource;
19   -
20   -import javax.sql.DataSource;
21   -
22   -public class RuleTest1 extends BaseTest {
23   - /** 日志记录器 */
24   - private static final Logger logger = LoggerFactory.getLogger(RuleTest1.class);
25   -
26   - @Autowired
27   - private DataSource dataSource;
28   -
29   - @Autowired
30   - private SysUserRepository sysUserRepository;
31   -
32   - /**
33   - * 初始化数据。
34   - */
35   - @Before
36   - public void initData() throws Exception {
37   - logger.info("载入数据......");
38   -
39   - // 获取数据库连接
40   - IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
41   - // 获取Dbunit数据源
42   - Resource res = new ClassPathResource("testdata/d1.xml");
43   - FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
44   - flatXmlDataSetBuilder.setColumnSensing(false);
45   - flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
46   - IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
47   -
48   - // 载入数据
49   - DatabaseOperation.CLEAN_INSERT.execute(iDatabaseConnection, iDataSet);
50   - }
51   -
52   - /**
53   - * 清除数据。
54   - */
55   - @After
56   - public void destoryData() throws Exception {
57   - logger.info("清除数据......");
58   - // 获取数据库连接
59   - IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
60   - // 获取Dbunit数据源
61   - Resource res = new ClassPathResource("testdata/d1.xml");
62   - FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
63   - flatXmlDataSetBuilder.setColumnSensing(false);
64   - flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
65   - IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
66   -
67   - // 清除数据
68   - DatabaseOperation.DELETE_ALL.execute(iDatabaseConnection, iDataSet);
69   - }
70   -
71   - @org.junit.Test
72   - public void t1() {
73   - logger.info("t1()测试......");
74   - SysUser sysUser = sysUserRepository.findOne(1);
75   - Assert.equals("admin", sysUser.getUserName());
76   - }
77   -}
78   -
79   -//
80   -//
81   -//package com.bsth.service.schedule.rules;
82   -//
83   -// import com.bsth.Application;
84   -// import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input;
85   -// import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output;
86   -// import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input;
87   -// import com.bsth.service.schedule.rules.ttinfo.TTInfoCalcuParam_input;
88   -// import com.bsth.service.schedule.rules.ttinfo.TTInfoResults_output;
89   -// import com.bsth.service.schedule.rules.ttinfo.TTInfo_input;
90   -// import org.joda.time.DateTime;
91   -// import org.junit.Test;
92   -// import org.junit.runner.RunWith;
93   -// import org.kie.api.KieBase;
94   -// import org.kie.api.runtime.KieSession;
95   -// import org.slf4j.Logger;
96   -// import org.slf4j.LoggerFactory;
97   -// import org.springframework.beans.factory.annotation.Autowired;
98   -// import org.springframework.boot.test.SpringApplicationConfiguration;
99   -// import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
100   -//
101   -// import java.util.Arrays;
102   -//
103   -//@RunWith(SpringJUnit4ClassRunner.class)
104   -//@SpringApplicationConfiguration(classes = {Application.class})
105   -//public class DroolsRulesTest {
106   -//
107   -// /** 日志记录器 */
108   -// private final static Logger logger = LoggerFactory.getLogger(DroolsRulesTest.class);
109   -//
110   -// @Autowired
111   -// private KieBase kieBase;
112   -//
113   -//// @Test
114   -//// public void helloWorldDrlTest() throws Exception {
115   -//// // 1、创建session,内部配置的是stateful
116   -//// KieSession session = kieBase.newKieSession();
117   -////
118   -//// // 1.1 设置gloable对象,在drl中通过别名使用
119   -//// List<String> gloableList = new ArrayList<String>();
120   -//// session.setGlobal("list", gloableList);
121   -////
122   -//// // 1.2 可以设置一些监听器,再议
123   -////
124   -//// // 2、创建fact对象
125   -//// Message message = new Message();
126   -//// message.setMessage("Hello World");
127   -//// message.setStatus(Message.HELLO);
128   -//// session.insert(message);
129   -////
130   -//// // 3、执行rule
131   -//// session.fireAllRules();
132   -////
133   -//// System.out.println(gloableList);
134   -////
135   -//// // 4、执行完毕销毁,有日志的也要关闭
136   -//// session.dispose();
137   -//// }
138   -//
139   -// // @Test
140   -// public void ttinfoDrlTest() throws Exception {
141   -// logger.info("------------ttinfoDrlTest 测试---------------");
142   -//
143   -// // 1、创建session,内部配置的是stateful
144   -// KieSession session = kieBase.newKieSession();
145   -//
146   -// // 1.1 设置gloable对象,在drl中通过别人使用
147   -// session.setGlobal("log", logger);
148   -// TTInfoResults_output ttInfoResults_output = new TTInfoResults_output();
149   -// session.setGlobal("results", ttInfoResults_output);
150   -//
151   -// // 1.2 可以设置一些监听器,再议
152   -//
153   -// // 2、创建fact对象
154   -// TTInfoCalcuParam_input ttInfoCalcuParam_input = new TTInfoCalcuParam_input(
155   -// new DateTime(2016, 8, 1, 0, 0),
156   -// new DateTime(2016, 8, 10, 0, 0),
157   -// "1"
158   -// );
159   -//
160   -//
161   -// TTInfo_input ttInfo_input1 = new TTInfo_input();
162   -// ttInfo_input1.setTtInfoId("1");
163   -// ttInfo_input1.setXlId("1");
164   -// ttInfo_input1.setWeekdays(Arrays.asList(true, true, true, true, true, false, false));
165   -// ttInfo_input1.getSpecialDays().add(new DateTime(2016, 8, 1, 0, 0));
166   -// ttInfo_input1.setUpdateDate(new DateTime(2016, 1, 1, 0, 0));
167   -// ttInfo_input1.setIsEnable(true);
168   -// ttInfo_input1.setQyDate(new DateTime(2016, 1, 1, 0, 0));
169   -//
170   -// TTInfo_input ttInfo_input1_2 = new TTInfo_input();
171   -// ttInfo_input1_2.setTtInfoId("2");
172   -// ttInfo_input1_2.setXlId("1");
173   -// ttInfo_input1_2.setWeekdays(Arrays.asList(true, false, false, false, false, true, false));
174   -// ttInfo_input1_2.getSpecialDays().add(new DateTime(2016, 8, 11, 0, 0));
175   -// ttInfo_input1_2.setUpdateDate(new DateTime(2015, 2, 1, 0, 0));
176   -// ttInfo_input1_2.setIsEnable(true);
177   -// ttInfo_input1_2.setQyDate(new DateTime(2016, 1, 1, 0, 0));
178   -//
179   -//
180   -// TTInfoCalcuParam_input ttInfoCalcuParam_inpu2 = new TTInfoCalcuParam_input(
181   -// new DateTime(2016, 8, 1, 0, 0),
182   -// new DateTime(2016, 8, 10, 0, 0),
183   -// "2"
184   -// );
185   -//
186   -// TTInfo_input ttInfo_input2 = new TTInfo_input();
187   -// ttInfo_input2.setTtInfoId("2");
188   -// ttInfo_input2.setXlId("2");
189   -// ttInfo_input2.setWeekdays(Arrays.asList(true, false, false, false, false, true, false));
190   -// ttInfo_input2.getSpecialDays().add(new DateTime(2016, 8, 11, 0, 0));
191   -// ttInfo_input2.setUpdateDate(new DateTime(2016, 1, 1, 0, 0));
192   -// ttInfo_input2.setIsEnable(true);
193   -// ttInfo_input2.setQyDate(new DateTime(2016, 1, 1, 0, 0));
194   -//
195   -// session.insert(ttInfoCalcuParam_input);
196   -// session.insert(ttInfo_input1);
197   -// session.insert(ttInfo_input1_2);
198   -// session.insert(ttInfoCalcuParam_inpu2);
199   -// session.insert(ttInfo_input2);
200   -//
201   -//
202   -//
203   -// // 3、执行rule
204   -// session.fireAllRules();
205   -//
206   -// // 4、执行完毕销毁,有日志的也要关闭
207   -// session.dispose();
208   -//
209   -// // 打印global结果
210   -// logger.info(ttInfoResults_output.showTTInfoDesc1());
211   -//
212   -// }
213   -//
214   -// @Test
215   -// public void shiftloopDrlTest() throws Exception {
216   -// // 1、创建session,内部配置的是stateful
217   -// KieSession session = kieBase.newKieSession();
218   -//
219   -// // 1.1 设置gloable对象,在drl中通过别名使用
220   -// ScheduleResults_output scheduleResults_output = new ScheduleResults_output();
221   -// session.setGlobal("scheduleResult", scheduleResults_output);
222   -//
223   -// // 1.2 可以设置一些监听器,再议
224   -//
225   -// // 2、创建fact对象
226   -//
227   -// ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input();
228   -// scheduleCalcuParam_input.setFromDate(new DateTime(2016, 8, 1, 0, 0));
229   -// scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 10, 0, 0));
230   -//
231   -// ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input();
232   -// scheduleRule_input1.setRuleId("1");
233   -// scheduleRule_input1.setQyrq(new DateTime(2016, 7, 22, 0, 0));
234   -// scheduleRule_input1.getGuideboardIds().addAll(Arrays.asList(
235   -// "9", "9" , "8" ,"8" ,"7" ,"7" ,"6" ,"6", "5", "5", "4", "4", "3", "3", "2", "2", "1", "1"));
236   -// scheduleRule_input1.setStartGbdIndex(3);
237   -// scheduleRule_input1.getEmployeeConfigIds().addAll(Arrays.asList("1", "2"));
238   -// scheduleRule_input1.setStartEIndex(1);
239   -// scheduleRule_input1.setCarConfigId("1");
240   -//
241   -//// ScheduleRule_input scheduleRule_input2 = new ScheduleRule_input();
242   -//// scheduleRule_input2.setRuleId(2L);
243   -//// scheduleRule_input2.setQyrq(new DateTime(2016, 7, 22, 0, 0));
244   -//// scheduleRule_input2.getGuideboardIds().addAll(Arrays.asList(
245   -//// 1L, 1L, 2L, 2L, 3L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 10L, 10L,
246   -//// 11L, 11L, 12L, 12L, 13L, 13L));
247   -//// scheduleRule_input2.setStartGbdIndex(7);
248   -//// scheduleRule_input2.getEmployeeConfigIds().addAll(Arrays.asList(11L, 12L));
249   -//// scheduleRule_input2.setStartEIndex(1);
250   -//// scheduleRule_input2.setCarConfigId(2L);
251   -//
252   -// session.insert(scheduleCalcuParam_input);
253   -// session.insert(scheduleRule_input1);
254   -//// session.insert(scheduleRule_input2);
255   -//
256   -//
257   -// // 3、执行rule
258   -// session.fireAllRules();
259   -//
260   -// // 4、执行完毕销毁,有日志的也要关闭
261   -// session.dispose();
262   -//
263   -// System.out.println(scheduleResults_output.showGuideboardDesc1());
264   -//
265   -// }
266   -//}
267   -
src/test/java/com/bsth/service/schedule/rules/SchedulePlan1Test.java deleted 100644 → 0
1   -package com.bsth.service.schedule.rules;
2   -
3   -import com.bsth.service.schedule.BaseTest;
4   -import org.dbunit.database.DatabaseConnection;
5   -import org.dbunit.database.IDatabaseConnection;
6   -import org.dbunit.dataset.IDataSet;
7   -import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
8   -import org.dbunit.operation.DatabaseOperation;
9   -import org.junit.After;
10   -import org.junit.Before;
11   -import org.junit.Test;
12   -import org.slf4j.Logger;
13   -import org.slf4j.LoggerFactory;
14   -import org.springframework.beans.factory.annotation.Autowired;
15   -import org.springframework.core.io.ClassPathResource;
16   -import org.springframework.core.io.Resource;
17   -
18   -import javax.sql.DataSource;
19   -
20   -/**
21   - * 排班计划测试(手工排班测试)。
22   - */
23   -public class SchedulePlan1Test extends BaseTest {
24   - /** 日志记录器 */
25   - private static final Logger logger = LoggerFactory.getLogger(SchedulePlan1Test.class);
26   -
27   - @Autowired
28   - private DataSource dataSource;
29   -
30   - /**
31   - * 初始化数据。
32   - */
33   - @Before
34   - public void initData() throws Exception {
35   - logger.info("载入数据......");
36   -
37   - // 获取数据库连接
38   - IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
39   - // 获取Dbunit数据源
40   - Resource res = new ClassPathResource("testdata/d2.xml");
41   - FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
42   - flatXmlDataSetBuilder.setColumnSensing(false);
43   - flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
44   - IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
45   -
46   - // 载入数据
47   - DatabaseOperation.CLEAN_INSERT.execute(iDatabaseConnection, iDataSet);
48   - }
49   -
50   - /**
51   - * 清除数据。
52   - */
53   - @After
54   - public void destoryData() throws Exception {
55   - logger.info("清除数据......");
56   - // 获取数据库连接
57   - IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
58   - // 获取Dbunit数据源
59   - Resource res = new ClassPathResource("testdata/d2.xml");
60   - FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
61   - flatXmlDataSetBuilder.setColumnSensing(false);
62   - flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
63   - IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
64   -
65   - // 清除数据
66   - DatabaseOperation.DELETE_ALL.execute(iDatabaseConnection, iDataSet);
67   - }
68   -
69   -
70   - @Test
71   - public void t1() {
72   -
73   - }
74   -
75   -
76   -
77   -
78   -
79   -
80   -
81   -
82   -
83   -
84   -
85   -
86   -
87   -
88   -
89   -
90   -
91   -
92   -
93   -
94   -}
src/test/java/com/bsth/service/schedule/rules/SchedulePlan2Test.java deleted 100644 → 0
1   -package com.bsth.service.schedule.rules;
2   -
3   -/**
4   - * 时刻表测试(自动排班测试)。
5   - */
6   -public class SchedulePlan2Test {
7   - // TODO:
8   -}
src/test/resources/.gitkeep deleted 100644 → 0
src/test/resources/application-scheduletest.properties deleted 100644 → 0
1   -#嵌入式tomcat配置
2   -#server.port=9088
3   -#management.port= 9001
4   -#management.address= 127.0.0.1
5   -
6   -#JPA配置
7   -spring.jpa.hibernate.ddl-auto= update
8   -spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
9   -spring.jpa.database= MYSQL
10   -spring.jpa.show-sql= true
11   -
12   -#数据库连接池配置
13   -spring.datasource.driver-class-name= com.mysql.jdbc.Driver
14   -spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
15   -spring.datasource.username= root
16   -spring.datasource.password=
17   -
18   -#spring.datasource.driver-class-name= org.h2.Driver
19   -#spring.datasource.url= jdbc:h2:mem:bookstore;DB_CLOSE_ON_EXIT=FALSE
20   -#spring.datasource.username= sa
21   -#spring.datasource.password=
22   -
23   -spring.datasource.max-active=100
24   -spring.datasource.max-idle=8
25   -spring.datasource.min-idle=8
26   -spring.datasource.initial-size=5
27   -
28   -spring.datasource.test-on-borrow=true
29   -spring.datasource.test-on-connect=true
30   -spring.datasource.test-on-return=true
31   -spring.datasource.test-while-idle=true
32   -spring.datasource.validation-query=select 1
33   -
src/test/resources/datatools/config-scheduletest.properties deleted 100644 → 0
1   -# 配置数据导入导出用到的配置信息
2   -
3   -# 1、kettle配置文件路径(类路径)
4   -datatools.kettle_properties=/datatools/kettle.properties
5   -# 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6   -#数据库ip地址
7   -datatools.kvars_dbip=127.0.0.1
8   -#数据库用户名
9   -datatools.kvars_dbuname=root
10   -#数据库密码
11   -datatools.kvars_dbpwd=
12   -#数据库库名
13   -datatools.kvars_dbdname=qp_control
14   -
15   -# 3、上传数据配置信息
16   -# 上传文件目录配置(根据不同的环境需要修正)
17   -datatools.fileupload_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
18   -# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
19   -datatools.trans_errordir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/erroroutput
20   -# 临时输出文件目录
21   -datatools.trans_tempdir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/temp
22   -# 模版文件目录
23   -datatools.trans_templatedir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/template
24   -
25   -##---------------------------- 导入数据ktr ----------------------------##
26   -# 车辆信息导入ktr转换
27   -datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
28   -# 人员信息导入
29   -datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
30   -# 路牌信息导入
31   -datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
32   -# 时刻表基础信息导入
33   -datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
34   -# 时刻表明细信息导入(元数据)
35   -datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailDataInputMetaData.ktr
36   -# 时刻表明细编辑用数据
37   -datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
38   -# 时刻表明细信息导入
39   -datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
40   -# 时刻表明细信息导入2
41   -datatools.ttinfodetail_datainputktr2=/datatools/ktrs/ttinfodetailDataInput2.ktr
42   -
43   -# 车辆配置信息导入
44   -datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
45   -# 人员配置信息导入
46   -datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
47   -
48   -# 排版规则信息导入
49   -datatools.schedulerule_datainputktr=/datatools/ktrs/scheduleRuleDataInput.ktr
50   -
51   -# 4、数据导出配置信息
52   -# 导出数据文件目录配置(根据不同的环境需要修正)
53   -datatools.fileoutput_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
54   -
55   -##---------------------------- 导出数据ktr -----------------------------##
56   -# 车辆信息导出ktr转换
57   -datatools.cars_dataoutputktr=/datatools/ktrs/carsDataOutput.ktr
58   -# 人员信息导出ktr转换
59   -datatools.employees_dataoutputktr=/datatools/ktrs/employeesDataOutput.ktr
60   -# 时刻表导出元数据ktr转换
61   -datatools.ttinfodetail_metaoutput=/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
62   -# 时刻表导出数据ktr转换
63   -datatools.ttinfodetail_output=/datatools/ktrs/ttinfodetailDataOutput.ktr
64   -# 排版规则导出数据ktr转换
65   -datatools.schedulerule_output=/datatools/ktrs/scheduleRuleDataOutput.ktr
66   -
67   -# 车辆配置信息导出ktr转换
68   -datatools.carsconfig_dataoutputktr=/datatools/ktrs/carsConfigDataOutput.ktr
69   -# 人员配置信息导出ktr转换
70   -datatools.employeesconfig_dataoutputktr=/datatools/ktrs/employeesConfigDataOutput.ktr
71   -
72   -# 路牌信息导出
73   -datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
74   -
75   -
76   -# TODO:
77   -
78   -
79   -
80   -
81   -
82   -
83   -
84   -
src/test/resources/testdata/d1.xml deleted 100644 → 0
1   -<?xml version='1.0' encoding='UTF-8'?>
2   -<dataset>
3   - <!-- 用户数据 -->
4   - <bsth_c_sys_user id="1" user_name="admin" name="系统管理员" create_date="2000-01-01" enabled="1" last_login_date="2000-01-01" />
5   -
6   -</dataset>
7 0 \ No newline at end of file
src/test/resources/testdata/d2.xml deleted 100644 → 0
1   -<?xml version='1.0' encoding='UTF-8'?>
2   -<dataset>
3   - <!-- 用户(对应实体 SysUser) -->
4   - <bsth_c_sys_user id="1" user_name="admin" name="系统管理员" create_date="2000-01-01" enabled="1" last_login_date="2000-01-01" />
5   -
6   - <!-- 公司(对应实体 Business) -->
7   - <bsth_c_business id="1" business_name="公交公司" business_code="88" up_code="0" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
8   - <bsth_c_business id="2" business_name="金高公司" business_code="22" up_code="88" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
9   - <bsth_c_business id="3" business_name="杨高公司" business_code="05" up_code="88" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
10   - <bsth_c_business id="4" business_name="上南公司" business_code="55" up_code="88" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
11   - <bsth_c_business id="5" business_name="南汇公司" business_code="26" up_code="88" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
12   -
13   - <!-- 线路(对应实体 Line) -->
14   - <bsth_c_line id="1" name="测试线路1" line_code="l1" destroy="0" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
15   - <!-- 线路标准(对应实体 LineInformation) -->
16   - <bsth_c_line_information id="1" line="1" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
17   -
18   - <!-- 站点(对应实体 Station) -->
19   - <bsth_c_station id="1" station_name="站1" station_cod="#112233" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
20   - <bsth_c_station id="2" station_name="站2" station_cod="#223344" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
21   - <!-- 站点路由(对应实体 StationRoute)-->
22   - <bsth_c_stationroute id="1" line="1" station="1" station_name="上行起点站" station_mark="B" directions="0" destroy="0" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
23   - <bsth_c_stationroute id="2" line="1" station="2" station_name="上行终点站" station_mark="E" directions="0" destroy="0" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
24   - <bsth_c_stationroute id="3" line="1" station="2" station_name="下行起点站" station_mark="B" directions="1" destroy="0" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
25   - <bsth_c_stationroute id="4" line="1" station="1" station_name="下行终点站" station_mark="E" directions="1" destroy="0" create_by="1" create_date="2000-01-01" update_by="1" update_date="2000-01-01" />
26   -
27   - <!-- 停车场(对应实体) -->
28   -
29   - <!-- TODO -->
30   -
31   -</dataset>
32 0 \ No newline at end of file
src/test/resources/testdata/new.txt deleted 100644 → 0
1   -1、车辆配置,每辆车都可以配置单独的停车点及相关数据,并提供两种设置模式(早晚,复驶)
2   -2、规则管理,修改规则的界面图形化,更加方便修改
3   -3、时刻表管理,导入时刻表xls做严格数据判定,时刻表明细修改提供跟方便的图形化修改方式
4   -4、排班计划管理,提供每次排班的操作信息,时间段,所使用的时刻表,可以查看具体的排班明细(细化到班次)
5   - 生成排班时,提供详细的时刻表统计信息,提供两种排班模式(历史排班优先,规则优先)
6   -5、调度值勤日报,列出每天的基于线路,路牌的排班统计,可以更换车辆,人员
7 0 \ No newline at end of file
src/test/resources/testdata/problem.properties deleted 100644 → 0
1   -##1=时刻表明细导入,线路标准里所有的高峰低谷时间需要带入时刻表班次时间里,标准可以点击切换到线路标准界面
2   -##2=时刻表明细编辑功能,数据工具移到时刻表里,类似工具栏的样子
3   -3=时刻表导入,可以选一个已经存在的时刻表导入,而不是excel文件
4   -##4=所有的删除,作废,都要有提示框操作
5   -##5=排班计划错误提示,如果选的排班日期之前没有排班,提示错误,排班结果有重复与时刻表不符合,显示错误
6   -##6=调度执行日报,显示最近排班日期,修改操作强化
7   -7=警告功能,如时刻表选择相同的常规有效日,特殊有效日,车辆,人员配置重复等等
8   -##8=时刻表明细编辑,颜色覆盖冲突
9   -##9=下拉框貌似中文不能搜索
10   -10=时刻表明细编辑,环线,选上下行,上下的站点在下行站点列表里
11   -##11=人员基础信息导入问题,工号前要加公司代码
12   -##12=套跑规则嵌入到主排班规则中
13   -13=导入数据功能,需要加用户名
14   -14=路牌编号自动生成
15   -15=时刻表导入的时候表头后面不需要加数字
16   -##16=时间框中文
17   -##17=人员工号前公司编码自动加
18   -19=线路运营概览
19   -20=排班规则备注
20   -##21=时刻表,两点间空驶,算空驶
21   -22=搭班编码自动生成
22   -##23=时刻表明细修改终点站停驶(停止1个半小时以上)
23   -##24=线路标准里如果里程是0,用标准里程
24   -##25=规则导出的日期格式修正
25   -##26=人员录入,工号规则前加 "{公司编码}-"
26   -
27   -##27=调度执勤日报,换人后,工号前的-去掉
28   -##28=时刻表导出,元数据ktr转换站名匹配有问题
29   -##29=时刻编辑,超过70个班次,报错,改成150个班次
30   -##30=时刻表公里数 三位数
31   -
32   -31=规则修改,路牌范围,人员范围可以拖动
33   -##32=人员配置不存在的情况下,导入规则ktr,找不到的人员不添加,人员范围不存在的,规则不导入
34   -##33=时刻表明细班次,里添加,是否停驶选项(计算工时使用)
src/test/resources/testdata/test1.txt deleted 100644 → 0
1   -select * from jwgl_f_t_clxh_workflow_detail a where a.ID_LYSYLB = 36;
2   -
3   -select sum(amount - tl_amount) from jwgl_f_t_clxh_workflow_detail
4   -where
5   -to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD')
6   -and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD')
7   -
8   -select * from JWGL_D_T_LYSYLB
9   -
10   -
11   -select
12   -statdateid statdate
13   -, ssjc gs
14   -, xl xl
15   -, zbh cl
16   -, b.SYLB1 || '-' || b.SYLB2 as lylb
17   -, (sum(amount) - sum(tl_amount)) ch
18   -from JWGL_F_T_CLXH_WORKFLOW_DETAIL a, JWGL_D_T_LYSYLB b
19   -where
20   -to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD')
21   -and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD')
22   -and a.ID_LYSYLB = b.ID(+)
23   -group by
24   -statdateid
25   -, ssjc
26   -, xl
27   -, zbh
28   -, b.SYLB1 || '-' || b.SYLB2
29   -
30   --- part1
31   -
32   -select sum(ch) from
33   -(
34   -select
35   -statdateid statdate
36   -, ssjc gs
37   -, xl xl
38   -, zbh cl
39   -, b.SYLB1 || '-' || b.SYLB2 as lylb
40   -, (sum(amount) - sum(tl_amount)) ch
41   -from JWGL_F_T_CLXH_WORKFLOW_DETAIL a, JWGL_D_T_LYSYLB b
42   -where
43   -to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD')
44   -and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD')
45   -and a.ID_LYSYLB = b.ID(+)
46   -group by
47   -statdateid
48   -, ssjc
49   -, xl
50   -, zbh
51   -, b.SYLB1 || '-' || b.SYLB2
52   -)
53   -where lylb in (
54   -'路救-路救',
55   -'小修-小修机工',
56   -'专项-安检',
57   -'专项-节检',
58   -'专项-水箱',
59   -'专项-电瓶',
60   -'小修-小修电工',
61   -'专项-电并',
62   -'小修-小修车身',
63   -'专项-镗固',
64   -'保养-一级保养',
65   -'小修-发动机',
66   -'专项-轮胎',
67   -'分摊-轮胎',
68   -'专项-润滑油',
69   -'总成-差变速',
70   -'总成-大泵',
71   -'总成-小总成',
72   -'总成-发动机',
73   -'保养-二级保养',
74   -'保养-三级保养',
75   -'整修-整修',
76   -'空调-保外',
77   -'空调-保内',
78   -'事故-事故'
79   -)
80   -
81   --- part2
82   -
83   -select sum(ch) from
84   -(
85   -select
86   -statdateid statdate
87   -, ssjc gs
88   -, xl xl
89   -, zbh cl
90   -, b.SYLB1 || '-' || b.SYLB2 as lylb
91   -, (sum(amount) - sum(tl_amount)) ch
92   -from JWGL_F_T_CLXH_WORKFLOW_DETAIL a, JWGL_D_T_LYSYLB b
93   -where
94   -to_date(statdateid, 'YYYYMMDD') >= to_date('20170301', 'YYYYMMDD')
95   -and to_date(statdateid, 'YYYYMMDD') <= to_date('20170331', 'YYYYMMDD')
96   -and a.ID_LYSYLB = b.ID(+)
97   -group by
98   -statdateid
99   -, ssjc
100   -, xl
101   -, zbh
102   -, b.SYLB1 || '-' || b.SYLB2
103   -)
104   -where lylb in(
105   -'分摊-镗固',
106   -'专项-机油',
107   -'分摊-机油',
108   -'总成-其它',
109   -'分摊-工具',
110   -'分摊-辅助料',
111   -'分摊-设备',
112   -'车间经费-车间经费'
113   -)
114   -
115   -
116   -
117   -
118   -
119   -
120   -
121   -
122   -
123   -
124   -
125   -
126   -
127   -
128   -
129   -
130   -
131   -
132   -
src/test/resources/testdata/test2.txt deleted 100644 → 0
1   -
2   -select * from JWGL_FR_T_CH_REPORT_DATA1;
3   -
4   -select * from JWGL_FR_T_CH_REPORT_DATA2;
5   -
6   --- sum part1
7   -
8   -select
9   -(
10   -sum(lj_lj) + sum(xx_xxjg) + sum(xx_xxdg) + sum(zx_db) + sum(xx_xxcs) + sum(zx_tg) + sum(by_b1) +
11   -sum(nvl(future_bx, 0)) + sum(xx_fdj) + sum(zx_lt) + sum(zx_rhy) + sum(zc_cbx) + sum(zc_db) + sum(zc_xzc) +
12   -sum(zc_fdj) + sum(by_b2) + sum(by_b3) + sum(nvl(future_wx_db, 0)) + sum(nvl(future_wxfy, 0)) + sum(nvl(future_ktwx, 0)) + sum(nvl(future_sx, 0)) +
13   -sum(nvl(future_dp, 0)) + sum(zx_zx) + sum(kt_bw) + sum(sg_sg)
14   -) as part1
15   -from JWGL_FR_T_CH_REPORT_DATA1
16   -where
17   -statdate >= to_date('20170301', 'YYYYMMDD')
18   -and statdate <= to_date('20170331', 'YYYYMMDD')
19   -
20   --- sum part2
21   -
22   -select
23   -(
24   -sum(zx_tg) + sum(jy) + sum(qt) + sum(zcfl) + sum(gj) + sum(sb) + sum(cjjf)
25   -) as part2
26   -from JWGL_FR_T_CH_REPORT_DATA2
27   -where statdate = to_date('20170331', 'YYYYMMDD')
28 0 \ No newline at end of file
src/test/resources/testdata/test3.txt deleted 100644 → 0
1   -select count(*) from bsth_c_s_sp_rule_rst
2   -
3   -show index from bsth_c_s_sp_rule_rst
4   -
5   -select * from bsth_c_s_sp_rule_rst t
6   -where not exists (select 1 from bsth_c_s_sp_rule_rst
7   -where create_date > t.create_date and schedule_date < '2017-04-17' )
8   -and t.xl_id = 10407 and t.schedule_date < '2017-04-17'
9   -
10   -show index from bsth_c_s_sp_rule_rst
11   -
12   -select * from bsth_c_s_sp_rule_rst
13   -where xl_id = 1
14   -
15   -select * from bsth_c_s_sp_rule_rst t
16   -where t.xl_id = 10407 and t.schedule_date < '2017-04-17'
17   -
18   -
19   -select count(distinct concat(xl_id ,schedule_date, create_date)) / count(*) from bsth_c_s_sp_rule_rst
20   -
21   -select * from bsth_c_s_sp_rule_rst a
22   -where exists (select 1 from
23   -(select t.rule_id as rid, max(t.schedule_date) as sd from bsth_c_s_sp_rule_rst t
24   -where t.xl_id = 10407 and t.schedule_date < '2017-04-17'
25   -group by t.rule_id) a2 where a.rule_id = rid and a.schedule_date = sd)
src/test/resources/testdata/test4.txt deleted 100644 → 0
1   -select count(*) from bsth_c_s_ttinfo_detail
2   -
3   -select * from bsth_c_s_ttinfo_detail
4   -
5   -select * from bsth_c_s_ttinfo_detail where zdz_code is null;
6   -
7   -select * from bsth_c_station;
8   -
9   -select * from bsth_c_car_park;
10   -
11   -update bsth_c_s_ttinfo_detail a
12   -set a.qdz_code = (select station_cod from bsth_c_station b where a.qdz = b.id)
13   -where a.bc_type <> 'out'
14   -
15   -update bsth_c_s_ttinfo_detail a
16   -set a.qdz_name = (select station_name from bsth_c_station b where a.qdz = b.id)
17   -where a.bc_type <> 'out'
18   -
19   -update bsth_c_s_ttinfo_detail a
20   -set a.zdz_code = (select station_cod from bsth_c_station b where a.zdz = b.id)
21   -where a.bc_type <> 'in'
22   -
23   -update bsth_c_s_ttinfo_detail a
24   -set a.zdz_name = (select station_name from bsth_c_station b where a.zdz = b.id)
25   -where a.bc_type <> 'in'
26   -
27   -update bsth_c_s_ttinfo_detail a
28   -set a.qdz_code = (select park_code from bsth_c_car_park b where a.tcc = b.id)
29   -where a.bc_type = 'out'
30   -
31   -update bsth_c_s_ttinfo_detail a
32   -set a.qdz_name = (select park_name from bsth_c_car_park b where a.tcc = b.id)
33   -where a.bc_type = 'out'
34   -
35   -update bsth_c_s_ttinfo_detail a
36   -set a.zdz_code = (select park_code from bsth_c_car_park b where a.tcc = b.id)
37   -where a.bc_type = 'in'
38   -
39   -update bsth_c_s_ttinfo_detail a
40   -set a.zdz_name = (select park_name from bsth_c_car_park b where a.tcc = b.id)
41   -where a.bc_type = 'in'
42   -
43   -commit;
44   -
45   -
46   -
src/test/resources/testdata/test5.txt deleted 100644 → 0
1   -update bsth_c_s_sp_info a
2   -set a.schedule_plan = (
3   -select sp_id from bsth_c_s_sp_r_info b where a.id = b.sp_info_id
4   -)
5   -where a.schedule_plan is null
6   -
7   -select count(*) from bsth_c_s_sp_info
8   -where schedule_plan is null
9 0 \ No newline at end of file
src/test/resources/testdata/test6.txt deleted 100644 → 0
1   -select * from bsth_c_s_sp_rule_rst;
2   -
3   -select * from bsth_c_s_sp_rule_rst
4   -where qyrq is null;
5   -
6   -update bsth_c_s_sp_rule_rst a
7   -set a.qyrq = (select qyrq from bsth_c_s_sr1_flat where id = a.rule_id)
8   -where a.qyrq is null;
9   -
10   -select * from bsth_c_s_sp_rule_rst
11   -where origingidindex is null;
12   -
13   -update bsth_c_s_sp_rule_rst a
14   -set a.origingidindex = (select lp_start from bsth_c_s_sr1_flat where id = a.rule_id)
15   -where a.origingidindex is null;
16   -
17   -970
18   -789
19   -604
20   -985
21   -北蔡2路
22   -1048
23   -1118
24   -上南二分通勤
25   -
26   -
27   --Xms128M -Xmx1024M -XX:PermSize=64M -XX:MaxPermSize=128M
28   -
29   -1118
30   -572康桥
31   -83