Commit 41caf92905e2abffdff7d5f5835357f08f147ba6
Merge branch 'pudong' of 192.168.168.201:panzhaov5/bsth_control into pudong
Showing
43 changed files
with
2236 additions
and
869 deletions
pom.xml
| @@ -194,6 +194,12 @@ | @@ -194,6 +194,12 @@ | ||
| 194 | <groupId>net.sourceforge.jexcelapi</groupId> | 194 | <groupId>net.sourceforge.jexcelapi</groupId> |
| 195 | <artifactId>jxl</artifactId> | 195 | <artifactId>jxl</artifactId> |
| 196 | <version>2.6.12</version> | 196 | <version>2.6.12</version> |
| 197 | + <exclusions> | ||
| 198 | + <exclusion> | ||
| 199 | + <groupId>log4j</groupId> | ||
| 200 | + <artifactId>log4j</artifactId> | ||
| 201 | + </exclusion> | ||
| 202 | + </exclusions> | ||
| 197 | </dependency> | 203 | </dependency> |
| 198 | <dependency> | 204 | <dependency> |
| 199 | <groupId>rhino</groupId> | 205 | <groupId>rhino</groupId> |
| @@ -320,6 +326,10 @@ | @@ -320,6 +326,10 @@ | ||
| 320 | <version>3.4.5</version> | 326 | <version>3.4.5</version> |
| 321 | <exclusions> | 327 | <exclusions> |
| 322 | <exclusion> | 328 | <exclusion> |
| 329 | + <groupId>log4j</groupId> | ||
| 330 | + <artifactId>log4j</artifactId> | ||
| 331 | + </exclusion> | ||
| 332 | + <exclusion> | ||
| 323 | <groupId>org.slf4j</groupId> | 333 | <groupId>org.slf4j</groupId> |
| 324 | <artifactId>slf4j-log4j12</artifactId> | 334 | <artifactId>slf4j-log4j12</artifactId> |
| 325 | </exclusion> | 335 | </exclusion> |
| @@ -330,6 +340,12 @@ | @@ -330,6 +340,12 @@ | ||
| 330 | <groupId>com.101tec</groupId> | 340 | <groupId>com.101tec</groupId> |
| 331 | <artifactId>zkclient</artifactId> | 341 | <artifactId>zkclient</artifactId> |
| 332 | <version>0.3</version> | 342 | <version>0.3</version> |
| 343 | + <exclusions> | ||
| 344 | + <exclusion> | ||
| 345 | + <groupId>log4j</groupId> | ||
| 346 | + <artifactId>log4j</artifactId> | ||
| 347 | + </exclusion> | ||
| 348 | + </exclusions> | ||
| 333 | </dependency> | 349 | </dependency> |
| 334 | 350 | ||
| 335 | <!-- plan common工程依赖 --> | 351 | <!-- plan common工程依赖 --> |
| @@ -360,6 +376,16 @@ | @@ -360,6 +376,16 @@ | ||
| 360 | <version>1.7.7</version> | 376 | <version>1.7.7</version> |
| 361 | </dependency> | 377 | </dependency> |
| 362 | 378 | ||
| 379 | + <!-- web服务依赖 --> | ||
| 380 | + <dependency> | ||
| 381 | + <groupId>org.springframework.boot</groupId> | ||
| 382 | + <artifactId>spring-boot-starter-ws</artifactId> | ||
| 383 | + </dependency> | ||
| 384 | + <dependency> | ||
| 385 | + <groupId>wsdl4j</groupId> | ||
| 386 | + <artifactId>wsdl4j</artifactId> | ||
| 387 | + </dependency> | ||
| 388 | + | ||
| 363 | </dependencies> | 389 | </dependencies> |
| 364 | 390 | ||
| 365 | <dependencyManagement> | 391 | <dependencyManagement> |
| @@ -396,6 +422,26 @@ | @@ -396,6 +422,26 @@ | ||
| 396 | <groupId>org.springframework.boot</groupId> | 422 | <groupId>org.springframework.boot</groupId> |
| 397 | <artifactId>spring-boot-maven-plugin</artifactId> | 423 | <artifactId>spring-boot-maven-plugin</artifactId> |
| 398 | </plugin> | 424 | </plugin> |
| 425 | + <plugin> | ||
| 426 | + <groupId>org.codehaus.mojo</groupId> | ||
| 427 | + <artifactId>jaxb2-maven-plugin</artifactId> | ||
| 428 | + <version>1.6</version> | ||
| 429 | + <executions> | ||
| 430 | + <execution> | ||
| 431 | + <id>xjc</id> | ||
| 432 | + <phase>none</phase> | ||
| 433 | + <goals> | ||
| 434 | + <goal>xjc</goal> | ||
| 435 | + </goals> | ||
| 436 | + </execution> | ||
| 437 | + </executions> | ||
| 438 | + <configuration> | ||
| 439 | + <schemaDirectory>${project.basedir}/src/main/resources/xsd/</schemaDirectory> | ||
| 440 | + <outputDirectory>${project.basedir}/src/main/java</outputDirectory> | ||
| 441 | + <clearOutputDir>false</clearOutputDir> | ||
| 442 | + <encoding>utf-8</encoding> | ||
| 443 | + </configuration> | ||
| 444 | + </plugin> | ||
| 399 | </plugins> | 445 | </plugins> |
| 400 | <resources> | 446 | <resources> |
| 401 | <resource> | 447 | <resource> |
src/main/java/com/bsth/common/Constants.java
| @@ -23,6 +23,8 @@ public class Constants { | @@ -23,6 +23,8 @@ public class Constants { | ||
| 23 | 23 | ||
| 24 | // springboot manage health的检测url | 24 | // springboot manage health的检测url |
| 25 | public static final String ACTUATOR_MANAGEMENT_HEALTH = "/manage/health"; | 25 | public static final String ACTUATOR_MANAGEMENT_HEALTH = "/manage/health"; |
| 26 | + // web服务url | ||
| 27 | + public static final String WEBSERVICE_URL = "/ws/**"; | ||
| 26 | 28 | ||
| 27 | //对外的营运数据接口 | 29 | //对外的营运数据接口 |
| 28 | public static final String SERVICE_INTERFACE = "/companyService/**"; | 30 | public static final String SERVICE_INTERFACE = "/companyService/**"; |
src/main/java/com/bsth/data/gpsdata_v2/DataHandleProcess.java
| @@ -6,6 +6,7 @@ import com.bsth.data.gpsdata_v2.entity.GpsEntity; | @@ -6,6 +6,7 @@ import com.bsth.data.gpsdata_v2.entity.GpsEntity; | ||
| 6 | import com.bsth.data.gpsdata_v2.handlers.*; | 6 | import com.bsth.data.gpsdata_v2.handlers.*; |
| 7 | import com.bsth.email.SendEmailController; | 7 | import com.bsth.email.SendEmailController; |
| 8 | import com.bsth.email.entity.EmailBean; | 8 | import com.bsth.email.entity.EmailBean; |
| 9 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
| 9 | import com.google.common.collect.ArrayListMultimap; | 10 | import com.google.common.collect.ArrayListMultimap; |
| 10 | import org.apache.commons.lang3.StringUtils; | 11 | import org.apache.commons.lang3.StringUtils; |
| 11 | import org.slf4j.Logger; | 12 | import org.slf4j.Logger; |
| @@ -102,14 +103,15 @@ public class DataHandleProcess { | @@ -102,14 +103,15 @@ public class DataHandleProcess { | ||
| 102 | 103 | ||
| 103 | 104 | ||
| 104 | //等待子线程结束 | 105 | //等待子线程结束 |
| 105 | - boolean isNormal = count.await(1500, TimeUnit.MILLISECONDS); | 106 | + boolean isNormal = count.await(5000, TimeUnit.MILLISECONDS); |
| 106 | if (!isNormal) { | 107 | if (!isNormal) { |
| 107 | try { | 108 | try { |
| 108 | //发送邮件 | 109 | //发送邮件 |
| 109 | EmailBean mail = new EmailBean(); | 110 | EmailBean mail = new EmailBean(); |
| 110 | mail.setSubject("线调GPS处理"); | 111 | mail.setSubject("线调GPS处理"); |
| 111 | - mail.setContent("GPS处理超时,检查线程栈文件信息<br/>"); | 112 | + mail.setContent("GPS处理超时,检查日志信息<br/>"); |
| 112 | sendEmailController.sendMail("113252620@qq.com", mail); | 113 | sendEmailController.sendMail("113252620@qq.com", mail); |
| 114 | + logger.info(new ObjectMapper().writeValueAsString(list)); | ||
| 113 | logger.info("DataHandlerProcess:邮件发送成功!"); | 115 | logger.info("DataHandlerProcess:邮件发送成功!"); |
| 114 | } catch (Exception e){ | 116 | } catch (Exception e){ |
| 115 | logger.error("DataHandlerProcess:邮件发送失败!",e); | 117 | logger.error("DataHandlerProcess:邮件发送失败!",e); |
src/main/java/com/bsth/entity/schedule/batch/VehicleDataSync.java
0 → 100644
| 1 | +package com.bsth.entity.schedule.batch; | ||
| 2 | + | ||
| 3 | +import javax.persistence.*; | ||
| 4 | +import java.io.Serializable; | ||
| 5 | +import java.util.Date; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 车辆数据同步数据。 | ||
| 9 | + */ | ||
| 10 | +@Entity | ||
| 11 | +@Table(name = "bsth_c_cars_sync") | ||
| 12 | +public class VehicleDataSync implements Serializable { | ||
| 13 | + /** 主健Id */ | ||
| 14 | + @Id | ||
| 15 | + @GeneratedValue | ||
| 16 | + private Long id; | ||
| 17 | + | ||
| 18 | + //--------------- 标识车辆的数据(自编号和车牌号) ---------------// | ||
| 19 | + /** 自编号/内部编号 */ | ||
| 20 | + private String idenZbh; | ||
| 21 | + /** 车牌号 */ | ||
| 22 | + private String idenCph; | ||
| 23 | + | ||
| 24 | + //--------------- 更新的数据 ------------// | ||
| 25 | + /** 更新 公司代码 */ | ||
| 26 | + private String updateGsdm; | ||
| 27 | + /** 更新 公司名称 */ | ||
| 28 | + private String updateGsmc; | ||
| 29 | + /** 更新 分公司代码 */ | ||
| 30 | + private String updateFgsdm; | ||
| 31 | + /** 更新 分公司名称 */ | ||
| 32 | + private String updateFgsmc; | ||
| 33 | + /** 是否报废 */ | ||
| 34 | + private Boolean updateSfbf; | ||
| 35 | + /** 报废日期 */ | ||
| 36 | + private Date updateBfd; | ||
| 37 | + | ||
| 38 | + // TODO:后续再添加 | ||
| 39 | + | ||
| 40 | + //--------------- 时间,状态数据 ------------// | ||
| 41 | + /** 创建时间 */ | ||
| 42 | + @Column(nullable = false) | ||
| 43 | + private Date createDate; | ||
| 44 | + /** 更新时间 */ | ||
| 45 | + @Column(nullable = false) | ||
| 46 | + private Date updateDate; | ||
| 47 | + /** 同步状态 */ | ||
| 48 | + @Column(nullable = false) | ||
| 49 | + @Convert(converter = VehicleDataSyncStatusEnumConverter.class) | ||
| 50 | + private VehicleDataSyncStatusEnum status; | ||
| 51 | + | ||
| 52 | + public Long getId() { | ||
| 53 | + return id; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setId(Long id) { | ||
| 57 | + this.id = id; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public String getIdenZbh() { | ||
| 61 | + return idenZbh; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public void setIdenZbh(String idenZbh) { | ||
| 65 | + this.idenZbh = idenZbh; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public String getIdenCph() { | ||
| 69 | + return idenCph; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public void setIdenCph(String idenCph) { | ||
| 73 | + this.idenCph = idenCph; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public String getUpdateGsdm() { | ||
| 77 | + return updateGsdm; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void setUpdateGsdm(String updateGsdm) { | ||
| 81 | + this.updateGsdm = updateGsdm; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public String getUpdateGsmc() { | ||
| 85 | + return updateGsmc; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public void setUpdateGsmc(String updateGsmc) { | ||
| 89 | + this.updateGsmc = updateGsmc; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public Date getCreateDate() { | ||
| 93 | + return createDate; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public void setCreateDate(Date createDate) { | ||
| 97 | + this.createDate = createDate; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public Date getUpdateDate() { | ||
| 101 | + return updateDate; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public void setUpdateDate(Date updateDate) { | ||
| 105 | + this.updateDate = updateDate; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public VehicleDataSyncStatusEnum getStatus() { | ||
| 109 | + return status; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public void setStatus(VehicleDataSyncStatusEnum status) { | ||
| 113 | + this.status = status; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public Boolean getUpdateSfbf() { | ||
| 117 | + return updateSfbf; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public void setUpdateSfbf(Boolean updateSfbf) { | ||
| 121 | + this.updateSfbf = updateSfbf; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public Date getUpdateBfd() { | ||
| 125 | + return updateBfd; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public void setUpdateBfd(Date updateBfd) { | ||
| 129 | + this.updateBfd = updateBfd; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public String getUpdateFgsdm() { | ||
| 133 | + return updateFgsdm; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public void setUpdateFgsdm(String updateFgsdm) { | ||
| 137 | + this.updateFgsdm = updateFgsdm; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public String getUpdateFgsmc() { | ||
| 141 | + return updateFgsmc; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public void setUpdateFgsmc(String updateFgsmc) { | ||
| 145 | + this.updateFgsmc = updateFgsmc; | ||
| 146 | + } | ||
| 147 | +} | ||
| 0 | \ No newline at end of file | 148 | \ No newline at end of file |
src/main/java/com/bsth/entity/schedule/batch/VehicleDataSyncStat.java
0 → 100644
| 1 | +package com.bsth.entity.schedule.batch; | ||
| 2 | + | ||
| 3 | +import javax.persistence.*; | ||
| 4 | +import java.io.Serializable; | ||
| 5 | +import java.util.Date; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 车辆数据同步数据统计。 | ||
| 9 | + */ | ||
| 10 | +@Entity | ||
| 11 | +@Table(name = "bsth_c_cars_sync_stat") | ||
| 12 | +public class VehicleDataSyncStat implements Serializable { | ||
| 13 | + /** 主健Id */ | ||
| 14 | + @Id | ||
| 15 | + @GeneratedValue | ||
| 16 | + private Long id; | ||
| 17 | + | ||
| 18 | + /** job实例Id */ | ||
| 19 | + @Column(nullable = false) | ||
| 20 | + private Long jobId; | ||
| 21 | + /** job名字 */ | ||
| 22 | + @Column(nullable = false) | ||
| 23 | + private String jobName; | ||
| 24 | + /** job执行Id */ | ||
| 25 | + @Column(nullable = false, unique = true) | ||
| 26 | + private Long jobExecutionId; | ||
| 27 | + | ||
| 28 | + /** 待同步的车辆数据ids(同步状态=SYNCING) */ | ||
| 29 | + @Column(length = 2000) | ||
| 30 | + private String syncDataPrepareIds; | ||
| 31 | + /** 待同步的车辆数据自编号s(同步状态=SYNCING) */ | ||
| 32 | + @Column(length = 2000) | ||
| 33 | + private String syncDataPrepareZbhs; | ||
| 34 | + | ||
| 35 | + /** 待同步的车辆count */ | ||
| 36 | + private Integer syncDataPrepareCount; | ||
| 37 | + /** 同步成功的车辆count */ | ||
| 38 | + private Integer syncDataSuccessCount; | ||
| 39 | + | ||
| 40 | + /** 退出step执行Id */ | ||
| 41 | + private Long exitStepExecutionId; | ||
| 42 | + /** 退出异常stack信息 */ | ||
| 43 | + @Column(length = 2500) | ||
| 44 | + private String exitStackTrace; | ||
| 45 | + | ||
| 46 | + /** 同步状态 */ | ||
| 47 | + @Column(nullable = false) | ||
| 48 | + @Convert(converter = VehicleDataSyncStatusEnumConverter.class) | ||
| 49 | + private VehicleDataSyncStatusEnum status; | ||
| 50 | + | ||
| 51 | + /** job执行开始时间 */ | ||
| 52 | + @Column(nullable = false) | ||
| 53 | + private Date startDate; | ||
| 54 | + /** job执行结束时间 */ | ||
| 55 | + private Date endDate; | ||
| 56 | + | ||
| 57 | + public Long getId() { | ||
| 58 | + return id; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public void setId(Long id) { | ||
| 62 | + this.id = id; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public Long getJobId() { | ||
| 66 | + return jobId; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public void setJobId(Long jobId) { | ||
| 70 | + this.jobId = jobId; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public String getJobName() { | ||
| 74 | + return jobName; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setJobName(String jobName) { | ||
| 78 | + this.jobName = jobName; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public Long getJobExecutionId() { | ||
| 82 | + return jobExecutionId; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public void setJobExecutionId(Long jobExecutionId) { | ||
| 86 | + this.jobExecutionId = jobExecutionId; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public String getSyncDataPrepareIds() { | ||
| 90 | + return syncDataPrepareIds; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public void setSyncDataPrepareIds(String syncDataPrepareIds) { | ||
| 94 | + this.syncDataPrepareIds = syncDataPrepareIds; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public String getSyncDataPrepareZbhs() { | ||
| 98 | + return syncDataPrepareZbhs; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setSyncDataPrepareZbhs(String syncDataPrepareZbhs) { | ||
| 102 | + this.syncDataPrepareZbhs = syncDataPrepareZbhs; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public Integer getSyncDataPrepareCount() { | ||
| 106 | + return syncDataPrepareCount; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setSyncDataPrepareCount(Integer syncDataPrepareCount) { | ||
| 110 | + this.syncDataPrepareCount = syncDataPrepareCount; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + public Integer getSyncDataSuccessCount() { | ||
| 114 | + return syncDataSuccessCount; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public void setSyncDataSuccessCount(Integer syncDataSuccessCount) { | ||
| 118 | + this.syncDataSuccessCount = syncDataSuccessCount; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + public Long getExitStepExecutionId() { | ||
| 122 | + return exitStepExecutionId; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + public void setExitStepExecutionId(Long exitStepExecutionId) { | ||
| 126 | + this.exitStepExecutionId = exitStepExecutionId; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public String getExitStackTrace() { | ||
| 130 | + return exitStackTrace; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public void setExitStackTrace(String exitStackTrace) { | ||
| 134 | + this.exitStackTrace = exitStackTrace; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public VehicleDataSyncStatusEnum getStatus() { | ||
| 138 | + return status; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public void setStatus(VehicleDataSyncStatusEnum status) { | ||
| 142 | + this.status = status; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public Date getStartDate() { | ||
| 146 | + return startDate; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + public void setStartDate(Date startDate) { | ||
| 150 | + this.startDate = startDate; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + public Date getEndDate() { | ||
| 154 | + return endDate; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + public void setEndDate(Date endDate) { | ||
| 158 | + this.endDate = endDate; | ||
| 159 | + } | ||
| 160 | +} |
src/main/java/com/bsth/entity/schedule/batch/VehicleDataSyncStatusEnum.java
0 → 100644
| 1 | +package com.bsth.entity.schedule.batch; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonCreator; | ||
| 4 | +import com.fasterxml.jackson.annotation.JsonValue; | ||
| 5 | +import org.springframework.util.StringUtils; | ||
| 6 | + | ||
| 7 | +import java.util.HashMap; | ||
| 8 | +import java.util.Map; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 车辆数据同步状态enum。 | ||
| 12 | + */ | ||
| 13 | +public enum VehicleDataSyncStatusEnum { | ||
| 14 | + PREPARE("准备"), | ||
| 15 | + SYNCING("同步中"), | ||
| 16 | + SUCCESS("成功"), | ||
| 17 | + FAILURE("失败"); | ||
| 18 | + | ||
| 19 | + public static Map<String, VehicleDataSyncStatusEnum> enumMap = | ||
| 20 | + new HashMap<String, VehicleDataSyncStatusEnum>() {{ | ||
| 21 | + put("准备", PREPARE); | ||
| 22 | + put("同步中", SYNCING); | ||
| 23 | + put("成功", SUCCESS); | ||
| 24 | + put("失败", FAILURE); | ||
| 25 | + }}; | ||
| 26 | + | ||
| 27 | + /** 字典描述(对应数据库的字典) */ | ||
| 28 | + private String dicDesc; | ||
| 29 | + | ||
| 30 | + @JsonCreator | ||
| 31 | + VehicleDataSyncStatusEnum(String dicDesc) { | ||
| 32 | + this.dicDesc = dicDesc; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public static VehicleDataSyncStatusEnum fromDicDesc(String dicDesc) { | ||
| 36 | + if (StringUtils.isEmpty(dicDesc)) { | ||
| 37 | + throw new RuntimeException("车辆数据同步状态描述不能为空!"); | ||
| 38 | + } else if (enumMap.get(dicDesc) == null) { | ||
| 39 | + throw new RuntimeException("车辆数据同步状态未定义:" + dicDesc); | ||
| 40 | + } | ||
| 41 | + return enumMap.get(dicDesc); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + @JsonValue | ||
| 45 | + public String getDicDesc() { | ||
| 46 | + return dicDesc; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public void setDicDesc(String dicDesc) { | ||
| 50 | + this.dicDesc = dicDesc; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Override | ||
| 54 | + public String toString() { | ||
| 55 | + return dicDesc; | ||
| 56 | + } | ||
| 57 | +} |
src/main/java/com/bsth/entity/schedule/batch/VehicleDataSyncStatusEnumConverter.java
0 → 100644
| 1 | +package com.bsth.entity.schedule.batch; | ||
| 2 | + | ||
| 3 | +import javax.persistence.AttributeConverter; | ||
| 4 | +import javax.persistence.Convert; | ||
| 5 | + | ||
| 6 | +@Convert | ||
| 7 | +public class VehicleDataSyncStatusEnumConverter implements AttributeConverter<VehicleDataSyncStatusEnum, String> { | ||
| 8 | + @Override | ||
| 9 | + public String convertToDatabaseColumn(VehicleDataSyncStatusEnum vehicleDataSyncStatusEnum) { | ||
| 10 | + return vehicleDataSyncStatusEnum.getDicDesc(); | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + @Override | ||
| 14 | + public VehicleDataSyncStatusEnum convertToEntityAttribute(String s) { | ||
| 15 | + return VehicleDataSyncStatusEnum.fromDicDesc(s); | ||
| 16 | + } | ||
| 17 | +} |
src/main/java/com/bsth/filter/BaseFilter.java
| @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { | @@ -17,7 +17,7 @@ public abstract class BaseFilter implements Filter { | ||
| 17 | * 白名单 | 17 | * 白名单 |
| 18 | */ | 18 | */ |
| 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, | 19 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 20 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT, Constants.ACTUATOR_MANAGEMENT_HEALTH }; | 20 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS, Constants.UP_RFID_URL, Constants.STATION_AND_SECTION_COUNT, Constants.ACTUATOR_MANAGEMENT_HEALTH, Constants.WEBSERVICE_URL }; |
| 21 | 21 | ||
| 22 | @Override | 22 | @Override |
| 23 | public void destroy() { | 23 | public void destroy() { |
src/main/java/com/bsth/repository/schedule/batch/VehicleDataSyncRepo.java
0 → 100644
| 1 | +package com.bsth.repository.schedule.batch; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.batch.VehicleDataSync; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +@Repository | ||
| 8 | +public interface VehicleDataSyncRepo extends BaseRepository<VehicleDataSync, Long> { | ||
| 9 | +} |
src/main/java/com/bsth/repository/schedule/batch/VehicleDataSyncStatRepo.java
0 → 100644
| 1 | +package com.bsth.repository.schedule.batch; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.batch.VehicleDataSyncStat; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +@Repository | ||
| 8 | +public interface VehicleDataSyncStatRepo extends BaseRepository<VehicleDataSyncStat, Long> { | ||
| 9 | + | ||
| 10 | +} |
src/main/java/com/bsth/security/filter/LoginInterceptor.java
| @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter { | @@ -33,7 +33,7 @@ public class LoginInterceptor implements Filter { | ||
| 33 | * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证 | 33 | * 相比于 BaseFilter,此处对线调GPS请求进行了拦截验证 |
| 34 | */ | 34 | */ |
| 35 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, | 35 | private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA, Constants.SERVICE_INTERFACE, |
| 36 | - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT }; | 36 | + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.UP_RFID_URL,Constants.STATION_AND_SECTION_COUNT, Constants.WEBSERVICE_URL }; |
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | @Override | 39 | @Override |
src/main/java/com/bsth/service/calc/impl/CalcIntervalServiceImpl.java
| @@ -13,9 +13,11 @@ import java.util.Comparator; | @@ -13,9 +13,11 @@ import java.util.Comparator; | ||
| 13 | import java.util.Date; | 13 | import java.util.Date; |
| 14 | import java.util.GregorianCalendar; | 14 | import java.util.GregorianCalendar; |
| 15 | import java.util.HashMap; | 15 | import java.util.HashMap; |
| 16 | +import java.util.HashSet; | ||
| 16 | import java.util.Iterator; | 17 | import java.util.Iterator; |
| 17 | import java.util.List; | 18 | import java.util.List; |
| 18 | import java.util.Map; | 19 | import java.util.Map; |
| 20 | +import java.util.Set; | ||
| 19 | 21 | ||
| 20 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
| 21 | import org.springframework.beans.factory.annotation.Autowired; | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -27,8 +29,6 @@ import com.bsth.data.BasicData; | @@ -27,8 +29,6 @@ import com.bsth.data.BasicData; | ||
| 27 | import com.bsth.entity.Line; | 29 | import com.bsth.entity.Line; |
| 28 | import com.bsth.entity.calc.CalcInterval; | 30 | import com.bsth.entity.calc.CalcInterval; |
| 29 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 31 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 30 | -import com.bsth.entity.sheet.CalcSheet; | ||
| 31 | -import com.bsth.entity.sheet.Sheet; | ||
| 32 | import com.bsth.repository.LineRepository; | 32 | import com.bsth.repository.LineRepository; |
| 33 | import com.bsth.repository.calc.CalcIntervalRepository; | 33 | import com.bsth.repository.calc.CalcIntervalRepository; |
| 34 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 34 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| @@ -36,9 +36,7 @@ import com.bsth.service.LineService; | @@ -36,9 +36,7 @@ import com.bsth.service.LineService; | ||
| 36 | import com.bsth.service.calc.CalcIntervalService; | 36 | import com.bsth.service.calc.CalcIntervalService; |
| 37 | import com.bsth.service.impl.BaseServiceImpl; | 37 | import com.bsth.service.impl.BaseServiceImpl; |
| 38 | import com.bsth.util.Arith; | 38 | import com.bsth.util.Arith; |
| 39 | -import com.bsth.util.ComparableReal; | ||
| 40 | import com.bsth.util.ReportUtils; | 39 | import com.bsth.util.ReportUtils; |
| 41 | -import com.mysql.fabric.xmlrpc.base.Array; | ||
| 42 | 40 | ||
| 43 | @Service | 41 | @Service |
| 44 | public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Integer> implements CalcIntervalService { | 42 | public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Integer> implements CalcIntervalService { |
| @@ -61,6 +59,8 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -61,6 +59,8 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 61 | public List<Map<String, Object>> countList(Map<String, Object> map) { | 59 | public List<Map<String, Object>> countList(Map<String, Object> map) { |
| 62 | // TODO Auto-generated method stub | 60 | // TODO Auto-generated method stub |
| 63 | final DecimalFormat df = new DecimalFormat("0.00"); | 61 | final DecimalFormat df = new DecimalFormat("0.00"); |
| 62 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 63 | + | ||
| 64 | List<Map<String, Object>> list=new ArrayList<>(); | 64 | List<Map<String, Object>> list=new ArrayList<>(); |
| 65 | String level=map.get("levelType").toString(); | 65 | String level=map.get("levelType").toString(); |
| 66 | String line=map.get("line").toString().trim(); | 66 | String line=map.get("line").toString().trim(); |
| @@ -69,6 +69,25 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -69,6 +69,25 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 69 | String sDate=map.get("date").toString(); | 69 | String sDate=map.get("date").toString(); |
| 70 | String eDate=map.get("endDate").toString(); | 70 | String eDate=map.get("endDate").toString(); |
| 71 | String nature=map.get("nature").toString(); | 71 | String nature=map.get("nature").toString(); |
| 72 | + String week=map.get("week").toString(); | ||
| 73 | + String weekend=""; | ||
| 74 | + | ||
| 75 | + try { | ||
| 76 | + if(!("0".equals(week))){ | ||
| 77 | + Date d1 = sdf.parse(sDate); | ||
| 78 | + Date d2 = sdf.parse(eDate); | ||
| 79 | + for(;d1.getTime() <= d2.getTime();d1.setTime(d1.getTime() + 1l*1000*60*60*24)){ | ||
| 80 | + if(d1.toString().contains("Sat") || d1.toString().contains("Sun")){ | ||
| 81 | + if(weekend.length() > 0){ | ||
| 82 | + weekend = weekend + ","; | ||
| 83 | + } | ||
| 84 | + weekend = weekend + "'" + sdf.format(d1) + "'"; | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + } | ||
| 88 | + } catch (Exception e) { | ||
| 89 | + // TODO: handle exception | ||
| 90 | + } | ||
| 72 | 91 | ||
| 73 | //D级线路显示发车准点率 | 92 | //D级线路显示发车准点率 |
| 74 | if(level.equals("D") && false){ //新的计算规则D级也显示大间隔 | 93 | if(level.equals("D") && false){ //新的计算规则D级也显示大间隔 |
| @@ -136,7 +155,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -136,7 +155,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 136 | // + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime " | 155 | // + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime " |
| 137 | // + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level <> 'D' "; | 156 | // + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level <> 'D' "; |
| 138 | String sql="select gsbm,fgsbm,xl_bm,xl_name,SUM(bcs) as bcs,MAX(id) as id,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf," | 157 | String sql="select gsbm,fgsbm,xl_bm,xl_name,SUM(bcs) as bcs,MAX(id) as id,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf," |
| 139 | - + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime, level " | 158 | + + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime,substr(level,1,1) level " |
| 140 | + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level like '%"+level+"%' " | 159 | + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level like '%"+level+"%' " |
| 141 | + "and level is not null and level <> '' "; | 160 | + "and level is not null and level <> '' "; |
| 142 | if(line.equals("")){ | 161 | if(line.equals("")){ |
| @@ -148,8 +167,13 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -148,8 +167,13 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 148 | }else{ | 167 | }else{ |
| 149 | sql +=" and xl_bm ='"+line+"'"; | 168 | sql +=" and xl_bm ='"+line+"'"; |
| 150 | } | 169 | } |
| 151 | - sql += " group by xl_bm,gsbm,fgsbm,xl_name,level" | ||
| 152 | - +" order by xl_bm,level"; | 170 | + if(weekend.length() > 0 && "1".equals(week)){ |
| 171 | + sql +=" and date not in ("+weekend+")"; | ||
| 172 | + } else if(weekend.length() > 0 && "2".equals(week)){ | ||
| 173 | + sql +=" and date in ("+weekend+")"; | ||
| 174 | + } | ||
| 175 | + sql += " group by xl_bm,gsbm,fgsbm,xl_name,substr(level,1,1)" | ||
| 176 | + +" order by gsbm,fgsbm,xl_bm,level"; | ||
| 153 | 177 | ||
| 154 | list=jdbcTemplate.query(sql, | 178 | list=jdbcTemplate.query(sql, |
| 155 | new RowMapper<Map<String,Object>>(){ | 179 | new RowMapper<Map<String,Object>>(){ |
| @@ -171,15 +195,15 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -171,15 +195,15 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 171 | }else{ | 195 | }else{ |
| 172 | m.put("fsl", "0.0"); | 196 | m.put("fsl", "0.0"); |
| 173 | } | 197 | } |
| 174 | - m.put("djgAll", rs.getString("djgAll")); | ||
| 175 | - m.put("djgGf", rs.getString("djgGf")); | ||
| 176 | - m.put("djgZgf", rs.getString("djgZgf")); | ||
| 177 | - m.put("djgWgf", rs.getString("djgWgf")); | ||
| 178 | - m.put("djgDg", rs.getString("djgDg")); | 198 | + m.put("djgAll", rs.getString("djgAll")!=null?rs.getString("djgAll"):""); |
| 199 | + m.put("djgGf", rs.getString("djgGf")!=null?rs.getString("djgGf"):""); | ||
| 200 | + m.put("djgZgf", rs.getString("djgZgf")!=null?rs.getString("djgZgf"):""); | ||
| 201 | + m.put("djgWgf", rs.getString("djgWgf")!=null?rs.getString("djgWgf"):""); | ||
| 202 | + m.put("djgDg", rs.getString("djgDg")!=null?rs.getString("djgDg"):""); | ||
| 179 | if("0".equals(rs.getString("djgTime")) || "0.0".equals(rs.getString("djgTime"))){ | 203 | if("0".equals(rs.getString("djgTime")) || "0.0".equals(rs.getString("djgTime"))){ |
| 180 | m.put("djgTime", ""); | 204 | m.put("djgTime", ""); |
| 181 | } else { | 205 | } else { |
| 182 | - m.put("djgTime", rs.getString("djgTime")); | 206 | + m.put("djgTime", rs.getString("djgTime")!=null?rs.getString("djgTime"):""); |
| 183 | } | 207 | } |
| 184 | if(rs.getString("level").toString().trim().length() > 1){ | 208 | if(rs.getString("level").toString().trim().length() > 1){ |
| 185 | m.put("level", rs.getString("level").trim().substring(0, 1)); | 209 | m.put("level", rs.getString("level").trim().substring(0, 1)); |
| @@ -263,15 +287,44 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -263,15 +287,44 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 263 | public List<Map<String, Object>> listInterval(Map<String, Object> map) { | 287 | public List<Map<String, Object>> listInterval(Map<String, Object> map) { |
| 264 | // TODO Auto-generated method stub | 288 | // TODO Auto-generated method stub |
| 265 | final DecimalFormat df = new DecimalFormat("0.00"); | 289 | final DecimalFormat df = new DecimalFormat("0.00"); |
| 290 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 266 | 291 | ||
| 267 | String line=map.get("line").toString(); | 292 | String line=map.get("line").toString(); |
| 268 | String date=map.get("date").toString(); | 293 | String date=map.get("date").toString(); |
| 269 | String endDate=map.get("endDate").toString(); | 294 | String endDate=map.get("endDate").toString(); |
| 270 | String levelType=map.get("levelType").toString(); | 295 | String levelType=map.get("levelType").toString(); |
| 296 | + String week=map.get("week").toString(); | ||
| 297 | + Set<String> weekend = new HashSet<String>(); | ||
| 298 | + | ||
| 299 | + try { | ||
| 300 | + if(!("0".equals(week))){ | ||
| 301 | + Date d1 = sdf.parse(date); | ||
| 302 | + Date d2 = sdf.parse(endDate); | ||
| 303 | + for(;d1.getTime() <= d2.getTime();d1.setTime(d1.getTime() + 1l*1000*60*60*24)){ | ||
| 304 | + if(d1.toString().contains("Sat") || d1.toString().contains("Sun")){ | ||
| 305 | + weekend.add(sdf.format(d1)); | ||
| 306 | + } | ||
| 307 | + } | ||
| 308 | + } | ||
| 309 | + } catch (Exception e) { | ||
| 310 | + // TODO: handle exception | ||
| 311 | + } | ||
| 312 | + | ||
| 271 | List<CalcInterval> listAll=calcIntervalRepository.selectByDateAndLine(line, date, endDate, levelType); | 313 | List<CalcInterval> listAll=calcIntervalRepository.selectByDateAndLine(line, date, endDate, levelType); |
| 272 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | 314 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); |
| 273 | for (int i = 0; i < listAll.size(); i++) { | 315 | for (int i = 0; i < listAll.size(); i++) { |
| 274 | CalcInterval t=listAll.get(i); | 316 | CalcInterval t=listAll.get(i); |
| 317 | + | ||
| 318 | + if("1".equals(week)){ | ||
| 319 | + if(weekend.contains(t.getDate())){ | ||
| 320 | + continue; | ||
| 321 | + } | ||
| 322 | + } else if("2".equals(week)){ | ||
| 323 | + if(!(weekend.contains(t.getDate()))){ | ||
| 324 | + continue; | ||
| 325 | + } | ||
| 326 | + } | ||
| 327 | + | ||
| 275 | // if(!t.getLevel().equals("D") && t.getDjgAll()>0){ | 328 | // if(!t.getLevel().equals("D") && t.getDjgAll()>0){ |
| 276 | if(t.getDjgAll() != null && t.getDjgAll() > 0){ | 329 | if(t.getDjgAll() != null && t.getDjgAll() > 0){ |
| 277 | Map<String, Object> m=new HashMap<>(); | 330 | Map<String, Object> m=new HashMap<>(); |
| @@ -300,7 +353,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -300,7 +353,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 300 | tempList.add(m); | 353 | tempList.add(m); |
| 301 | } | 354 | } |
| 302 | } | 355 | } |
| 303 | - if(map.get("type").equals("export")){ | 356 | + if(map.get("type").equals("export")){ |
| 304 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | 357 | List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); |
| 305 | Map<String, Object> m = new HashMap<String, Object>(); | 358 | Map<String, Object> m = new HashMap<String, Object>(); |
| 306 | m.put("date", date); | 359 | m.put("date", date); |
| @@ -710,10 +763,29 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -710,10 +763,29 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 710 | @Override | 763 | @Override |
| 711 | public List<Map<String, Object>> exportDetail(Map<String, Object> map) { | 764 | public List<Map<String, Object>> exportDetail(Map<String, Object> map) { |
| 712 | // TODO Auto-generated method stub | 765 | // TODO Auto-generated method stub |
| 766 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 767 | + | ||
| 713 | String line=map.get("line").toString().trim(); | 768 | String line=map.get("line").toString().trim(); |
| 714 | String date=map.get("date").toString(); | 769 | String date=map.get("date").toString(); |
| 715 | String endDate=map.get("endDate").toString(); | 770 | String endDate=map.get("endDate").toString(); |
| 716 | String level=map.get("levelType").toString(); | 771 | String level=map.get("levelType").toString(); |
| 772 | + String week=map.get("week").toString(); | ||
| 773 | + Set<String> weekend = new HashSet<String>(); | ||
| 774 | + | ||
| 775 | + try { | ||
| 776 | + if(!("0".equals(week))){ | ||
| 777 | + Date d1 = sdf.parse(date); | ||
| 778 | + Date d2 = sdf.parse(endDate); | ||
| 779 | + for(;d1.getTime() <= d2.getTime();d1.setTime(d1.getTime() + 1l*1000*60*60*24)){ | ||
| 780 | + if(d1.toString().contains("Sat") || d1.toString().contains("Sun")){ | ||
| 781 | + weekend.add(sdf.format(d1)); | ||
| 782 | + } | ||
| 783 | + } | ||
| 784 | + } | ||
| 785 | + } catch (Exception e) { | ||
| 786 | + // TODO: handle exception | ||
| 787 | + } | ||
| 788 | + | ||
| 717 | String nature="0", gs = "", fgs = ""; | 789 | String nature="0", gs = "", fgs = ""; |
| 718 | if(map.containsKey("nature")){ | 790 | if(map.containsKey("nature")){ |
| 719 | nature = map.get("nature").toString().trim(); | 791 | nature = map.get("nature").toString().trim(); |
| @@ -735,7 +807,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -735,7 +807,7 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 735 | + " d.date >= '"+date+"' and d.date <= '"+endDate+"' " | 807 | + " d.date >= '"+date+"' and d.date <= '"+endDate+"' " |
| 736 | + " and d.level like '%"+level+"%' " | 808 | + " and d.level like '%"+level+"%' " |
| 737 | + " and d.level is not null and d.level <> '' " | 809 | + " and d.level is not null and d.level <> '' " |
| 738 | - + " order by d.line_code, d.date asc, d.level asc "; | 810 | + + " order by i.gsbm, i.fgsbm, d.line_code, d.date asc, d.level asc "; |
| 739 | 811 | ||
| 740 | List<Map<String, Object>> resList=jdbcTemplate.query(sql, | 812 | List<Map<String, Object>> resList=jdbcTemplate.query(sql, |
| 741 | new RowMapper<Map<String,Object>>(){ | 813 | new RowMapper<Map<String,Object>>(){ |
| @@ -763,6 +835,17 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -763,6 +835,17 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 763 | Map<String, Boolean> lineMap=lineService.lineNature(); | 835 | Map<String, Boolean> lineMap=lineService.lineNature(); |
| 764 | for (int i = 0; i < resList.size(); i++) { | 836 | for (int i = 0; i < resList.size(); i++) { |
| 765 | Map<String, Object> m=resList.get(i); | 837 | Map<String, Object> m=resList.get(i); |
| 838 | + | ||
| 839 | + if("1".equals(week)){ | ||
| 840 | + if(weekend.contains(m.get("date"))){ | ||
| 841 | + continue; | ||
| 842 | + } | ||
| 843 | + } else if("2".equals(week)){ | ||
| 844 | + if(!(weekend.contains(m.get("date")))){ | ||
| 845 | + continue; | ||
| 846 | + } | ||
| 847 | + } | ||
| 848 | + | ||
| 766 | if(null != line && line.length() > 0){ | 849 | if(null != line && line.length() > 0){ |
| 767 | if(line.equals(m.get("xlBm").toString())){ | 850 | if(line.equals(m.get("xlBm").toString())){ |
| 768 | list.add(m); | 851 | list.add(m); |
| @@ -811,12 +894,33 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -811,12 +894,33 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 811 | 894 | ||
| 812 | public List<Map<String, Object>> sumInterval(Map<String, Object> map) { | 895 | public List<Map<String, Object>> sumInterval(Map<String, Object> map) { |
| 813 | // TODO Auto-generated method stub | 896 | // TODO Auto-generated method stub |
| 814 | - final DecimalFormat df = new DecimalFormat("0.00"); | 897 | + final DecimalFormat df = new DecimalFormat("0.00"); |
| 898 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 899 | + | ||
| 815 | String gs=map.get("gs").toString().trim(); | 900 | String gs=map.get("gs").toString().trim(); |
| 816 | String fgs=map.get("fgs").toString().trim(); | 901 | String fgs=map.get("fgs").toString().trim(); |
| 817 | String sDate=map.get("date").toString(); | 902 | String sDate=map.get("date").toString(); |
| 818 | String eDate=map.get("endDate").toString(); | 903 | String eDate=map.get("endDate").toString(); |
| 819 | String nature=map.get("nature").toString(); | 904 | String nature=map.get("nature").toString(); |
| 905 | + String week=map.get("week").toString(); | ||
| 906 | + String weekend=""; | ||
| 907 | + | ||
| 908 | + try { | ||
| 909 | + if(!("0".equals(week))){ | ||
| 910 | + Date d1 = sdf.parse(sDate); | ||
| 911 | + Date d2 = sdf.parse(eDate); | ||
| 912 | + for(;d1.getTime() <= d2.getTime();d1.setTime(d1.getTime() + 1l*1000*60*60*24)){ | ||
| 913 | + if(d1.toString().contains("Sat") || d1.toString().contains("Sun")){ | ||
| 914 | + if(weekend.length() > 0){ | ||
| 915 | + weekend = weekend + ","; | ||
| 916 | + } | ||
| 917 | + weekend = weekend + "'" + sdf.format(d1) + "'"; | ||
| 918 | + } | ||
| 919 | + } | ||
| 920 | + } | ||
| 921 | + } catch (Exception e) { | ||
| 922 | + // TODO: handle exception | ||
| 923 | + } | ||
| 820 | 924 | ||
| 821 | List<Map<String, Object>> listAll=new ArrayList<Map<String, Object>>(); | 925 | List<Map<String, Object>> listAll=new ArrayList<Map<String, Object>>(); |
| 822 | 926 | ||
| @@ -830,6 +934,11 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | @@ -830,6 +934,11 @@ public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Intege | ||
| 830 | sql +=" and gsbm = '"+gs+"'"; | 934 | sql +=" and gsbm = '"+gs+"'"; |
| 831 | } | 935 | } |
| 832 | } | 936 | } |
| 937 | + if(weekend.length() > 0 && "1".equals(week)){ | ||
| 938 | + sql +=" and date not in ("+weekend+")"; | ||
| 939 | + } else if(weekend.length() > 0 && "2".equals(week)){ | ||
| 940 | + sql +=" and date in ("+weekend+")"; | ||
| 941 | + } | ||
| 833 | sql += " order by gsbm,fgsbm,level"; | 942 | sql += " order by gsbm,fgsbm,level"; |
| 834 | 943 | ||
| 835 | List<Map<String, Object>> countList = new ArrayList<Map<String, Object>>(); | 944 | List<Map<String, Object>> countList = new ArrayList<Map<String, Object>>(); |
src/main/java/com/bsth/service/jdtest/impl/JdtestServiceImpl.java
| @@ -119,21 +119,21 @@ public class JdtestServiceImpl implements JdtestService { | @@ -119,21 +119,21 @@ public class JdtestServiceImpl implements JdtestService { | ||
| 119 | if(map.get("fgsbm")!=null){ | 119 | if(map.get("fgsbm")!=null){ |
| 120 | fgsbm=map.get("fgsbm").toString().trim(); | 120 | fgsbm=map.get("fgsbm").toString().trim(); |
| 121 | } | 121 | } |
| 122 | - | ||
| 123 | - String sql="select r.xl_bm, r.cl_zbh,r.j_gh,r.lp_name " | 122 | + |
| 123 | + String sql="select r.xl_bm, r.cl_zbh, r.j_gh, r.lp_name, min(fcsj) mintime " | ||
| 124 | + " from bsth_c_s_sp_info_real r where " | 124 | + " from bsth_c_s_sp_info_real r where " |
| 125 | - + "r.schedule_date_str = '"+map.get("date").toString()+"'"; | 125 | + + " r.schedule_date_str = '"+map.get("date").toString()+"'"; |
| 126 | if(!gsbm.equals("")){ | 126 | if(!gsbm.equals("")){ |
| 127 | - sql += "and r.gs_bm ='"+gsbm+"'"; | ||
| 128 | - } | 127 | + sql += " and r.gs_bm ='"+gsbm+"'"; |
| 128 | + } | ||
| 129 | if(!fgsbm.equals("")){ | 129 | if(!fgsbm.equals("")){ |
| 130 | - sql += "and r.fgs_bm='"+fgsbm+"'"; | 130 | + sql += " and r.fgs_bm='"+fgsbm+"'"; |
| 131 | } | 131 | } |
| 132 | if(!xlbm.equals("")){ | 132 | if(!xlbm.equals("")){ |
| 133 | sql += " and r.xl_bm = '"+xlbm+"'"; | 133 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 134 | - } | 134 | + } |
| 135 | 135 | ||
| 136 | - sql += " group by r.xl_bm, r.cl_zbh,r.j_gh,r.lp_name order by r.xl_bm,r.cl_zbh"; | 136 | + sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.lp_name order by r.xl_bm,r.cl_zbh,mintime"; |
| 137 | 137 | ||
| 138 | List<Map<String, Object>> list = jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { | 138 | List<Map<String, Object>> list = jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { |
| 139 | @Override | 139 | @Override |
src/main/java/com/bsth/service/schedule/batch/VehicleDataSyncService.java
0 → 100644
src/main/java/com/bsth/service/schedule/batch/VehicleDataSyncServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.schedule.batch; | ||
| 2 | + | ||
| 3 | +import com.bsth.control_v2.plan_module.common.exception.PlanModuleException; | ||
| 4 | +import com.bsth.entity.schedule.batch.VehicleDataSync; | ||
| 5 | +import com.bsth.service.schedule.impl.BServiceImpl; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | + | ||
| 8 | +@Service | ||
| 9 | +public class VehicleDataSyncServiceImpl extends BServiceImpl<VehicleDataSync, Long> implements VehicleDataSyncService { | ||
| 10 | + @Override | ||
| 11 | + public void delete(Long aLong) { | ||
| 12 | + throw new PlanModuleException("不支持delete方法!"); | ||
| 13 | + } | ||
| 14 | +} |
src/main/java/com/bsth/service/schedule/batch/VehicleDataSyncStatService.java
0 → 100644
src/main/java/com/bsth/service/schedule/batch/VehicleDataSyncStatServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.schedule.batch; | ||
| 2 | + | ||
| 3 | +import com.bsth.control_v2.plan_module.common.exception.PlanModuleException; | ||
| 4 | +import com.bsth.entity.schedule.batch.VehicleDataSyncStat; | ||
| 5 | +import com.bsth.service.schedule.impl.BServiceImpl; | ||
| 6 | +import org.springframework.stereotype.Service; | ||
| 7 | + | ||
| 8 | +@Service | ||
| 9 | +public class VehicleDataSyncStatServiceImpl extends BServiceImpl<VehicleDataSyncStat, Long> implements VehicleDataSyncStatService { | ||
| 10 | + @Override | ||
| 11 | + public VehicleDataSyncStat save(VehicleDataSyncStat vehicleDataSyncStat) { | ||
| 12 | + throw new PlanModuleException("不支持save方法!"); | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + @Override | ||
| 16 | + public void delete(Long aLong) { | ||
| 17 | + throw new PlanModuleException("不支持delete方法!"); | ||
| 18 | + } | ||
| 19 | +} |
src/main/java/com/bsth/service/schedule/batch/webservice/VehicleSyncEndpoint.java
0 → 100644
| 1 | +package com.bsth.service.schedule.batch.webservice; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.batch.VehicleDataSync; | ||
| 4 | +import com.bsth.entity.schedule.batch.VehicleDataSyncStatusEnum; | ||
| 5 | +import com.bsth.service.schedule.batch.VehicleDataSyncService; | ||
| 6 | +import com.bsth.service.schedule.batch.webservice.vehiclesync.AddVehicleDataSyncRequest; | ||
| 7 | +import com.bsth.service.schedule.batch.webservice.vehiclesync.AddVehicleDataSyncResponse; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.ws.server.endpoint.annotation.Endpoint; | ||
| 10 | +import org.springframework.ws.server.endpoint.annotation.PayloadRoot; | ||
| 11 | +import org.springframework.ws.server.endpoint.annotation.RequestPayload; | ||
| 12 | +import org.springframework.ws.server.endpoint.annotation.ResponsePayload; | ||
| 13 | + | ||
| 14 | +import java.util.Date; | ||
| 15 | + | ||
| 16 | +@Endpoint | ||
| 17 | +public class VehicleSyncEndpoint { | ||
| 18 | + /** 名字空间uri */ | ||
| 19 | + private static final String NAMESPACE_URI = "http://bsth.com/service/schedule/batch/webservice/vehicleSync"; | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + private VehicleDataSyncService vehicleDataSyncService; | ||
| 23 | + @PayloadRoot(namespace = NAMESPACE_URI, localPart = "addVehicleDataSyncRequest") | ||
| 24 | + @ResponsePayload | ||
| 25 | + public AddVehicleDataSyncResponse addVehicleDataSync( | ||
| 26 | + @RequestPayload AddVehicleDataSyncRequest addVehicleDataSyncRequest) { | ||
| 27 | + AddVehicleDataSyncResponse addVehicleDataSyncResponse = new AddVehicleDataSyncResponse(); | ||
| 28 | + try { | ||
| 29 | + // 创建车辆同步数据 | ||
| 30 | + VehicleDataSync vehicleDataSync = new VehicleDataSync(); | ||
| 31 | + vehicleDataSync.setIdenZbh(addVehicleDataSyncRequest.getIdenZbh()); | ||
| 32 | + vehicleDataSync.setIdenCph(addVehicleDataSyncRequest.getIdenCph()); | ||
| 33 | + vehicleDataSync.setUpdateGsmc(addVehicleDataSyncRequest.getUpdateGsmc()); | ||
| 34 | + vehicleDataSync.setUpdateFgsmc(addVehicleDataSyncRequest.getUpdateFgsmc()); | ||
| 35 | + vehicleDataSync.setUpdateSfbf(addVehicleDataSyncRequest.isUpdateSfbf()); | ||
| 36 | + | ||
| 37 | + vehicleDataSync.setStatus(VehicleDataSyncStatusEnum.PREPARE); | ||
| 38 | + vehicleDataSync.setCreateDate(new Date()); | ||
| 39 | + vehicleDataSync.setUpdateDate(new Date()); | ||
| 40 | + vehicleDataSyncService.save(vehicleDataSync); | ||
| 41 | + | ||
| 42 | + addVehicleDataSyncResponse.setSuccess(true); | ||
| 43 | + addVehicleDataSyncResponse.setMessage("OK!"); | ||
| 44 | + } catch (Exception exp) { | ||
| 45 | + exp.printStackTrace(); | ||
| 46 | + addVehicleDataSyncResponse.setSuccess(false); | ||
| 47 | + addVehicleDataSyncResponse.setMessage(exp.getMessage()); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + return addVehicleDataSyncResponse; | ||
| 51 | + } | ||
| 52 | +} |
src/main/java/com/bsth/service/schedule/batch/webservice/WebServiceConfig.java
0 → 100644
| 1 | +package com.bsth.service.schedule.batch.webservice; | ||
| 2 | + | ||
| 3 | +import org.springframework.boot.context.embedded.ServletRegistrationBean; | ||
| 4 | +import org.springframework.context.ApplicationContext; | ||
| 5 | +import org.springframework.context.annotation.Bean; | ||
| 6 | +import org.springframework.context.annotation.Configuration; | ||
| 7 | +import org.springframework.core.io.ClassPathResource; | ||
| 8 | +import org.springframework.ws.config.annotation.EnableWs; | ||
| 9 | +import org.springframework.ws.config.annotation.WsConfigurerAdapter; | ||
| 10 | +import org.springframework.ws.transport.http.MessageDispatcherServlet; | ||
| 11 | +import org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition; | ||
| 12 | +import org.springframework.xml.xsd.SimpleXsdSchema; | ||
| 13 | +import org.springframework.xml.xsd.XsdSchema; | ||
| 14 | + | ||
| 15 | +@EnableWs | ||
| 16 | +@Configuration | ||
| 17 | +public class WebServiceConfig extends WsConfigurerAdapter { | ||
| 18 | + @Bean | ||
| 19 | + public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) { | ||
| 20 | + MessageDispatcherServlet servlet = new MessageDispatcherServlet(); | ||
| 21 | + servlet.setApplicationContext(applicationContext); | ||
| 22 | + servlet.setTransformWsdlLocations(true); | ||
| 23 | + return new ServletRegistrationBean(servlet, "/ws/*"); | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + @Bean(name="vehicleSync") | ||
| 27 | + public DefaultWsdl11Definition vehicleSyncWsdl11Definition(XsdSchema vehicleSyncSchema) { | ||
| 28 | + DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition(); | ||
| 29 | + wsdl11Definition.setPortTypeName("vehicleSyncPort"); | ||
| 30 | + wsdl11Definition.setLocationUri("/ws"); | ||
| 31 | + wsdl11Definition.setTargetNamespace("http://bsth.com/service/schedule/batch/webservice/vehicleSync"); | ||
| 32 | + wsdl11Definition.setSchema(vehicleSyncSchema); | ||
| 33 | + return wsdl11Definition; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Bean | ||
| 37 | + public XsdSchema vehicleSyncSchema() { | ||
| 38 | + return new SimpleXsdSchema(new ClassPathResource("/xsd/vehicleSync.xsd")); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + | ||
| 42 | +} |
src/main/java/com/bsth/service/schedule/batch/webservice/vehiclesync/AddVehicleDataSyncRequest.java
0 → 100644
| 1 | +// | ||
| 2 | +// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的 | ||
| 3 | +// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | ||
| 4 | +// 在重新编译源模式时, 对此文件的所有修改都将丢失。 | ||
| 5 | +// 生成时间: 2020.06.23 时间 03:15:37 PM CST | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +package com.bsth.service.schedule.batch.webservice.vehiclesync; | ||
| 10 | + | ||
| 11 | +import javax.xml.bind.annotation.XmlAccessType; | ||
| 12 | +import javax.xml.bind.annotation.XmlAccessorType; | ||
| 13 | +import javax.xml.bind.annotation.XmlElement; | ||
| 14 | +import javax.xml.bind.annotation.XmlRootElement; | ||
| 15 | +import javax.xml.bind.annotation.XmlType; | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * <p>anonymous complex type的 Java 类。 | ||
| 20 | + * | ||
| 21 | + * <p>以下模式片段指定包含在此类中的预期内容。 | ||
| 22 | + * | ||
| 23 | + * <pre> | ||
| 24 | + * <complexType> | ||
| 25 | + * <complexContent> | ||
| 26 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
| 27 | + * <sequence> | ||
| 28 | + * <element name="idenZbh" type="{http://www.w3.org/2001/XMLSchema}string"/> | ||
| 29 | + * <element name="idenCph" type="{http://www.w3.org/2001/XMLSchema}string"/> | ||
| 30 | + * <element name="updateGsmc" type="{http://www.w3.org/2001/XMLSchema}string"/> | ||
| 31 | + * <element name="updateFgsmc" type="{http://www.w3.org/2001/XMLSchema}string"/> | ||
| 32 | + * <element name="updateSfbf" type="{http://www.w3.org/2001/XMLSchema}boolean"/> | ||
| 33 | + * </sequence> | ||
| 34 | + * </restriction> | ||
| 35 | + * </complexContent> | ||
| 36 | + * </complexType> | ||
| 37 | + * </pre> | ||
| 38 | + * | ||
| 39 | + * | ||
| 40 | + */ | ||
| 41 | +@XmlAccessorType(XmlAccessType.FIELD) | ||
| 42 | +@XmlType(name = "", propOrder = { | ||
| 43 | + "idenZbh", | ||
| 44 | + "idenCph", | ||
| 45 | + "updateGsmc", | ||
| 46 | + "updateFgsmc", | ||
| 47 | + "updateSfbf" | ||
| 48 | +}) | ||
| 49 | +@XmlRootElement(name = "addVehicleDataSyncRequest") | ||
| 50 | +public class AddVehicleDataSyncRequest { | ||
| 51 | + | ||
| 52 | + @XmlElement(required = true) | ||
| 53 | + protected String idenZbh; | ||
| 54 | + @XmlElement(required = true) | ||
| 55 | + protected String idenCph; | ||
| 56 | + @XmlElement(required = true) | ||
| 57 | + protected String updateGsmc; | ||
| 58 | + @XmlElement(required = true) | ||
| 59 | + protected String updateFgsmc; | ||
| 60 | + protected boolean updateSfbf; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 获取idenZbh属性的值。 | ||
| 64 | + * | ||
| 65 | + * @return | ||
| 66 | + * possible object is | ||
| 67 | + * {@link String } | ||
| 68 | + * | ||
| 69 | + */ | ||
| 70 | + public String getIdenZbh() { | ||
| 71 | + return idenZbh; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 设置idenZbh属性的值。 | ||
| 76 | + * | ||
| 77 | + * @param value | ||
| 78 | + * allowed object is | ||
| 79 | + * {@link String } | ||
| 80 | + * | ||
| 81 | + */ | ||
| 82 | + public void setIdenZbh(String value) { | ||
| 83 | + this.idenZbh = value; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 获取idenCph属性的值。 | ||
| 88 | + * | ||
| 89 | + * @return | ||
| 90 | + * possible object is | ||
| 91 | + * {@link String } | ||
| 92 | + * | ||
| 93 | + */ | ||
| 94 | + public String getIdenCph() { | ||
| 95 | + return idenCph; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 设置idenCph属性的值。 | ||
| 100 | + * | ||
| 101 | + * @param value | ||
| 102 | + * allowed object is | ||
| 103 | + * {@link String } | ||
| 104 | + * | ||
| 105 | + */ | ||
| 106 | + public void setIdenCph(String value) { | ||
| 107 | + this.idenCph = value; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * 获取updateGsmc属性的值。 | ||
| 112 | + * | ||
| 113 | + * @return | ||
| 114 | + * possible object is | ||
| 115 | + * {@link String } | ||
| 116 | + * | ||
| 117 | + */ | ||
| 118 | + public String getUpdateGsmc() { | ||
| 119 | + return updateGsmc; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 设置updateGsmc属性的值。 | ||
| 124 | + * | ||
| 125 | + * @param value | ||
| 126 | + * allowed object is | ||
| 127 | + * {@link String } | ||
| 128 | + * | ||
| 129 | + */ | ||
| 130 | + public void setUpdateGsmc(String value) { | ||
| 131 | + this.updateGsmc = value; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 获取updateFgsmc属性的值。 | ||
| 136 | + * | ||
| 137 | + * @return | ||
| 138 | + * possible object is | ||
| 139 | + * {@link String } | ||
| 140 | + * | ||
| 141 | + */ | ||
| 142 | + public String getUpdateFgsmc() { | ||
| 143 | + return updateFgsmc; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 设置updateFgsmc属性的值。 | ||
| 148 | + * | ||
| 149 | + * @param value | ||
| 150 | + * allowed object is | ||
| 151 | + * {@link String } | ||
| 152 | + * | ||
| 153 | + */ | ||
| 154 | + public void setUpdateFgsmc(String value) { | ||
| 155 | + this.updateFgsmc = value; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 获取updateSfbf属性的值。 | ||
| 160 | + * | ||
| 161 | + */ | ||
| 162 | + public boolean isUpdateSfbf() { | ||
| 163 | + return updateSfbf; | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + /** | ||
| 167 | + * 设置updateSfbf属性的值。 | ||
| 168 | + * | ||
| 169 | + */ | ||
| 170 | + public void setUpdateSfbf(boolean value) { | ||
| 171 | + this.updateSfbf = value; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | +} |
src/main/java/com/bsth/service/schedule/batch/webservice/vehiclesync/AddVehicleDataSyncResponse.java
0 → 100644
| 1 | +// | ||
| 2 | +// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的 | ||
| 3 | +// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | ||
| 4 | +// 在重新编译源模式时, 对此文件的所有修改都将丢失。 | ||
| 5 | +// 生成时间: 2020.06.23 时间 03:15:37 PM CST | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +package com.bsth.service.schedule.batch.webservice.vehiclesync; | ||
| 10 | + | ||
| 11 | +import javax.xml.bind.annotation.XmlAccessType; | ||
| 12 | +import javax.xml.bind.annotation.XmlAccessorType; | ||
| 13 | +import javax.xml.bind.annotation.XmlElement; | ||
| 14 | +import javax.xml.bind.annotation.XmlRootElement; | ||
| 15 | +import javax.xml.bind.annotation.XmlType; | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * <p>anonymous complex type的 Java 类。 | ||
| 20 | + * | ||
| 21 | + * <p>以下模式片段指定包含在此类中的预期内容。 | ||
| 22 | + * | ||
| 23 | + * <pre> | ||
| 24 | + * <complexType> | ||
| 25 | + * <complexContent> | ||
| 26 | + * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> | ||
| 27 | + * <sequence> | ||
| 28 | + * <element name="success" type="{http://www.w3.org/2001/XMLSchema}boolean"/> | ||
| 29 | + * <element name="message" type="{http://www.w3.org/2001/XMLSchema}string"/> | ||
| 30 | + * </sequence> | ||
| 31 | + * </restriction> | ||
| 32 | + * </complexContent> | ||
| 33 | + * </complexType> | ||
| 34 | + * </pre> | ||
| 35 | + * | ||
| 36 | + * | ||
| 37 | + */ | ||
| 38 | +@XmlAccessorType(XmlAccessType.FIELD) | ||
| 39 | +@XmlType(name = "", propOrder = { | ||
| 40 | + "success", | ||
| 41 | + "message" | ||
| 42 | +}) | ||
| 43 | +@XmlRootElement(name = "addVehicleDataSyncResponse") | ||
| 44 | +public class AddVehicleDataSyncResponse { | ||
| 45 | + | ||
| 46 | + protected boolean success; | ||
| 47 | + @XmlElement(required = true) | ||
| 48 | + protected String message; | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 获取success属性的值。 | ||
| 52 | + * | ||
| 53 | + */ | ||
| 54 | + public boolean isSuccess() { | ||
| 55 | + return success; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 设置success属性的值。 | ||
| 60 | + * | ||
| 61 | + */ | ||
| 62 | + public void setSuccess(boolean value) { | ||
| 63 | + this.success = value; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 获取message属性的值。 | ||
| 68 | + * | ||
| 69 | + * @return | ||
| 70 | + * possible object is | ||
| 71 | + * {@link String } | ||
| 72 | + * | ||
| 73 | + */ | ||
| 74 | + public String getMessage() { | ||
| 75 | + return message; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 设置message属性的值。 | ||
| 80 | + * | ||
| 81 | + * @param value | ||
| 82 | + * allowed object is | ||
| 83 | + * {@link String } | ||
| 84 | + * | ||
| 85 | + */ | ||
| 86 | + public void setMessage(String value) { | ||
| 87 | + this.message = value; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | +} |
src/main/java/com/bsth/service/schedule/batch/webservice/vehiclesync/ObjectFactory.java
0 → 100644
| 1 | +// | ||
| 2 | +// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的 | ||
| 3 | +// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | ||
| 4 | +// 在重新编译源模式时, 对此文件的所有修改都将丢失。 | ||
| 5 | +// 生成时间: 2020.06.23 时间 03:15:37 PM CST | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | + | ||
| 9 | +package com.bsth.service.schedule.batch.webservice.vehiclesync; | ||
| 10 | + | ||
| 11 | +import javax.xml.bind.annotation.XmlRegistry; | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * This object contains factory methods for each | ||
| 16 | + * Java content interface and Java element interface | ||
| 17 | + * generated in the com.bsth.service.schedule.batch.webservice.vehiclesync package. | ||
| 18 | + * <p>An ObjectFactory allows you to programatically | ||
| 19 | + * construct new instances of the Java representation | ||
| 20 | + * for XML content. The Java representation of XML | ||
| 21 | + * content can consist of schema derived interfaces | ||
| 22 | + * and classes representing the binding of schema | ||
| 23 | + * type definitions, element declarations and model | ||
| 24 | + * groups. Factory methods for each of these are | ||
| 25 | + * provided in this class. | ||
| 26 | + * | ||
| 27 | + */ | ||
| 28 | +@XmlRegistry | ||
| 29 | +public class ObjectFactory { | ||
| 30 | + | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.bsth.service.schedule.batch.webservice.vehiclesync | ||
| 34 | + * | ||
| 35 | + */ | ||
| 36 | + public ObjectFactory() { | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * Create an instance of {@link AddVehicleDataSyncResponse } | ||
| 41 | + * | ||
| 42 | + */ | ||
| 43 | + public AddVehicleDataSyncResponse createAddVehicleDataSyncResponse() { | ||
| 44 | + return new AddVehicleDataSyncResponse(); | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * Create an instance of {@link AddVehicleDataSyncRequest } | ||
| 49 | + * | ||
| 50 | + */ | ||
| 51 | + public AddVehicleDataSyncRequest createAddVehicleDataSyncRequest() { | ||
| 52 | + return new AddVehicleDataSyncRequest(); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | +} |
src/main/java/com/bsth/service/schedule/batch/webservice/vehiclesync/package-info.java
0 → 100644
| 1 | +// | ||
| 2 | +// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.7 生成的 | ||
| 3 | +// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> | ||
| 4 | +// 在重新编译源模式时, 对此文件的所有修改都将丢失。 | ||
| 5 | +// 生成时间: 2020.06.23 时间 03:15:37 PM CST | ||
| 6 | +// | ||
| 7 | + | ||
| 8 | +@javax.xml.bind.annotation.XmlSchema(namespace = "http://bsth.com/service/schedule/batch/webservice/vehicleSync", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) | ||
| 9 | +package com.bsth.service.schedule.batch.webservice.vehiclesync; |
src/main/resources/dubbo/config-dev.properties
| @@ -2,6 +2,9 @@ | @@ -2,6 +2,9 @@ | ||
| 2 | spring.dubbo.application.name=bsth_control_v_multi_service | 2 | spring.dubbo.application.name=bsth_control_v_multi_service |
| 3 | # zookeeper注册中心地址 | 3 | # zookeeper注册中心地址 |
| 4 | spring.dubbo.registry=zookeeper://127.0.0.1:2181 | 4 | spring.dubbo.registry=zookeeper://127.0.0.1:2181 |
| 5 | +# protocol配置 | ||
| 6 | +spring.dubbo.protocol.name=dubbo | ||
| 7 | +spring.dubbo.protocol.port=30881 | ||
| 5 | 8 | ||
| 6 | #----------- dubbo:consumer 性能调优选项 -------------# | 9 | #----------- dubbo:consumer 性能调优选项 -------------# |
| 7 | # 远程服务调用超时时间,单位毫秒,这里设置30分钟 | 10 | # 远程服务调用超时时间,单位毫秒,这里设置30分钟 |
src/main/resources/dubbo/config-prod.properties
| @@ -2,6 +2,9 @@ | @@ -2,6 +2,9 @@ | ||
| 2 | spring.dubbo.application.name=bsth_control_v_multi_service | 2 | spring.dubbo.application.name=bsth_control_v_multi_service |
| 3 | # zookeeper注册中心地址 | 3 | # zookeeper注册中心地址 |
| 4 | spring.dubbo.registry=zookeeper://127.0.0.1:2181 | 4 | spring.dubbo.registry=zookeeper://127.0.0.1:2181 |
| 5 | +# protocol配置 | ||
| 6 | +spring.dubbo.protocol.name=dubbo | ||
| 7 | +spring.dubbo.protocol.port=30881 | ||
| 5 | 8 | ||
| 6 | #----------- dubbo:consumer 性能调优选项 -------------# | 9 | #----------- dubbo:consumer 性能调优选项 -------------# |
| 7 | # 远程服务调用超时时间,单位毫秒,这里设置30分钟 | 10 | # 远程服务调用超时时间,单位毫秒,这里设置30分钟 |
src/main/resources/dubbo/config-prodtest.properties
| @@ -2,6 +2,9 @@ | @@ -2,6 +2,9 @@ | ||
| 2 | spring.dubbo.application.name=bsth_control_v2 | 2 | spring.dubbo.application.name=bsth_control_v2 |
| 3 | # zookeeper注册中心地址 | 3 | # zookeeper注册中心地址 |
| 4 | spring.dubbo.registry=zookeeper://127.0.0.1:2181 | 4 | spring.dubbo.registry=zookeeper://127.0.0.1:2181 |
| 5 | +# protocol配置 | ||
| 6 | +spring.dubbo.protocol.name=dubbo | ||
| 7 | +spring.dubbo.protocol.port=30881 | ||
| 5 | 8 | ||
| 6 | #----------- dubbo:consumer 性能调优选项 -------------# | 9 | #----------- dubbo:consumer 性能调优选项 -------------# |
| 7 | # 远程服务调用超时时间,单位毫秒,这里设置30分钟 | 10 | # 远程服务调用超时时间,单位毫秒,这里设置30分钟 |
src/main/resources/static/pages/forms/calc/calcsingledata.html
| 1 | -<style type="text/css"> | 1 | +<style type="text/css"> |
| 2 | .table-bordered { | 2 | .table-bordered { |
| 3 | border: 1px solid; } | 3 | border: 1px solid; } |
| 4 | .table-bordered > thead > tr > th, | 4 | .table-bordered > thead > tr > th, |
| @@ -40,14 +40,6 @@ | @@ -40,14 +40,6 @@ | ||
| 40 | <span class="item-label" style="width: 80px;">线路: </span> | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> | 41 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 42 | </div> | 42 | </div> |
| 43 | - <div style="display: inline-block; margin-left: 18px;" id="sfdcDiv"> | ||
| 44 | - <span class="item-label" style="width: 80px;">是否电车: </span> | ||
| 45 | - <select class="form-control form-filter " name="sfdc" id="sfdc"> | ||
| 46 | - <option value="">请选择...</option> | ||
| 47 | - <option value="0">否</option> | ||
| 48 | - <option value="1">是</option> | ||
| 49 | - </select> | ||
| 50 | - </div> | ||
| 51 | <div style="margin-top: 10px"></div> | 43 | <div style="margin-top: 10px"></div> |
| 52 | <div style="display: inline-block;margin-left: 3px;"> | 44 | <div style="display: inline-block;margin-left: 3px;"> |
| 53 | <span class="item-label" style="width: 140px;">开始时间: </span> | 45 | <span class="item-label" style="width: 140px;">开始时间: </span> |
| @@ -108,7 +100,6 @@ | @@ -108,7 +100,6 @@ | ||
| 108 | if (!$('body').hasClass('page-sidebar-closed')) | 100 | if (!$('body').hasClass('page-sidebar-closed')) |
| 109 | $('.menu-toggler.sidebar-toggler').click(); | 101 | $('.menu-toggler.sidebar-toggler').click(); |
| 110 | 102 | ||
| 111 | - | ||
| 112 | var d = new Date(); | 103 | var d = new Date(); |
| 113 | d.setTime(d.getTime() - 4*1000*60*60*24); | 104 | d.setTime(d.getTime() - 4*1000*60*60*24); |
| 114 | var year = d.getFullYear(); | 105 | var year = d.getFullYear(); |
| @@ -118,20 +109,13 @@ | @@ -118,20 +109,13 @@ | ||
| 118 | month = "0" + month; | 109 | month = "0" + month; |
| 119 | if(day < 10) | 110 | if(day < 10) |
| 120 | day = "0" + day; | 111 | day = "0" + day; |
| 121 | - var dateTime = year + "-" + month + "-" + day; | ||
| 122 | - $("#startDate").datetimepicker({ | ||
| 123 | - format : 'YYYY-MM-DD', | ||
| 124 | - locale : 'zh-cn', | ||
| 125 | - maxDate : dateTime | ||
| 126 | - }); | ||
| 127 | - $("#endDate").datetimepicker({ | 112 | + |
| 113 | + $("#startDate,#endDate").datetimepicker({ | ||
| 128 | format : 'YYYY-MM-DD', | 114 | format : 'YYYY-MM-DD', |
| 129 | locale : 'zh-cn', | 115 | locale : 'zh-cn', |
| 130 | - maxDate : dateTime | 116 | + maxDate : year + "-" + month + "-" + day |
| 131 | }); | 117 | }); |
| 132 | - $("#startDate").val(dateTime); | ||
| 133 | - $("#endDate").val(dateTime); | ||
| 134 | - | 118 | + $("#startDate,#endDate").val(year + "-" + month + "-" + day); |
| 135 | 119 | ||
| 136 | var fage=false; | 120 | var fage=false; |
| 137 | var xlList; | 121 | var xlList; |
| @@ -211,8 +195,6 @@ | @@ -211,8 +195,6 @@ | ||
| 211 | } | 195 | } |
| 212 | }); | 196 | }); |
| 213 | 197 | ||
| 214 | - $("#sfdcDiv").hide(); | ||
| 215 | - | ||
| 216 | var cont = "驾驶员", cont1 = "", cont2 = "", cont3 = ""; | 198 | var cont = "驾驶员", cont1 = "", cont2 = "", cont3 = ""; |
| 217 | $("#tjtype").on("change",function(){ | 199 | $("#tjtype").on("change",function(){ |
| 218 | if(cont == "驾驶员"){ | 200 | if(cont == "驾驶员"){ |
| @@ -225,13 +207,10 @@ | @@ -225,13 +207,10 @@ | ||
| 225 | cont = $("#tjtype").val(); | 207 | cont = $("#tjtype").val(); |
| 226 | if($("#tjtype").val() == "驾驶员"){ | 208 | if($("#tjtype").val() == "驾驶员"){ |
| 227 | $("#cont").val(cont1); | 209 | $("#cont").val(cont1); |
| 228 | - $("#sfdcDiv").hide(); | ||
| 229 | } else if($("#tjtype").val() == "售票员"){ | 210 | } else if($("#tjtype").val() == "售票员"){ |
| 230 | $("#cont").val(cont2); | 211 | $("#cont").val(cont2); |
| 231 | - $("#sfdcDiv").hide(); | ||
| 232 | } else if($("#tjtype").val() == "车辆自编号"){ | 212 | } else if($("#tjtype").val() == "车辆自编号"){ |
| 233 | $("#cont").val(cont3); | 213 | $("#cont").val(cont3); |
| 234 | - $("#sfdcDiv").show(); | ||
| 235 | } | 214 | } |
| 236 | }); | 215 | }); |
| 237 | 216 | ||
| @@ -252,10 +231,9 @@ | @@ -252,10 +231,9 @@ | ||
| 252 | var fgsdmSing = $("#fgsdmSing").val(); | 231 | var fgsdmSing = $("#fgsdmSing").val(); |
| 253 | var tjtype=$("#tjtype").val(); | 232 | var tjtype=$("#tjtype").val(); |
| 254 | var cont=$("#cont").val(); | 233 | var cont=$("#cont").val(); |
| 255 | - var sfdc=$("#sfdc").val(); | ||
| 256 | var params = {}; | 234 | var params = {}; |
| 257 | var i = layer.load(2); | 235 | var i = layer.load(2); |
| 258 | - $get("/calc_mix/singledatatj",{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,sfdc:sfdc},function(result){ | 236 | + $get("/calc_mix/singledatatj",{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont},function(result){ |
| 259 | layer.close(i); | 237 | layer.close(i); |
| 260 | var singledata = template('singledata',{list:result}); | 238 | var singledata = template('singledata',{list:result}); |
| 261 | // 把渲染好的模版html文本追加到表格中 | 239 | // 把渲染好的模版html文本追加到表格中 |
| @@ -271,12 +249,11 @@ | @@ -271,12 +249,11 @@ | ||
| 271 | var fgsdmSing = $("#fgsdmSing").val(); | 249 | var fgsdmSing = $("#fgsdmSing").val(); |
| 272 | var tjtype=$("#tjtype").val(); | 250 | var tjtype=$("#tjtype").val(); |
| 273 | var cont=$("#cont").val(); | 251 | var cont=$("#cont").val(); |
| 274 | - var sfdc=$("#sfdc").val(); | ||
| 275 | var lineName = $('#line option:selected').text(); | 252 | var lineName = $('#line option:selected').text(); |
| 276 | if(lineName == "全部线路") | 253 | if(lineName == "全部线路") |
| 277 | lineName = $('#fgsdmSing option:selected').text(); | 254 | lineName = $('#fgsdmSing option:selected').text(); |
| 278 | var i = layer.load(2); | 255 | var i = layer.load(2); |
| 279 | - $get('/calc_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,sfdc:sfdc,type:'export',lineName:lineName},function(result){ | 256 | + $get('/calc_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,type:'export',lineName:lineName},function(result){ |
| 280 | var dateTime = ""; | 257 | var dateTime = ""; |
| 281 | if(startDate == endDate){ | 258 | if(startDate == endDate){ |
| 282 | dateTime = moment(startDate).format("YYYYMMDD"); | 259 | dateTime = moment(startDate).format("YYYYMMDD"); |
src/main/resources/static/pages/forms/calc/statisticsDaily.html
| 1 | -<style type="text/css"> | 1 | +<style type="text/css"> |
| 2 | .table-bordered { | 2 | .table-bordered { |
| 3 | border: 1px solid; } | 3 | border: 1px solid; } |
| 4 | .table-bordered > thead > tr > th, | 4 | .table-bordered > thead > tr > th, |
| @@ -150,7 +150,7 @@ | @@ -150,7 +150,7 @@ | ||
| 150 | $('.menu-toggler.sidebar-toggler').click(); | 150 | $('.menu-toggler.sidebar-toggler').click(); |
| 151 | 151 | ||
| 152 | var d = new Date(); | 152 | var d = new Date(); |
| 153 | - d.setTime(d.getTime() - 1*1000*60*60*24); | 153 | + d.setTime(d.getTime() - 4*1000*60*60*24); |
| 154 | var year = d.getFullYear(); | 154 | var year = d.getFullYear(); |
| 155 | var month = d.getMonth() + 1; | 155 | var month = d.getMonth() + 1; |
| 156 | var day = d.getDate(); | 156 | var day = d.getDate(); |
src/main/resources/static/pages/forms/mould/waybill_minhang.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/waybill_minhang_dl.xls
No preview for this file type
src/main/resources/static/pages/home.html
| 1 | -<style> | ||
| 2 | - .system_change_log{ | ||
| 3 | - background: #fff; | ||
| 4 | - color: #666; | ||
| 5 | - box-shadow: 0 5px 15px rgba(0,0,0,0.08); | ||
| 6 | - height: calc(100% + 10px); | ||
| 7 | - margin-top: -10px; | ||
| 8 | - font-size: 14px; | ||
| 9 | - padding: 10px 0 0 15px; | ||
| 10 | - overflow: auto; | ||
| 11 | - } | ||
| 12 | - .system_change_log>ul{ | ||
| 13 | - margin:0px; | ||
| 14 | - list-style:none; | ||
| 15 | - } | ||
| 16 | - | ||
| 17 | - .system_change_log>ul>li.sub_title{ | ||
| 18 | - text-indent: 0; | ||
| 19 | - } | ||
| 20 | - | ||
| 21 | - .system_change_log>ul>li.sub_title>h6{ | ||
| 22 | - font-size: 12px; | ||
| 23 | - font-family: 微软雅黑; | ||
| 24 | - color: #000; | ||
| 25 | - margin-top: 8px; | ||
| 26 | - margin-bottom: 8px; | ||
| 27 | - } | ||
| 28 | - | ||
| 29 | - .system_change_log>ul>li{ | ||
| 30 | - margin: 5px 0; | ||
| 31 | - text-indent: 25px; | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | - .system_change_log .label{ | ||
| 35 | - width: 55px; | ||
| 36 | - display: inline-block; | ||
| 37 | - padding: 0 10px; | ||
| 38 | - line-height: 1.5; | ||
| 39 | - font-size: 12px; | ||
| 40 | - color: #fff; | ||
| 41 | - vertical-align: middle; | ||
| 42 | - white-space: nowrap; | ||
| 43 | - border-radius: 2px !important; | ||
| 44 | - text-transform: uppercase; | ||
| 45 | - text-align: center; | ||
| 46 | - text-indent: 3px; | ||
| 47 | - margin-right: 15px; | ||
| 48 | - } | ||
| 49 | - .system_change_log .label.s_c_add{ | ||
| 50 | - background-color: #32d296; | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - .system_change_log .label.s_c_change{ | ||
| 54 | - background-color: #1e87f0; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - .system_change_log .label.s_c_remove{ | ||
| 58 | - background-color: #faa05a; | ||
| 59 | - } | ||
| 60 | -</style> | ||
| 61 | -<div class="system_change_log"> | ||
| 62 | - <h2 style="text-indent: 35px;margin: 10px 0 5px;">2020-03-12 更新说明 Changelog</h2> | ||
| 63 | - <br><br> | ||
| 64 | - <ul > | ||
| 65 | - <li class="sub_title"><h6>权限管理</h6></li> | ||
| 66 | - <li><span class="label s_c_change">修改</span>1、密码修改加入密码复杂度校验机制</li> | ||
| 67 | - <li class="sub_title"><h6>线调</h6></li> | ||
| 68 | - <li><span class="label s_c_change">新增</span>1、线调页面新增维修上报功能</li> | ||
| 69 | - </ul> | ||
| 70 | - | ||
| 71 | -</div> | ||
| 72 | - | ||
| 73 | -<script type="text/javascript"> | ||
| 74 | - $.ajax({ | ||
| 75 | - url: '/eci/validate_get_destroy_info', | ||
| 76 | - dataType: "json", | ||
| 77 | - success: function(rs) { | ||
| 78 | - if (rs && rs.status === "SUCCESS") { | ||
| 79 | - if (rs.data && rs.data.length && rs.data.length > 0) { | ||
| 80 | - swal({ | ||
| 81 | - title: "人员配置停用信息", | ||
| 82 | - text: rs.data.join("</br>"), | ||
| 83 | - html: true, | ||
| 84 | - type: "warning", | ||
| 85 | - showCancelButton: true, | ||
| 86 | - confirmButtonColor: "RED", | ||
| 87 | - confirmButtonText: "是", | ||
| 88 | - cancelButtonText: "取消" | ||
| 89 | - }); | ||
| 90 | - } | ||
| 91 | - } | ||
| 92 | - } | ||
| 93 | - }); | ||
| 94 | - | ||
| 95 | -</script> | 1 | +<style> |
| 2 | + .system_change_log{ | ||
| 3 | + background: #fff; | ||
| 4 | + color: #666; | ||
| 5 | + box-shadow: 0 5px 15px rgba(0,0,0,0.08); | ||
| 6 | + height: calc(100% + 10px); | ||
| 7 | + margin-top: -10px; | ||
| 8 | + font-size: 14px; | ||
| 9 | + padding: 10px 0 0 15px; | ||
| 10 | + overflow: auto; | ||
| 11 | + } | ||
| 12 | + .system_change_log>ul{ | ||
| 13 | + margin:0px; | ||
| 14 | + list-style:none; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + .system_change_log>ul>li.sub_title{ | ||
| 18 | + text-indent: 0; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + .system_change_log>ul>li.sub_title>h6{ | ||
| 22 | + font-size: 12px; | ||
| 23 | + font-family: 微软雅黑; | ||
| 24 | + color: #000; | ||
| 25 | + margin-top: 8px; | ||
| 26 | + margin-bottom: 8px; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + .system_change_log>ul>li{ | ||
| 30 | + margin: 5px 0; | ||
| 31 | + text-indent: 25px; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + .system_change_log .label{ | ||
| 35 | + width: 55px; | ||
| 36 | + display: inline-block; | ||
| 37 | + padding: 0 10px; | ||
| 38 | + line-height: 1.5; | ||
| 39 | + font-size: 12px; | ||
| 40 | + color: #fff; | ||
| 41 | + vertical-align: middle; | ||
| 42 | + white-space: nowrap; | ||
| 43 | + border-radius: 2px !important; | ||
| 44 | + text-transform: uppercase; | ||
| 45 | + text-align: center; | ||
| 46 | + text-indent: 3px; | ||
| 47 | + margin-right: 15px; | ||
| 48 | + } | ||
| 49 | + .system_change_log .label.s_c_add{ | ||
| 50 | + background-color: #32d296; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + .system_change_log .label.s_c_change{ | ||
| 54 | + background-color: #1e87f0; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + .system_change_log .label.s_c_remove{ | ||
| 58 | + background-color: #faa05a; | ||
| 59 | + } | ||
| 60 | +</style> | ||
| 61 | +<div class="system_change_log"> | ||
| 62 | + <h2 style="text-indent: 35px;margin: 10px 0 5px;">2020-07-30 更新说明 Changelog</h2> | ||
| 63 | + <br><br> | ||
| 64 | + <ul > | ||
| 65 | + <li class="sub_title"><h6>权限管理</h6></li> | ||
| 66 | + <li><span class="label s_c_change">修改</span>1、权限加入分级概念,同级、上级不能操作,如:下级账户不能创建管理员账户</li> | ||
| 67 | + <li><span class="label s_c_change">修改</span>2、权限操作时验证角色信息</li> | ||
| 68 | + <li class="sub_title"><h6>线调</h6></li> | ||
| 69 | + <li><span class="label s_c_change">修改</span>1、轨迹回放版本切换问题修复</li> | ||
| 70 | + <li><span class="label s_c_change">修改</span>2、批量换人换车可能造成某日班次不能清除问题修复</li> | ||
| 71 | + <li><span class="label s_c_change">修改</span>3、调度系统中偶然出现的批量掉线问题修复(调度网关有数据情况)</li> | ||
| 72 | + <li><span class="label s_c_change">修改</span>4、安全驾驶添加了安全检查类别、接口地址调整</li> | ||
| 73 | + <li><span class="label s_c_change">新增</span>5、与服务热线系统对接,可在线调页填写服务投诉信息</li> | ||
| 74 | + <li class="sub_title"><h6>计调</h6></li> | ||
| 75 | + <li><span class="label s_c_change">新增</span>1、人员停用在home.html做弹出框,后台获取当前用户权限下的线路人员配置停用信息</li> | ||
| 76 | + <li><span class="label s_c_change">新增</span>2、人员管理添加金蝶工号显示</li> | ||
| 77 | + <li><span class="label s_c_change">新增</span>3、修改时刻表明细编辑页面,添加班型编辑列,修改相关指令</li> | ||
| 78 | + <li><span class="label s_c_change">修改</span>4、修复时刻表批量修改问题所在</li> | ||
| 79 | + <li><span class="label s_c_change">新增</span>5、添加车辆同步接口web服务</li> | ||
| 80 | + <li><span class="label s_c_change">新增</span>6、调度执勤日报修改人员,车辆时,初始会修改已有车辆人员配置(如套跑某个班次的车辆不一样,初始时会修改)</li> | ||
| 81 | + <li><span class="label s_c_change">修改</span>7、排班明细修改班次时,修改去除工号的前缀</li> | ||
| 82 | + <li class="sub_title"><h6>基础信息</h6></li> | ||
| 83 | + <li><span class="label s_c_change">新增</span>1、添加线路和修改线路时,选择环线或者双向的提示</li> | ||
| 84 | + <li><span class="label s_c_change">新增</span>2、添加站点行业编码字段</li> | ||
| 85 | + </ul> | ||
| 86 | + | ||
| 87 | +</div> | ||
| 88 | + | ||
| 89 | +<script type="text/javascript"> | ||
| 90 | + $.ajax({ | ||
| 91 | + url: '/eci/validate_get_destroy_info', | ||
| 92 | + dataType: "json", | ||
| 93 | + success: function(rs) { | ||
| 94 | + if (rs && rs.status === "SUCCESS") { | ||
| 95 | + if (rs.data && rs.data.length && rs.data.length > 0) { | ||
| 96 | + swal({ | ||
| 97 | + title: "人员配置停用信息", | ||
| 98 | + text: rs.data.join("</br>"), | ||
| 99 | + html: true, | ||
| 100 | + type: "warning", | ||
| 101 | + showCancelButton: true, | ||
| 102 | + confirmButtonColor: "RED", | ||
| 103 | + confirmButtonText: "是", | ||
| 104 | + cancelButtonText: "取消" | ||
| 105 | + }); | ||
| 106 | + } | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + }); | ||
| 110 | + | ||
| 111 | +</script> |
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrate.html
| 1 | -<style type="text/css"> | 1 | +<style type="text/css"> |
| 2 | .table-bordered { | 2 | .table-bordered { |
| 3 | border: 1px solid; } | 3 | border: 1px solid; } |
| 4 | .table-bordered > thead > tr > th, | 4 | .table-bordered > thead > tr > th, |
| @@ -123,7 +123,7 @@ | @@ -123,7 +123,7 @@ | ||
| 123 | 123 | ||
| 124 | 124 | ||
| 125 | var d = new Date(); | 125 | var d = new Date(); |
| 126 | - d.setTime(d.getTime() - 1*1000*60*60*24); | 126 | + //d.setTime(d.getTime() - 1*1000*60*60*24); |
| 127 | var year = d.getFullYear(); | 127 | var year = d.getFullYear(); |
| 128 | var month = d.getMonth() + 1; | 128 | var month = d.getMonth() + 1; |
| 129 | var day = d.getDate(); | 129 | var day = d.getDate(); |
src/main/resources/static/pages/mforms/turnoutrates/calcTurnoutrateZgf.html
| 1 | -<style type="text/css"> | 1 | +<style type="text/css"> |
| 2 | .table-bordered { | 2 | .table-bordered { |
| 3 | border: 1px solid; } | 3 | border: 1px solid; } |
| 4 | .table-bordered > thead > tr > th, | 4 | .table-bordered > thead > tr > th, |
| @@ -113,7 +113,7 @@ | @@ -113,7 +113,7 @@ | ||
| 113 | 113 | ||
| 114 | 114 | ||
| 115 | var d = new Date(); | 115 | var d = new Date(); |
| 116 | - d.setTime(d.getTime() - 1*1000*60*60*24); | 116 | + //d.setTime(d.getTime() - 1*1000*60*60*24); |
| 117 | var year = d.getFullYear(); | 117 | var year = d.getFullYear(); |
| 118 | var month = d.getMonth() + 1; | 118 | var month = d.getMonth() + 1; |
| 119 | var day = d.getDate(); | 119 | var day = d.getDate(); |
src/main/resources/static/pages/permission/user/changePWD.html
| 1 | -<div class="row"> | ||
| 2 | -<div class="col-md-12"> | ||
| 3 | -<!-- BEGIN VALIDATION STATES--> | ||
| 4 | -<div class="portlet light portlet-fit portlet-form bordered"> | ||
| 5 | -<div class="portlet-body"> | ||
| 6 | - <form class="form-horizontal" id="changePWDForm"> | ||
| 7 | - <div class="alert alert-danger display-hide"> | ||
| 8 | - <button class="close" data-close="alert"></button>您的输入有误,请检查下面的输入项 | ||
| 9 | - </div> | ||
| 10 | - <div class="form-group" style="margin-top: 60px"> | ||
| 11 | - <label class="control-label col-md-5">原始密码: | ||
| 12 | - </label> | ||
| 13 | - <div class="col-md-4"> | ||
| 14 | - <div class="input-icon right"> | ||
| 15 | - <i class="fa"></i> | ||
| 16 | - <input type="password" class="form-control" name="oldPWD" /> </div> | ||
| 17 | - </div> | ||
| 18 | - </div> | ||
| 19 | - <div class="form-group"> | ||
| 20 | - <label class="control-label col-md-5">输入新密码: | ||
| 21 | - </label> | ||
| 22 | - <div class="col-md-4"> | ||
| 23 | - <div class="input-icon right"> | ||
| 24 | - <i class="fa"></i> | ||
| 25 | - <input type="password" class="form-control" name="newPWD" id="newPWD"/> </div> | ||
| 26 | - </div> | ||
| 27 | - </div> | ||
| 28 | - <div class="form-group"> | ||
| 29 | - <label class="control-label col-md-5">确认新密码: | ||
| 30 | - </label> | ||
| 31 | - <div class="col-md-4"> | ||
| 32 | - <div class="input-icon right"> | ||
| 33 | - <i class="fa"></i> | ||
| 34 | - <input type="password" class="form-control" name="cnewPWD" /> </div> | ||
| 35 | - </div> | ||
| 36 | - </div> | ||
| 37 | - <div class="form-actions"> | ||
| 38 | - <div class="row"> | ||
| 39 | - <div class="col-md-offset-5 col-md-7"> | ||
| 40 | - <button type="submit" id="confirm" class="btn green">确定</button> | ||
| 41 | - <button type="reset" class="btn default">取消</button> | ||
| 42 | - </div> | ||
| 43 | - </div> | ||
| 44 | - </div> | ||
| 45 | - </form> | ||
| 46 | -</div> | ||
| 47 | -</div> | ||
| 48 | -</div> | ||
| 49 | -</div> | ||
| 50 | - | ||
| 51 | -<script> | ||
| 52 | -$(function(){ | ||
| 53 | - var form = $('#changePWDForm'); | ||
| 54 | - //表单 validate | ||
| 55 | - var error = $('.alert-danger', form); | ||
| 56 | - | ||
| 57 | - $.validator.addMethod("passwordrule", function(value, element) { | ||
| 58 | - //var userblank = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*?[#?!@$%^&*-]).{8,16}$/; | ||
| 59 | - var userblank = /^(?=.*[a-zA-Z])(?=.*\d).{8,16}$/; | ||
| 60 | - return this.optional(element) ||(userblank.test(value)); | ||
| 61 | - }, "需包含字母、数字的8-16位字符"); | ||
| 62 | - | ||
| 63 | - //表单 validate | ||
| 64 | - form.validate({ | ||
| 65 | - errorElement : 'span', | ||
| 66 | - errorClass : 'help-block help-block-error', | ||
| 67 | - focusInvalid : false, | ||
| 68 | - rules : { | ||
| 69 | - 'newPWD' : { | ||
| 70 | - required : true, | ||
| 71 | - minlength: 8, | ||
| 72 | - maxlength: 16, | ||
| 73 | - passwordrule:true | ||
| 74 | - }, | ||
| 75 | - 'cnewPWD' : { | ||
| 76 | - equalTo: '#newPWD' | ||
| 77 | - } | ||
| 78 | - }, | ||
| 79 | - invalidHandler : function(event, validator) { | ||
| 80 | - error.show(); | ||
| 81 | - App.scrollTo(error, -200); | ||
| 82 | - }, | ||
| 83 | - | ||
| 84 | - highlight : function(element) { | ||
| 85 | - $(element).closest('.form-group').addClass('has-error'); | ||
| 86 | - }, | ||
| 87 | - | ||
| 88 | - unhighlight : function(element) { | ||
| 89 | - $(element).closest('.form-group').removeClass('has-error'); | ||
| 90 | - }, | ||
| 91 | - | ||
| 92 | - success : function(label) { | ||
| 93 | - label.closest('.form-group').removeClass('has-error'); | ||
| 94 | - }, | ||
| 95 | - | ||
| 96 | - submitHandler : function(f) { | ||
| 97 | - var params = form.serializeJSON(); | ||
| 98 | - error.hide(); | ||
| 99 | - | ||
| 100 | - var keys; | ||
| 101 | - $.ajax({ | ||
| 102 | - url: "/user/login/jCryptionKey?t="+Math.random(), | ||
| 103 | - type: "Get", | ||
| 104 | - async:false, | ||
| 105 | - data: null, | ||
| 106 | - success: function(data) { | ||
| 107 | - keys = data.publickey; | ||
| 108 | - } | ||
| 109 | - }); | ||
| 110 | - //RSA加密 | ||
| 111 | - var encrypt = new JSEncrypt(); | ||
| 112 | - encrypt.setPublicKey(keys); | ||
| 113 | - params.oldPWD = encrypt.encrypt(params.oldPWD); | ||
| 114 | - params.newPWD = encrypt.encrypt(params.newPWD); | ||
| 115 | - params.cnewPWD = encrypt.encrypt(params.cnewPWD); | ||
| 116 | - $.ajax({ | ||
| 117 | - url: '/user/changePWD', | ||
| 118 | - type: 'POST', | ||
| 119 | - traditional: true, | ||
| 120 | - data: params, | ||
| 121 | - success: function(msg){ | ||
| 122 | - layer.alert(msg); | ||
| 123 | - } | ||
| 124 | - }); | ||
| 125 | - } | ||
| 126 | - }); | ||
| 127 | -}); | 1 | +<div class="row"> |
| 2 | +<div class="col-md-12"> | ||
| 3 | +<!-- BEGIN VALIDATION STATES--> | ||
| 4 | +<div class="portlet light portlet-fit portlet-form bordered"> | ||
| 5 | +<div class="portlet-body"> | ||
| 6 | + <form class="form-horizontal" id="changePWDForm"> | ||
| 7 | + <div class="alert alert-danger display-hide"> | ||
| 8 | + <button class="close" data-close="alert"></button>您的输入有误,请检查下面的输入项 | ||
| 9 | + </div> | ||
| 10 | + <div class="form-group" style="margin-top: 60px"> | ||
| 11 | + <label class="control-label col-md-5">原始密码: | ||
| 12 | + </label> | ||
| 13 | + <div class="col-md-4"> | ||
| 14 | + <div class="input-icon right"> | ||
| 15 | + <i class="fa"></i> | ||
| 16 | + <input type="password" class="form-control" name="oldPWD" /> </div> | ||
| 17 | + </div> | ||
| 18 | + </div> | ||
| 19 | + <div class="form-group"> | ||
| 20 | + <label class="control-label col-md-5">输入新密码: | ||
| 21 | + </label> | ||
| 22 | + <div class="col-md-4"> | ||
| 23 | + <div class="input-icon right"> | ||
| 24 | + <i class="fa"></i> | ||
| 25 | + <input type="password" class="form-control" name="newPWD" id="newPWD"/> </div> | ||
| 26 | + </div> | ||
| 27 | + </div> | ||
| 28 | + <div class="form-group"> | ||
| 29 | + <label class="control-label col-md-5">确认新密码: | ||
| 30 | + </label> | ||
| 31 | + <div class="col-md-4"> | ||
| 32 | + <div class="input-icon right"> | ||
| 33 | + <i class="fa"></i> | ||
| 34 | + <input type="password" class="form-control" name="cnewPWD" /> </div> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + <div class="form-actions"> | ||
| 38 | + <div class="row"> | ||
| 39 | + <div class="col-md-offset-5 col-md-7"> | ||
| 40 | + <button type="submit" id="confirm" class="btn green">确定</button> | ||
| 41 | + <button type="reset" class="btn default">取消</button> | ||
| 42 | + </div> | ||
| 43 | + </div> | ||
| 44 | + </div> | ||
| 45 | + </form> | ||
| 46 | +</div> | ||
| 47 | +</div> | ||
| 48 | +</div> | ||
| 49 | +</div> | ||
| 50 | + | ||
| 51 | +<script> | ||
| 52 | +$(function(){ | ||
| 53 | + var form = $('#changePWDForm'); | ||
| 54 | + //表单 validate | ||
| 55 | + var error = $('.alert-danger', form); | ||
| 56 | + | ||
| 57 | + $.validator.addMethod("passwordrule", function(value, element) { | ||
| 58 | + var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*?[#?!@$%^&*-]).{8,16}$/; | ||
| 59 | + //var reg = /^(?=.*[a-zA-Z])(?=.*\d).{8,16}$/; | ||
| 60 | + return this.optional(element) ||(reg.test(value)); | ||
| 61 | + }, "需包含字母、数字的8-16位字符"); | ||
| 62 | + | ||
| 63 | + //表单 validate | ||
| 64 | + form.validate({ | ||
| 65 | + errorElement : 'span', | ||
| 66 | + errorClass : 'help-block help-block-error', | ||
| 67 | + focusInvalid : false, | ||
| 68 | + rules : { | ||
| 69 | + 'newPWD' : { | ||
| 70 | + required : true, | ||
| 71 | + minlength: 8, | ||
| 72 | + maxlength: 16, | ||
| 73 | + passwordrule:true | ||
| 74 | + }, | ||
| 75 | + 'cnewPWD' : { | ||
| 76 | + equalTo: '#newPWD' | ||
| 77 | + } | ||
| 78 | + }, | ||
| 79 | + invalidHandler : function(event, validator) { | ||
| 80 | + error.show(); | ||
| 81 | + App.scrollTo(error, -200); | ||
| 82 | + }, | ||
| 83 | + | ||
| 84 | + highlight : function(element) { | ||
| 85 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 86 | + }, | ||
| 87 | + | ||
| 88 | + unhighlight : function(element) { | ||
| 89 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 90 | + }, | ||
| 91 | + | ||
| 92 | + success : function(label) { | ||
| 93 | + label.closest('.form-group').removeClass('has-error'); | ||
| 94 | + }, | ||
| 95 | + | ||
| 96 | + submitHandler : function(f) { | ||
| 97 | + var params = form.serializeJSON(); | ||
| 98 | + error.hide(); | ||
| 99 | + | ||
| 100 | + var keys; | ||
| 101 | + $.ajax({ | ||
| 102 | + url: "/user/login/jCryptionKey?t="+Math.random(), | ||
| 103 | + type: "Get", | ||
| 104 | + async:false, | ||
| 105 | + data: null, | ||
| 106 | + success: function(data) { | ||
| 107 | + keys = data.publickey; | ||
| 108 | + } | ||
| 109 | + }); | ||
| 110 | + //RSA加密 | ||
| 111 | + var encrypt = new JSEncrypt(); | ||
| 112 | + encrypt.setPublicKey(keys); | ||
| 113 | + params.oldPWD = encrypt.encrypt(params.oldPWD); | ||
| 114 | + params.newPWD = encrypt.encrypt(params.newPWD); | ||
| 115 | + params.cnewPWD = encrypt.encrypt(params.cnewPWD); | ||
| 116 | + $.ajax({ | ||
| 117 | + url: '/user/changePWD', | ||
| 118 | + type: 'POST', | ||
| 119 | + traditional: true, | ||
| 120 | + data: params, | ||
| 121 | + success: function(msg){ | ||
| 122 | + layer.alert(msg); | ||
| 123 | + } | ||
| 124 | + }); | ||
| 125 | + } | ||
| 126 | + }); | ||
| 127 | +}); | ||
| 128 | </script> | 128 | </script> |
| 129 | \ No newline at end of file | 129 | \ No newline at end of file |
src/main/resources/static/pages/permission/user/forceChangePWD.html
0 → 100644
| 1 | +<div class="row"> | ||
| 2 | +<div class="col-md-12"> | ||
| 3 | +<!-- BEGIN VALIDATION STATES--> | ||
| 4 | +<div class="portlet light portlet-fit portlet-form bordered"> | ||
| 5 | +<div class="portlet-body"> | ||
| 6 | + <form class="form-horizontal" id="forceChangePWDForm"> | ||
| 7 | + <div class="alert alert-danger display-hide"> | ||
| 8 | + <button class="close" data-close="alert"></button>您的输入有误,请检查下面的输入项 | ||
| 9 | + </div> | ||
| 10 | + <div class="form-group" style="margin-top: 60px"> | ||
| 11 | + <label class="control-label col-md-5">原始密码: | ||
| 12 | + </label> | ||
| 13 | + <div class="col-md-4"> | ||
| 14 | + <div class="input-icon right"> | ||
| 15 | + <i class="fa"></i> | ||
| 16 | + <input type="password" class="form-control" name="oldPWD" /> </div> | ||
| 17 | + </div> | ||
| 18 | + </div> | ||
| 19 | + <div class="form-group"> | ||
| 20 | + <label class="control-label col-md-5">输入新密码: | ||
| 21 | + </label> | ||
| 22 | + <div class="col-md-4"> | ||
| 23 | + <div class="input-icon right"> | ||
| 24 | + <i class="fa"></i> | ||
| 25 | + <input type="password" class="form-control" name="newPWD" id="newPWD"/> </div> | ||
| 26 | + </div> | ||
| 27 | + </div> | ||
| 28 | + <div class="form-group"> | ||
| 29 | + <label class="control-label col-md-5">确认新密码: | ||
| 30 | + </label> | ||
| 31 | + <div class="col-md-4"> | ||
| 32 | + <div class="input-icon right"> | ||
| 33 | + <i class="fa"></i> | ||
| 34 | + <input type="password" class="form-control" name="cnewPWD" /> </div> | ||
| 35 | + </div> | ||
| 36 | + </div> | ||
| 37 | + <div class="form-actions"> | ||
| 38 | + <div class="row"> | ||
| 39 | + <div class="col-md-offset-5 col-md-7"> | ||
| 40 | + <button type="submit" id="confirm" class="btn green">确定</button> | ||
| 41 | + </div> | ||
| 42 | + </div> | ||
| 43 | + </div> | ||
| 44 | + </form> | ||
| 45 | +</div> | ||
| 46 | +</div> | ||
| 47 | +</div> | ||
| 48 | +</div> | ||
| 49 | + | ||
| 50 | +<script> | ||
| 51 | +$(function(){ | ||
| 52 | + var form = $('#forceChangePWDForm'); | ||
| 53 | + //表单 validate | ||
| 54 | + var error = $('.alert-danger', form); | ||
| 55 | + | ||
| 56 | + $.validator.addMethod("passwordrule", function(value, element) { | ||
| 57 | + var reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*?[#?!@$%^&*-]).{8,16}$/; | ||
| 58 | + //var reg = /^(?=.*[a-zA-Z])(?=.*\d).{8,16}$/; | ||
| 59 | + return this.optional(element) ||(reg.test(value)); | ||
| 60 | + }, "需包含字母、数字的8-16位字符"); | ||
| 61 | + | ||
| 62 | + //表单 validate | ||
| 63 | + form.validate({ | ||
| 64 | + errorElement : 'span', | ||
| 65 | + errorClass : 'help-block help-block-error', | ||
| 66 | + focusInvalid : false, | ||
| 67 | + rules : { | ||
| 68 | + 'newPWD' : { | ||
| 69 | + required : true, | ||
| 70 | + minlength: 8, | ||
| 71 | + maxlength: 16, | ||
| 72 | + passwordrule:true | ||
| 73 | + }, | ||
| 74 | + 'cnewPWD' : { | ||
| 75 | + equalTo: '#newPWD' | ||
| 76 | + } | ||
| 77 | + }, | ||
| 78 | + invalidHandler : function(event, validator) { | ||
| 79 | + error.show(); | ||
| 80 | + App.scrollTo(error, -200); | ||
| 81 | + }, | ||
| 82 | + | ||
| 83 | + highlight : function(element) { | ||
| 84 | + $(element).closest('.form-group').addClass('has-error'); | ||
| 85 | + }, | ||
| 86 | + | ||
| 87 | + unhighlight : function(element) { | ||
| 88 | + $(element).closest('.form-group').removeClass('has-error'); | ||
| 89 | + }, | ||
| 90 | + | ||
| 91 | + success : function(label) { | ||
| 92 | + label.closest('.form-group').removeClass('has-error'); | ||
| 93 | + }, | ||
| 94 | + | ||
| 95 | + submitHandler : function(f) { | ||
| 96 | + var params = form.serializeJSON(); | ||
| 97 | + error.hide(); | ||
| 98 | + | ||
| 99 | + var keys; | ||
| 100 | + $.ajax({ | ||
| 101 | + url: "/user/login/jCryptionKey?t="+Math.random(), | ||
| 102 | + type: "Get", | ||
| 103 | + async:false, | ||
| 104 | + data: null, | ||
| 105 | + success: function(data) { | ||
| 106 | + keys = data.publickey; | ||
| 107 | + } | ||
| 108 | + }); | ||
| 109 | + //RSA加密 | ||
| 110 | + var encrypt = new JSEncrypt(); | ||
| 111 | + encrypt.setPublicKey(keys); | ||
| 112 | + params.oldPWD = encrypt.encrypt(params.oldPWD); | ||
| 113 | + params.newPWD = encrypt.encrypt(params.newPWD); | ||
| 114 | + params.cnewPWD = encrypt.encrypt(params.cnewPWD); | ||
| 115 | + $.ajax({ | ||
| 116 | + url: '/user/changePWD', | ||
| 117 | + type: 'POST', | ||
| 118 | + traditional: true, | ||
| 119 | + data: params, | ||
| 120 | + success: function(msg){ | ||
| 121 | + layer.close(); | ||
| 122 | + } | ||
| 123 | + }); | ||
| 124 | + } | ||
| 125 | + }); | ||
| 126 | +}); | ||
| 127 | +</script> | ||
| 0 | \ No newline at end of file | 128 | \ No newline at end of file |
src/main/resources/static/pages/report/sheet/intervalCount.html
| @@ -27,54 +27,60 @@ | @@ -27,54 +27,60 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form class="form-inline" action=""> | 29 | <form class="form-inline" action=""> |
| 30 | - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv"> | ||
| 31 | - <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | - <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | ||
| 33 | - </div> | ||
| 34 | - <div style="display: inline-block; margin-left: 28px;" id="fgsdmDiv"> | ||
| 35 | - <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | ||
| 37 | - </div> | ||
| 38 | - <div style="display: inline-block;margin-left: 33px;"> | ||
| 39 | - <span class="item-label" style="width: 80px;">线路: </span> | ||
| 40 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | ||
| 41 | - </div> | ||
| 42 | - <div style="display: inline-block;margin-left: 18px;"> | 30 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv"> |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="gsdm" style="width: 160px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block; margin-left: 20px;" id="fgsdmDiv"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="fgsdm" style="width: 160px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;margin-left: 33px;"> | ||
| 39 | + <span class="item-label" style="width: 80px;">线路: </span> | ||
| 40 | + <select class="form-control" name="line" id="line" style="width: 160px;"></select> | ||
| 41 | + </div> | ||
| 42 | + <div style="display: inline-block;margin-left: 6px;"> | ||
| 43 | <span class="item-label" style="width: 80px;">线路性质: </span> | 43 | <span class="item-label" style="width: 80px;">线路性质: </span> |
| 44 | - <select | ||
| 45 | - class="form-control" name="nature" id="nature" | ||
| 46 | - style="width: 180px;"> | 44 | + <select class="form-control" name="nature" id="nature" style="width: 160px;"> |
| 47 | <option value="0">全部线路</option> | 45 | <option value="0">全部线路</option> |
| 48 | <option value="1" selected="selected">营运线路</option> | 46 | <option value="1" selected="selected">营运线路</option> |
| 49 | <option value="2">非营运线路</option> | 47 | <option value="2">非营运线路</option> |
| 50 | </select> | 48 | </select> |
| 51 | - </div> | ||
| 52 | - <div style="margin-top: 10px"> | 49 | + </div> |
| 50 | + <div style="display: inline-block;margin-left: 20px;"> | ||
| 51 | + <span class="item-label" style="width: 80px;">日期: </span> | ||
| 52 | + <select class="form-control" name="week" id="week" style="width: 160px;"> | ||
| 53 | + <option value="0" selected="selected">全部</option> | ||
| 54 | + <option value="1">周一至周五</option> | ||
| 55 | + <option value="2">周六日</option> | ||
| 56 | + </select> | ||
| 57 | + </div> | ||
| 58 | + <div style="margin-top: 10px"> | ||
| 53 | </div> | 59 | </div> |
| 54 | <div style="display: inline-block;margin-left: 33px;"> | 60 | <div style="display: inline-block;margin-left: 33px;"> |
| 55 | - <span class="item-label" style="width: 80px;">等级: </span> | ||
| 56 | - <select class="form-control" style="width: 180px;" id=levelType> | ||
| 57 | - <option id="levelTypeAll" value="">全部</option> | ||
| 58 | - <option value="A" selected="selected">A级线路</option> | ||
| 59 | - <option value="B">B级线路</option> | ||
| 60 | - <option value="C">C级线路</option> | ||
| 61 | - <option value="D">D级线路</option> | ||
| 62 | - <option value="E">E级线路</option> | ||
| 63 | - </select> | 61 | + <span class="item-label" style="width: 80px;">等级: </span> |
| 62 | + <select class="form-control" style="width: 160px;" id=levelType> | ||
| 63 | + <option id="levelTypeAll" value="">全部</option> | ||
| 64 | + <option value="A" selected="selected">A级线路</option> | ||
| 65 | + <option value="B">B级线路</option> | ||
| 66 | + <option value="C">C级线路</option> | ||
| 67 | + <option value="D">D级线路</option> | ||
| 68 | + <option value="E">E级线路</option> | ||
| 69 | + </select> | ||
| 64 | </div> | 70 | </div> |
| 65 | <div style="display: inline-block;"> | 71 | <div style="display: inline-block;"> |
| 66 | - <span class="item-label" style="width: 80px;margin-left: 14px;">开始时间: </span> | ||
| 67 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | 72 | + <span class="item-label" style="width: 80px;margin-left: 6px;">开始时间: </span> |
| 73 | + <input class="form-control" type="text" id="date" style="width: 160px;"/> | ||
| 68 | </div> | 74 | </div> |
| 69 | <div style="display: inline-block;"> | 75 | <div style="display: inline-block;"> |
| 70 | - <span class="item-label" style="width: 80px;margin-left: 14px;">结束时间: </span> | ||
| 71 | - <input class="form-control" type="text" id="endDate" style="width: 180px;"/> | 76 | + <span class="item-label" style="width: 80px;margin-left: 6px;">结束时间: </span> |
| 77 | + <input class="form-control" type="text" id="endDate" style="width: 160px;"/> | ||
| 72 | </div> | 78 | </div> |
| 73 | 79 | ||
| 74 | <div class="form-group"> | 80 | <div class="form-group"> |
| 75 | <input type="hidden" id="id"/> | 81 | <input type="hidden" id="id"/> |
| 76 | <input type="hidden" id="dataLevel"/> | 82 | <input type="hidden" id="dataLevel"/> |
| 77 | - <input class="btn btn-default" type="button" id="query" value="查询"/> | 83 | + <input class="btn btn-default" type="button" id="query" value="查询" style="margin-left: 2px;"/> |
| 78 | <input class="btn btn-default" type="button" id="export" value="导出" title="导出查询的大间隔情况"/> | 84 | <input class="btn btn-default" type="button" id="export" value="导出" title="导出查询的大间隔情况"/> |
| 79 | <input class="btn btn-default" type="button" id="export2" value="导出全部详情" title="导出查询的全部线路的大间隔详细"/> | 85 | <input class="btn btn-default" type="button" id="export2" value="导出全部详情" title="导出查询的全部线路的大间隔详细"/> |
| 80 | </div> | 86 | </div> |
| @@ -297,8 +303,9 @@ | @@ -297,8 +303,9 @@ | ||
| 297 | var gs=$('#gsdm').val(); | 303 | var gs=$('#gsdm').val(); |
| 298 | var levelType=$('#levelType').val(); | 304 | var levelType=$('#levelType').val(); |
| 299 | var nature=$("#nature").val(); | 305 | var nature=$("#nature").val(); |
| 306 | + var week=$("#week").val(); | ||
| 300 | var i = layer.load(2); | 307 | var i = layer.load(2); |
| 301 | - $get('/calcInterval/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,levelType:levelType,nature:nature,type:'query'},function(result){ | 308 | + $get('/calcInterval/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,levelType:levelType,nature:nature,week:week,type:'query'},function(result){ |
| 302 | // if(levelType=="D"){ | 309 | // if(levelType=="D"){ |
| 303 | // var intervalList_d = template('intervalList_d',{list:result}); | 310 | // var intervalList_d = template('intervalList_d',{list:result}); |
| 304 | // $('#forms_d tbody').html(intervalList_d); | 311 | // $('#forms_d tbody').html(intervalList_d); |
| @@ -334,9 +341,10 @@ | @@ -334,9 +341,10 @@ | ||
| 334 | var date = $("#date").val(); | 341 | var date = $("#date").val(); |
| 335 | var endDate = $("#endDate").val(); | 342 | var endDate = $("#endDate").val(); |
| 336 | var levelType=$(this).data('level'); | 343 | var levelType=$(this).data('level'); |
| 344 | + var week=$("#week").val(); | ||
| 337 | $("#id").val(id); | 345 | $("#id").val(id); |
| 338 | $("#dataLevel").val(levelType); | 346 | $("#dataLevel").val(levelType); |
| 339 | - $get('/calcInterval/listInterval',{line:id,date:date,endDate:endDate,levelType:levelType,type:'query'},function(result){ | 347 | + $get('/calcInterval/listInterval',{line:id,date:date,endDate:endDate,levelType:levelType,week:week,type:'query'},function(result){ |
| 340 | var intervalList = template('intervalList_1',{list:result}); | 348 | var intervalList = template('intervalList_1',{list:result}); |
| 341 | $('#forms_1 tbody').html(intervalList); | 349 | $('#forms_1 tbody').html(intervalList); |
| 342 | $('.btn-intervalList_1').on('click', openIntervalList); | 350 | $('.btn-intervalList_1').on('click', openIntervalList); |
| @@ -427,6 +435,7 @@ | @@ -427,6 +435,7 @@ | ||
| 427 | var gs=$('#gsdm').val(); | 435 | var gs=$('#gsdm').val(); |
| 428 | var levelType=$('#levelType').val(); | 436 | var levelType=$('#levelType').val(); |
| 429 | var nature=$('#nature').val(); | 437 | var nature=$('#nature').val(); |
| 438 | + var week=$("#week").val(); | ||
| 430 | var lineName = $('#line option:selected').text(); | 439 | var lineName = $('#line option:selected').text(); |
| 431 | if(lineName == "全部线路") | 440 | if(lineName == "全部线路") |
| 432 | lineName = $('#fgsdm option:selected').text(); | 441 | lineName = $('#fgsdm option:selected').text(); |
| @@ -434,7 +443,7 @@ | @@ -434,7 +443,7 @@ | ||
| 434 | lineName = $('#gsdm option:selected').text(); | 443 | lineName = $('#gsdm option:selected').text(); |
| 435 | 444 | ||
| 436 | var i = layer.load(2); | 445 | var i = layer.load(2); |
| 437 | - $get('/calcInterval/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,levelType:levelType,nature:nature,type:"export",lineName:lineName},function(result){ | 446 | + $get('/calcInterval/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,levelType:levelType,nature:nature,week:week,type:"export",lineName:lineName},function(result){ |
| 438 | var dateTime = ""; | 447 | var dateTime = ""; |
| 439 | if(date == endDate){ | 448 | if(date == endDate){ |
| 440 | dateTime = moment(date).format("YYYYMMDD"); | 449 | dateTime = moment(date).format("YYYYMMDD"); |
| @@ -462,9 +471,10 @@ | @@ -462,9 +471,10 @@ | ||
| 462 | var nature=$('#nature').val(); | 471 | var nature=$('#nature').val(); |
| 463 | var fgs=$('#fgsdm').val(); | 472 | var fgs=$('#fgsdm').val(); |
| 464 | var gs=$('#gsdm').val(); | 473 | var gs=$('#gsdm').val(); |
| 474 | + var week=$("#week").val(); | ||
| 465 | 475 | ||
| 466 | var i = layer.load(2); | 476 | var i = layer.load(2); |
| 467 | - $get('/calcInterval/exportDetail',{gs:gs,fgs:fgs,line:id,date:date,endDate:endDate,levelType:levelType,nature:nature,type:'export'},function(result){ | 477 | + $get('/calcInterval/exportDetail',{gs:gs,fgs:fgs,line:id,date:date,endDate:endDate,levelType:levelType,nature:nature,week:week,type:'export'},function(result){ |
| 468 | window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")+"大间隔详细"); | 478 | window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")+"大间隔详细"); |
| 469 | layer.close(i); | 479 | layer.close(i); |
| 470 | }); | 480 | }); |
| @@ -475,6 +485,7 @@ | @@ -475,6 +485,7 @@ | ||
| 475 | var date = $("#date").val(); | 485 | var date = $("#date").val(); |
| 476 | var endDate = $("#endDate").val(); | 486 | var endDate = $("#endDate").val(); |
| 477 | var levelType=$("#dataLevel").val(); | 487 | var levelType=$("#dataLevel").val(); |
| 488 | + var week=$("#week").val(); | ||
| 478 | // if(levelType=='D'){ | 489 | // if(levelType=='D'){ |
| 479 | // var i = layer.load(2); | 490 | // var i = layer.load(2); |
| 480 | // $get('/calcSheet/calcListSheet',{line:id,date:date,endDate:endDate,type:'export'},function(result){ | 491 | // $get('/calcSheet/calcListSheet',{line:id,date:date,endDate:endDate,type:'export'},function(result){ |
| @@ -483,7 +494,7 @@ | @@ -483,7 +494,7 @@ | ||
| 483 | // }); | 494 | // }); |
| 484 | // }else{ | 495 | // }else{ |
| 485 | var i = layer.load(2); | 496 | var i = layer.load(2); |
| 486 | - $get('/calcInterval/listInterval',{line:id,date:date,endDate:endDate,levelType:levelType,type:'export'},function(result){ | 497 | + $get('/calcInterval/listInterval',{line:id,date:date,endDate:endDate,levelType:levelType,week:week,type:'export'},function(result){ |
| 487 | window.open("/downloadFile/download?fileName=大间距汇总表"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); | 498 | window.open("/downloadFile/download?fileName=大间距汇总表"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")); |
| 488 | layer.close(i); | 499 | layer.close(i); |
| 489 | }); | 500 | }); |
| @@ -496,8 +507,9 @@ | @@ -496,8 +507,9 @@ | ||
| 496 | var date = $("#date").val(); | 507 | var date = $("#date").val(); |
| 497 | var endDate = $("#endDate").val(); | 508 | var endDate = $("#endDate").val(); |
| 498 | var levelType=$("#dataLevel").val(); | 509 | var levelType=$("#dataLevel").val(); |
| 510 | + var week=$("#week").val(); | ||
| 499 | var i = layer.load(2); | 511 | var i = layer.load(2); |
| 500 | - $get('/calcInterval/exportDetail',{line:id,date:date,endDate:endDate,levelType:levelType,type:'export'},function(result){ | 512 | + $get('/calcInterval/exportDetail',{line:id,date:date,endDate:endDate,levelType:levelType,week:week,type:'export'},function(result){ |
| 501 | window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")+"大间隔详细"); | 513 | window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD")+"大间隔详细"); |
| 502 | layer.close(i); | 514 | layer.close(i); |
| 503 | }); | 515 | }); |
src/main/resources/static/pages/report/sheet/intervalSum.html
| @@ -27,24 +27,32 @@ | @@ -27,24 +27,32 @@ | ||
| 27 | <div class="portlet light porttlet-fit bordered"> | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | <div class="portlet-title"> | 28 | <div class="portlet-title"> |
| 29 | <form class="form-inline" action=""> | 29 | <form class="form-inline" action=""> |
| 30 | - <div style="display: inline-block; margin-left: 42px;" id="gsdmDiv"> | ||
| 31 | - <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | - <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | ||
| 33 | - </div> | ||
| 34 | - <div style="display: inline-block; margin-left: 28px;" id="fgsdmDiv"> | ||
| 35 | - <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | ||
| 37 | - </div> | ||
| 38 | - <div style="display: inline-block;margin-left: 18px;"> | ||
| 39 | - <span class="item-label" style="width: 80px;">线路性质: </span> | ||
| 40 | - <select | ||
| 41 | - class="form-control" name="nature" id="nature" | ||
| 42 | - style="width: 180px;"> | ||
| 43 | - <option value="0" selected="selected">全部线路</option> | ||
| 44 | - <option value="1">营运线路</option> | ||
| 45 | - <option value="2">非营运线路</option> | ||
| 46 | - </select> | ||
| 47 | - </div> | 30 | + <div style="display: inline-block; margin-left: 42px;" id="gsdmDiv"> |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | ||
| 32 | + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | ||
| 33 | + </div> | ||
| 34 | + <div style="display: inline-block; margin-left: 28px;" id="fgsdmDiv"> | ||
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | ||
| 36 | + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | ||
| 37 | + </div> | ||
| 38 | + <div style="display: inline-block;margin-left: 18px;"> | ||
| 39 | + <span class="item-label" style="width: 80px;">线路性质: </span> | ||
| 40 | + <select | ||
| 41 | + class="form-control" name="nature" id="nature" | ||
| 42 | + style="width: 180px;"> | ||
| 43 | + <option value="0">全部线路</option> | ||
| 44 | + <option value="1" selected="selected">营运线路</option> | ||
| 45 | + <option value="2">非营运线路</option> | ||
| 46 | + </select> | ||
| 47 | + </div> | ||
| 48 | + <div style="display: inline-block;margin-left: 20px;"> | ||
| 49 | + <span class="item-label" style="width: 80px;">日期: </span> | ||
| 50 | + <select class="form-control" name="week" id="week" style="width: 160px;"> | ||
| 51 | + <option value="0" selected="selected">全部</option> | ||
| 52 | + <option value="1">周一至周五</option> | ||
| 53 | + <option value="2">周六日</option> | ||
| 54 | + </select> | ||
| 55 | + </div> | ||
| 48 | <div style="margin-top: 10px"> | 56 | <div style="margin-top: 10px"> |
| 49 | </div> | 57 | </div> |
| 50 | <div style="display: inline-block;"> | 58 | <div style="display: inline-block;"> |
| @@ -167,8 +175,10 @@ | @@ -167,8 +175,10 @@ | ||
| 167 | var fgs=$('#fgsdm').val(); | 175 | var fgs=$('#fgsdm').val(); |
| 168 | var gs=$('#gsdm').val(); | 176 | var gs=$('#gsdm').val(); |
| 169 | var nature=$("#nature").val(); | 177 | var nature=$("#nature").val(); |
| 178 | + var week=$("#week").val(); | ||
| 179 | + | ||
| 170 | var i = layer.load(2); | 180 | var i = layer.load(2); |
| 171 | - $get('/calcInterval/sumInterval',{date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,type:'query'},function(result){ | 181 | + $get('/calcInterval/sumInterval',{date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,week:week,type:'query'},function(result){ |
| 172 | var intervalList_sum = template('intervalList_sum',{list:result}); | 182 | var intervalList_sum = template('intervalList_sum',{list:result}); |
| 173 | $('#forms_djg_sum tbody').html(intervalList_sum); | 183 | $('#forms_djg_sum tbody').html(intervalList_sum); |
| 174 | 184 | ||
| @@ -186,12 +196,13 @@ | @@ -186,12 +196,13 @@ | ||
| 186 | var fgs=$('#fgsdm').val(); | 196 | var fgs=$('#fgsdm').val(); |
| 187 | var gs=$('#gsdm').val(); | 197 | var gs=$('#gsdm').val(); |
| 188 | var nature=$('#nature').val(); | 198 | var nature=$('#nature').val(); |
| 199 | + var week=$("#week").val(); | ||
| 189 | var lineName = $('#fgsdm option:selected').text(); | 200 | var lineName = $('#fgsdm option:selected').text(); |
| 190 | if(lineName=="全部分公司") | 201 | if(lineName=="全部分公司") |
| 191 | lineName = $('#gsdm option:selected').text(); | 202 | lineName = $('#gsdm option:selected').text(); |
| 192 | 203 | ||
| 193 | var i = layer.load(2); | 204 | var i = layer.load(2); |
| 194 | - $get('/calcInterval/sumInterval',{date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,type:"export",lineName:lineName},function(result){ | 205 | + $get('/calcInterval/sumInterval',{date:date,endDate:endDate,gs:gs,fgs:fgs,nature:nature,week:week,type:"export",lineName:lineName},function(result){ |
| 195 | var dateTime = ""; | 206 | var dateTime = ""; |
| 196 | if(date == endDate){ | 207 | if(date == endDate){ |
| 197 | dateTime = moment(date).format("YYYYMMDD"); | 208 | dateTime = moment(date).format("YYYYMMDD"); |
src/main/resources/static/pages/scheduleApp/module/common/dts2/scheduleplan/saPlanInfoEdit2.js
| @@ -57,15 +57,15 @@ angular.module('ScheduleApp').directive( | @@ -57,15 +57,15 @@ angular.module('ScheduleApp').directive( | ||
| 57 | var new_dddesc = undefined; // 调度描述 | 57 | var new_dddesc = undefined; // 调度描述 |
| 58 | 58 | ||
| 59 | // 表单值,被赋值的次数 | 59 | // 表单值,被赋值的次数 |
| 60 | - var form_data_assign_count = { | ||
| 61 | - cl1 : 1, | ||
| 62 | - cl2 : 1, | ||
| 63 | - j1 : 1, | ||
| 64 | - j2 : 1, | ||
| 65 | - j3 : 1, | ||
| 66 | - s1 : 1, | ||
| 67 | - s2 : 1, | ||
| 68 | - s3 : 1 | 60 | + var form_data_assign_count = { // 大于1表示已经初始化过了 |
| 61 | + cl1 : -1, | ||
| 62 | + cl2 : -1, | ||
| 63 | + j1 : -1, | ||
| 64 | + j2 : -1, | ||
| 65 | + j3 : -1, | ||
| 66 | + s1 : -1, | ||
| 67 | + s2 : -1, | ||
| 68 | + s3 : -1 | ||
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | return { | 71 | return { |
| @@ -348,18 +348,20 @@ angular.module('ScheduleApp').directive( | @@ -348,18 +348,20 @@ angular.module('ScheduleApp').directive( | ||
| 348 | return scope[ctrlAs].fd.cl1; | 348 | return scope[ctrlAs].fd.cl1; |
| 349 | }, | 349 | }, |
| 350 | function(newValue, oldValue) { | 350 | function(newValue, oldValue) { |
| 351 | - // 初始化new_cl1 | ||
| 352 | - if (newValue.id) { | ||
| 353 | - if (newValue.id && newValue.zbh) { | ||
| 354 | - new_cl1 = newValue.id + "_" + newValue.zbh; | 351 | + if (form_data_assign_count.cl1 > 2) { |
| 352 | + if (newValue.id) { | ||
| 353 | + if (newValue.id && newValue.zbh) { | ||
| 354 | + new_cl1 = newValue.id + "_" + newValue.zbh; | ||
| 355 | + } else { | ||
| 356 | + new_cl1 = undefined; | ||
| 357 | + } | ||
| 355 | } else { | 358 | } else { |
| 356 | new_cl1 = undefined; | 359 | new_cl1 = undefined; |
| 357 | } | 360 | } |
| 358 | - } else { | ||
| 359 | - new_cl1 = undefined; | 361 | + scope[ctrlAs].$$internal_refresh_dsdata_cl(); |
| 360 | } | 362 | } |
| 361 | 363 | ||
| 362 | - scope[ctrlAs].$$internal_refresh_dsdata_cl(); | 364 | + form_data_assign_count.cl1 ++; |
| 363 | }, | 365 | }, |
| 364 | true | 366 | true |
| 365 | ); | 367 | ); |
| @@ -370,18 +372,20 @@ angular.module('ScheduleApp').directive( | @@ -370,18 +372,20 @@ angular.module('ScheduleApp').directive( | ||
| 370 | return scope[ctrlAs].fd.cl2; | 372 | return scope[ctrlAs].fd.cl2; |
| 371 | }, | 373 | }, |
| 372 | function(newValue, oldValue) { | 374 | function(newValue, oldValue) { |
| 373 | - // 初始化new_cl2 | ||
| 374 | - if (newValue.id) { | ||
| 375 | - if (newValue.id && newValue.zbh) { | ||
| 376 | - new_cl2 = newValue.id + "_" + newValue.zbh; | 375 | + if (form_data_assign_count.cl2 > 2) { |
| 376 | + if (newValue.id) { | ||
| 377 | + if (newValue.id && newValue.zbh) { | ||
| 378 | + new_cl2 = newValue.id + "_" + newValue.zbh; | ||
| 379 | + } else { | ||
| 380 | + new_cl2 = undefined; | ||
| 381 | + } | ||
| 377 | } else { | 382 | } else { |
| 378 | new_cl2 = undefined; | 383 | new_cl2 = undefined; |
| 379 | } | 384 | } |
| 380 | - } else { | ||
| 381 | - new_cl2 = undefined; | 385 | + scope[ctrlAs].$$internal_refresh_dsdata_cl(); |
| 382 | } | 386 | } |
| 383 | 387 | ||
| 384 | - scope[ctrlAs].$$internal_refresh_dsdata_cl(); | 388 | + form_data_assign_count.cl2 ++; |
| 385 | }, | 389 | }, |
| 386 | true | 390 | true |
| 387 | ); | 391 | ); |
| @@ -392,19 +396,22 @@ angular.module('ScheduleApp').directive( | @@ -392,19 +396,22 @@ angular.module('ScheduleApp').directive( | ||
| 392 | return scope[ctrlAs].fd.j1; | 396 | return scope[ctrlAs].fd.j1; |
| 393 | }, | 397 | }, |
| 394 | function(newValue, oldValue) { | 398 | function(newValue, oldValue) { |
| 395 | - // 初始化j1 | ||
| 396 | - if (newValue.id) { | ||
| 397 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 398 | - new_j1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 399 | + if (form_data_assign_count.j1 > 2) { |
| 400 | + if (newValue.id) { | ||
| 401 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 402 | + new_j1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 403 | + } else { | ||
| 404 | + new_j1 = undefined; | ||
| 405 | + } | ||
| 399 | } else { | 406 | } else { |
| 400 | new_j1 = undefined; | 407 | new_j1 = undefined; |
| 401 | } | 408 | } |
| 402 | - } else { | ||
| 403 | - new_j1 = undefined; | 409 | + |
| 410 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 411 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 404 | } | 412 | } |
| 405 | 413 | ||
| 406 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 407 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 414 | + form_data_assign_count.j1 ++; |
| 408 | }, | 415 | }, |
| 409 | true | 416 | true |
| 410 | ); | 417 | ); |
| @@ -415,18 +422,22 @@ angular.module('ScheduleApp').directive( | @@ -415,18 +422,22 @@ angular.module('ScheduleApp').directive( | ||
| 415 | return scope[ctrlAs].fd.s1; | 422 | return scope[ctrlAs].fd.s1; |
| 416 | }, | 423 | }, |
| 417 | function(newValue, oldValue) { | 424 | function(newValue, oldValue) { |
| 418 | - // 初始化s1 | ||
| 419 | - if (newValue.id) { | ||
| 420 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 421 | - new_s1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 425 | + if (form_data_assign_count.s1 > 2) { |
| 426 | + if (newValue.id) { | ||
| 427 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 428 | + new_s1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 429 | + } else { | ||
| 430 | + new_s1 = undefined; | ||
| 431 | + } | ||
| 422 | } else { | 432 | } else { |
| 423 | new_s1 = undefined; | 433 | new_s1 = undefined; |
| 424 | } | 434 | } |
| 425 | - } else { | ||
| 426 | - new_s1 = undefined; | 435 | + |
| 436 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 437 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 427 | } | 438 | } |
| 428 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 429 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 439 | + |
| 440 | + form_data_assign_count.s1 ++; | ||
| 430 | }, | 441 | }, |
| 431 | true | 442 | true |
| 432 | ); | 443 | ); |
| @@ -437,19 +448,22 @@ angular.module('ScheduleApp').directive( | @@ -437,19 +448,22 @@ angular.module('ScheduleApp').directive( | ||
| 437 | return scope[ctrlAs].fd.j2; | 448 | return scope[ctrlAs].fd.j2; |
| 438 | }, | 449 | }, |
| 439 | function(newValue, oldValue) { | 450 | function(newValue, oldValue) { |
| 440 | - // 初始化j2 | ||
| 441 | - if (newValue.id) { | ||
| 442 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 443 | - new_j2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 451 | + if (form_data_assign_count.j2 > 2) { |
| 452 | + if (newValue.id) { | ||
| 453 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 454 | + new_j2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 455 | + } else { | ||
| 456 | + new_j2 = undefined; | ||
| 457 | + } | ||
| 444 | } else { | 458 | } else { |
| 445 | new_j2 = undefined; | 459 | new_j2 = undefined; |
| 446 | } | 460 | } |
| 447 | - } else { | ||
| 448 | - new_j2 = undefined; | 461 | + |
| 462 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 463 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 449 | } | 464 | } |
| 450 | 465 | ||
| 451 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 452 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 466 | + form_data_assign_count.j2 ++; |
| 453 | }, | 467 | }, |
| 454 | true | 468 | true |
| 455 | ); | 469 | ); |
| @@ -460,19 +474,22 @@ angular.module('ScheduleApp').directive( | @@ -460,19 +474,22 @@ angular.module('ScheduleApp').directive( | ||
| 460 | return scope[ctrlAs].fd.s2; | 474 | return scope[ctrlAs].fd.s2; |
| 461 | }, | 475 | }, |
| 462 | function(newValue, oldValue) { | 476 | function(newValue, oldValue) { |
| 463 | - // 初始化s2 | ||
| 464 | - if (newValue && newValue.id) { | ||
| 465 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 466 | - new_s2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 477 | + if (form_data_assign_count.s2 > 2) { |
| 478 | + if (newValue && newValue.id) { | ||
| 479 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 480 | + new_s2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 481 | + } else { | ||
| 482 | + new_s2 = undefined; | ||
| 483 | + } | ||
| 467 | } else { | 484 | } else { |
| 468 | new_s2 = undefined; | 485 | new_s2 = undefined; |
| 469 | } | 486 | } |
| 470 | - } else { | ||
| 471 | - new_s2 = undefined; | 487 | + |
| 488 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 489 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 472 | } | 490 | } |
| 473 | 491 | ||
| 474 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 475 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 492 | + form_data_assign_count.s2 ++; |
| 476 | }, | 493 | }, |
| 477 | true | 494 | true |
| 478 | ); | 495 | ); |
| @@ -486,8 +503,8 @@ angular.module('ScheduleApp').directive( | @@ -486,8 +503,8 @@ angular.module('ScheduleApp').directive( | ||
| 486 | if (newValue && newValue.length > 0) { | 503 | if (newValue && newValue.length > 0) { |
| 487 | var j1 = newValue[0].j; | 504 | var j1 = newValue[0].j; |
| 488 | 505 | ||
| 489 | - var cl_ids = []; // 车辆ids数组(有顺序) | ||
| 490 | - var j_s_ids = []; // 驾驶员ids,售票员ids,[{j:id,s:id},...](有顺序) | 506 | + var cl_idFlags = []; // 车辆idFlags数组(有顺序) |
| 507 | + var j_s_idFlags = []; // 驾驶员idFlags,售票员idFlags,[{j:idFlag,s:idFlag},...](有顺序) | ||
| 491 | var addreason = []; // 营运调度的原因 | 508 | var addreason = []; // 营运调度的原因 |
| 492 | var adddesc = []; // 营运导读的备注 | 509 | var adddesc = []; // 营运导读的备注 |
| 493 | var isRepeat = false; | 510 | var isRepeat = false; |
| @@ -553,30 +570,30 @@ angular.module('ScheduleApp').directive( | @@ -553,30 +570,30 @@ angular.module('ScheduleApp').directive( | ||
| 553 | // 车辆处理 | 570 | // 车辆处理 |
| 554 | isRepeat = false; | 571 | isRepeat = false; |
| 555 | if (obj.cl) { | 572 | if (obj.cl) { |
| 556 | - for (i = 0; i < cl_ids.length; i++) { | ||
| 557 | - if (cl_ids[i] == obj.cl) { | 573 | + for (i = 0; i < cl_idFlags.length; i++) { |
| 574 | + if (cl_idFlags[i] == (obj.cl + "_" + obj.clZbh)) { | ||
| 558 | isRepeat = true; | 575 | isRepeat = true; |
| 559 | break; | 576 | break; |
| 560 | } | 577 | } |
| 561 | } | 578 | } |
| 562 | if (!isRepeat) { | 579 | if (!isRepeat) { |
| 563 | - cl_ids.push(obj.cl); | 580 | + cl_idFlags.push(obj.cl + "_" + obj.clZbh); |
| 564 | } | 581 | } |
| 565 | } | 582 | } |
| 566 | 583 | ||
| 567 | // 人员处理(以驾驶员id为主,没有的话,售票员不管了) | 584 | // 人员处理(以驾驶员id为主,没有的话,售票员不管了) |
| 568 | isRepeat = false; | 585 | isRepeat = false; |
| 569 | if (obj.j) { | 586 | if (obj.j) { |
| 570 | - for (i = 0; i < j_s_ids.length; i++) { | ||
| 571 | - if (j_s_ids[i].j == obj.j) { | 587 | + for (i = 0; i < j_s_idFlags.length; i++) { |
| 588 | + if (j_s_idFlags[i].j == (obj.j + "_" + obj.jName + "_" + obj.jGh)) { | ||
| 572 | isRepeat = true; | 589 | isRepeat = true; |
| 573 | break; | 590 | break; |
| 574 | } | 591 | } |
| 575 | } | 592 | } |
| 576 | if (!isRepeat) { | 593 | if (!isRepeat) { |
| 577 | - j_s_ids.push({ | ||
| 578 | - j: obj.j, | ||
| 579 | - s: !obj.s? undefined: obj.s | 594 | + j_s_idFlags.push({ |
| 595 | + j: obj.j + "_" + obj.jName + "_" + obj.jGh, | ||
| 596 | + s: !obj.s? undefined: (obj.s + "_" + obj.sName + "_" + obj.sGh) | ||
| 580 | }); | 597 | }); |
| 581 | } | 598 | } |
| 582 | } | 599 | } |
| @@ -615,25 +632,66 @@ angular.module('ScheduleApp').directive( | @@ -615,25 +632,66 @@ angular.module('ScheduleApp').directive( | ||
| 615 | old_half_bcs = newValue.length / 2; | 632 | old_half_bcs = newValue.length / 2; |
| 616 | 633 | ||
| 617 | // 更新formdata | 634 | // 更新formdata |
| 618 | - for (i = 0; i < cl_ids.length; i++) { // 车辆更新前两辆 | ||
| 619 | - if (i >= 2) { | 635 | + for (i = 0; i < cl_idFlags.length; i++) { // 车辆更新前两辆 |
| 636 | + if (i == 0) { // 第一组车 | ||
| 637 | + scope[ctrlAs].fd["cl1"].id = cl_idFlags[i].split("_")[0]; | ||
| 638 | + new_cl1 = cl_idFlags[i]; | ||
| 639 | + } else if (i == 1) { // 第二组车 | ||
| 640 | + scope[ctrlAs].fd["cl2"].id = cl_idFlags[i].split("_")[0]; | ||
| 641 | + new_cl2 = cl_idFlags[i]; | ||
| 642 | + } else { // 第三组及以上车全部忽略 | ||
| 620 | break; | 643 | break; |
| 621 | - } else { | ||
| 622 | - form_data_assign_count["cl" + (i + 1)] = 0; | ||
| 623 | - scope[ctrlAs].fd["cl" + (i + 1)].id = cl_ids[i]; | ||
| 624 | } | 644 | } |
| 625 | } | 645 | } |
| 626 | - for (i = 0; i < j_s_ids.length; i++) { // 人员更新 | ||
| 627 | - if (i >= 3) { | 646 | + for (i = 0; i < j_s_idFlags.length; i++) { // 人员更新 |
| 647 | + if (i == 0) { // 第一组人员 | ||
| 648 | + scope[ctrlAs].fd["j1"].id = j_s_idFlags[i].j.split("_")[0]; | ||
| 649 | + scope[ctrlAs].fd["s1"].id = j_s_idFlags[i].s && j_s_idFlags[i].s.split("_")[0]; | ||
| 650 | + new_j1 = j_s_idFlags[i].j; | ||
| 651 | + new_s1 = j_s_idFlags[i].s; | ||
| 652 | + | ||
| 653 | + } else if (i == 1) { // 第二组人员 | ||
| 654 | + scope[ctrlAs].fd["j2"].id = j_s_idFlags[i].j.split("_")[0]; | ||
| 655 | + scope[ctrlAs].fd["s2"].id = j_s_idFlags[i].s && j_s_idFlags[i].s.split("_")[0]; | ||
| 656 | + new_j2 = j_s_idFlags[i].j; | ||
| 657 | + new_s2 = j_s_idFlags[i].s; | ||
| 658 | + } else { // 第三组及以上全部忽律 | ||
| 628 | break; | 659 | break; |
| 629 | - } else { | ||
| 630 | - form_data_assign_count["j" + (i + 1)] = 0; | ||
| 631 | - scope[ctrlAs].fd["j" + (i + 1)].id = j_s_ids[i].j; | ||
| 632 | - | ||
| 633 | - form_data_assign_count["s" + (i + 1)] = 0; | ||
| 634 | - scope[ctrlAs].fd["s" + (i + 1)].id = j_s_ids[i].s; | ||
| 635 | } | 660 | } |
| 636 | } | 661 | } |
| 662 | + // 更新form_data_assign_count,有值设置成2,没值设置成3,表示已经从ds处初始化完毕 | ||
| 663 | + if (new_cl1) { | ||
| 664 | + form_data_assign_count["cl1"] = 2; | ||
| 665 | + } else { | ||
| 666 | + form_data_assign_count["cl1"] = 3; | ||
| 667 | + } | ||
| 668 | + if (new_cl2) { | ||
| 669 | + form_data_assign_count["cl2"] = 2; | ||
| 670 | + } else { | ||
| 671 | + form_data_assign_count["cl2"] = 3; | ||
| 672 | + } | ||
| 673 | + if (new_j1) { | ||
| 674 | + form_data_assign_count["j1"] = 2; | ||
| 675 | + } else { | ||
| 676 | + form_data_assign_count["j1"] = 3; | ||
| 677 | + } | ||
| 678 | + if (new_j2) { | ||
| 679 | + form_data_assign_count["j2"] = 2; | ||
| 680 | + } else { | ||
| 681 | + form_data_assign_count["j2"] = 3; | ||
| 682 | + } | ||
| 683 | + if (new_s1) { | ||
| 684 | + form_data_assign_count["s1"] = 2; | ||
| 685 | + } else { | ||
| 686 | + form_data_assign_count["s1"] = 3; | ||
| 687 | + } | ||
| 688 | + if (new_s2) { | ||
| 689 | + form_data_assign_count["s2"] = 2; | ||
| 690 | + } else { | ||
| 691 | + form_data_assign_count["s2"] = 3; | ||
| 692 | + } | ||
| 693 | + | ||
| 694 | + | ||
| 637 | for (i = 0; i < addreason.length; i++) { // 调度原因更新 | 695 | for (i = 0; i < addreason.length; i++) { // 调度原因更新 |
| 638 | if (i > 1) { // 有多个,只更新第一个 | 696 | if (i > 1) { // 有多个,只更新第一个 |
| 639 | break; | 697 | break; |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| @@ -5939,15 +5939,15 @@ angular.module('ScheduleApp').directive( | @@ -5939,15 +5939,15 @@ angular.module('ScheduleApp').directive( | ||
| 5939 | var new_dddesc = undefined; // 调度描述 | 5939 | var new_dddesc = undefined; // 调度描述 |
| 5940 | 5940 | ||
| 5941 | // 表单值,被赋值的次数 | 5941 | // 表单值,被赋值的次数 |
| 5942 | - var form_data_assign_count = { | ||
| 5943 | - cl1 : 1, | ||
| 5944 | - cl2 : 1, | ||
| 5945 | - j1 : 1, | ||
| 5946 | - j2 : 1, | ||
| 5947 | - j3 : 1, | ||
| 5948 | - s1 : 1, | ||
| 5949 | - s2 : 1, | ||
| 5950 | - s3 : 1 | 5942 | + var form_data_assign_count = { // 大于1表示已经初始化过了 |
| 5943 | + cl1 : -1, | ||
| 5944 | + cl2 : -1, | ||
| 5945 | + j1 : -1, | ||
| 5946 | + j2 : -1, | ||
| 5947 | + j3 : -1, | ||
| 5948 | + s1 : -1, | ||
| 5949 | + s2 : -1, | ||
| 5950 | + s3 : -1 | ||
| 5951 | }; | 5951 | }; |
| 5952 | 5952 | ||
| 5953 | return { | 5953 | return { |
| @@ -6230,18 +6230,20 @@ angular.module('ScheduleApp').directive( | @@ -6230,18 +6230,20 @@ angular.module('ScheduleApp').directive( | ||
| 6230 | return scope[ctrlAs].fd.cl1; | 6230 | return scope[ctrlAs].fd.cl1; |
| 6231 | }, | 6231 | }, |
| 6232 | function(newValue, oldValue) { | 6232 | function(newValue, oldValue) { |
| 6233 | - // 初始化new_cl1 | ||
| 6234 | - if (newValue.id) { | ||
| 6235 | - if (newValue.id && newValue.zbh) { | ||
| 6236 | - new_cl1 = newValue.id + "_" + newValue.zbh; | 6233 | + if (form_data_assign_count.cl1 > 2) { |
| 6234 | + if (newValue.id) { | ||
| 6235 | + if (newValue.id && newValue.zbh) { | ||
| 6236 | + new_cl1 = newValue.id + "_" + newValue.zbh; | ||
| 6237 | + } else { | ||
| 6238 | + new_cl1 = undefined; | ||
| 6239 | + } | ||
| 6237 | } else { | 6240 | } else { |
| 6238 | new_cl1 = undefined; | 6241 | new_cl1 = undefined; |
| 6239 | } | 6242 | } |
| 6240 | - } else { | ||
| 6241 | - new_cl1 = undefined; | 6243 | + scope[ctrlAs].$$internal_refresh_dsdata_cl(); |
| 6242 | } | 6244 | } |
| 6243 | 6245 | ||
| 6244 | - scope[ctrlAs].$$internal_refresh_dsdata_cl(); | 6246 | + form_data_assign_count.cl1 ++; |
| 6245 | }, | 6247 | }, |
| 6246 | true | 6248 | true |
| 6247 | ); | 6249 | ); |
| @@ -6252,18 +6254,20 @@ angular.module('ScheduleApp').directive( | @@ -6252,18 +6254,20 @@ angular.module('ScheduleApp').directive( | ||
| 6252 | return scope[ctrlAs].fd.cl2; | 6254 | return scope[ctrlAs].fd.cl2; |
| 6253 | }, | 6255 | }, |
| 6254 | function(newValue, oldValue) { | 6256 | function(newValue, oldValue) { |
| 6255 | - // 初始化new_cl2 | ||
| 6256 | - if (newValue.id) { | ||
| 6257 | - if (newValue.id && newValue.zbh) { | ||
| 6258 | - new_cl2 = newValue.id + "_" + newValue.zbh; | 6257 | + if (form_data_assign_count.cl2 > 2) { |
| 6258 | + if (newValue.id) { | ||
| 6259 | + if (newValue.id && newValue.zbh) { | ||
| 6260 | + new_cl2 = newValue.id + "_" + newValue.zbh; | ||
| 6261 | + } else { | ||
| 6262 | + new_cl2 = undefined; | ||
| 6263 | + } | ||
| 6259 | } else { | 6264 | } else { |
| 6260 | new_cl2 = undefined; | 6265 | new_cl2 = undefined; |
| 6261 | } | 6266 | } |
| 6262 | - } else { | ||
| 6263 | - new_cl2 = undefined; | 6267 | + scope[ctrlAs].$$internal_refresh_dsdata_cl(); |
| 6264 | } | 6268 | } |
| 6265 | 6269 | ||
| 6266 | - scope[ctrlAs].$$internal_refresh_dsdata_cl(); | 6270 | + form_data_assign_count.cl2 ++; |
| 6267 | }, | 6271 | }, |
| 6268 | true | 6272 | true |
| 6269 | ); | 6273 | ); |
| @@ -6274,19 +6278,22 @@ angular.module('ScheduleApp').directive( | @@ -6274,19 +6278,22 @@ angular.module('ScheduleApp').directive( | ||
| 6274 | return scope[ctrlAs].fd.j1; | 6278 | return scope[ctrlAs].fd.j1; |
| 6275 | }, | 6279 | }, |
| 6276 | function(newValue, oldValue) { | 6280 | function(newValue, oldValue) { |
| 6277 | - // 初始化j1 | ||
| 6278 | - if (newValue.id) { | ||
| 6279 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6280 | - new_j1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 6281 | + if (form_data_assign_count.j1 > 2) { |
| 6282 | + if (newValue.id) { | ||
| 6283 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6284 | + new_j1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 6285 | + } else { | ||
| 6286 | + new_j1 = undefined; | ||
| 6287 | + } | ||
| 6281 | } else { | 6288 | } else { |
| 6282 | new_j1 = undefined; | 6289 | new_j1 = undefined; |
| 6283 | } | 6290 | } |
| 6284 | - } else { | ||
| 6285 | - new_j1 = undefined; | 6291 | + |
| 6292 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6293 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 6286 | } | 6294 | } |
| 6287 | 6295 | ||
| 6288 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6289 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 6296 | + form_data_assign_count.j1 ++; |
| 6290 | }, | 6297 | }, |
| 6291 | true | 6298 | true |
| 6292 | ); | 6299 | ); |
| @@ -6297,18 +6304,22 @@ angular.module('ScheduleApp').directive( | @@ -6297,18 +6304,22 @@ angular.module('ScheduleApp').directive( | ||
| 6297 | return scope[ctrlAs].fd.s1; | 6304 | return scope[ctrlAs].fd.s1; |
| 6298 | }, | 6305 | }, |
| 6299 | function(newValue, oldValue) { | 6306 | function(newValue, oldValue) { |
| 6300 | - // 初始化s1 | ||
| 6301 | - if (newValue.id) { | ||
| 6302 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6303 | - new_s1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 6307 | + if (form_data_assign_count.s1 > 2) { |
| 6308 | + if (newValue.id) { | ||
| 6309 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6310 | + new_s1 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 6311 | + } else { | ||
| 6312 | + new_s1 = undefined; | ||
| 6313 | + } | ||
| 6304 | } else { | 6314 | } else { |
| 6305 | new_s1 = undefined; | 6315 | new_s1 = undefined; |
| 6306 | } | 6316 | } |
| 6307 | - } else { | ||
| 6308 | - new_s1 = undefined; | 6317 | + |
| 6318 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6319 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 6309 | } | 6320 | } |
| 6310 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6311 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 6321 | + |
| 6322 | + form_data_assign_count.s1 ++; | ||
| 6312 | }, | 6323 | }, |
| 6313 | true | 6324 | true |
| 6314 | ); | 6325 | ); |
| @@ -6319,19 +6330,22 @@ angular.module('ScheduleApp').directive( | @@ -6319,19 +6330,22 @@ angular.module('ScheduleApp').directive( | ||
| 6319 | return scope[ctrlAs].fd.j2; | 6330 | return scope[ctrlAs].fd.j2; |
| 6320 | }, | 6331 | }, |
| 6321 | function(newValue, oldValue) { | 6332 | function(newValue, oldValue) { |
| 6322 | - // 初始化j2 | ||
| 6323 | - if (newValue.id) { | ||
| 6324 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6325 | - new_j2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 6333 | + if (form_data_assign_count.j2 > 2) { |
| 6334 | + if (newValue.id) { | ||
| 6335 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6336 | + new_j2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 6337 | + } else { | ||
| 6338 | + new_j2 = undefined; | ||
| 6339 | + } | ||
| 6326 | } else { | 6340 | } else { |
| 6327 | new_j2 = undefined; | 6341 | new_j2 = undefined; |
| 6328 | } | 6342 | } |
| 6329 | - } else { | ||
| 6330 | - new_j2 = undefined; | 6343 | + |
| 6344 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6345 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 6331 | } | 6346 | } |
| 6332 | 6347 | ||
| 6333 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6334 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 6348 | + form_data_assign_count.j2 ++; |
| 6335 | }, | 6349 | }, |
| 6336 | true | 6350 | true |
| 6337 | ); | 6351 | ); |
| @@ -6342,19 +6356,22 @@ angular.module('ScheduleApp').directive( | @@ -6342,19 +6356,22 @@ angular.module('ScheduleApp').directive( | ||
| 6342 | return scope[ctrlAs].fd.s2; | 6356 | return scope[ctrlAs].fd.s2; |
| 6343 | }, | 6357 | }, |
| 6344 | function(newValue, oldValue) { | 6358 | function(newValue, oldValue) { |
| 6345 | - // 初始化s2 | ||
| 6346 | - if (newValue && newValue.id) { | ||
| 6347 | - if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6348 | - new_s2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | 6359 | + if (form_data_assign_count.s2 > 2) { |
| 6360 | + if (newValue && newValue.id) { | ||
| 6361 | + if (newValue.id && newValue.name && newValue.jobCode) { | ||
| 6362 | + new_s2 = newValue.id + "_" + newValue.name + "_" + newValue.jobCode; | ||
| 6363 | + } else { | ||
| 6364 | + new_s2 = undefined; | ||
| 6365 | + } | ||
| 6349 | } else { | 6366 | } else { |
| 6350 | new_s2 = undefined; | 6367 | new_s2 = undefined; |
| 6351 | } | 6368 | } |
| 6352 | - } else { | ||
| 6353 | - new_s2 = undefined; | 6369 | + |
| 6370 | + scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6371 | + scope[ctrlAs].$$internal_refresh_dsdata_s(); | ||
| 6354 | } | 6372 | } |
| 6355 | 6373 | ||
| 6356 | - scope[ctrlAs].$$internal_refresh_dsdata_j(); | ||
| 6357 | - scope[ctrlAs].$$internal_refresh_dsdata_s(); | 6374 | + form_data_assign_count.s2 ++; |
| 6358 | }, | 6375 | }, |
| 6359 | true | 6376 | true |
| 6360 | ); | 6377 | ); |
| @@ -6368,8 +6385,8 @@ angular.module('ScheduleApp').directive( | @@ -6368,8 +6385,8 @@ angular.module('ScheduleApp').directive( | ||
| 6368 | if (newValue && newValue.length > 0) { | 6385 | if (newValue && newValue.length > 0) { |
| 6369 | var j1 = newValue[0].j; | 6386 | var j1 = newValue[0].j; |
| 6370 | 6387 | ||
| 6371 | - var cl_ids = []; // 车辆ids数组(有顺序) | ||
| 6372 | - var j_s_ids = []; // 驾驶员ids,售票员ids,[{j:id,s:id},...](有顺序) | 6388 | + var cl_idFlags = []; // 车辆idFlags数组(有顺序) |
| 6389 | + var j_s_idFlags = []; // 驾驶员idFlags,售票员idFlags,[{j:idFlag,s:idFlag},...](有顺序) | ||
| 6373 | var addreason = []; // 营运调度的原因 | 6390 | var addreason = []; // 营运调度的原因 |
| 6374 | var adddesc = []; // 营运导读的备注 | 6391 | var adddesc = []; // 营运导读的备注 |
| 6375 | var isRepeat = false; | 6392 | var isRepeat = false; |
| @@ -6435,30 +6452,30 @@ angular.module('ScheduleApp').directive( | @@ -6435,30 +6452,30 @@ angular.module('ScheduleApp').directive( | ||
| 6435 | // 车辆处理 | 6452 | // 车辆处理 |
| 6436 | isRepeat = false; | 6453 | isRepeat = false; |
| 6437 | if (obj.cl) { | 6454 | if (obj.cl) { |
| 6438 | - for (i = 0; i < cl_ids.length; i++) { | ||
| 6439 | - if (cl_ids[i] == obj.cl) { | 6455 | + for (i = 0; i < cl_idFlags.length; i++) { |
| 6456 | + if (cl_idFlags[i] == (obj.cl + "_" + obj.clZbh)) { | ||
| 6440 | isRepeat = true; | 6457 | isRepeat = true; |
| 6441 | break; | 6458 | break; |
| 6442 | } | 6459 | } |
| 6443 | } | 6460 | } |
| 6444 | if (!isRepeat) { | 6461 | if (!isRepeat) { |
| 6445 | - cl_ids.push(obj.cl); | 6462 | + cl_idFlags.push(obj.cl + "_" + obj.clZbh); |
| 6446 | } | 6463 | } |
| 6447 | } | 6464 | } |
| 6448 | 6465 | ||
| 6449 | // 人员处理(以驾驶员id为主,没有的话,售票员不管了) | 6466 | // 人员处理(以驾驶员id为主,没有的话,售票员不管了) |
| 6450 | isRepeat = false; | 6467 | isRepeat = false; |
| 6451 | if (obj.j) { | 6468 | if (obj.j) { |
| 6452 | - for (i = 0; i < j_s_ids.length; i++) { | ||
| 6453 | - if (j_s_ids[i].j == obj.j) { | 6469 | + for (i = 0; i < j_s_idFlags.length; i++) { |
| 6470 | + if (j_s_idFlags[i].j == (obj.j + "_" + obj.jName + "_" + obj.jGh)) { | ||
| 6454 | isRepeat = true; | 6471 | isRepeat = true; |
| 6455 | break; | 6472 | break; |
| 6456 | } | 6473 | } |
| 6457 | } | 6474 | } |
| 6458 | if (!isRepeat) { | 6475 | if (!isRepeat) { |
| 6459 | - j_s_ids.push({ | ||
| 6460 | - j: obj.j, | ||
| 6461 | - s: !obj.s? undefined: obj.s | 6476 | + j_s_idFlags.push({ |
| 6477 | + j: obj.j + "_" + obj.jName + "_" + obj.jGh, | ||
| 6478 | + s: !obj.s? undefined: (obj.s + "_" + obj.sName + "_" + obj.sGh) | ||
| 6462 | }); | 6479 | }); |
| 6463 | } | 6480 | } |
| 6464 | } | 6481 | } |
| @@ -6497,25 +6514,66 @@ angular.module('ScheduleApp').directive( | @@ -6497,25 +6514,66 @@ angular.module('ScheduleApp').directive( | ||
| 6497 | old_half_bcs = newValue.length / 2; | 6514 | old_half_bcs = newValue.length / 2; |
| 6498 | 6515 | ||
| 6499 | // 更新formdata | 6516 | // 更新formdata |
| 6500 | - for (i = 0; i < cl_ids.length; i++) { // 车辆更新前两辆 | ||
| 6501 | - if (i >= 2) { | 6517 | + for (i = 0; i < cl_idFlags.length; i++) { // 车辆更新前两辆 |
| 6518 | + if (i == 0) { // 第一组车 | ||
| 6519 | + scope[ctrlAs].fd["cl1"].id = cl_idFlags[i].split("_")[0]; | ||
| 6520 | + new_cl1 = cl_idFlags[i]; | ||
| 6521 | + } else if (i == 1) { // 第二组车 | ||
| 6522 | + scope[ctrlAs].fd["cl2"].id = cl_idFlags[i].split("_")[0]; | ||
| 6523 | + new_cl2 = cl_idFlags[i]; | ||
| 6524 | + } else { // 第三组及以上车全部忽略 | ||
| 6502 | break; | 6525 | break; |
| 6503 | - } else { | ||
| 6504 | - form_data_assign_count["cl" + (i + 1)] = 0; | ||
| 6505 | - scope[ctrlAs].fd["cl" + (i + 1)].id = cl_ids[i]; | ||
| 6506 | } | 6526 | } |
| 6507 | } | 6527 | } |
| 6508 | - for (i = 0; i < j_s_ids.length; i++) { // 人员更新 | ||
| 6509 | - if (i >= 3) { | 6528 | + for (i = 0; i < j_s_idFlags.length; i++) { // 人员更新 |
| 6529 | + if (i == 0) { // 第一组人员 | ||
| 6530 | + scope[ctrlAs].fd["j1"].id = j_s_idFlags[i].j.split("_")[0]; | ||
| 6531 | + scope[ctrlAs].fd["s1"].id = j_s_idFlags[i].s && j_s_idFlags[i].s.split("_")[0]; | ||
| 6532 | + new_j1 = j_s_idFlags[i].j; | ||
| 6533 | + new_s1 = j_s_idFlags[i].s; | ||
| 6534 | + | ||
| 6535 | + } else if (i == 1) { // 第二组人员 | ||
| 6536 | + scope[ctrlAs].fd["j2"].id = j_s_idFlags[i].j.split("_")[0]; | ||
| 6537 | + scope[ctrlAs].fd["s2"].id = j_s_idFlags[i].s && j_s_idFlags[i].s.split("_")[0]; | ||
| 6538 | + new_j2 = j_s_idFlags[i].j; | ||
| 6539 | + new_s2 = j_s_idFlags[i].s; | ||
| 6540 | + } else { // 第三组及以上全部忽律 | ||
| 6510 | break; | 6541 | break; |
| 6511 | - } else { | ||
| 6512 | - form_data_assign_count["j" + (i + 1)] = 0; | ||
| 6513 | - scope[ctrlAs].fd["j" + (i + 1)].id = j_s_ids[i].j; | ||
| 6514 | - | ||
| 6515 | - form_data_assign_count["s" + (i + 1)] = 0; | ||
| 6516 | - scope[ctrlAs].fd["s" + (i + 1)].id = j_s_ids[i].s; | ||
| 6517 | } | 6542 | } |
| 6518 | } | 6543 | } |
| 6544 | + // 更新form_data_assign_count,有值设置成2,没值设置成3,表示已经从ds处初始化完毕 | ||
| 6545 | + if (new_cl1) { | ||
| 6546 | + form_data_assign_count["cl1"] = 2; | ||
| 6547 | + } else { | ||
| 6548 | + form_data_assign_count["cl1"] = 3; | ||
| 6549 | + } | ||
| 6550 | + if (new_cl2) { | ||
| 6551 | + form_data_assign_count["cl2"] = 2; | ||
| 6552 | + } else { | ||
| 6553 | + form_data_assign_count["cl2"] = 3; | ||
| 6554 | + } | ||
| 6555 | + if (new_j1) { | ||
| 6556 | + form_data_assign_count["j1"] = 2; | ||
| 6557 | + } else { | ||
| 6558 | + form_data_assign_count["j1"] = 3; | ||
| 6559 | + } | ||
| 6560 | + if (new_j2) { | ||
| 6561 | + form_data_assign_count["j2"] = 2; | ||
| 6562 | + } else { | ||
| 6563 | + form_data_assign_count["j2"] = 3; | ||
| 6564 | + } | ||
| 6565 | + if (new_s1) { | ||
| 6566 | + form_data_assign_count["s1"] = 2; | ||
| 6567 | + } else { | ||
| 6568 | + form_data_assign_count["s1"] = 3; | ||
| 6569 | + } | ||
| 6570 | + if (new_s2) { | ||
| 6571 | + form_data_assign_count["s2"] = 2; | ||
| 6572 | + } else { | ||
| 6573 | + form_data_assign_count["s2"] = 3; | ||
| 6574 | + } | ||
| 6575 | + | ||
| 6576 | + | ||
| 6519 | for (i = 0; i < addreason.length; i++) { // 调度原因更新 | 6577 | for (i = 0; i < addreason.length; i++) { // 调度原因更新 |
| 6520 | if (i > 1) { // 有多个,只更新第一个 | 6578 | if (i > 1) { // 有多个,只更新第一个 |
| 6521 | break; | 6579 | break; |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/info/module.js
| @@ -251,6 +251,19 @@ angular.module("ScheduleApp").controller( | @@ -251,6 +251,19 @@ angular.module("ScheduleApp").controller( | ||
| 251 | // 提交方法 | 251 | // 提交方法 |
| 252 | self.submit = function() { | 252 | self.submit = function() { |
| 253 | // 保存或者更新 | 253 | // 保存或者更新 |
| 254 | + | ||
| 255 | + // 修正工号,去除前缀(如:05-001122,05就是前缀,用 - 分割) | ||
| 256 | + var _jGh = self.schedulePlanInfoForSave.jGh; | ||
| 257 | + if (_jGh) { | ||
| 258 | + _jGh = _jGh.indexOf("-") != -1 ? _jGh.split("-")[1] : _jGh; | ||
| 259 | + self.schedulePlanInfoForSave.jGh = _jGh; | ||
| 260 | + } | ||
| 261 | + var _sGh = self.schedulePlanInfoForSave.sGh; | ||
| 262 | + if (_sGh) { | ||
| 263 | + _sGh = _sGh.indexOf("-") != -1 ? _sGh.split("-")[1] : _sGh; | ||
| 264 | + self.schedulePlanInfoForSave.sGh = _sGh; | ||
| 265 | + } | ||
| 266 | + | ||
| 254 | self.schedulePlanInfoForSave.$save(function() { | 267 | self.schedulePlanInfoForSave.$save(function() { |
| 255 | self.toPlanInfoListPage(); | 268 | self.toPlanInfoListPage(); |
| 256 | }); | 269 | }); |
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/list.html
| @@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
| 71 | </tr> | 71 | </tr> |
| 72 | </thead> | 72 | </thead> |
| 73 | <tbody> | 73 | <tbody> |
| 74 | - <tr ng-repeat="info in ctrl.pageInfo.infos" | 74 | + <tr ng-repeat="info in ctrl.pageInfo.infos track by info.lpName" |
| 75 | ng-class="{odd: true, gradeX: true, info: ctrl.isModify(info), 'row-active': ctrl.isModify(info)}" > | 75 | ng-class="{odd: true, gradeX: true, info: ctrl.isModify(info), 'row-active': ctrl.isModify(info)}" > |
| 76 | <td> | 76 | <td> |
| 77 | <div> | 77 | <div> |
| @@ -128,21 +128,21 @@ | @@ -128,21 +128,21 @@ | ||
| 128 | </div> | 128 | </div> |
| 129 | </td> | 129 | </td> |
| 130 | <td> | 130 | <td> |
| 131 | - <div ng-repeat="clzbh in info.clZbhs"> | 131 | + <div ng-repeat="clzbh in info.clZbhs track by $index"> |
| 132 | <a href="#"> | 132 | <a href="#"> |
| 133 | {{clzbh}} | 133 | {{clzbh}} |
| 134 | </a> | 134 | </a> |
| 135 | </div> | 135 | </div> |
| 136 | </td> | 136 | </td> |
| 137 | <td> | 137 | <td> |
| 138 | - <div ng-repeat="ccsj in info.ccsjs"> | 138 | + <div ng-repeat="ccsj in info.ccsjs track by $index"> |
| 139 | <a href="#"> | 139 | <a href="#"> |
| 140 | {{ccsj}} | 140 | {{ccsj}} |
| 141 | </a> | 141 | </a> |
| 142 | </div> | 142 | </div> |
| 143 | </td> | 143 | </td> |
| 144 | <td> | 144 | <td> |
| 145 | - <div ng-repeat="jcsj in info.jcsjs"> | 145 | + <div ng-repeat="jcsj in info.jcsjs track by $index"> |
| 146 | <a href="#"> | 146 | <a href="#"> |
| 147 | {{jcsj}} | 147 | {{jcsj}} |
| 148 | </a> | 148 | </a> |
| @@ -151,7 +151,7 @@ | @@ -151,7 +151,7 @@ | ||
| 151 | <td class="container-fluid"> | 151 | <td class="container-fluid"> |
| 152 | <div class="row"> | 152 | <div class="row"> |
| 153 | <div style="padding-right: 0px;" class="col-md-6"> | 153 | <div style="padding-right: 0px;" class="col-md-6"> |
| 154 | - <div ng-repeat="jsyname in info.jsyNames"> | 154 | + <div ng-repeat="jsyname in info.jsyNames track by $index"> |
| 155 | <a href="#"> | 155 | <a href="#"> |
| 156 | <i class="fa fa-bus" aria-hidden="true"></i> | 156 | <i class="fa fa-bus" aria-hidden="true"></i> |
| 157 | {{jsyname}} | 157 | {{jsyname}} |
| @@ -159,7 +159,7 @@ | @@ -159,7 +159,7 @@ | ||
| 159 | </div> | 159 | </div> |
| 160 | </div> | 160 | </div> |
| 161 | <div style="padding-left: 0px;" class="col-md-6"> | 161 | <div style="padding-left: 0px;" class="col-md-6"> |
| 162 | - <div ng-repeat="jsygh in info.jsyGhs"> | 162 | + <div ng-repeat="jsygh in info.jsyGhs track by $index"> |
| 163 | <a href="#"> | 163 | <a href="#"> |
| 164 | {{jsygh}} | 164 | {{jsygh}} |
| 165 | </a> | 165 | </a> |
| @@ -170,7 +170,7 @@ | @@ -170,7 +170,7 @@ | ||
| 170 | <td class="container-fluid"> | 170 | <td class="container-fluid"> |
| 171 | <div class="row"> | 171 | <div class="row"> |
| 172 | <div style="padding-right: 0px;" class="col-md-6"> | 172 | <div style="padding-right: 0px;" class="col-md-6"> |
| 173 | - <div ng-repeat="spyname in info.spyNames"> | 173 | + <div ng-repeat="spyname in info.spyNames track by $index"> |
| 174 | <a href="#"> | 174 | <a href="#"> |
| 175 | <i class="fa fa-ticket" aria-hidden="true"></i> | 175 | <i class="fa fa-ticket" aria-hidden="true"></i> |
| 176 | {{spyname}} | 176 | {{spyname}} |
| @@ -178,7 +178,7 @@ | @@ -178,7 +178,7 @@ | ||
| 178 | </div> | 178 | </div> |
| 179 | </div> | 179 | </div> |
| 180 | <div style="padding-left: 0px;" class="col-md-6"> | 180 | <div style="padding-left: 0px;" class="col-md-6"> |
| 181 | - <div ng-repeat="spygh in info.spyGhs"> | 181 | + <div ng-repeat="spygh in info.spyGhs track by $index"> |
| 182 | <a href="#"> | 182 | <a href="#"> |
| 183 | {{spygh}} | 183 | {{spygh}} |
| 184 | </a> | 184 | </a> |
src/main/resources/static/real_control_v2/mapmonitor/js/spatial_data.js
| 1 | -/** 空间数据 */ | ||
| 2 | - | ||
| 3 | -var gb_map_spatial_data = (function () { | ||
| 4 | - | ||
| 5 | - var storage = window.localStorage; | ||
| 6 | - | ||
| 7 | - var activeLines = JSON.parse(storage.getItem('lineControlItems')); | ||
| 8 | - var line_idx = (function () { | ||
| 9 | - var str = ''; | ||
| 10 | - for (var i = 0, item; item = activeLines[i++];) { | ||
| 11 | - str += (',' + item.lineCode); | ||
| 12 | - } | ||
| 13 | - return str.substr(1); | ||
| 14 | - })(); | ||
| 15 | - | ||
| 16 | - var cont = '#spatial-tree-content'; | ||
| 17 | - //线路站点路由数据 | ||
| 18 | - var lineStationArr; | ||
| 19 | - | ||
| 20 | - //停车场数据 | ||
| 21 | - var carparkArr; | ||
| 22 | - | ||
| 23 | - var init = function () { | ||
| 24 | - //加载站点路由数据 | ||
| 25 | - gb_common.$get('/realMap/stationVersionSpatialData', {idx: line_idx}, function (rs) { | ||
| 26 | - var list = rs.list; | ||
| 27 | - $.each(list, function () { | ||
| 28 | - this.lat = this.gLaty; | ||
| 29 | - this.lon = this.gLonx; | ||
| 30 | - delete this.gLaty; | ||
| 31 | - delete this.gLonx; | ||
| 32 | - if(this.shapesType=='d'){ | ||
| 33 | - var calcRs = calcPolygonArea(this.gPolygonGrid); | ||
| 34 | - this._polygonArea = calcRs._polygonArea; | ||
| 35 | - this._gPoints = calcRs._gPoints; | ||
| 36 | - } | ||
| 37 | - }); | ||
| 38 | - //排序 | ||
| 39 | - list.sort(function (a, b) { | ||
| 40 | - return a.stationRouteCode - b.stationRouteCode; | ||
| 41 | - }); | ||
| 42 | - //按线路分组 | ||
| 43 | - lineStationArr = gb_common.groupBy(list, 'lineCode'); | ||
| 44 | - //再按上下行分组 | ||
| 45 | - for (var lineCode in lineStationArr) { | ||
| 46 | - lineStationArr[lineCode] = gb_common.groupBy(lineStationArr[lineCode], 'directions'); | ||
| 47 | - } | ||
| 48 | - | ||
| 49 | - ep.emitLater('station'); | ||
| 50 | - }); | ||
| 51 | - | ||
| 52 | - //加载停车场数据 | ||
| 53 | - gb_common.$get('/realMap/carParkSpatialData', {}, function (rs) { | ||
| 54 | - carparkArr = rs.list; | ||
| 55 | - $.each(carparkArr, function () { | ||
| 56 | - if(this.shapesType=='d'){ | ||
| 57 | - var calcRs = calcPolygonArea(this.gParkPoint); | ||
| 58 | - this._polygonArea = calcRs._polygonArea; | ||
| 59 | - this._gPoints = calcRs._gPoints; | ||
| 60 | - } | ||
| 61 | - }); | ||
| 62 | - ep.emitLater('carpark'); | ||
| 63 | - }); | ||
| 64 | - | ||
| 65 | - var ep = EventProxy.create('station', 'carpark', function () { | ||
| 66 | - $(".real_spatial_panel").resizable({ | ||
| 67 | - maxHeight: '100%', | ||
| 68 | - minHeight: 18 | ||
| 69 | - }); | ||
| 70 | - | ||
| 71 | - //绘制站点路由树 | ||
| 72 | - $('.station-route-tree', cont) | ||
| 73 | - //state插件 状态恢复完成 | ||
| 74 | - .on('state_ready.jstree', function () { | ||
| 75 | - //绑定checkbox状态切换事件 | ||
| 76 | - $(this).on('check_node.jstree uncheck_node.jstree', gb_map_overlay_mge.drawStation); | ||
| 77 | - }) | ||
| 78 | - .on('activate_node.jstree', function (e, n) { | ||
| 79 | - var node = n.node; | ||
| 80 | - if(node.state.checked) | ||
| 81 | - gb_map_overlay_mge._focus_station(node.data); | ||
| 82 | - }) | ||
| 83 | - .jstree({ | ||
| 84 | - 'core': { | ||
| 85 | - 'data': get_st_route_tree_data() | ||
| 86 | - }, | ||
| 87 | - 'checkbox': { | ||
| 88 | - 'keep_selected_style': false, | ||
| 89 | - 'whole_node': false, | ||
| 90 | - 'tie_selection': false | ||
| 91 | - }, | ||
| 92 | - //local storage里的key | ||
| 93 | - 'state': { | ||
| 94 | - 'key': 'jstree_map_station_route' | ||
| 95 | - }, | ||
| 96 | - 'plugins': ['checkbox', 'state'] | ||
| 97 | - }); | ||
| 98 | - | ||
| 99 | - | ||
| 100 | - //停车场 | ||
| 101 | - $('.carpark-panel', cont) | ||
| 102 | - .on('state_ready.jstree', function () { | ||
| 103 | - //绑定checkbox状态切换事件 | ||
| 104 | - $(this).on('check_node.jstree uncheck_node.jstree', gb_map_overlay_mge.drawCarpark); | ||
| 105 | - }) | ||
| 106 | - .on('activate_node.jstree', function (e, n) { | ||
| 107 | - var node = n.node; | ||
| 108 | - if(node.state.checked) | ||
| 109 | - gb_map_overlay_mge._focus_carpark(node.data); | ||
| 110 | - }) | ||
| 111 | - .jstree({ | ||
| 112 | - 'core': { | ||
| 113 | - 'data': get_st_carpark_tree_data() | ||
| 114 | - }, | ||
| 115 | - 'checkbox': { | ||
| 116 | - 'keep_selected_style': false, | ||
| 117 | - 'whole_node': false, | ||
| 118 | - 'tie_selection': false | ||
| 119 | - }, | ||
| 120 | - //local storage里的key | ||
| 121 | - 'state': { | ||
| 122 | - 'key': 'jstree_map_carpark' | ||
| 123 | - }, | ||
| 124 | - 'plugins': ['checkbox', 'state'] | ||
| 125 | - }); | ||
| 126 | - | ||
| 127 | - refresh(); | ||
| 128 | - }); | ||
| 129 | - }; | ||
| 130 | - | ||
| 131 | - //计算多边形面积 | ||
| 132 | - function calcPolygonArea(polygonStr) { | ||
| 133 | - var pStr = polygonStr.substring(9, polygonStr.length - 2); | ||
| 134 | - var array = pStr.split(','); | ||
| 135 | - var newArr=[]; | ||
| 136 | - | ||
| 137 | - //递归去掉闭合的尾 | ||
| 138 | - (function () { | ||
| 139 | - var f = arguments.callee; | ||
| 140 | - var end=array.length - 1; | ||
| 141 | - if(array.length > 1 && array[0] == array[end]){ | ||
| 142 | - array = array.slice(0, end); | ||
| 143 | - f(); | ||
| 144 | - } | ||
| 145 | - })(); | ||
| 146 | - | ||
| 147 | - //去掉连续的重复点 | ||
| 148 | - var last; | ||
| 149 | - $.each(array, function (i, str) { | ||
| 150 | - if(last){ | ||
| 151 | - if(last != str) | ||
| 152 | - newArr.push(str); | ||
| 153 | - } | ||
| 154 | - else | ||
| 155 | - newArr.push(str); | ||
| 156 | - last = str; | ||
| 157 | - }); | ||
| 158 | - | ||
| 159 | - var gPoints=[],ts; | ||
| 160 | - $.each(newArr, function (i, c) { | ||
| 161 | - ts=c.split(' '); | ||
| 162 | - gPoints.push({ | ||
| 163 | - lat: parseFloat(ts[1]), | ||
| 164 | - lng: parseFloat(ts[0]) | ||
| 165 | - }); | ||
| 166 | - }); | ||
| 167 | - | ||
| 168 | - //用百度geo工具库计算面积 | ||
| 169 | - var _polygonArea = BMapLib.GeoUtils.getPolygonArea(gPoints); | ||
| 170 | - return {_polygonArea: _polygonArea.toFixed(2), _gPoints: gPoints}; | ||
| 171 | - } | ||
| 172 | - | ||
| 173 | - var refresh = function (type, checked) { | ||
| 174 | - if (!triggerElem()) | ||
| 175 | - return; | ||
| 176 | - | ||
| 177 | - if ((type == 'carPark' && checked) || (type == 'station' && !checked)) { | ||
| 178 | - //显示停车场面板 | ||
| 179 | - $('.car-park-item', cont).addClass('uk-active'); | ||
| 180 | - $('li.cp-tab-btn', '.real_spatial_panel').addClass('uk-active'); | ||
| 181 | - $('.carpark-panel', cont).jstree(true).check_all(); | ||
| 182 | - | ||
| 183 | - //绘制停车场 | ||
| 184 | - gb_map_overlay_mge.drawCarpark(); | ||
| 185 | - } | ||
| 186 | - else { | ||
| 187 | - //显示站点路由面板 | ||
| 188 | - $('.station-route-item', cont).addClass('uk-active'); | ||
| 189 | - $('li.sr-tab-btn', '.real_spatial_panel').addClass('uk-active'); | ||
| 190 | - | ||
| 191 | - //选中相关站点路由树 | ||
| 192 | - var chs = gb_map_overlay_mge.getCheckedDevice(); | ||
| 193 | - var idx = {}; | ||
| 194 | - $.each(chs, function () { | ||
| 195 | - idx[this.data.lineId + '_' + this.data.upDown] = 1; | ||
| 196 | - }); | ||
| 197 | - | ||
| 198 | - var treeObj = $('.station-route-tree', cont).jstree(true); | ||
| 199 | - for (var id in idx) { | ||
| 200 | - treeObj.check_node(treeObj.get_node(id + '_st')); | ||
| 201 | - } | ||
| 202 | - | ||
| 203 | - //drawStation(); | ||
| 204 | - gb_map_overlay_mge.drawStation(); | ||
| 205 | - } | ||
| 206 | - } | ||
| 207 | - | ||
| 208 | - var triggerElem = function () { | ||
| 209 | - var config = gb_map_config.getConfig().spatialData; | ||
| 210 | - | ||
| 211 | - if(config.station || config.carPark){ | ||
| 212 | - showPanel(); | ||
| 213 | - return true; | ||
| 214 | - } | ||
| 215 | - hidePanel(); | ||
| 216 | - //gb_map_imap.call('hideAllStationMarker'); | ||
| 217 | - //gb_map_imap.call('hideDrawCarpark'); | ||
| 218 | - return false; | ||
| 219 | - } | ||
| 220 | - | ||
| 221 | - var animationend = 'webkitAnimationEnd animationend'; | ||
| 222 | - var showPanel = function () { | ||
| 223 | - var elem = $('.real_spatial_panel'); | ||
| 224 | - var config = gb_map_config.getConfig().spatialData; | ||
| 225 | - | ||
| 226 | - if (config.station && config.carPark) { | ||
| 227 | - anim_show($('.uk-subnav', elem), 'uk-animation-scale-up'); | ||
| 228 | - $('.real_spatial_body', elem).addClass('show-tab'); | ||
| 229 | - } | ||
| 230 | - else { | ||
| 231 | - $('.uk-subnav', elem).hide(); | ||
| 232 | - $('.real_spatial_body', elem).removeClass('show-tab'); | ||
| 233 | - } | ||
| 234 | - | ||
| 235 | - $('li.uk-active', elem).removeClass('uk-active'); | ||
| 236 | - | ||
| 237 | - if (!elem.is(":hidden")) | ||
| 238 | - return; | ||
| 239 | - | ||
| 240 | - anim_show(elem, 'uk-animation-slide-left'); | ||
| 241 | - } | ||
| 242 | - | ||
| 243 | - var hidePanel = function () { | ||
| 244 | - var elem = $('.real_spatial_panel'); | ||
| 245 | - elem.hide(); | ||
| 246 | - } | ||
| 247 | - | ||
| 248 | - function anim_show(e, anim) { | ||
| 249 | - e.addClass(anim).show().one(animationend, function () { | ||
| 250 | - $(this).removeClass(anim); | ||
| 251 | - }); | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - function getCheckedStation() { | ||
| 255 | - var list = []; | ||
| 256 | - var chs = $('.station-route-tree', cont).jstree(true).get_checked(true); | ||
| 257 | - chs = chs.filter(function (item) { | ||
| 258 | - return item.data; | ||
| 259 | - }); | ||
| 260 | - $.each(chs, function () { | ||
| 261 | - list.push(this.data); | ||
| 262 | - }); | ||
| 263 | - return list; | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - function gteCheckedCarpark() { | ||
| 267 | - var list = []; | ||
| 268 | - var chs = $('.carpark-panel', cont).jstree(true).get_checked(true); | ||
| 269 | - $.each(chs, function () { | ||
| 270 | - list.push(this.data); | ||
| 271 | - }); | ||
| 272 | - return list; | ||
| 273 | - } | ||
| 274 | - | ||
| 275 | - var get_st_route_tree_data = function () { | ||
| 276 | - var treeData = []; | ||
| 277 | - | ||
| 278 | - for (var lineCode in lineStationArr) { | ||
| 279 | - name = gb_data_basic.codeToLine[lineCode].name; | ||
| 280 | - treeData.push({ | ||
| 281 | - 'text': name, | ||
| 282 | - 'open': true, | ||
| 283 | - 'children': [ | ||
| 284 | - { | ||
| 285 | - 'text': '上行', | ||
| 286 | - 'children': grabs(lineStationArr[lineCode][0]), | ||
| 287 | - 'id': lineCode + '_0_st' | ||
| 288 | - }, | ||
| 289 | - { | ||
| 290 | - 'text': '下行', | ||
| 291 | - 'children': grabs(lineStationArr[lineCode][1]), | ||
| 292 | - 'id': lineCode + '_1_st' | ||
| 293 | - } | ||
| 294 | - ] | ||
| 295 | - }) | ||
| 296 | - } | ||
| 297 | - return treeData; | ||
| 298 | - }; | ||
| 299 | - var get_st_route_tree_data_version = function () { | ||
| 300 | - var treeData = []; | ||
| 301 | - | ||
| 302 | - for (var lineCode in lineVersionStationArr) { | ||
| 303 | - name = gb_data_basic.codeToLine[lineCode].name; | ||
| 304 | - treeData.push({ | ||
| 305 | - 'text': name, | ||
| 306 | - 'open': true, | ||
| 307 | - 'children': [ | ||
| 308 | - { | ||
| 309 | - 'text': '上行', | ||
| 310 | - 'children': grabs(lineVersionStationArr[lineCode][0]), | ||
| 311 | - 'id': lineCode + '_0_st' | ||
| 312 | - }, | ||
| 313 | - { | ||
| 314 | - 'text': '下行', | ||
| 315 | - 'children': grabs(lineVersionStationArr[lineCode][1]), | ||
| 316 | - 'id': lineCode + '_1_st' | ||
| 317 | - } | ||
| 318 | - ] | ||
| 319 | - }) | ||
| 320 | - } | ||
| 321 | - return treeData; | ||
| 322 | - }; | ||
| 323 | - var get_st_carpark_tree_data = function () { | ||
| 324 | - var treeData = []; | ||
| 325 | - | ||
| 326 | - $.each(carparkArr, function () { | ||
| 327 | - treeData.push({ | ||
| 328 | - 'text': this.parkName, | ||
| 329 | - 'data': this | ||
| 330 | - }); | ||
| 331 | - }); | ||
| 332 | - | ||
| 333 | - return treeData; | ||
| 334 | - } | ||
| 335 | - | ||
| 336 | - var grabs = function (array) { | ||
| 337 | - if (!array) | ||
| 338 | - return; | ||
| 339 | - var rs = []; | ||
| 340 | - $.each(array, function () { | ||
| 341 | - rs.push({ | ||
| 342 | - 'text': this.stationName, | ||
| 343 | - 'data': this, | ||
| 344 | - 'icon': false | ||
| 345 | - }); | ||
| 346 | - }); | ||
| 347 | - return rs; | ||
| 348 | - } | ||
| 349 | - | ||
| 350 | - return { | ||
| 351 | - refresh: refresh, | ||
| 352 | - init: init, | ||
| 353 | - getCheckedStation:getCheckedStation, | ||
| 354 | - gteCheckedCarpark: gteCheckedCarpark, | ||
| 355 | - getStationArray: function (lineCode) { | ||
| 356 | - return lineStationArr[lineCode]; | ||
| 357 | - }, | ||
| 358 | - carparkArray: function () { | ||
| 359 | - return carparkArr; | ||
| 360 | - } | ||
| 361 | - }; | 1 | +/** 空间数据 */ |
| 2 | + | ||
| 3 | +var gb_map_spatial_data = (function () { | ||
| 4 | + | ||
| 5 | + var storage = window.localStorage; | ||
| 6 | + | ||
| 7 | + var activeLines = JSON.parse(storage.getItem('lineControlItems')); | ||
| 8 | + var line_idx = (function () { | ||
| 9 | + var str = ''; | ||
| 10 | + for (var i = 0, item; item = activeLines[i++];) { | ||
| 11 | + str += (',' + item.lineCode); | ||
| 12 | + } | ||
| 13 | + return str.substr(1); | ||
| 14 | + })(); | ||
| 15 | + | ||
| 16 | + var cont = '#spatial-tree-content'; | ||
| 17 | + //线路站点路由数据 | ||
| 18 | + var lineStationArr, currentLineStationArr; | ||
| 19 | + | ||
| 20 | + //停车场数据 | ||
| 21 | + var carparkArr; | ||
| 22 | + | ||
| 23 | + var init = function () { | ||
| 24 | + | ||
| 25 | + //加载各线路当前版本站点路由数据 | ||
| 26 | + gb_common.$get('/realMap/stationSpatialData', {idx: line_idx}, function (rs) { | ||
| 27 | + var list = rs.list; | ||
| 28 | + $.each(list, function () { | ||
| 29 | + this.lat = this.gLaty; | ||
| 30 | + this.lon = this.gLonx; | ||
| 31 | + delete this.gLaty; | ||
| 32 | + delete this.gLonx; | ||
| 33 | + if(this.shapesType=='d'){ | ||
| 34 | + var calcRs = calcPolygonArea(this.gPolygonGrid); | ||
| 35 | + this._polygonArea = calcRs._polygonArea; | ||
| 36 | + this._gPoints = calcRs._gPoints; | ||
| 37 | + } | ||
| 38 | + }); | ||
| 39 | + //排序 | ||
| 40 | + list.sort(function (a, b) { | ||
| 41 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 42 | + }); | ||
| 43 | + //按线路分组 | ||
| 44 | + currentLineStationArr = gb_common.groupBy(list, 'lineCode'); | ||
| 45 | + //再按上下行分组 | ||
| 46 | + for (var lineCode in currentLineStationArr) { | ||
| 47 | + currentLineStationArr[lineCode] = gb_common.groupBy(currentLineStationArr[lineCode], 'directions'); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + ep.emitLater('currentstation'); | ||
| 51 | + }); | ||
| 52 | + | ||
| 53 | + //加载各线路所有版本站点路由数据(轨迹回放时用) | ||
| 54 | + gb_common.$get('/realMap/stationVersionSpatialData', {idx: line_idx}, function (rs) { | ||
| 55 | + var list = rs.list; | ||
| 56 | + $.each(list, function () { | ||
| 57 | + this.lat = this.gLaty; | ||
| 58 | + this.lon = this.gLonx; | ||
| 59 | + delete this.gLaty; | ||
| 60 | + delete this.gLonx; | ||
| 61 | + if(this.shapesType=='d'){ | ||
| 62 | + var calcRs = calcPolygonArea(this.gPolygonGrid); | ||
| 63 | + this._polygonArea = calcRs._polygonArea; | ||
| 64 | + this._gPoints = calcRs._gPoints; | ||
| 65 | + } | ||
| 66 | + }); | ||
| 67 | + //排序 | ||
| 68 | + list.sort(function (a, b) { | ||
| 69 | + return a.stationRouteCode - b.stationRouteCode; | ||
| 70 | + }); | ||
| 71 | + //按线路分组 | ||
| 72 | + lineStationArr = gb_common.groupBy(list, 'lineCode'); | ||
| 73 | + //再按上下行分组 | ||
| 74 | + for (var lineCode in lineStationArr) { | ||
| 75 | + lineStationArr[lineCode] = gb_common.groupBy(lineStationArr[lineCode], 'directions'); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + ep.emitLater('station'); | ||
| 79 | + }); | ||
| 80 | + | ||
| 81 | + //加载停车场数据 | ||
| 82 | + gb_common.$get('/realMap/carParkSpatialData', {}, function (rs) { | ||
| 83 | + carparkArr = rs.list; | ||
| 84 | + $.each(carparkArr, function () { | ||
| 85 | + if(this.shapesType=='d'){ | ||
| 86 | + var calcRs = calcPolygonArea(this.gParkPoint); | ||
| 87 | + this._polygonArea = calcRs._polygonArea; | ||
| 88 | + this._gPoints = calcRs._gPoints; | ||
| 89 | + } | ||
| 90 | + }); | ||
| 91 | + ep.emitLater('carpark'); | ||
| 92 | + }); | ||
| 93 | + | ||
| 94 | + var ep = EventProxy.create('currentstation', 'station', 'carpark', function () { | ||
| 95 | + $(".real_spatial_panel").resizable({ | ||
| 96 | + maxHeight: '100%', | ||
| 97 | + minHeight: 18 | ||
| 98 | + }); | ||
| 99 | + | ||
| 100 | + //绘制站点路由树 | ||
| 101 | + $('.station-route-tree', cont) | ||
| 102 | + //state插件 状态恢复完成 | ||
| 103 | + .on('state_ready.jstree', function () { | ||
| 104 | + //绑定checkbox状态切换事件 | ||
| 105 | + $(this).on('check_node.jstree uncheck_node.jstree', gb_map_overlay_mge.drawStation); | ||
| 106 | + }) | ||
| 107 | + .on('activate_node.jstree', function (e, n) { | ||
| 108 | + var node = n.node; | ||
| 109 | + if(node.state.checked) | ||
| 110 | + gb_map_overlay_mge._focus_station(node.data); | ||
| 111 | + }) | ||
| 112 | + .jstree({ | ||
| 113 | + 'core': { | ||
| 114 | + 'data': get_st_route_tree_data() | ||
| 115 | + }, | ||
| 116 | + 'checkbox': { | ||
| 117 | + 'keep_selected_style': false, | ||
| 118 | + 'whole_node': false, | ||
| 119 | + 'tie_selection': false | ||
| 120 | + }, | ||
| 121 | + //local storage里的key | ||
| 122 | + 'state': { | ||
| 123 | + 'key': 'jstree_map_station_route' | ||
| 124 | + }, | ||
| 125 | + 'plugins': ['checkbox', 'state'] | ||
| 126 | + }); | ||
| 127 | + | ||
| 128 | + | ||
| 129 | + //停车场 | ||
| 130 | + $('.carpark-panel', cont) | ||
| 131 | + .on('state_ready.jstree', function () { | ||
| 132 | + //绑定checkbox状态切换事件 | ||
| 133 | + $(this).on('check_node.jstree uncheck_node.jstree', gb_map_overlay_mge.drawCarpark); | ||
| 134 | + }) | ||
| 135 | + .on('activate_node.jstree', function (e, n) { | ||
| 136 | + var node = n.node; | ||
| 137 | + if(node.state.checked) | ||
| 138 | + gb_map_overlay_mge._focus_carpark(node.data); | ||
| 139 | + }) | ||
| 140 | + .jstree({ | ||
| 141 | + 'core': { | ||
| 142 | + 'data': get_st_carpark_tree_data() | ||
| 143 | + }, | ||
| 144 | + 'checkbox': { | ||
| 145 | + 'keep_selected_style': false, | ||
| 146 | + 'whole_node': false, | ||
| 147 | + 'tie_selection': false | ||
| 148 | + }, | ||
| 149 | + //local storage里的key | ||
| 150 | + 'state': { | ||
| 151 | + 'key': 'jstree_map_carpark' | ||
| 152 | + }, | ||
| 153 | + 'plugins': ['checkbox', 'state'] | ||
| 154 | + }); | ||
| 155 | + | ||
| 156 | + refresh(); | ||
| 157 | + }); | ||
| 158 | + }; | ||
| 159 | + | ||
| 160 | + //计算多边形面积 | ||
| 161 | + function calcPolygonArea(polygonStr) { | ||
| 162 | + var pStr = polygonStr.substring(9, polygonStr.length - 2); | ||
| 163 | + var array = pStr.split(','); | ||
| 164 | + var newArr=[]; | ||
| 165 | + | ||
| 166 | + //递归去掉闭合的尾 | ||
| 167 | + (function () { | ||
| 168 | + var f = arguments.callee; | ||
| 169 | + var end=array.length - 1; | ||
| 170 | + if(array.length > 1 && array[0] == array[end]){ | ||
| 171 | + array = array.slice(0, end); | ||
| 172 | + f(); | ||
| 173 | + } | ||
| 174 | + })(); | ||
| 175 | + | ||
| 176 | + //去掉连续的重复点 | ||
| 177 | + var last; | ||
| 178 | + $.each(array, function (i, str) { | ||
| 179 | + if(last){ | ||
| 180 | + if(last != str) | ||
| 181 | + newArr.push(str); | ||
| 182 | + } | ||
| 183 | + else | ||
| 184 | + newArr.push(str); | ||
| 185 | + last = str; | ||
| 186 | + }); | ||
| 187 | + | ||
| 188 | + var gPoints=[],ts; | ||
| 189 | + $.each(newArr, function (i, c) { | ||
| 190 | + ts=c.split(' '); | ||
| 191 | + gPoints.push({ | ||
| 192 | + lat: parseFloat(ts[1]), | ||
| 193 | + lng: parseFloat(ts[0]) | ||
| 194 | + }); | ||
| 195 | + }); | ||
| 196 | + | ||
| 197 | + //用百度geo工具库计算面积 | ||
| 198 | + var _polygonArea = BMapLib.GeoUtils.getPolygonArea(gPoints); | ||
| 199 | + return {_polygonArea: _polygonArea.toFixed(2), _gPoints: gPoints}; | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + var refresh = function (type, checked) { | ||
| 203 | + if (!triggerElem()) | ||
| 204 | + return; | ||
| 205 | + | ||
| 206 | + if ((type == 'carPark' && checked) || (type == 'station' && !checked)) { | ||
| 207 | + //显示停车场面板 | ||
| 208 | + $('.car-park-item', cont).addClass('uk-active'); | ||
| 209 | + $('li.cp-tab-btn', '.real_spatial_panel').addClass('uk-active'); | ||
| 210 | + $('.carpark-panel', cont).jstree(true).check_all(); | ||
| 211 | + | ||
| 212 | + //绘制停车场 | ||
| 213 | + gb_map_overlay_mge.drawCarpark(); | ||
| 214 | + } | ||
| 215 | + else { | ||
| 216 | + //显示站点路由面板 | ||
| 217 | + $('.station-route-item', cont).addClass('uk-active'); | ||
| 218 | + $('li.sr-tab-btn', '.real_spatial_panel').addClass('uk-active'); | ||
| 219 | + | ||
| 220 | + //选中相关站点路由树 | ||
| 221 | + var chs = gb_map_overlay_mge.getCheckedDevice(); | ||
| 222 | + var idx = {}; | ||
| 223 | + $.each(chs, function () { | ||
| 224 | + idx[this.data.lineId + '_' + this.data.upDown] = 1; | ||
| 225 | + }); | ||
| 226 | + | ||
| 227 | + var treeObj = $('.station-route-tree', cont).jstree(true); | ||
| 228 | + for (var id in idx) { | ||
| 229 | + treeObj.check_node(treeObj.get_node(id + '_st')); | ||
| 230 | + } | ||
| 231 | + | ||
| 232 | + //drawStation(); | ||
| 233 | + gb_map_overlay_mge.drawStation(); | ||
| 234 | + } | ||
| 235 | + } | ||
| 236 | + | ||
| 237 | + var triggerElem = function () { | ||
| 238 | + var config = gb_map_config.getConfig().spatialData; | ||
| 239 | + | ||
| 240 | + if(config.station || config.carPark){ | ||
| 241 | + showPanel(); | ||
| 242 | + return true; | ||
| 243 | + } | ||
| 244 | + hidePanel(); | ||
| 245 | + //gb_map_imap.call('hideAllStationMarker'); | ||
| 246 | + //gb_map_imap.call('hideDrawCarpark'); | ||
| 247 | + return false; | ||
| 248 | + } | ||
| 249 | + | ||
| 250 | + var animationend = 'webkitAnimationEnd animationend'; | ||
| 251 | + var showPanel = function () { | ||
| 252 | + var elem = $('.real_spatial_panel'); | ||
| 253 | + var config = gb_map_config.getConfig().spatialData; | ||
| 254 | + | ||
| 255 | + if (config.station && config.carPark) { | ||
| 256 | + anim_show($('.uk-subnav', elem), 'uk-animation-scale-up'); | ||
| 257 | + $('.real_spatial_body', elem).addClass('show-tab'); | ||
| 258 | + } | ||
| 259 | + else { | ||
| 260 | + $('.uk-subnav', elem).hide(); | ||
| 261 | + $('.real_spatial_body', elem).removeClass('show-tab'); | ||
| 262 | + } | ||
| 263 | + | ||
| 264 | + $('li.uk-active', elem).removeClass('uk-active'); | ||
| 265 | + | ||
| 266 | + if (!elem.is(":hidden")) | ||
| 267 | + return; | ||
| 268 | + | ||
| 269 | + anim_show(elem, 'uk-animation-slide-left'); | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + var hidePanel = function () { | ||
| 273 | + var elem = $('.real_spatial_panel'); | ||
| 274 | + elem.hide(); | ||
| 275 | + } | ||
| 276 | + | ||
| 277 | + function anim_show(e, anim) { | ||
| 278 | + e.addClass(anim).show().one(animationend, function () { | ||
| 279 | + $(this).removeClass(anim); | ||
| 280 | + }); | ||
| 281 | + } | ||
| 282 | + | ||
| 283 | + function getCheckedStation() { | ||
| 284 | + var list = []; | ||
| 285 | + var chs = $('.station-route-tree', cont).jstree(true).get_checked(true); | ||
| 286 | + chs = chs.filter(function (item) { | ||
| 287 | + return item.data; | ||
| 288 | + }); | ||
| 289 | + $.each(chs, function () { | ||
| 290 | + list.push(this.data); | ||
| 291 | + }); | ||
| 292 | + return list; | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + function gteCheckedCarpark() { | ||
| 296 | + var list = []; | ||
| 297 | + var chs = $('.carpark-panel', cont).jstree(true).get_checked(true); | ||
| 298 | + $.each(chs, function () { | ||
| 299 | + list.push(this.data); | ||
| 300 | + }); | ||
| 301 | + return list; | ||
| 302 | + } | ||
| 303 | + | ||
| 304 | + var get_st_route_tree_data = function () { | ||
| 305 | + var treeData = []; | ||
| 306 | + | ||
| 307 | + for (var lineCode in currentLineStationArr) { | ||
| 308 | + name = gb_data_basic.codeToLine[lineCode].name; | ||
| 309 | + treeData.push({ | ||
| 310 | + 'text': name, | ||
| 311 | + 'open': true, | ||
| 312 | + 'children': [ | ||
| 313 | + { | ||
| 314 | + 'text': '上行', | ||
| 315 | + 'children': grabs(currentLineStationArr[lineCode][0]), | ||
| 316 | + 'id': lineCode + '_0_st' | ||
| 317 | + }, | ||
| 318 | + { | ||
| 319 | + 'text': '下行', | ||
| 320 | + 'children': grabs(currentLineStationArr[lineCode][1]), | ||
| 321 | + 'id': lineCode + '_1_st' | ||
| 322 | + } | ||
| 323 | + ] | ||
| 324 | + }) | ||
| 325 | + } | ||
| 326 | + return treeData; | ||
| 327 | + }; | ||
| 328 | + var get_st_route_tree_data_version = function () { | ||
| 329 | + var treeData = []; | ||
| 330 | + | ||
| 331 | + for (var lineCode in lineVersionStationArr) { | ||
| 332 | + name = gb_data_basic.codeToLine[lineCode].name; | ||
| 333 | + treeData.push({ | ||
| 334 | + 'text': name, | ||
| 335 | + 'open': true, | ||
| 336 | + 'children': [ | ||
| 337 | + { | ||
| 338 | + 'text': '上行', | ||
| 339 | + 'children': grabs(lineVersionStationArr[lineCode][0]), | ||
| 340 | + 'id': lineCode + '_0_st' | ||
| 341 | + }, | ||
| 342 | + { | ||
| 343 | + 'text': '下行', | ||
| 344 | + 'children': grabs(lineVersionStationArr[lineCode][1]), | ||
| 345 | + 'id': lineCode + '_1_st' | ||
| 346 | + } | ||
| 347 | + ] | ||
| 348 | + }) | ||
| 349 | + } | ||
| 350 | + return treeData; | ||
| 351 | + }; | ||
| 352 | + var get_st_carpark_tree_data = function () { | ||
| 353 | + var treeData = []; | ||
| 354 | + | ||
| 355 | + $.each(carparkArr, function () { | ||
| 356 | + treeData.push({ | ||
| 357 | + 'text': this.parkName, | ||
| 358 | + 'data': this | ||
| 359 | + }); | ||
| 360 | + }); | ||
| 361 | + | ||
| 362 | + return treeData; | ||
| 363 | + } | ||
| 364 | + | ||
| 365 | + var grabs = function (array) { | ||
| 366 | + if (!array) | ||
| 367 | + return; | ||
| 368 | + var rs = []; | ||
| 369 | + $.each(array, function () { | ||
| 370 | + rs.push({ | ||
| 371 | + 'text': this.stationName, | ||
| 372 | + 'data': this, | ||
| 373 | + 'icon': false | ||
| 374 | + }); | ||
| 375 | + }); | ||
| 376 | + return rs; | ||
| 377 | + } | ||
| 378 | + | ||
| 379 | + return { | ||
| 380 | + refresh: refresh, | ||
| 381 | + init: init, | ||
| 382 | + getCheckedStation:getCheckedStation, | ||
| 383 | + gteCheckedCarpark: gteCheckedCarpark, | ||
| 384 | + getStationArray: function (lineCode) { | ||
| 385 | + return lineStationArr[lineCode]; | ||
| 386 | + }, | ||
| 387 | + carparkArray: function () { | ||
| 388 | + return carparkArr; | ||
| 389 | + } | ||
| 390 | + }; | ||
| 362 | })(); | 391 | })(); |
| 363 | \ No newline at end of file | 392 | \ No newline at end of file |
src/main/resources/xsd/vehicleSync.xsd
0 → 100644
| 1 | +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
| 2 | + xmlns:tns="http://bsth.com/service/schedule/batch/webservice/vehicleSync" | ||
| 3 | + targetNamespace="http://bsth.com/service/schedule/batch/webservice/vehicleSync" | ||
| 4 | + elementFormDefault="qualified"> | ||
| 5 | + | ||
| 6 | + <!-- 车辆信息更新请求类型 --> | ||
| 7 | + <xs:element name="addVehicleDataSyncRequest"> | ||
| 8 | + <xs:complexType> | ||
| 9 | + <xs:sequence> | ||
| 10 | + <xs:element name="idenZbh" type="xs:string" /> | ||
| 11 | + <xs:element name="idenCph" type="xs:string" /> | ||
| 12 | + <xs:element name="updateGsmc" type="xs:string" /> | ||
| 13 | + <xs:element name="updateFgsmc" type="xs:string" /> | ||
| 14 | + <xs:element name="updateSfbf" type="xs:boolean" /> | ||
| 15 | + </xs:sequence> | ||
| 16 | + </xs:complexType> | ||
| 17 | + </xs:element> | ||
| 18 | + | ||
| 19 | + <!-- 车辆信息更新返回类型 --> | ||
| 20 | + <xs:element name="addVehicleDataSyncResponse"> | ||
| 21 | + <xs:complexType> | ||
| 22 | + <xs:sequence> | ||
| 23 | + <xs:element name="success" type="xs:boolean"/> | ||
| 24 | + <xs:element name="message" type="xs:string"/> | ||
| 25 | + </xs:sequence> | ||
| 26 | + </xs:complexType> | ||
| 27 | + </xs:element> | ||
| 28 | + | ||
| 29 | +</xs:schema> | ||
| 0 | \ No newline at end of file | 30 | \ No newline at end of file |