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