Commit 4f0611ba1150b1496ca8be0a4a0b3aa5783e432b
1 parent
8341a4ad
0110
Showing
4 changed files
with
56 additions
and
10 deletions
src/main/java/com/bsth/controller/DownloadController.java
| @@ -31,7 +31,7 @@ public class DownloadController | @@ -31,7 +31,7 @@ public class DownloadController | ||
| 31 | @RequestMapping("download") | 31 | @RequestMapping("download") |
| 32 | public ResponseEntity<byte[]> download(String fileName) throws IOException { | 32 | public ResponseEntity<byte[]> download(String fileName) throws IOException { |
| 33 | fileName = fileName+".xls"; | 33 | fileName = fileName+".xls"; |
| 34 | - String moudelPath = this.getClass().getResource("/").getPath()+ "static\\pages\\forms\\export\\"+fileName; | 34 | + String moudelPath = this.getClass().getResource("/").getPath()+ "static/pages/forms/export/"+fileName; |
| 35 | System.out.println(moudelPath); | 35 | System.out.println(moudelPath); |
| 36 | // String path="D:\\export\\target\\"+jName+".xls"; | 36 | // String path="D:\\export\\target\\"+jName+".xls"; |
| 37 | File file=new File(moudelPath); | 37 | File file=new File(moudelPath); |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -2201,12 +2201,43 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2201,12 +2201,43 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2201 | map.put("sjbc", jhbc-cjbc+ljbc); | 2201 | map.put("sjbc", jhbc-cjbc+ljbc); |
| 2202 | map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); | 2202 | map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); |
| 2203 | map.put("ljbc", ljbc); | 2203 | map.put("ljbc", ljbc); |
| 2204 | - | ||
| 2205 | - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; | ||
| 2206 | - | 2204 | + String zdp="",zwdp="",wdp=""; |
| 2205 | + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); | ||
| 2206 | + List<DutyEmployee> listDtuy= dutyEmployeeService.getDutyEmployee(line, date+"00:00", date+"23:59"); | ||
| 2207 | + try { | ||
| 2208 | + Long fcsj1=sdf.parse(date+" 03:00").getTime(); | ||
| 2209 | + Long fcsj2=sdf.parse(date+" 11:00").getTime(); | ||
| 2210 | + Long fcsj3=sdf.parse(date+" 22:00").getTime(); | ||
| 2211 | + for(int i=0;i<list.size();i++){ | ||
| 2212 | + DutyEmployee t=listDtuy.get(i); | ||
| 2213 | + Long ts=t.getTs(); | ||
| 2214 | + if(ts>fcsj1&&ts<fcsj2){ | ||
| 2215 | + if(zdp.indexOf(t.getuName())==-1){ | ||
| 2216 | + zdp +=t.getuName()+","; | ||
| 2217 | + | ||
| 2218 | + } | ||
| 2219 | + }else if(ts>fcsj2 && ts<fcsj3){ | ||
| 2220 | + if(zwdp.indexOf(t.getuName())==-1){ | ||
| 2221 | + zwdp +=t.getuName()+","; | ||
| 2222 | + } | ||
| 2223 | + }else{ | ||
| 2224 | + if(wdp.indexOf(t.getuName())==-1){ | ||
| 2225 | + wdp +=t.getuName()+","; | ||
| 2226 | + } | ||
| 2227 | + } | ||
| 2228 | + } | ||
| 2229 | + }catch (ParseException e) { | ||
| 2230 | + // TODO Auto-generated catch block | ||
| 2231 | + e.printStackTrace(); | ||
| 2232 | + } | ||
| 2233 | + map.put("zdp", zdp); | ||
| 2234 | + map.put("zwdp", zwdp); | ||
| 2235 | + map.put("wdp", wdp); | ||
| 2236 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 2207 | list.add(listMap.iterator()); | 2237 | list.add(listMap.iterator()); |
| 2208 | - ee.excelReplace(list, new Object[] { scheduleRealInfos.get(0),map }, path+"mould\\waybill_qingpu.xls", | ||
| 2209 | - path+"export\\" + date+"-"+clZbh+"-行车路单.xls"); | 2238 | + ee.excelReplace(list, new Object[] { scheduleRealInfos.get(0),map }, path+"mould/waybill_qingpu.xls", |
| 2239 | + path+"export/" + date+"-"+clZbh+"-行车路单.xls"); | ||
| 2240 | + | ||
| 2210 | return scheduleRealInfos; | 2241 | return scheduleRealInfos; |
| 2211 | } | 2242 | } |
| 2212 | 2243 | ||
| @@ -2304,6 +2335,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2304,6 +2335,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2304 | map.put("sjbc", jhbc-cjbc+ljbc); | 2335 | map.put("sjbc", jhbc-cjbc+ljbc); |
| 2305 | map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); | 2336 | map.put("zgl", format.format(yygl+remMileage+ksgl+jcclc)); |
| 2306 | map.put("ljbc", ljbc); | 2337 | map.put("ljbc", ljbc); |
| 2338 | + | ||
| 2307 | return map; | 2339 | return map; |
| 2308 | } | 2340 | } |
| 2309 | 2341 | ||
| @@ -2356,6 +2388,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2356,6 +2388,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2356 | map.put("zdzName", s.getZdzName()); | 2388 | map.put("zdzName", s.getZdzName()); |
| 2357 | map.put("scheduleDate", s.getScheduleDateStr()); | 2389 | map.put("scheduleDate", s.getScheduleDateStr()); |
| 2358 | String zdp="",zwdp="",wdp=""; | 2390 | String zdp="",zwdp="",wdp=""; |
| 2391 | + String zdpT="",zwdpT="",wdpT=""; | ||
| 2359 | 2392 | ||
| 2360 | List<DutyEmployee> list= dutyEmployeeService.getDutyEmployee(xlbm, fcrq+"00:00", fcrq+"23:59"); | 2393 | List<DutyEmployee> list= dutyEmployeeService.getDutyEmployee(xlbm, fcrq+"00:00", fcrq+"23:59"); |
| 2361 | try { | 2394 | try { |
| @@ -2367,14 +2400,24 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2367,14 +2400,24 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2367 | Long ts=t.getTs(); | 2400 | Long ts=t.getTs(); |
| 2368 | if(ts>fcsj1&&ts<fcsj2){ | 2401 | if(ts>fcsj1&&ts<fcsj2){ |
| 2369 | if(zdp.indexOf(t.getuName())==-1){ | 2402 | if(zdp.indexOf(t.getuName())==-1){ |
| 2403 | + if(!(zdp.length()>0)){ | ||
| 2404 | + zdpT =t.getuName()+"..."; | ||
| 2405 | + } | ||
| 2370 | zdp +=t.getuName()+","; | 2406 | zdp +=t.getuName()+","; |
| 2407 | + | ||
| 2371 | } | 2408 | } |
| 2372 | }else if(ts>fcsj2 && ts<fcsj3){ | 2409 | }else if(ts>fcsj2 && ts<fcsj3){ |
| 2373 | if(zwdp.indexOf(t.getuName())==-1){ | 2410 | if(zwdp.indexOf(t.getuName())==-1){ |
| 2411 | + if(!(zwdp.length()>0)){ | ||
| 2412 | + zwdpT =t.getuName()+"..."; | ||
| 2413 | + } | ||
| 2374 | zwdp +=t.getuName()+","; | 2414 | zwdp +=t.getuName()+","; |
| 2375 | } | 2415 | } |
| 2376 | }else{ | 2416 | }else{ |
| 2377 | if(wdp.indexOf(t.getuName())==-1){ | 2417 | if(wdp.indexOf(t.getuName())==-1){ |
| 2418 | + if(!(wdp.length()>0)){ | ||
| 2419 | + wdpT =t.getuName()+"..."; | ||
| 2420 | + } | ||
| 2378 | wdp +=t.getuName()+","; | 2421 | wdp +=t.getuName()+","; |
| 2379 | } | 2422 | } |
| 2380 | } | 2423 | } |
| @@ -2386,6 +2429,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2386,6 +2429,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2386 | map.put("zdp", zdp); | 2429 | map.put("zdp", zdp); |
| 2387 | map.put("zwdp", zwdp); | 2430 | map.put("zwdp", zwdp); |
| 2388 | map.put("wdp", wdp); | 2431 | map.put("wdp", wdp); |
| 2432 | + map.put("zdpT", zdpT); | ||
| 2433 | + map.put("zwdpT", zwdpT); | ||
| 2434 | + map.put("wdpT", wdpT); | ||
| 2389 | return map; | 2435 | return map; |
| 2390 | } | 2436 | } |
| 2391 | 2437 |
src/main/java/com/bsth/util/ReportUtils.java
| @@ -452,7 +452,7 @@ public class ReportUtils { | @@ -452,7 +452,7 @@ public class ReportUtils { | ||
| 452 | targetFile.delete(); | 452 | targetFile.delete(); |
| 453 | } | 453 | } |
| 454 | // 创建目标文件夹 | 454 | // 创建目标文件夹 |
| 455 | - targetFile = new File(path.substring(0, path.lastIndexOf("\\"))); | 455 | + targetFile = new File(path.substring(0, path.lastIndexOf("/"))); |
| 456 | if (!targetFile.exists()) { | 456 | if (!targetFile.exists()) { |
| 457 | targetFile.mkdirs(); | 457 | targetFile.mkdirs(); |
| 458 | } | 458 | } |
src/main/resources/static/pages/forms/statement/waybillQp.html
| @@ -258,11 +258,11 @@ | @@ -258,11 +258,11 @@ | ||
| 258 | <tr> | 258 | <tr> |
| 259 | <td colspan="2">调度员</td> | 259 | <td colspan="2">调度员</td> |
| 260 | <td colspan="2">早班(职号)</td> | 260 | <td colspan="2">早班(职号)</td> |
| 261 | - <td >{{map.zdp}}</td> | 261 | + <td title={{map.zdp}}>{{map.zdpT}}</td> |
| 262 | <td >中班(职号)</td> | 262 | <td >中班(职号)</td> |
| 263 | - <td >{{map.zwdp}}</td> | 263 | + <td title={{map.zwdp}}>{{map.zwdpT}}</td> |
| 264 | <td colspan="2">夜班(职号)</td> | 264 | <td colspan="2">夜班(职号)</td> |
| 265 | - <td colspan="2">{{map.wdp}}</td> | 265 | + <td colspan="2" title={{map.wdp}}>{{map.wdpT}}</td> |
| 266 | <td colspan="2">其他</td> | 266 | <td colspan="2">其他</td> |
| 267 | <td colspan="2"> </td> | 267 | <td colspan="2"> </td> |
| 268 | </tr> | 268 | </tr> |