|
@@ -7,6 +7,8 @@ import kd.bos.cache.CacheFactory;
|
|
|
import kd.bos.cache.TempFileCache;
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.exception.KDBizException;
|
|
|
+import kd.bos.fileservice.FileService;
|
|
|
+import kd.bos.fileservice.FileServiceFactory;
|
|
|
import kd.bos.form.control.AttachmentPanel;
|
|
|
import kd.bos.form.control.Toolbar;
|
|
|
import kd.bos.form.control.events.UploadEvent;
|
|
@@ -53,16 +55,9 @@ public class SalaryFileUploadEditPlugin extends AbstractBillPlugIn implements Up
|
|
|
// List<Map<String,Object>> attachmentData=attachmentPanel.getAttachmentData();
|
|
|
//获取最新上传的文件路径
|
|
|
String fileurl = evt.getUrls()[0]+"";
|
|
|
- File ff = new File(fileurl);
|
|
|
- //获取文件缓存
|
|
|
- TempFileCache cache = CacheFactory.getCommonCacheFactory().getTempFileCache();
|
|
|
- //从缓存中拿到输入流
|
|
|
- InputStream inputStream = null;
|
|
|
- try {
|
|
|
- inputStream = new FileInputStream(ff);
|
|
|
- } catch (FileNotFoundException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
+ FileService attService = FileServiceFactory.getAttachmentFileService();
|
|
|
+ InputStream inputStream = attService.getInputStream(fileurl);
|
|
|
+
|
|
|
String billtype="";
|
|
|
//根据分录类型获取对应分录标识
|
|
|
if ("A".equals(nckd_entrytype)) {
|