5系列
就是要注意对附件,使用jdk自带工具,进行压缩后保存(否则nc端打开附件会出现乱码)
AttachmentVO attachmentVO = new AttachmentVO();
attachmentVO.setPk_corp(info.getString("pk_corp"));
attachmentVO.setPk_user(info.getString("pk_user"));
attachmentVO.setUpload_date(new UFDate());
attachmentVO.setAttachment_name(strFileName);
attachmentVO.setPk_object(billid);
attachmentVO.setObject_type("hi_stapplyb_h");
attachmentVO.setView_times(Integer.valueOf(0));
attachmentVO.setStatus(2);
int iAttachmentSize = iFileLength / 1024;
attachmentVO.setAttachment_size(Integer.valueOf(iAttachmentSize != 0 ? iAttachmentSize : 1));
attachmentVO.setAttachment(parseByte);
PubDelegator.getIAttachment().upload(attachmentVO);
注意单据的附件字段值需要自己进行跟新
具体的方法可参考AttachmentDialog
6系列
进行附件查询的伪sql(版本差异略有不同,但数据库表就是以下几张了):
select sm_filestoreview.FILEDATA from
SM_PUB_FILESYSTEM.pk_doc = sm_document_file.pk_file
sm_document_file.pk_file = sm_document_version.pk_f

在5系列中,处理NC附件需要使用JDK工具进行压缩后再保存,以防止出现乱码问题。需手动更新单据的附件字段。6系列涉及附件查询的SQL,通过连接多个表来获取附件数据。此外,还介绍了如何通过上传接口和调用FileManageServlet进行外部文件上传,并提供了相关参数设置和方法引用。
最低0.47元/天 解锁文章
1481

被折叠的 条评论
为什么被折叠?



