From 959a3e15699e4547706b05f07dff190b503d2390 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期五, 17 一月 2025 11:32:30 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject
---
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageController.java | 42 ------------------------------------------
1 files changed, 0 insertions(+), 42 deletions(-)
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageController.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageController.java
index d19b30f..19edaaa 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageController.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageController.java
@@ -2,29 +2,18 @@
import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO;
-import com.mes.hollow.entity.dto.LisecHollowDetails;
import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
import com.mes.hollow.service.HollowBigStorageCageService;
-import com.mes.utils.Blank;
import com.mes.utils.Result;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
-import freemarker.template.TemplateException;
-import freemarker.template.Version;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
-import java.io.*;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
/**
* (HollowBigStorageCage)琛ㄦ帶鍒跺眰
@@ -43,37 +32,6 @@
@PostMapping("/queryHollowBigStorageCageDetail")
public Result<List<HollowBigStorageAndDetailsDTO>> queryHollowBigStorageCageDetail(@RequestBody HollowBigStorageDetailsQueryVO query) {
return Result.build(200, "鏌ヨ鎴愬姛", hollowBigStorageCageService.queryHollowBigStorageCageDetail(query));
- }
-
- @PostMapping("/generate")
- public ResponseEntity<FileSystemResource> generate(@RequestBody LisecHollowDetails details) throws IOException, TemplateException {
-// 鍒涘缓鍜岄厤缃瓼reemarker閰嶇疆瀹炰緥
- Configuration cfg = new Configuration(new Version("2.3.29"));
- cfg.setClassForTemplateLoading(HollowBigStorageCageController.class, "/templates/");
- // 鍒涘缓Calculator瀹炰緥
- Blank blank = new Blank();
-
- // 鍒涘缓鏁版嵁妯″瀷
- Map<String, Object> root = new HashMap<>();
- root.put("blank", blank);
-
- root.put("details", details);
-
- // 鑾峰彇妯℃澘
- Template temp = cfg.getTemplate("hollowGlass.ftl");
-
-
- // 灏嗙敓鎴愮殑鏂囦欢瀛樺叆鎸囧畾璺緞
- //todo:璁$畻鐢熸垚鏉庤禌鍏嬮渶瑕佺殑鏁版嵁缁欏埌姣忎釜灞炴��
- StringWriter out = new StringWriter();
- File file = new File("D:\\temp", "temp.trf");
- try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
- temp.process(root, out);
- writer.write(out.toString());
- } catch (TemplateException | IOException e) {
- e.printStackTrace();
- }
- return null;
}
}
--
Gitblit v1.8.0