Commit d3d27d34ed9a0dfb600752fdf2d5dc50ceefd8bb

Authored by 游瑞烽
1 parent 681c58b7

Revert "初始化"

This reverts commit 681c58b7.
Showing 45 changed files with 2354 additions and 2596 deletions
README.md
1 -人员表更新金蝶数据  
2 \ No newline at end of file 1 \ No newline at end of file
  2 +计算报表 !!!
  3 +1.公里、班次修正报表
3 \ No newline at end of file 4 \ No newline at end of file
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 <modelVersion>4.0.0</modelVersion> 4 <modelVersion>4.0.0</modelVersion>
5 <groupId>com.bsth</groupId> 5 <groupId>com.bsth</groupId>
6 - <artifactId>personnel_update</artifactId> 6 + <artifactId>report_calculator</artifactId>
7 <version>0.0.1-SNAPSHOT</version> 7 <version>0.0.1-SNAPSHOT</version>
8 <packaging>jar</packaging> 8 <packaging>jar</packaging>
9 9
@@ -14,16 +14,6 @@ @@ -14,16 +14,6 @@
14 </parent> 14 </parent>
15 15
16 <dependencies> 16 <dependencies>
17 - <dependency>  
18 - <groupId>dom4j</groupId>  
19 - <artifactId>dom4j</artifactId>  
20 - <version>1.6.1</version>  
21 - </dependency>  
22 - <dependency>  
23 - <groupId>org.apache.camel</groupId>  
24 - <artifactId>camel-core</artifactId>  
25 - <version>1.3.0</version>  
26 - </dependency>  
27 17
28 <dependency> 18 <dependency>
29 <groupId>org.springframework.boot</groupId> 19 <groupId>org.springframework.boot</groupId>
@@ -50,12 +40,6 @@ @@ -50,12 +40,6 @@
50 <artifactId>spring-boot-starter-data-redis</artifactId> 40 <artifactId>spring-boot-starter-data-redis</artifactId>
51 </dependency> 41 </dependency>
52 42
53 - <!--<dependency>  
54 - <groupId>org.mybatis.spring.boot</groupId>  
55 - <artifactId>mybatis-spring-boot-starter</artifactId>  
56 - <version>1.3.0</version>  
57 - </dependency>-->  
58 -  
59 <dependency> 43 <dependency>
60 <groupId>org.springframework</groupId> 44 <groupId>org.springframework</groupId>
61 <artifactId>spring-context-support</artifactId> 45 <artifactId>spring-context-support</artifactId>
src/main/java/com/bsth/Application.java
@@ -2,12 +2,9 @@ package com.bsth; @@ -2,12 +2,9 @@ package com.bsth;
2 2
3 import org.springframework.boot.SpringApplication; 3 import org.springframework.boot.SpringApplication;
4 import org.springframework.boot.autoconfigure.SpringBootApplication; 4 import org.springframework.boot.autoconfigure.SpringBootApplication;
5 -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;  
6 -import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;  
7 import org.springframework.boot.web.support.SpringBootServletInitializer; 5 import org.springframework.boot.web.support.SpringBootServletInitializer;
8 6
9 @SpringBootApplication 7 @SpringBootApplication
10 -//@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})  
11 public class Application extends SpringBootServletInitializer { 8 public class Application extends SpringBootServletInitializer {
12 9
13 public static void main(String[] args) throws Exception { 10 public static void main(String[] args) throws Exception {
src/main/java/com/bsth/StartCommand.java
1 package com.bsth; 1 package com.bsth;
2 2
3 3
4 -import com.bsth.thread.PersonnelUpdateThrad; 4 +import com.bsth.thread.ReportCalculationThrad;
5 import com.bsth.util.DateUtils; 5 import com.bsth.util.DateUtils;
6 6
7 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,22 +29,21 @@ public class StartCommand implements CommandLineRunner{ @@ -29,22 +29,21 @@ public class StartCommand implements CommandLineRunner{
29 private static long timeDiff; 29 private static long timeDiff;
30 30
31 @Autowired 31 @Autowired
32 - PersonnelUpdateThrad personnelUpdateThrad; 32 + ReportCalculationThrad mileageCalculationThrad;
33 33
34 static { 34 static {
35 - // 中午12:00  
36 - timeDiff = (DateUtils.getTimestamp() + 1000 * 60 * 60 * 24) - System.currentTimeMillis();  
37 -// if (timeDiff < 0)  
38 -// timeDiff += (1000 * 60 * 60 * 24); 35 + // 早上02:30
  36 + timeDiff = (DateUtils.getTimestamp() + 1000 * 60 * 150) - System.currentTimeMillis();
  37 + if (timeDiff < 0)
  38 + timeDiff += (1000 * 60 * 60 * 24);
39 } 39 }
40 40
41 @Override 41 @Override
42 public void run(String... arg0){ 42 public void run(String... arg0){
43 43
44 try { 44 try {
45 - log.info("在:"+timeDiff / 1000 / 60 + "分钟后开始同步数据");  
46 - mainServices.scheduleAtFixedRate(personnelUpdateThrad, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);//timeDiff / 1000  
47 -// mainServices.scheduleAtFixedRate(personnelUpdateThrad, 1, 60*60, TimeUnit.SECONDS);//timeDiff / 1000 45 + log.info(timeDiff / 1000 / 60 + "分钟后统计修正班次和公里报表");
  46 + mainServices.scheduleAtFixedRate(mileageCalculationThrad, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);//timeDiff / 1000
48 } catch (Exception e) { 47 } catch (Exception e) {
49 e.printStackTrace(); 48 e.printStackTrace();
50 } 49 }
src/main/java/com/bsth/entity/Business.java deleted 100644 → 0
1 -package com.bsth.entity;  
2 -  
3 -import javax.persistence.Column;  
4 -import javax.persistence.Entity;  
5 -import javax.persistence.GeneratedValue;  
6 -import javax.persistence.GenerationType;  
7 -import javax.persistence.Id;  
8 -import javax.persistence.Table;  
9 -import java.util.Date;  
10 -  
11 -/**  
12 - *  
13 - * @ClassName : Business(公司实体类)  
14 - *  
15 - * @Author : bsth@lq  
16 - *  
17 - * @Description : TODO(公司信息)  
18 - *  
19 - * @Data : 2016-04-27  
20 - *  
21 - * @Version 公交调度系统BS版 0.1  
22 - *  
23 - */  
24 -  
25 -@Entity  
26 -@Table(name = "bsth_c_business")  
27 -public class Business {  
28 -  
29 - // ID  
30 - @Id  
31 - @GeneratedValue(strategy = GenerationType.IDENTITY)  
32 - private Integer id;  
33 -  
34 - // 企业<公司>名称  
35 - private String businessName;  
36 -  
37 - // 企业<公司>代码  
38 - private String businessCode;  
39 -  
40 - // 所属企业<公司>代码  
41 - private String upCode;  
42 -  
43 - // 描述  
44 - private String descriptions;  
45 -  
46 - // 创建日期  
47 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
48 - private Date createDate;  
49 -  
50 - // 修改日期  
51 - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
52 - private Date updateDate;  
53 - public Date getCreateDate() {  
54 - return createDate;  
55 - }  
56 -  
57 - public void setCreateDate(Date createDate) {  
58 - this.createDate = createDate;  
59 - }  
60 -  
61 - public Date getUpdateDate() {  
62 - return updateDate;  
63 - }  
64 -  
65 - public void setUpdateDate(Date updateDate) {  
66 - this.updateDate = updateDate;  
67 - }  
68 -  
69 - public Integer getId() {  
70 - return id;  
71 - }  
72 -  
73 - public void setId(Integer id) {  
74 - this.id = id;  
75 - }  
76 -  
77 - public String getBusinessName() {  
78 - return businessName;  
79 - }  
80 -  
81 - public void setBusinessName(String businessName) {  
82 - this.businessName = businessName;  
83 - }  
84 -  
85 - public String getBusinessCode() {  
86 - return businessCode;  
87 - }  
88 -  
89 - public void setBusinessCode(String businessCode) {  
90 - this.businessCode = businessCode;  
91 - }  
92 -  
93 - public String getUpCode() {  
94 - return upCode;  
95 - }  
96 -  
97 - public void setUpCode(String upCode) {  
98 - this.upCode = upCode;  
99 - }  
100 -  
101 - public String getDescriptions() {  
102 - return descriptions;  
103 - }  
104 -  
105 - public void setDescriptions(String descriptions) {  
106 - this.descriptions = descriptions;  
107 - }  
108 -}  
src/main/java/com/bsth/entity/ChildTaskPlan.java 0 → 100644
  1 +package com.bsth.entity;
  2 +
  3 +import com.fasterxml.jackson.annotation.JsonIgnore;
  4 +
  5 +import javax.persistence.*;
  6 +import java.util.Date;
  7 +
  8 +
  9 +/**
  10 + *
  11 + * @ClassName: ChildTaskPlan
  12 + * @Description: TODO(子任务)
  13 + * @author PanZhao
  14 + * @date 2016年6月20日 上午11:22:22
  15 + *
  16 + */
  17 +@Entity
  18 +@Table(name = "bsth_c_s_child_task")
  19 +@NamedEntityGraphs({
  20 + @NamedEntityGraph(name = "childTaskPlan_schedule", attributeNodes = {
  21 + @NamedAttributeNode("schedule")
  22 + })
  23 +})
  24 +public class ChildTaskPlan {
  25 +
  26 + @Id
  27 + @GeneratedValue
  28 + private Long id;
  29 +
  30 + /**
  31 + * 任务类型1
  32 + * 正常,临加
  33 + */
  34 + private String type1;
  35 +
  36 + /**
  37 + * 任务类型2
  38 + */
  39 + private String type2;
  40 +
  41 + /**
  42 + * 起点
  43 + */
  44 + private String startStation;
  45 +
  46 + /**
  47 + * 起点站名称
  48 + */
  49 + private String startStationName;
  50 +
  51 + /**
  52 + * 终点
  53 + */
  54 + private String endStation;
  55 +
  56 + /**
  57 + * 终点站名称
  58 + */
  59 + private String endStationName;
  60 +
  61 + /**
  62 + * 里程类型
  63 + */
  64 + private String mileageType;
  65 +
  66 + /**
  67 + * 里程
  68 + */
  69 + private Float mileage;
  70 +
  71 + /**
  72 + * 开始时间 HH:mm
  73 + */
  74 + private String startDate;
  75 +
  76 + /**
  77 + * 结束时间 HH:mm
  78 + */
  79 + private String endDate;
  80 +
  81 + /**
  82 + * 是否烂班
  83 + */
  84 + private boolean destroy;
  85 +
  86 + /**
  87 + * 烂班原因 -烂班时,该字段仍有值并 =reason
  88 + */
  89 + private String destroyReason;
  90 +
  91 + /**
  92 + * 包括 烂班原因、进出场原因、换车原因 等
  93 + */
  94 + private String reason;
  95 +
  96 + /**
  97 + * 车辆 如果为空,继承主任务
  98 + */
  99 + private String nbbm;
  100 +
  101 + /**
  102 + * 为true 则无售票员, 否则继承主任务
  103 + */
  104 + private boolean noClerk;
  105 +
  106 + /** 创建日期 */
  107 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  108 + private Date createDate;
  109 +
  110 + /**
  111 + * 主排班计划
  112 + */
  113 + @JsonIgnore
  114 + @ManyToOne(fetch = FetchType.LAZY)
  115 + @JoinColumn(name = "schedule")
  116 + private ScheduleRealInfo schedule;
  117 +
  118 + private String remarks;
  119 +
  120 + public Long getId() {
  121 + return id;
  122 + }
  123 +
  124 + public void setId(Long id) {
  125 + this.id = id;
  126 + }
  127 +
  128 + public String getType1() {
  129 + return type1;
  130 + }
  131 +
  132 + public void setType1(String type1) {
  133 + this.type1 = type1;
  134 + }
  135 +
  136 + public String getType2() {
  137 + return type2;
  138 + }
  139 +
  140 + public void setType2(String type2) {
  141 + this.type2 = type2;
  142 + }
  143 +
  144 + public String getStartStation() {
  145 + return startStation;
  146 + }
  147 +
  148 + public void setStartStation(String startStation) {
  149 + this.startStation = startStation;
  150 + }
  151 +
  152 + public String getEndStation() {
  153 + return endStation;
  154 + }
  155 +
  156 + public void setEndStation(String endStation) {
  157 + this.endStation = endStation;
  158 + }
  159 +
  160 + public String getMileageType() {
  161 + return mileageType;
  162 + }
  163 +
  164 + public void setMileageType(String mileageType) {
  165 + this.mileageType = mileageType;
  166 + }
  167 +
  168 + public Float getMileage() {
  169 + return mileage;
  170 + }
  171 +
  172 + public void setMileage(Float mileage) {
  173 + this.mileage = mileage;
  174 + }
  175 +
  176 + public String getStartDate() {
  177 + return startDate;
  178 + }
  179 +
  180 + public void setStartDate(String startDate) {
  181 + this.startDate = startDate;
  182 + }
  183 +
  184 + public String getEndDate() {
  185 + return endDate;
  186 + }
  187 +
  188 + public void setEndDate(String endDate) {
  189 + this.endDate = endDate;
  190 + }
  191 +
  192 + public boolean isDestroy() {
  193 + return destroy;
  194 + }
  195 +
  196 + public void setDestroy(boolean destroy) {
  197 + this.destroy = destroy;
  198 + }
  199 +
  200 + public String getDestroyReason() {
  201 + return destroyReason;
  202 + }
  203 +
  204 + public void setDestroyReason(String destroyReason) {
  205 + this.destroyReason = destroyReason;
  206 + }
  207 +
  208 + public ScheduleRealInfo getSchedule() {
  209 + return schedule;
  210 + }
  211 +
  212 + public void setSchedule(ScheduleRealInfo schedule) {
  213 + this.schedule = schedule;
  214 + }
  215 +
  216 + public String getRemarks() {
  217 + return remarks;
  218 + }
  219 +
  220 + public void setRemarks(String remarks) {
  221 + this.remarks = remarks;
  222 + }
  223 +
  224 + public String getStartStationName() {
  225 + return startStationName;
  226 + }
  227 +
  228 + public void setStartStationName(String startStationName) {
  229 + this.startStationName = startStationName;
  230 + }
  231 +
  232 + public String getEndStationName() {
  233 + return endStationName;
  234 + }
  235 +
  236 + public void setEndStationName(String endStationName) {
  237 + this.endStationName = endStationName;
  238 + }
  239 +
  240 + @Override
  241 + public int hashCode() {
  242 + return ("cTask" + this.getId() + this.getSchedule().getId()).hashCode();
  243 + }
  244 +
  245 + @Override
  246 + public boolean equals(Object obj) {
  247 + return this.id.equals(((ChildTaskPlan)obj).getId());
  248 + }
  249 +
  250 + public Date getCreateDate() {
  251 + return createDate;
  252 + }
  253 +
  254 + public void setCreateDate(Date createDate) {
  255 + this.createDate = createDate;
  256 + }
  257 +
  258 + public String getReason() {
  259 + return reason;
  260 + }
  261 +
  262 + public void setReason(String reason) {
  263 + this.reason = reason;
  264 + }
  265 +
  266 + public String getNbbm() {
  267 + return nbbm;
  268 + }
  269 +
  270 + public void setNbbm(String nbbm) {
  271 + this.nbbm = nbbm;
  272 + }
  273 +
  274 + public boolean isNoClerk() {
  275 + return noClerk;
  276 + }
  277 +
  278 + public void setNoClerk(boolean noClerk) {
  279 + this.noClerk = noClerk;
  280 + }
  281 +}
src/main/java/com/bsth/entity/Dictionary.java deleted 100644 → 0
1 -package com.bsth.entity;  
2 -  
3 -import javax.persistence.Column;  
4 -import javax.persistence.Entity;  
5 -import javax.persistence.GeneratedValue;  
6 -import javax.persistence.GenerationType;  
7 -import javax.persistence.Id;  
8 -import javax.persistence.Table;  
9 -import java.util.Date;  
10 -  
11 -@Entity  
12 -@Table(name = "bsth_c_sys_dictionary")  
13 -public class Dictionary {  
14 -  
15 - @Id  
16 - @GeneratedValue(strategy = GenerationType.IDENTITY)  
17 - private Integer id;  
18 -  
19 - private String dCode;  
20 -  
21 - private String dName;  
22 -  
23 - private String descriptions;  
24 -  
25 - private String dGroup;  
26 -  
27 - /**  
28 - * 固化的字典不能修改  
29 - */  
30 - private boolean fixed;  
31 -  
32 - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
33 - private Date updateDate;  
34 -  
35 -  
36 - public Integer getId() {  
37 - return id;  
38 - }  
39 -  
40 - public void setId(Integer id) {  
41 - this.id = id;  
42 - }  
43 -  
44 - public boolean isFixed() {  
45 - return fixed;  
46 - }  
47 -  
48 - public void setFixed(boolean fixed) {  
49 - this.fixed = fixed;  
50 - }  
51 -  
52 - public String getdCode() {  
53 - return dCode;  
54 - }  
55 -  
56 - public void setdCode(String dCode) {  
57 - this.dCode = dCode;  
58 - }  
59 -  
60 - public String getdName() {  
61 - return dName;  
62 - }  
63 -  
64 - public void setdName(String dName) {  
65 - this.dName = dName;  
66 - }  
67 -  
68 - public String getDescriptions() {  
69 - return descriptions;  
70 - }  
71 -  
72 - public void setDescriptions(String descriptions) {  
73 - this.descriptions = descriptions;  
74 - }  
75 -  
76 - public String getdGroup() {  
77 - return dGroup;  
78 - }  
79 -  
80 - public void setdGroup(String dGroup) {  
81 - this.dGroup = dGroup;  
82 - }  
83 -  
84 - public Date getUpdateDate() {  
85 - return updateDate;  
86 - }  
87 -  
88 - public void setUpdateDate(Date updateDate) {  
89 - this.updateDate = updateDate;  
90 - }  
91 -}  
src/main/java/com/bsth/entity/Equipment.java 0 → 100644
  1 +package com.bsth.entity;
  2 +/**
  3 + * @ClassName: Equipment.java
  4 + * @Description: TODO(车辆自编号to设备号)
  5 + * @author: YouRuiFeng
  6 + * @date: 2017-8-30 下午7:36:07
  7 + *
  8 + */
  9 +public class Equipment {
  10 +
  11 + private String inside_code;
  12 +
  13 + private String equipment_code;
  14 +
  15 + public String getInside_code() {
  16 + return inside_code;
  17 + }
  18 +
  19 + public void setInside_code(String inside_code) {
  20 + this.inside_code = inside_code;
  21 + }
  22 +
  23 + public String getEquipment_code() {
  24 + return equipment_code;
  25 + }
  26 +
  27 + public void setEquipment_code(String equipment_code) {
  28 + this.equipment_code = equipment_code;
  29 + }
  30 +
  31 +}
src/main/java/com/bsth/entity/Personnel.java deleted 100644 → 0
1 -package com.bsth.entity;  
2 -  
3 -import com.fasterxml.jackson.annotation.JsonIgnoreProperties;  
4 -import org.hibernate.annotations.Formula;  
5 -  
6 -import javax.persistence.Column;  
7 -import javax.persistence.Entity;  
8 -import javax.persistence.GeneratedValue;  
9 -import javax.persistence.Id;  
10 -import javax.persistence.Table;  
11 -import java.util.Date;  
12 -  
13 -/**  
14 - *  
15 - * @ClassName : Personnel(人员实体类)  
16 - *  
17 - * @Author : bsth@lq  
18 - *  
19 - * @Description : TODO(人员)  
20 - *  
21 - * @Version 公交调度系统BS版 0.1  
22 - *  
23 - */  
24 -  
25 -@Entity  
26 -@Table(name = "bsth_c_personnel")//_copy  
27 -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})  
28 -public class Personnel {  
29 -  
30 - /** 主键Id */  
31 - @Id  
32 - @GeneratedValue  
33 - private Integer id;  
34 -  
35 - /** 所属公司 */  
36 - @Column(nullable = false)  
37 - private String company;  
38 - /** 公司编码 */  
39 - @Column(nullable = false)  
40 - private String companyCode;  
41 - /** 所属分公司 */  
42 - private String brancheCompany;  
43 - /** 分公司编码 */  
44 - private String brancheCompanyCode;  
45 - /** 组合公司分公司编码 */  
46 -// @Formula(" concat(company_code, '_', branche_company_code) ")  
47 -// private String cgsbm;  
48 -  
49 - /** 工号(员工编号带公司编码前缀) */  
50 - @Column(nullable = false)  
51 - private String jobCode;  
52 - /** 姓名 */  
53 - @Column(nullable = false)  
54 - private String personnelName;  
55 -  
56 - /** 运营服务证书号 */  
57 - private String papersCode;  
58 - /** 一卡通工作卡号 */  
59 - private String icCardCode;  
60 - /** 性别(字典类型sexType) */  
61 - private String personnelType;  
62 - /** 所属岗位/工种(字典类型gzType) */  
63 - private String posts;  
64 -  
65 - /** 工号 */  
66 - @Column(nullable = false)  
67 - private String jobCodeori;  
68 -  
69 - /** 金蝶工号 */  
70 -// @Column(nullable = false)  
71 - private String jdCodeori;  
72 -  
73 - /** 身份证 */  
74 - private String card;  
75 -  
76 - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
77 - private Date updateDate;  
78 -  
79 - /** 备注 */  
80 - private String remark;  
81 -  
82 - /**  
83 - * 0为正常,1为停用  
84 - */  
85 - private Integer destroy;  
86 -  
87 - public Personnel() {}  
88 -  
89 - public Personnel(Object id, Object companyCode, Object gh) {  
90 - if (id != null) {  
91 - this.id = Integer.valueOf(id.toString());  
92 - }  
93 - if (companyCode != null) {  
94 - this.companyCode = companyCode.toString();  
95 - }  
96 - if (gh != null) {  
97 - this.jobCode = gh.toString();  
98 - }  
99 - }  
100 -  
101 - public String getCard() {  
102 - return card;  
103 - }  
104 -  
105 - public void setCard(String card) {  
106 - this.card = card;  
107 - }  
108 -  
109 - /** 人员编码(TODO:在原系统里没有,这里暂时留着) */  
110 - private String personnelCode;  
111 - /** 照片地址(TODO:在原系统里没有,这里暂时留着) */  
112 - private String personnelImg;  
113 - /** 线路编号(TODO:在原系统里没有,这里暂时留着) */  
114 - private String lineCode;  
115 - /** 联系电话(TODO:在原系统里没有,这里暂时留着) */  
116 - private String telphone;  
117 - /** 描述(TODO:在原系统里没有,这里暂时留着) */  
118 - private String descriptions;  
119 -  
120 - public Integer getId() {  
121 - return id;  
122 - }  
123 -  
124 - public void setId(Integer id) {  
125 - this.id = id;  
126 - }  
127 -  
128 - public String getCompany() {  
129 - return company;  
130 - }  
131 -  
132 - public void setCompany(String company) {  
133 - this.company = company;  
134 - }  
135 -  
136 - public String getCompanyCode() {  
137 - return companyCode;  
138 - }  
139 -  
140 - public void setCompanyCode(String companyCode) {  
141 - this.companyCode = companyCode;  
142 - }  
143 -  
144 - public String getBrancheCompany() {  
145 - return brancheCompany;  
146 - }  
147 -  
148 - public void setBrancheCompany(String brancheCompany) {  
149 - this.brancheCompany = brancheCompany;  
150 - }  
151 -  
152 - public String getBrancheCompanyCode() {  
153 - return brancheCompanyCode;  
154 - }  
155 -  
156 - public void setBrancheCompanyCode(String brancheCompanyCode) {  
157 - this.brancheCompanyCode = brancheCompanyCode;  
158 - }  
159 -  
160 - public String getJobCode() {  
161 - return jobCode;  
162 - }  
163 -  
164 - public void setJobCode(String jobCode) {  
165 - this.jobCode = jobCode;  
166 - }  
167 -  
168 - public String getPersonnelName() {  
169 - return personnelName;  
170 - }  
171 -  
172 - public void setPersonnelName(String personnelName) {  
173 - this.personnelName = personnelName;  
174 - }  
175 -  
176 - public String getPapersCode() {  
177 - return papersCode;  
178 - }  
179 -  
180 - public void setPapersCode(String papersCode) {  
181 - this.papersCode = papersCode;  
182 - }  
183 -  
184 - public String getIcCardCode() {  
185 - return icCardCode;  
186 - }  
187 -  
188 - public void setIcCardCode(String icCardCode) {  
189 - this.icCardCode = icCardCode;  
190 - }  
191 -  
192 - public String getPersonnelType() {  
193 - return personnelType;  
194 - }  
195 -  
196 - public void setPersonnelType(String personnelType) {  
197 - this.personnelType = personnelType;  
198 - }  
199 -  
200 - public String getPosts() {  
201 - return posts;  
202 - }  
203 -  
204 - public void setPosts(String posts) {  
205 - this.posts = posts;  
206 - }  
207 -  
208 - public String getPersonnelCode() {  
209 - return personnelCode;  
210 - }  
211 -  
212 - public void setPersonnelCode(String personnelCode) {  
213 - this.personnelCode = personnelCode;  
214 - }  
215 -  
216 - public String getPersonnelImg() {  
217 - return personnelImg;  
218 - }  
219 -  
220 - public void setPersonnelImg(String personnelImg) {  
221 - this.personnelImg = personnelImg;  
222 - }  
223 -  
224 - public String getLineCode() {  
225 - return lineCode;  
226 - }  
227 -  
228 - public void setLineCode(String lineCode) {  
229 - this.lineCode = lineCode;  
230 - }  
231 -  
232 - public String getTelphone() {  
233 - return telphone;  
234 - }  
235 -  
236 - public void setTelphone(String telphone) {  
237 - this.telphone = telphone;  
238 - }  
239 -  
240 - public String getDescriptions() {  
241 - return descriptions;  
242 - }  
243 -  
244 - public void setDescriptions(String descriptions) {  
245 - this.descriptions = descriptions;  
246 - }  
247 -  
248 -// public String getCgsbm() {  
249 -// return cgsbm;  
250 -// }  
251 -//  
252 -// public void setCgsbm(String cgsbm) {  
253 -// this.cgsbm = cgsbm;  
254 -// }  
255 -  
256 - public String getJobCodeori() {  
257 - return jobCodeori;  
258 - }  
259 -  
260 - public void setJobCodeori(String jobCodeori) {  
261 - this.jobCodeori = jobCodeori;  
262 - }  
263 -  
264 - public String getJdCodeori() {  
265 - return jdCodeori;  
266 - }  
267 -  
268 - public void setJdCodeori(String jdCodeori) {  
269 - this.jdCodeori = jdCodeori;  
270 - }  
271 -  
272 - public String getRemark() {  
273 - return remark;  
274 - }  
275 -  
276 - public void setRemark(String remark) {  
277 - this.remark = remark;  
278 - }  
279 -  
280 - public Date getUpdateDate() {  
281 - return updateDate;  
282 - }  
283 -  
284 - public void setUpdateDate(Date updateDate) {  
285 - this.updateDate = updateDate;  
286 - }  
287 -  
288 - public Integer getDestroy() {  
289 - return destroy;  
290 - }  
291 -  
292 - public void setDestroy(Integer destroy) {  
293 - this.destroy = destroy;  
294 - }  
295 -}  
src/main/java/com/bsth/entity/PersonnelCopy.java deleted 100644 → 0
1 -package com.bsth.entity;  
2 -  
3 -import com.fasterxml.jackson.annotation.JsonIgnoreProperties;  
4 -import org.hibernate.annotations.Formula;  
5 -  
6 -import javax.persistence.Column;  
7 -import javax.persistence.Entity;  
8 -import javax.persistence.GeneratedValue;  
9 -import javax.persistence.Id;  
10 -import javax.persistence.Table;  
11 -import java.util.Date;  
12 -  
13 -/**  
14 - *  
15 - * @ClassName : PersonnelCopy(人员实体类备份)  
16 - *  
17 - * @Author : bsth@lq  
18 - *  
19 - * @Description : TODO(人员)  
20 - *  
21 - * @Version 公交调度系统BS版 0.1  
22 - *  
23 - */  
24 -  
25 -//@Entity  
26 -//@Table(name = "bsth_c_personnel_copy")  
27 -//@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})  
28 -public class PersonnelCopy {  
29 -  
30 - /** 主键Id */  
31 - @Id  
32 - @GeneratedValue  
33 - private Integer id;  
34 -  
35 - /** 所属公司 */  
36 -// @Column(nullable = false)  
37 - private String company;  
38 - /** 公司编码 */  
39 -// @Column(nullable = false)  
40 - private String companyCode;  
41 - /** 所属分公司 */  
42 - private String brancheCompany;  
43 - /** 分公司编码 */  
44 - private String brancheCompanyCode;  
45 - /** 组合公司分公司编码 */  
46 - @Formula(" concat(company_code, '_', branche_company_code) ")  
47 - private String cgsbm;  
48 -  
49 - /** 工号(员工编号带公司编码前缀) */  
50 -// @Column(nullable = false)  
51 - private String jobCode;  
52 - /** 姓名 */  
53 -// @Column(nullable = false)  
54 - private String personnelName;  
55 -  
56 - /** 运营服务证书号 */  
57 - private String papersCode;  
58 - /** 一卡通工作卡号 */  
59 - private String icCardCode;  
60 - /** 性别(字典类型sexType) */  
61 - private String personnelType;  
62 - /** 所属岗位/工种(字典类型gzType) */  
63 - private String posts;  
64 -  
65 - /** 工号 */  
66 -// @Column(nullable = false)  
67 - private String jobCodeori;  
68 - /** 身份证 */  
69 - private String card;  
70 -  
71 - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
72 - private Date updateDate;  
73 -  
74 - /** 备注 */  
75 - private String remark;  
76 -  
77 - public PersonnelCopy() {}  
78 -  
79 - public PersonnelCopy(Object id, Object companyCode, Object gh) {  
80 - if (id != null) {  
81 - this.id = Integer.valueOf(id.toString());  
82 - }  
83 - if (companyCode != null) {  
84 - this.companyCode = companyCode.toString();  
85 - }  
86 - if (gh != null) {  
87 - this.jobCode = gh.toString();  
88 - }  
89 - }  
90 -  
91 - public String getCard() {  
92 - return card;  
93 - }  
94 -  
95 - public void setCard(String card) {  
96 - this.card = card;  
97 - }  
98 -  
99 - /** 人员编码(TODO:在原系统里没有,这里暂时留着) */  
100 - private String personnelCode;  
101 - /** 照片地址(TODO:在原系统里没有,这里暂时留着) */  
102 - private String personnelImg;  
103 - /** 线路编号(TODO:在原系统里没有,这里暂时留着) */  
104 - private String lineCode;  
105 - /** 联系电话(TODO:在原系统里没有,这里暂时留着) */  
106 - private String telphone;  
107 - /** 描述(TODO:在原系统里没有,这里暂时留着) */  
108 - private String descriptions;  
109 -  
110 - public Integer getId() {  
111 - return id;  
112 - }  
113 -  
114 - public void setId(Integer id) {  
115 - this.id = id;  
116 - }  
117 -  
118 - public String getCompany() {  
119 - return company;  
120 - }  
121 -  
122 - public void setCompany(String company) {  
123 - this.company = company;  
124 - }  
125 -  
126 - public String getCompanyCode() {  
127 - return companyCode;  
128 - }  
129 -  
130 - public void setCompanyCode(String companyCode) {  
131 - this.companyCode = companyCode;  
132 - }  
133 -  
134 - public String getBrancheCompany() {  
135 - return brancheCompany;  
136 - }  
137 -  
138 - public void setBrancheCompany(String brancheCompany) {  
139 - this.brancheCompany = brancheCompany;  
140 - }  
141 -  
142 - public String getBrancheCompanyCode() {  
143 - return brancheCompanyCode;  
144 - }  
145 -  
146 - public void setBrancheCompanyCode(String brancheCompanyCode) {  
147 - this.brancheCompanyCode = brancheCompanyCode;  
148 - }  
149 -  
150 - public String getJobCode() {  
151 - return jobCode;  
152 - }  
153 -  
154 - public void setJobCode(String jobCode) {  
155 - this.jobCode = jobCode;  
156 - }  
157 -  
158 - public String getPersonnelName() {  
159 - return personnelName;  
160 - }  
161 -  
162 - public void setPersonnelName(String personnelName) {  
163 - this.personnelName = personnelName;  
164 - }  
165 -  
166 - public String getPapersCode() {  
167 - return papersCode;  
168 - }  
169 -  
170 - public void setPapersCode(String papersCode) {  
171 - this.papersCode = papersCode;  
172 - }  
173 -  
174 - public String getIcCardCode() {  
175 - return icCardCode;  
176 - }  
177 -  
178 - public void setIcCardCode(String icCardCode) {  
179 - this.icCardCode = icCardCode;  
180 - }  
181 -  
182 - public String getPersonnelType() {  
183 - return personnelType;  
184 - }  
185 -  
186 - public void setPersonnelType(String personnelType) {  
187 - this.personnelType = personnelType;  
188 - }  
189 -  
190 - public String getPosts() {  
191 - return posts;  
192 - }  
193 -  
194 - public void setPosts(String posts) {  
195 - this.posts = posts;  
196 - }  
197 -  
198 - public String getPersonnelCode() {  
199 - return personnelCode;  
200 - }  
201 -  
202 - public void setPersonnelCode(String personnelCode) {  
203 - this.personnelCode = personnelCode;  
204 - }  
205 -  
206 - public String getPersonnelImg() {  
207 - return personnelImg;  
208 - }  
209 -  
210 - public void setPersonnelImg(String personnelImg) {  
211 - this.personnelImg = personnelImg;  
212 - }  
213 -  
214 - public String getLineCode() {  
215 - return lineCode;  
216 - }  
217 -  
218 - public void setLineCode(String lineCode) {  
219 - this.lineCode = lineCode;  
220 - }  
221 -  
222 - public String getTelphone() {  
223 - return telphone;  
224 - }  
225 -  
226 - public void setTelphone(String telphone) {  
227 - this.telphone = telphone;  
228 - }  
229 -  
230 - public String getDescriptions() {  
231 - return descriptions;  
232 - }  
233 -  
234 - public void setDescriptions(String descriptions) {  
235 - this.descriptions = descriptions;  
236 - }  
237 -  
238 - public String getCgsbm() {  
239 - return cgsbm;  
240 - }  
241 -  
242 - public void setCgsbm(String cgsbm) {  
243 - this.cgsbm = cgsbm;  
244 - }  
245 -  
246 - public String getJobCodeori() {  
247 - return jobCodeori;  
248 - }  
249 -  
250 - public void setJobCodeori(String jobCodeori) {  
251 - this.jobCodeori = jobCodeori;  
252 - }  
253 -  
254 - public String getRemark() {  
255 - return remark;  
256 - }  
257 -  
258 - public void setRemark(String remark) {  
259 - this.remark = remark;  
260 - }  
261 -  
262 - public Date getUpdateDate() {  
263 - return updateDate;  
264 - }  
265 -  
266 - public void setUpdateDate(Date updateDate) {  
267 - this.updateDate = updateDate;  
268 - }  
269 -}  
src/main/java/com/bsth/entity/ScheduleRealInfo.java 0 → 100644
  1 +package com.bsth.entity;
  2 +
  3 +import org.apache.commons.lang3.StringUtils;
  4 +import org.joda.time.format.DateTimeFormat;
  5 +import org.joda.time.format.DateTimeFormatter;
  6 +
  7 +import javax.persistence.*;
  8 +import java.io.Serializable;
  9 +import java.util.Date;
  10 +import java.util.HashSet;
  11 +import java.util.Set;
  12 +
  13 +/**
  14 + * 实际排班计划明细。
  15 + */
  16 +@Entity
  17 +@Table(name = "bsth_c_s_sp_info_real")
  18 +@NamedEntityGraphs({
  19 + @NamedEntityGraph(name = "scheduleRealInfo_cTasks", attributeNodes = {
  20 + @NamedAttributeNode("cTasks")
  21 + })
  22 +})
  23 +public class ScheduleRealInfo implements Serializable{
  24 +
  25 +
  26 +
  27 + /** 主键Id */
  28 + @Id
  29 + private Long id;
  30 +
  31 + /** 计划ID */
  32 + private Long spId;
  33 +
  34 + /** 排班计划日期 */
  35 + private Date scheduleDate;
  36 + private String scheduleDateStr;
  37 +
  38 + /** 真实执行时间 yyyy-MM-dd */
  39 + private String realExecDate;
  40 +
  41 + /** 线路名称 */
  42 + private String xlName;
  43 + /** 线路编码 */
  44 + private String xlBm;
  45 +
  46 + /** 路牌名称 */
  47 + private String lpName;
  48 +
  49 + /** 车辆自编号 */
  50 + private String clZbh;
  51 +
  52 + /** 设备终端号*/
  53 + @Transient
  54 + private String equipment_code;
  55 +
  56 + /** 驾驶员工号 */
  57 + private String jGh;
  58 + /** 驾驶员名字 */
  59 + private String jName;
  60 + /** 售票员工号 */
  61 + private String sGh;
  62 + /** 售票员名字 */
  63 + private String sName;
  64 +
  65 + /** 线路方向 */
  66 + private String xlDir;
  67 + /** 起点站code*/
  68 + private String qdzCode;
  69 + /** 起点站名字 */
  70 + private String qdzName;
  71 +
  72 + /** 终点站code*/
  73 + private String zdzCode;
  74 + /** 终点站名字 */
  75 + private String zdzName;
  76 +
  77 + /** 计划发车时间(格式 HH:mm) */
  78 + private String fcsj;
  79 + /** 计划发车时间戳*/
  80 + @Transient
  81 + private Long fcsjT;
  82 +
  83 + /** 计划终点时间(格式 HH:mm) */
  84 + private String zdsj;
  85 + /** 计划终点时间戳*/
  86 + @Transient
  87 + private Long zdsjT;
  88 +
  89 + /** 计划里程 */
  90 + private Double jhlc;
  91 +
  92 + /** 原始计划里程 (原计调的数据) */
  93 + private Double jhlcOrig;
  94 +
  95 + /** 班次历时 */
  96 + private Integer bcsj;
  97 +
  98 + /**
  99 + * 班次类型 TODO:正常班次、出场、进场、加油、区间班次、放空班次、放大站班次、两点间空驶
  100 + */
  101 + private String bcType;
  102 +
  103 + /** 实际发车时间*/
  104 + private String fcsjActual;
  105 + /** 实际发车时间戳*/
  106 + @Transient
  107 + private Long fcsjActualTime;
  108 + /**实际终点时间 */
  109 + private String zdsjActual;
  110 + /** 实际终点时间戳*/
  111 + @Transient
  112 + private Long zdsjActualTime;
  113 +
  114 + /**班次状态 0 未执行 1 正在执行 2 已执行 -1 已烂班 */
  115 + private int status;
  116 +
  117 + private String adjustExps;
  118 +
  119 + /** 是否是临加班次 */
  120 + private boolean sflj;
  121 +
  122 + /** 备注*/
  123 + private String remarks;
  124 +
  125 + /**待发时间(格式 HH:mm) */
  126 + private String dfsj;
  127 +
  128 + //待发调试(是否自动调整)
  129 + private boolean dfAuto;
  130 +
  131 + /**待发时间戳 */
  132 + @Transient
  133 + private Long dfsjT;
  134 +
  135 + /** 指令下发状态 60: 已发送, 100: 设备确认收到, 200:驾驶员确认 0:失败 */
  136 + private Integer directiveState = -1;
  137 +
  138 + /** 子任务 */
  139 + @OneToMany(fetch = FetchType.LAZY, mappedBy = "schedule")
  140 + private Set<ChildTaskPlan> cTasks = new HashSet<>();
  141 +
  142 + /** 关联的公司名称 */
  143 + private String gsName;
  144 + /** 关联的公司编码 */
  145 + private String gsBm;
  146 + /** 关联的分公司名称 */
  147 + private String fgsName;
  148 + /** 关联的分公司编码 */
  149 + private String fgsBm;
  150 +
  151 + /**
  152 + * 漂移状态
  153 + * 1: 发车漂移
  154 + * 2:到站漂移
  155 + * 3:中途漂移
  156 + */
  157 + private int driftStatus = 0;
  158 +
  159 + public boolean isDfAuto() {
  160 + return dfAuto;
  161 + }
  162 +
  163 + public void setDfAuto(boolean dfAuto) {
  164 + this.dfAuto = dfAuto;
  165 + }
  166 +
  167 + public boolean isDestroy(){
  168 + return this.status == -1;
  169 + }
  170 +
  171 + @Override
  172 + public int hashCode() {
  173 + return (this.id + this.scheduleDateStr + this.xlBm + this.fcsj).hashCode();
  174 + }
  175 +
  176 + @Override
  177 + public boolean equals(Object obj) {
  178 + return this.id.equals(((ScheduleRealInfo)obj).getId());
  179 + }
  180 +
  181 + public Long getId() {
  182 + return id;
  183 + }
  184 +
  185 + public void setId(Long id) {
  186 + this.id = id;
  187 + }
  188 +
  189 + public Long getSpId() {
  190 + return spId;
  191 + }
  192 +
  193 + public void setSpId(Long spId) {
  194 + this.spId = spId;
  195 + }
  196 +
  197 + public Date getScheduleDate() {
  198 + return scheduleDate;
  199 + }
  200 +
  201 + public void setScheduleDate(Date scheduleDate) {
  202 + this.scheduleDate = scheduleDate;
  203 + }
  204 +
  205 + public String getScheduleDateStr() {
  206 + return scheduleDateStr;
  207 + }
  208 +
  209 + public void setScheduleDateStr(String scheduleDateStr) {
  210 + this.scheduleDateStr = scheduleDateStr;
  211 + }
  212 +
  213 + public String getRealExecDate() {
  214 + return realExecDate;
  215 + }
  216 +
  217 + public void setRealExecDate(String realExecDate) {
  218 + this.realExecDate = realExecDate;
  219 + }
  220 +
  221 + public String getXlName() {
  222 + return xlName;
  223 + }
  224 +
  225 + public void setXlName(String xlName) {
  226 + this.xlName = xlName;
  227 + }
  228 +
  229 + public String getXlBm() {
  230 + return xlBm;
  231 + }
  232 +
  233 + public void setXlBm(String xlBm) {
  234 + this.xlBm = xlBm;
  235 + }
  236 +
  237 + public String getLpName() {
  238 + return lpName;
  239 + }
  240 +
  241 + public void setLpName(String lpName) {
  242 + this.lpName = lpName;
  243 + }
  244 +
  245 + public String getClZbh() {
  246 + return clZbh;
  247 + }
  248 +
  249 + public void setClZbh(String clZbh) {
  250 + this.clZbh = clZbh;
  251 + }
  252 +
  253 + public String getEquipment_code() {
  254 + return equipment_code;
  255 + }
  256 +
  257 + public void setEquipment_code(String equipment_code) {
  258 + this.equipment_code = equipment_code;
  259 + }
  260 +
  261 + public String getjGh() {
  262 + return jGh;
  263 + }
  264 +
  265 + public void setjGh(String jGh) {
  266 + this.jGh = jGh;
  267 + }
  268 +
  269 + public String getjName() {
  270 + return jName;
  271 + }
  272 +
  273 + public void setjName(String jName) {
  274 + this.jName = jName;
  275 + }
  276 +
  277 + public String getsGh() {
  278 + return sGh;
  279 + }
  280 +
  281 + public void setsGh(String sGh) {
  282 + this.sGh = sGh;
  283 + }
  284 +
  285 + public String getsName() {
  286 + return sName;
  287 + }
  288 +
  289 + public void setsName(String sName) {
  290 + this.sName = sName;
  291 + }
  292 +
  293 + public String getXlDir() {
  294 + return xlDir;
  295 + }
  296 +
  297 + public void setXlDir(String xlDir) {
  298 + this.xlDir = xlDir;
  299 + }
  300 +
  301 + public String getQdzCode() {
  302 + return qdzCode;
  303 + }
  304 +
  305 + public void setQdzCode(String qdzCode) {
  306 + this.qdzCode = qdzCode;
  307 + }
  308 +
  309 + public String getQdzName() {
  310 + return qdzName;
  311 + }
  312 +
  313 + public void setQdzName(String qdzName) {
  314 + this.qdzName = qdzName;
  315 + }
  316 +
  317 + public String getZdzCode() {
  318 + return zdzCode;
  319 + }
  320 +
  321 + public void setZdzCode(String zdzCode) {
  322 + this.zdzCode = zdzCode;
  323 + }
  324 +
  325 + public String getZdzName() {
  326 + return zdzName;
  327 + }
  328 +
  329 + public void setZdzName(String zdzName) {
  330 + this.zdzName = zdzName;
  331 + }
  332 +
  333 + public String getFcsj() {
  334 + return fcsj;
  335 + }
  336 +
  337 + public void setFcsj(String fcsj) {
  338 + this.fcsj = fcsj;
  339 + }
  340 +
  341 + public Long getFcsjT() {
  342 + return fcsjT;
  343 + }
  344 +
  345 + public void setFcsjT(Long fcsjT) {
  346 + this.fcsjT = fcsjT;
  347 + }
  348 +
  349 + public String getZdsj() {
  350 + return zdsj;
  351 + }
  352 +
  353 + public void setZdsj(String zdsj) {
  354 + this.zdsj = zdsj;
  355 + }
  356 +
  357 + public Long getZdsjT() {
  358 + return zdsjT;
  359 + }
  360 +
  361 + public void setZdsjT(Long zdsjT) {
  362 + this.zdsjT = zdsjT;
  363 + }
  364 +
  365 + public Double getJhlc() {
  366 + return jhlc;
  367 + }
  368 +
  369 + public void setJhlc(Double jhlc) {
  370 + this.jhlc = jhlc;
  371 + }
  372 +
  373 + public Integer getBcsj() {
  374 + return bcsj;
  375 + }
  376 +
  377 + public void setBcsj(Integer bcsj) {
  378 + this.bcsj = bcsj;
  379 + }
  380 +
  381 + public String getBcType() {
  382 + return bcType;
  383 + }
  384 +
  385 + public void setBcType(String bcType) {
  386 + this.bcType = bcType;
  387 + }
  388 +
  389 + public String getFcsjActual() {
  390 + return fcsjActual;
  391 + }
  392 +
  393 + public void setFcsjActual(String fcsjActual) {
  394 + this.fcsjActual = fcsjActual;
  395 + }
  396 +
  397 + public Long getFcsjActualTime() {
  398 + return fcsjActualTime;
  399 + }
  400 +
  401 + public void setFcsjActualTime(Long fcsjActualTime) {
  402 + this.fcsjActualTime = fcsjActualTime;
  403 + }
  404 +
  405 + public String getZdsjActual() {
  406 + return zdsjActual;
  407 + }
  408 +
  409 + public void setZdsjActual(String zdsjActual) {
  410 + this.zdsjActual = zdsjActual;
  411 + }
  412 +
  413 + public Long getZdsjActualTime() {
  414 + return zdsjActualTime;
  415 + }
  416 +
  417 + public void setZdsjActualTime(Long zdsjActualTime) {
  418 + this.zdsjActualTime = zdsjActualTime;
  419 + }
  420 +
  421 + public int getStatus() {
  422 + return status;
  423 + }
  424 +
  425 + public void setStatus(int status) {
  426 + this.status = status;
  427 + }
  428 +
  429 + public String getAdjustExps() {
  430 + return adjustExps;
  431 + }
  432 +
  433 + public void setAdjustExps(String adjustExps) {
  434 + this.adjustExps = adjustExps;
  435 + }
  436 +
  437 + public boolean isSflj() {
  438 + return sflj;
  439 + }
  440 +
  441 + public void setSflj(boolean sflj) {
  442 + this.sflj = sflj;
  443 + }
  444 +
  445 + public String getRemarks() {
  446 + return remarks;
  447 + }
  448 +
  449 + public void setRemarks(String remarks) {
  450 + this.remarks = remarks;
  451 + }
  452 +
  453 + public String getDfsj() {
  454 + return dfsj;
  455 + }
  456 +
  457 + public void setDfsj(String dfsj) {
  458 + this.dfsj = dfsj;
  459 + }
  460 +
  461 + public Long getDfsjT() {
  462 + return dfsjT;
  463 + }
  464 +
  465 + public void setDfsjT(Long dfsjT) {
  466 + this.dfsjT = dfsjT;
  467 + }
  468 +
  469 + public Integer getDirectiveState() {
  470 + return directiveState;
  471 + }
  472 +
  473 + public void setDirectiveState(Integer directiveState) {
  474 + this.directiveState = directiveState;
  475 + }
  476 +
  477 + public Set<ChildTaskPlan> getcTasks() {
  478 + return cTasks;
  479 + }
  480 +
  481 + public void setcTasks(Set<ChildTaskPlan> cTasks) {
  482 + this.cTasks = cTasks;
  483 + }
  484 +
  485 + public String getGsName() {
  486 + return gsName;
  487 + }
  488 +
  489 + public void setGsName(String gsName) {
  490 + this.gsName = gsName;
  491 + }
  492 +
  493 + public String getGsBm() {
  494 + return gsBm;
  495 + }
  496 +
  497 + public void setGsBm(String gsBm) {
  498 + this.gsBm = gsBm;
  499 + }
  500 +
  501 + public String getFgsName() {
  502 + return fgsName;
  503 + }
  504 +
  505 + public void setFgsName(String fgsName) {
  506 + this.fgsName = fgsName;
  507 + }
  508 +
  509 + public String getFgsBm() {
  510 + return fgsBm;
  511 + }
  512 +
  513 + public void setFgsBm(String fgsBm) {
  514 + this.fgsBm = fgsBm;
  515 + }
  516 +
  517 + public Double getJhlcOrig() {
  518 + return jhlcOrig;
  519 + }
  520 +
  521 + public void setJhlcOrig(Double jhlcOrig) {
  522 + this.jhlcOrig = jhlcOrig;
  523 + }
  524 +
  525 + @Transient
  526 + private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
  527 + @Transient
  528 + private static DateTimeFormatter fmtyyyyMMddHHmm = DateTimeFormat.forPattern("yyyy-MM-ddHH:mm");
  529 +
  530 + /**
  531 + *
  532 + * @Title: setFcsjAll
  533 + * @Description: TODO(设置计划发车时间)
  534 + * @throws
  535 + */
  536 + public void setFcsjAll(Long fcsjT){
  537 + this.fcsjT = fcsjT;
  538 + this.fcsj = fmtHHmm.print(fcsjT);
  539 + }
  540 +
  541 + public void setDfsjAll(Long dfsjT) {
  542 + this.dfsjT = dfsjT;
  543 + this.dfsj = fmtHHmm.print(this.dfsjT);
  544 + }
  545 +
  546 + /**
  547 + *
  548 + * @Title: setFcsjActualAll
  549 + * @Description: TODO(设置实际发车时间 时间戳)
  550 + * @throws
  551 + */
  552 + public void setFcsjActualAll(Long t){
  553 + this.fcsjActualTime = t;
  554 + this.fcsjActual = fmtHHmm.print(t);
  555 + }
  556 +
  557 + /**
  558 + *
  559 + * @Title: setFcsjActualAll
  560 + * @Description: TODO(设置实际终点时间)
  561 + * @throws
  562 + */
  563 + public void setZdsjActualAll(Long t){
  564 + this.zdsjActualTime = t;
  565 + this.zdsjActual = fmtHHmm.print(t);
  566 + }
  567 +
  568 + public void setDfsjAll(String dfsj) {
  569 + this.dfsjT = fmtyyyyMMddHHmm.parseMillis(this.realExecDate + dfsj);
  570 + this.dfsj = dfsj;
  571 + }
  572 +
  573 + /**
  574 + *
  575 + * @Title: setFcsjActualAll
  576 + * @Description: TODO(设置实际发车时间 字符串)
  577 + * @throws
  578 + */
  579 + public void setFcsjActualAll(String fcsjActual){
  580 + this.fcsjActualTime = fmtyyyyMMddHHmm.parseMillis(this.realExecDate + fcsjActual);
  581 + this.fcsjActual = fcsjActual;
  582 + }
  583 +
  584 + /**
  585 + *
  586 + * @Title: setFcsjActualAll
  587 + * @Description: TODO(设置实际终点时间)
  588 + * @throws
  589 + */
  590 + public void setZdsjActualAll(String zdsjActual){
  591 + this.zdsjActualTime = fmtyyyyMMddHHmm.parseMillis(this.realExecDate + zdsjActual);
  592 + this.zdsjActual = zdsjActual;
  593 + }
  594 +
  595 + public int getDriftStatus() {
  596 + return driftStatus;
  597 + }
  598 +
  599 + public void setDriftStatus(int driftStatus) {
  600 + this.driftStatus = driftStatus;
  601 + }
  602 +
  603 +
  604 +}
src/main/java/com/bsth/entity/result/RevisedReport.java 0 → 100644
  1 +package com.bsth.entity.result;
  2 +
  3 +import java.util.Date;
  4 +
  5 +/**
  6 + * @ClassName: OperatingMileage.java
  7 + * @Description: TODO(营运里程修正报表)
  8 + * @author: YouRuiFeng
  9 + * @date: 2017-8-14 上午11:09:19
  10 + *
  11 + */
  12 +public class RevisedReport {
  13 + /** 公司编码 */
  14 + private String companyId;
  15 +
  16 + /** 分公司编码 */
  17 + private String subCompanyId;
  18 +
  19 + /** 公司名称 */
  20 + private String companyName;
  21 +
  22 + /** 分公司名称 */
  23 + private String subCompanyName;
  24 +
  25 + /** 线路编码 */
  26 + private String lineCode;
  27 +
  28 + /** 线路名称 */
  29 + private String lineName;
  30 +
  31 + /** 总营运公里 */
  32 + private double zgl;
  33 +
  34 + /** 实际运营公里 */
  35 + private double sjyygl;
  36 +
  37 + /** 实际空驶公里 */
  38 + private double sjksgl;
  39 +
  40 + /** 手动待发公里 */
  41 + private double sddfgl;
  42 +
  43 + /** 自动代发公里 */
  44 + private double zddfgl;
  45 +
  46 + /** 完全无Gps信号公里 */
  47 + private double wqwxhgl;
  48 +
  49 + /** 部分无Gps公里 */
  50 + private double bfwxhgl;
  51 +
  52 + /** 漂移公里 */
  53 + private double pygl;
  54 +
  55 + /** 临加公里 */
  56 + private double ljgl;
  57 +
  58 + /** 子任务 */
  59 + private double zrwgl;
  60 +
  61 + /** 总营运班次 */
  62 + private int zbc;
  63 +
  64 + /** 实际运营班次 */
  65 + private int sjyybc;
  66 +
  67 + /** 实际空驶班次 */
  68 + private int sjksbc;
  69 +
  70 + /** 手动待发班次 */
  71 + private int sddfbc;
  72 +
  73 + /** 自动代发班次 */
  74 + private int zddfbc;
  75 +
  76 + /** 完全无Gps信号班次 */
  77 + private int wqwxhbc;
  78 +
  79 + /** 部分无Gps班次 */
  80 + private int bfwxhbc;
  81 +
  82 + /** 漂移班次 */
  83 + private int pybc;
  84 +
  85 + /** 临加班次 */
  86 + private int ljbc;
  87 +
  88 + /** 子任务班次 */
  89 + private int zrwbc;
  90 +
  91 + /** 其他*/
  92 + private String other;
  93 +
  94 + /** 备注 */
  95 + private String remarks;
  96 +
  97 + /** 日期 (班次日期) */
  98 + private String rq;
  99 +
  100 + private Date createDate;
  101 +
  102 + public String getCompanyId() {
  103 + return companyId;
  104 + }
  105 +
  106 + public void setCompanyId(String companyId) {
  107 + this.companyId = companyId;
  108 + }
  109 +
  110 + public String getSubCompanyId() {
  111 + return subCompanyId;
  112 + }
  113 +
  114 + public void setSubCompanyId(String subCompanyId) {
  115 + this.subCompanyId = subCompanyId;
  116 + }
  117 +
  118 + public String getCompanyName() {
  119 + return companyName;
  120 + }
  121 +
  122 + public void setCompanyName(String companyName) {
  123 + this.companyName = companyName;
  124 + }
  125 +
  126 + public String getSubCompanyName() {
  127 + return subCompanyName;
  128 + }
  129 +
  130 + public void setSubCompanyName(String subCompanyName) {
  131 + this.subCompanyName = subCompanyName;
  132 + }
  133 +
  134 + public String getLineCode() {
  135 + return lineCode;
  136 + }
  137 +
  138 + public void setLineCode(String lineCode) {
  139 + this.lineCode = lineCode;
  140 + }
  141 +
  142 + public String getLineName() {
  143 + return lineName;
  144 + }
  145 +
  146 + public void setLineName(String lineName) {
  147 + this.lineName = lineName;
  148 + }
  149 +
  150 + public double getZgl() {
  151 + return zgl;
  152 + }
  153 +
  154 + public void setZgl(double zgl) {
  155 + this.zgl = zgl;
  156 + }
  157 +
  158 + public double getSjyygl() {
  159 + return sjyygl;
  160 + }
  161 +
  162 + public void setSjyygl(double sjyygl) {
  163 + this.sjyygl = sjyygl;
  164 + }
  165 +
  166 + public double getSjksgl() {
  167 + return sjksgl;
  168 + }
  169 +
  170 + public void setSjksgl(double sjksgl) {
  171 + this.sjksgl = sjksgl;
  172 + }
  173 +
  174 + public double getSddfgl() {
  175 + return sddfgl;
  176 + }
  177 +
  178 + public void setSddfgl(double sddfgl) {
  179 + this.sddfgl = sddfgl;
  180 + }
  181 +
  182 + public double getZddfgl() {
  183 + return zddfgl;
  184 + }
  185 +
  186 + public void setZddfgl(double zddfgl) {
  187 + this.zddfgl = zddfgl;
  188 + }
  189 +
  190 + public double getWqwxhgl() {
  191 + return wqwxhgl;
  192 + }
  193 +
  194 + public void setWqwxhgl(double wqwxhgl) {
  195 + this.wqwxhgl = wqwxhgl;
  196 + }
  197 +
  198 + public double getBfwxhgl() {
  199 + return bfwxhgl;
  200 + }
  201 +
  202 + public void setBfwxhgl(double bfwxhgl) {
  203 + this.bfwxhgl = bfwxhgl;
  204 + }
  205 +
  206 + public double getPygl() {
  207 + return pygl;
  208 + }
  209 +
  210 + public void setPygl(double pygl) {
  211 + this.pygl = pygl;
  212 + }
  213 +
  214 + public double getLjgl() {
  215 + return ljgl;
  216 + }
  217 +
  218 + public void setLjgl(double ljgl) {
  219 + this.ljgl = ljgl;
  220 + }
  221 +
  222 + public double getZrwgl() {
  223 + return zrwgl;
  224 + }
  225 +
  226 + public void setZrwgl(double zrwgl) {
  227 + this.zrwgl = zrwgl;
  228 + }
  229 +
  230 + public int getZbc() {
  231 + return zbc;
  232 + }
  233 +
  234 + public void setZbc(int zbc) {
  235 + this.zbc = zbc;
  236 + }
  237 +
  238 + public int getSjyybc() {
  239 + return sjyybc;
  240 + }
  241 +
  242 + public void setSjyybc(int sjyybc) {
  243 + this.sjyybc = sjyybc;
  244 + }
  245 +
  246 + public int getSjksbc() {
  247 + return sjksbc;
  248 + }
  249 +
  250 + public void setSjksbc(int sjksbc) {
  251 + this.sjksbc = sjksbc;
  252 + }
  253 +
  254 + public int getSddfbc() {
  255 + return sddfbc;
  256 + }
  257 +
  258 + public void setSddfbc(int sddfbc) {
  259 + this.sddfbc = sddfbc;
  260 + }
  261 +
  262 + public int getZddfbc() {
  263 + return zddfbc;
  264 + }
  265 +
  266 + public void setZddfbc(int zddfbc) {
  267 + this.zddfbc = zddfbc;
  268 + }
  269 +
  270 + public int getWqwxhbc() {
  271 + return wqwxhbc;
  272 + }
  273 +
  274 + public void setWqwxhbc(int wqwxhbc) {
  275 + this.wqwxhbc = wqwxhbc;
  276 + }
  277 +
  278 + public int getBfwxhbc() {
  279 + return bfwxhbc;
  280 + }
  281 +
  282 + public void setBfwxhbc(int bfwxhbc) {
  283 + this.bfwxhbc = bfwxhbc;
  284 + }
  285 +
  286 + public int getPybc() {
  287 + return pybc;
  288 + }
  289 +
  290 + public void setPybc(int pybc) {
  291 + this.pybc = pybc;
  292 + }
  293 +
  294 + public int getLjbc() {
  295 + return ljbc;
  296 + }
  297 +
  298 + public void setLjbc(int ljbc) {
  299 + this.ljbc = ljbc;
  300 + }
  301 +
  302 + public int getZrwbc() {
  303 + return zrwbc;
  304 + }
  305 +
  306 + public void setZrwbc(int zrwbc) {
  307 + this.zrwbc = zrwbc;
  308 + }
  309 +
  310 + public String getOther() {
  311 + return other;
  312 + }
  313 +
  314 + public void setOther(String other) {
  315 + this.other = other;
  316 + }
  317 +
  318 + public String getRemarks() {
  319 + return remarks;
  320 + }
  321 +
  322 + public void setRemarks(String remarks) {
  323 + this.remarks = remarks;
  324 + }
  325 +
  326 + public String getRq() {
  327 + return rq;
  328 + }
  329 +
  330 + public void setRq(String rq) {
  331 + this.rq = rq;
  332 + }
  333 +
  334 + public Date getCreateDate() {
  335 + return createDate;
  336 + }
  337 +
  338 + public void setCreateDate(Date createDate) {
  339 + this.createDate = createDate;
  340 + }
  341 +
  342 +
  343 +}
src/main/java/com/bsth/handler/ReportCalculationHandler.java 0 → 100644
  1 +package com.bsth.handler;
  2 +
  3 +import java.sql.PreparedStatement;
  4 +import java.sql.SQLException;
  5 +import java.util.List;
  6 +
  7 +import org.joda.time.DateTime;
  8 +import org.slf4j.Logger;
  9 +import org.slf4j.LoggerFactory;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.jdbc.core.BatchPreparedStatementSetter;
  12 +import org.springframework.jdbc.core.JdbcTemplate;
  13 +import org.springframework.jdbc.datasource.DataSourceTransactionManager;
  14 +import org.springframework.stereotype.Component;
  15 +import org.springframework.transaction.TransactionDefinition;
  16 +import org.springframework.transaction.TransactionStatus;
  17 +import org.springframework.transaction.support.DefaultTransactionDefinition;
  18 +
  19 +import com.bsth.entity.result.RevisedReport;
  20 +import com.bsth.service.ScheduleRealInfoService;
  21 +
  22 +
  23 +
  24 +/**
  25 + * @ClassName: MileageCalculationHandler.java
  26 + * @Description: TODO(营运公里处理程序)
  27 + * @author: YouRuiFeng
  28 + * @date: 2017-8-14 下午2:06:22
  29 + *
  30 + */
  31 +@Component
  32 +public class ReportCalculationHandler {
  33 +
  34 + @Autowired
  35 + ScheduleRealInfoService scheduleRealInfoService;
  36 +
  37 + @Autowired
  38 + JdbcTemplate jdbcTemplate;
  39 +
  40 + Logger logger = LoggerFactory.getLogger(this.getClass());
  41 +
  42 + public void calc() {
  43 + try {
  44 + DateTime dt = DateTime.now();
  45 + dt = dt.plusDays(-2);//计算两天前的数据
  46 + String rq = dt.toString("yyyy-MM-dd");
  47 +// String rq = "2017-08-29";
  48 + logger.info("开始计算报表: " + rq);
  49 + List<RevisedReport> oMList = scheduleRealInfoService.mileageCorrectionTj(rq);
  50 + logger.info("报表计算完成: " + rq);
  51 + save(oMList);
  52 + } catch (Exception e) {
  53 + logger.error("", e);
  54 + }
  55 + }
  56 +
  57 + private void save(final List<RevisedReport> list) {
  58 + //编程式事务
  59 + DataSourceTransactionManager tran = new DataSourceTransactionManager(jdbcTemplate.getDataSource());
  60 + DefaultTransactionDefinition def = new DefaultTransactionDefinition();
  61 + def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
  62 + TransactionStatus status = tran.getTransaction(def);
  63 +
  64 + String sqlMileage = "insert into calc_mileage(company_id, sub_company_id, company_name, sub_company_name, line_code, line_name, " +
  65 + "zyygl, sjyygl, sjksgl, sddfgl, zddfgl, wqwxhgl, bfwxhgl, pygl, ljgl, zrwgl, other, rq, remarks, create_date) " +
  66 + " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  67 +
  68 + try {
  69 + jdbcTemplate.batchUpdate(sqlMileage, new BatchPreparedStatementSetter() {
  70 + @Override
  71 + public void setValues(PreparedStatement ps, int i) throws SQLException {
  72 + RevisedReport report = list.get(i);
  73 + ps.setString(1, report.getCompanyId());
  74 + ps.setString(2, report.getSubCompanyId());
  75 + ps.setString(3, report.getCompanyName());
  76 + ps.setString(4, report.getSubCompanyName());
  77 + ps.setString(5, report.getLineCode());
  78 + ps.setString(6, report.getLineName());
  79 + ps.setDouble(7, report.getZgl());
  80 + ps.setDouble(8, report.getSjyygl());
  81 + ps.setDouble(9, report.getSjksgl());
  82 + ps.setDouble(10, report.getSddfgl());
  83 + ps.setDouble(11, report.getZddfgl());
  84 + ps.setDouble(12, report.getWqwxhgl());
  85 + ps.setDouble(13, report.getBfwxhgl());
  86 + ps.setDouble(14, report.getPygl());
  87 + ps.setDouble(15, report.getLjgl());
  88 + ps.setDouble(16, report.getZrwgl());
  89 + ps.setString(17, report.getOther());
  90 + ps.setString(18, report.getRq());
  91 + ps.setString(19, report.getRemarks());
  92 + ps.setDate(20, new java.sql.Date(report.getCreateDate().getTime()));
  93 + }
  94 +
  95 + @Override
  96 + public int getBatchSize() {
  97 + return list.size();
  98 + }
  99 + });
  100 +
  101 + String sqlSchedule = "insert into calc_schedule(company_id, sub_company_id, company_name, sub_company_name, line_code, line_name, " +
  102 + "zyybc, sjyybc, sjksbc, sddfbc, zddfbc, wqwxhbc, bfwxhbc, pybc, ljbc, zrwbc, other, rq, remarks, create_date) " +
  103 + " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  104 +
  105 + jdbcTemplate.batchUpdate(sqlSchedule, new BatchPreparedStatementSetter() {
  106 + @Override
  107 + public void setValues(PreparedStatement ps, int i) throws SQLException {
  108 + RevisedReport report = list.get(i);
  109 + ps.setString(1, report.getCompanyId());
  110 + ps.setString(2, report.getSubCompanyId());
  111 + ps.setString(3, report.getCompanyName());
  112 + ps.setString(4, report.getSubCompanyName());
  113 + ps.setString(5, report.getLineCode());
  114 + ps.setString(6, report.getLineName());
  115 + ps.setInt(7, report.getZbc());
  116 + ps.setInt(8, report.getSjyybc());
  117 + ps.setInt(9, report.getSjksbc());
  118 + ps.setInt(10, report.getSddfbc());
  119 + ps.setInt(11, report.getZddfbc());
  120 + ps.setInt(12, report.getWqwxhbc());
  121 + ps.setInt(13, report.getBfwxhbc());
  122 + ps.setInt(14, report.getPybc());
  123 + ps.setInt(15, report.getLjbc());
  124 + ps.setInt(16, report.getZrwbc());
  125 + ps.setString(17, report.getOther());
  126 + ps.setString(18, report.getRq());
  127 + ps.setString(19, report.getRemarks());
  128 + ps.setDate(20, new java.sql.Date(report.getCreateDate().getTime()));
  129 + }
  130 +
  131 + @Override
  132 + public int getBatchSize() {
  133 + return list.size();
  134 + }
  135 + });
  136 +
  137 + tran.commit(status);
  138 + } catch (Exception e) {
  139 + tran.rollback(status);
  140 + logger.error("", e);
  141 + }
  142 + }
  143 +}
src/main/java/com/bsth/handler/personnelUpdateHandler.java deleted 100644 → 0
1 -package com.bsth.handler;  
2 -  
3 -import com.alibaba.fastjson.JSONArray;  
4 -import com.alibaba.fastjson.JSONObject;  
5 -import com.bsth.entity.Personnel;  
6 -import com.bsth.repository.PersonnelRepository;  
7 -import com.bsth.service.PersonnelService;  
8 -import com.bsth.util.DBUtils_Personnel;  
9 -import com.bsth.util.XmlToJson;  
10 -import com.bsth.wsdl.PJDataSerivce;  
11 -import com.bsth.wsdl.PJDataSerivceSoap;  
12 -import org.hibernate.collection.internal.PersistentBag;  
13 -import org.joda.time.DateTime;  
14 -import org.slf4j.Logger;  
15 -import org.slf4j.LoggerFactory;  
16 -import org.springframework.beans.factory.annotation.Autowired;  
17 -import org.springframework.jdbc.core.BeanPropertyRowMapper;  
18 -import org.springframework.jdbc.core.JdbcTemplate;  
19 -import org.springframework.stereotype.Component;  
20 -  
21 -import javax.xml.namespace.QName;  
22 -import java.net.URL;  
23 -import java.sql.Connection;  
24 -import java.sql.PreparedStatement;  
25 -import java.sql.ResultSet;  
26 -import java.sql.SQLException;  
27 -import java.util.ArrayList;  
28 -import java.util.HashMap;  
29 -import java.util.Iterator;  
30 -import java.util.List;  
31 -import java.util.Map;  
32 -  
33 -  
34 -@Component  
35 -public class personnelUpdateHandler {  
36 -  
37 - @Autowired  
38 - PersonnelService personnelService;  
39 -  
40 - @Autowired  
41 - PersonnelRepository repository;  
42 -  
43 - @Autowired  
44 - JdbcTemplate jdbcTemplate;  
45 -  
46 - Logger logger = LoggerFactory.getLogger(this.getClass());  
47 -  
48 - private static final QName SERVICE_NAME = new QName("http://www.pd-transport.com/", "PJDataSerivce");  
49 -  
50 - public void sync() {  
51 -  
52 - URL wsdlURL = PJDataSerivce.WSDL_LOCATION;  
53 -  
54 - PJDataSerivce ss = new PJDataSerivce(wsdlURL, SERVICE_NAME);  
55 - PJDataSerivceSoap port = ss.getPJDataSerivceSoap12();  
56 -  
57 -  
58 -  
59 -  
60 - try {  
61 - Connection conn ;  
62 - PreparedStatement ps;  
63 - ResultSet rs = null ;  
64 - DateTime dt = DateTime.now();  
65 - String rq = dt.toString("yyyy-MM-dd");  
66 - logger.info("同步人员数据: " + rq);  
67 - System.out.println("Invoking getEmployee...");  
68 - String _getEmployee_idCard = "";  
69 - /*String unintCode_sn = "KD01.0110";  
70 - String _getEmployee_sn = port.getEmployee(unintCode_sn, _getEmployee_idCard);  
71 - String unintCode_jg = "KD01.0111";  
72 - String _getEmployee_jg = port.getEmployee(unintCode_jg, _getEmployee_idCard);  
73 - String unintCode_yg = "KD01.0113";  
74 - String _getEmployee_yg = port.getEmployee(unintCode_yg, _getEmployee_idCard);  
75 - String unintCode_nh = "KD01.0112";  
76 - String _getEmployee_nh = port.getEmployee(unintCode_nh, _getEmployee_idCard);*/  
77 -  
78 - logger.info("金蝶数据同步到:bsth_c_personnel 表,开始");  
79 -  
80 - // 把所有人员设为停用状态,然后在用金蝶人员数据匹配,匹配上的设为在职  
81 - conn = DBUtils_Personnel.getConnection();  
82 - // 服务器  
83 - ps = conn.prepareStatement("UPDATE control.bsth_c_personnel SET destroy = 1");  
84 - // 本地  
85 -// ps = conn.prepareStatement("UPDATE pd_control.bsth_c_personnel SET destroy = 1");  
86 - ps.executeUpdate();  
87 -  
88 - // 取出所有调度人员,转存map  
89 - Map<String, Personnel> personnelMap= new HashMap<>();  
90 - Iterator<Personnel> perIterator=repository.findAll().iterator();  
91 -// List<Personnel> personnelList = new ArrayList<>();  
92 - while(perIterator.hasNext()){  
93 - Personnel per=perIterator.next();  
94 - personnelMap.put(per.getJobCode(),per);  
95 - // 工号补全6位  
96 -// String JobCodeori = per.getJobCodeori();  
97 -// while (JobCodeori.length() < 6){  
98 -// JobCodeori = "0"+JobCodeori;  
99 -// }  
100 -// per.setJobCodeori(JobCodeori);  
101 -// per.setJobCode(per.getCompanyCode()+"-"+JobCodeori);  
102 -// personnelList.add(per);  
103 - }  
104 - // 工号补全6位  
105 -// repository.save(personnelList);  
106 -  
107 - for(int i=0;i<4;i++){  
108 - String unintCode = "KD01.011"+i;  
109 - String _getEmployee__return = port.getEmployee(unintCode, _getEmployee_idCard);  
110 - String _getRetiredInfor_unintCode = null;  
111 - System.out.println("Invoking getRetiredInfor...");  
112 - String _getRetiredInfor_beginDate = "1900-01-01";  
113 - String _getRetiredInfor_endDate = rq;  
114 - JSONArray retiredInfor = new JSONArray();  
115 - if(_getRetiredInfor_unintCode != null){  
116 - String _getRetiredInfor__return = port.getRetiredInfor(unintCode, _getRetiredInfor_beginDate, _getRetiredInfor_endDate);  
117 - JSONObject jsonRetiredInfor= XmlToJson.xml2Json(_getRetiredInfor__return);  
118 - retiredInfor = JSONArray.parseArray(jsonRetiredInfor.get("Retire").toString());  
119 - }  
120 -  
121 - personnelService.matchPersonnel(retiredInfor,_getEmployee__return,i,personnelMap);  
122 - }  
123 -  
124 - logger.info("金蝶数据同步到:bsth_c_personnel 表,完成");  
125 -  
126 - logger.info("把bsth_c_personnel备份到:personnel库的bsth_c_personnel"+rq+" 表");  
127 - String sql="CREATE TABLE `bsth_c_personnel"+rq+"` (" +  
128 - " `id` int(11) NOT NULL ," +//AUTO_INCREMENT  
129 - " `branche_company` varchar(255) DEFAULT NULL," +  
130 - " `branche_company_code` varchar(255) DEFAULT NULL," +  
131 - " `company` varchar(255) DEFAULT NULL," +  
132 - " `company_code` varchar(255) NOT NULL," +  
133 - " `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP," +  
134 - " `descriptions` varchar(255) DEFAULT NULL," +  
135 - " `ic_card_code` varchar(255) DEFAULT NULL," +  
136 - " `job_code` varchar(255) NOT NULL," +  
137 - " `line_code` varchar(255) DEFAULT NULL," +  
138 - " `papers_code` varchar(255) DEFAULT NULL," +  
139 - " `personnel_code` varchar(255) DEFAULT NULL," +  
140 - " `personnel_img` varchar(255) DEFAULT NULL," +  
141 - " `personnel_name` varchar(255) NOT NULL," +  
142 - " `personnel_type` varchar(255) DEFAULT NULL," +  
143 - " `posts` varchar(255) DEFAULT NULL," +  
144 - " `telphone` varchar(255) DEFAULT NULL," +  
145 - " `update_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP," +  
146 - " `create_by` int(11) DEFAULT NULL," +  
147 - " `update_by` int(11) DEFAULT NULL," +  
148 - " `card` varchar(255) DEFAULT NULL," +  
149 - " `ic_rfid` varchar(255) DEFAULT NULL," +  
150 - " `id_rfid` varchar(255) DEFAULT NULL," +  
151 - " `tag_rfid` varchar(255) DEFAULT NULL," +  
152 - " `remark` varchar(255) DEFAULT NULL," +  
153 - " `job_codeori` varchar(255) NOT NULL," +  
154 - " `destroy` int(11)," +  
155 - " `jd_codeori` varchar(255)," +  
156 - "PRIMARY KEY (`id`)"+  
157 - ") ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8";  
158 -  
159 - int returnRs;  
160 - try {  
161 - logger.info("创建personnel库的bsth_c_personnel"+rq+" 表");  
162 -// conn = DBUtils_Personnel.getConnection();  
163 - ps = conn.prepareStatement("DROP TABLE IF EXISTS `bsth_c_personnel"+rq+"`");  
164 - ps.executeUpdate();  
165 - ps = conn.prepareStatement(sql);  
166 - returnRs = ps.executeUpdate();  
167 - if(returnRs == 0){  
168 - logger.info("备份数据到personnel库的bsth_c_personnel"+rq+" 表,开始");  
169 - // 服务器  
170 - sql = "INSERT into `bsth_c_personnel"+rq+"` (SELECT * FROM control.bsth_c_personnel)";  
171 - // 本地  
172 -// sql = "INSERT into `bsth_c_personnel"+rq+"` (SELECT * FROM pd_control.bsth_c_personnel)";  
173 - ps = conn.prepareStatement(sql);  
174 - returnRs = ps.executeUpdate();  
175 -  
176 - logger.info("备份数据到personnel库的bsth_c_personnel"+rq+" 表,完成");  
177 - }  
178 - } catch (SQLException e) {  
179 - // TODO Auto-generated catch block  
180 - e.printStackTrace();  
181 - }finally {  
182 - DBUtils_Personnel.close(rs, ps, conn);  
183 - }  
184 -  
185 -  
186 -// logger.info("把bsth_c_personnel_copy数据同步到:bsth_c_personnel 表,开始");  
187 -// List<Personnel> retuenList = jdbcTemplate.query("select * from bsth_c_personnel_copy",new BeanPropertyRowMapper(Personnel.class));  
188 -// repository.save(retuenList);  
189 -// logger.info("bsth_c_personnel_copy数据同步到:bsth_c_personnel 表,完成");  
190 -// jdbcTemplate.execute()  
191 -// // 备份数据  
192 -// jdbcTemplate.update("INSERT into `bsth_c_personnel"+rq+"` (SELECT * FROM pd_control.bsth_c_personnel)");  
193 -// jdbcTemplate.update("insert into bsth_c_personnel_copy select * from bsth_c_personnel");  
194 -// String _getEmployee__return = _getEmployee_sn + _getEmployee_jg + _getEmployee_yg + _getEmployee_nh;  
195 -// JSONObject jsonInfor = XmlToJson.xml2Json(_getEmployee__return);  
196 -// System.out.println("getEmployee.result=" + _getEmployee__return);  
197 -  
198 - logger.info("同步完成: " + rq);  
199 - } catch (Exception e) {  
200 - logger.error("", e);  
201 - }  
202 - }  
203 -}  
src/main/java/com/bsth/repository/PersonnelCopyRepository.java deleted 100644 → 0
1 -package com.bsth.repository;  
2 -  
3 -import com.bsth.entity.PersonnelCopy;  
4 -import org.springframework.data.repository.PagingAndSortingRepository;  
5 -import org.springframework.stereotype.Repository;  
6 -  
7 -@Repository  
8 -public interface PersonnelCopyRepository extends PagingAndSortingRepository<PersonnelCopy, Long> {  
9 -  
10 -// @Query(value="select s from Personnel s where s.id in(select e.jsy.id from EmployeeConfigInfo e where e.xl.id = ?1) ")  
11 -// List<Personnel> findJsysByLineId(Integer lineId);  
12 -//  
13 -// @Query(value="select s from Personnel s where s.id in(select e.spy.id from EmployeeConfigInfo e where e.xl.id = ?1) ")  
14 -// List<Personnel> findSpysByLineId(Integer lineId);  
15 -  
16 -// @Query(value="select s from Personnel s ")  
17 -// List<Personnel> findAll();  
18 -  
19 -}  
src/main/java/com/bsth/repository/PersonnelRepository.java deleted 100644 → 0
1 -package com.bsth.repository;  
2 -  
3 -import com.bsth.entity.Personnel;  
4 -import org.springframework.data.jpa.repository.Query;  
5 -import org.springframework.data.repository.PagingAndSortingRepository;  
6 -import org.springframework.stereotype.Repository;  
7 -  
8 -import java.util.List;  
9 -  
10 -@Repository  
11 -public interface PersonnelRepository extends PagingAndSortingRepository<Personnel, Long> {  
12 -  
13 -// @Query(value="select s from Personnel s where s.id in(select e.jsy.id from EmployeeConfigInfo e where e.xl.id = ?1) ")  
14 -// List<Personnel> findJsysByLineId(Integer lineId);  
15 -//  
16 -// @Query(value="select s from Personnel s where s.id in(select e.spy.id from EmployeeConfigInfo e where e.xl.id = ?1) ")  
17 -// List<Personnel> findSpysByLineId(Integer lineId);  
18 -  
19 -// @Query(value="select s from Personnel s ")  
20 -// List<Personnel> findAll();  
21 -  
22 -}  
src/main/java/com/bsth/repository/ScheduleRealInfoRepository.java 0 → 100644
  1 +package com.bsth.repository;
  2 +
  3 +import com.bsth.entity.ScheduleRealInfo;
  4 +import org.springframework.data.jpa.repository.EntityGraph;
  5 +import org.springframework.data.jpa.repository.Query;
  6 +import org.springframework.data.repository.PagingAndSortingRepository;
  7 +import org.springframework.stereotype.Repository;
  8 +
  9 +import java.util.List;
  10 +
  11 +@Repository
  12 +public interface ScheduleRealInfoRepository extends PagingAndSortingRepository<ScheduleRealInfo, Long> {
  13 +
  14 + //按照时间段统计
  15 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  16 + @Query("select DISTINCT s from ScheduleRealInfo s where s.scheduleDateStr=?1 order by s.xlBm")
  17 + List<ScheduleRealInfo> scheduleByDateAndLineTj(String scheduleDateStr);
  18 +
  19 +}
src/main/java/com/bsth/service/CulateService.java 0 → 100644
  1 +package com.bsth.service;
  2 +
  3 +import java.util.List;
  4 +
  5 +import com.bsth.entity.ScheduleRealInfo;
  6 +
  7 +public interface CulateService {
  8 +
  9 + double culateKsgl(List<ScheduleRealInfo> lists);
  10 +
  11 + double culateJccgl(List<ScheduleRealInfo> lists);
  12 +
  13 + double culateSjgl(List<ScheduleRealInfo> lists);
  14 +
  15 + double culateLjgl(List<ScheduleRealInfo> lists);
  16 +
  17 + double culateZrwgl(List<ScheduleRealInfo> lists);//所有子任务统计
  18 +
  19 + double culatesddfgl(List<ScheduleRealInfo> list);//手动待发调整公里
  20 +
  21 + double culatezddfgl(List<ScheduleRealInfo> list);//自动待发调整公里
  22 +
  23 + double culateSjgldf(ScheduleRealInfo list);//计算待发实际运营公里
  24 +
  25 + double culateSjgl(ScheduleRealInfo scheduleRealInfo);//一个班次实际公里
  26 +
  27 + double culateLjgl(ScheduleRealInfo scheduleRealInfo);//一个班次临加公里
  28 +
  29 + int culateLjbc(List<ScheduleRealInfo> lists);
  30 +
  31 + int culateSjbc(List<ScheduleRealInfo> lists);
  32 +
  33 + int culateKsbc(List<ScheduleRealInfo> lists);
  34 +
  35 + int culateJccbc(List<ScheduleRealInfo> lists);
  36 +
  37 + int culatesddfbc(List<ScheduleRealInfo> list);
  38 +
  39 + int culatezddfbc(List<ScheduleRealInfo> list);
  40 +
  41 + int culateZrwbc(List<ScheduleRealInfo> lists);
  42 +
  43 +}
  44 +
src/main/java/com/bsth/service/PersonnelService.java deleted 100644 → 0
1 -package com.bsth.service;  
2 -  
3 -import com.alibaba.fastjson.JSONArray;  
4 -import com.bsth.entity.Personnel;  
5 -import com.bsth.entity.PersonnelCopy;  
6 -  
7 -import java.util.List;  
8 -import java.util.Map;  
9 -  
10 -public interface PersonnelService {  
11 - List<PersonnelCopy> matchPersonnel(JSONArray retiredInfor,String jobCode, int i,Map<String, Personnel> personnelMap);  
12 -}  
src/main/java/com/bsth/service/ScheduleRealInfoService.java 0 → 100644
  1 +package com.bsth.service;
  2 +
  3 +import com.bsth.entity.result.RevisedReport;
  4 +
  5 +import java.util.List;
  6 +
  7 + /**
  8 + * @ClassName: ScheduleRealInfoService.java
  9 + * @Description: TODO()
  10 + * @author: YouRuiFeng
  11 + * @date: 2017-8-15 下午1:36:58
  12 + *
  13 + */
  14 +public interface ScheduleRealInfoService {
  15 + List<RevisedReport> mileageCorrectionTj(String scheduleDateStr);
  16 +}
src/main/java/com/bsth/service/impl/CulateServiceImpl.java 0 → 100644
  1 +package com.bsth.service.impl;
  2 +
  3 +import java.util.Iterator;
  4 +import java.util.List;
  5 +import java.util.Set;
  6 +
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.jdbc.core.JdbcTemplate;
  9 +import org.springframework.stereotype.Service;
  10 +
  11 +import com.bsth.entity.ChildTaskPlan;
  12 +import com.bsth.entity.ScheduleRealInfo;
  13 +import com.bsth.service.CulateService;
  14 +import com.bsth.util.Arith;
  15 +
  16 +@Service
  17 +public class CulateServiceImpl implements CulateService{
  18 +
  19 + @Autowired
  20 + JdbcTemplate jdbcTemplate;
  21 +
  22 + @Override
  23 + public double culateKsgl(List<ScheduleRealInfo> lists) {
  24 + // TODO Auto-generated method stub
  25 + double ksgl =0;
  26 + for (int i = 0; i < lists.size(); i++) {
  27 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  28 + if (!(scheduleRealInfo.getBcType().equals("in")
  29 + || scheduleRealInfo.getBcType().equals("out"))) {
  30 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  31 + if(!childTaskPlans.isEmpty()){
  32 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  33 + while (it.hasNext()) {
  34 + ChildTaskPlan childTaskPlan = it.next();
  35 + if(childTaskPlan.getMileageType().equals("empty")){
  36 + if (!childTaskPlan.isDestroy()) {
  37 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  38 + ksgl=Arith.add(ksgl,jhgl);
  39 + }
  40 + }
  41 + }
  42 + }
  43 + }
  44 + }
  45 + return ksgl;
  46 + }
  47 +
  48 + @Override
  49 + public double culateJccgl(List<ScheduleRealInfo> lists) {
  50 + // TODO Auto-generated method stub
  51 + double jcclc =0;
  52 + for (int i = 0; i < lists.size(); i++) {
  53 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  54 + if (scheduleRealInfo.getBcType().equals("in")
  55 + || scheduleRealInfo.getBcType().equals("out")||scheduleRealInfo.getBcType().equals("ldks")) {
  56 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  57 + if(childTaskPlans.isEmpty()){
  58 + if(!scheduleRealInfo.isDestroy())
  59 + jcclc =Arith.add(jcclc, scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc());
  60 + }else{
  61 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  62 + while (it.hasNext()) {
  63 + ChildTaskPlan childTaskPlan = it.next();
  64 + if(childTaskPlan.getMileageType().equals("empty")){
  65 + if (!childTaskPlan.isDestroy()) {
  66 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  67 + jcclc=Arith.add(jcclc,jhgl);
  68 + }
  69 + }
  70 + }
  71 + }
  72 + }
  73 + }
  74 + return jcclc;
  75 + }
  76 +
  77 + @Override
  78 + public int culateKsbc(List<ScheduleRealInfo> lists) {
  79 + // TODO Auto-generated method stub
  80 + int ksbc =0;
  81 + for (int i = 0; i < lists.size(); i++) {
  82 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  83 + if (!(scheduleRealInfo.getBcType().equals("in")
  84 + || scheduleRealInfo.getBcType().equals("out"))) {
  85 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  86 + if(!childTaskPlans.isEmpty()){
  87 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  88 + while (it.hasNext()) {
  89 + ChildTaskPlan childTaskPlan = it.next();
  90 + if(childTaskPlan.getMileageType().equals("empty")){
  91 + if (!childTaskPlan.isDestroy()) {
  92 + ksbc++;
  93 + }
  94 + }
  95 + }
  96 + }
  97 + }
  98 + }
  99 + return ksbc;
  100 + }
  101 +
  102 + @Override
  103 + public int culateJccbc(List<ScheduleRealInfo> lists) {
  104 + // TODO Auto-generated method stub
  105 + int jccbc =0;
  106 + for (int i = 0; i < lists.size(); i++) {
  107 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  108 + if (scheduleRealInfo.getBcType().equals("in")
  109 + || scheduleRealInfo.getBcType().equals("out")||scheduleRealInfo.getBcType().equals("ldks")) {
  110 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  111 + if(childTaskPlans.isEmpty()){
  112 + if(!scheduleRealInfo.isDestroy())
  113 + jccbc++;
  114 + }else{
  115 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  116 + while (it.hasNext()) {
  117 + ChildTaskPlan childTaskPlan = it.next();
  118 + if(childTaskPlan.getMileageType().equals("empty")){
  119 + if (!childTaskPlan.isDestroy()) {
  120 + jccbc++;
  121 + }
  122 + }
  123 + }
  124 + }
  125 + }
  126 + }
  127 + return jccbc;
  128 + }
  129 +
  130 + @Override
  131 + public double culateSjgl(List<ScheduleRealInfo> lists) {
  132 + // TODO Auto-generated method stub
  133 + double sjgl =0.0;
  134 + for (int i = 0; i < lists.size(); i++) {
  135 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  136 + sjgl =Arith.add(sjgl,culateSjgl(scheduleRealInfo));
  137 + }
  138 + return sjgl;
  139 + }
  140 + @Override
  141 + public double culateSjgl(ScheduleRealInfo scheduleRealInfo) {
  142 + // TODO Auto-generated method stub
  143 + double sjgl =0.0;
  144 + if (!isInOut(scheduleRealInfo)) {
  145 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  146 + if(!scheduleRealInfo.isSflj()){
  147 + if(childTaskPlans.isEmpty()){
  148 + if(!scheduleRealInfo.isDestroy()){
  149 + double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig();
  150 + double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
  151 + if(jhlc-jhlcOrig>0){
  152 + sjgl=Arith.add(sjgl,jhlcOrig);
  153 + }else{
  154 + sjgl=Arith.add(sjgl,jhlc);
  155 + }
  156 +
  157 + }
  158 + }else{
  159 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  160 + while (it.hasNext()) {
  161 + ChildTaskPlan childTaskPlan = it.next();
  162 + if(childTaskPlan.getMileageType().equals("service")){
  163 + if (!childTaskPlan.isDestroy()) {
  164 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  165 + sjgl=Arith.add(sjgl,jhgl);
  166 + }
  167 + }
  168 + }
  169 + }
  170 + }
  171 + }
  172 + return sjgl;
  173 + }
  174 +
  175 + @Override
  176 + public int culateSjbc(List<ScheduleRealInfo> lists) {
  177 + // TODO Auto-generated method stub
  178 + int sjbc=0;
  179 + for (int i = 0; i < lists.size(); i++) {
  180 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  181 + if (!isInOut(scheduleRealInfo)) {
  182 + if(!scheduleRealInfo.isSflj()){
  183 + sjbc++;
  184 + }
  185 + }
  186 + }
  187 + return sjbc;
  188 + }
  189 +
  190 +
  191 + @Override
  192 + public double culateLjgl(ScheduleRealInfo scheduleRealInfo) {
  193 + // TODO Auto-generated method stub
  194 + double ljgl=0.0;
  195 + if (!isInOut(scheduleRealInfo)) {
  196 + if(!scheduleRealInfo.isDestroy()){
  197 + if(scheduleRealInfo.isSflj()){
  198 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  199 + if(childTaskPlans.isEmpty()){
  200 + ljgl=Arith.add(ljgl,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc());
  201 + }else{
  202 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  203 + while (it.hasNext()) {
  204 + ChildTaskPlan childTaskPlan = it.next();
  205 + if(childTaskPlan.getMileageType().equals("service")){
  206 + if (!childTaskPlan.isDestroy()) {
  207 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  208 + ljgl=Arith.add(ljgl,jhgl);
  209 + }
  210 + }
  211 + }
  212 + }
  213 + }else{
  214 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  215 + if(childTaskPlans.isEmpty()){
  216 + double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
  217 + double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig();
  218 + double zjlc=Arith.sub(jhlc, jhlcOrig);
  219 + if(zjlc>0){
  220 + ljgl=Arith.add(zjlc, ljgl);
  221 + }
  222 + }
  223 + }
  224 + }
  225 +
  226 + }
  227 + return ljgl;
  228 + }
  229 +
  230 +
  231 + @Override
  232 + public double culateLjgl(List<ScheduleRealInfo> lists) {
  233 + // TODO Auto-generated method stub
  234 + double ljgl=0;
  235 + for (int i = 0; i < lists.size(); i++) {
  236 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  237 + ljgl = Arith.add(ljgl, culateLjgl(scheduleRealInfo));
  238 + }
  239 + return ljgl;
  240 + }
  241 +
  242 + @Override
  243 + public int culateLjbc(List<ScheduleRealInfo> lists) {
  244 + int ljbc=0;
  245 + for (int i = 0; i < lists.size(); i++) {
  246 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  247 + if (!isInOut(scheduleRealInfo)) {
  248 + if(scheduleRealInfo.isSflj()){
  249 + ljbc++;
  250 + }
  251 + }
  252 + }
  253 + return ljbc;
  254 + }
  255 +
  256 + @Override
  257 + public double culateZrwgl(List<ScheduleRealInfo> lists) {
  258 + // TODO 统计总子任务数
  259 + double zrwgl=0.0;
  260 + for (int i = 0; i < lists.size(); i++) {
  261 + ScheduleRealInfo t=lists.get(i);
  262 + if(!t.isSflj()){
  263 + Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
  264 + if(!childTaskPlans.isEmpty()){
  265 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  266 + while (it.hasNext()) {
  267 + ChildTaskPlan childTaskPlan = it.next();
  268 + zrwgl=Arith.add(zrwgl,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
  269 + }
  270 + }
  271 + }
  272 + }
  273 + return zrwgl;
  274 + }
  275 +
  276 + @Override
  277 + public int culateZrwbc(List<ScheduleRealInfo> lists) {
  278 + // TODO 统计总子任务数
  279 + int zrwbc=0;
  280 + for (int i = 0; i < lists.size(); i++) {
  281 + ScheduleRealInfo t=lists.get(i);
  282 + if(!t.isSflj()){
  283 + Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
  284 + if(!childTaskPlans.isEmpty()){
  285 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  286 + while (it.hasNext()) {
  287 + ChildTaskPlan childTaskPlan = it.next();
  288 + zrwbc++;
  289 + }
  290 + }
  291 + }
  292 + }
  293 + return zrwbc;
  294 + }
  295 +
  296 + @Override
  297 + public double culatesddfgl(List<ScheduleRealInfo> list) {
  298 + double sddfgl = 0;
  299 + for(ScheduleRealInfo schedule : list){
  300 + if(schedule.getFcsjActual() != null && schedule.getStatus() != -1){
  301 + if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){
  302 + if(!schedule.isDfAuto())
  303 + sddfgl = Arith.add(sddfgl, culateSjgldf(schedule));
  304 + }
  305 + }
  306 + }
  307 + return sddfgl;
  308 + }
  309 +
  310 + @Override
  311 + public int culatesddfbc(List<ScheduleRealInfo> list) {
  312 + int sddfbc = 0;
  313 + for(ScheduleRealInfo schedule : list){
  314 + if(schedule.getFcsjActual() != null && schedule.getStatus() != -1){
  315 + if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){
  316 + if(!schedule.isDfAuto())
  317 + sddfbc++;
  318 + }
  319 + }
  320 + }
  321 + return sddfbc;
  322 + }
  323 +
  324 +
  325 + @Override
  326 + public double culatezddfgl(List<ScheduleRealInfo> list) {
  327 + double zddfgl = 0;
  328 + for(ScheduleRealInfo schedule : list){
  329 + if(schedule.getFcsjActual() != null && schedule.getStatus() != -1){
  330 + if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){
  331 + if(schedule.isDfAuto())
  332 + zddfgl = Arith.add(zddfgl, culateSjgldf(schedule));
  333 + }
  334 + }
  335 + }
  336 + return zddfgl;
  337 + }
  338 +
  339 + @Override
  340 + public int culatezddfbc(List<ScheduleRealInfo> list) {
  341 + int zddfbc = 0;
  342 + for(ScheduleRealInfo schedule : list){
  343 + if(schedule.getFcsjActual() != null && schedule.getStatus() != -1){
  344 + if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){
  345 + if(schedule.isDfAuto())
  346 + zddfbc++;
  347 + }
  348 + }
  349 + }
  350 + return zddfbc;
  351 + }
  352 +
  353 + @Override
  354 + public double culateSjgldf(ScheduleRealInfo scheduleRealInfo) {
  355 + // TODO Auto-generated method stub
  356 + double sjgl =0;
  357 + if (!isInOut(scheduleRealInfo)) {
  358 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  359 + if(!scheduleRealInfo.isSflj()){
  360 + if(childTaskPlans.isEmpty()){
  361 + if(!scheduleRealInfo.isDestroy()){
  362 + double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig();
  363 + double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
  364 + if(jhlc-jhlcOrig>0){
  365 + sjgl=Arith.add(sjgl,jhlcOrig);
  366 + }else{
  367 + sjgl=Arith.add(sjgl,jhlc);
  368 + }
  369 + }
  370 + }else{
  371 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  372 + while (it.hasNext()) {
  373 + ChildTaskPlan childTaskPlan = it.next();
  374 + if(childTaskPlan.getMileageType().equals("service")){
  375 + if (!childTaskPlan.isDestroy()) {
  376 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  377 + sjgl=Arith.add(sjgl,jhgl);
  378 + }
  379 + }
  380 + }
  381 + }
  382 + }
  383 + }
  384 + return sjgl;
  385 + }
  386 +
  387 + public static boolean isInOut(ScheduleRealInfo s){
  388 + boolean fage=false;
  389 + if(s.getBcType().equals("in")){
  390 + fage=true;
  391 + }
  392 + if(s.getBcType().equals("out")){
  393 + fage=true;
  394 + }
  395 + if(s.getBcType().equals("ldks")){
  396 + fage=true;
  397 + }
  398 +
  399 + return fage;
  400 + }
  401 +}
src/main/java/com/bsth/service/impl/PersonnelServiceImpl.java deleted 100644 → 0
1 -package com.bsth.service.impl;  
2 -  
3 -import com.alibaba.fastjson.JSONArray;  
4 -import com.alibaba.fastjson.JSONObject;  
5 -import com.bsth.entity.Business;  
6 -import com.bsth.entity.Personnel;  
7 -import com.bsth.entity.PersonnelCopy;  
8 -import com.bsth.repository.PersonnelRepository;  
9 -import com.bsth.service.PersonnelService;  
10 -import com.bsth.util.XmlToJson;  
11 -import org.slf4j.Logger;  
12 -import org.slf4j.LoggerFactory;  
13 -import org.springframework.beans.factory.annotation.Autowired;  
14 -import org.springframework.data.annotation.Transient;  
15 -import org.springframework.jdbc.core.BeanPropertyRowMapper;  
16 -import org.springframework.jdbc.core.JdbcTemplate;  
17 -import org.springframework.stereotype.Service;  
18 -  
19 -import java.util.ArrayList;  
20 -import java.util.Date;  
21 -import java.util.HashMap;  
22 -import java.util.Iterator;  
23 -import java.util.List;  
24 -import java.util.Map;  
25 -  
26 -/**  
27 - * Created by xu on 16/6/15.  
28 - */  
29 -@Service  
30 -public class PersonnelServiceImpl implements PersonnelService {  
31 - // TODO 以后过滤退休人员  
32 - @Autowired  
33 - PersonnelRepository repository;  
34 -  
35 - @Autowired  
36 - JdbcTemplate jdbcTemplate;  
37 -  
38 - Logger logger = LoggerFactory.getLogger(this.getClass());  
39 -  
40 - @Transient  
41 - @Override  
42 - public List<PersonnelCopy> matchPersonnel(JSONArray retiredInfor,String _getEmployee__return,int index,Map<String, Personnel> personnelMap) {  
43 -  
44 - Map<String,String> gzDictionaryMap = new HashMap<>();  
45 - gzDictionaryMap.put("路线驾驶员","1");  
46 - gzDictionaryMap.put("团客车驾驶员","1");  
47 - gzDictionaryMap.put("后方驾驶员","1");  
48 - gzDictionaryMap.put("实习驾驶员","1");  
49 - gzDictionaryMap.put("调度员","2");  
50 - gzDictionaryMap.put("售票员","3");  
51 - gzDictionaryMap.put("公共汽电车售票员","3");  
52 - gzDictionaryMap.put("管理员","3");  
53 - gzDictionaryMap.put("站员","4");  
54 - gzDictionaryMap.put("安检员","6");  
55 - gzDictionaryMap.put("机务","7");  
56 - gzDictionaryMap.put("机务员/质检员","7");  
57 - gzDictionaryMap.put("引导员","8");  
58 - gzDictionaryMap.put("乘务员","9");  
59 - gzDictionaryMap.put("线长(正职)","10");  
60 - gzDictionaryMap.put("线长(副职)","10");  
61 - gzDictionaryMap.put("见习管理人员","11");  
62 - gzDictionaryMap.put("公司部门管理人员","11");  
63 - gzDictionaryMap.put("机务员/警消人员","12");  
64 - gzDictionaryMap.put("线长(副职)","13");  
65 - gzDictionaryMap.put("见习管理人员","11");  
66 - gzDictionaryMap.put("公司部门管理人员","11");  
67 - gzDictionaryMap.put("机务员/警消人员","12");  
68 - gzDictionaryMap.put("票务人员","13");  
69 - gzDictionaryMap.put("其他服务人员","14");  
70 -  
71 - String sql="select * from bsth_c_business ";  
72 - List<Business> businessList=jdbcTemplate.query(sql, new BeanPropertyRowMapper(Business.class));  
73 - Map<String,Map<String,Business>> businessMap = new HashMap<>();  
74 - for (Business bu:businessList) {  
75 -  
76 - Map<String,Business> buMap = new HashMap<>();  
77 - if (businessMap.get(bu.getUpCode()) != null)  
78 - buMap = businessMap.get(bu.getUpCode());  
79 -  
80 - /*if(bu.getUpCode().equals("55"))  
81 - buMap.put(bu.getBusinessName().substring(2),bu);  
82 - else*/  
83 - buMap.put(bu.getBusinessName(),bu);  
84 -  
85 - businessMap.put(bu.getUpCode(),buMap);  
86 - }  
87 -  
88 - List<Personnel> newPersonnel = new ArrayList<>();  
89 -  
90 -// Map<String, Object> retiredInforMap = new HashMap<>();  
91 - try{  
92 -// if(retiredInfor.size() > 0){  
93 -// for(int i=0;i<retiredInfor.size()-1; i++){  
94 -// JSONObject pjson = retiredInfor.getJSONObject(i);  
95 -// String codeArr[] = pjson.getString("Code").split("-");  
96 -// String code = "",  
97 -// companyCode="";  
98 -//  
99 -// if(codeArr.length > 1){  
100 -// if (index == 0) {  
101 -// // 上南  
102 -// code = 55+"-"+codeArr[1];  
103 -// companyCode = "55";  
104 -// } else if (index == 1) {  
105 -// // 金高  
106 -// code = 22+"-"+codeArr[1];  
107 -// companyCode = "22";  
108 -// } else if (index == 2) {  
109 -// // 南汇  
110 -// code = 26+"-"+codeArr[1];  
111 -// companyCode = "26";  
112 -// } else if(index == 3){  
113 -// // 杨高  
114 -// code = "05"+"-"+codeArr[1];  
115 -// companyCode = "05";  
116 -// }  
117 -//// retiredInforMap.put(code,pjson);  
118 -// }  
119 -// }  
120 -// }  
121 -  
122 - // 金蝶人员数据转为json,然后遍历匹配  
123 - JSONObject jsonInfor = XmlToJson.xml2Json(_getEmployee__return);  
124 - System.out.println("getEmployee.result=" + _getEmployee__return);  
125 -  
126 -  
127 - JSONArray jsonArr = JSONArray.parseArray(jsonInfor.get("Emp").toString());  
128 - for(int i=0;i<jsonArr.size()-1; i++){  
129 - JSONObject pjson = jsonArr.getJSONObject(i);  
130 - String codeArr[] = pjson.getString("Code").split("-");  
131 - String JobCodeori = codeArr[1];  
132 - while (JobCodeori.length() < 6){  
133 - JobCodeori = "0"+JobCodeori;  
134 - }  
135 -  
136 -  
137 -// Personnel p = new Personnel();  
138 -// p.setJdCodeori(pjson.getString("Code"));  
139 -// p.setJobCodeori(JobCodeori);  
140 -// p.setPersonnelName(pjson.getString("EmployeeName"));  
141 -// p.setCompany(pjson.getString("CompanyName"));  
142 -//  
143 -// newPersonnel.add(p);  
144 -  
145 - String code = "",  
146 - companyCode="",  
147 - company="";  
148 - Business business = new Business();  
149 - String companyName = pjson.getString("CompanyName");  
150 -  
151 - // 人员数据匹配公司  
152 - if (index == 0) {  
153 - // 上南  
154 - code = 55+"-"+JobCodeori;  
155 - companyCode = "55";  
156 - company = "上南公司";  
157 - if (companyName.indexOf("一分") > -1) {  
158 - business = businessMap.get(companyCode).get("上南一分公司");  
159 - } else if (companyName.indexOf("二分") > -1) {  
160 - business = businessMap.get(companyCode).get("上南二分公司");  
161 - } else if (companyName.indexOf("三分") > -1) {  
162 - business = businessMap.get(companyCode).get("上南三分公司");  
163 - } else if (companyName.indexOf("六分") > -1) {  
164 - business = businessMap.get(companyCode).get("上南六分公司");  
165 - } else if (companyName.indexOf("山南") > -1) {  
166 - business = businessMap.get(companyCode).get("山南培训部");  
167 - } else {  
168 - business = businessMap.get(companyCode).get("其它分公司");  
169 - }  
170 - } else if (index == 1) {  
171 - // 金高  
172 - code = 22+"-"+JobCodeori;  
173 - companyCode = "22";  
174 - company = "金高公司";  
175 - if (companyName.indexOf("一分") > -1) {  
176 - business = businessMap.get(companyCode).get("一分公司");  
177 - } else if (companyName.indexOf("二分") > -1) {  
178 - business = businessMap.get(companyCode).get("二分公司");  
179 - } else if (companyName.indexOf("三分") > -1) {  
180 - business = businessMap.get(companyCode).get("三分公司");  
181 - } else if (companyName.indexOf("四分") > -1) {  
182 - business = businessMap.get(companyCode).get("四分公司");  
183 - } else {  
184 - business = businessMap.get(companyCode).get("其它分公司");  
185 - }  
186 - } else if (index == 2) {  
187 - // 南汇  
188 - code = 26+"-"+JobCodeori;  
189 - companyCode = "26";  
190 - company = "南汇公司";  
191 - if (companyName.indexOf("一分") > -1) {  
192 - business = businessMap.get(companyCode).get("南汇一分");  
193 - } else if (companyName.indexOf("二分") > -1) {  
194 - business = businessMap.get(companyCode).get("南汇二分");  
195 - } else if (companyName.indexOf("三分") > -1) {  
196 - business = businessMap.get(companyCode).get("南汇三分");  
197 - } else if (companyName.indexOf("维修") > -1) {  
198 - business = businessMap.get(companyCode).get("南汇维修公司");  
199 - } else if (companyName.indexOf("南汇公司") > -1) {  
200 - business = businessMap.get(companyCode).get("南汇公司");  
201 - } else if (companyName.indexOf("航头") > -1) {  
202 - business = businessMap.get(companyCode).get("航头枢纽站");  
203 - } else {  
204 - business = businessMap.get(companyCode).get("其它分公司");  
205 - }  
206 - } else if(index == 3){  
207 - code = "05"+"-"+JobCodeori;  
208 - companyCode = "05";  
209 - company = "杨高公司";  
210 - if (companyName.indexOf("川沙") > -1) {  
211 - business = businessMap.get(companyCode).get("川沙分公司");  
212 - } else if (companyName.indexOf("金桥") > -1) {  
213 - business = businessMap.get(companyCode).get("金桥分公司");  
214 - } else if (companyName.indexOf("杨高") > -1) {  
215 - business = businessMap.get(companyCode).get("杨高分公司");  
216 - } else if (companyName.indexOf("周浦") > -1) {  
217 - business = businessMap.get(companyCode).get("周浦分公司");  
218 - } else if (companyName.indexOf("芦潮港") > -1) {  
219 - business = businessMap.get(companyCode).get("芦潮港分公司");  
220 - } else {  
221 - business = businessMap.get(companyCode).get("其它分公司");  
222 - }  
223 - }  
224 -  
225 -//  
226 -// if(pjson.getString("Code").equals("03-S07265") ||pjson.getString("Code").equals("03-S07273") ||pjson.getString("Code").equals("03-S07264")  
227 -// ||pjson.getString("Code").equals("03-S07269") ||pjson.getString("Code").equals("03-S07274") ||pjson.getString("Code").equals("03-S07275")  
228 -// ||pjson.getString("Code").equals("03-S07267") ||pjson.getString("Code").equals("03-S07268") ||pjson.getString("Code").equals("05-006008")  
229 -// ||pjson.getString("Code").equals("02-017122")){  
230 -// System.out.print(pjson);  
231 -// }  
232 -// if(pjson.getString("EmployeeName").equals("吴燕辉") || pjson.getString("EmployeeName").equals("顾振军")|| pjson.getString("EmployeeName").equals("宋荣甲")){  
233 -// System.out.print(pjson);  
234 -// }  
235 -  
236 - /*if(codeArr[0].equals("02")){  
237 - code = "05"+"-"+JobCodeori;  
238 - companyCode = "05";  
239 - company = "杨高公司";  
240 - } else if(codeArr[0].equals("03")){  
241 - code = 55+"-"+JobCodeori;  
242 - companyCode = "55";  
243 - company = "上南公司";  
244 - } else if(codeArr[0].equals("04")){  
245 - code = 22+"-"+JobCodeori;  
246 - companyCode = "22";  
247 - company = "金高公司";  
248 - } else if(codeArr[0].equals("05")){  
249 - code = 26+"-"+JobCodeori;  
250 - companyCode = "26";  
251 - company = "南汇公司";  
252 - }*/  
253 -  
254 - Personnel p = personnelMap.get(code);  
255 -// Object isRetiredInfor = retiredInforMap.get(code);  
256 - // p不为空这表示调度数据和金蝶数据能匹配、则更新数据,不能匹配这新增数据  
257 - if(p != null ){  
258 -// p.setCard(pjson.getString("IDCardID"));// 第一次需要添加身份证,后面则不需要了  
259 - if(pjson.getString("IDCardID").equals(p.getCard())){  
260 - p.setBrancheCompanyCode(business.getBusinessCode());  
261 - p.setBrancheCompany(business.getBusinessName());  
262 - p.setPersonnelName(pjson.getString("EmployeeName"));  
263 - p.setDescriptions(pjson.getString("UnitFullName"));  
264 - p.setJdCodeori(pjson.getString("Code")); // 金蝶工号  
265 - p.setUpdateDate(new Date());  
266 - // 设置人员为在职状态  
267 - p.setDestroy(0);  
268 - newPersonnel.add(p);  
269 - }  
270 - } else {  
271 - p = new Personnel();  
272 - p.setJobCode(code);  
273 - p.setJobCodeori(JobCodeori);  
274 - p.setCard(pjson.getString("IDCardID"));  
275 -// String companyName = pjson.getString("CompanyName");  
276 -// // 搜索分公司  
277 -// Business business = businessMap.get(companyCode).get(companyName);  
278 -// if(business != null){  
279 -// } else {  
280 -// p.setBrancheCompanyCode("");  
281 -// p.setBrancheCompany("");  
282 -// }  
283 -  
284 - p.setBrancheCompanyCode(business.getBusinessCode());  
285 - p.setBrancheCompany(business.getBusinessName());  
286 - p.setCompanyCode(companyCode);  
287 - p.setCompany(company);  
288 - p.setJdCodeori(pjson.getString("Code")); // 金蝶工号  
289 - p.setPersonnelName(pjson.getString("EmployeeName"));  
290 - p.setPersonnelType(pjson.getString("SexType").indexOf("男") > -1 ?"1":"2");  
291 - p.setPosts(gzDictionaryMap.get(pjson.getString("PositName")) == null?"14":gzDictionaryMap.get(pjson.getString("PositName")));  
292 - p.setDescriptions(pjson.getString("UnitFullName"));  
293 - p.setTelphone(pjson.getString("Telphone"));  
294 - p.setUpdateDate(new Date());  
295 - p.setRemark("新增");  
296 - // 设置人员为在职状态  
297 - p.setDestroy(0);  
298 -// if(isRetiredInfor != null && isRetiredInfor != ""){  
299 -// p.setRemark("退休");  
300 -// }  
301 - newPersonnel.add(p);  
302 - }  
303 - }  
304 - // 批量保存  
305 - repository.save(newPersonnel);  
306 -  
307 - } catch (Exception e) {  
308 - logger.error("", e);  
309 - }  
310 - return null;  
311 - }  
312 -  
313 - /*public Map<String, Personnel> loadPersonnel(){  
314 - Map<String, Personnel> personnelMap= new HashMap<>();  
315 - Iterator<Personnel> perIterator=repository.findAll().iterator();  
316 - Personnel per;  
317 - while(perIterator.hasNext()){  
318 - per=perIterator.next();  
319 - personnelMap.put(per.getJobCode(),per);  
320 - }  
321 - return personnelMap;  
322 -  
323 - }*/  
324 -}  
src/main/java/com/bsth/service/impl/ScheduleRealInfoServiceImpl.java 0 → 100644
  1 +package com.bsth.service.impl;
  2 +
  3 +import com.bsth.entity.ChildTaskPlan;
  4 +import com.bsth.entity.Equipment;
  5 +import com.bsth.entity.ScheduleRealInfo;
  6 +import com.bsth.entity.result.RevisedReport;
  7 +import com.bsth.repository.ScheduleRealInfoRepository;
  8 +import com.bsth.service.CulateService;
  9 +import com.bsth.service.ScheduleRealInfoService;
  10 +import com.bsth.util.Arith;
  11 +import com.bsth.util.DBUtils_MS;
  12 +
  13 +import org.slf4j.Logger;
  14 +import org.slf4j.LoggerFactory;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.jdbc.core.BeanPropertyRowMapper;
  17 +import org.springframework.jdbc.core.JdbcTemplate;
  18 +import org.springframework.stereotype.Service;
  19 +
  20 +import java.sql.Connection;
  21 +import java.sql.PreparedStatement;
  22 +import java.sql.ResultSet;
  23 +import java.text.ParseException;
  24 +import java.text.SimpleDateFormat;
  25 +import java.util.ArrayList;
  26 +import java.util.Calendar;
  27 +import java.util.Collections;
  28 +import java.util.Date;
  29 +import java.util.List;
  30 +import java.util.Set;
  31 +
  32 +@Service
  33 +public class ScheduleRealInfoServiceImpl implements ScheduleRealInfoService {
  34 +
  35 + @Autowired
  36 + ScheduleRealInfoRepository scheduleRealInfoRepository;
  37 +
  38 + @Autowired
  39 + JdbcTemplate jdbcTemplate;
  40 +
  41 + @Autowired
  42 + CulateService culateService;
  43 +
  44 + Logger logger = LoggerFactory.getLogger(this.getClass());
  45 +
  46 + List<Equipment> equipmentCodeList = new ArrayList<>();
  47 +
  48 + List<Object[]> gpsDateList = new ArrayList<>();
  49 +
  50 + @Override
  51 + public List<RevisedReport> mileageCorrectionTj(String scheduleDateStr) {
  52 + try {
  53 +// logger.info("-----------开始加载设备号!!!!!!!!!");
  54 + initEquipmentCodeList();
  55 +// logger.info("-----------设备号个数:"+equipmentCodeList.size());
  56 + } catch (Exception e) {
  57 + // TODO Auto-generated catch block
  58 + e.printStackTrace();
  59 + }
  60 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();//所有线路
  61 + List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>();
  62 + List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();//单个线路
  63 + //查询所有线路
  64 + list = scheduleRealInfoRepository.scheduleByDateAndLineTj(scheduleDateStr);
  65 +
  66 + for (int i = 0; i < list.size(); i++) {
  67 + ScheduleRealInfo s=list.get(i);
  68 + Set<ChildTaskPlan> cts = s.getcTasks();
  69 + if(cts != null && cts.size() > 0){
  70 + list_s.add(s);
  71 + }else{
  72 + if(s.getZdsjActual()!=null){
  73 + list_s.add(s);
  74 + }
  75 + }
  76 + }
  77 + List<RevisedReport> omList = new ArrayList<RevisedReport>();
  78 + for (int i = 0; i < list.size(); i++) {
  79 + if(i<list.size()-1){
  80 + if(list.get(i+1).getXlBm().equals(list.get(i).getXlBm())){
  81 + lists.add(list.get(i));
  82 + }else{
  83 + lists.add(list.get(i));
  84 + RevisedReport report=staticTj(lists);
  85 + omList.add(report);
  86 + lists.clear();
  87 + }
  88 + }else{
  89 + if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){
  90 + lists.add(list.get(i));
  91 + RevisedReport report=staticTj(lists);
  92 + omList.add(report);
  93 + }else{
  94 + lists.add(list.get(i));
  95 + RevisedReport report=staticTj(lists);
  96 + omList.add(report);
  97 + lists.clear();
  98 + }
  99 + }
  100 + }
  101 + return omList;
  102 + }
  103 +
  104 + public final RevisedReport staticTj(List<ScheduleRealInfo> list){
  105 + List<Long> bcsj = new ArrayList<>();//多有班次的时间
  106 + String realExecDate ="";
  107 + Boolean iskt = false;//班次是否跨天
  108 + String lineId = list.get(0).getXlBm();
  109 + List<ScheduleRealInfo> listSj=new ArrayList<ScheduleRealInfo>();//实际营运的班次
  110 + double wqwxhgl = 0.0;//完全漂移公里
  111 + double bfwxhgl = 0.0;//部分漂移公里
  112 + int wqwxhbc = 0;//完全漂移班次
  113 + int bfwxhbc = 0;//部分漂移班次
  114 + double pygl = 0.0;//子任务公里
  115 + int pybc = 0;//子任务
  116 + for(int i=0;i<list.size();i++){
  117 + ScheduleRealInfo s=list.get(i);
  118 + Set<ChildTaskPlan> cts = s.getcTasks();
  119 + if(cts != null && cts.size() > 0){
  120 + listSj.add(s);
  121 + }else{
  122 + if(s.getZdsjActual()!=null){
  123 + listSj.add(s);
  124 + }
  125 + }
  126 + try {
  127 + if (!realExecDate.equals(s.getRealExecDate())) {
  128 + iskt = true;
  129 + }
  130 + realExecDate = s.getRealExecDate();//实际班次日期
  131 + String fcsj = "";
  132 + if(s.getFcsjActual() == null || s.getFcsjActual().equals("")) {
  133 + fcsj = s.getFcsj();
  134 + } else {
  135 + fcsj = s.getFcsjActual();
  136 + }
  137 + String zdsj = "";
  138 + if(s.getZdsjActual() == null || s.getZdsjActual().equals("")) {
  139 + zdsj = s.getZdsj();
  140 + } else {
  141 + zdsj = s.getZdsjActual();
  142 + }
  143 + Long fcsjStr = Long.valueOf(dateToStamp(realExecDate +" " + fcsj +":00"));
  144 + Long zdsjStr = Long.valueOf(dateToStamp(realExecDate +" " + zdsj +":00"));
  145 + if (zdsjStr < fcsjStr) {//到站时间跨天 则到站时间加一天时间
  146 + zdsjStr = (1000 * 60 * 60 * 24) + zdsjStr;
  147 + }
  148 + bcsj.add(fcsjStr);
  149 + bcsj.add(zdsjStr);
  150 + } catch (NumberFormatException e) {
  151 + // TODO Auto-generated catch block
  152 + e.printStackTrace();
  153 + } catch (ParseException e) {
  154 + // TODO Auto-generated catch block
  155 + e.printStackTrace();
  156 + }
  157 + }
  158 + logger.info("计算线路:"+lineId);
  159 + if (iskt) {
  160 + realExecDate = "('"+ orderDate(realExecDate)+"','"+ (orderDate(realExecDate)+1) +"')";
  161 + initGpsDateList(realExecDate,lineId,Collections.min(bcsj),Collections.max(bcsj));
  162 + } else {
  163 + realExecDate = "('"+ orderDate(realExecDate) +"')";
  164 + initGpsDateList(realExecDate,lineId,Collections.min(bcsj),Collections.max(bcsj));
  165 + }
  166 + for (int i = 0; i < listSj.size(); i++) {
  167 + ScheduleRealInfo sr=listSj.get(i);
  168 + try {
  169 + realExecDate = sr.getRealExecDate();//实际班次日期
  170 + String fcsj = "";
  171 + if(sr.getFcsjActual() == null || sr.getFcsjActual().equals("")) {
  172 + fcsj = sr.getFcsj();
  173 + } else {
  174 + fcsj = sr.getFcsjActual();
  175 + }
  176 + String zdsj = "";
  177 + if(sr.getZdsjActual() == null || sr.getZdsjActual().equals("")) {
  178 + zdsj = sr.getZdsj();
  179 + } else {
  180 + zdsj = sr.getZdsjActual();
  181 + }
  182 + Long fcsjStr = Long.valueOf(dateToStamp(realExecDate +" " + fcsj +":00"));
  183 + Long zdsjStr = Long.valueOf(dateToStamp(realExecDate +" " + zdsj +":00"));
  184 + if (zdsjStr < fcsjStr) {//到站时间跨天 则到站时间加一天时间
  185 + zdsjStr = (1000 * 60 * 60 * 24) + zdsjStr;
  186 + }
  187 +
  188 + double sjgl = culateService.culateSjgl(sr);//一个班次实际公里
  189 + double ljgl = culateService.culateLjgl(sr); //一个班次临加公里
  190 + double zyygl = Arith.add(sjgl,ljgl); //一个班次总运营公里
  191 +
  192 + String equipment_code = getEquipmentCode(sr.getClZbh());
  193 + List<Long> listTime = getGpsDate(realExecDate, equipment_code, fcsjStr, zdsjStr);
  194 + if (listTime.size() > 10) {
  195 + for (int j = 1; j < listTime.size(); j++) {
  196 + if ((listTime.get(j) - listTime.get(j-1))/ (1000 * 60) > 5) {
  197 + bfwxhgl = Arith.add(bfwxhgl,zyygl);
  198 + if (!CulateServiceImpl.isInOut(sr)) {
  199 + bfwxhbc++;
  200 + }
  201 + continue;
  202 + }
  203 + }
  204 + } else {
  205 + wqwxhgl = Arith.add(wqwxhgl,zyygl);
  206 + if (!CulateServiceImpl.isInOut(sr)) {
  207 + wqwxhbc++;
  208 + }
  209 + }
  210 + int type = sr.getDriftStatus();
  211 + if (type == 1 || type ==2) {
  212 + pygl = Arith.add(pygl,zyygl);
  213 + if (!CulateServiceImpl.isInOut(sr)) {
  214 + pybc++;
  215 + }
  216 + }
  217 + } catch (Exception e) {
  218 + // TODO Auto-generated catch block
  219 + e.printStackTrace();
  220 + }
  221 + }
  222 + RevisedReport report = new RevisedReport();
  223 + if(list.size()>0){
  224 + double ljgl = culateService.culateLjgl(listSj); //临加公里
  225 + double sjgl = culateService.culateSjgl(listSj);//实际公里
  226 + double zyygl = Arith.add(sjgl,ljgl); //总运营公里
  227 + int ljbc = culateService.culateLjbc(listSj);
  228 + int sjbc = culateService.culateSjbc(listSj);
  229 + int zyybc = ljbc + sjbc;//总(实际)营运班次
  230 +
  231 + double sjjccgl=culateService.culateJccgl(listSj);
  232 + double sjksgl = culateService.culateKsgl(listSj);
  233 + double zksgl=Arith.add(sjjccgl, sjksgl);//实际空驶公里
  234 + int sjjccbc=culateService.culateJccbc(listSj);
  235 + int sjksbc = culateService.culateKsbc(listSj);
  236 + int zksbc = sjjccbc + sjksbc;//实际空驶班次
  237 +
  238 + double zgl = Arith.add(zyygl, zksgl);//实际总公里
  239 + int zbc = zksbc + zyybc;//实际总
  240 +
  241 + double sddfgl =culateService.culatesddfgl(list);//手动待发调整公里
  242 + double zddfgl = culateService.culatezddfgl(list);//自动待发调整公里
  243 + double zrwgl = culateService.culateZrwgl(list);//子任务公里
  244 + int sddfbc =culateService.culatesddfbc(list);//手动待发调整
  245 + int zddfbc = culateService.culatezddfbc(list);//自动待发调整
  246 + int zrwbc = culateService.culateZrwbc(list);//子任务
  247 + report.setCompanyId(list.get(0).getGsBm());
  248 + report.setSubCompanyId(list.get(0).getFgsBm());
  249 + report.setCompanyName(list.get(0).getGsName());
  250 + report.setSubCompanyName(list.get(0).getFgsName());
  251 + report.setLineCode(list.get(0).getXlBm());
  252 + report.setLineName(list.get(0).getXlName());
  253 + report.setZgl(zgl);
  254 + report.setSjyygl(zyygl);
  255 + report.setSjksgl(zksgl);
  256 + report.setSddfgl(sddfgl);
  257 + report.setZddfgl(zddfgl);
  258 + report.setWqwxhgl(wqwxhgl);
  259 + report.setBfwxhgl(bfwxhgl);
  260 + report.setPygl(pygl);
  261 + report.setLjgl(ljgl);
  262 + report.setZrwgl(zrwgl);
  263 + report.setZbc(zbc);
  264 +
  265 + report.setSjyybc(zyybc);
  266 + report.setSjksbc(zksbc);
  267 + report.setSddfbc(sddfbc);
  268 + report.setZddfbc(zddfbc);
  269 + report.setWqwxhbc(wqwxhbc);
  270 + report.setBfwxhbc(bfwxhbc);
  271 + report.setPybc(pybc);
  272 + report.setLjbc(ljbc);
  273 + report.setZrwbc(zrwbc);
  274 +
  275 + report.setRq(list.get(0).getScheduleDateStr());
  276 + report.setOther(null);
  277 + report.setCreateDate(new Date());
  278 + }
  279 + return report;
  280 + }
  281 +
  282 + public void initGpsDateList(String scheduleDateStr, String lineId, Long startTime, Long endTime) {
  283 +
  284 + gpsDateList.clear();//清空上一条线路的gps信息
  285 + Connection conn = null;
  286 + PreparedStatement ps = null;
  287 + ResultSet rs = null;
  288 +
  289 + Date date=new Date();
  290 + Calendar calendar=Calendar.getInstance();
  291 + calendar.setTime(date);
  292 + String sql = "select device_id as device_id, ts as ts from bsth_c_gps_info where days_year in "+ scheduleDateStr +" and line_id=? and ts>=? and ts<=? ORDER BY device_id , ts";
  293 + try{
  294 + conn = DBUtils_MS.getConnection();
  295 + ps = conn.prepareStatement(sql);
  296 + ps.setString(1, lineId);
  297 + ps.setLong(2, startTime);
  298 + ps.setLong(3, endTime);
  299 + rs = ps.executeQuery();
  300 + while(rs.next()){
  301 + Object obj[] = new Object[2];
  302 + obj[0] = rs.getString("device_id");
  303 + obj[1] = rs.getString("ts");
  304 + gpsDateList.add(obj);
  305 + }
  306 + }catch(Exception e){
  307 + logger.error("", e);
  308 + }finally {
  309 + DBUtils_MS.close(rs, ps, conn);
  310 + }
  311 + }
  312 +
  313 + public void initEquipmentCodeList() throws Exception {
  314 +
  315 + String sql = "select inside_code, equipment_code from bsth_c_cars where 1=1";
  316 + equipmentCodeList = jdbcTemplate.query(sql, new BeanPropertyRowMapper(Equipment.class));
  317 +
  318 + /*Connection conn = null;
  319 + PreparedStatement ps = null;
  320 + ResultSet rs = null;
  321 +
  322 + // 设置连接数据库的配置信息 本地
  323 + String url = "jdbc:mysql://localhost:3306/control_cope?"
  324 + + "user=root&password=root&useUnicode=true&characterEncoding=UTF8";
  325 +
  326 + // 设置连接数据库的配置信息 服务器
  327 + String url = "jdbc:mysql://10.10.150.20:3306/control?useUnicode=true&characterEncoding=UTF8";
  328 +
  329 + try {
  330 + // 之所以要使用下面这条语句,是因为要使用MySQL的驱动,所以我们要把它驱动起来,
  331 + // 可以通过Class.forName把它加载进去,也可以通过初始化来驱动起来,下面三种形式都可以
  332 + Class.forName("com.mysql.jdbc.Driver");// 动态加载mysql驱动
  333 +// System.out.println("成功加载MySQL驱动程序");
  334 + // 一个Connection代表一个数据库连接
  335 + conn = DriverManager.getConnection(url);
  336 + // Statement里面带有很多方法,比如executeUpdate可以实现插入,更新和删除等
  337 + String sql = "select inside_code, equipment_code from bsth_c_cars where 1=1";
  338 + ps = conn.prepareStatement(sql);
  339 + rs = ps.executeQuery();
  340 + while(rs.next()){
  341 + Object obj[] = new Object[2];
  342 + obj[0] = rs.getString("inside_code"); //车辆自编号
  343 + obj[1] = rs.getString("equipment_code").toString(); //终端设备号
  344 + equipmentCodeList.add(obj);
  345 + }
  346 + } catch (SQLException e) {
  347 + System.out.println("MySQL操作错误");
  348 + e.printStackTrace();
  349 + } catch (Exception e) {
  350 + e.printStackTrace();
  351 + } finally {
  352 + rs.close();
  353 + ps.close();
  354 + conn.close();
  355 + } */
  356 + }
  357 +
  358 + /** 获取设备终端号 */
  359 + public String getEquipmentCode(String clZbm) throws Exception {
  360 + String equipment_code = "";
  361 + for (Equipment equipment:equipmentCodeList) {
  362 + if (equipment.getInside_code().equals(clZbm)) {
  363 + equipment_code = equipment.getEquipment_code().toString();
  364 + }
  365 + }
  366 + return equipment_code;
  367 + }
  368 +
  369 + public List<Long> getGpsDate(String daysYear, String equipment_code, Long fcsjStr, Long zdsjStr) throws ParseException {
  370 + List<Long> list = new ArrayList<>();
  371 + for (Object[] obj :gpsDateList ) {
  372 + if (obj[0].equals(equipment_code)) {
  373 + Long ts = Long.valueOf(obj[1].toString());
  374 + if (ts >= fcsjStr && ts <= zdsjStr) {
  375 + list.add(ts);
  376 + }
  377 + }
  378 + }
  379 + return list;
  380 + }
  381 +
  382 + /*
  383 + * 将时间转换为时间戳
  384 + */
  385 + public static String dateToStamp(String s) throws ParseException{
  386 + String res;
  387 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  388 + Date date = simpleDateFormat.parse(s);
  389 + long ts = date.getTime();
  390 + res = String.valueOf(ts);
  391 + return res;
  392 + }
  393 +
  394 + /*
  395 + * 将时间戳转换为时间
  396 + */
  397 + public static String stampToDate(String s){
  398 + String res;
  399 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  400 + long lt = new Long(s);
  401 + Date date = new Date(lt);
  402 + res = simpleDateFormat.format(date);
  403 + return res;
  404 + }
  405 +
  406 + /*
  407 + * 计算今天是今年的第几天
  408 + */
  409 + public int orderDate(String dateStr){
  410 + int dateSum = 0;
  411 + /*SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
  412 + String dateStr = format.format(date);*/
  413 + int year = Integer.valueOf(dateStr.substring(0,4));
  414 + int month = Integer.valueOf(dateStr.substring(5,7));
  415 + int day = Integer.valueOf(dateStr.substring(8,10));
  416 + for (int i = 1; i < month; i++){
  417 + switch(i){
  418 + case 1: case 3: case 5: case 7: case 8: case 10: case 12:dateSum += 31; break;
  419 + case 4: case 6: case 9: case 11:dateSum += 30; break;
  420 + case 2:
  421 + if(((year % 4 == 0) & (year % 100 != 0)) | (year % 400 == 0))
  422 + dateSum += 29;
  423 + else dateSum += 28;
  424 + }
  425 + }
  426 +
  427 + return dateSum = dateSum + day;
  428 + }
  429 +
  430 +}
src/main/java/com/bsth/thread/PersonnelUpdateThrad.java renamed to src/main/java/com/bsth/thread/ReportCalculationThrad.java
1 package com.bsth.thread; 1 package com.bsth.thread;
2 2
3 -import com.bsth.handler.personnelUpdateHandler;  
4 import org.slf4j.Logger; 3 import org.slf4j.Logger;
5 import org.slf4j.LoggerFactory; 4 import org.slf4j.LoggerFactory;
6 import org.springframework.beans.factory.annotation.Autowired; 5 import org.springframework.beans.factory.annotation.Autowired;
7 import org.springframework.stereotype.Component; 6 import org.springframework.stereotype.Component;
8 7
  8 +import com.bsth.handler.ReportCalculationHandler;
  9 +
9 /** 10 /**
10 - * @ClassName: PersonnelUpdateThrad.java  
11 - * @Description: TODO(用金蝶数据更新人员数据) 11 + * @ClassName: MileageCalculationThrad.java
  12 + * @Description: TODO(营运公里计算线程)
12 * @author: YouRuiFeng 13 * @author: YouRuiFeng
13 - * @date: 2019-06-26 14 + * @date: 2017-8-14 下午2:04:14
14 * 15 *
15 */ 16 */
16 @Component 17 @Component
17 -public class PersonnelUpdateThrad extends Thread { 18 +public class ReportCalculationThrad extends Thread {
18 @Autowired 19 @Autowired
19 - personnelUpdateHandler personnelUpdateHandler; 20 + ReportCalculationHandler mileageCalculationHandler;
20 21
21 Logger logger = LoggerFactory.getLogger(this.getClass()); 22 Logger logger = LoggerFactory.getLogger(this.getClass());
22 23
23 @Override 24 @Override
24 public void run() { 25 public void run() {
25 try { 26 try {
26 - personnelUpdateHandler.sync(); 27 + mileageCalculationHandler.calc();
27 } catch (Exception e) { 28 } catch (Exception e) {
28 logger.error("", e); 29 logger.error("", e);
29 } 30 }
src/main/java/com/bsth/util/DBUtils_Personnel.java renamed to src/main/java/com/bsth/util/DBUtils_MS.java
@@ -15,12 +15,12 @@ import java.util.Map; @@ -15,12 +15,12 @@ import java.util.Map;
15 import java.util.Properties; 15 import java.util.Properties;
16 16
17 /** 17 /**
18 - * 数据备份personnel库连接池 18 + * 网关ms库连接池
19 * @author PanZhao 19 * @author PanZhao
20 * 20 *
21 */ 21 */
22 //@Component 22 //@Component
23 -public class DBUtils_Personnel { 23 +public class DBUtils_MS {
24 24
25 private static String url = null; 25 private static String url = null;
26 26
@@ -30,13 +30,13 @@ public class DBUtils_Personnel { @@ -30,13 +30,13 @@ public class DBUtils_Personnel {
30 30
31 private static DataSource ds_pooled; 31 private static DataSource ds_pooled;
32 32
33 - static Logger logger = Logger.getLogger(DBUtils_Personnel.class); 33 + static Logger logger = Logger.getLogger(DBUtils_MS.class);
34 34
35 static { 35 static {
36 Properties env = new Properties(); 36 Properties env = new Properties();
37 37
38 try { 38 try {
39 - env.load(DBUtils_Personnel.class.getClassLoader().getResourceAsStream("personnel-jdbc.properties")); 39 + env.load(DBUtils_MS.class.getClassLoader().getResourceAsStream("ms-jdbc.properties"));
40 // 1. 加载驱动类 40 // 1. 加载驱动类
41 Class.forName(env.getProperty("ms.mysql.driver")); 41 Class.forName(env.getProperty("ms.mysql.driver"));
42 42
src/main/java/com/bsth/util/XmlToJson.java deleted 100644 → 0
1 -package com.bsth.util;  
2 -  
3 -import com.alibaba.fastjson.JSONArray;  
4 -import com.alibaba.fastjson.JSONObject;  
5 -import org.dom4j.*;  
6 -  
7 -import java.io.File;  
8 -import java.io.FileInputStream;  
9 -import java.nio.ByteBuffer;  
10 -import java.nio.channels.FileChannel;  
11 -import java.util.List;  
12 -  
13 -public class XmlToJson {  
14 - public static void main(String[] args) throws Exception {  
15 -// String xmlStr= readFile("D:/ADA/et/Issue_20130506_back.xml");  
16 -// Document doc= DocumentHelper.parseText(xmlStr);  
17 -// JSONObject json=new JSONObject();  
18 -// dom4j2Json(doc.getRootElement(),json);  
19 -// System.out.println("xml2Json:"+json.toJSONString());  
20 - String a = "[{'s':'sd','b':'sd'},{'s':'11','b':'22'}]";  
21 -  
22 - System.out.println(a.toString());  
23 - String b = "{lhjcData={tabledata=[[{zdmc=组织机构代码, zd=TYSBM, zdmcdata=630301035}, {zdmc=对象名称, zd=DXMC, zdmcdata=测试公司1}, {zdmc=备忘录ID, zd=BWLID, zdmcdata=e4e4e4b15c3346ff015c336517a80043}, {zdmc=备忘录名称, zd=BWLMC, zdmcdata=对失信被执行人实施联合惩戒的合作备忘录}, {zdmc=行为事项, zd=XWSX, zdmcdata=最高人民法院公布的失信被执行人}, {zdmc=奖惩类型编码, zd=JCLX, zdmcdata=20}, {zdmc=奖惩类型名称, zd=JCLXMC, zdmcdata=惩戒}, {zdmc=判决法院, zd=PJFY, zdmcdata=上海市宝山区人民法院}, {zdmc=文书号, zd=WSH, zdmcdata=(2016)沪0113民初02817号}, {zdmc=立案日期, zd=LARQ, zdmcdata=2017/08/11}]], tablename=奖惩对象信息}, enterpriseData={resultGLL=null, resultDJL=[{tabledata=[[{zdmc=法定代表人, zdmcdata=TIMOTHY BRIAN CONSIDINE, zd=principalname}, {zdmc=工商注册号, zdmcdata=310000400595922, zd=regno}, {zdmc=法人类型, zdmcdata=公司, zd=organtype}, {zdmc=成立日期, zdmcdata=2009-03-30, zd=approvedate}, {zdmc=经营范围, zdmcdata=家具、金属制品、木工制品、亚克力制品的批发、进出口,并提供相关配套服务。 【依法须经批准的项目,经相关部门批准后方可开展经营活动】, zd=tradescope}, {zdmc=组织机构代码, zdmcdata=685514951, zd=organcode}, {zdmc=注册地址, zdmcdata=上海市静安区南京西路920号南泰大厦16A楼11室, zd=address}, {zdmc=法人名称, zdmcdata=测试公司1, zd=organname}, {zdmc=注册资金(万), zdmcdata=14, zd=regcapital}, {zdmc=币种, zdmcdata=美元, zd=currencytype}, {zdmc=登记状态, zdmcdata=确立, zd=organstatus}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商局, zd=XXSSDW}]], tablename=企业登记信息}, {tabledata=[[{zdmc=个人独资企业出资方式, zdmcdata=, zd=invest_type_id}, {zdmc=证照类型, zdmcdata=, zd=cert_type}, {zdmc=合伙人国别(地区)(外资), zdmcdata=英国, zd=nationality_id}, {zdmc=投资人名称, zdmcdata=CARDINAL PROJECT MANAGEMENT LIMITED, zd=investor_name}, {zdmc=证照编号, zdmcdata=, zd=cert_number}, {zdmc=投资人类型, zdmcdata=外国(地区)企业, zd=investor_type_gb}, {zdmc=合伙人住所(外资), zdmcdata=, zd=address}, {zdmc=合伙人承担责任方式(外资), zdmcdata=, zd=respond_way}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}]], tablename=出资信息}, {tabledata=[[{zdmc=姓名, zdmcdata=TIMOTHY BRIAN CONSIDINE, zd=person_name}, {zdmc=职务, zdmcdata=执行董事, zd=hdsh_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=姓名, zdmcdata=陈漪, zd=person_name}, {zdmc=职务, zdmcdata=总经理, zd=hdsh_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=姓名, zdmcdata=MARK SIMPSON, zd=person_name}, {zdmc=职务, zdmcdata=监事, zd=hdsh_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}]], tablename=主要成员信息}, {tabledata=[[{zdmc=变更前内容, zdmcdata=0.0000万美元, zd=before_content}, {zdmc=变更后内容, zdmcdata=2.8000万美元, zd=after_content}, {zdmc=变更日期, zdmcdata=20090702, zd=change_date}, {zdmc=变更事项, zdmcdata=实收资本变更, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=2.8000万美元, zd=before_content}, {zdmc=变更后内容, zdmcdata=7.0000万美元, zd=after_content}, {zdmc=变更日期, zdmcdata=20091111, zd=change_date}, {zdmc=变更事项, zdmcdata=实收资本变更, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=CARDINAL PROJECT MANAGEMENT LIMITED 2009-09-24 货币4.2000万美元;CARDINAL PROJECT MANAGEMENT LIMITED 2009-06-15 货币2.8000万美元, zd=before_content}, {zdmc=变更后内容, zdmcdata=CARDINAL PROJECT MANAGEMENT LIMITED 2009-09-24 货币4.2000万美元;CARDINAL PROJECT MANAGEMENT LIMITED 2009-06-15 货币2.8000万美元;CARDINAL PROJECT MANAGEMENT LIMITED 2010-05-31 货币0.4500万美元;CARDINAL PROJECT MANAGEMENT LIMITED 2011-02-09 货币6.5500万美元, zd=after_content}, {zdmc=变更日期, zdmcdata=20110523, zd=change_date}, {zdmc=变更事项, zdmcdata=实收资本变更, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=无, zd=before_content}, {zdmc=变更后内容, zdmcdata=陈漪, zd=after_content}, {zdmc=变更日期, zdmcdata=20171206, zd=change_date}, {zdmc=变更事项, zdmcdata=经理备案, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=MICHAEL ANDREW BARNARD, zd=before_content}, {zdmc=变更后内容, zdmcdata=MARK SIMPSON, zd=after_content}, {zdmc=变更日期, zdmcdata=20171206, zd=change_date}, {zdmc=变更事项, zdmcdata=监事备案, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=家具、货柜架、收银台、电器设备的批发、进出口,并提供相关设计咨询和配套服务(不涉及国营贸易管理商品,涉及配额、许可证管理商品的,按国家有关规定办理申请)。 【依法须经批准的项目,经相关部门批准后方可开展经营活动】, zd=before_content}, {zdmc=变更后内容, zdmcdata=家具、金属制品、木工制品、亚克力制品的批发、进出口,并提供相关配套服务。 【依法须经批准的项目,经相关部门批准后方可开展经营活动】, zd=after_content}, {zdmc=变更日期, zdmcdata=20171206, zd=change_date}, {zdmc=变更事项, zdmcdata=经营范围变更, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=PAUL DAVID BENJAMIN CONSIDINE, zd=before_content}, {zdmc=变更后内容, zdmcdata=TIMOTHY BRIAN CONSIDINE, zd=after_content}, {zdmc=变更日期, zdmcdata=20171206, zd=change_date}, {zdmc=变更事项, zdmcdata=法定代表人变更, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=MICHAEL PATRICK THOMPSON;BRIAN ROSS GORMAN;TIMOTHY BRIAN CONSIDINE;GRAHAM PHILIP DAVIES, zd=before_content}, {zdmc=变更后内容, zdmcdata=无, zd=after_content}, {zdmc=变更日期, zdmcdata=20171206, zd=change_date}, {zdmc=变更事项, zdmcdata=董事备案, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}], [{zdmc=变更前内容, zdmcdata=无, zd=before_content}, {zdmc=变更后内容, zdmcdata=2017-09-18章程备案, zd=after_content}, {zdmc=变更日期, zdmcdata=20171206, zd=change_date}, {zdmc=变更事项, zdmcdata=章程备案, zd=reg_item_gb}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商行政管理局, zd=XXSSDW}]], tablename=变更信息}, {tabledata=[[{zdmc=备案日期, zdmcdata=2010/5/24, zd=A4}, {zdmc=企业备案号, zdmcdata=3100633346, zd=A3}, {zdmc=法定代表人, zdmcdata=Paul David considine, zd=A5}, {zdmc=信息类别, zdmcdata=登记类, zd=XXLB}, {zdmc=来源部门, zdmcdata=上海海关, zd=XXSSDW}]], tablename=自理报检单位备案}], resultZZL=null, resultWYL=null, resultGYL=null, resultZXL=null, resultJDL=[{tabledata=[[{zdmc=信用等级, zdmcdata=A, zd=A8}, {zdmc=信息类别, zdmcdata=监管类, zd=XXLB}, {zdmc=来源部门, zdmcdata=上海海关, zd=XXSSDW}]], tablename=信用ABCD级}, {tabledata=[[{zdmc=年检结果, zdmcdata=年检结果正常, zd=annlresult}, {zdmc=年检年度, zdmcdata=2009, zd=annlyear}, {zdmc=信息类别, zdmcdata=监管类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商局, zd=XXSSDW}], [{zdmc=年检结果, zdmcdata=年检结果正常, zd=annlresult}, {zdmc=年检年度, zdmcdata=2010, zd=annlyear}, {zdmc=信息类别, zdmcdata=监管类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商局, zd=XXSSDW}], [{zdmc=年检结果, zdmcdata=年检结果正常, zd=annlresult}, {zdmc=年检年度, zdmcdata=2011, zd=annlyear}, {zdmc=信息类别, zdmcdata=监管类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商局, zd=XXSSDW}], [{zdmc=年检结果, zdmcdata=年检结果正常, zd=annlresult}, {zdmc=年检年度, zdmcdata=2012, zd=annlyear}, {zdmc=信息类别, zdmcdata=监管类, zd=XXLB}, {zdmc=来源部门, zdmcdata=市工商局, zd=XXSSDW}]], tablename=年检信息}], resultPJL=null}}\";\n";  
24 -  
25 - JSONArray jsonArr = JSONArray.parseArray(a);  
26 - System.out.println(jsonArr);  
27 - }  
28 -  
29 - public static String readFile(String path) throws Exception {  
30 - File file=new File(path);  
31 - FileInputStream fis = new FileInputStream(file);  
32 - FileChannel fc = fis.getChannel();  
33 - ByteBuffer bb = ByteBuffer.allocate(new Long(file.length()).intValue());  
34 - //fc向buffer中读入数据  
35 - fc.read(bb);  
36 - bb.flip();  
37 - String str=new String(bb.array(),"UTF8");  
38 - fc.close();  
39 - fis.close();  
40 - return str;  
41 -  
42 - }  
43 - /**  
44 - * xml转json  
45 - * @param xmlStr  
46 - * @return  
47 - * @throws DocumentException  
48 - */  
49 - public static JSONObject xml2Json(String xmlStr) throws DocumentException{  
50 - Document doc= DocumentHelper.parseText(xmlStr);  
51 - JSONObject json=new JSONObject();  
52 - dom4j2Json(doc.getRootElement(), json);  
53 - return json;  
54 - }  
55 -  
56 - /**  
57 - * xml转json  
58 - * @param element  
59 - * @param json  
60 - */  
61 - public static void dom4j2Json(Element element,JSONObject json){  
62 - //如果是属性  
63 - for(Object o:element.attributes()){  
64 - Attribute attr=(Attribute)o;  
65 - if(!isEmpty(attr.getValue())){  
66 - json.put("@"+attr.getName(), attr.getValue());  
67 - }  
68 - }  
69 - List<Element> chdEl=element.elements();  
70 - if(chdEl.isEmpty()&&!isEmpty(element.getText())){//如果没有子元素,只有一个值  
71 - json.put(element.getName(), element.getText());  
72 - }  
73 -  
74 - for(Element e:chdEl){//有子元素  
75 - if(!e.elements().isEmpty()){//子元素也有子元素  
76 - JSONObject chdjson=new JSONObject();  
77 - dom4j2Json(e,chdjson);  
78 - Object o=json.get(e.getName());  
79 - if(o!=null){  
80 - JSONArray jsona=null;  
81 - if(o instanceof JSONObject){//如果此元素已存在,则转为jsonArray  
82 - JSONObject jsono=(JSONObject)o;  
83 - json.remove(e.getName());  
84 - jsona=new JSONArray();  
85 - jsona.add(jsono);  
86 - jsona.add(chdjson);  
87 - }  
88 - if(o instanceof JSONArray){  
89 - jsona=(JSONArray)o;  
90 - jsona.add(chdjson);  
91 - }  
92 - json.put(e.getName(), jsona);  
93 - }else{  
94 - if(!chdjson.isEmpty()){  
95 - json.put(e.getName(), chdjson);  
96 - }  
97 - }  
98 -  
99 -  
100 - }else{//子元素没有子元素  
101 - for(Object o:element.attributes()){  
102 - Attribute attr=(Attribute)o;  
103 - if(!isEmpty(attr.getValue())){  
104 - json.put("@"+attr.getName(), attr.getValue());  
105 - }  
106 - }  
107 - if(!e.getText().isEmpty()){  
108 - json.put(e.getName(), e.getText());  
109 - }  
110 - }  
111 - }  
112 - }  
113 -  
114 - public static boolean isEmpty(String str) {  
115 -  
116 - if (str == null || str.trim().isEmpty() || "null".equals(str)) {  
117 - return true;  
118 - }  
119 - return false;  
120 - }  
121 -}  
src/main/java/com/bsth/wsdl/GetEmployee.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.annotation.XmlAccessType;  
5 -import javax.xml.bind.annotation.XmlAccessorType;  
6 -import javax.xml.bind.annotation.XmlElement;  
7 -import javax.xml.bind.annotation.XmlRootElement;  
8 -import javax.xml.bind.annotation.XmlType;  
9 -  
10 -  
11 -/**  
12 - * <p>anonymous complex type�� Java �ࡣ  
13 - *  
14 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
15 - *  
16 - * <pre>  
17 - * &lt;complexType&gt;  
18 - * &lt;complexContent&gt;  
19 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
20 - * &lt;sequence&gt;  
21 - * &lt;element name="UnintCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
22 - * &lt;element name="IDCard" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
23 - * &lt;/sequence&gt;  
24 - * &lt;/restriction&gt;  
25 - * &lt;/complexContent&gt;  
26 - * &lt;/complexType&gt;  
27 - * </pre>  
28 - *  
29 - *  
30 - */  
31 -@XmlAccessorType(XmlAccessType.FIELD)  
32 -@XmlType(name = "", propOrder = {  
33 - "unintCode",  
34 - "idCard"  
35 -})  
36 -@XmlRootElement(name = "GetEmployee")  
37 -public class GetEmployee {  
38 -  
39 - @XmlElement(name = "UnintCode")  
40 - protected String unintCode;  
41 - @XmlElement(name = "IDCard")  
42 - protected String idCard;  
43 -  
44 - /**  
45 - * ��ȡunintCode���Ե�ֵ��  
46 - *  
47 - * @return  
48 - * possible object is  
49 - * {@link String }  
50 - *  
51 - */  
52 - public String getUnintCode() {  
53 - return unintCode;  
54 - }  
55 -  
56 - /**  
57 - * ����unintCode���Ե�ֵ��  
58 - *  
59 - * @param value  
60 - * allowed object is  
61 - * {@link String }  
62 - *  
63 - */  
64 - public void setUnintCode(String value) {  
65 - this.unintCode = value;  
66 - }  
67 -  
68 - /**  
69 - * ��ȡidCard���Ե�ֵ��  
70 - *  
71 - * @return  
72 - * possible object is  
73 - * {@link String }  
74 - *  
75 - */  
76 - public String getIDCard() {  
77 - return idCard;  
78 - }  
79 -  
80 - /**  
81 - * ����idCard���Ե�ֵ��  
82 - *  
83 - * @param value  
84 - * allowed object is  
85 - * {@link String }  
86 - *  
87 - */  
88 - public void setIDCard(String value) {  
89 - this.idCard = value;  
90 - }  
91 -  
92 -}  
src/main/java/com/bsth/wsdl/GetEmployeeResponse.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.annotation.XmlAccessType;  
5 -import javax.xml.bind.annotation.XmlAccessorType;  
6 -import javax.xml.bind.annotation.XmlElement;  
7 -import javax.xml.bind.annotation.XmlRootElement;  
8 -import javax.xml.bind.annotation.XmlType;  
9 -  
10 -  
11 -/**  
12 - * <p>anonymous complex type�� Java �ࡣ  
13 - *  
14 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
15 - *  
16 - * <pre>  
17 - * &lt;complexType&gt;  
18 - * &lt;complexContent&gt;  
19 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
20 - * &lt;sequence&gt;  
21 - * &lt;element name="GetEmployeeResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
22 - * &lt;/sequence&gt;  
23 - * &lt;/restriction&gt;  
24 - * &lt;/complexContent&gt;  
25 - * &lt;/complexType&gt;  
26 - * </pre>  
27 - *  
28 - *  
29 - */  
30 -@XmlAccessorType(XmlAccessType.FIELD)  
31 -@XmlType(name = "", propOrder = {  
32 - "getEmployeeResult"  
33 -})  
34 -@XmlRootElement(name = "GetEmployeeResponse")  
35 -public class GetEmployeeResponse {  
36 -  
37 - @XmlElement(name = "GetEmployeeResult")  
38 - protected String getEmployeeResult;  
39 -  
40 - /**  
41 - * ��ȡgetEmployeeResult���Ե�ֵ��  
42 - *  
43 - * @return  
44 - * possible object is  
45 - * {@link String }  
46 - *  
47 - */  
48 - public String getGetEmployeeResult() {  
49 - return getEmployeeResult;  
50 - }  
51 -  
52 - /**  
53 - * ����getEmployeeResult���Ե�ֵ��  
54 - *  
55 - * @param value  
56 - * allowed object is  
57 - * {@link String }  
58 - *  
59 - */  
60 - public void setGetEmployeeResult(String value) {  
61 - this.getEmployeeResult = value;  
62 - }  
63 -  
64 -}  
src/main/java/com/bsth/wsdl/GetPAItem.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.annotation.XmlAccessType;  
5 -import javax.xml.bind.annotation.XmlAccessorType;  
6 -import javax.xml.bind.annotation.XmlElement;  
7 -import javax.xml.bind.annotation.XmlRootElement;  
8 -import javax.xml.bind.annotation.XmlType;  
9 -  
10 -  
11 -/**  
12 - * <p>anonymous complex type�� Java �ࡣ  
13 - *  
14 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
15 - *  
16 - * <pre>  
17 - * &lt;complexType&gt;  
18 - * &lt;complexContent&gt;  
19 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
20 - * &lt;sequence&gt;  
21 - * &lt;element name="Year" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;  
22 - * &lt;element name="Period" type="{http://www.w3.org/2001/XMLSchema}int"/&gt;  
23 - * &lt;/sequence&gt;  
24 - * &lt;/restriction&gt;  
25 - * &lt;/complexContent&gt;  
26 - * &lt;/complexType&gt;  
27 - * </pre>  
28 - *  
29 - *  
30 - */  
31 -@XmlAccessorType(XmlAccessType.FIELD)  
32 -@XmlType(name = "", propOrder = {  
33 - "year",  
34 - "period"  
35 -})  
36 -@XmlRootElement(name = "GetPAItem")  
37 -public class GetPAItem {  
38 -  
39 - @XmlElement(name = "Year")  
40 - protected int year;  
41 - @XmlElement(name = "Period")  
42 - protected int period;  
43 -  
44 - /**  
45 - * ��ȡyear���Ե�ֵ��  
46 - *  
47 - */  
48 - public int getYear() {  
49 - return year;  
50 - }  
51 -  
52 - /**  
53 - * ����year���Ե�ֵ��  
54 - *  
55 - */  
56 - public void setYear(int value) {  
57 - this.year = value;  
58 - }  
59 -  
60 - /**  
61 - * ��ȡperiod���Ե�ֵ��  
62 - *  
63 - */  
64 - public int getPeriod() {  
65 - return period;  
66 - }  
67 -  
68 - /**  
69 - * ����period���Ե�ֵ��  
70 - *  
71 - */  
72 - public void setPeriod(int value) {  
73 - this.period = value;  
74 - }  
75 -  
76 -}  
src/main/java/com/bsth/wsdl/GetPAItemResponse.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.annotation.XmlAccessType;  
5 -import javax.xml.bind.annotation.XmlAccessorType;  
6 -import javax.xml.bind.annotation.XmlElement;  
7 -import javax.xml.bind.annotation.XmlRootElement;  
8 -import javax.xml.bind.annotation.XmlType;  
9 -  
10 -  
11 -/**  
12 - * <p>anonymous complex type�� Java �ࡣ  
13 - *  
14 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
15 - *  
16 - * <pre>  
17 - * &lt;complexType&gt;  
18 - * &lt;complexContent&gt;  
19 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
20 - * &lt;sequence&gt;  
21 - * &lt;element name="GetPAItemResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
22 - * &lt;/sequence&gt;  
23 - * &lt;/restriction&gt;  
24 - * &lt;/complexContent&gt;  
25 - * &lt;/complexType&gt;  
26 - * </pre>  
27 - *  
28 - *  
29 - */  
30 -@XmlAccessorType(XmlAccessType.FIELD)  
31 -@XmlType(name = "", propOrder = {  
32 - "getPAItemResult"  
33 -})  
34 -@XmlRootElement(name = "GetPAItemResponse")  
35 -public class GetPAItemResponse {  
36 -  
37 - @XmlElement(name = "GetPAItemResult")  
38 - protected String getPAItemResult;  
39 -  
40 - /**  
41 - * ��ȡgetPAItemResult���Ե�ֵ��  
42 - *  
43 - * @return  
44 - * possible object is  
45 - * {@link String }  
46 - *  
47 - */  
48 - public String getGetPAItemResult() {  
49 - return getPAItemResult;  
50 - }  
51 -  
52 - /**  
53 - * ����getPAItemResult���Ե�ֵ��  
54 - *  
55 - * @param value  
56 - * allowed object is  
57 - * {@link String }  
58 - *  
59 - */  
60 - public void setGetPAItemResult(String value) {  
61 - this.getPAItemResult = value;  
62 - }  
63 -  
64 -}  
src/main/java/com/bsth/wsdl/GetRetiredInfor.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.annotation.XmlAccessType;  
5 -import javax.xml.bind.annotation.XmlAccessorType;  
6 -import javax.xml.bind.annotation.XmlElement;  
7 -import javax.xml.bind.annotation.XmlRootElement;  
8 -import javax.xml.bind.annotation.XmlType;  
9 -  
10 -  
11 -/**  
12 - * <p>anonymous complex type�� Java �ࡣ  
13 - *  
14 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
15 - *  
16 - * <pre>  
17 - * &lt;complexType&gt;  
18 - * &lt;complexContent&gt;  
19 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
20 - * &lt;sequence&gt;  
21 - * &lt;element name="UnintCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
22 - * &lt;element name="begin_date" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
23 - * &lt;element name="end_date" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
24 - * &lt;/sequence&gt;  
25 - * &lt;/restriction&gt;  
26 - * &lt;/complexContent&gt;  
27 - * &lt;/complexType&gt;  
28 - * </pre>  
29 - *  
30 - *  
31 - */  
32 -@XmlAccessorType(XmlAccessType.FIELD)  
33 -@XmlType(name = "", propOrder = {  
34 - "unintCode",  
35 - "beginDate",  
36 - "endDate"  
37 -})  
38 -@XmlRootElement(name = "GetRetiredInfor")  
39 -public class GetRetiredInfor {  
40 -  
41 - @XmlElement(name = "UnintCode")  
42 - protected String unintCode;  
43 - @XmlElement(name = "begin_date")  
44 - protected String beginDate;  
45 - @XmlElement(name = "end_date")  
46 - protected String endDate;  
47 -  
48 - /**  
49 - * ��ȡunintCode���Ե�ֵ��  
50 - *  
51 - * @return  
52 - * possible object is  
53 - * {@link String }  
54 - *  
55 - */  
56 - public String getUnintCode() {  
57 - return unintCode;  
58 - }  
59 -  
60 - /**  
61 - * ����unintCode���Ե�ֵ��  
62 - *  
63 - * @param value  
64 - * allowed object is  
65 - * {@link String }  
66 - *  
67 - */  
68 - public void setUnintCode(String value) {  
69 - this.unintCode = value;  
70 - }  
71 -  
72 - /**  
73 - * ��ȡbeginDate���Ե�ֵ��  
74 - *  
75 - * @return  
76 - * possible object is  
77 - * {@link String }  
78 - *  
79 - */  
80 - public String getBeginDate() {  
81 - return beginDate;  
82 - }  
83 -  
84 - /**  
85 - * ����beginDate���Ե�ֵ��  
86 - *  
87 - * @param value  
88 - * allowed object is  
89 - * {@link String }  
90 - *  
91 - */  
92 - public void setBeginDate(String value) {  
93 - this.beginDate = value;  
94 - }  
95 -  
96 - /**  
97 - * ��ȡendDate���Ե�ֵ��  
98 - *  
99 - * @return  
100 - * possible object is  
101 - * {@link String }  
102 - *  
103 - */  
104 - public String getEndDate() {  
105 - return endDate;  
106 - }  
107 -  
108 - /**  
109 - * ����endDate���Ե�ֵ��  
110 - *  
111 - * @param value  
112 - * allowed object is  
113 - * {@link String }  
114 - *  
115 - */  
116 - public void setEndDate(String value) {  
117 - this.endDate = value;  
118 - }  
119 -  
120 -}  
src/main/java/com/bsth/wsdl/GetRetiredInforResponse.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.annotation.XmlAccessType;  
5 -import javax.xml.bind.annotation.XmlAccessorType;  
6 -import javax.xml.bind.annotation.XmlElement;  
7 -import javax.xml.bind.annotation.XmlRootElement;  
8 -import javax.xml.bind.annotation.XmlType;  
9 -  
10 -  
11 -/**  
12 - * <p>anonymous complex type�� Java �ࡣ  
13 - *  
14 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
15 - *  
16 - * <pre>  
17 - * &lt;complexType&gt;  
18 - * &lt;complexContent&gt;  
19 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
20 - * &lt;sequence&gt;  
21 - * &lt;element name="GetRetiredInforResult" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
22 - * &lt;/sequence&gt;  
23 - * &lt;/restriction&gt;  
24 - * &lt;/complexContent&gt;  
25 - * &lt;/complexType&gt;  
26 - * </pre>  
27 - *  
28 - *  
29 - */  
30 -@XmlAccessorType(XmlAccessType.FIELD)  
31 -@XmlType(name = "", propOrder = {  
32 - "getRetiredInforResult"  
33 -})  
34 -@XmlRootElement(name = "GetRetiredInforResponse")  
35 -public class GetRetiredInforResponse {  
36 -  
37 - @XmlElement(name = "GetRetiredInforResult")  
38 - protected String getRetiredInforResult;  
39 -  
40 - /**  
41 - * ��ȡgetRetiredInforResult���Ե�ֵ��  
42 - *  
43 - * @return  
44 - * possible object is  
45 - * {@link String }  
46 - *  
47 - */  
48 - public String getGetRetiredInforResult() {  
49 - return getRetiredInforResult;  
50 - }  
51 -  
52 - /**  
53 - * ����getRetiredInforResult���Ե�ֵ��  
54 - *  
55 - * @param value  
56 - * allowed object is  
57 - * {@link String }  
58 - *  
59 - */  
60 - public void setGetRetiredInforResult(String value) {  
61 - this.getRetiredInforResult = value;  
62 - }  
63 -  
64 -}  
src/main/java/com/bsth/wsdl/MyHeader.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import java.util.HashMap;  
5 -import java.util.Map;  
6 -import javax.xml.bind.annotation.XmlAccessType;  
7 -import javax.xml.bind.annotation.XmlAccessorType;  
8 -import javax.xml.bind.annotation.XmlAnyAttribute;  
9 -import javax.xml.bind.annotation.XmlElement;  
10 -import javax.xml.bind.annotation.XmlType;  
11 -import javax.xml.namespace.QName;  
12 -  
13 -  
14 -/**  
15 - * <p>MyHeader complex type�� Java �ࡣ  
16 - *  
17 - * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�  
18 - *  
19 - * <pre>  
20 - * &lt;complexType name="MyHeader"&gt;  
21 - * &lt;complexContent&gt;  
22 - * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;  
23 - * &lt;sequence&gt;  
24 - * &lt;element name="UserPermissionAcct" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
25 - * &lt;element name="UserPermissionPwd" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;  
26 - * &lt;/sequence&gt;  
27 - * &lt;anyAttribute/&gt;  
28 - * &lt;/restriction&gt;  
29 - * &lt;/complexContent&gt;  
30 - * &lt;/complexType&gt;  
31 - * </pre>  
32 - *  
33 - *  
34 - */  
35 -@XmlAccessorType(XmlAccessType.FIELD)  
36 -@XmlType(name = "MyHeader", propOrder = {  
37 - "userPermissionAcct",  
38 - "userPermissionPwd"  
39 -})  
40 -public class MyHeader {  
41 -  
42 - @XmlElement(name = "UserPermissionAcct")  
43 - protected String userPermissionAcct;  
44 - @XmlElement(name = "UserPermissionPwd")  
45 - protected String userPermissionPwd;  
46 - @XmlAnyAttribute  
47 - private Map<QName, String> otherAttributes = new HashMap<QName, String>();  
48 -  
49 - /**  
50 - * ��ȡuserPermissionAcct���Ե�ֵ��  
51 - *  
52 - * @return  
53 - * possible object is  
54 - * {@link String }  
55 - *  
56 - */  
57 - public String getUserPermissionAcct() {  
58 - return userPermissionAcct;  
59 - }  
60 -  
61 - /**  
62 - * ����userPermissionAcct���Ե�ֵ��  
63 - *  
64 - * @param value  
65 - * allowed object is  
66 - * {@link String }  
67 - *  
68 - */  
69 - public void setUserPermissionAcct(String value) {  
70 - this.userPermissionAcct = value;  
71 - }  
72 -  
73 - /**  
74 - * ��ȡuserPermissionPwd���Ե�ֵ��  
75 - *  
76 - * @return  
77 - * possible object is  
78 - * {@link String }  
79 - *  
80 - */  
81 - public String getUserPermissionPwd() {  
82 - return userPermissionPwd;  
83 - }  
84 -  
85 - /**  
86 - * ����userPermissionPwd���Ե�ֵ��  
87 - *  
88 - * @param value  
89 - * allowed object is  
90 - * {@link String }  
91 - *  
92 - */  
93 - public void setUserPermissionPwd(String value) {  
94 - this.userPermissionPwd = value;  
95 - }  
96 -  
97 - /**  
98 - * Gets a map that contains attributes that aren't bound to any typed property on this class.  
99 - *  
100 - * <p>  
101 - * the map is keyed by the name of the attribute and  
102 - * the value is the string value of the attribute.  
103 - *  
104 - * the map returned by this method is live, and you can add new attribute  
105 - * by updating the map directly. Because of this design, there's no setter.  
106 - *  
107 - *  
108 - * @return  
109 - * always non-null  
110 - */  
111 - public Map<QName, String> getOtherAttributes() {  
112 - return otherAttributes;  
113 - }  
114 -  
115 -}  
src/main/java/com/bsth/wsdl/ObjectFactory.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -import javax.xml.bind.JAXBElement;  
5 -import javax.xml.bind.annotation.XmlElementDecl;  
6 -import javax.xml.bind.annotation.XmlRegistry;  
7 -import javax.xml.namespace.QName;  
8 -  
9 -  
10 -/**  
11 - * This object contains factory methods for each  
12 - * Java content interface and Java element interface  
13 - * generated in the com.pd_transport package.  
14 - * <p>An ObjectFactory allows you to programatically  
15 - * construct new instances of the Java representation  
16 - * for XML content. The Java representation of XML  
17 - * content can consist of schema derived interfaces  
18 - * and classes representing the binding of schema  
19 - * type definitions, element declarations and model  
20 - * groups. Factory methods for each of these are  
21 - * provided in this class.  
22 - *  
23 - */  
24 -@XmlRegistry  
25 -public class ObjectFactory {  
26 -  
27 - private final static QName _MyHeader_QNAME = new QName("http://www.pd-transport.com/", "MyHeader");  
28 -  
29 - /**  
30 - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.pd_transport  
31 - *  
32 - */  
33 - public ObjectFactory() {  
34 - }  
35 -  
36 - /**  
37 - * Create an instance of {@link GetEmployee }  
38 - *  
39 - */  
40 - public GetEmployee createGetEmployee() {  
41 - return new GetEmployee();  
42 - }  
43 -  
44 - /**  
45 - * Create an instance of {@link GetEmployeeResponse }  
46 - *  
47 - */  
48 - public GetEmployeeResponse createGetEmployeeResponse() {  
49 - return new GetEmployeeResponse();  
50 - }  
51 -  
52 - /**  
53 - * Create an instance of {@link MyHeader }  
54 - *  
55 - */  
56 - public MyHeader createMyHeader() {  
57 - return new MyHeader();  
58 - }  
59 -  
60 - /**  
61 - * Create an instance of {@link GetPAItem }  
62 - *  
63 - */  
64 - public GetPAItem createGetPAItem() {  
65 - return new GetPAItem();  
66 - }  
67 -  
68 - /**  
69 - * Create an instance of {@link GetPAItemResponse }  
70 - *  
71 - */  
72 - public GetPAItemResponse createGetPAItemResponse() {  
73 - return new GetPAItemResponse();  
74 - }  
75 -  
76 - /**  
77 - * Create an instance of {@link GetRetiredInfor }  
78 - *  
79 - */  
80 - public GetRetiredInfor createGetRetiredInfor() {  
81 - return new GetRetiredInfor();  
82 - }  
83 -  
84 - /**  
85 - * Create an instance of {@link GetRetiredInforResponse }  
86 - *  
87 - */  
88 - public GetRetiredInforResponse createGetRetiredInforResponse() {  
89 - return new GetRetiredInforResponse();  
90 - }  
91 -  
92 - /**  
93 - * Create an instance of {@link JAXBElement }{@code <}{@link MyHeader }{@code >}  
94 - *  
95 - * @param value  
96 - * Java instance representing xml element's value.  
97 - * @return  
98 - * the new instance of {@link JAXBElement }{@code <}{@link MyHeader }{@code >}  
99 - */  
100 - @XmlElementDecl(namespace = "http://www.pd-transport.com/", name = "MyHeader")  
101 - public JAXBElement<MyHeader> createMyHeader(MyHeader value) {  
102 - return new JAXBElement<MyHeader>(_MyHeader_QNAME, MyHeader.class, null, value);  
103 - }  
104 -  
105 -}  
src/main/java/com/bsth/wsdl/PJDataSerivce.java deleted 100644 → 0
1 -package com.bsth.wsdl;  
2 -  
3 -import javax.xml.namespace.QName;  
4 -import javax.xml.ws.Service;  
5 -import javax.xml.ws.WebEndpoint;  
6 -import javax.xml.ws.WebServiceClient;  
7 -import javax.xml.ws.WebServiceFeature;  
8 -import java.net.MalformedURLException;  
9 -import java.net.URL;  
10 -  
11 -/**  
12 - * This class was generated by Apache CXF 3.3.2  
13 - * 2019-06-25T10:55:23.807+08:00  
14 - * Generated source version: 3.3.2  
15 - *  
16 - */  
17 -@WebServiceClient(name = "PJDataSerivce",  
18 - wsdlLocation = "http://116.236.238.218:31/PJDataInterface/PJDataService.asmx?wsdl",  
19 - targetNamespace = "http://www.pd-transport.com/")  
20 -public class PJDataSerivce extends Service {  
21 -  
22 - public final static URL WSDL_LOCATION;  
23 -  
24 - public final static QName SERVICE = new QName("http://www.pd-transport.com/", "PJDataSerivce");  
25 - public final static QName PJDataSerivceSoap12 = new QName("http://www.pd-transport.com/", "PJDataSerivceSoap12");  
26 - public final static QName PJDataSerivceSoap = new QName("http://www.pd-transport.com/", "PJDataSerivceSoap");  
27 - static {  
28 - URL url = null;  
29 - try {  
30 - url = new URL("http://116.236.238.218:31/PJDataInterface/PJDataService.asmx?wsdl");  
31 - } catch (MalformedURLException e) {  
32 - java.util.logging.Logger.getLogger(PJDataSerivce.class.getName())  
33 - .log(java.util.logging.Level.INFO,  
34 - "Can not initialize the default wsdl from {0}", "http://116.236.238.218:31/PJDataInterface/PJDataService.asmx?wsdl");  
35 - }  
36 - WSDL_LOCATION = url;  
37 - }  
38 -  
39 - public PJDataSerivce(URL wsdlLocation) {  
40 - super(wsdlLocation, SERVICE);  
41 - }  
42 -  
43 - public PJDataSerivce(URL wsdlLocation, QName serviceName) {  
44 - super(wsdlLocation, serviceName);  
45 - }  
46 -  
47 - public PJDataSerivce() {  
48 - super(WSDL_LOCATION, SERVICE);  
49 - }  
50 -  
51 - public PJDataSerivce(WebServiceFeature ... features) {  
52 - super(WSDL_LOCATION, SERVICE, features);  
53 - }  
54 -  
55 - public PJDataSerivce(URL wsdlLocation, WebServiceFeature ... features) {  
56 - super(wsdlLocation, SERVICE, features);  
57 - }  
58 -  
59 - public PJDataSerivce(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {  
60 - super(wsdlLocation, serviceName, features);  
61 - }  
62 -  
63 -  
64 -  
65 -  
66 - /**  
67 - *  
68 - * @return  
69 - * returns PJDataSerivceSoap  
70 - */  
71 - @WebEndpoint(name = "PJDataSerivceSoap12")  
72 - public PJDataSerivceSoap getPJDataSerivceSoap12() {  
73 - return super.getPort(PJDataSerivceSoap12, PJDataSerivceSoap.class);  
74 - }  
75 -  
76 - /**  
77 - *  
78 - * @param features  
79 - * A list of {@link WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.  
80 - * @return  
81 - * returns PJDataSerivceSoap  
82 - */  
83 - @WebEndpoint(name = "PJDataSerivceSoap12")  
84 - public PJDataSerivceSoap getPJDataSerivceSoap12(WebServiceFeature... features) {  
85 - return super.getPort(PJDataSerivceSoap12, PJDataSerivceSoap.class, features);  
86 - }  
87 -  
88 -  
89 - /**  
90 - *  
91 - * @return  
92 - * returns PJDataSerivceSoap  
93 - */  
94 - @WebEndpoint(name = "PJDataSerivceSoap")  
95 - public PJDataSerivceSoap getPJDataSerivceSoap() {  
96 - return super.getPort(PJDataSerivceSoap, PJDataSerivceSoap.class);  
97 - }  
98 -  
99 - /**  
100 - *  
101 - * @param features  
102 - * A list of {@link WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.  
103 - * @return  
104 - * returns PJDataSerivceSoap  
105 - */  
106 - @WebEndpoint(name = "PJDataSerivceSoap")  
107 - public PJDataSerivceSoap getPJDataSerivceSoap(WebServiceFeature... features) {  
108 - return super.getPort(PJDataSerivceSoap, PJDataSerivceSoap.class, features);  
109 - }  
110 -  
111 -}  
src/main/java/com/bsth/wsdl/PJDataSerivceSoap.java deleted 100644 → 0
1 -package com.bsth.wsdl;  
2 -  
3 -import javax.jws.WebMethod;  
4 -import javax.jws.WebParam;  
5 -import javax.jws.WebResult;  
6 -import javax.jws.WebService;  
7 -import javax.xml.bind.annotation.XmlSeeAlso;  
8 -import javax.xml.ws.RequestWrapper;  
9 -import javax.xml.ws.ResponseWrapper;  
10 -  
11 -/**  
12 - * This class was generated by Apache CXF 3.3.2  
13 - * 2019-06-25T10:55:23.796+08:00  
14 - * Generated source version: 3.3.2  
15 - *  
16 - */  
17 -@WebService(targetNamespace = "http://www.pd-transport.com/", name = "PJDataSerivceSoap")  
18 -@XmlSeeAlso({ObjectFactory.class})  
19 -public interface PJDataSerivceSoap {  
20 -  
21 - /**  
22 - * 离退人员信息接口  
23 - */  
24 - @WebMethod(operationName = "GetRetiredInfor", action = "http://www.pd-transport.com/GetRetiredInfor")  
25 - @RequestWrapper(localName = "GetRetiredInfor", targetNamespace = "http://www.pd-transport.com/", className = "com.pd_transport.GetRetiredInfor")  
26 - @ResponseWrapper(localName = "GetRetiredInforResponse", targetNamespace = "http://www.pd-transport.com/", className = "com.pd_transport.GetRetiredInforResponse")  
27 - @WebResult(name = "GetRetiredInforResult", targetNamespace = "http://www.pd-transport.com/")  
28 - public String getRetiredInfor(  
29 -  
30 - @WebParam(name = "UnintCode", targetNamespace = "http://www.pd-transport.com/")  
31 - String unintCode,  
32 - @WebParam(name = "begin_date", targetNamespace = "http://www.pd-transport.com/")  
33 - String beginDate,  
34 - @WebParam(name = "end_date", targetNamespace = "http://www.pd-transport.com/")  
35 - String endDate  
36 - );  
37 -  
38 - /**  
39 - * 薪资信息数据接口  
40 - */  
41 - @WebMethod(operationName = "GetPAItem", action = "http://www.pd-transport.com/GetPAItem")  
42 - @RequestWrapper(localName = "GetPAItem", targetNamespace = "http://www.pd-transport.com/", className = "com.pd_transport.GetPAItem")  
43 - @ResponseWrapper(localName = "GetPAItemResponse", targetNamespace = "http://www.pd-transport.com/", className = "com.pd_transport.GetPAItemResponse")  
44 - @WebResult(name = "GetPAItemResult", targetNamespace = "http://www.pd-transport.com/")  
45 - public String getPAItem(  
46 -  
47 - @WebParam(name = "Year", targetNamespace = "http://www.pd-transport.com/")  
48 - int year,  
49 - @WebParam(name = "Period", targetNamespace = "http://www.pd-transport.com/")  
50 - int period  
51 - );  
52 -  
53 - /**  
54 - * 在职人员信息接口  
55 - */  
56 - @WebMethod(operationName = "GetEmployee", action = "http://www.pd-transport.com/GetEmployee")  
57 - @RequestWrapper(localName = "GetEmployee", targetNamespace = "http://www.pd-transport.com/", className = "com.pd_transport.GetEmployee")  
58 - @ResponseWrapper(localName = "GetEmployeeResponse", targetNamespace = "http://www.pd-transport.com/", className = "com.pd_transport.GetEmployeeResponse")  
59 - @WebResult(name = "GetEmployeeResult", targetNamespace = "http://www.pd-transport.com/")  
60 - public String getEmployee(  
61 -  
62 - @WebParam(name = "UnintCode", targetNamespace = "http://www.pd-transport.com/")  
63 - String unintCode,  
64 - @WebParam(name = "IDCard", targetNamespace = "http://www.pd-transport.com/")  
65 - String idCard  
66 - );  
67 -}  
src/main/java/com/bsth/wsdl/PJDataSerivceSoap_PJDataSerivceSoap12_Client.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -/**  
5 - * Please modify this class to meet your needs  
6 - * This class is not complete  
7 - */  
8 -  
9 -import com.alibaba.fastjson.JSONArray;  
10 -import com.alibaba.fastjson.JSONObject;  
11 -import com.bsth.util.XmlToJson;  
12 -import org.springframework.beans.factory.annotation.Autowired;  
13 -import org.springframework.jdbc.core.JdbcTemplate;  
14 -  
15 -import javax.xml.namespace.QName;  
16 -import java.io.File;  
17 -import java.net.MalformedURLException;  
18 -import java.net.URL;  
19 -/**  
20 - * This class was generated by Apache CXF 3.3.2  
21 - * 2019-06-25T10:55:23.727+08:00  
22 - * Generated source version: 3.3.2  
23 - *  
24 - */  
25 -public final class PJDataSerivceSoap_PJDataSerivceSoap12_Client {  
26 -  
27 - @Autowired  
28 - JdbcTemplate jdbcTemplate;  
29 -  
30 - private static final QName SERVICE_NAME = new QName("http://www.pd-transport.com/", "PJDataSerivce");  
31 -  
32 - private PJDataSerivceSoap_PJDataSerivceSoap12_Client() {  
33 - }  
34 -  
35 - public static void main(String args[]) throws Exception {  
36 - URL wsdlURL = PJDataSerivce.WSDL_LOCATION;  
37 - if (args.length > 0 && args[0] != null && !"".equals(args[0])) {  
38 - File wsdlFile = new File(args[0]);  
39 - try {  
40 - if (wsdlFile.exists()) {  
41 - wsdlURL = wsdlFile.toURI().toURL();  
42 - } else {  
43 - wsdlURL = new URL(args[0]);  
44 - }  
45 - } catch (MalformedURLException e) {  
46 - e.printStackTrace();  
47 - }  
48 - }  
49 -  
50 - PJDataSerivce ss = new PJDataSerivce(wsdlURL, SERVICE_NAME);  
51 - PJDataSerivceSoap port = ss.getPJDataSerivceSoap12();  
52 -  
53 - {  
54 - System.out.println("Invoking getRetiredInfor...");  
55 - String _getRetiredInfor_unintCode = "KD01.0110";  
56 - String _getRetiredInfor_beginDate = "1900-01-01";  
57 - String _getRetiredInfor_endDate = "2019-06-25";  
58 - String _getRetiredInfor__return = port.getRetiredInfor(_getRetiredInfor_unintCode, _getRetiredInfor_beginDate, _getRetiredInfor_endDate);  
59 -  
60 - JSONObject jsonInfor = XmlToJson.xml2Json(_getRetiredInfor__return);  
61 - System.out.println("getRetiredInfor.result=" + _getRetiredInfor__return);  
62 - JSONArray jsonArr = JSONArray.parseArray(jsonInfor.get("Retire").toString());  
63 - for(int i=0;i<jsonArr.size()-1; i++){  
64 - JSONObject pjson = jsonArr.getJSONObject(i);  
65 - String codeArr[] = pjson.getString("Code").split("-");  
66 -// if(pjson.getString("EmployeeName").equals("潘英") || pjson.getString("EmployeeName").equals("陆志兴")|| pjson.getString("EmployeeName").equals("沈志钢")){  
67 -// System.out.print(pjson);  
68 -// }  
69 -// if(codeArr.length > 1){  
70 -// if(codeArr[1].equals("016007") || codeArr[1].equals("006005") || codeArr[1].equals("005634") || codeArr[1].equals("007969")){  
71 -// System.out.print(pjson);  
72 -// }  
73 -// } else {  
74 -// System.out.print(codeArr);  
75 -// }  
76 - }  
77 -  
78 - }  
79 -// {  
80 -// System.out.println("Invoking getPAItem...");  
81 -// int _getPAItem_year = 0;  
82 -// int _getPAItem_period = 0;  
83 -// String _getPAItem__return = port.getPAItem(_getPAItem_year, _getPAItem_period);  
84 -// System.out.println("getPAItem.result=" + _getPAItem__return);  
85 -//  
86 -//  
87 -// }  
88 -  
89 - {  
90 - System.out.println("Invoking getEmployee...");  
91 - String _getEmployee_unintCode = "KD01.0112";  
92 - String _getEmployee_idCard = "";  
93 - String _getEmployee__return = port.getEmployee(_getEmployee_unintCode, _getEmployee_idCard);  
94 - JSONObject jsonInfor = XmlToJson.xml2Json(_getEmployee__return);  
95 - JSONArray jsonArr = JSONArray.parseArray(jsonInfor.get("Emp").toString());  
96 - jsonArr.getJSONObject(0).get("Code");  
97 -// jsonArr = JSONArray.fromObject(jsonInfor.get("Emp").toString());  
98 - System.out.println("getEmployee.result=" + _getEmployee__return);  
99 - for(int i=0;i<jsonArr.size()-1; i++){  
100 - JSONObject pjson = jsonArr.getJSONObject(i);  
101 - String codeArr[] = pjson.getString("Code").split("-");  
102 - if(codeArr[1].equals("016007") || codeArr[1].equals("006005") || codeArr[1].equals("005634") || codeArr[1].equals("007969")){  
103 - System.out.print(pjson);  
104 - }  
105 - }  
106 -  
107 - }  
108 -  
109 - System.exit(0);  
110 - }  
111 -  
112 -}  
src/main/java/com/bsth/wsdl/PJDataSerivceSoap_PJDataSerivceSoap_Client.java deleted 100644 → 0
1 -  
2 -package com.bsth.wsdl;  
3 -  
4 -/**  
5 - * Please modify this class to meet your needs  
6 - * This class is not complete  
7 - */  
8 -  
9 -import javax.xml.namespace.QName;  
10 -import java.io.File;  
11 -import java.net.MalformedURLException;  
12 -import java.net.URL;  
13 -  
14 -/**  
15 - * This class was generated by Apache CXF 3.3.2  
16 - * 2019-06-25T10:55:23.780+08:00  
17 - * Generated source version: 3.3.2  
18 - *  
19 - */  
20 -public final class PJDataSerivceSoap_PJDataSerivceSoap_Client {  
21 -  
22 - private static final QName SERVICE_NAME = new QName("http://www.pd-transport.com/", "PJDataSerivce");  
23 -  
24 - private PJDataSerivceSoap_PJDataSerivceSoap_Client() {  
25 - }  
26 -  
27 - public static void main(String args[]) throws Exception {  
28 - URL wsdlURL = PJDataSerivce.WSDL_LOCATION;  
29 - if (args.length > 0 && args[0] != null && !"".equals(args[0])) {  
30 - File wsdlFile = new File(args[0]);  
31 - try {  
32 - if (wsdlFile.exists()) {  
33 - wsdlURL = wsdlFile.toURI().toURL();  
34 - } else {  
35 - wsdlURL = new URL(args[0]);  
36 - }  
37 - } catch (MalformedURLException e) {  
38 - e.printStackTrace();  
39 - }  
40 - }  
41 -  
42 - PJDataSerivce ss = new PJDataSerivce(wsdlURL, SERVICE_NAME);  
43 - PJDataSerivceSoap port = ss.getPJDataSerivceSoap();  
44 -  
45 - {  
46 - System.out.println("Invoking getRetiredInfor...");  
47 - String _getRetiredInfor_unintCode = "";  
48 - String _getRetiredInfor_beginDate = "";  
49 - String _getRetiredInfor_endDate = "";  
50 - String _getRetiredInfor__return = port.getRetiredInfor(_getRetiredInfor_unintCode, _getRetiredInfor_beginDate, _getRetiredInfor_endDate);  
51 - System.out.println("getRetiredInfor.result=" + _getRetiredInfor__return);  
52 -  
53 -  
54 - }  
55 - {  
56 - System.out.println("Invoking getPAItem...");  
57 - int _getPAItem_year = 0;  
58 - int _getPAItem_period = 0;  
59 - String _getPAItem__return = port.getPAItem(_getPAItem_year, _getPAItem_period);  
60 - System.out.println("getPAItem.result=" + _getPAItem__return);  
61 -  
62 -  
63 - }  
64 - {  
65 - System.out.println("Invoking getEmployee...");  
66 - String _getEmployee_unintCode = "";  
67 - String _getEmployee_idCard = "";  
68 - String _getEmployee__return = port.getEmployee(_getEmployee_unintCode, _getEmployee_idCard);  
69 - System.out.println("getEmployee.result=" + _getEmployee__return);  
70 -  
71 -  
72 - }  
73 -  
74 - System.exit(0);  
75 - }  
76 -  
77 -}  
src/main/java/com/bsth/wsdl/package-info.java deleted 100644 → 0
1 -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.pd-transport.com/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)  
2 -package com.bsth.wsdl;  
src/main/resources/application-dev.properties
1 -server.port=8776 1 +server.port=9099
2 management.port= 9001 2 management.port= 9001
3 management.address= 127.0.0.1 3 management.address= 127.0.0.1
4 4
5 -spring.jpa.hibernate.ddl-auto= update 5 +spring.jpa.hibernate.ddl-auto= none
6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy 6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
7 #DATABASE 7 #DATABASE
8 spring.jpa.database= MYSQL 8 spring.jpa.database= MYSQL
9 spring.jpa.show-sql= true 9 spring.jpa.show-sql= true
10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 -spring.datasource.url= jdbc:mysql://localhost:3306/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false 11 +spring.datasource.url= jdbc:mysql://localhost:3306/control_cope?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 spring.datasource.username= root 12 spring.datasource.username= root
13 -spring.datasource.password= 13 +spring.datasource.password= root
14 #DATASOURCE 14 #DATASOURCE
15 spring.datasource.max-active=100 15 spring.datasource.max-active=100
16 spring.datasource.max-idle=8 16 spring.datasource.max-idle=8
src/main/resources/application-prod.properties
1 -server.port=8776 1 +server.port=9088
2 management.port= 9001 2 management.port= 9001
3 management.address= 127.0.0.1 3 management.address= 127.0.0.1
4 4
@@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
8 spring.jpa.database= MYSQL 8 spring.jpa.database= MYSQL
9 spring.jpa.show-sql= true 9 spring.jpa.show-sql= true
10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 -spring.datasource.url= jdbc:mysql://10.10.150.24:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false 11 +spring.datasource.url= jdbc:mysql://10.10.150.20:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 spring.datasource.username= root 12 spring.datasource.username= root
13 -spring.datasource.password= root2jsp 13 +spring.datasource.password= root2jsp@JSP
14 #DATASOURCE 14 #DATASOURCE
15 spring.datasource.max-active=100 15 spring.datasource.max-active=100
16 spring.datasource.max-idle=8 16 spring.datasource.max-idle=8
src/main/resources/application.properties
1 spring.profiles: dev,prod 1 spring.profiles: dev,prod
2 -spring.profiles.active: prod 2 +spring.profiles.active: dev
3 3
4 spring.view.suffix=.html 4 spring.view.suffix=.html
5 server.session-timeout=-1 5 server.session-timeout=-1
@@ -16,6 +16,3 @@ server.compression.mime-types=application/json,application/xml,text/html,text/xm @@ -16,6 +16,3 @@ server.compression.mime-types=application/json,application/xml,text/html,text/xm
16 16
17 #redis »º´æ¶àÉÙÌìµÄÊý¾Ý 17 #redis »º´æ¶àÉÙÌìµÄÊý¾Ý
18 cache.days=60 18 cache.days=60
19 -  
20 -  
21 -mybatis.mapper-locations=classpath:mapper/*.xml  
src/main/resources/logback.xml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <configuration> 3 <configuration>
4 4
5 <!-- <property resource="application.properties" /> --> 5 <!-- <property resource="application.properties" /> -->
6 - <property name="LOG_BASE" value="E:/personnel_update_log" /> 6 + <property name="LOG_BASE" value="E:/calc_log" />
7 <!-- 控制台输出 --> 7 <!-- 控制台输出 -->
8 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> 8 <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
9 9
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 class="ch.qos.logback.core.rolling.RollingFileAppender"> 19 class="ch.qos.logback.core.rolling.RollingFileAppender">
20 <file>${LOG_BASE}/calc_log.log</file> 20 <file>${LOG_BASE}/calc_log.log</file>
21 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> 21 <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
22 - <fileNamePattern>${LOG_BASE}/personnel_update_log-%d{yyyy-MM-dd}.%i.log</fileNamePattern> 22 + <fileNamePattern>${LOG_BASE}/calc_log-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
23 <timeBasedFileNamingAndTriggeringPolicy 23 <timeBasedFileNamingAndTriggeringPolicy
24 class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> 24 class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
25 <maxFileSize>100MB</maxFileSize> 25 <maxFileSize>100MB</maxFileSize>
src/main/resources/ms-jdbc.properties 0 → 100644
  1 +#ms.mysql.driver= com.mysql.jdbc.Driver
  2 +#ms.mysql.url= jdbc:mysql://10.10.150.21:3306/ms?useUnicode=true&characterEncoding=utf-8&useSSL=false
  3 +#ms.mysql.username= root
  4 +#ms.mysql.password= root2jsp@JSP
  5 +
  6 +ms.mysql.driver= com.mysql.jdbc.Driver
  7 +ms.mysql.url= jdbc:mysql://localhost:3306/ms?useUnicode=true&characterEncoding=utf-8
  8 +ms.mysql.username= root
  9 +ms.mysql.password= root
src/main/resources/personnel-jdbc.properties deleted 100644 → 0
1 -#ms.mysql.driver= com.mysql.jdbc.Driver  
2 -#ms.mysql.url= jdbc:mysql://127.0.0.1:3306/personnel?useUnicode=true&characterEncoding=utf-8&useSSL=false  
3 -#ms.mysql.username= root  
4 -#ms.mysql.password=  
5 -  
6 -ms.mysql.driver= com.mysql.jdbc.Driver  
7 -ms.mysql.url= jdbc:mysql://10.10.150.24:3306/personnel?useUnicode=true&characterEncoding=utf-8  
8 -ms.mysql.username= root  
9 -ms.mysql.password= root2jsp