md
This commit is contained in:
parent
b5ea7a930c
commit
b1b40e9cb2
@ -2719,15 +2719,18 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
|
|
||||||
String fileId = UUID.fastUUID().toString();
|
String fileId = UUID.fastUUID().toString();
|
||||||
String fileSavePath = PayConfig.getUploadPath();
|
String fileSavePath = PayConfig.getUploadPath();
|
||||||
File fileFullPath = FileUploadUtils.getAbsoluteFile(fileSavePath,fileId+".png");
|
File localFile = FileUploadUtils.getAbsoluteFile(fileSavePath,fileId+".png");
|
||||||
|
|
||||||
FileOutputStream os = new FileOutputStream(fileFullPath);
|
FileOutputStream os = new FileOutputStream(localFile);
|
||||||
tplPrint.genPNG(order,tplCode,"", os);
|
tplPrint.genPNG(order,tplCode,"", os);
|
||||||
|
|
||||||
SysFileInfo sysFileInfo=sysFileInfoService.ossUploadLocalFile(fileFullPath,billCode+"-cm.png","寄件底单图片");
|
SysFileInfo sysFileInfo=sysFileInfoService.ossUploadLocalFile(localFile.getAbsolutePath(),billCode+"-cm.png","寄件底单图片");
|
||||||
String fileUrl = sysFileInfo.getFileRemoteUrl();
|
String fileUrl = sysFileInfo.getFileRemoteUrl();
|
||||||
goodsPicAttachment.setFileUrl(fileUrl);
|
goodsPicAttachment.setFileUrl(fileUrl);
|
||||||
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment);
|
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(goodsPicAttachment);
|
||||||
|
// 删除本地文件
|
||||||
|
localFile.delete();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
log.debug("生成寄件图片信息失败");
|
log.debug("生成寄件图片信息失败");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user