Compare commits
No commits in common. "fa366de5e96deca245e430669c98cc555ad87c4d" and "1b06952d177f0f830be9cb628992e90adfd18571" have entirely different histories.
fa366de5e9
...
1b06952d17
|
@ -6,7 +6,6 @@ import kd.bos.dataentity.serialization.SerializationUtils;
|
||||||
import kd.bos.dataentity.utils.StringUtils;
|
import kd.bos.dataentity.utils.StringUtils;
|
||||||
import kd.bos.entity.datamodel.IDataModel;
|
import kd.bos.entity.datamodel.IDataModel;
|
||||||
import kd.bos.entity.plugin.Plugin;
|
import kd.bos.entity.plugin.Plugin;
|
||||||
import kd.bos.fileservice.FileServiceFactory;
|
|
||||||
import kd.bos.form.FormShowParameter;
|
import kd.bos.form.FormShowParameter;
|
||||||
import kd.bos.form.IFormView;
|
import kd.bos.form.IFormView;
|
||||||
import kd.bos.form.control.AttachmentPanel;
|
import kd.bos.form.control.AttachmentPanel;
|
||||||
|
@ -31,10 +30,9 @@ import kd.repc.recos.formplugin.measure.measureci.ReMeasureCIEditPlugin;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import shkd.repc.recos.domain.Calculation;
|
import shkd.repc.recos.domain.Calculation;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -83,17 +81,14 @@ public class RecosMeasurecosFormPlugin extends AbstractFormPlugin implements Upl
|
||||||
this.getView().showSuccessNotification("请先保存");
|
this.getView().showSuccessNotification("请先保存");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> attachments = AttachmentServiceHelper.getAttachments("recos_measurecost", this.getModel().getValue("id"), "attachmentpanelap");
|
|
||||||
// AttachmentPanel attachmentpanelap = this.getView().getControl("attachmentpanelap");
|
AttachmentPanel attachmentpanelap = this.getView().getControl("attachmentpanelap");
|
||||||
// List<Map<String, Object>> attachments = attachmentpanelap.getAttachmentData();
|
List<Map<String, Object>> attachments = attachmentpanelap.getAttachmentData();
|
||||||
for (Map<String, Object> attachment : attachments) {
|
for (Map<String, Object> attachment : attachments) {
|
||||||
AttachmentDto attachmentDto = AttachmentServiceHelper.getAttachmentInfoByAttPk(attachment.get("attPkId"));
|
AttachmentDto attachmentDto = AttachmentServiceHelper.getAttachmentInfoByAttPk(attachment.get("attPkId"));
|
||||||
String url = attachment.get("url").toString();
|
String fileUrl = attachmentDto.getResourcePath();//真实路径
|
||||||
// String fileUrl = attachmentDto.getResourcePath();//真实路径
|
|
||||||
try {
|
try {
|
||||||
URLConnection urlConnection = new URL(url).openConnection();
|
FileInputStream in = new FileInputStream(fileUrl);
|
||||||
InputStream in = urlConnection.getInputStream();
|
|
||||||
// FileInputStream in = new FileInputStream(fileUrl);
|
|
||||||
Workbook workbook = WorkbookFactory.create(in);
|
Workbook workbook = WorkbookFactory.create(in);
|
||||||
for (Sheet sheet : workbook) {
|
for (Sheet sheet : workbook) {
|
||||||
List<Calculation> arrayList = new ArrayList<>();//修改的集合
|
List<Calculation> arrayList = new ArrayList<>();//修改的集合
|
||||||
|
|
Loading…
Reference in New Issue