Commit cab5a240cb00239ef78ca3a6d679df172497360c
1 parent
ad04f28b
路单数据 售票员查询
Showing
4 changed files
with
70 additions
and
124 deletions
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -868,7 +868,7 @@ public class FormsServiceImpl implements FormsService { | @@ -868,7 +868,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 868 | 868 | ||
| 869 | sin.setEmptMileage(String.valueOf(zksgl)); | 869 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 870 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 870 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 871 | - sin.setxL(BasicData.lineCode2NameMap.get(line)); | 871 | + sin.setXlmc(BasicData.lineCode2NameMap.get(line)); |
| 872 | sin.setClzbh(clzbh); | 872 | sin.setClzbh(clzbh); |
| 873 | sin.setJsy(""); | 873 | sin.setJsy(""); |
| 874 | sin.setjName(""); | 874 | sin.setjName(""); |
| @@ -876,8 +876,9 @@ public class FormsServiceImpl implements FormsService { | @@ -876,8 +876,9 @@ public class FormsServiceImpl implements FormsService { | ||
| 876 | sin.setHyl(""); | 876 | sin.setHyl(""); |
| 877 | sin.setJzl(""); | 877 | sin.setJzl(""); |
| 878 | sin.setUnyyyl(""); | 878 | sin.setUnyyyl(""); |
| 879 | + list_.add(sin); | ||
| 879 | } | 880 | } |
| 880 | - Collections.sort(list,new SingledataByXlbm()); | 881 | + Collections.sort(list_,new SingledataByXlbm()); |
| 881 | } | 882 | } |
| 882 | return list_; | 883 | return list_; |
| 883 | } | 884 | } |
| @@ -1539,7 +1540,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1539,7 +1540,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1539 | 1540 | ||
| 1540 | sin.setEmptMileage(String.valueOf(zksgl)); | 1541 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 1541 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 1542 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1542 | - sin.setxL(BasicData.lineCode2NameMap.get(line)); | 1543 | + sin.setXlmc(BasicData.lineCode2NameMap.get(line)); |
| 1543 | sin.setClzbh(clzbh); | 1544 | sin.setClzbh(clzbh); |
| 1544 | sin.setJsy(""); | 1545 | sin.setJsy(""); |
| 1545 | sin.setjName(""); | 1546 | sin.setjName(""); |
| @@ -1550,9 +1551,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1550,9 +1551,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1550 | } | 1551 | } |
| 1551 | Collections.sort(list,new SingledataByXlbm()); | 1552 | Collections.sort(list,new SingledataByXlbm()); |
| 1552 | } | 1553 | } |
| 1553 | - | ||
| 1554 | return list; | 1554 | return list; |
| 1555 | - | ||
| 1556 | } | 1555 | } |
| 1557 | 1556 | ||
| 1558 | // 运营服务阶段报表 | 1557 | // 运营服务阶段报表 |
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java
| @@ -149,6 +149,8 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -149,6 +149,8 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 149 | // String line =map.get("line").toString(); | 149 | // String line =map.get("line").toString(); |
| 150 | // String date =map.get("date").toString(); | 150 | // String date =map.get("date").toString(); |
| 151 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 151 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 152 | + SimpleDateFormat sdf_=new SimpleDateFormat("yyyy-MM-dd"); | ||
| 153 | + | ||
| 152 | String minfcsj="02:00"; | 154 | String minfcsj="02:00"; |
| 153 | List<Line> lineList=lineRepository.findLineByCode(line); | 155 | List<Line> lineList=lineRepository.findLineByCode(line); |
| 154 | if(lineList.size()>0){ | 156 | if(lineList.size()>0){ |
| @@ -169,111 +171,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -169,111 +171,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 169 | List<ScheduleRealInfo> listReal0=new ArrayList<ScheduleRealInfo>(); | 171 | List<ScheduleRealInfo> listReal0=new ArrayList<ScheduleRealInfo>(); |
| 170 | 172 | ||
| 171 | List<ScheduleRealInfo> listReal1=new ArrayList<ScheduleRealInfo>(); | 173 | List<ScheduleRealInfo> listReal1=new ArrayList<ScheduleRealInfo>(); |
| 172 | - //排除所有进出场班次 | ||
| 173 | -// List<ScheduleRealInfo> list=scheduleRealInfoRepository.scheduleByDateAndLine2(line, date); | ||
| 174 | - /* for (int i = 0; i < list.size(); i++) { | ||
| 175 | - //排除所有烂班的班次 | ||
| 176 | - ScheduleRealInfo s=list.get(i); | ||
| 177 | - Set<ChildTaskPlan> cts=s.getcTasks(); | ||
| 178 | - if(cts!=null && cts.size() > 0){ | ||
| 179 | - | ||
| 180 | - } | ||
| 181 | - ScheduleRealInfo r=checkBc(s); | ||
| 182 | - String[] fcsj= r.getFcsj().split(":"); | ||
| 183 | - Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]); | ||
| 184 | - Long fscjT=0L; | ||
| 185 | - if(fcsjL<minSj){ | ||
| 186 | - Calendar calendar = new GregorianCalendar(); | ||
| 187 | - calendar.setTime(r.getScheduleDate()); | ||
| 188 | - calendar.add(calendar.DATE,1); | ||
| 189 | - r.setScheduleDate(calendar.getTime()); | ||
| 190 | - try { | ||
| 191 | - fscjT = sdf.parse(sdf.format(r.getScheduleDate())+" "+r.getFcsj()).getTime(); | ||
| 192 | - } catch (ParseException e) { | ||
| 193 | - // TODO Auto-generated catch block | ||
| 194 | - e.printStackTrace(); | ||
| 195 | - } | ||
| 196 | - | ||
| 197 | - }else{ | ||
| 198 | - try { | ||
| 199 | - fscjT =sdf.parse(r.getScheduleDateStr()+" "+r.getFcsj()).getTime(); | ||
| 200 | - } catch (ParseException e) { | ||
| 201 | - // TODO Auto-generated catch block | ||
| 202 | - e.printStackTrace(); | ||
| 203 | - }; | ||
| 204 | - } | ||
| 205 | - | ||
| 206 | - Sheet sheet=new Sheet(); | ||
| 207 | - Long fcsjAcual=0L; | ||
| 208 | - if (r.getFcsjActual()!=null) { | ||
| 209 | - if(!r.getFcsjActual().equals("")){ | ||
| 210 | - try { | ||
| 211 | - fcsjAcual =sdf.parse(r.getRealExecDate()+" "+r.getFcsjActual()).getTime(); | ||
| 212 | - } catch (ParseException e) { | ||
| 213 | - // TODO Auto-generated catch block | ||
| 214 | - e.printStackTrace(); | ||
| 215 | - } | ||
| 216 | - | ||
| 217 | - | ||
| 218 | - Long sjc=fscjT-fcsjAcual; | ||
| 219 | - //在快慢五分钟内直接添加 | ||
| 220 | - if(sjc>= 3*60*1000*-1 && sjc <=3*60*1000){ | ||
| 221 | - | ||
| 222 | - sheet.setDate(r.getScheduleDateStr()); | ||
| 223 | - sheet.setRealDate(r.getRealExecDate()); | ||
| 224 | - sheet.setJhsjt(fscjT); | ||
| 225 | - sheet.setJhsj(r.getFcsj()); | ||
| 226 | - sheet.setSjsjt(fcsjAcual); | ||
| 227 | - sheet.setSjsj(r.getFcsjActual()); | ||
| 228 | - sheet.setGs(r.getGsBm()); | ||
| 229 | - sheet.setFgs(r.getFgsBm()); | ||
| 230 | - sheet.setLine(r.getXlBm()); | ||
| 231 | - sheet.setXlDir(r.getXlDir()); | ||
| 232 | - sheet.setZdname(r.getQdzName()); | ||
| 233 | - sheet.setCreateDate(new Date()); | ||
| 234 | - listAdd.add(sheet); | ||
| 235 | - }else{ | ||
| 236 | - r.setFcsjActualTime(fcsjAcual); | ||
| 237 | - r.setFcsjT(fscjT); | ||
| 238 | - if(r.getXlDir().equals("0")){ | ||
| 239 | - listJhsj0.add(r); | ||
| 240 | - listReal0.add(r); | ||
| 241 | - }else{ | ||
| 242 | - listJhsj1.add(r); | ||
| 243 | - listReal1.add(r); | ||
| 244 | - } | ||
| 245 | - } | ||
| 246 | - }else{ | ||
| 247 | - sheet.setDate(r.getScheduleDateStr()); | ||
| 248 | - sheet.setRealDate(r.getRealExecDate()); | ||
| 249 | - sheet.setJhsjt(fscjT); | ||
| 250 | - sheet.setJhsj(r.getFcsj()); | ||
| 251 | - sheet.setSjsjt(0L); | ||
| 252 | - sheet.setSjsj("烂班"); | ||
| 253 | - sheet.setGs(r.getGsBm()); | ||
| 254 | - sheet.setFgs(r.getFgsBm()); | ||
| 255 | - sheet.setLine(r.getXlBm()); | ||
| 256 | - sheet.setXlDir(r.getXlDir()); | ||
| 257 | - sheet.setZdname(r.getQdzName()); | ||
| 258 | - sheet.setCreateDate(new Date()); | ||
| 259 | - listAdd.add(sheet); | ||
| 260 | - } | ||
| 261 | - }else{ | ||
| 262 | - sheet.setDate(r.getScheduleDateStr()); | ||
| 263 | - sheet.setRealDate(r.getRealExecDate()); | ||
| 264 | - sheet.setJhsjt(fscjT); | ||
| 265 | - sheet.setJhsj(r.getFcsj()); | ||
| 266 | - sheet.setSjsjt(0L); | ||
| 267 | - sheet.setSjsj("烂班"); | ||
| 268 | - sheet.setGs(r.getGsBm()); | ||
| 269 | - sheet.setFgs(r.getFgsBm()); | ||
| 270 | - sheet.setLine(r.getXlBm()); | ||
| 271 | - sheet.setXlDir(r.getXlDir()); | ||
| 272 | - sheet.setZdname(r.getQdzName()); | ||
| 273 | - sheet.setCreateDate(new Date()); | ||
| 274 | - listAdd.add(sheet); | ||
| 275 | - } | ||
| 276 | - }*/ | 174 | + |
| 277 | for (int i = 0; i < list.size(); i++) { | 175 | for (int i = 0; i < list.size(); i++) { |
| 278 | ScheduleRealInfo s=list.get(i); | 176 | ScheduleRealInfo s=list.get(i); |
| 279 | ScheduleRealInfo r=checkBc(s); | 177 | ScheduleRealInfo r=checkBc(s); |
| @@ -286,7 +184,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | @@ -286,7 +184,7 @@ public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements | ||
| 286 | calendar.add(calendar.DATE,1); | 184 | calendar.add(calendar.DATE,1); |
| 287 | r.setScheduleDate(calendar.getTime()); | 185 | r.setScheduleDate(calendar.getTime()); |
| 288 | try { | 186 | try { |
| 289 | - fscjT = sdf.parse(sdf.format(r.getScheduleDate())+" "+r.getFcsj()).getTime(); | 187 | + fscjT = sdf.parse(sdf_.format(r.getScheduleDate())+" "+r.getFcsj()).getTime(); |
| 290 | } catch (ParseException e) { | 188 | } catch (ParseException e) { |
| 291 | // TODO Auto-generated catch block | 189 | // TODO Auto-generated catch block |
| 292 | e.printStackTrace(); | 190 | e.printStackTrace(); |
src/main/resources/static/pages/mforms/singledatas/singledata.html
| @@ -192,13 +192,30 @@ | @@ -192,13 +192,30 @@ | ||
| 192 | var tjtype=$("#tjtype").val(); | 192 | var tjtype=$("#tjtype").val(); |
| 193 | var params = {}; | 193 | var params = {}; |
| 194 | var i = layer.load(2); | 194 | var i = layer.load(2); |
| 195 | - $get("/mcy_forms/singledatatj",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | ||
| 196 | - layer.close(i); | ||
| 197 | - var singledata = template('singledata',{list:result}); | ||
| 198 | - // 把渲染好的模版html文本追加到表格中 | ||
| 199 | - $('#forms tbody').html(singledata); | ||
| 200 | - | ||
| 201 | - }); | 195 | +// if(tjtype=='jsy'){ |
| 196 | + $get("/mcy_forms/singledatatj",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | ||
| 197 | + layer.close(i); | ||
| 198 | + var singledata = template('singledata',{list:result}); | ||
| 199 | + // 把渲染好的模版html文本追加到表格中 | ||
| 200 | + $('#forms tbody').html(singledata); | ||
| 201 | + | ||
| 202 | + }); | ||
| 203 | +// }else{ | ||
| 204 | +// $get("/mcy_forms/singledatanew",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | ||
| 205 | +// layer.close(i); | ||
| 206 | +// var date=new Array(); //存放文本框数组 | ||
| 207 | +// $.each(result, function (i, obj) { | ||
| 208 | +// if(obj.sgh !='' && obj.sgh!=null){ | ||
| 209 | +// date.push(obj); | ||
| 210 | +// } | ||
| 211 | +// }); | ||
| 212 | +// var singledata = template('singledata2',{list:date}); | ||
| 213 | +// // 把渲染好的模版html文本追加到表格中 | ||
| 214 | +// $('#forms tbody').html(singledata); | ||
| 215 | + | ||
| 216 | +// }); | ||
| 217 | +// } | ||
| 218 | + | ||
| 202 | }); | 219 | }); |
| 203 | 220 | ||
| 204 | $("#export").on("click",function(){ | 221 | $("#export").on("click",function(){ |
| @@ -209,9 +226,16 @@ | @@ -209,9 +226,16 @@ | ||
| 209 | var gsdmSing = $("#gsdmSing").val(); | 226 | var gsdmSing = $("#gsdmSing").val(); |
| 210 | var fgsdmSing = $("#fgsdmSing").val(); | 227 | var fgsdmSing = $("#fgsdmSing").val(); |
| 211 | var tjtype=$("#tjtype").val(); | 228 | var tjtype=$("#tjtype").val(); |
| 212 | - $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ | ||
| 213 | - window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); | ||
| 214 | - }); | 229 | +// if(tjtype=='jsy'){ |
| 230 | + $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ | ||
| 231 | + window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); | ||
| 232 | + }); | ||
| 233 | +// }else{ | ||
| 234 | +// $get('/mcy_export/singledataExport',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export'},function(result){ | ||
| 235 | +// window.open("/downloadFile/download?fileName=路单数据"+moment(startDate).format("YYYYMMDD")); | ||
| 236 | +// }); | ||
| 237 | +// } | ||
| 238 | + | ||
| 215 | }); | 239 | }); |
| 216 | }); | 240 | }); |
| 217 | </script> | 241 | </script> |
| @@ -241,4 +265,29 @@ | @@ -241,4 +265,29 @@ | ||
| 241 | </tr> | 265 | </tr> |
| 242 | {{/if}} | 266 | {{/if}} |
| 243 | </script> | 267 | </script> |
| 244 | -</script> | ||
| 245 | \ No newline at end of file | 268 | \ No newline at end of file |
| 269 | +<script type="text/html" id="singledata2"> | ||
| 270 | + {{each list as obj i}} | ||
| 271 | + <tr> | ||
| 272 | + <td>{{i+1}}</td> | ||
| 273 | + <td>{{obj.rQ}}</td> | ||
| 274 | + <td>{{obj.gS}}</td> | ||
| 275 | + <td>{{obj.xl}}</td> | ||
| 276 | + <td>{{obj.clzbh}}</td> | ||
| 277 | + <td></td> | ||
| 278 | + <td></td> | ||
| 279 | + <td>{{obj.sgh}}</td> | ||
| 280 | + <td>{{obj.sName}}</td> | ||
| 281 | + <td>{{obj.jhlc}}</td> | ||
| 282 | + <td>{{obj.emptMileage}}</td> | ||
| 283 | + <td></td> | ||
| 284 | + <td></td> | ||
| 285 | + <td></td> | ||
| 286 | + <td>{{obj.jhjl}}</td> | ||
| 287 | + </tr> | ||
| 288 | + {{/each}} | ||
| 289 | + {{if list.length == 0}} | ||
| 290 | + <tr> | ||
| 291 | + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td> | ||
| 292 | + </tr> | ||
| 293 | + {{/if}} | ||
| 294 | +</script> |
src/main/resources/static/pages/report/countMileage/countLine/countLineMileage.html
| @@ -263,7 +263,7 @@ | @@ -263,7 +263,7 @@ | ||
| 263 | params['xlName'] = xlName; | 263 | params['xlName'] = xlName; |
| 264 | params['type'] = "query"; | 264 | params['type'] = "query"; |
| 265 | var i = layer.load(2); | 265 | var i = layer.load(2); |
| 266 | - $get('/report/countLineMileage2',params,function(result){ | 266 | + $get('/report/countLineMileage',params,function(result){ |
| 267 | $("#datetodate").html(date+"至"+date2); | 267 | $("#datetodate").html(date+"至"+date2); |
| 268 | layer.close(i); | 268 | layer.close(i); |
| 269 | // 把数据填充到模版中 | 269 | // 把数据填充到模版中 |
| @@ -290,7 +290,7 @@ | @@ -290,7 +290,7 @@ | ||
| 290 | params['xlName'] = xlName; | 290 | params['xlName'] = xlName; |
| 291 | params['type'] = "export"; | 291 | params['type'] = "export"; |
| 292 | params['by']='sj'; | 292 | params['by']='sj'; |
| 293 | - $get('/report/countLineMileage2',params,function(result){ | 293 | + $get('/report/countLineMileage',params,function(result){ |
| 294 | window.open("/downloadFile/download?fileName=线路公里统计表"); | 294 | window.open("/downloadFile/download?fileName=线路公里统计表"); |
| 295 | }); | 295 | }); |
| 296 | }); | 296 | }); |