Commit 6e1bdc9c7704c2f57098fb266fbf03ef42b75fbf

Authored by 潘钊
2 parents 0407fb9a 37c2c826

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

src/main/java/com/bsth/entity/excep/Offline.java
... ... @@ -6,6 +6,7 @@ import javax.persistence.Entity;
6 6 import javax.persistence.GeneratedValue;
7 7 import javax.persistence.Id;
8 8 import javax.persistence.Table;
  9 +import javax.persistence.Transient;
9 10  
10 11 /**
11 12 * 掉线
... ... @@ -65,7 +66,12 @@ public class Offline {
65 66 */
66 67 private Date createDate;
67 68  
68   -
  69 + @Transient
  70 + private String nbbm;
  71 + @Transient
  72 + private String jsy;
  73 + @Transient
  74 + private String lpname;
69 75 public Integer getId() {
70 76 return id;
71 77 }
... ... @@ -146,5 +152,29 @@ public class Offline {
146 152 this.timestampDate = timestampDate;
147 153 }
148 154  
  155 + public String getNbbm() {
  156 + return nbbm;
  157 + }
  158 +
  159 + public void setNbbm(String nbbm) {
  160 + this.nbbm = nbbm;
  161 + }
149 162  
  163 + public String getJsy() {
  164 + return jsy;
  165 + }
  166 +
  167 + public void setJsy(String jsy) {
  168 + this.jsy = jsy;
  169 + }
  170 +
  171 + public String getLpname() {
  172 + return lpname;
  173 + }
  174 +
  175 + public void setLpname(String lpname) {
  176 + this.lpname = lpname;
  177 + }
  178 +
  179 +
150 180 }
... ...
src/main/java/com/bsth/entity/excep/Outbound.java
... ... @@ -6,6 +6,7 @@ import javax.persistence.Entity;
6 6 import javax.persistence.GeneratedValue;
7 7 import javax.persistence.Id;
8 8 import javax.persistence.Table;
  9 +import javax.persistence.Transient;
9 10  
10 11 /**
11 12 * 越界
... ... @@ -72,7 +73,12 @@ public class Outbound {
72 73 * 时间
73 74 */
74 75 private Date createDate;
75   -
  76 + @Transient
  77 + private String nbbm;
  78 + @Transient
  79 + private String jsy;
  80 + @Transient
  81 + private String lpname;
76 82  
77 83 public Integer getId() {
78 84 return id;
... ... @@ -162,5 +168,29 @@ public class Outbound {
162 168 this.timestampDate = timestampDate;
163 169 }
164 170  
  171 + public String getNbbm() {
  172 + return nbbm;
  173 + }
  174 +
  175 + public void setNbbm(String nbbm) {
  176 + this.nbbm = nbbm;
  177 + }
  178 +
  179 + public String getJsy() {
  180 + return jsy;
  181 + }
  182 +
  183 + public void setJsy(String jsy) {
  184 + this.jsy = jsy;
  185 + }
  186 +
  187 + public String getLpname() {
  188 + return lpname;
  189 + }
  190 +
  191 + public void setLpname(String lpname) {
  192 + this.lpname = lpname;
  193 + }
  194 +
165 195  
166 196 }
... ...
src/main/java/com/bsth/entity/excep/Speeding.java
... ... @@ -6,6 +6,7 @@ import javax.persistence.Entity;
6 6 import javax.persistence.GeneratedValue;
7 7 import javax.persistence.Id;
8 8 import javax.persistence.Table;
  9 +import javax.persistence.Transient;
9 10  
10 11 /**
11 12 * 超速
... ... @@ -66,6 +67,13 @@ public class Speeding {
66 67 private String timestampDate;
67 68  
68 69  
  70 + @Transient
  71 + private String nbbm;
  72 + @Transient
  73 + private String jsy;
  74 + @Transient
  75 + private String lpname;
  76 +
69 77 /**
70 78 * 创建时间
71 79 */
... ... @@ -161,6 +169,30 @@ public class Speeding {
161 169 this.timestampDate = timestampDate;
162 170 }
163 171  
  172 + public String getNbbm() {
  173 + return nbbm;
  174 + }
  175 +
  176 + public void setNbbm(String nbbm) {
  177 + this.nbbm = nbbm;
  178 + }
  179 +
  180 + public String getJsy() {
  181 + return jsy;
  182 + }
  183 +
  184 + public void setJsy(String jsy) {
  185 + this.jsy = jsy;
  186 + }
  187 +
  188 + public String getLpname() {
  189 + return lpname;
  190 + }
  191 +
  192 + public void setLpname(String lpname) {
  193 + this.lpname = lpname;
  194 + }
  195 +
164 196  
165 197  
166 198 }
... ...
src/main/java/com/bsth/service/excep/impl/OfflineServiceImpl.java
... ... @@ -12,10 +12,15 @@ import java.util.HashMap;
12 12 import java.util.List;
13 13 import java.util.Map;
14 14  
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.jdbc.core.JdbcTemplate;
  17 +import org.springframework.jdbc.core.RowMapper;
15 18 import org.springframework.stereotype.Service;
16 19  
17 20 import com.bsth.data.BasicData;
18 21 import com.bsth.entity.excep.Offline;
  22 +import com.bsth.entity.oil.Ylb;
  23 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
19 24 import com.bsth.service.excep.OfflineService;
20 25 import com.bsth.util.EchartConver;
21 26 import com.bsth.util.PageHelper;
... ... @@ -27,6 +32,8 @@ import com.google.gson.Gson;
27 32 @Service
28 33 public class OfflineServiceImpl implements OfflineService {
29 34  
  35 + @Autowired
  36 + JdbcTemplate jdbcTemplate;
30 37 // @Override
31 38 static List<Offline> findAll(Map<String, Object> map) {
32 39 // TODO Auto-generated method stub
... ... @@ -53,7 +60,9 @@ public class OfflineServiceImpl implements OfflineService {
53 60 }
54 61  
55 62 if(nbbm!=null){
56   - sql +=" and vehicle like '%"+nbbm.toString()+"%'";
  63 + nbbm=BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  64 + if(nbbm!=null)
  65 + sql +=" and vehicle like '%"+nbbm+"%'";
57 66 }
58 67  
59 68 if(updown!=null){
... ... @@ -61,7 +70,7 @@ public class OfflineServiceImpl implements OfflineService {
61 70 }
62 71 if(date!=null){
63 72 if (date.toString().length()>0) {
64   - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
  73 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
65 74 try {
66 75 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime();
67 76 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime();
... ... @@ -112,7 +121,7 @@ public class OfflineServiceImpl implements OfflineService {
112 121 offline.setTimestamp(Long.valueOf(rs.getObject("timestamp").toString()));
113 122 offline.setTimestampDate(sdf.format(new Date(offline.getTimestamp())));
114 123 offline.setUpDown(Integer.valueOf(rs.getObject("up_down").toString()));
115   - offline.setVehicle(rs.getObject("vehicle").toString());
  124 + offline.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString()));
116 125 list.add(offline);
117 126 }
118 127 return list;
... ... @@ -135,7 +144,9 @@ public class OfflineServiceImpl implements OfflineService {
135 144 }
136 145  
137 146 if(nbbm!=null){
138   - sql +=" and vehicle like '%"+nbbm.toString()+"%'";
  147 + nbbm=BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  148 + if(nbbm!=null)
  149 + sql +=" and vehicle like '%"+nbbm+"%'";
139 150 }
140 151  
141 152 if(updown!=null){
... ... @@ -143,7 +154,7 @@ public class OfflineServiceImpl implements OfflineService {
143 154 }
144 155 if(date!=null){
145 156 if (date.toString().length()>0) {
146   - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
  157 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
147 158 try {
148 159 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime();
149 160 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime();
... ... @@ -177,8 +188,41 @@ public class OfflineServiceImpl implements OfflineService {
177 188 PageHelper pageHelper = new PageHelper(totalData, map);
178 189 // List<T> list = this.baseDao.queryByObject(pageHelper.getMap());
179 190 List<Offline> list=findAll(pageHelper.getMap());
  191 + for (int i = 0; i < list.size(); i++) {
  192 + String nbbm2=list.get(i).getVehicle() ;
  193 + Long d1=list.get(i).getTimestamp();
  194 + Date datess = new Date(d1);
  195 + String dates=new SimpleDateFormat("yyyy-MM-dd").format(datess);
  196 + String sk=new SimpleDateFormat("HH:mm").format(datess);
  197 + String sqlPbb="select * from bsth_c_s_sp_info_real where cl_zbh='"+nbbm2+"' and"
  198 + + " real_exec_date='"+dates+"' ";
  199 +// + "and fcsj_actual > '"+sk+"' ";
  200 +// + "and '"+sk+"' <dfsj";
  201 + List<ScheduleRealInfo> pbb =jdbcTemplate.query(sqlPbb,
  202 + new RowMapper<ScheduleRealInfo>(){
  203 + @Override
  204 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  205 + ScheduleRealInfo s = new ScheduleRealInfo();
  206 + s.setjGh(rs.getString("j_gh"));
  207 + s.setjName(rs.getString("j_name"));
  208 + s.setLpName(rs.getString("lp_name"));
  209 + return s;
  210 + }
  211 + });
  212 + if(pbb.size()>0){
  213 + list.get(i).setJsy(pbb.get(0).getjGh()+"/"+pbb.get(0).getjName());
  214 + list.get(i).setLpname(pbb.get(0).getLpName());
  215 +
  216 + }
  217 +
  218 + }
180 219 PageObject<Offline> pageObject = pageHelper.getPageObject();
181   - pageObject.setDataList(list);
  220 +// for (int i = 0; i < list.size(); i++) {
  221 +// if(list.get(i).getLpname()!=null){
  222 + pageObject.setDataList(list);
  223 +// }
  224 +// }
  225 +
182 226 return pageObject;
183 227 }
184 228 public static void main(String[] args) {
... ...
src/main/java/com/bsth/service/excep/impl/OutboundServiceImpl.java
... ... @@ -12,10 +12,14 @@ import java.util.HashMap;
12 12 import java.util.List;
13 13 import java.util.Map;
14 14  
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.jdbc.core.JdbcTemplate;
  17 +import org.springframework.jdbc.core.RowMapper;
15 18 import org.springframework.stereotype.Service;
16 19  
17 20 import com.bsth.data.BasicData;
18 21 import com.bsth.entity.excep.Outbound;
  22 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
19 23 import com.bsth.service.excep.OutboundService;
20 24 import com.bsth.util.EchartConver;
21 25 import com.bsth.util.PageHelper;
... ... @@ -25,8 +29,9 @@ import com.github.abel533.echarts.Option;
25 29 import com.google.gson.Gson;
26 30 @Service
27 31 public class OutboundServiceImpl implements OutboundService{
28   -
29   - static List<Outbound> findAll(Map<String, Object> map) {
  32 + @Autowired
  33 + JdbcTemplate jdbcTemplate;
  34 + static List<Outbound> findAll(Map<String, Object> map) {
30 35 Connection conn = null;
31 36 PreparedStatement ps = null;
32 37 ResultSet rs = null;
... ... @@ -37,12 +42,13 @@ public class OutboundServiceImpl implements OutboundService{
37 42 Object nbbm=map.get("nbbm");
38 43 Object updown=map.get("updown");
39 44 Object date=map.get("date");
40   -
41 45 if(line!=null){
42 46 sql +=" and line like'%"+line.toString()+"%'";
43 47 }
44 48  
45 49 if(nbbm!=null){
  50 + nbbm=BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  51 + if(nbbm!=null)
46 52 sql +=" and vehicle like '%"+nbbm.toString()+"%'";
47 53 }
48 54  
... ... @@ -51,7 +57,7 @@ public class OutboundServiceImpl implements OutboundService{
51 57 }
52 58 if(date!=null){
53 59 if (date.toString().length()>0) {
54   - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
  60 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
55 61 try {
56 62 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime();
57 63 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime();
... ... @@ -98,7 +104,7 @@ public class OutboundServiceImpl implements OutboundService{
98 104 outbound.setTimestamp((Long.valueOf(rs.getObject("timestamp").toString())));
99 105 outbound.setTimestampDate(sdf.format(new Date(outbound.getTimestamp())));
100 106 outbound.setUpDown(Integer.valueOf(rs.getObject("up_down").toString()));
101   - outbound.setVehicle(rs.getObject("vehicle").toString());
  107 + outbound.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString()));
102 108 outbound.setLocation(rs.getObject("location")==null?"":rs.getObject("location").toString());
103 109 list.add(outbound);
104 110 }
... ... @@ -119,6 +125,8 @@ public class OutboundServiceImpl implements OutboundService{
119 125 }
120 126  
121 127 if(nbbm!=null){
  128 + nbbm=BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  129 + if(nbbm!=null)
122 130 sql +=" and vehicle like '%"+nbbm.toString()+"%'";
123 131 }
124 132  
... ... @@ -160,7 +168,34 @@ public class OutboundServiceImpl implements OutboundService{
160 168  
161 169 PageHelper pageHelper = new PageHelper(totalData, map);
162 170 List<Outbound> list=findAll(pageHelper.getMap());
163   -
  171 + for (int i = 0; i < list.size(); i++) {
  172 + String nbbm2=list.get(i).getVehicle() ;
  173 + Long d1=list.get(i).getTimestamp();
  174 + Date datess = new Date(d1);
  175 + String dates=new SimpleDateFormat("yyyy-MM-dd").format(datess);
  176 + String sk=new SimpleDateFormat("HH:mm").format(datess);
  177 + String sqlPbb="select * from bsth_c_s_sp_info_real where cl_zbh='"+nbbm2+"' and"
  178 + + " real_exec_date='"+dates+"' ";
  179 +// + "and fcsj_actual > '"+sk+"' ";
  180 +// + "and '"+sk+"' <dfsj";
  181 + List<ScheduleRealInfo> pbb =jdbcTemplate.query(sqlPbb,
  182 + new RowMapper<ScheduleRealInfo>(){
  183 + @Override
  184 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  185 + ScheduleRealInfo s = new ScheduleRealInfo();
  186 + s.setjGh(rs.getString("j_gh"));
  187 + s.setjName(rs.getString("j_name"));
  188 + s.setLpName(rs.getString("lp_name"));
  189 + return s;
  190 + }
  191 + });
  192 + if(pbb.size()>0){
  193 + list.get(i).setJsy(pbb.get(0).getjGh()+"/"+pbb.get(0).getjName());
  194 + list.get(i).setLpname(pbb.get(0).getLpName());
  195 +
  196 + }
  197 +
  198 + }
164 199 PageObject<Outbound> pageObject = pageHelper.getPageObject();
165 200 pageObject.setDataList(list);
166 201 return pageObject;
... ...
src/main/java/com/bsth/service/excep/impl/SpeedingServiceImpl.java
... ... @@ -12,10 +12,14 @@ import java.util.HashMap;
12 12 import java.util.List;
13 13 import java.util.Map;
14 14  
  15 +import org.springframework.jdbc.core.JdbcTemplate;
  16 +import org.springframework.jdbc.core.RowMapper;
15 17 import org.springframework.stereotype.Service;
  18 +import org.springframework.beans.factory.annotation.Autowired;
16 19  
17 20 import com.bsth.data.BasicData;
18 21 import com.bsth.entity.excep.Speeding;
  22 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
19 23 import com.bsth.service.excep.SpeedingService;
20 24 import com.bsth.util.EchartConver;
21 25 import com.bsth.util.PageHelper;
... ... @@ -27,7 +31,8 @@ import com.google.gson.Gson;
27 31 @Service
28 32 public class SpeedingServiceImpl implements SpeedingService {
29 33  
30   -
  34 + @Autowired
  35 + JdbcTemplate jdbcTemplate;
31 36 static List<Speeding> findAll(Map<String, Object> map) {
32 37 Connection conn = null;
33 38 PreparedStatement ps = null;
... ... @@ -45,6 +50,8 @@ public class SpeedingServiceImpl implements SpeedingService {
45 50 }
46 51  
47 52 if(nbbm!=null){
  53 + nbbm=BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  54 + if(nbbm!=null)
48 55 sql +=" and vehicle like '%"+nbbm.toString()+"%'";
49 56 }
50 57  
... ... @@ -53,7 +60,7 @@ public class SpeedingServiceImpl implements SpeedingService {
53 60 }
54 61 if(date!=null){
55 62 if (date.toString().length()>0) {
56   - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
  63 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
57 64 try {
58 65 Long t1=sdf.parse(date.toString()+" 00:00:00").getTime();
59 66 Long t2=sdf.parse(date.toString()+" 23:59:59").getTime();
... ... @@ -102,7 +109,7 @@ public class SpeedingServiceImpl implements SpeedingService {
102 109 speeding.setTimestamp((Long.valueOf(rs.getObject("timestamp").toString())));
103 110 speeding.setTimestampDate(sdf.format(new Date(speeding.getTimestamp())));
104 111 speeding.setUpDown(Integer.valueOf(rs.getObject("up_down").toString()));
105   - speeding.setVehicle(rs.getObject("vehicle").toString());
  112 + speeding.setVehicle(BasicData.deviceId2NbbmMap.get(rs.getObject("vehicle").toString()));
106 113 list.add(speeding);
107 114 }
108 115 return list;
... ... @@ -122,9 +129,10 @@ public class SpeedingServiceImpl implements SpeedingService {
122 129 }
123 130  
124 131 if(nbbm!=null){
  132 + nbbm=BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  133 + if(nbbm!=null)
125 134 sql +=" and vehicle like '%"+nbbm.toString()+"%'";
126 135 }
127   -
128 136 if(updown!=null){
129 137 sql +="and up_down like '%"+updown.toString()+"%'";
130 138 }
... ... @@ -163,7 +171,34 @@ public class SpeedingServiceImpl implements SpeedingService {
163 171  
164 172 PageHelper pageHelper = new PageHelper(totalData, map);
165 173 List<Speeding> list=findAll(pageHelper.getMap());
166   -
  174 + for (int i = 0; i < list.size(); i++) {
  175 + String nbbm2=list.get(i).getVehicle() ;
  176 + Long d1=list.get(i).getTimestamp();
  177 + Date datess = new Date(d1);
  178 + String dates=new SimpleDateFormat("yyyy-MM-dd").format(datess);
  179 + String sk=new SimpleDateFormat("HH:mm").format(datess);
  180 + String sqlPbb="select * from bsth_c_s_sp_info_real where cl_zbh='"+nbbm2+"' and"
  181 + + " real_exec_date='"+dates+"' ";
  182 +// + "and fcsj_actual > '"+sk+"' ";
  183 +// + "and '"+sk+"' <dfsj";
  184 + List<ScheduleRealInfo> pbb =jdbcTemplate.query(sqlPbb,
  185 + new RowMapper<ScheduleRealInfo>(){
  186 + @Override
  187 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  188 + ScheduleRealInfo s = new ScheduleRealInfo();
  189 + s.setjGh(rs.getString("j_gh"));
  190 + s.setjName(rs.getString("j_name"));
  191 + s.setLpName(rs.getString("lp_name"));
  192 + return s;
  193 + }
  194 + });
  195 + if(pbb.size()>0){
  196 + list.get(i).setJsy(pbb.get(0).getjGh()+"/"+pbb.get(0).getjName());
  197 + list.get(i).setLpname(pbb.get(0).getLpName());
  198 +
  199 + }
  200 +
  201 + }
167 202 PageObject<Speeding> pageObject = pageHelper.getPageObject();
168 203 pageObject.setDataList(list);
169 204 return pageObject;
... ...
src/main/resources/static/pages/excep/boundList.html
... ... @@ -55,9 +55,9 @@
55 55 <tr role="row" class="heading">
56 56 <th width="3%">#</th>
57 57 <th width="15%">线路</th>
58   - <th width="13%">内部编码</th>
59   - <th width="100">经度</th>
60   - <th width="11%">纬度</th>
  58 + <th width="13%">车辆自编号</th>
  59 + <th width="100">工号/名字</th>
  60 + <th width="11%">路牌名</th>
61 61 <th width="10%">上下行</th>
62 62 <th width="18%">时间</th>
63 63 <th width="18%">操作</th>
... ... @@ -66,10 +66,11 @@
66 66 <td></td>
67 67 <td>
68 68 <!-- <input type="text" class="form-control form-filter input-sm" name="userName_like"> -->
69   - <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  69 + <select class="form-control" name="line" id="line" style="width: 150px;"></select>
70 70 </td>
71 71 <td>
72   - <input type="text" class="form-control form-filter input-sm" name="nbbm">
  72 +<!-- <input type="text" class="form-control form-filter input-sm" name="nbbm"> -->
  73 + <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select>
73 74 </td>
74 75 <td>
75 76 </td>
... ... @@ -119,10 +120,10 @@
119 120 </td>
120 121  
121 122 <td>
122   - {{obj.lon}}
  123 + {{obj.jsy}}
123 124 </td>
124 125 <td>
125   - {{obj.lat}}
  126 + {{obj.lpname}}
126 127 </td>
127 128 <td>
128 129 {{if obj.upDown==0}}
... ... @@ -271,45 +272,67 @@ $(function(){
271 272 });
272 273  
273 274 //搜索线路
274   - $('#line').select2({
275   - ajax: {
276   - url: '/realSchedule/findLine',
277   - type: 'post',
278   - dataType: 'json',
279   - delay: 150,
280   - data: function(params){
281   - return{line: params.term};
282   - },
283   - processResults: function (data) {
284   - return {
285   - results: data
286   - };
287   - },
288   - cache: true
289   - },
290   - templateResult: function(repo){
291   - if (repo.loading) return repo.text;
292   - var h = '<span>'+repo.text+'</span>';
293   - return h;
294   - },
295   - escapeMarkup: function (markup) { return markup; },
296   - minimumInputLength: 1,
297   - templateSelection: function(repo){
298   - return repo.text;
299   - },
300   - language: {
301   - noResults: function(){
302   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
303   - },
304   - inputTooShort : function(e) {
305   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
306   - },
307   - searching : function() {
308   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
309   - }
310   - }
  275 + $.get('/basic/lineCode2Name',function(result){
  276 + var data=[];
  277 + data.push({id: " ", text: "全部线路"});
  278 + for(var code in result){
  279 + data.push({id: code, text: result[code]});
  280 + }
  281 + initPinYinSelect2('#line',data,'');
  282 +
311 283 });
312   -});
  284 +
  285 + $("#line").on("change",initXl);
  286 +
  287 +function initXl(){
  288 +$('#nbbm').select2({
  289 + placeholder: '搜索车辆...',
  290 + ajax: {
  291 + url: '/report/carList',
  292 + dataType: 'json',
  293 + delay: 150,
  294 + data: function (params) {
  295 + return {nbbm: params.term,
  296 + gsbm:" ",
  297 + fgsbm:" ",
  298 + xlbm:$('#line').val()};
  299 + },
  300 + processResults: function (data) {
  301 + return {
  302 + results: data
  303 + };
  304 + },
  305 + cache: true
  306 + },
  307 + templateResult: function (repo) {
  308 + if (repo.loading) return repo.text;
  309 + var h = '<span>' + repo.text + '</span>';
  310 + h += (repo.lineName ? '&nbsp;<span class="select2-desc">' + repo.lineName + '</span>' : '');
  311 + return h;
  312 + },
  313 + escapeMarkup: function (markup) {
  314 + return markup;
  315 + },
  316 + minimumInputLength: 1,
  317 + templateSelection: function (repo) {
  318 + return repo.text;
  319 + },
  320 + language: {
  321 + noResults: function () {
  322 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  323 + },
  324 + inputTooShort: function (e) {
  325 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  326 + },
  327 + searching: function () {
  328 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  329 + }
  330 + }
  331 +})
  332 +};
  333 +
  334 +
  335 +
313 336 //改变状态
314 337 function changeEnabled(id,enabled){
315 338 debugger
... ... @@ -317,4 +340,5 @@ function changeEnabled(id,enabled){
317 340 jsDoQuery(null, true);
318 341 })
319 342 }
  343 +});
320 344 </script>
321 345 \ No newline at end of file
... ...
src/main/resources/static/pages/excep/offlineList.html
... ... @@ -55,9 +55,9 @@
55 55 <tr role="row" class="heading">
56 56 <th width="3%">#</th>
57 57 <th width="15%">线路</th>
58   - <th width="13%">内部编码</th>
59   - <th width="100">经度</th>
60   - <th width="11%">纬度</th>
  58 + <th width="13%">车辆自编号</th>
  59 + <th width="100">工号/名字</th>
  60 + <th width="11%">路牌名</th>
61 61 <th width="10%">上下行</th>
62 62 <th width="18%">时间</th>
63 63 <th width="18%">操作</th>
... ... @@ -66,10 +66,12 @@
66 66 <td></td>
67 67 <td>
68 68 <!-- <input type="text" class="form-control form-filter input-sm" name="userName_like"> -->
69   - <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  69 + <select class="form-control" name="line" id="line" style="width: 150px;"></select>
70 70 </td>
71 71 <td>
72   - <input type="text" class="form-control form-filter input-sm" name="nbbm">
  72 +<!-- <input type="text" class="form-control form-filter input-sm" name="nbbm" id="nbbm"> -->
  73 +
  74 + <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select>
73 75 </td>
74 76 <td>
75 77 </td>
... ... @@ -119,10 +121,10 @@
119 121 </td>
120 122  
121 123 <td>
122   - {{obj.lon}}
  124 + {{obj.jsy}}
123 125 </td>
124 126 <td>
125   - {{obj.lat}}
  127 + {{obj.lpname}}
126 128 </td>
127 129 <td>
128 130 {{if obj.upDown==0}}
... ... @@ -275,43 +277,64 @@ $(function(){
275 277 });
276 278  
277 279 //搜索线路
278   - $('#line').select2({
279   - ajax: {
280   - url: '/realSchedule/findLine',
281   - type: 'post',
282   - dataType: 'json',
283   - delay: 150,
284   - data: function(params){
285   - return{line: params.term};
286   - },
287   - processResults: function (data) {
288   - return {
289   - results: data
290   - };
291   - },
292   - cache: true
293   - },
294   - templateResult: function(repo){
295   - if (repo.loading) return repo.text;
296   - var h = '<span>'+repo.text+'</span>';
297   - return h;
298   - },
299   - escapeMarkup: function (markup) { return markup; },
300   - minimumInputLength: 1,
301   - templateSelection: function(repo){
302   - return repo.text;
303   - },
304   - language: {
305   - noResults: function(){
306   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
307   - },
308   - inputTooShort : function(e) {
309   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
310   - },
311   - searching : function() {
312   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
313   - }
314   - }
  280 +
  281 + $.get('/basic/lineCode2Name',function(result){
  282 + var data=[];
  283 + data.push({id: " ", text: "全部线路"});
  284 + for(var code in result){
  285 + data.push({id: code, text: result[code]});
  286 + }
  287 + initPinYinSelect2('#line',data,'');
  288 +
315 289 });
  290 +
  291 + $("#line").on("change",initXl);
  292 +function initXl(){
  293 + $('#nbbm').select2({
  294 + placeholder: '搜索车辆...',
  295 + ajax: {
  296 + url: '/report/carList',
  297 + dataType: 'json',
  298 + delay: 150,
  299 + data: function (params) {
  300 + return {nbbm: params.term,
  301 + gsbm:"",
  302 + fgsbm:"",
  303 + xlbm:$('#line').val()};
  304 + },
  305 + processResults: function (data) {
  306 + return {
  307 + results: data
  308 + };
  309 + },
  310 + cache: true
  311 + },
  312 + templateResult: function (repo) {
  313 + if (repo.loading) return repo.text;
  314 + var h = '<span>' + repo.text + '</span>';
  315 + h += (repo.lineName ? '&nbsp;<span class="select2-desc">' + repo.lineName + '</span>' : '');
  316 + return h;
  317 + },
  318 + escapeMarkup: function (markup) {
  319 + return markup;
  320 + },
  321 + minimumInputLength: 1,
  322 + templateSelection: function (repo) {
  323 + return repo.text;
  324 + },
  325 + language: {
  326 + noResults: function () {
  327 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  328 + },
  329 + inputTooShort: function (e) {
  330 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  331 + },
  332 + searching: function () {
  333 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  334 + }
  335 + }
  336 + });
  337 +}
  338 +
316 339 });
317 340 </script>
318 341 \ No newline at end of file
... ...
src/main/resources/static/pages/excep/speedingList.html
... ... @@ -55,9 +55,9 @@
55 55 <tr role="row" class="heading">
56 56 <th width="3%">#</th>
57 57 <th width="15%">线路</th>
58   - <th width="13%">内部编码</th>
59   - <th width="100">经度</th>
60   - <th width="11%">纬度</th>
  58 + <th width="13%">车辆自编号</th>
  59 + <th width="100">工号/名字</th>
  60 + <th width="11%">路牌名</th>
61 61 <th width="10%">上下行</th>
62 62 <th width="18%">时间</th>
63 63 <th width="18%">操作</th>
... ... @@ -69,10 +69,11 @@
69 69 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
70 70 </td>
71 71 <td>
72   - <input type="text" class="form-control form-filter input-sm" name="nbbm">
  72 +<!-- <input type="text" class="form-control form-filter input-sm" name="nbbm"> -->
  73 + <select class="form-control" name="nbbm" id="nbbm" style="width: 150px;"></select>
73 74 </td>
74 75 <td>
75   - <input class="form-control" type="date" name="date" />
  76 +
76 77 </td>
77 78 <td></td>
78 79 <td>
... ... @@ -83,7 +84,7 @@
83 84 <option value="-1">无效</option>
84 85 </select>
85 86 </td>
86   - <td></td>
  87 + <td> <input class="form-control" type="date" name="date" /></td>
87 88 <td>
88 89 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
89 90 <i class="fa fa-search"></i> 搜索</button>
... ... @@ -118,10 +119,10 @@
118 119 </td>
119 120  
120 121 <td>
121   - {{obj.lon}}
  122 + {{obj.jsy}}
122 123 </td>
123 124 <td>
124   - {{obj.lat}}
  125 + {{obj.lpname}}
125 126 </td>
126 127 <td>
127 128 {{if obj.upDown==0}}
... ... @@ -270,45 +271,65 @@ $(function(){
270 271 });
271 272  
272 273 //搜索线路
273   - $('#line').select2({
274   - ajax: {
275   - url: '/realSchedule/findLine',
276   - type: 'post',
277   - dataType: 'json',
278   - delay: 150,
279   - data: function(params){
280   - return{line: params.term};
281   - },
282   - processResults: function (data) {
283   - return {
284   - results: data
285   - };
286   - },
287   - cache: true
288   - },
289   - templateResult: function(repo){
290   - if (repo.loading) return repo.text;
291   - var h = '<span>'+repo.text+'</span>';
292   - return h;
293   - },
294   - escapeMarkup: function (markup) { return markup; },
295   - minimumInputLength: 1,
296   - templateSelection: function(repo){
297   - return repo.text;
298   - },
299   - language: {
300   - noResults: function(){
301   - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
302   - },
303   - inputTooShort : function(e) {
304   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
305   - },
306   - searching : function() {
307   - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
308   - }
  274 + $.get('/basic/lineCode2Name',function(result){
  275 + var data=[];
  276 + data.push({id: " ", text: "全部线路"});
  277 + for(var code in result){
  278 + data.push({id: code, text: result[code]});
309 279 }
310   - });
  280 + initPinYinSelect2('#line',data,'');
  281 +
  282 +});
  283 +
  284 +$("#line").on("change",initXl);
  285 +function initXl(){
  286 +$('#nbbm').select2({
  287 + placeholder: '搜索车辆...',
  288 + ajax: {
  289 + url: '/report/carList',
  290 + dataType: 'json',
  291 + delay: 150,
  292 + data: function (params) {
  293 + return {nbbm: params.term,
  294 + gsbm:"",
  295 + fgsbm:"",
  296 + xlbm:$('#line').val()};
  297 + },
  298 + processResults: function (data) {
  299 + return {
  300 + results: data
  301 + };
  302 + },
  303 + cache: true
  304 + },
  305 + templateResult: function (repo) {
  306 + if (repo.loading) return repo.text;
  307 + var h = '<span>' + repo.text + '</span>';
  308 + h += (repo.lineName ? '&nbsp;<span class="select2-desc">' + repo.lineName + '</span>' : '');
  309 + return h;
  310 + },
  311 + escapeMarkup: function (markup) {
  312 + return markup;
  313 + },
  314 + minimumInputLength: 1,
  315 + templateSelection: function (repo) {
  316 + return repo.text;
  317 + },
  318 + language: {
  319 + noResults: function () {
  320 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  321 + },
  322 + inputTooShort: function (e) {
  323 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  324 + },
  325 + searching: function () {
  326 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  327 + }
  328 + }
311 329 });
  330 +}
  331 +
  332 +
312 333 //改变状态
313 334 function changeEnabled(id,enabled){
314 335 debugger
... ... @@ -316,4 +337,5 @@ function changeEnabled(id,enabled){
316 337 jsDoQuery(null, true);
317 338 })
318 339 }
  340 +});
319 341 </script>
320 342 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail2.html
... ... @@ -31,76 +31,160 @@
31 31 <div class="portlet-title">
32 32 <div class="caption">
33 33 <i class="icon-equalizer font-red-sunglo"></i> <span
34   - class="caption-subject font-red-sunglo bold uppercase" >批量信息修改</span>
  34 + class="caption-subject font-red-sunglo bold uppercase" ng-bind="ctrl.title1"></span>
35 35 </div>
36 36 </div>
37 37  
38 38 <div class="portlet-body form">
39 39 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
40 40 <div class="form-body">
41   -
42   - <div class="form-group">
43   - <label class="col-md-3 control-label">方向:</label>
44   - <div class="col-md-5">
45   - <sa-Radiogroup model="ctrl.tt.xlDir" dicgroup="LineTrend" name="xlDir"></sa-Radiogroup>
  41 + <div class="form-group has-success has-feedback">
  42 + <label class="col-md-2 control-label">线路*:</label>
  43 + <div class="col-md-3">
  44 + <input type="text" class="form-control"
  45 + ng-value="ctrl.xlname"
  46 + readonly/>
46 47 </div>
47 48  
48 49 </div>
49   - <div class="form-group">
50   - <label class="col-md-3 control-label">起点站:</label>
51   - <div class="col-md-5">
52   - <sa-Select5 name="qdz"
53   - model="ctrl.tt"
54   - cmaps="{'qdz.id' : 'stationid'}"
55   - dcname="qdz.id"
56   - icname="stationid"
57   - dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}"
58   - iterobjname="item"
59   - iterobjexp="item.stationname"
60   - searchph="请输拼音..."
61   - searchexp="this.stationname"
62   - >
63   - </sa-Select5>
  50 + <div class="form-group has-success has-feedback">
  51 + <label class="col-md-2 control-label">时刻表名称*:</label>
  52 + <div class="col-md-3">
  53 + <input type="text" class="form-control"
  54 + ng-value="ctrl.ttname"
  55 + readonly/>
64 56 </div>
65 57 </div>
66   - <div class="form-group">
67   - <label class="col-md-3 control-label">终点站:</label>
68   - <div class="col-md-5">
69   - <sa-Select5 name="zdz"
70   - model="ctrl.tt"
71   - cmaps="{'zdz.id' : 'stationid'}"
72   - dcname="zdz.id"
73   - icname="stationid"
74   - dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}"
75   - iterobjname="item"
76   - iterobjexp="item.stationname"
77   - searchph="请输拼音..."
78   - searchexp="this.stationname"
79   - >
80   - </sa-Select5>
  58 +
  59 + <div class="form-group" ng-if="ctrl.isZdModify == true">
  60 + <label class="col-md-2 control-label">方向:</label>
  61 + <div class="col-md-3">
  62 + <sa-Radiogroup model="ctrl.tt.xlDir" dicgroup="LineTrend" name="xlDir"></sa-Radiogroup>
81 63 </div>
  64 +
82 65 </div>
83   - <div class="form-group">
84   - <label class="col-md-3 control-label">停车场:</label>
85   - <div class="col-md-5">
86   - <sa-Select5 name="tcc"
87   - model="ctrl.tt"
88   - cmaps="{'tcc.id': 'id'}"
89   - dcname="tcc.id"
90   - icname="id"
91   - dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'tcc' } | json }}"
92   - iterobjname="item"
93   - iterobjexp="item.parkName"
94   - searchph="请输拼音..."
95   - searchexp="this.parkName"
96   - >
97   - </sa-Select5>
  66 +
  67 + <div ng-if="ctrl.isZdModify == true">
  68 +
  69 + <!--- 出场班次判定 -->
  70 + <div class="form-group"
  71 + ng-if="ctrl.tt.bcType == 'out'">
  72 + <label class="col-md-2 control-label">停车场:</label>
  73 + <div class="col-md-3">
  74 + <sa-Select5 name="tcc"
  75 + model="ctrl.tt"
  76 + cmaps="{'tcc.id': 'id'}"
  77 + dcname="tcc.id"
  78 + icname="id"
  79 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'tcc' } | json }}"
  80 + iterobjname="item"
  81 + iterobjexp="item.parkName"
  82 + searchph="请输拼音..."
  83 + searchexp="this.parkName"
  84 + >
  85 + </sa-Select5>
  86 + </div>
  87 + </div>
  88 + <div class="form-group"
  89 + ng-if="ctrl.tt.bcType == 'out'">
  90 + <label class="col-md-2 control-label">终点站:</label>
  91 + <div class="col-md-3">
  92 + <sa-Select5 name="zdz"
  93 + model="ctrl.tt"
  94 + cmaps="{'zdz.id' : 'stationid'}"
  95 + dcname="zdz.id"
  96 + icname="stationid"
  97 + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}"
  98 + iterobjname="item"
  99 + iterobjexp="item.stationname"
  100 + searchph="请输拼音..."
  101 + searchexp="this.stationname"
  102 + >
  103 + </sa-Select5>
  104 + </div>
  105 + </div>
  106 +
  107 + <!--- 进场班次判定 -->
  108 + <div class="form-group"
  109 + ng-if="ctrl.tt.bcType == 'in'">
  110 + <label class="col-md-2 control-label">起点站:</label>
  111 + <div class="col-md-3">
  112 + <sa-Select5 name="qdz"
  113 + model="ctrl.tt"
  114 + cmaps="{'qdz.id' : 'stationid'}"
  115 + dcname="qdz.id"
  116 + icname="stationid"
  117 + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}"
  118 + iterobjname="item"
  119 + iterobjexp="item.stationname"
  120 + searchph="请输拼音..."
  121 + searchexp="this.stationname"
  122 + >
  123 + </sa-Select5>
  124 + </div>
  125 + </div>
  126 + <div class="form-group"
  127 + ng-if="ctrl.tt.bcType == 'in'">
  128 + <label class="col-md-2 control-label">停车场:</label>
  129 + <div class="col-md-3">
  130 + <sa-Select5 name="tcc"
  131 + model="ctrl.tt"
  132 + cmaps="{'tcc.id': 'id'}"
  133 + dcname="tcc.id"
  134 + icname="id"
  135 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'tcc' } | json }}"
  136 + iterobjname="item"
  137 + iterobjexp="item.parkName"
  138 + searchph="请输拼音..."
  139 + searchexp="this.parkName"
  140 + >
  141 + </sa-Select5>
  142 + </div>
  143 + </div>
  144 +
  145 + <!-- 其他班次类型 -->
  146 + <div class="form-group"
  147 + ng-if="ctrl.tt.bcType != 'in' && ctrl.tt.bcType != 'out'">
  148 + <label class="col-md-2 control-label">起点站:</label>
  149 + <div class="col-md-3">
  150 + <sa-Select5 name="qdz"
  151 + model="ctrl.tt"
  152 + cmaps="{'qdz.id' : 'stationid'}"
  153 + dcname="qdz.id"
  154 + icname="stationid"
  155 + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}"
  156 + iterobjname="item"
  157 + iterobjexp="item.stationname"
  158 + searchph="请输拼音..."
  159 + searchexp="this.stationname"
  160 + >
  161 + </sa-Select5>
  162 + </div>
  163 + </div>
  164 + <div class="form-group"
  165 + ng-if="ctrl.tt.bcType != 'in' && ctrl.tt.bcType != 'out'">
  166 + <label class="col-md-2 control-label">终点站:</label>
  167 + <div class="col-md-3">
  168 + <sa-Select5 name="zdz"
  169 + model="ctrl.tt"
  170 + cmaps="{'zdz.id' : 'stationid'}"
  171 + dcname="zdz.id"
  172 + icname="stationid"
  173 + dsparams="{{ {type: 'ajax', param:{'xlid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd' } | json }}"
  174 + iterobjname="item"
  175 + iterobjexp="item.stationname"
  176 + searchph="请输拼音..."
  177 + searchexp="this.stationname"
  178 + >
  179 + </sa-Select5>
  180 + </div>
98 181 </div>
  182 +
99 183 </div>
100 184  
101 185 <div class="form-group">
102   - <label class="col-md-3 control-label">发车时间:</label>
103   - <div class="col-md-5">
  186 + <label class="col-md-2 control-label">发车时间:</label>
  187 + <div class="col-md-3">
104 188 <input type="text" class="form-control" name="fcsj"
105 189 ng-model="ctrl.tt.fcsj"
106 190 ng-pattern="ctrl.time_regex"
... ... @@ -113,8 +197,8 @@
113 197  
114 198 </div>
115 199 <div class="form-group">
116   - <label class="col-md-3 control-label">计划里程:</label>
117   - <div class="col-md-5">
  200 + <label class="col-md-2 control-label">计划里程:</label>
  201 + <div class="col-md-3">
118 202 <input type="text" class="form-control" name="jhlc"
119 203 ng-model="ctrl.tt.jhlc"
120 204 ng-pattern="ctrl.float_regex"
... ... @@ -127,8 +211,8 @@
127 211  
128 212 </div>
129 213 <div class="form-group">
130   - <label class="col-md-3 control-label">班次历时:</label>
131   - <div class="col-md-5">
  214 + <label class="col-md-2 control-label">班次历时:</label>
  215 + <div class="col-md-3">
132 216 <input type="text" class="form-control" name="bcsj"
133 217 ng-model="ctrl.tt.bcsj"
134 218 ng-pattern="ctrl.number_regex"
... ... @@ -140,9 +224,10 @@
140 224 </div>
141 225  
142 226 </div>
143   - <div class="form-group">
144   - <label class="col-md-3 control-label">班次类型:</label>
145   - <div class="col-md-5">
  227 + <div class="form-group"
  228 + ng-if="ctrl.isZdModify == true">
  229 + <label class="col-md-2 control-label">班次类型:</label>
  230 + <div class="col-md-3">
146 231 <sa-Select5 name="bcType"
147 232 model="ctrl.tt"
148 233 cmaps="{'bcType': 'code'}"
... ... @@ -159,6 +244,14 @@
159 244  
160 245 </div>
161 246  
  247 + <div class="form-group has-success has-feedback">
  248 + <label class="col-md-2 control-label">开始分班:</label>
  249 + <div class="col-md-3">
  250 + <sa-Radiogroup model="ctrl.tt.isFB" dicgroup="truefalseType" name="isFB"></sa-Radiogroup>
  251 + </div>
  252 +
  253 + </div>
  254 +
162 255 </div>
163 256  
164 257 <div class="form-actions">
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
... ... @@ -184,6 +184,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
184 184 ttinfodetailIds[index].qdz = value.qdz || undefined;
185 185 ttinfodetailIds[index].zdz = value.zdz || undefined;
186 186 ttinfodetailIds[index].tcc = value.tcc || undefined;
  187 + ttinfodetailIds[index].isfb = value.isFB || undefined;
187 188  
188 189 ttinfodetailIds[index].validInfo();
189 190  
... ... @@ -585,10 +586,16 @@ angular.module(&#39;ScheduleApp&#39;).controller(
585 586 '$stateParams',
586 587 '$state',
587 588 function(service, $stateParams, $state) {
588   - // TODO:
589   -
590 589 var self = this;
591   - var TTInfoDetail = service.getQueryClass();
  590 + // 获取传过来的id,有的话就是修改,获取一遍数据
  591 + self.xlid = $stateParams.xlid; // 获取传过来的线路id
  592 + self.ttid = $stateParams.ttid; // 获取传过来的时刻表id
  593 + self.xlname = $stateParams.xlname; // 获取传过来的线路名字
  594 + self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字
  595 +
  596 + self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息 批量修改班次信息";
  597 +
  598 + //var TTInfoDetail = service.getQueryClass();
592 599  
593 600 // 时间正则表达式(格式hh:mm,如:06:39)
594 601 self.time_regex = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/;
... ... @@ -599,11 +606,14 @@ angular.module(&#39;ScheduleApp&#39;).controller(
599 606  
600 607 // 欲保存的busInfo信息,绑定
601 608 //self.tt = new TTInfoDetail;
  609 +
602 610 self.tt = {
603 611 xlDir: undefined,
604 612 tcc: {id: undefined},
605 613 qdz: {id: undefined},
606 614 zdz: {id: undefined},
  615 + bcType: undefined,
  616 + isFB: undefined,
607 617 reSetTTinfoDetail: function(value) {
608 618 for (var key in this) {
609 619 if (!angular.isFunction(this[key])) {
... ... @@ -611,7 +621,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
611 621 if (this[key].id) {
612 622 value[key] = this[key];
613 623 }
614   - } else if (this[key]) {
  624 + } else if (this[key] != undefined) {
615 625 value[key] = this[key];
616 626 }
617 627 }
... ... @@ -619,13 +629,32 @@ angular.module(&#39;ScheduleApp&#39;).controller(
619 629 }
620 630 };
621 631  
622   - // 获取传过来的id,有的话就是修改,获取一遍数据
623   - self.xlid = $stateParams.xlid; // 获取传过来的线路id
624   - self.ttid = $stateParams.ttid; // 获取传过来的时刻表id
625   - self.xlname = $stateParams.xlname; // 获取传过来的线路名字
626   - self.ttname = $stateParams.ttname; // 获取传过来的时刻表名字
  632 + // 修正self.tt
627 633  
628   - self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息";
  634 + self.isZdModify = false; // 是否可以修改站点(如果不是同一圈的数据是不能修改站点的)
  635 + var colIndexs_maps = {};
  636 + var detailInfos = service.getEditInfo().detailInfos;
  637 + for (var i = 0; i < detailInfos.length; i++) {
  638 + for (var j = 0; j < detailInfos[i].length; j++) {
  639 + if (detailInfos[i][j].canDelete()) {
  640 + colIndexs_maps[j] = j;
  641 + }
  642 + }
  643 + }
  644 + var colIndexs = [];
  645 + for (var kk in colIndexs_maps) {
  646 + colIndexs.push(kk);
  647 + }
  648 + if (colIndexs.length == 1) {
  649 + self.isZdModify = true;
  650 + var columnBcInfo = service.getEditInfo().columnBcInfo[colIndexs[0]];
  651 +
  652 + self.tt.xlDir = columnBcInfo.xldir;
  653 + self.tt.bcType = columnBcInfo.bc_type;
  654 + self.tt.qdz.id = columnBcInfo.qdz;
  655 + self.tt.zdz.id = columnBcInfo.zdz;
  656 + self.tt.tcc.id = columnBcInfo.tcc;
  657 + }
629 658  
630 659 // 提交方法
631 660 self.submit = function() {
... ... @@ -646,6 +675,8 @@ angular.module(&#39;ScheduleApp&#39;).controller(
646 675 // });
647 676 //});
648 677  
  678 + console.log(self.tt);
  679 +
649 680 service.editInfos(self.tt).then(function() {
650 681 $state.go("ttInfoDetailManage_edit3", {
651 682 xlid: self.xlid,
... ...