|
|
@ -695,7 +695,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增
|
|
|
|
//新增
|
|
|
|
// distrilbutionBillLading.setConditions("1");
|
|
|
|
// distrilbutionBillLading.setConditions("1");
|
|
|
|
distrilbutionBillLading.setStockupCode(distributionReservationService.bianMa()); |
|
|
|
distrilbutionBillLading.setStockupCode(distributionReservationService.bianMa()); |
|
|
@ -912,8 +911,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//操作图片
|
|
|
|
//操作图片
|
|
|
|
if (!distrilbutionBillLading.getPrintList().isEmpty()) { |
|
|
|
if (!distrilbutionBillLading.getPrintList().isEmpty()) { |
|
|
|
addPrint(distrilbutionBillLading); |
|
|
|
addPrint(distrilbutionBillLading); |
|
|
@ -986,8 +983,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean signImages(DistrilbutionBillLadingDTO distrilbutionBillLading) { |
|
|
|
public boolean signImages(DistrilbutionBillLadingDTO distrilbutionBillLading) { |
|
|
|
//修改图片
|
|
|
|
//修改图片
|
|
|
@ -1343,6 +1338,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 转换老系统的ID |
|
|
|
* 转换老系统的ID |
|
|
|
|
|
|
|
* |
|
|
|
* @param delivery |
|
|
|
* @param delivery |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void modifyWarehouseId(SignPushDataDTO delivery) { |
|
|
|
private void modifyWarehouseId(SignPushDataDTO delivery) { |
|
|
@ -2076,7 +2072,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (!zeroPackageEntities.isEmpty()){
|
|
|
|
// if (!zeroPackageEntities.isEmpty()){
|
|
|
|
// distributionZeroPackageService.saveBatch(zeroPackageEntities);
|
|
|
|
// distributionZeroPackageService.saveBatch(zeroPackageEntities);
|
|
|
|
// }
|
|
|
|
// }
|
|
|
@ -2102,7 +2097,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
// this.updateById(distrilbutionBillLadingEntity);
|
|
|
|
// this.updateById(distrilbutionBillLadingEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2297,16 +2291,47 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} |
|
|
|
} |
|
|
|
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 -> { |
|
|
|
|
|
|
|
List<DistributionDeliveryChargeEntity> list = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() |
|
|
|
// 获取所有的提货单ID
|
|
|
|
.eq(DistributionDeliveryChargeEntity::getBillLading, i.getId()) |
|
|
|
List<Long> billIds = records.stream() |
|
|
|
|
|
|
|
.map(DistrilbutionBillLadingVO::getId) // 假设getId()方法返回提货单ID
|
|
|
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionDeliveryChargeEntity> distributionDeliveryChargeEntityList = distributionDeliveryChargeService.list(Wrappers.<DistributionDeliveryChargeEntity>query().lambda() |
|
|
|
|
|
|
|
.in(DistributionDeliveryChargeEntity::getBillLading, billIds) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
Map<Long, List<DistributionDeliveryChargeEntity>> groupedEntities; |
|
|
|
|
|
|
|
if (ObjectUtils.isNotNull(distributionDeliveryChargeEntityList)) { |
|
|
|
|
|
|
|
groupedEntities = |
|
|
|
|
|
|
|
distributionDeliveryChargeEntityList.stream() |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(DistributionDeliveryChargeEntity::getBillLading)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
groupedEntities = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DistributionPrintEntity> DistributionPrintEntitys = distributionPrintService.list(Wrappers.<DistributionPrintEntity>query().lambda() |
|
|
|
|
|
|
|
.in(DistributionPrintEntity::getBillLadingId, billIds) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<Long, List<DistributionPrintEntity>> groupDistributionPrintEntityEntities; |
|
|
|
|
|
|
|
if (ObjectUtils.isNotNull(DistributionPrintEntitys)) { |
|
|
|
|
|
|
|
groupDistributionPrintEntityEntities = |
|
|
|
|
|
|
|
DistributionPrintEntitys.stream() |
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(DistributionPrintEntity::getBillLadingId)); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
groupDistributionPrintEntityEntities = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
records.forEach(i -> { |
|
|
|
|
|
|
|
if(groupedEntities!=null){ |
|
|
|
|
|
|
|
List<DistributionDeliveryChargeEntity> list =groupedEntities.get(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() |
|
|
|
if(groupDistributionPrintEntityEntities!=null){ |
|
|
|
.eq(DistributionPrintEntity::getBillLadingId, i.getId()) |
|
|
|
List<DistributionPrintEntity> list1 = groupDistributionPrintEntityEntities.get(i.getId()); |
|
|
|
); |
|
|
|
if(list1!=null){ |
|
|
|
int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count(); |
|
|
|
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 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(); |
|
|
|
int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count(); |
|
|
@ -2315,6 +2340,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
i.setPrintState(false); |
|
|
|
i.setPrintState(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
i.setPrintState(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
distrilbutionBillLadingVOIPage.setRecords(records); |
|
|
|
distrilbutionBillLadingVOIPage.setRecords(records); |
|
|
|
return distrilbutionBillLadingVOIPage; |
|
|
|
return distrilbutionBillLadingVOIPage; |
|
|
@ -2966,7 +2997,6 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
// i.setEsauInventoryNum(list.size());
|
|
|
|
// i.setEsauInventoryNum(list.size());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
// } else {
|
|
|
|
//没有备货完成
|
|
|
|
//没有备货完成
|
|
|
|
// i.setEsauInventoryNum(-1);
|
|
|
|
// i.setEsauInventoryNum(-1);
|
|
|
@ -3360,6 +3390,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 自提签收推淞老系统 |
|
|
|
* 自提签收推淞老系统 |
|
|
|
|
|
|
|
* |
|
|
|
* @param id |
|
|
|
* @param id |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void sendOldSystem(Long id) { |
|
|
|
private void sendOldSystem(Long id) { |
|
|
|