Commit c6dc0b5263291b8b41f2141676d519fa2981d149

Authored by 娄高锋
1 parent 2eff389e

修复路单数据汇总表中是否电车选项无效的问题

src/main/java/com/bsth/repository/calc/CalcWaybillRepository.java
@@ -69,7 +69,7 @@ public interface CalcWaybillRepository extends BaseRepository<CalcWaybill, Integ @@ -69,7 +69,7 @@ public interface CalcWaybillRepository extends BaseRepository<CalcWaybill, Integ
69 @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and c.cl like %?6% order by c.xl") 69 @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and c.cl like %?6% order by c.xl")
70 List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh); 70 List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh);
71 @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and c.cl like %?6%" 71 @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and c.cl like %?6%"
72 - + " and c.cl in (select s.carCode from Cars s where s.sfdc = ?7) order by c.xl") 72 + + " and c.cl in (select s.insideCode from Cars s where s.sfdc = ?7) order by c.xl")
73 List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh,Boolean sfdc); 73 List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh,Boolean sfdc);
74 74
75 75
src/main/resources/static/pages/forms/calc/calcsingledata.html
@@ -40,6 +40,14 @@ @@ -40,6 +40,14 @@
40 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
41 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
42 </div> 42 </div>
  43 + <div style="display: inline-block; margin-left: 18px;" id="sfdcDiv">
  44 + <span class="item-label" style="width: 80px;">是否电车: </span>
  45 + <select class="form-control form-filter " name="sfdc" id="sfdc">
  46 + <option value="">请选择...</option>
  47 + <option value="0">否</option>
  48 + <option value="1">是</option>
  49 + </select>
  50 + </div>
43 <div style="margin-top: 10px"></div> 51 <div style="margin-top: 10px"></div>
44 <div style="display: inline-block;margin-left: 3px;"> 52 <div style="display: inline-block;margin-left: 3px;">
45 <span class="item-label" style="width: 140px;">开始时间: </span> 53 <span class="item-label" style="width: 140px;">开始时间: </span>
@@ -195,6 +203,8 @@ @@ -195,6 +203,8 @@
195 } 203 }
196 }); 204 });
197 205
  206 + $("#sfdcDiv").hide();
  207 +
198 var cont = "驾驶员", cont1 = "", cont2 = "", cont3 = ""; 208 var cont = "驾驶员", cont1 = "", cont2 = "", cont3 = "";
199 $("#tjtype").on("change",function(){ 209 $("#tjtype").on("change",function(){
200 if(cont == "驾驶员"){ 210 if(cont == "驾驶员"){
@@ -207,10 +217,13 @@ @@ -207,10 +217,13 @@
207 cont = $("#tjtype").val(); 217 cont = $("#tjtype").val();
208 if($("#tjtype").val() == "驾驶员"){ 218 if($("#tjtype").val() == "驾驶员"){
209 $("#cont").val(cont1); 219 $("#cont").val(cont1);
  220 + $("#sfdcDiv").hide();
210 } else if($("#tjtype").val() == "售票员"){ 221 } else if($("#tjtype").val() == "售票员"){
211 $("#cont").val(cont2); 222 $("#cont").val(cont2);
  223 + $("#sfdcDiv").hide();
212 } else if($("#tjtype").val() == "车辆自编号"){ 224 } else if($("#tjtype").val() == "车辆自编号"){
213 $("#cont").val(cont3); 225 $("#cont").val(cont3);
  226 + $("#sfdcDiv").show();
214 } 227 }
215 }); 228 });
216 229
@@ -231,9 +244,10 @@ @@ -231,9 +244,10 @@
231 var fgsdmSing = $("#fgsdmSing").val(); 244 var fgsdmSing = $("#fgsdmSing").val();
232 var tjtype=$("#tjtype").val(); 245 var tjtype=$("#tjtype").val();
233 var cont=$("#cont").val(); 246 var cont=$("#cont").val();
  247 + var sfdc=$("#sfdc").val();
234 var params = {}; 248 var params = {};
235 var i = layer.load(2); 249 var i = layer.load(2);
236 - $get("/calc_mix/singledatatj",{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont},function(result){ 250 + $get("/calc_mix/singledatatj",{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,sfdc:sfdc},function(result){
237 layer.close(i); 251 layer.close(i);
238 var singledata = template('singledata',{list:result}); 252 var singledata = template('singledata',{list:result});
239 // 把渲染好的模版html文本追加到表格中 253 // 把渲染好的模版html文本追加到表格中
@@ -249,11 +263,12 @@ @@ -249,11 +263,12 @@
249 var fgsdmSing = $("#fgsdmSing").val(); 263 var fgsdmSing = $("#fgsdmSing").val();
250 var tjtype=$("#tjtype").val(); 264 var tjtype=$("#tjtype").val();
251 var cont=$("#cont").val(); 265 var cont=$("#cont").val();
  266 + var sfdc=$("#sfdc").val();
252 var lineName = $('#line option:selected').text(); 267 var lineName = $('#line option:selected').text();
253 if(lineName == "全部线路") 268 if(lineName == "全部线路")
254 lineName = $('#fgsdmSing option:selected').text(); 269 lineName = $('#fgsdmSing option:selected').text();
255 var i = layer.load(2); 270 var i = layer.load(2);
256 - $get('/calc_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,type:'export',lineName:lineName},function(result){ 271 + $get('/calc_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,sfdc:sfdc,type:'export',lineName:lineName},function(result){
257 var dateTime = ""; 272 var dateTime = "";
258 if(startDate == endDate){ 273 if(startDate == endDate){
259 dateTime = moment(startDate).format("YYYYMMDD"); 274 dateTime = moment(startDate).format("YYYYMMDD");