Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
b1b2debe22
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  2. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java

@ -659,7 +659,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
distributionStockListEntity.setFactory(Optional.ofNullable(distributionStockArticleEntity.getFactoryTrain()).orElse(null));//工厂车次
distributionStockListEntity.setDespatch(Optional.ofNullable(distributionStockArticleEntity.getTrainNumber()).orElse(null));//车次号
distributionStockListEntity.setStockArticleId(Optional.ofNullable(distributionParcelList.getStockArticleId()).orElse(null)); //订单ID
distributionStockListEntity.setOrderCode(Optional.ofNullable(distributionStockArticleEntity.getOrderCode()).orElse(null)); //订单自编号
distributionStockListEntity.setOrderCode(Optional.ofNullable(distributionParcelList.getOrderCode()).orElse(null)); //订单自编号
//添加库存品记录
DistributionStockListInfoEntity distributionStockListInfo = new DistributionStockListInfoEntity();

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -2970,7 +2970,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
map.put("signfor_id",distributionSignfor.getId());
log.info(">>>>>>>>>>>>>>>>>>> 推送老系统 的签收数据 {} ",distributionSignfor);
//rabbitTemplate.convertAndSend(RabbitConstant.CLERK_CHECK_PUSH_DATA_EXCHANGE, RabbitConstant.CLERK_CHECK_PUSH_DATA_ROUTING, map);
rabbitTemplate.convertAndSend(RabbitConstant.CLERK_CHECK_PUSH_DATA_EXCHANGE, RabbitConstant.CLERK_CHECK_PUSH_DATA_ROUTING, map);
}
@ -3028,24 +3028,39 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
@Override
public void handlePicture(String ids, HttpServletResponse res) {
log.info(">>>>>> handlePicture {}",1);
if (Func.isEmpty(ids)){
log.error("#########ids字段缺失:{}",ids);
}
List<Long> signIds = Func.toLongList(",", ids);
List<String> reservationCodes= new ArrayList<>();
log.info(">>>>>> handlePicture {}",2);
List<DistributionSignforEntity> distributionSignforEntities = this.listByIds(signIds);
log.info(">>>>>> handlePicture {}",3);
if (Func.isNotEmpty(distributionSignforEntities)) {
for (DistributionSignforEntity distributionSignforEntity : distributionSignforEntities) {
log.info(">>>>>> handlePicture {}",3-1);
DistributionReservationEntity distributionReservationEntity = distributionReservationMapper.selectById(distributionSignforEntity.getReservationId());
log.info(">>>>>> handlePicture {}",3-2);
List<DistributionSignPrintVO> printEntities = baseMapper.selectSignImgsUrl(distributionSignforEntity.getReservationId());
log.info(">>>>>> handlePicture {}",3-3);
if (Func.isNotEmpty(printEntities)){
//进行分组
Map<String, List<DistributionSignPrintVO>> signingPictureGroup = printEntities.stream().collect(Collectors.groupingBy(DistributionSignPrintVO::getType));
log.info(">>>>>> handlePicture {}",3-4);
//进行图片
signingPictureGroup.forEach((k,v)->{
log.info(">>>>>> handlePicture {}",3-5);
//这个方法会根据
List<String> urls = v.stream().map(DistributionSignPrintVO::getUrlRoute).collect(Collectors.toList());
log.info(">>>>>> handlePicture {}",3-6);
FileUtil.handleSignPictureZip(urls, k, distributionReservationEntity.getReservationCode(), distributionReservationEntity.getConsignee());
log.info(">>>>>> handlePicture {}",3-7);
});
//拼接ReservationCode
@ -3054,8 +3069,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
log.info(">>>>>> handlePicture {}",5);
//将指定的文件进行压缩
String fileName = FileUtil.reservationPictureFileToZip(String.join(",",reservationCodes));
log.info(">>>>>> handlePicture {}",6);
//获得压缩后的文件进行前端下载数据推送
File file = FileUtil.getZipFile(fileName);

Loading…
Cancel
Save