From 54b067a61093c5c8b5620dab0487c1231395dd78 Mon Sep 17 00:00:00 2001
From: zhanghl <253316343@qq.com>
Date: 星期一, 12 五月 2025 11:17:17 +0800
Subject: [PATCH] 优化从Redis 获取工艺路线和库存信息
---
aps-modules/aps-job/src/main/java/com/aps/job/controller/SysJobController.java | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/aps-modules/aps-job/src/main/java/com/aps/job/controller/SysJobController.java b/aps-modules/aps-job/src/main/java/com/aps/job/controller/SysJobController.java
index 46c1747..a5210b1 100644
--- a/aps-modules/aps-job/src/main/java/com/aps/job/controller/SysJobController.java
+++ b/aps-modules/aps-job/src/main/java/com/aps/job/controller/SysJobController.java
@@ -1,7 +1,6 @@
package com.aps.job.controller;
import com.aps.common.core.constant.Constants;
-import com.aps.common.core.constant.SecurityConstants;
import com.aps.common.core.exception.job.TaskException;
import com.aps.common.core.utils.StringUtils;
import com.aps.common.core.utils.poi.ExcelUtil;
@@ -20,6 +19,7 @@
import jakarta.servlet.http.HttpServletResponse;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
@@ -59,7 +59,14 @@
private IApsMaterialStorageManagementJobService apsMaterialStorageManagementJobService;
@Autowired
+ private IApsStandardProcessRouteHeaderJobService apsStandardProcessRouteHeaderJobService;
+
+ @Autowired
private RemoteCoreService remoteCoreService;
+
+ @Autowired
+ public RedisTemplate redisTemplate;
+
/**
* 鏌ヨ瀹氭椂浠诲姟鍒楄〃
*/
@@ -210,12 +217,21 @@
return apsBomHeaderJobService.syncBomDataJob(1, 1000, "", "");
}
+ @PostMapping("/refreshProcessRouteData")
+ public Boolean refreshProcessRouteData() throws SchedulerException, TaskException
+ {
+ return apsStandardProcessRouteHeaderJobService.syncProcessRouteDataJob(1, 1000, "", "");
+ }
+
@PutMapping("/test")
public void test(@RequestBody SysJob job) throws Exception
{
System.out.println("start");
+ apsStandardProcessRouteHeaderJobService.syncProcessRouteData(159, 1000, "", "");
+ //鑾峰彇Redis缂撳瓨涓殑BOM鏁版嵁
+// JSONArray jsonArray = (JSONArray)redisTemplate.opsForValue().get("BOM:BOM_FORTUNA_A6501-001080");
//灏咮OM鏁版嵁瀛樿繘Redis涓�
- remoteCoreService.setBomDataToRedis(SecurityConstants.INNER);
+// remoteCoreService.setBomDataToRedis(SecurityConstants.INNER);
//鍚屾鐗╂枡搴撳瓨鏁版嵁
// apsMaterialStorageManagementJobService.syncApsMaterialStorageData(1, 1000, "", "");
//鍚屾BOM鏁版嵁
--
Gitblit v1.9.3