From a9406b6b18ee5a8e29cad3248f46320a36ac9749 Mon Sep 17 00:00:00 2001 From: yyt <306727702@qq.com> Date: 星期三, 21 二月 2024 00:19:44 +0800 Subject: [PATCH] 批量数据采集方法更新 --- jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java | 21 ++++++++++++++++++++- 1 files changed, 20 insertions(+), 1 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java index f6e8baf..fc65d8f 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java @@ -3,7 +3,9 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.jcdm.main.da.opcuaconfig.client.ClientHandler; import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig; +import com.jcdm.main.da.opcuaconfig.domain.NodeEntity; import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -26,7 +28,7 @@ * 浜や簰淇″彿閰嶇疆Controller * * @author yyt - * @date 2024-01-22 + * @date 2024-01-23 */ @RestController @RequestMapping("/da/opcuaconfig") @@ -102,4 +104,21 @@ { return toAjax(daOpcuaConfigService.deleteDaOpcuaConfigByIds(ids)); } + + /** + * 鑾峰彇浜や簰淇″彿閰嶇疆璇︾粏淇℃伅 + */ + @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')") + @GetMapping(value = "/SNCode/{SNCode}/{locationCode}") + public AjaxResult setSNCode(@PathVariable("SNCode") String SNCode,@PathVariable("locationCode") String locationCode) { + NodeEntity node= NodeEntity.builder().index(2).identifier("CFL4CVT"+"."+locationCode+".MesSNCode").value(SNCode).type("string").build(); + Boolean out= null; + try { + out = ClientHandler.write(node); + } catch (Exception e) { + throw new RuntimeException(e); + } + + return toAjax(out); + } } -- Gitblit v1.9.3