|
@@ -58,7 +58,7 @@ public class MeasuringController extends SuperController<OrderQualityService, Lo
|
|
|
private String userName;
|
|
|
@Value("${zuihou.smb.password}")
|
|
|
private String password;
|
|
|
- @Value("${zuihou.smb.password}")
|
|
|
+ @Value("${zuihou.smb.fileIp}")
|
|
|
private String fileIp;
|
|
|
@Value("${zuihou.smb.filePath}")
|
|
|
private String filePath;
|
|
@@ -95,9 +95,13 @@ public class MeasuringController extends SuperController<OrderQualityService, Lo
|
|
|
public R<File> downloadFile(HttpServletResponse response, @RequestBody Map<String, Object> map) throws IOException, FileNotFoundException {
|
|
|
String id = map.get("id").toString();
|
|
|
|
|
|
- TTask task = tTaskMapper.selectById(id);
|
|
|
- String fileName = task.getCompleteBatchNo() + "_" + task.getProcedureNo() + ".csv";
|
|
|
- response.setHeader("content-type", "text/csv");
|
|
|
+ /*TTask task = tTaskMapper.selectById(id);
|
|
|
+ String fileName = task.getCompleteBatchNo() + "_" + task.getProcedureNo() + ".csv";*/
|
|
|
+
|
|
|
+ OrderQuality orderQuality = baseService.getById(id);
|
|
|
+ String fileName = orderQuality.getMeasuringReport();
|
|
|
+
|
|
|
+ response.setHeader("content-type", "application/pdf");
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
|
byte[] buff = new byte[1024];
|