From c6e2ca10fb1fad52916227521263a9828d8f03a0 Mon Sep 17 00:00:00 2001 From: wan <2499498893@qq.com> Date: Mon, 14 Jan 2019 17:03:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'remotes/origin/hechu1' into wmj # Conflicts: # GDMS.iml --- .../process/C_StudentUploadOpeningReport.java | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/core/process/C_StudentUploadOpeningReport.java diff --git a/src/core/process/C_StudentUploadOpeningReport.java b/src/core/process/C_StudentUploadOpeningReport.java new file mode 100644 index 0000000..88ed26e --- /dev/null +++ b/src/core/process/C_StudentUploadOpeningReport.java @@ -0,0 +1,49 @@ +package core.process; + +import core.operation.UploadFileOperation; +import error.GExcptInit; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +public class C_StudentUploadOpeningReport extends TempProcess{ + File openingReport; + String gaduationDesignId; + + static String file_type = "opening_report"; + + public void uploadOpeningReport() throws Exception{ + if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!"); + UploadFileOperation uploadFileOperation=new UploadFileOperation(); + uploadFileOperation.setOptions(new HashMap<>()); + uploadFileOperation.addOptions("file",this.getOpeningReport()); + uploadFileOperation.addOptions("file_type",file_type); + Maplimits = new HashMap<>(); + limits.put("id",this.getGaduationDesignId()); + uploadFileOperation.addOptions("limits",limits); + uploadFileOperation.execute(null); + } + + protected boolean check() { + if(this.getGaduationDesignId()==null||this.getOpeningReport()==null) + return false; + return true; + } + + public File getOpeningReport() { + return openingReport; + } + + public void setOpeningReport(File openingReport) { + this.openingReport = openingReport; + } + + public String getGaduationDesignId() { + return gaduationDesignId; + } + + public void setGaduationDesignId(String gaduationDesignId) { + this.gaduationDesignId = gaduationDesignId; + } +}