租赁协议
This commit is contained in:
		
							parent
							
								
									97c7285ac3
								
							
						
					
					
						commit
						ddd905b9f1
					
				| 
						 | 
				
			
			@ -218,23 +218,7 @@ public class OrderController extends BaseController {
 | 
			
		|||
        document.write(outputStream);
 | 
			
		||||
        byte[] wordBytes = outputStream.toByteArray();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        // Convert Word to Image (simple example using BufferedImage)
 | 
			
		||||
/*        BufferedImage image = new BufferedImage(800, 600, BufferedImage.TYPE_INT_RGB);
 | 
			
		||||
        Graphics2D graphics = image.createGraphics();
 | 
			
		||||
        graphics.setPaint(Color.white);
 | 
			
		||||
        graphics.fillRect(0, 0, image.getWidth(), image.getHeight());
 | 
			
		||||
        graphics.setPaint(Color.black);
 | 
			
		||||
        graphics.drawString(new String(wordBytes), 10, 20);
 | 
			
		||||
        graphics.dispose();*/
 | 
			
		||||
        MultipartFile file = new MockMultipartFile("contract", "contract.docx", MediaType.APPLICATION_OCTET_STREAM_VALUE, wordBytes);
 | 
			
		||||
        AjaxResult upload = sysFileService.upload(file);
 | 
			
		||||
        return upload;
 | 
			
		||||
//        HttpHeaders headers = new HttpHeaders();
 | 
			
		||||
//        headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
 | 
			
		||||
//        headers.setContentDispositionFormData("attachment", "contract.docx");
 | 
			
		||||
//        return ResponseEntity.ok()
 | 
			
		||||
//                .headers(headers)
 | 
			
		||||
//                .body(wordBytes);
 | 
			
		||||
        return sysFileService.upload(file);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue