From c6d1522ee9c18f3148dc2c6f142d2a2f05ae6905 Mon Sep 17 00:00:00 2001 From: ludj Date: Thu, 2 Feb 2023 13:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acs/nladmin-system/pom.xml | 5 +++++ .../org/nl/system/service/quartz/utils/ExecutionJob.java | 2 ++ .../java/org/nl/wms/sch/manage/AutoQueryDeviceStatus.java | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/acs/nladmin-system/pom.xml b/acs/nladmin-system/pom.xml index 264114491..e02d8fb42 100644 --- a/acs/nladmin-system/pom.xml +++ b/acs/nladmin-system/pom.xml @@ -34,6 +34,11 @@ + + org.bouncycastle + bcprov-jdk15on + 1.50 + org.apache.commons diff --git a/lms/nladmin-system/src/main/java/org/nl/system/service/quartz/utils/ExecutionJob.java b/lms/nladmin-system/src/main/java/org/nl/system/service/quartz/utils/ExecutionJob.java index f6416000e..f24515c21 100644 --- a/lms/nladmin-system/src/main/java/org/nl/system/service/quartz/utils/ExecutionJob.java +++ b/lms/nladmin-system/src/main/java/org/nl/system/service/quartz/utils/ExecutionJob.java @@ -12,6 +12,7 @@ import org.nl.system.service.quartz.dao.SysQuartzJob; import org.nl.system.service.quartz.dao.SysQuartzLog; import org.nl.system.service.quartz.dao.mapper.SysQuartzLogMapper; import org.nl.system.service.quartz.impl.SysQuartzJobServiceImpl; +import org.quartz.DisallowConcurrentExecution; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.scheduling.annotation.Async; @@ -28,6 +29,7 @@ import java.util.concurrent.ThreadPoolExecutor; @Async @SuppressWarnings({"unchecked", "all"}) @Slf4j +@DisallowConcurrentExecution public class ExecutionJob extends QuartzJobBean { /** diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/AutoQueryDeviceStatus.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/AutoQueryDeviceStatus.java index 42e2b6347..d441c92a7 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/AutoQueryDeviceStatus.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/AutoQueryDeviceStatus.java @@ -19,13 +19,14 @@ public class AutoQueryDeviceStatus{ //通过ACS接口获取温度 JSONArray device_rows = WQL.getWO("PDA_02").addParam("flag","15").process().getResultJSONArray(0); JSONObject jo = wmsToAcsService.getPointStatus(device_rows); + WQLObject ivtTab=WQLObject.getWQLObject("st_ivt_hotpointivt"); JSONArray de_rows = jo.getJSONArray("data"); for (int i = 0; i < de_rows.size(); i++) { JSONObject row = de_rows.getJSONObject(i); String device_code = row.getString("device_code"); - JSONObject point_jo = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '"+device_code+"'").uniqueResult(0); + JSONObject point_jo = ivtTab.query("point_code = '"+device_code+"'").uniqueResult(0); point_jo.put("temperature",row.getString("temperature")); - WQLObject.getWQLObject("st_ivt_hotpointivt").update(point_jo); + ivtTab.update(point_jo); } } }