Commit e8da88c98d944f8a9744e55c3de88640a7d6eff1

Authored by 娄高锋
1 parent a8eecb3f

线路查询添加撤销线路,使用(撤销)作为标识区分。加油加电修正修改时间没有保存的问题。

src/main/java/com/bsth/controller/report/ReportController.java
... ... @@ -290,6 +290,11 @@ public class ReportController {
290 290 return service.lineList();
291 291 }
292 292  
  293 + @RequestMapping(value="/lineListNotDestroy",method = RequestMethod.GET)
  294 + public List<Map<String,Object>> lineListNotDestroy(){
  295 + return service.lineListNotDestroy();
  296 + }
  297 +
293 298 @RequestMapping(value="/carList",method = RequestMethod.GET)
294 299 public List<Map<String,String>> carList(@RequestParam Map<String, Object> map){
295 300 return service.carList(map);
... ...
src/main/java/com/bsth/entity/oil/Cwjy.java
1   -package com.bsth.entity.oil;
2   -
3   -import java.util.Date;
4   -
5   -import javax.persistence.*;
6   -
7   -import com.bsth.data.BasicData;
8   -
9   -@Entity
10   -@Table(name = "bsth_c_cwjy")
11   -public class Cwjy {
12   - @Id
13   - @GeneratedValue(strategy = GenerationType.IDENTITY)
14   - private Integer id;
15   -
16   - private String gsdm;
17   -
18   - private String fgsdm;
19   -
20   - private String nbbm;
21   -
22   - private String xgr;
23   -
24   - private Date createDate;
25   -
26   - private String line;
27   -
28   - @Transient
29   - private String linename;
30   -
31   - @Transient
32   - private String gsname;
33   -
34   - @Transient
35   - private String fgsname;
36   - public Integer getId() {
37   - return id;
38   - }
39   -
40   - public void setId(Integer id) {
41   - this.id = id;
42   - }
43   -
44   - public String getGsdm() {
45   - return gsdm;
46   - }
47   -
48   - public void setGsdm(String gsdm) {
49   - this.gsdm = gsdm;
50   - }
51   -
52   - public String getFgsdm() {
53   - return fgsdm;
54   - }
55   -
56   - public void setFgsdm(String fgsdm) {
57   - this.fgsdm = fgsdm;
58   - }
59   -
60   - public String getNbbm() {
61   - return nbbm;
62   - }
63   -
64   - public void setNbbm(String nbbm) {
65   - this.nbbm = nbbm;
66   - }
67   -
68   - public String getXgr() {
69   - return xgr;
70   - }
71   -
72   - public void setXgr(String xgr) {
73   - this.xgr = xgr;
74   - }
75   -
76   - public Date getCreateDate() {
77   - return createDate;
78   - }
79   -
80   - public void setCreateDate(Date createDate) {
81   - this.createDate = createDate;
82   - }
83   -
84   - public String getGsname() {
85   - return BasicData.businessCodeNameMap.get(this.gsdm);
86   - }
87   -
88   - public void setGsname(String gsname) {
89   - this.gsname = gsname;
90   - }
91   -
92   - public String getFgsname() {
93   - return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
94   - }
95   -
96   - public void setFgsname(String fgsname) {
97   - this.fgsname = fgsname;
98   - }
99   -
100   - public String getLine() {
101   - return line;
102   - }
103   -
104   - public void setLine(String line) {
105   - this.line = line;
106   - }
107   -
108   - public String getLinename() {
109   - return BasicData.lineCode2NameMap.get(this.line);
110   - }
111   -
112   - public void setLinename(String linename) {
113   - this.linename = linename;
114   - }
115   -
116   -
117   -
118   -
119   -}
  1 +package com.bsth.entity.oil;
  2 +
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.*;
  6 +
  7 +import com.bsth.data.BasicData;
  8 +
  9 +@Entity
  10 +@Table(name = "bsth_c_cwjy")
  11 +public class Cwjy {
  12 + @Id
  13 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  14 + private Integer id;
  15 +
  16 + private String gsdm;
  17 +
  18 + private String fgsdm;
  19 +
  20 + private String nbbm;
  21 +
  22 + private String xgr;
  23 +
  24 + private Date createDate;
  25 +
  26 + private String line;
  27 +
  28 + @Transient
  29 + private String linename;
  30 +
  31 + @Transient
  32 + private String gsname;
  33 +
  34 + @Transient
  35 + private String fgsname;
  36 + public Integer getId() {
  37 + return id;
  38 + }
  39 +
  40 + public void setId(Integer id) {
  41 + this.id = id;
  42 + }
  43 +
  44 + public String getGsdm() {
  45 + return gsdm;
  46 + }
  47 +
  48 + public void setGsdm(String gsdm) {
  49 + this.gsdm = gsdm;
  50 + }
  51 +
  52 + public String getFgsdm() {
  53 + return fgsdm;
  54 + }
  55 +
  56 + public void setFgsdm(String fgsdm) {
  57 + this.fgsdm = fgsdm;
  58 + }
  59 +
  60 + public String getNbbm() {
  61 + return nbbm;
  62 + }
  63 +
  64 + public void setNbbm(String nbbm) {
  65 + this.nbbm = nbbm;
  66 + }
  67 +
  68 + public String getXgr() {
  69 + return xgr;
  70 + }
  71 +
  72 + public void setXgr(String xgr) {
  73 + this.xgr = xgr;
  74 + }
  75 +
  76 + public Date getCreateDate() {
  77 + return createDate;
  78 + }
  79 +
  80 + public void setCreateDate(Date createDate) {
  81 + this.createDate = createDate;
  82 + }
  83 +
  84 + public String getGsname() {
  85 + return BasicData.businessCodeNameMap!=null?BasicData.businessCodeNameMap.get(this.gsdm):gsname;
  86 + }
  87 +
  88 + public void setGsname(String gsname) {
  89 + this.gsname = gsname;
  90 + }
  91 +
  92 + public String getFgsname() {
  93 + return BasicData.businessFgsCodeNameMap!=null?BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm):fgsdm;
  94 + }
  95 +
  96 + public void setFgsname(String fgsname) {
  97 + this.fgsname = fgsname;
  98 + }
  99 +
  100 + public String getLine() {
  101 + return line;
  102 + }
  103 +
  104 + public void setLine(String line) {
  105 + this.line = line;
  106 + }
  107 +
  108 + public String getLinename() {
  109 + return BasicData.lineCode2NameMap!=null?BasicData.lineCode2NameMap.get(this.line):linename;
  110 + }
  111 +
  112 + public void setLinename(String linename) {
  113 + this.linename = linename;
  114 + }
  115 +
  116 +
  117 +
  118 +
  119 +}
... ...
src/main/java/com/bsth/entity/oil/Ylxxb.java
1   -package com.bsth.entity.oil;
2   -
3   -import java.util.Date;
4   -
5   -import javax.persistence.*;
6   -
7   -import org.springframework.format.annotation.DateTimeFormat;
8   -
9   -import com.bsth.data.BasicData;
10   -
11   -@Entity
12   -@Table(name = "bsth_c_ylxxb")
13   -public class Ylxxb {
14   - @Id
15   - @GeneratedValue(strategy = GenerationType.IDENTITY)
16   - private Integer id;
17   - @DateTimeFormat(pattern="yyyy-MM-dd")
18   - private Date yyrq;
19   - private Date jlrq;
20   - private String nbbm;
21   - private String jsy;
22   - private Double jzl;
23   - private String stationid;
24   - private Date createtime;
25   - private String gsdm;
26   - private String fgsdm;
27   - private String yp;
28   - private String jyggh;
29   - private Double yj;
30   - private String bz;
31   - private Date xgrq;
32   - private String xgr;
33   - private String fromgsdm;
34   - private Integer nylx;
35   - @Transient
36   - private String ldgh;
37   - //0为接口数据,1为手工输入,2为改变车号,3为改变驾驶员
38   - private Integer jylx=0;
39   - @Transient
40   - private String gsname;
41   - @Transient
42   - private String fgsname;
43   - @Transient
44   - private String linename;
45   - @Transient
46   - private Double zjzl;
47   -
48   -
49   - public Integer getId() {
50   - return id;
51   - }
52   - public void setId(Integer id) {
53   - this.id = id;
54   - }
55   - public Date getYyrq() {
56   - return yyrq;
57   - }
58   - public void setYyrq(Date yyrq) {
59   - this.yyrq = yyrq;
60   - }
61   - public Date getJlrq() {
62   - return jlrq;
63   - }
64   - public void setJlrq(Date jlrq) {
65   - this.jlrq = jlrq;
66   - }
67   - public String getNbbm() {
68   - return nbbm;
69   - }
70   - public void setNbbm(String nbbm) {
71   - this.nbbm = nbbm;
72   - }
73   - public String getJsy() {
74   - return jsy;
75   - }
76   - public void setJsy(String jsy) {
77   - this.jsy = jsy;
78   - }
79   - public Double getJzl() {
80   - return jzl;
81   - }
82   - public void setJzl(Double jzl) {
83   - this.jzl = jzl;
84   - }
85   - public String getStationid() {
86   - return stationid;
87   - }
88   - public void setStationid(String stationid) {
89   - this.stationid = stationid;
90   - }
91   - public Date getCreatetime() {
92   - return createtime;
93   - }
94   - public void setCreatetime(Date createtime) {
95   - this.createtime = createtime;
96   - }
97   - public String getGsdm() {
98   - return gsdm;
99   - }
100   - public void setGsdm(String gsdm) {
101   - this.gsdm = gsdm;
102   - }
103   -
104   -
105   - public String getFgsdm() {
106   - return fgsdm;
107   - }
108   - public void setFgsdm(String fgsdm) {
109   - this.fgsdm = fgsdm;
110   - }
111   - public String getYp() {
112   - return yp;
113   - }
114   - public void setYp(String yp) {
115   - this.yp = yp;
116   - }
117   - public String getJyggh() {
118   - return jyggh;
119   - }
120   - public void setJyggh(String jyggh) {
121   - this.jyggh = jyggh;
122   - }
123   - public Double getYj() {
124   - return yj;
125   - }
126   - public void setYj(Double yj) {
127   - this.yj = yj;
128   - }
129   - public String getBz() {
130   - return bz;
131   - }
132   - public void setBz(String bz) {
133   - this.bz = bz;
134   - }
135   - public Date getXgrq() {
136   - return xgrq;
137   - }
138   - public void setXgrq(Date xgrq) {
139   - this.xgrq = xgrq;
140   - }
141   - public String getXgr() {
142   - return xgr;
143   - }
144   - public void setXgr(String xgr) {
145   - this.xgr = xgr;
146   - }
147   - public String getFromgsdm() {
148   - return fromgsdm;
149   - }
150   - public void setFromgsdm(String fromgsdm) {
151   - this.fromgsdm = fromgsdm;
152   - }
153   - public int getNylx() {
154   - return nylx;
155   - }
156   - public void setNylx(int nylx) {
157   - this.nylx = nylx;
158   - }
159   - public String getLdgh() {
160   - return ldgh;
161   - }
162   - public void setLdgh(String ldgh) {
163   - this.ldgh = ldgh;
164   - }
165   - public int getJylx() {
166   - return jylx;
167   - }
168   - public void setJylx(int jylx) {
169   - this.jylx = jylx;
170   - }
171   -
172   - public String getGsname() {
173   - return BasicData.businessCodeNameMap.get(this.gsdm);
174   - }
175   -
176   - public void setGsname(String gsname) {
177   - this.gsname = gsname;
178   - }
179   -
180   - public String getFgsname() {
181   - return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
182   - }
183   -
184   - public void setFgsname(String fgsname) {
185   - this.fgsname = fgsname;
186   - }
187   - public Double getZjzl() {
188   - return zjzl;
189   - }
190   - public void setZjzl(Double zjzl) {
191   - this.zjzl = zjzl;
192   - }
193   - public String getLinename() {
194   - return linename;
195   - }
196   - public void setLinename(String linename) {
197   - this.linename = linename;
198   - }
199   -
200   -
201   -
202   -}
  1 +package com.bsth.entity.oil;
  2 +
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.*;
  6 +
  7 +import org.springframework.format.annotation.DateTimeFormat;
  8 +
  9 +import com.bsth.data.BasicData;
  10 +
  11 +@Entity
  12 +@Table(name = "bsth_c_ylxxb")
  13 +public class Ylxxb {
  14 + @Id
  15 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  16 + private Integer id;
  17 + @DateTimeFormat(pattern="yyyy-MM-dd")
  18 + private Date yyrq;
  19 + private Date jlrq;
  20 + private String nbbm;
  21 + private String jsy;
  22 + private Double jzl;
  23 + private String stationid;
  24 + private Date createtime;
  25 + private String gsdm;
  26 + private String fgsdm;
  27 + private String yp;
  28 + private String jyggh;
  29 + private Double yj;
  30 + private String bz;
  31 + private Date xgrq;
  32 + private String xgr;
  33 + private String fromgsdm;
  34 + private Integer nylx;
  35 + private Date updatetime;
  36 + @Transient
  37 + private String ldgh;
  38 + //0为接口数据,1为手工输入,2为改变车号,3为改变驾驶员
  39 + private Integer jylx=0;
  40 + @Transient
  41 + private String gsname;
  42 + @Transient
  43 + private String fgsname;
  44 + @Transient
  45 + private String linename;
  46 + @Transient
  47 + private Double zjzl;
  48 +
  49 +
  50 + public Integer getId() {
  51 + return id;
  52 + }
  53 + public void setId(Integer id) {
  54 + this.id = id;
  55 + }
  56 + public Date getYyrq() {
  57 + return yyrq;
  58 + }
  59 + public void setYyrq(Date yyrq) {
  60 + this.yyrq = yyrq;
  61 + }
  62 + public Date getJlrq() {
  63 + return jlrq;
  64 + }
  65 + public void setJlrq(Date jlrq) {
  66 + this.jlrq = jlrq;
  67 + }
  68 + public String getNbbm() {
  69 + return nbbm;
  70 + }
  71 + public void setNbbm(String nbbm) {
  72 + this.nbbm = nbbm;
  73 + }
  74 + public String getJsy() {
  75 + return jsy;
  76 + }
  77 + public void setJsy(String jsy) {
  78 + this.jsy = jsy;
  79 + }
  80 + public Double getJzl() {
  81 + return jzl;
  82 + }
  83 + public void setJzl(Double jzl) {
  84 + this.jzl = jzl;
  85 + }
  86 + public String getStationid() {
  87 + return stationid;
  88 + }
  89 + public void setStationid(String stationid) {
  90 + this.stationid = stationid;
  91 + }
  92 + public Date getCreatetime() {
  93 + return createtime;
  94 + }
  95 + public void setCreatetime(Date createtime) {
  96 + this.createtime = createtime;
  97 + }
  98 + public String getGsdm() {
  99 + return gsdm;
  100 + }
  101 + public void setGsdm(String gsdm) {
  102 + this.gsdm = gsdm;
  103 + }
  104 +
  105 +
  106 + public String getFgsdm() {
  107 + return fgsdm;
  108 + }
  109 + public void setFgsdm(String fgsdm) {
  110 + this.fgsdm = fgsdm;
  111 + }
  112 + public String getYp() {
  113 + return yp;
  114 + }
  115 + public void setYp(String yp) {
  116 + this.yp = yp;
  117 + }
  118 + public String getJyggh() {
  119 + return jyggh;
  120 + }
  121 + public void setJyggh(String jyggh) {
  122 + this.jyggh = jyggh;
  123 + }
  124 + public Double getYj() {
  125 + return yj;
  126 + }
  127 + public void setYj(Double yj) {
  128 + this.yj = yj;
  129 + }
  130 + public String getBz() {
  131 + return bz;
  132 + }
  133 + public void setBz(String bz) {
  134 + this.bz = bz;
  135 + }
  136 + public Date getXgrq() {
  137 + return xgrq;
  138 + }
  139 + public void setXgrq(Date xgrq) {
  140 + this.xgrq = xgrq;
  141 + }
  142 + public String getXgr() {
  143 + return xgr;
  144 + }
  145 + public void setXgr(String xgr) {
  146 + this.xgr = xgr;
  147 + }
  148 + public String getFromgsdm() {
  149 + return fromgsdm;
  150 + }
  151 + public void setFromgsdm(String fromgsdm) {
  152 + this.fromgsdm = fromgsdm;
  153 + }
  154 + public int getNylx() {
  155 + return nylx;
  156 + }
  157 + public void setNylx(int nylx) {
  158 + this.nylx = nylx;
  159 + }
  160 + public String getLdgh() {
  161 + return ldgh;
  162 + }
  163 + public void setLdgh(String ldgh) {
  164 + this.ldgh = ldgh;
  165 + }
  166 + public int getJylx() {
  167 + return jylx;
  168 + }
  169 + public void setJylx(int jylx) {
  170 + this.jylx = jylx;
  171 + }
  172 +
  173 + public String getGsname() {
  174 + return BasicData.businessCodeNameMap!=null?BasicData.businessCodeNameMap.get(this.gsdm):gsname;
  175 + }
  176 +
  177 + public void setGsname(String gsname) {
  178 + this.gsname = gsname;
  179 + }
  180 +
  181 + public String getFgsname() {
  182 + return BasicData.businessFgsCodeNameMap!=null?BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm):fgsname;
  183 + }
  184 +
  185 + public void setFgsname(String fgsname) {
  186 + this.fgsname = fgsname;
  187 + }
  188 + public Double getZjzl() {
  189 + return zjzl;
  190 + }
  191 + public void setZjzl(Double zjzl) {
  192 + this.zjzl = zjzl;
  193 + }
  194 + public String getLinename() {
  195 + return linename;
  196 + }
  197 + public void setLinename(String linename) {
  198 + this.linename = linename;
  199 + }
  200 + public Date getUpdatetime() {
  201 + return updatetime;
  202 + }
  203 + public void setUpdatetime(Date updatetime) {
  204 + this.updatetime = updatetime;
  205 + }
  206 +
  207 +
  208 +
  209 +}
... ...
src/main/java/com/bsth/repository/LineRepository.java
1   -package com.bsth.repository;
2   -
3   -import java.util.Date;
4   -import java.util.List;
5   -import java.util.Map;
6   -
7   -import org.springframework.data.jpa.repository.Modifying;
8   -import org.springframework.data.jpa.repository.Query;
9   -import org.springframework.stereotype.Repository;
10   -import org.springframework.transaction.annotation.Transactional;
11   -
12   -import com.bsth.entity.Line;
13   -
14   -/**
15   - *
16   - * @Interface: LineRepository(线路Repository数据持久层接口)
17   - *
18   - * @Extends : BaseRepository
19   - *
20   - * @Description: TODO(线路Repository数据持久层接口)
21   - *
22   - * @Author bsth@lq
23   - *
24   - * @Date 2016年4月28日 上午9:21:17
25   - *
26   - * @Version 公交调度系统BS版 0.1
27   - *
28   - */
29   -@Repository
30   -public interface LineRepository extends BaseRepository<Line, Integer> {
31   -
32   - /**
33   - * 获取线路编码
34   - *
35   - * @return int <lineCode:线路编码>
36   - */
37   - @Query(value = " SELECT IFNULL(num,0) as maxId from (SELECT MAX(id) as num FROM bsth_c_line) k ", nativeQuery = true)
38   - public long selectMaxIdToLineCode();
39   -
40   - @Query(value = " SELECT l FROM Line l where l.name like ?1")
41   - List<Line> findLine(String line);
42   -
43   - @Query(value = " SELECT l FROM Line l where l.lineCode = ?1")
44   - List<Line> findLineByCode(String lineCode);
45   -
46   - public Line findByLineCode(String string);
47   -
48   - @Query(value = " SELECT l FROM Line l where l.company like ?1 and l.brancheCompany like ?2 and l.lineCode like ?3")
49   - public List<Line> findLineBygsBm(String gsBm, String fgsBm, String line);
50   -
51   - @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1")
52   - List<Line> findAllService();
53   -
54   - @Query("SELECT L FROM Line L")
55   - List<Line> findAll();
56   -
57   - @Modifying
58   - @Query(value = "UPDATE Line l set l.name=?1 , l.company=?2, l.brancheCompany=?3, "
59   - + "l.level=?4, l.nature=?5, l.startStationName=?6, l.endStationName=?7, l.startStationFirstTime=?8, "
60   - + "l.startStationEndTime=?9, l.endStationFirstTime=?10, l.endStationEndTime=?11, l.linePlayType=?12, "
61   - + "l.openDate=?13, l.es=?14, l.shortName=?15, l.shanghaiLinecode=?16, l.eqLinecode=?17, l.startPhone=?18, "
62   - + "l.endPhone=?19, l.carSumNumber=?20, l.hvacCarNumber=?21, l.ordCarNumber=?22, l.history=?23, "
63   - + "l.descriptions=?24, l.destroy=?25, l.supperLine=?26, l.spacGrade=?27, l.warrantCar=?28, l.region=?30 , l.inUse=?31 , l.ticketPrice=?32 where "
64   - + "l.lineCode=?29")
65   - int update(String name, String company, String brancheCompany, String level, String nature,
66   - String startStationName, String endStationName, String startStationFirstTime, String startStationEndTime,
67   - String endStationFirstTime, String endStationEndTime, Integer linePlayType, Date openDate, String es,
68   - String shortName, String shanghaiLinecode, String eqLinecode, String startPhone, String endPhone,
69   - Integer carSumNumber, Integer hvacCarNumber, Integer ordCarNumber, String history, String descriptions,
70   - Integer destroy, Integer supperLine, Integer spacGrade, Integer warrantCar, String lineCode, Integer region, Integer inUser, int ticketPrice);
71   -
72   - /**
73   - * 查询线路版本文件
74   - * @param lineId
75   - * @return
76   - */
77   - @Query(value = "SELECT version_count FROM bsth_c_line_file_version where line = ?1", nativeQuery = true)
78   - Integer findfileVersions(Integer lineId);
79   -
80   - /**
81   - * 添加线路文件版本
82   - * @param lineId
83   - * @param line_code
84   - */
85   - @Transactional
86   - @Modifying
87   - @Query(value = "INSERT INTO bsth_c_line_file_version (line,line_code,version_count) VALUES (?1,?2,1)", nativeQuery = true)
88   - public void addFileVersions(Integer lineId, String line_code);
89   -
90   - /**
91   - * 线路文件版本修改
92   - * @param lineId
93   - * @param version_count
94   - */
95   - @Transactional
96   - @Modifying
97   - @Query(value = "UPDATE bsth_c_line_file_version set version_count=?2 WHERE line = ?1", nativeQuery = true)
98   - public void editFileVersions(Integer lineId, Integer version_count);
99   -
100   -}
  1 +package com.bsth.repository;
  2 +
  3 +import java.util.Date;
  4 +import java.util.List;
  5 +import java.util.Map;
  6 +
  7 +import org.springframework.data.jpa.repository.Modifying;
  8 +import org.springframework.data.jpa.repository.Query;
  9 +import org.springframework.stereotype.Repository;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +
  12 +import com.bsth.entity.Line;
  13 +
  14 +/**
  15 + *
  16 + * @Interface: LineRepository(线路Repository数据持久层接口)
  17 + *
  18 + * @Extends : BaseRepository
  19 + *
  20 + * @Description: TODO(线路Repository数据持久层接口)
  21 + *
  22 + * @Author bsth@lq
  23 + *
  24 + * @Date 2016年4月28日 上午9:21:17
  25 + *
  26 + * @Version 公交调度系统BS版 0.1
  27 + *
  28 + */
  29 +@Repository
  30 +public interface LineRepository extends BaseRepository<Line, Integer> {
  31 +
  32 + /**
  33 + * 获取线路编码
  34 + *
  35 + * @return int <lineCode:线路编码>
  36 + */
  37 + @Query(value = " SELECT IFNULL(num,0) as maxId from (SELECT MAX(id) as num FROM bsth_c_line) k ", nativeQuery = true)
  38 + public long selectMaxIdToLineCode();
  39 +
  40 + @Query(value = " SELECT l FROM Line l where l.name like ?1")
  41 + List<Line> findLine(String line);
  42 +
  43 + @Query(value = " SELECT l FROM Line l where l.lineCode = ?1")
  44 + List<Line> findLineByCode(String lineCode);
  45 +
  46 + public Line findByLineCode(String string);
  47 +
  48 + @Query(value = " SELECT l FROM Line l where l.company like ?1 and l.brancheCompany like ?2 and l.lineCode like ?3")
  49 + public List<Line> findLineBygsBm(String gsBm, String fgsBm, String line);
  50 +
  51 + @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1")
  52 + List<Line> findAllService();
  53 +
  54 + /**
  55 + * 获取全部线路(含撤销线路,不含删除的)
  56 + *
  57 + */
  58 + @Query("SELECT L FROM Line L where L.remove !=1 or L.remove is null order by destroy asc")
  59 + List<Line> findAllLine();
  60 +
  61 +
  62 + @Query("SELECT L FROM Line L")
  63 + List<Line> findAll();
  64 +
  65 + @Modifying
  66 + @Query(value = "UPDATE Line l set l.name=?1 , l.company=?2, l.brancheCompany=?3, "
  67 + + "l.level=?4, l.nature=?5, l.startStationName=?6, l.endStationName=?7, l.startStationFirstTime=?8, "
  68 + + "l.startStationEndTime=?9, l.endStationFirstTime=?10, l.endStationEndTime=?11, l.linePlayType=?12, "
  69 + + "l.openDate=?13, l.es=?14, l.shortName=?15, l.shanghaiLinecode=?16, l.eqLinecode=?17, l.startPhone=?18, "
  70 + + "l.endPhone=?19, l.carSumNumber=?20, l.hvacCarNumber=?21, l.ordCarNumber=?22, l.history=?23, "
  71 + + "l.descriptions=?24, l.destroy=?25, l.supperLine=?26, l.spacGrade=?27, l.warrantCar=?28, l.region=?30 , l.inUse=?31 , l.ticketPrice=?32 where "
  72 + + "l.lineCode=?29")
  73 + int update(String name, String company, String brancheCompany, String level, String nature,
  74 + String startStationName, String endStationName, String startStationFirstTime, String startStationEndTime,
  75 + String endStationFirstTime, String endStationEndTime, Integer linePlayType, Date openDate, String es,
  76 + String shortName, String shanghaiLinecode, String eqLinecode, String startPhone, String endPhone,
  77 + Integer carSumNumber, Integer hvacCarNumber, Integer ordCarNumber, String history, String descriptions,
  78 + Integer destroy, Integer supperLine, Integer spacGrade, Integer warrantCar, String lineCode, Integer region, Integer inUser, int ticketPrice);
  79 +
  80 + /**
  81 + * 查询线路版本文件
  82 + * @param lineId
  83 + * @return
  84 + */
  85 + @Query(value = "SELECT version_count FROM bsth_c_line_file_version where line = ?1", nativeQuery = true)
  86 + Integer findfileVersions(Integer lineId);
  87 +
  88 + /**
  89 + * 添加线路文件版本
  90 + * @param lineId
  91 + * @param line_code
  92 + */
  93 + @Transactional
  94 + @Modifying
  95 + @Query(value = "INSERT INTO bsth_c_line_file_version (line,line_code,version_count) VALUES (?1,?2,1)", nativeQuery = true)
  96 + public void addFileVersions(Integer lineId, String line_code);
  97 +
  98 + /**
  99 + * 线路文件版本修改
  100 + * @param lineId
  101 + * @param version_count
  102 + */
  103 + @Transactional
  104 + @Modifying
  105 + @Query(value = "UPDATE bsth_c_line_file_version set version_count=?2 WHERE line = ?1", nativeQuery = true)
  106 + public void editFileVersions(Integer lineId, Integer version_count);
  107 +
  108 +}
... ...
src/main/java/com/bsth/repository/oil/CwjyRepository.java
... ... @@ -47,8 +47,8 @@ public interface CwjyRepository extends BaseRepository&lt;Cwjy, Integer&gt;{
47 47  
48 48 @Transactional
49 49 @Modifying
50   - @Query(value="UPDATE bsth_c_ylxxb set jzl = ?1, jsy = ?2, stationid = ?3, bz = ?4 "
51   - + "where gsdm = ?5 and yyrq = ?6 and nbbm = ?7 and jylx = '1' ",nativeQuery=true)
52   - void import_UpdateJzl(String jzl, String jsy, String jyz, String remarks, String gsbm, String rq, String nbbm);
  50 + @Query(value="UPDATE bsth_c_ylxxb set jzl = ?1, jsy = ?2, stationid = ?3, bz = ?4, updatetime = ?5 "
  51 + + "where gsdm = ?6 and yyrq = ?7 and nbbm = ?8 and jylx = '1' ",nativeQuery=true)
  52 + void import_UpdateJzl(String jzl, String jsy, String jyz, String remarks, String updatetime, String gsbm, String rq, String nbbm);
53 53  
54 54 }
... ...
src/main/java/com/bsth/repository/oil/JdlRepository.java
... ... @@ -35,8 +35,8 @@ public interface JdlRepository extends BaseRepository&lt;Jdl, Integer&gt;{
35 35  
36 36 @Transactional
37 37 @Modifying
38   - @Query(value="UPDATE bsth_c_jdl set jdl = ?1 where gs_bm = ?2 and fgs_bm = ?3 and rq = ?4 and nbbm = ?5",nativeQuery=true)
39   - void UpdateJdl(String jdl, String gsbm, String fgsbm, String rq, String nbbm);
  38 + @Query(value="UPDATE bsth_c_jdl set jdl = ?1, update_date = ?2 where gs_bm = ?3 and fgs_bm = ?4 and rq = ?5 and nbbm = ?6",nativeQuery=true)
  39 + void UpdateJdl(String jdl, String updateDate, String gsbm, String fgsbm, String rq, String nbbm);
40 40  
41 41 @Query(value="SELECT * FROM bsth_c_jdl where rq=?1 and gs_bm like %?2%",nativeQuery=true)
42 42 List<Jdl> obtainJdl(String rq, String gsbm);
... ...
src/main/java/com/bsth/repository/oil/JqlRepository.java
... ... @@ -35,7 +35,7 @@ public interface JqlRepository extends BaseRepository&lt;Jql, Integer&gt;{
35 35  
36 36 @Transactional
37 37 @Modifying
38   - @Query(value="UPDATE bsth_c_jql set jql = ?1 where gs_bm = ?2 and fgs_bm = ?3 and rq = ?4 and nbbm = ?5",nativeQuery=true)
39   - void UpdateJql(String jql, String gsbm, String fgsbm, String rq, String nbbm);
  38 + @Query(value="UPDATE bsth_c_jql set jql = ?1, update_date = ?2 where gs_bm = ?3 and fgs_bm = ?4 and rq = ?5 and nbbm = ?6",nativeQuery=true)
  39 + void UpdateJql(String jql, String updateDate, String gsbm, String fgsbm, String rq, String nbbm);
40 40  
41 41 }
... ...
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
... ... @@ -251,7 +251,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
251 251 y.setStationid(stationid);
252 252 y.setJyggh(jyggh);
253 253 y.setBz(bz);
254   - y.setCreatetime(new Date());
  254 + y.setUpdatetime(new Date());
255 255 y.setYyrq(date);
256 256 ylxxbRepository.save(y);
257 257 }else{
... ... @@ -530,7 +530,7 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
530 530 repository.import_insertData(gsbm, rq, nbbm, jsy,
531 531 df.format(jzl), jyz, remarks, sd.format(new Date()));
532 532 }else{
533   - repository.import_UpdateJzl(df.format(jzl), jsy, jyz, remarks, gsbm, rq, nbbm);
  533 + repository.import_UpdateJzl(df.format(jzl), jsy, jyz, remarks, sd.format(new Date()), gsbm, rq, nbbm);
534 534 }
535 535 }
536 536  
... ...
src/main/java/com/bsth/service/oil/impl/JdlServiceImpl.java
... ... @@ -90,7 +90,7 @@ public class JdlServiceImpl extends BaseServiceImpl&lt;Jdl, Integer&gt; implements Jdl
90 90 df.format(jdl), jdz, remarks, sd.format(new Date()));
91 91 }else{
92 92 // jdl += jdl_.get(0);
93   - repository.UpdateJdl(df.format(jdl), gsbm, fgsbm, rq, nbbm);
  93 + repository.UpdateJdl(df.format(jdl), sd.format(new Date()), gsbm, fgsbm, rq, nbbm);
94 94 }
95 95 }
96 96 wb.close();
... ...
src/main/java/com/bsth/service/oil/impl/JqlServiceImpl.java
... ... @@ -90,7 +90,7 @@ public class JqlServiceImpl extends BaseServiceImpl&lt;Jql, Integer&gt; implements Jql
90 90 df.format(jql), jqz, remarks, sd.format(new Date()));
91 91 }else{
92 92 // jql += jql_.get(0);
93   - repository.UpdateJql(df.format(jql), gsbm, fgsbm, rq, nbbm);
  93 + repository.UpdateJql(df.format(jql), sd.format(new Date()), gsbm, fgsbm, rq, nbbm);
94 94 }
95 95 }
96 96 wb.close();
... ...
src/main/java/com/bsth/service/report/ReportService.java
... ... @@ -44,6 +44,8 @@ public interface ReportService {
44 44  
45 45 List<Map<String, Object>> lineList();
46 46  
  47 + List<Map<String, Object>> lineListNotDestroy();
  48 +
47 49 List<Map<String, String>> carList(Map<String, Object> map);
48 50 List<Map<String, String>> carListByHistory(Map<String, Object> map);
49 51  
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -1990,6 +1990,25 @@ public class ReportServiceImpl implements ReportService{
1990 1990 public List<Map<String, Object>> lineList() {
1991 1991 // TODO Auto-generated method stub
1992 1992 List<Map<String, Object>> list=new ArrayList<Map<String,Object>>();
  1993 + List<Line> findAllLine = lineRepository.findAllLine();
  1994 + for(Line line : findAllLine){
  1995 + Map<String, Object> map=new HashMap<String,Object>();
  1996 + map.put("gsbm", line.getCompany());
  1997 + map.put("fgsbm", line.getBrancheCompany());
  1998 + map.put("xlbm", line.getLineCode());
  1999 + if(line.getDestroy() == 1){
  2000 + map.put("xlname", line.getName() + "(撤销)");
  2001 + } else {
  2002 + map.put("xlname", line.getName());
  2003 + }
  2004 + list.add(map);
  2005 + }
  2006 + return list;
  2007 + }
  2008 + @Override
  2009 + public List<Map<String, Object>> lineListNotDestroy() {
  2010 + // TODO Auto-generated method stub
  2011 + List<Map<String, Object>> list=new ArrayList<Map<String,Object>>();
1993 2012 Iterator<Line> iterator = lineRepository.findAllService().iterator();
1994 2013 Line line;
1995 2014 while (iterator.hasNext()) {
... ...