package core.process; import core.operation.FillInformation; import error.GExcptInit; import org.w3c.dom.Text; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; public class C_TeacherFillTopicInformation extends TempProcess{ String StudentId; String mentor_opinion; Date mentor_opinion_date; static String table="graduation_design_opening_report_opinion_record"; public void fillInformation() throws Exception{ if(!check()) throw new GExcptInit("FillInformation Attrs init error!"); FillInformation fillInformation=new FillInformation(); fillInformation.setOptions(new HashMap<>()); fillInformation.addOptions("table",table); String date= mentor_opinion_date.toString(); Map vMap=new HashMap<>(); vMap.put("mentor_opinion_date",date); vMap.put("mentor_opinion",this.getMentor_opinion()); Maplimits = new HashMap<>(); limits.put("id",this.getStudentId()); fillInformation.addOptions("limits",limits); fillInformation.execute(null); } protected boolean check() { if(this.getMentor_opinion()==null||this.getMentor_opinion_date()==null||this.getStudentId()==null) return false; return true; } public String getStudentId() { return StudentId; } public void setStudentId(String studentId) { StudentId = studentId; } public String getMentor_opinion() { return mentor_opinion; } public void setMentor_opinion(String mentor_opinion) { this.mentor_opinion = mentor_opinion; } public Date getMentor_opinion_date() { return mentor_opinion_date; } public void setMentor_opinion_date(Date mentor_opinion_date) { this.mentor_opinion_date = mentor_opinion_date; } }