检查C_Process

hechu1
zhai_lw 6 years ago
parent 1041dcc64f
commit a02f896fc4

@ -10,7 +10,6 @@ import java.util.Map;
public class C_CollegeFillOpeningReportOpinion extends TempProcess{
String graduationDesignId;
String opening_report_college_teacher_id;
Map<String,String> vMap;
static String table="graduation_design_opening_report_opinion_record";
@ -29,7 +28,7 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{
fillInformation.execute(null);
}
protected boolean check() {
if(this.getOpening_report_college_teacher_id()==null||this.getGraduationDesignId()==null)
if(this.getGraduationDesignId()==null||this.getVMap()==null)
return false;
return true;
}
@ -41,16 +40,11 @@ public class C_CollegeFillOpeningReportOpinion extends TempProcess{
this.graduationDesignId = graduationDesignId;
}
public String getOpening_report_college_teacher_id() {
return opening_report_college_teacher_id;
}
public void setOpening_report_college_teacher_id(String opening_report_college_teacher_id) {
this.opening_report_college_teacher_id = opening_report_college_teacher_id;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
public Map<String, String> getVMap() {
return vMap;
}
}

@ -16,13 +16,13 @@ public class C_CollegeFillScoreOpinion extends TempProcess{
static String table="graduation_design_reply_opinion_record_score";
public void fillInformation() throws Exception{
if(!check()) throw new GExcptInit("FillInformations Attrs Init error!");
if(!check()) throw new GExcptInit("FillInformation Attrs Init error!");
FillInformation fillInformation=new FillInformation();
fillInformation.setOptions(new HashMap<>());
fillInformation.addOptions("table",table);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-ddHH:mm:ss");
String date=df.format(new Date());
vMap.put("secretary_record_date",date);
vMap.put("college_opinion_date",date);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGraduationDesignId());
fillInformation.addOptions("limits",limits);

@ -50,7 +50,7 @@ public class C_MentorFillOpeningReportOpinion extends TempProcess{
this.mentor_opinion = mentor_opinion;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}
}

@ -41,7 +41,7 @@ public class C_SchoolFillScoreOpinion extends TempProcess {
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}

@ -43,7 +43,7 @@ public class C_SecretaryFillOpeningReportOpinion extends TempProcess{
this.graduationDesignId = graduationDesignId;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}

@ -16,7 +16,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
static String table="graduation_design_reply_opinion_record_score";
public void fillInformation() throws Exception{
if(!check()) throw new GExcptInit("FillInformations Attrs Init error!");
if(!check()) throw new GExcptInit("FillInformation Attrs Init error!");
FillInformation fillInformation=new FillInformation();
fillInformation.setOptions(new HashMap<>());
fillInformation.addOptions("table",table);
@ -42,7 +42,7 @@ public class C_SecretaryFillReplyRecord extends TempProcess{
this.graduationDesignId = graduationDesignId;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}

@ -39,7 +39,7 @@ public class C_StudentFillGraduationDesignInformation extends TempProcess{
this.graduationDesignId = graduationDesignId;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}

@ -10,7 +10,7 @@ import java.util.Map;
public class C_StudentUploadFinishedProduct {
File finishedProduct;
String gaduationDesignId;
String graduationDesignId;
static String file_type = "finished_product";
public void uploadOpeningReport() throws Exception{
@ -20,13 +20,13 @@ public class C_StudentUploadFinishedProduct {
uploadFile.addOptions("file",this.getFinishedProduct());
uploadFile.addOptions("file_type",file_type);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGaduationDesignId());
limits.put("id",this.getGraduationDesignId());
uploadFile.addOptions("limits",limits);
uploadFile.execute(null);
}
protected boolean check() {
if(this.getFinishedProduct()==null||this.getGaduationDesignId()==null)
if(this.getFinishedProduct()==null||this.getGraduationDesignId()==null)
return false;
return true;
}
@ -37,12 +37,12 @@ public class C_StudentUploadFinishedProduct {
public void setFinishedProduct(File finishedProduct) {
this.finishedProduct = finishedProduct;
}
public String getGaduationDesignId() {
return gaduationDesignId;
public String getGraduationDesignId() {
return graduationDesignId;
}
public void setGaduationDesignId(String gaduationDesignId) {
this.gaduationDesignId = gaduationDesignId;
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
}

@ -9,7 +9,7 @@ import java.util.Map;
public class C_StudentUploadOpeningReport extends TempProcess{
File openingReport;
String gaduationDesignId;
String graduationDesignId;
static String file_type = "opening_report";
@ -20,13 +20,13 @@ public class C_StudentUploadOpeningReport extends TempProcess{
uploadFileOperation.addOptions("file",this.getOpeningReport());
uploadFileOperation.addOptions("file_type",file_type);
Map<String, String>limits = new HashMap<>();
limits.put("id",this.getGaduationDesignId());
limits.put("id",this.getGraduationDesignId());
uploadFileOperation.addOptions("limits",limits);
uploadFileOperation.execute(null);
}
protected boolean check() {
if(this.getGaduationDesignId()==null||this.getOpeningReport()==null)
if(this.getGraduationDesignId()==null||this.getOpeningReport()==null)
return false;
return true;
}
@ -39,11 +39,11 @@ public class C_StudentUploadOpeningReport extends TempProcess{
this.openingReport = openingReport;
}
public String getGaduationDesignId() {
return gaduationDesignId;
public String getGraduationDesignId() {
return graduationDesignId;
}
public void setGaduationDesignId(String gaduationDesignId) {
this.gaduationDesignId = gaduationDesignId;
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
}

@ -43,7 +43,7 @@ public class C_TeacherTeamFillOpeningReportOpinion extends TempProcess{
this.graduationDesignId = graduationDesignId;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}

@ -42,7 +42,7 @@ public class C_TeacherTeamFillScoreOpinion extends TempProcess {
public void setGraduationDesignId(String graduationDesignId) {
this.graduationDesignId = graduationDesignId;
}
public void setvMap(Map<String, String> vMap) {
public void setVMap(Map<String, String> vMap) {
this.vMap = vMap;
}

@ -1,5 +1,7 @@
package servlet;
import core.process.C_CollegeFillOpeningReportOpinion;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@ -13,7 +15,15 @@ public class S_CollegeFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
C_CollegeFillOpeningReportOpinion p =new C_CollegeFillOpeningReportOpinion();
p.setGraduationDesignId(id);
p.setVMap(vMap);
try {
p.fillInformation();
} catch (Exception e) {
e.printStackTrace();
response.sendRedirect("/op_fail.jsp");
}
}
static String[] vName = {
"college_opinion"

@ -1,5 +1,7 @@
package servlet;
import core.process.C_CollegeFillScoreOpinion;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
@ -13,6 +15,7 @@ public class S_CollegeFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
Map<String,String> vMap = servlet.Utils.getVMap(vName,request);
C_CollegeFillScoreOpinion p =new C_CollegeFillScoreOpinion();
}
static String[] vName = {

Loading…
Cancel
Save