|
|
|
@ -25,19 +25,18 @@ import com.jfinal.plugin.activerecord.Page;
|
|
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
|
|
import com.jfinal.plugin.activerecord.tx.Tx;
|
|
|
|
|
import com.jfinal.upload.UploadFile;
|
|
|
|
|
import io.github.yedaxia.apidocs.ApiDoc;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.io.BufferedInputStream;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.FileInputStream;
|
|
|
|
|
import java.io.OutputStream;
|
|
|
|
|
import java.net.URI;
|
|
|
|
|
import java.net.URISyntaxException;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
@ApiDoc
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
public class GtzzController extends Controller {
|
|
|
|
|
//实例化model
|
|
|
|
@ -800,7 +799,8 @@ public class GtzzController extends Controller {
|
|
|
|
|
byte[] buf = new byte[1024];
|
|
|
|
|
int len;
|
|
|
|
|
response.reset(); // 非常重要
|
|
|
|
|
URL u = new URL("file:///" + filePath);
|
|
|
|
|
URI uri = new URI("file:///" + filePath);
|
|
|
|
|
URL u = uri.toURL();
|
|
|
|
|
response.setContentType(u.openConnection().getContentType());
|
|
|
|
|
String fileName = "项目单位验收单.pdf";
|
|
|
|
|
if (step_code.equals("0307")) fileName = "市级验收单.pdf";
|
|
|
|
@ -867,7 +867,8 @@ public class GtzzController extends Controller {
|
|
|
|
|
byte[] buf = new byte[1024];
|
|
|
|
|
int len;
|
|
|
|
|
response.reset(); // 非常重要
|
|
|
|
|
URL u = new URL("file:///" + filePath);
|
|
|
|
|
URI uri = new URI("file:///" + filePath);
|
|
|
|
|
URL u = uri.toURL();
|
|
|
|
|
response.setContentType(u.openConnection().getContentType());
|
|
|
|
|
String fileName = "项目评审单.pdf";
|
|
|
|
|
response.setHeader("Content-Disposition", "inline; filename=" + fileName);
|
|
|
|
|