From fe82f1f9a9be911d1420fe3b018ea85dd5fff1a3 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期四, 21 十一月 2024 21:22:58 +0800
Subject: [PATCH] 代码整理

---
 collect/src/main/java/com/qianwen/mdc/collect/cache/WorkstationCache.java |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/collect/src/main/java/com/qianwen/mdc/collect/cache/WorkstationCache.java b/collect/src/main/java/com/qianwen/mdc/collect/cache/WorkstationCache.java
index dc91d11..7f40c31 100644
--- a/collect/src/main/java/com/qianwen/mdc/collect/cache/WorkstationCache.java
+++ b/collect/src/main/java/com/qianwen/mdc/collect/cache/WorkstationCache.java
@@ -107,12 +107,7 @@
     	}
     	return result;
     }
-    /*
-    public static Boolean clearWorkStationCache() {
-        String redisKey = "posting:workstation".concat("::").concat(WORKSTATION_ALL);
-        return bladeRedis.del(redisKey);
-    }
-    */
+  
     /**
      * 鑾峰彇鎸囧畾鏃ユ湡鐨勬棩鍘嗕唬鐮�
      * @param workstationId
@@ -135,15 +130,15 @@
         return calendarCode;
     }
 	
-    public GlobalWcsOfRps getWorkstationWcsSetting(Long workstationId, String code) {
+    public GlobalWcsOfRps getWorkstationWcsSetting(Long workstationId, String deviceStatusCode) {
         String redisKey = COLLECT_WORKSTATION.concat("::").concat(WORKSTATION_ID).concat(workstationId.toString()
             .concat(WCS_SETTING));
         
         //GlobalWcsOfRps wcsSetting = (GlobalWcsOfRps)redisUtil.hGet(redisKey, code);
-        GlobalWcsOfRps wcsSetting = (GlobalWcsOfRps)redisUtil.hget(redisKey, code);
+        GlobalWcsOfRps wcsSetting = (GlobalWcsOfRps)redisUtil.hget(redisKey, deviceStatusCode);
         if (wcsSetting == null) {
           wcsSetting = globalWcsOfRpsMapper.selectOne(Wrappers.<GlobalWcsOfRps>lambdaQuery()
-              .eq(GlobalWcsOfRps::getCode, code)
+              .eq(GlobalWcsOfRps::getCode, deviceStatusCode)
               .isNull(GlobalWcsOfRps::getPrecondition));
           if(wcsSetting == null) {
         	  wcsSetting = new GlobalWcsOfRps();
@@ -153,7 +148,7 @@
           //wcsSetting = Func.isNotEmpty(wcsSetting) ? wcsSetting : GlobalWcsOfRps.builder().rps(0).isPlan(0).build();
           //bladeRedis.hSet(redisKey, code, wcsSetting);
           //bladeRedis.expire(redisKey, Duration.ofDays(1L));
-          redisUtil.hset(redisKey, code, wcsSetting, Duration.ofDays(1L).getSeconds());
+          redisUtil.hset(redisKey, deviceStatusCode, wcsSetting, Duration.ofDays(1L).getSeconds());
         } 
         return wcsSetting;
       }

--
Gitblit v1.9.3