Commit c4a16dd57159232644da2118e794e4ba6365e097
1 parent
e7d52396
0113
Showing
7 changed files
with
63 additions
and
15 deletions
src/main/java/com/bsth/entity/oil/Ylxxb.java
| ... | ... | @@ -35,11 +35,11 @@ public class Ylxxb { |
| 35 | 35 | private Date xgrq; |
| 36 | 36 | private String xgr; |
| 37 | 37 | private String fromgsdm; |
| 38 | - private int nylx; | |
| 38 | + private Integer nylx; | |
| 39 | 39 | @Transient |
| 40 | 40 | private String ldgh; |
| 41 | 41 | //0为接口数据,1为手工输入 |
| 42 | - private int jylx=0; | |
| 42 | + private Integer jylx=0; | |
| 43 | 43 | @Transient |
| 44 | 44 | private String gsname; |
| 45 | 45 | @Transient | ... | ... |
src/main/java/com/bsth/repository/oil/YlxxbRepository.java
| ... | ... | @@ -27,4 +27,12 @@ public interface YlxxbRepository extends BaseRepository<Ylxxb, Integer>{ |
| 27 | 27 | @Query(value="SELECT * FROM bsth_c_ylxxb where to_days(?1)=to_days(yyrq) and nbbm =?2 and jylx=1",nativeQuery=true) |
| 28 | 28 | List<Ylxxb> obtainYlxx2(String rq,String nbbm); |
| 29 | 29 | |
| 30 | + @Transactional | |
| 31 | + @Modifying | |
| 32 | + @Query(value="select * from bsth_c_ylxxb s where s.nbbm = ?1 and " | |
| 33 | + + "to_days(s.yyrq) = to_days(?2)",nativeQuery=true) | |
| 34 | + List<Ylxxb> queryListYlxxb(String clZbh,String date); | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 30 | 38 | } | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -39,12 +39,12 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 39 | 39 | + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName") |
| 40 | 40 | List<Map<String, Object>> dailyInfo(String line,String date); |
| 41 | 41 | |
| 42 | - @Query(value="select t.car_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from (" | |
| 43 | - + " select equipment_code,car_code from bsth_c_cars where id in(" | |
| 42 | + @Query(value="select t.inside_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from (" | |
| 43 | + + " select equipment_code,inside_code from bsth_c_cars where id in(" | |
| 44 | 44 | + " select cl from bsth_c_s_ccinfo where xl in ( " |
| 45 | 45 | + " select id from bsth_c_line where line_code=?1 ))) t" |
| 46 | 46 | + " left join bsth_v_directive_60 d on t.equipment_code=d.device_id " |
| 47 | - + " where d.timestamp >=?2 and d.timestamp <=?3 and t.car_code like %?4% ",nativeQuery=true) | |
| 47 | + + " where d.timestamp >=?2 and d.timestamp <=?3 and t.inside_code like %?4% ",nativeQuery=true) | |
| 48 | 48 | List<Object[]> historyMessage(String line,long d,long t,String code); |
| 49 | 49 | |
| 50 | 50 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -15,6 +15,7 @@ import com.bsth.data.schedule.ScheduleComparator; |
| 15 | 15 | import com.bsth.entity.Cars; |
| 16 | 16 | import com.bsth.entity.Line; |
| 17 | 17 | import com.bsth.entity.Personnel; |
| 18 | +import com.bsth.entity.oil.Ylxxb; | |
| 18 | 19 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| 19 | 20 | import com.bsth.entity.realcontrol.LineConfig; |
| 20 | 21 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| ... | ... | @@ -25,6 +26,7 @@ import com.bsth.entity.schedule.GuideboardInfo; |
| 25 | 26 | import com.bsth.entity.sys.DutyEmployee; |
| 26 | 27 | import com.bsth.entity.sys.SysUser; |
| 27 | 28 | import com.bsth.repository.LineRepository; |
| 29 | +import com.bsth.repository.oil.YlxxbRepository; | |
| 28 | 30 | import com.bsth.repository.realcontrol.ChildTaskPlanRepository; |
| 29 | 31 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 30 | 32 | import com.bsth.repository.realcontrol.SvgAttributeRepository; |
| ... | ... | @@ -99,6 +101,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 99 | 101 | |
| 100 | 102 | @Autowired |
| 101 | 103 | DutyEmployeeService dutyEmployeeService; |
| 104 | + | |
| 105 | + @Autowired | |
| 106 | + YlxxbRepository ylxxbRepository; | |
| 102 | 107 | |
| 103 | 108 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 104 | 109 | |
| ... | ... | @@ -2433,6 +2438,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2433 | 2438 | try { |
| 2434 | 2439 | scheduleRealInfo.setBcs(xyz); |
| 2435 | 2440 | xyz++; |
| 2441 | + Set<ChildTaskPlan> cs = scheduleRealInfo.getcTasks(); | |
| 2442 | + Double sjlc=0.0; | |
| 2443 | + if(!cs.isEmpty()){ | |
| 2444 | + Iterator<ChildTaskPlan> it = cs.iterator(); | |
| 2445 | + while(it.hasNext()){ | |
| 2446 | + ChildTaskPlan c = it.next(); | |
| 2447 | + if(!c.isDestroy()){ | |
| 2448 | + sjlc += c.getMileage()==null?0:c.getMileage(); | |
| 2449 | + } | |
| 2450 | + | |
| 2451 | + } | |
| 2452 | + }else{ | |
| 2453 | + if(scheduleRealInfo.getStatus() != -1){ | |
| 2454 | + sjlc =scheduleRealInfo.getJhlc(); | |
| 2455 | + } | |
| 2456 | + } | |
| 2457 | + scheduleRealInfo.setSjlc(format.format(sjlc)); | |
| 2436 | 2458 | map = rru.getMapValue(scheduleRealInfo); |
| 2437 | 2459 | String zdsj = scheduleRealInfo.getZdsj(); |
| 2438 | 2460 | String zdsjActual = scheduleRealInfo.getZdsjActual(); |
| ... | ... | @@ -2457,8 +2479,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2457 | 2479 | } |
| 2458 | 2480 | } |
| 2459 | 2481 | |
| 2482 | + | |
| 2483 | + List<Ylxxb> listYlxxb=ylxxbRepository.queryListYlxxb( clZbh, date); | |
| 2484 | + Double jzl=0.0; | |
| 2485 | + for(int t=0;t<listYlxxb.size();t++){ | |
| 2486 | + Ylxxb y=listYlxxb.get(t); | |
| 2487 | + jzl += y.getJzl(); | |
| 2488 | + } | |
| 2489 | + | |
| 2460 | 2490 | //计算里程和班次数,并放入Map里 |
| 2461 | 2491 | map = new HashMap<String, Object>(); |
| 2492 | + map.put("jzl", jzl); | |
| 2462 | 2493 | map.put("jhlc", format.format(jhlc+jcclc)); |
| 2463 | 2494 | map.put("yygljh", format.format(jhlc)); |
| 2464 | 2495 | map.put("ssgl", format.format(remMileage)); |
| ... | ... | @@ -2632,7 +2663,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2632 | 2663 | while(it.hasNext()){ |
| 2633 | 2664 | ChildTaskPlan c = it.next(); |
| 2634 | 2665 | if(c.getRemarks()!=null && c.getRemarks().length()>0){ |
| 2635 | - remarks += c.getRemarks(); | |
| 2666 | + if(remarks.indexOf(c.getRemarks())==-1){ | |
| 2667 | + remarks += c.getRemarks(); | |
| 2668 | + } | |
| 2636 | 2669 | } |
| 2637 | 2670 | |
| 2638 | 2671 | if(!c.isDestroy()){ |
| ... | ... | @@ -2664,7 +2697,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2664 | 2697 | String xlbm=s.getXlBm(); |
| 2665 | 2698 | String fcrq=s.getScheduleDateStr(); |
| 2666 | 2699 | |
| 2667 | - | |
| 2700 | + List<Ylxxb> listYlxxb=ylxxbRepository.queryListYlxxb( s.getClZbh(), fcrq); | |
| 2701 | + Double jzl=0.0; | |
| 2702 | + for(int t=0;t<listYlxxb.size();t++){ | |
| 2703 | + Ylxxb y=listYlxxb.get(t); | |
| 2704 | + jzl += y.getJzl(); | |
| 2705 | + } | |
| 2706 | + map.put("jzl", jzl); | |
| 2668 | 2707 | map.put("xlName", s.getXlName()); |
| 2669 | 2708 | map.put("clZbh", s.getClZbh()); |
| 2670 | 2709 | map.put("fcsjActual", s.getFcsjActual()); | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -158,31 +158,31 @@ |
| 158 | 158 | <td colspan="40"> </td> |
| 159 | 159 | </tr> --> |
| 160 | 160 | <tr> |
| 161 | - <td colspan="2">班序</td> | |
| 161 | + <td colspan="2">路牌</td> | |
| 162 | 162 | <td colspan="2">车号</td> |
| 163 | 163 | <td>司早</td> |
| 164 | 164 | <td>售早</td> |
| 165 | 165 | <td>司晚</td> |
| 166 | 166 | <td>售晚</td> |
| 167 | - <td colspan="2">班序</td> | |
| 167 | + <td colspan="2">路牌</td> | |
| 168 | 168 | <td colspan="2">车号</td> |
| 169 | 169 | <td>司早</td> |
| 170 | 170 | <td>售早</td> |
| 171 | 171 | <td>司晚</td> |
| 172 | 172 | <td>售晚</td> |
| 173 | - <td colspan="2">班序</td> | |
| 173 | + <td colspan="2">路牌</td> | |
| 174 | 174 | <td colspan="2">车号</td> |
| 175 | 175 | <td>司早</td> |
| 176 | 176 | <td>售早</td> |
| 177 | 177 | <td>司晚</td> |
| 178 | 178 | <td>售晚</td> |
| 179 | - <td colspan="2">班序</td> | |
| 179 | + <td colspan="2">路牌</td> | |
| 180 | 180 | <td colspan="2">车号</td> |
| 181 | 181 | <td>司早</td> |
| 182 | 182 | <td>售早</td> |
| 183 | 183 | <td>司晚</td> |
| 184 | 184 | <td>售晚</td> |
| 185 | - <td colspan="2">班序</td> | |
| 185 | + <td colspan="2">路牌</td> | |
| 186 | 186 | <td colspan="2">车号</td> |
| 187 | 187 | <td>司早</td> |
| 188 | 188 | <td>售早</td> | ... | ... |
src/main/resources/static/pages/forms/statement/waybillQp.html
| ... | ... | @@ -252,7 +252,7 @@ |
| 252 | 252 | </tr> |
| 253 | 253 | <tr> |
| 254 | 254 | <td colspan="2">出场存油 升</td> |
| 255 | - <td colspan="3">加注油量 升</td> | |
| 255 | + <td colspan="3">加注油量 {{map.jzl}}升</td> | |
| 256 | 256 | <td colspan="2">进场存油 升</td> |
| 257 | 257 | <td colspan="4">加注机油 升</td> |
| 258 | 258 | <td colspan="5">本日耗油 升</td> |
| ... | ... | @@ -350,8 +350,8 @@ |
| 350 | 350 | <td>{{map.ljgl}}</td> |
| 351 | 351 | <td colspan="2">损失班次</td> |
| 352 | 352 | <td colspan="1">{{map.ssbc}}</td> |
| 353 | - <td colspan="3">运送公里</td> | |
| 354 | - <td colspan="2">{{map.ysgl}}</td> | |
| 353 | + <td colspan="3"></td> | |
| 354 | + <td colspan="2"></td> | |
| 355 | 355 | </tr> |
| 356 | 356 | <tr> |
| 357 | 357 | ... | ... |
src/main/resources/static/pages/report/message/message.html
| ... | ... | @@ -195,6 +195,7 @@ |
| 195 | 195 | params[index] = $(this).text(); |
| 196 | 196 | }); |
| 197 | 197 | jName = params[1]; |
| 198 | + console.log(jName); | |
| 198 | 199 | line = $("#line").val(); |
| 199 | 200 | date = $("#date").val(); |
| 200 | 201 | $get('/realSchedule/historyMessage',{line:line,date:date,code:jName,type:"query"},function(result){ | ... | ... |