From 91d7afedf3ea51ee87ee47d4da2e1b6243f8fb84 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期日, 05 一月 2025 21:50:21 +0800
Subject: [PATCH] 1、大理片笼进片任务新增数量校验,当收到进片请求时,拿电气的玻璃数量与mes接收到的数量作比较,相同继续执行,不相同结束本次任务 2、李赛克文件优化,合中空玻璃每个间隔框的类型可能不同,需要在界面上做选择 3、中空设备号与格子号不匹配bug解决 4、自动报工存在接口调用异常,临时将调用接口回退原版本,待最新接口调用无异常后更新接口 5、fixbug:中空大理片详情界面删除接口异常

---
 hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageController.java |   37 ++++++++++++++++---------------------
 1 files changed, 16 insertions(+), 21 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 b7e63b4..d19b30f 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,7 +2,7 @@
 
 
 import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO;
-import com.mes.hollow.entity.request.HollowTaskRequest;
+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;
@@ -15,12 +15,13 @@
 import io.swagger.annotations.ApiOperation;
 import org.springframework.core.io.FileSystemResource;
 import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
+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.IOException;
-import java.io.StringWriter;
-import java.util.ArrayList;
+import java.io.*;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -44,8 +45,8 @@
         return Result.build(200, "鏌ヨ鎴愬姛", hollowBigStorageCageService.queryHollowBigStorageCageDetail(query));
     }
 
-    @GetMapping("/generate")
-    public ResponseEntity<FileSystemResource> generate() throws IOException, TemplateException {
+    @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/");
@@ -55,29 +56,23 @@
         // 鍒涘缓鏁版嵁妯″瀷
         Map<String, Object> root = new HashMap<>();
         root.put("blank", blank);
-        HollowTaskRequest request = new HollowTaskRequest();
-        request.setCell(1);
-        request.setFlowCardId("1111");
-        List<HollowTaskRequest> list = new ArrayList<>();
-        list.add(request);
-        list.add(request);
-        list.add(request);
-        root.put("request", request);
-        root.put("list1", list);
+
+        root.put("details", details);
 
         // 鑾峰彇妯℃澘
         Template temp = cfg.getTemplate("hollowGlass.ftl");
 
-        // 鍚堝苟鏁版嵁妯″瀷鍜屾ā鏉�
+
+        // 灏嗙敓鎴愮殑鏂囦欢瀛樺叆鎸囧畾璺緞
+        //todo:璁$畻鐢熸垚鏉庤禌鍏嬮渶瑕佺殑鏁版嵁缁欏埌姣忎釜灞炴��
         StringWriter out = new StringWriter();
-        try {
+        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();
         }
-
-        // 杈撳嚭缁撴灉
-        System.out.println(out.toString());
         return null;
     }
 }

--
Gitblit v1.8.0