Commit 9694e9d1495ec132f6c121007ef97813589e346f

Authored by 2c2c2c
1 parent a9a1fac9

电子联单bug 修复,导出联单,打印联单

trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
... ... @@ -636,7 +636,7 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder>
636 636 garOrderMatchAsk.setGarOrderNumber(generateAssociationNumber(order.getGarOrderAddress()));
637 637 garOrderMatchAsk.setGarOrderId(dto.getGarOrderId());
638 638 garOrderMatchAsk.setGarOrderTime(order.getGarCreateTime());
639   - garOrderMatchAsk.setDropCarNum(order.getGarRealCarCount());
  639 +
640 640  
641 641 //获取处置场所
642 642 List<GarOrderMatchDisposal> disposalList = garOrderMatchDisposalService.queryObjByOrderId(dto.getGarOrderId());
... ... @@ -667,6 +667,7 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
667 667 break;
668 668 }
669 669 }
  670 + int dropCarNum = 0;
670 671 for (GarOrderMatchAsk garOrderMatchAsk : askList) {
671 672 //判断该车是否已经结束上一趟次的配送
672 673 if(garOrderMatchAsk.getGarCarCode()!=null && garOrderMatchAsk.getGarCarCode().equals(dto.getCarPlate()) && garOrderMatchAsk.getGarUpdateTime() == null){
... ... @@ -674,6 +675,7 @@ public class GarOrderServiceImpl extends ServiceImpl&lt;GarOrderMapper, GarOrder&gt;
674 675 }
675 676 //每次只判断一次
676 677 if(garOrderMatchAsk.getGarCarCode()==null && garOrderMatchAsk.getGarUpdateTime() == null){
  678 + garOrderMatchAsk.setDropCarNum(++dropCarNum);
677 679 garOrderMatchAsk.setGarCreateTime(new Date());
678 680 garOrderMatchAsk.setGarCarCode(dto.getCarPlate());
679 681 askService.updateById(garOrderMatchAsk);
... ...
trash-ui/src/views/ask/ask/index.vue
... ... @@ -190,7 +190,7 @@
190 190 <td>联系电话</td>
191 191 <td>{{ form.garOrderPhone || '-' }}</td>
192 192 <td>车次</td>
193   - <td>{{ dropCarNum }}/{{ form.dropCarNum || '-' }}</td>
  193 + <td>{{ form.dropCarNum }}/{{ dropCarNum }}</td>
194 194 </tr>
195 195 <tr>
196 196 <td>投放地址</td>
... ... @@ -413,11 +413,7 @@ export default {
413 413 this.dropCarNum = 0;
414 414 const garId = row.garId || this.ids
415 415 listAsk({"garOrderId":row.garOrderId}).then(response => {
416   - for(let i = 0;i<response.rows.length;i++){
417   - if(response.rows[i].garHandlerCarCode!=null && response.rows[i].garHandlerCarCode !== ''){
418   - this.dropCarNum++;
419   - }
420   - }
  416 + this.dropCarNum = response.total;
421 417 });
422 418 getAsk(garId).then(response => {
423 419 this.form = response.data;
... ...