|
|
@ -858,13 +858,24 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
distrilbutionBillLadingDTO.setWarehouseIdList(collect); |
|
|
|
distrilbutionBillLadingDTO.setWarehouseIdList(collect); |
|
|
|
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO); |
|
|
|
IPage<DistrilbutionBillLadingVO> distrilbutionBillLadingVOIPage = baseMapper.pageList(page, distrilbutionBillLadingDTO); |
|
|
|
List<DistrilbutionBillLadingVO> records = distrilbutionBillLadingVOIPage.getRecords(); |
|
|
|
List<DistrilbutionBillLadingVO> records = distrilbutionBillLadingVOIPage.getRecords(); |
|
|
|
|
|
|
|
|
|
|
|
records.forEach(i -> { |
|
|
|
records.forEach(i -> { |
|
|
|
List<DistributionDeliveryChargeEntity> list = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() |
|
|
|
List<DistributionDeliveryChargeEntity> list = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() |
|
|
|
.eq(DistributionDeliveryChargeEntity::getBillLading, i.getId()) |
|
|
|
.eq(DistributionDeliveryChargeEntity::getBillLading, i.getId()) |
|
|
|
); |
|
|
|
); |
|
|
|
list.forEach(ii -> ii.setCostName(DictBizCache.getValue(DictBizConstant.DELIVERY_COST, ii.getCost()))); |
|
|
|
list.forEach(ii -> ii.setCostName(DictBizCache.getValue(DictBizConstant.DELIVERY_COST, ii.getCost()))); |
|
|
|
i.setList(list); |
|
|
|
i.setList(list); |
|
|
|
|
|
|
|
//查询是不是上传图片
|
|
|
|
|
|
|
|
List<DistributionPrintEntity> list1 = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionPrintEntity::getBillLadingId, i.getId()) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count(); |
|
|
|
|
|
|
|
int count1 = (int) list1.stream().filter(ii -> "2".equals(ii.getGenre().toString())).count(); |
|
|
|
|
|
|
|
int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count(); |
|
|
|
|
|
|
|
if(count1 >= 1 && count >= 1 && count2 >= 1){ |
|
|
|
|
|
|
|
i.setPrintState(true); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
i.setPrintState(false); |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
distrilbutionBillLadingVOIPage.setRecords(records); |
|
|
|
distrilbutionBillLadingVOIPage.setRecords(records); |
|
|
|
return distrilbutionBillLadingVOIPage; |
|
|
|
return distrilbutionBillLadingVOIPage; |
|
|
@ -1821,8 +1832,16 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<DistrilbutionBillLadingViewVO> getViewDetailOwn(String id) { |
|
|
|
public List<DistrilbutionBillLadingViewVO> getViewDetailOwn(String id) { |
|
|
|
|
|
|
|
List<DistrilbutionBillLadingViewVO> viewDetailOwn = baseMapper.getViewDetailOwn(id); |
|
|
|
return baseMapper.getViewDetailOwn(id); |
|
|
|
viewDetailOwn.forEach(i ->{ |
|
|
|
|
|
|
|
List<DistributionPrintEntity> list = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda() |
|
|
|
|
|
|
|
.eq(DistributionPrintEntity::getBillLadingId, id) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
if(!viewDetailOwn.isEmpty()){ |
|
|
|
|
|
|
|
i.setPrintList(list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return viewDetailOwn; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|