|
|
|
@ -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); |
|
|
|
|