Commit c6dc0b5263291b8b41f2141676d519fa2981d149
1 parent
2eff389e
修复路单数据汇总表中是否电车选项无效的问题
Showing
2 changed files
with
18 additions
and
3 deletions
src/main/java/com/bsth/repository/calc/CalcWaybillRepository.java
| ... | ... | @@ -69,7 +69,7 @@ public interface CalcWaybillRepository extends BaseRepository<CalcWaybill, Integ |
| 69 | 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 | 70 | List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh); |
| 71 | 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 | 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 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | 41 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 42 | 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 | 51 | <div style="margin-top: 10px"></div> |
| 44 | 52 | <div style="display: inline-block;margin-left: 3px;"> |
| 45 | 53 | <span class="item-label" style="width: 140px;">开始时间: </span> |
| ... | ... | @@ -195,6 +203,8 @@ |
| 195 | 203 | } |
| 196 | 204 | }); |
| 197 | 205 | |
| 206 | + $("#sfdcDiv").hide(); | |
| 207 | + | |
| 198 | 208 | var cont = "驾驶员", cont1 = "", cont2 = "", cont3 = ""; |
| 199 | 209 | $("#tjtype").on("change",function(){ |
| 200 | 210 | if(cont == "驾驶员"){ |
| ... | ... | @@ -207,10 +217,13 @@ |
| 207 | 217 | cont = $("#tjtype").val(); |
| 208 | 218 | if($("#tjtype").val() == "驾驶员"){ |
| 209 | 219 | $("#cont").val(cont1); |
| 220 | + $("#sfdcDiv").hide(); | |
| 210 | 221 | } else if($("#tjtype").val() == "售票员"){ |
| 211 | 222 | $("#cont").val(cont2); |
| 223 | + $("#sfdcDiv").hide(); | |
| 212 | 224 | } else if($("#tjtype").val() == "车辆自编号"){ |
| 213 | 225 | $("#cont").val(cont3); |
| 226 | + $("#sfdcDiv").show(); | |
| 214 | 227 | } |
| 215 | 228 | }); |
| 216 | 229 | |
| ... | ... | @@ -231,9 +244,10 @@ |
| 231 | 244 | var fgsdmSing = $("#fgsdmSing").val(); |
| 232 | 245 | var tjtype=$("#tjtype").val(); |
| 233 | 246 | var cont=$("#cont").val(); |
| 247 | + var sfdc=$("#sfdc").val(); | |
| 234 | 248 | var params = {}; |
| 235 | 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 | 251 | layer.close(i); |
| 238 | 252 | var singledata = template('singledata',{list:result}); |
| 239 | 253 | // 把渲染好的模版html文本追加到表格中 |
| ... | ... | @@ -249,11 +263,12 @@ |
| 249 | 263 | var fgsdmSing = $("#fgsdmSing").val(); |
| 250 | 264 | var tjtype=$("#tjtype").val(); |
| 251 | 265 | var cont=$("#cont").val(); |
| 266 | + var sfdc=$("#sfdc").val(); | |
| 252 | 267 | var lineName = $('#line option:selected').text(); |
| 253 | 268 | if(lineName == "全部线路") |
| 254 | 269 | lineName = $('#fgsdmSing option:selected').text(); |
| 255 | 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 | 272 | var dateTime = ""; |
| 258 | 273 | if(startDate == endDate){ |
| 259 | 274 | dateTime = moment(startDate).format("YYYYMMDD"); | ... | ... |