Commit ec5ed2c0bcf7e4789adc2998372fcab67ef3ad42
1 parent
3bd21912
update...
Showing
3 changed files
with
12 additions
and
8 deletions
src/main/java/com/bsth/data/in_out/buffer/BerthDataBuffer.java
| ... | ... | @@ -137,7 +137,7 @@ public class BerthDataBuffer { |
| 137 | 137 | } |
| 138 | 138 | else{ |
| 139 | 139 | //修改数据库 |
| 140 | - jdbcTemplate.update("update bsth_p_berth set status=-1 where name=?", berthName); | |
| 140 | + jdbcTemplate.update("update bsth_p_berth set status=-1,car=null where name=?", berthName); | |
| 141 | 141 | findOne(berthName).setStatus(-1); |
| 142 | 142 | lockList.add(berthName); |
| 143 | 143 | ... | ... |
src/main/resources/application.properties
src/main/resources/static/pages/b_p_manager/b_p_main.html
| ... | ... | @@ -163,14 +163,18 @@ |
| 163 | 163 | resetAll(); |
| 164 | 164 | var $berthReg, clazz, htmlStr, nbbm, soc; |
| 165 | 165 | for (var i = 0, obj; obj = list[i++];) { |
| 166 | - $berthReg = $('.berth_card_list .car_blank[name=berth_reg_' + obj['berth'] + ']', wrap); | |
| 167 | - if (!$berthReg) | |
| 168 | - return; | |
| 166 | + try{ | |
| 167 | + $berthReg = $('.berth_card_list .car_blank[name=berth_reg_' + obj['berth'] + ']', wrap); | |
| 168 | + if (!$berthReg) | |
| 169 | + return; | |
| 169 | 170 | |
| 170 | - nbbm = obj['bus'].nbbm; | |
| 171 | - var htmlStr = '<div class="car_name">' + nbbm + '<span class="elec_perc"></span> </div>'; | |
| 171 | + nbbm = obj['bus'].nbbm; | |
| 172 | + var htmlStr = '<div class="car_name">' + nbbm + '<span class="elec_perc"></span> </div>'; | |
| 172 | 173 | |
| 173 | - $berthReg.attr('data-nbbm', nbbm).html(htmlStr).addClass('no_elec').removeClass('free'); | |
| 174 | + $berthReg.attr('data-nbbm', nbbm).html(htmlStr).addClass('no_elec').removeClass('free'); | |
| 175 | + }catch (e){ | |
| 176 | + console.log(e); | |
| 177 | + } | |
| 174 | 178 | /*soc = obj['elec'] ? obj['elec']['soc'] : -1; |
| 175 | 179 | |
| 176 | 180 | if (soc == -1) { | ... | ... |