Commit 69aab057ed1cd34406d35dc1b0bc71e80186bac4
Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong
Showing
3 changed files
with
13 additions
and
13 deletions
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -46,12 +46,9 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 46 | 46 | + " s.xlBm = ?1 and s.scheduleDateStr = ?2 group by clZbh,jGh,jName") |
| 47 | 47 | List<Map<String, Object>> dailyInfo(String line,String date); |
| 48 | 48 | |
| 49 | - @Query(value="select t.inside_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from (" | |
| 50 | - + " select equipment_code,inside_code from bsth_c_cars where id in(" | |
| 51 | - + " select cl from bsth_c_s_ccinfo where xl in ( " | |
| 52 | - + " select id from bsth_c_line where line_code=?1 ))) t" | |
| 53 | - + " left join bsth_v_directive_60 d on t.equipment_code=d.device_id " | |
| 54 | - + " where d.timestamp >=?2 and d.timestamp <=?3 and t.inside_code like %?4% ",nativeQuery=true) | |
| 49 | + @Query(value="select d.device_id,d.sender,d.txt_content,d.timestamp,d.line_code from " | |
| 50 | + + " bsth_v_directive_60 d where d.line_code=?1 and d.timestamp >=?2 and " | |
| 51 | + + "d.timestamp <=?3 and d.device_id like %?4% ",nativeQuery=true) | |
| 55 | 52 | List<Object[]> historyMessage(String line,long d,long t,String code); |
| 56 | 53 | |
| 57 | 54 | @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
| ... | ... | @@ -1098,10 +1098,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1098 | 1098 | } |
| 1099 | 1099 | |
| 1100 | 1100 | } |
| 1101 | - | |
| 1102 | - List<Object[]> list = scheduleRealInfoRepository.historyMessage(line, d, t, code); | |
| 1101 | + String device=""; | |
| 1102 | + if(!code.equals("")){ | |
| 1103 | + device=BasicData.deviceId2NbbmMap.inverse().get(code); | |
| 1104 | + } | |
| 1105 | + List<Object[]> list = scheduleRealInfoRepository.historyMessage(line, d, t, device); | |
| 1103 | 1106 | for (Object[] obj : list) { |
| 1104 | 1107 | if (obj != null) { |
| 1108 | + obj[0] =BasicData.deviceId2NbbmMap.get(obj[0].toString()); | |
| 1105 | 1109 | obj[3] = sdf.format(new Date(Long.parseLong(obj[3].toString()))); |
| 1106 | 1110 | obj[4] = BasicData.lineCode2NameMap.get(line); |
| 1107 | 1111 | } |
| ... | ... | @@ -2495,8 +2499,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2495 | 2499 | map.put("ssgl", ssgl); |
| 2496 | 2500 | |
| 2497 | 2501 | //计划+临加-少驶=实驶 |
| 2498 | - double jl=Arith.add(jhyygl, ljgl); | |
| 2499 | - if(Arith.sub(jl, ssgl)==sjyygl){ | |
| 2502 | + double jl=Arith.sub(Arith.add(jhyygl, ljgl),ssgl); | |
| 2503 | + if(jl==zyygl){ | |
| 2500 | 2504 | map.put("zt", 0); |
| 2501 | 2505 | }else{ |
| 2502 | 2506 | map.put("zt", 1); |
| ... | ... | @@ -2612,8 +2616,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2612 | 2616 | double ssgl= culateService.culateLbgl(list); |
| 2613 | 2617 | map.put("ssgl", ssgl); |
| 2614 | 2618 | //计划+临加-少驶=实驶 |
| 2615 | - double jl=Arith.add(jhyygl, ljgl); | |
| 2616 | - if(Arith.sub(jl, ssgl)==sjyygl){ | |
| 2619 | + double jl=Arith.sub(Arith.add(jhyygl, ljgl),ssgl); | |
| 2620 | + if(jl==zyygl){ | |
| 2617 | 2621 | map.put("zt", 0); |
| 2618 | 2622 | }else{ |
| 2619 | 2623 | map.put("zt", 1); | ... | ... |
src/main/resources/static/pages/oil/list_ph.html
| ... | ... | @@ -674,7 +674,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep |
| 674 | 674 | |
| 675 | 675 | var l = layer.load(2); |
| 676 | 676 | $get('/ylb/ylbList', params, function (data) { |
| 677 | - console.log(data); | |
| 678 | 677 | for(var i=1;i<data.length;i++){ |
| 679 | 678 | moveArray[i]=new Array(); |
| 680 | 679 | for(var j=1;j<6;j++){ | ... | ... |