|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
private void upLoadPdf(MsgBean msgBean, EInvoiceStatusVO statusvo) throws BusinessException {
String pdf = msgBean.getPdf();
if (!StringUtils.isEmpty(pdf)) {
byte[] data = org.apache.commons.codec.binary.Base64.decodeBase64(pdf.getBytes(Charset.forName(CharEncoding.UTF_8)));
InputStream input = new ByteArrayInputStream(data);
String fpHm = statusvo.getFphm();
String fpDM = statusvo.getFpdm();
String id = statusvo.getCsourcebillid();
FileHeader fileHeader = FileStorageClient.getInstance().uploadFile(
IAttachManageConst.RIAMoudleID,"电子发票_" + fpDM +"_"+ fpHm + ".pdf", input, true);
if (fileHeader != null) {
String pk_doc = fileHeader.getPath();
String name = fileHeader.getName();
long size1 = fileHeader.getFileSize();
IFileSystemService service = NCLocator.getInstance().lookup(IFileSystemService.class);
NCFileVO attach = new NCFileVO();
attach.setPath(name);
attach.setCreator(InvocationInfoProxy.getInstance().getUserId());
attach.setIsdoc("z");
attach.setFileLen(size1);
attach.setPk_doc(pk_doc);
service.createCloudFileNode(id, InvocationInfoProxy.getInstance().getUserId(), attach);
}
}
}
|
|