package Servlet.Teacher;
import Entity.Grade.AdviserGrade;
import Entity.MyTableData;
import Entity.Process.Medium;
import Entity.Process.ReportDetail;
import Entity.Process.Task;
import Entity.Process.TaskDetail;
import Service.Teacher.Imp.ProcessServiceImp;
import Service.Teacher.ProcessService;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Created by IntelliJ IDEA.
* Author: Deng PengFei
* Date: 2021/8/23
* Time: 11:10
*/
@WebServlet(urlPatterns = {"/getPaper", "/addAssignment", "/getTaskById", "/addMedium", "/addGrade", "/getReportById"},name = "ProcessServlet")
public class ProcessServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String url = request.getRequestURI();
if ("/getPaper".equals(url)) {
getPaper(request, response);
} else if ("/addAssignment".equals(url)) {
addAssignment(request, response);
} else if ("/getTaskById".equals(url)) {
getTaskById(request, response);
} else if ("/addMedium".equals(url)) {
addMedium(request, response);
} else if ("/addGrade".equals(url)) {
addGrade(request, response);
} else if ("/getReportById".equals(url)) {
getReportById(request, response);
}
}
private void getReportById(HttpServletRequest request, HttpServletResponse response) throws IOException {
ProcessService processService = new ProcessServiceImp();
Integer id = Integer.parseInt(request.getParameter("id"));
ReportDetail reportDetail = processService.getReportDetailById(id);
String json = JSONObject.toJSONString(reportDetail, SerializerFeature.WriteMapNullValue);
PrintWriter out = response.getWriter();
out.print(json);
out.close();
}
/**
* 指导老师插入一条评分
*/
private void addGrade(HttpServletRequest request, HttpServletResponse response) throws IOException {
ProcessService processService = new ProcessServiceImp();
String TNO = request.getParameter("userName");
String gradeData = request.getParameter("gradeData");
JSONObject jsonObject = JSONObject.parseObject(gradeData);
String sno = jsonObject.getString("sNO");
String assignment = jsonObject.getString("assignmentt");
String report = jsonObject.getString("report");
String textPart = jsonObject.getString("textPart");
Integer paperWord = jsonObject.getInteger("wordSum");
String abstract1 = jsonObject.getString("abstract");
String checkAccept = jsonObject.getString("checkAndAccept");
String isTruant = jsonObject.getString("isTruant");
Integer truantDays = jsonObject.getInteger("truantDays");
String isReply = jsonObject.getString("isReply");
String remark = jsonObject.getString("remark");
Integer grade1 = jsonObject.getInteger("grade1");
Integer grade2 = jsonObject.getInteger("grade2");
Integer grade3 = jsonObject.getInteger("grade3");
Integer grade4 = jsonObject.getInteger("grade4");
Integer grade5 = jsonObject.getInteger("grade5");
Integer grade6 = jsonObject.getInteger("grade6");
AdviserGrade adviserGrade =
new AdviserGrade(null, sno, TNO, assignment, report, textPart, paperWord, abstract1, checkAccept,
isTruant, truantDays, isReply, remark, grade1, grade2, grade3, grade4, grade5, grade6, "审核中", null);
Boolean flag = processService.addAdviserGrade(adviserGrade);
PrintWriter out = response.getWriter();
out.print(flag);
out.close();
}
/**
* 指导老师提交一条中期检查
*/
private void addMedium(HttpServletRequest request, HttpServletResponse response) throws IOException {
ProcessService processService = new ProcessServiceImp();
String TNO = request.getParameter("userName");
String mediumData = request.getParameter("mediumData");
JSONObject jsonObject = JSONObject.parseObject(mediumData);
String sno = jsonObject.getString("SNO");
String isChange = jsonObject.getString("isChange");
String changeReason = jsonObject.getString("ChangeReason");
String isOne = jsonObject.getString("isOne");
String isReport = jsonObject.getString("isReport");
String isSurvey = jsonObject.getString("isSurvey");
String problem = jsonObject.getString("ques");
String plan = jsonObject.getString("plan");
String lagReason = jsonObject.getString("plan-reason");
String sManner = jsonObject.getString("stuManner");
String tManner = jsonObject.getString("tManner");
String quality = jsonObject.getString("quality");
Medium medium =
new Medium(sno, TNO, isChange, changeReason, isOne, isReport, isSurvey, problem, plan, lagReason, sManner, tManner, quality, null, null, "审核中");
Boolean flag = processService.addMedium(medium);
PrintWriter out = response.getWriter();
out.print(flag);
out.close();
}
/**
* 通过任务书ID获取任务书详情
*/
private void getTaskById(HttpServletRequest request, HttpServletResponse response) throws IOException {
ProcessService processService = new ProcessServiceImp();
Integer id = Integer.parseInt(request.getParameter("id"));
TaskDetail taskDetail = processService.getTaskDetailById(id);
String json = JSONObject.toJSONString(taskDetail, SerializerFeature.WriteMapNullValue);
PrintWriter out = response.getWriter();
out.print(json);
out.close();
}
/**
* 根据论文的不同阶段查询论文
*/
protected void getPaper(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
ProcessService processService = new ProcessServiceImp();
int page = Integer.parseInt(request.getParameter("page"));
int limit = Integer.parseInt(request.getParameter("limit"));
int offset = (page - 1) * limit;
int type = Integer.parseInt(request.getParameter("type"));
String state = request.getParameter("state");
String tNO = request.getParameter("userName");
String queryKey = request.getParameter("queryKey");
if (queryKey == null || "".equals(queryKey)) {
queryKey = "";
}
queryKey = "%" + queryKey + "%";
MyTableData myTableData = processService.getAllPaper(queryKey, offset, limit, tNO, state, type);
String json = JSONObject.toJSONString(myTableData, SerializerFeature.WriteMapNullValue);
PrintWriter out = response.getWriter();
out.print(json);
out.close();
}
/**
* 指导老师下达任务书
*/
protected void addAssignment(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
ProcessService processService = new ProcessServiceImp();
String TNO = request.getParameter("userName");
String assData = request.getParameter("assData");
JSONObject jsonData = JSONObject.parseObject(assData);
String title = jsonData.get("title").toString();
String collname = jsonData.get("college").toString();
String mname = json
没有合适的资源?快使用搜索试试~ 我知道了~
基于原生JavaWeb技术与JavaScript的毕设管理系统设计源码
共449个文件
java:142个
jsp:104个
js:100个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 200 浏览量
2024-10-10
09:38:49
上传
评论
收藏 33.6MB ZIP 举报
温馨提示
本项目为基于原生JavaWeb技术与JavaScript的毕设管理系统设计源码,包含450个文件,涵盖142个Java源代码文件、104个JSP页面文件、100个JavaScript文件、26个XML配置文件、18个PNG图片文件、10个CSS样式文件、6个属性文件、6个文档文件、6个GIF图片文件以及4个Markdown文件。系统旨在提供高效的毕设管理功能,适用于相关教学与科研需求。
资源推荐
资源详情
资源评论
收起资源包目录
基于原生JavaWeb技术与JavaScript的毕设管理系统设计源码 (449个子文件)
layui.css 78KB
layui.css 78KB
layer.css 14KB
layer.css 14KB
laydate.css 7KB
laydate.css 7KB
login.css 2KB
login.css 2KB
code.css 1KB
code.css 1KB
poseal.db 243KB
poseal.db 243KB
20180210440317.doc 12KB
20180210440317.doc 12KB
20180210440317.doc 12KB
20180210440317.doc 10KB
test2.docx 4.46MB
test2.docx 4.46MB
test2.docx 4.46MB
test2.docx 4.46MB
test2.docx 4.46MB
test2.docx 4.46MB
iconfont.eot 46KB
iconfont.eot 46KB
loading-0.gif 6KB
loading-0.gif 6KB
loading-2.gif 2KB
loading-2.gif 2KB
loading-1.gif 701B
loading-1.gif 701B
.gitignore 278B
.gitignore 176B
paperSystem.iml 2KB
ProcessServlet.java 9KB
AccountServlet.java 9KB
FileServiceImp.java 9KB
FileServlet.java 8KB
ProcessServiceImp.java 8KB
GradeServiceImp.java 8KB
AdminCountDaoImp.java 8KB
StudentPaperDaoImp.java 8KB
CheckDataServiceImp.java 7KB
MediumDaoImp.java 7KB
MsgAndEmailServlet.java 7KB
GradeServlet.java 7KB
GroupGradeDaoImp.java 7KB
MsgAndEmailServiceImp.java 6KB
GradingManagementDaoImp.java 6KB
LoginServiceImp.java 6KB
AccountUpdateDaoImp.java 6KB
TaskDetailDaoImp.java 6KB
StageCheckDaoImp.java 6KB
LoginServlet.java 6KB
StuInfoDaoImp.java 6KB
ReplyGroupServiceImp.java 6KB
PaperDaoImp.java 6KB
TitleDaoImp.java 5KB
TeacherDaoImp.java 5KB
ReplyGroupDaoImp.java 5KB
StudentPaperServiceImp.java 5KB
FinalGradeDaoImp.java 5KB
StudentTitleServlet.java 5KB
StudentPaperServlet.java 4KB
StudentTitleDaoImp.java 4KB
GradingManagementServlet.java 4KB
AdviserGradeDaoImp.java 4KB
TitleAndPaperServlet.java 4KB
AdminCountServlet.java 4KB
TitleManagementDaoImp.java 4KB
EmailDaoImp.java 4KB
FileUtil.java 4KB
TaskDaoImp.java 4KB
GradingDaoImp.java 4KB
ReplyServlet.java 3KB
StageTimeServlet.java 3KB
AdminDaoImp.java 3KB
AccountServiceImp.java 3KB
GradingManagementServiceImp.java 3KB
StudentDaoImp.java 3KB
ReportDaoImp.java 3KB
TitleManegementServlet.java 3KB
StageTimeDaoImp.java 3KB
CheckServlet.java 3KB
EmailUtil.java 3KB
ReportDetailDaoImp.java 3KB
TitleAndPaperServiceImp.java 2KB
MessageDaoImp.java 2KB
AdminCountServiceImp.java 2KB
StudentTitleServiceImp.java 2KB
HomeServlet.java 2KB
StuSumServiceImp.java 2KB
StuSumServlet.java 2KB
AccountService.java 2KB
MsgAndEmailService.java 2KB
AllStudentDaoImp.java 2KB
ProcessService.java 2KB
AllTeacherDaoImp.java 2KB
GradingManagementDao.java 2KB
StageCheckDao.java 2KB
GradeService.java 2KB
共 449 条
- 1
- 2
- 3
- 4
- 5
资源评论
csbysj2020
- 粉丝: 2438
- 资源: 5456
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功