|
|
|
@ -4,13 +4,12 @@ import core.operation.UploadFile;
|
|
|
|
|
import error.GExcptInit;
|
|
|
|
|
import error.GExcptSQL;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
public class C_StudentUploadFinishedProduct extends C_UploadFile {
|
|
|
|
|
|
|
|
|
|
File finishedProduct;
|
|
|
|
|
String finishedProductURL;
|
|
|
|
|
String graduationDesignId;
|
|
|
|
|
private static String buttonName ="提交定稿";
|
|
|
|
|
private static String iconURL="../cssFile/images/upload.png";
|
|
|
|
@ -21,11 +20,11 @@ public class C_StudentUploadFinishedProduct extends C_UploadFile {
|
|
|
|
|
private static String field ="finished_product_status";
|
|
|
|
|
|
|
|
|
|
static String file_type = "finished_product";
|
|
|
|
|
public void uploadOpeningReport() throws Exception{
|
|
|
|
|
public void uploadFinishedProduct() throws Exception{
|
|
|
|
|
if(!check()) throw new GExcptInit("Upload FinishedProduct Attrs init error!");
|
|
|
|
|
UploadFile uploadFile=new UploadFile();
|
|
|
|
|
uploadFile.setOptions(new HashMap<>());
|
|
|
|
|
uploadFile.addOptions("file",this.getFinishedProduct());
|
|
|
|
|
uploadFile.addOptions("file_url",this.getFinishedProductURL());
|
|
|
|
|
uploadFile.addOptions("file_type",file_type);
|
|
|
|
|
Map<String, String>limits = new HashMap<>();
|
|
|
|
|
limits.put("id",this.getGraduationDesignId());
|
|
|
|
@ -35,16 +34,16 @@ public class C_StudentUploadFinishedProduct extends C_UploadFile {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected boolean check() {
|
|
|
|
|
if(this.getFinishedProduct()==null||this.getGraduationDesignId()==null)
|
|
|
|
|
if(this.getFinishedProductURL()==null||this.getGraduationDesignId()==null)
|
|
|
|
|
return false;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
public File getFinishedProduct() {
|
|
|
|
|
return finishedProduct;
|
|
|
|
|
public String getFinishedProductURL() {
|
|
|
|
|
return finishedProductURL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFinishedProduct(File finishedProduct) {
|
|
|
|
|
this.finishedProduct = finishedProduct;
|
|
|
|
|
public void setFinishedProductURL(String finishedProductURL) {
|
|
|
|
|
this.finishedProductURL = finishedProductURL;
|
|
|
|
|
}
|
|
|
|
|
public String getGraduationDesignId() {
|
|
|
|
|
return graduationDesignId;
|
|
|
|
|