Commit 46c49311e71c61f6eff2d601a39295978d21a278

Authored by 娄高锋
1 parent 7c9978b2

调度日报加当班调派

src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -2348,6 +2348,28 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf
2348 2348 map.put("djg_time", m.get("djgsj"));
2349 2349 map.put("jls", Arith.sub(Arith.add(jhlc, ljgl), lbgl));
2350 2350 lMap.add(map);
  2351 +
  2352 + if(date.length() == 10){
  2353 + List<DutyEmployee> list = dutyEmployeeService.getDutyEmployee(line, date + "00:01", date + "23:59");
  2354 + String dbdp = "";
  2355 + try {
  2356 + for (int i = 0; i < list.size(); i++) {
  2357 + DutyEmployee t = list.get(i);
  2358 + if(dbdp.indexOf(t.getuName()) == -1){
  2359 + if(!(dbdp.length()>0)){
  2360 + dbdp =t.getuName();
  2361 + }else{
  2362 + dbdp +=","+t.getuName();
  2363 + }
  2364 + }
  2365 + }
  2366 + } catch (Exception e) {
  2367 + // TODO: handle exception
  2368 + e.printStackTrace();
  2369 + }
  2370 + map.put("dbdp", dbdp);
  2371 + }
  2372 +
2351 2373 return lMap;
2352 2374 }
2353 2375  
... ... @@ -4195,9 +4217,31 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4195 4217 dataList3.add(tempMap);
4196 4218 }
4197 4219  
  4220 + if(date.length() == 10){
  4221 + List<DutyEmployee> list = dutyEmployeeService.getDutyEmployee(line, date + "00:01", date + "23:59");
  4222 + String dbdp = "";
  4223 + try {
  4224 + for (int i = 0; i < list.size(); i++) {
  4225 + DutyEmployee t = list.get(i);
  4226 + if(dbdp.indexOf(t.getuName()) == -1){
  4227 + if(!(dbdp.length()>0)){
  4228 + dbdp =t.getuName();
  4229 + }else{
  4230 + dbdp +=","+t.getuName();
  4231 + }
  4232 + }
  4233 + }
  4234 + } catch (Exception e) {
  4235 + // TODO: handle exception
  4236 + e.printStackTrace();
  4237 + }
  4238 + nMap.put("dbdp", dbdp);
  4239 + }
4198 4240  
4199 4241 if (type.equals("export")) {
4200   - String lineName = map.get("lineName").toString();
  4242 + String lineName = "";
  4243 + if(map.containsKey("lineName"))
  4244 + lineName = "-" + map.get("lineName").toString() + "-";
4201 4245 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
4202 4246 sdfSimple = new SimpleDateFormat("yyyyMMdd");
4203 4247 Map<String, Object> m = new HashMap<String, Object>();
... ... @@ -4215,7 +4259,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4215 4259 sourcePath = path + "mould/scheduleDaily_m.xls";
4216 4260 }
4217 4261 ee.excelReplace(listI, new Object[]{nMap}, sourcePath,
4218   - path + "export/调度日报-"+ lineName + "-" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  4262 + path + "export/调度日报"+ lineName + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
4219 4263 } catch (Exception e) {
4220 4264 // TODO: handle exception
4221 4265 e.printStackTrace();
... ...
src/main/resources/static/pages/forms/mould/scheduleDaily.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -62,6 +62,7 @@
62 62 <div class="table-container" style="margin-top: 10px;min-width: 906px">
63 63 <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
64 64 <br/><label>计划+临加-少驶=<span id="jls"></span>&nbsp;&nbsp;计算机实驶:<span id="jsjss"></span></label>
  65 + &nbsp;&nbsp;当班调派:<span id="dbdp"></span></label>
65 66 <table class="table table-bordered table-hover table-checkable" id="forms">
66 67 <thead>
67 68 <tr>
... ... @@ -434,6 +435,7 @@
434 435 var scheduleDaily_1 = template('scheduleDaily_1',{list:result});
435 436 $("#jls").html(result[0].jls);
436 437 $("#jsjss").html(result[0].sjgl);
  438 + $("#dbdp").html(result[0].dbdp);
437 439 $('#forms .scheduleDaily_1').html(scheduleDaily_1);
438 440 });
439 441 $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){
... ...