You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.7 KiB
53 lines
1.7 KiB
package core.process;
|
|
|
|
import core.operation.UploadFile;
|
|
import error.GExcptInit;
|
|
|
|
import java.io.File;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
public class C_StudentUploadOpeningReport extends TempProcess{
|
|
File openingReport;
|
|
String graduationDesignId;
|
|
private static String buttonName ="提交开题报告";
|
|
static String file_type = "opening_report";
|
|
protected static String iconURL="../cssFile/images/upload.png";
|
|
protected static String targetURL="/home/student-upload-opening-report";
|
|
protected static String iconURL="../cssFile/images/upload.png";
|
|
|
|
public void uploadOpeningReport() throws Exception{
|
|
if(!check()) throw new GExcptInit("Upload OpeningReport Attrs init error!");
|
|
UploadFile uploadFileOperation=new UploadFile();
|
|
uploadFileOperation.setOptions(new HashMap<>());
|
|
uploadFileOperation.addOptions("file",this.getOpeningReport());
|
|
uploadFileOperation.addOptions("file_type",file_type);
|
|
Map<String, String>limits = new HashMap<>();
|
|
limits.put("id",this.getGraduationDesignId());
|
|
uploadFileOperation.addOptions("limits",limits);
|
|
uploadFileOperation.execute(null);
|
|
}
|
|
|
|
protected boolean check() {
|
|
if(this.getGraduationDesignId()==null||this.getOpeningReport()==null)
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
public File getOpeningReport() {
|
|
return openingReport;
|
|
}
|
|
|
|
public void setOpeningReport(File openingReport) {
|
|
this.openingReport = openingReport;
|
|
}
|
|
|
|
public String getGraduationDesignId() {
|
|
return graduationDesignId;
|
|
}
|
|
|
|
public void setGraduationDesignId(String graduationDesignId) {
|
|
this.graduationDesignId = graduationDesignId;
|
|
}
|
|
}
|