Merge remote-tracking branch 'remotes/origin/master' into hechu1

# Conflicts:
#	src/core/process/C_TeacherSearchStudent.java
#	web/jsFile/upload_action.js
hechu1
何楚 6 years ago
parent a1a3f84473
commit f52e6bd7ef

@ -17,14 +17,23 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content> </content>
<orderEntry type="jdk" jdkName="10" jdkType="JavaSDK" /> <orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Tomcat 8.5.37" level="application_server_libraries" /> <orderEntry type="library" scope="PROVIDED" name="Tomcat 9" level="application_server_libraries" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="module-library"> <orderEntry type="module-library">
<library> <library>
<CLASSES> <CLASSES>
<root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 8.5/lib/tomcat-jdbc.jar!/" /> <root url="file://$MODULE_DIR$/web/WEB-INF/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$MODULE_DIR$/web/WEB-INF/lib" recursive="false" />
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://C:/Program Files/Apache Software Foundation/Tomcat 9.0/lib/tomcat-jdbc.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />

@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("college-fill-opening-report-opinion") @WebServlet("/college-fill-opening-report-opinion")
public class S_CollegeFillOpeningReportOpinion extends HttpServlet { public class S_CollegeFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("college-fill-score-opinion") @WebServlet("/college-fill-score-opinion")
public class S_CollegeFillScoreOpinion extends HttpServlet { public class S_CollegeFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("mentor-fill-opening-report-opinion") @WebServlet("/mentor-fill-opening-report-opinion")
public class S_MentorFillOpeningReportOpinion extends HttpServlet { public class S_MentorFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("mentor-fill-review") @WebServlet("/mentor-fill-review")
public class S_MentorFillReview extends HttpServlet { public class S_MentorFillReview extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("reviewer-fill-review") @WebServlet("/reviewer-fill-review")
public class S_ReviewerFillReview extends HttpServlet { public class S_ReviewerFillReview extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("school-fill-score-opinion") @WebServlet("/school-fill-score-opinion")
public class S_SchoolFillScoreOpinion extends HttpServlet { public class S_SchoolFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("secretary-fill-opening-report-record") @WebServlet("/secretary-fill-opening-report-record")
public class S_SecretaryFillOpeningReportRecord extends HttpServlet { public class S_SecretaryFillOpeningReportRecord extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("secretary-fill-reply-record") @WebServlet("/secretary-fill-reply-record")
public class S_SecretaryFillReplyRecord extends HttpServlet { public class S_SecretaryFillReplyRecord extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -14,7 +14,16 @@ public class S_StudentUploadFinishedProduct extends HttpServlet {
static String fileType = "graduation_design_finished_product"; static String fileType = "graduation_design_finished_product";
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = "000"; String id = "000";
//String id = request.getParameter("id"); //String files = request.getParameter("file");
System.out.print("123");
System.out.print( request.getPart("file"));
System.out.print("123");
try {
String fileURL = servlet.Utils.saveFile(request, fileType); String fileURL = servlet.Utils.saveFile(request, fileType);
}catch (Exception e)
{
System.out.print(e);
}
System.out.print("222");
} }
} }

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("teacher-team-fill-opening-report-opinion") @WebServlet("/teacher-team-fill-opening-report-opinion")
public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet { public class S_TeacherTeamFillOpeningReportOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
@WebServlet("teacher-team-fill-score-opinion") @WebServlet("/teacher-team-fill-score-opinion")
public class S_TeacherTeamFillScoreOpinion extends HttpServlet { public class S_TeacherTeamFillScoreOpinion extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id"); String id = request.getParameter("id");

@ -39,7 +39,7 @@ public interface Utils {
return getFilePath(table)+getFileName(fileName); return getFilePath(table)+getFileName(fileName);
} }
static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException { static String saveFile(HttpServletRequest request, String table) throws IOException, ServletException {
Part part = request.getPart("graduation_design"); Part part = request.getPart("file");
String header = part.getHeader("content-disposition"); String header = part.getHeader("content-disposition");
String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1); String path = header.substring(header.indexOf("filename=") + 10, header.length() - 1);
String filePathName = servlet.Utils.getFilePathName(table,path); String filePathName = servlet.Utils.getFilePathName(table,path);

@ -1,5 +1,8 @@
<%@ page import="java.util.List" %> <%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%-- <%@ page import="java.util.ArrayList" %>
<%@ page import="core.user.User" %>
<%@ page import="core.process.Condition" %>
<%@ page import="core.process.Process" %><%--
Created by IntelliJ IDEA. Created by IntelliJ IDEA.
User: lenovo User: lenovo
Date: 2019/1/9 Date: 2019/1/9
@ -28,13 +31,14 @@
<script type="text/javascript" src="jsFile/sub-msg-input.js"></script> <script type="text/javascript" src="jsFile/sub-msg-input.js"></script>
</head> </head>
<body> <body>
<%String type="teacher";pageContext.setAttribute("userType",type);%> <%
<%List<String> list=new ArrayList<>(); User user=(User)session.getAttribute("user");
list.add("001"); String type=user.getType();
list.add("002"); pageContext.setAttribute("userType",type);
Condition condition=user.getCondition();
//List<Process> pList=condition.getProcesses();
int length=0;
int index=0; int index=0;
pageContext.setAttribute("list",list);
session.setAttribute("list",list);
%> %>
<div class="main"> <div class="main">
<div class="top-bar"> <div class="top-bar">

@ -6,17 +6,18 @@ $(document).ready(function () {
function sendFile() { function sendFile() {
var fileData =new FormData(); var fileData =new FormData();
var Url4='student-upload-finished-product'; var Url4='student-upload-finished-product';
var file=$('.true-select').files; var file=$('#select')[0].files[0];
if($('.true-select').val()=='') if($('.true-select').val()=='')
{ {
alert("请选择文件"); alert("请选择文件");
return; return;
} }
alert(file);
fileData.append("file",file); fileData.append("file",file);
$.ajax({ $.ajax({
type:"post", type:"post",
url:Url4, url:Url4,
date:fileData, data:fileData,
processData:false, processData:false,
contentType:false, contentType:false,
success:function (data,status) { success:function (data,status) {

@ -23,9 +23,11 @@
<span class="file-name" style="color: rgba(0,0,0,0.72)"> <span class="file-name" style="color: rgba(0,0,0,0.72)">
</span> </span>
</div> </div>
<div class="file-input-frame"><input class="true-select" type="file" accept="application/pdf" multiple="multiple"> <div class="file-input-frame">
<input class="true-select" id="select" type="file" accept="application/pdf" multiple="multiple">
<div class="upload-button select-file">选择文件</div> <div class="upload-button select-file">选择文件</div>
<div class="upload-button upload-it">上传文件</div></div> <div class="upload-button upload-it">上传文件</div>
</div>
</div> </div>
</div> </div>
</body> </body>

Loading…
Cancel
Save