From 81826e66f68a37486516ee93c4e11d92a00c3fb6 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 21 十二月 2023 14:43:21 +0800
Subject: [PATCH] 增加清除id调用终止出片任务
---
CanadaMes-ui/src/views/home/index.vue | 2
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java | 134 ++++++++++++++++++
springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java | 22 +-
springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java | 59 ++++++++
springboot-vue3/src/main/resources/com/example/springboot/mapper/DeviceMapper.xml | 62 ++++----
springboot-vue3/src/main/java/com/example/springboot/component/S7control.java | 12 +
CanadaMes-ui/src/configuration/parameter2.json | 120 +++++++++++-----
springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java | 7
CanadaMes-ui/src/lang/locales/zh-CN.json | 2
9 files changed, 329 insertions(+), 91 deletions(-)
diff --git a/CanadaMes-ui/src/configuration/parameter2.json b/CanadaMes-ui/src/configuration/parameter2.json
index fcc0f7a..b181b8c 100644
--- a/CanadaMes-ui/src/configuration/parameter2.json
+++ b/CanadaMes-ui/src/configuration/parameter2.json
@@ -3,7 +3,8 @@
{
"button": {
"name": "D01鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -11,7 +12,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -21,14 +23,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "D02鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -36,7 +40,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -46,14 +51,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "D03鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -61,7 +68,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -71,14 +79,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "D04鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -86,7 +96,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -96,14 +107,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "D05鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -111,7 +124,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -121,14 +135,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "D06鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -136,7 +152,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -146,14 +163,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "A01鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -161,7 +180,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -171,14 +191,16 @@
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
},
{
"name": "ID2",
"read": 33,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
@@ -187,7 +209,8 @@
{
"button": {
"name": "A02鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -195,7 +218,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "3"
@@ -205,14 +229,16 @@
"read": "ID28",
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "B01鎵嬪姩鐘舵��",
- "value": 0
+ "value": 0,
+"value2": 0
},
"type": "4"
@@ -220,7 +246,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0
+ "value": 0,
+"value2": 0
},
"type": "3"
@@ -230,14 +257,16 @@
"read": "ID29",
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
{
"button": {
"name": "B02鎵嬪姩鐘舵��",
- "value": 0,
+ "value": 0,
+"value2": 0,
"address": "DB10.0"
},
"type": "4"
@@ -245,7 +274,8 @@
{
"button": {
"name": "娓呴櫎ID",
- "value": 0
+ "value": 0,
+"value2": 0
},
"type": "3"
@@ -255,7 +285,8 @@
"read": "ID210",
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
@@ -264,14 +295,16 @@
"read": 0,
"sending": 0,
- "value": 0
+ "value": 0,
+"value2": 0
},
{
"name": "ID1",
"read": 66,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
@@ -280,14 +313,16 @@
"read": 0,
"sending": 0,
- "value": 0
+ "value": 0,
+"value2": 0
},
{
"name": "ID2",
"read": 666,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
],
[
@@ -296,28 +331,32 @@
"read": 333,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
},
{
"name": "A02鎵�鍦ㄦ牸瀛�",
"read": 333,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
},
{
"name": "B01鎵�鍦ㄦ牸瀛�",
"read": 333,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
},
{
"name": "B02鎵�鍦ㄦ牸瀛�",
"read": 333,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
]
,
@@ -351,7 +390,8 @@
"read": 666,
"sending": 0,
"type": "0",
- "value": 0
+ "value": 0,
+"value2": 0
}
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index f199688..58a4f8a 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -1,5 +1,5 @@
{
- "ip": "192.168.10.113",
+ "ip": "localhost",
"systemTitle": "鐧诲綍绯荤粺",
"usernamePlaceholder": "璇疯緭鍏ョ敤鎴峰悕",
"passwordPlaceholder": "璇疯緭鍏ュ瘑鐮�",
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index edc7ed8..c6d05d1 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -1654,7 +1654,7 @@
});
}
,
- cellStyle({ row, column, rowIndex, columnIndex }) {
+ cellStyle({ column, rowIndex, columnIndex }) {
// console.log(row, column, "ss");
column = rowIndex;
rowIndex = column;
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java b/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java
index efcf9b6..1661078 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java
@@ -152,4 +152,63 @@
System.err.println("An error occurred while writing string to PLC: " + e.getMessage());
}
}
+
+
+
+ public void writeBitandrenwuToPLC(JSONArray messageArray, List<String> addresses, int index) {
+ try {
+ // 妫�鏌ョ储寮曟槸鍚︽湁鏁�
+ if (messageArray.getJSONArray(index).size() > 0) {
+ // 鑾峰彇娑堟伅鏁扮粍
+ JSONArray jsonArray = messageArray.getJSONArray(index);
+ // 鍒涘缓涓�涓竷灏斿�煎垪琛�
+ List<Boolean> sValue = new ArrayList<>();
+ // 閬嶅巻娑堟伅鏁扮粍
+ for (int i = 0; i < jsonArray.size(); i++) {
+ // 鑾峰彇娑堟伅鏁扮粍涓殑鍊�
+ Object value = jsonArray.get(i);
+ // 妫�鏌ュ�兼槸鍚︽湁鏁�
+ if (value != null && !value.toString().equals("null")) {
+ try {
+ // 绉婚櫎闈炴暟瀛楀拰鏁板瓧瀛楃
+ String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
+ // 瑙f瀽涓哄竷灏斿��
+ boolean val = "1".equals(cleanedValue.trim());
+ // 灏嗗竷灏斿�兼坊鍔犲埌甯冨皵鍊煎垪琛ㄤ腑
+ sValue.add(val);
+ System.out.println("messageValue: " + Arrays.asList(val) + " added to the list");
+ if(sValue.get(1)){
+
+ }
+
+
+
+ } catch (NumberFormatException e) {
+ // 濡傛灉鏃犳硶瑙f瀽涓� boolean 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
+ System.err.println("Could not parse value: " + value);
+ }
+ }
+ }
+ // 妫�鏌ュ竷灏斿�煎垪琛ㄦ槸鍚︿负绌�
+ if (!sValue.isEmpty()) {
+
+ // 璋冪敤 S7control.getinstance().WriteBit 鏂规硶灏嗗竷灏斿�煎垪琛ㄥ啓鍏ュ湴鍧�鍒楄〃
+ S7control.getinstance().WriteBit(addresses, sValue);
+ System.out.println("Values " + sValue + " written to PLC at address " + addresses);
+ }
+ }
+ } catch (Exception e) {
+ System.err.println("An error occurred while writing bit to PLC: " + e.getMessage());
+ }
+ }
+
+
+
+
+
+
+
+
+
+
}
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
index 3033682..cf447b0 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
@@ -2,6 +2,7 @@
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
+import com.example.springboot.controller.HomeController;
import org.apache.commons.io.FileUtils;
import java.io.*;
@@ -140,9 +141,138 @@
// System.out.println("lastMessage锛�" + lastMessage);
JSONArray messageArray = new JSONArray(lastMessage);
//娓呴櫎ID
- customS7Control.writeBitToPLC(messageArray, addressList0, 0);
+ // customS7Control.writeBitToPLC(messageArray, addressList0, 0);
+
+
+ try {
+ // 妫�鏌ョ储寮曟槸鍚︽湁鏁�
+ if (messageArray.getJSONArray(0).size() > 0) {
+ // 鑾峰彇娑堟伅鏁扮粍
+ JSONArray jsonArray = messageArray.getJSONArray(0);
+ // 鍒涘缓涓�涓竷灏斿�煎垪琛�
+ List<Boolean> sValue = new ArrayList<>();
+ // 閬嶅巻娑堟伅鏁扮粍
+ for (int i = 0; i < jsonArray.size(); i++) {
+ // 鑾峰彇娑堟伅鏁扮粍涓殑鍊�
+ Object value = jsonArray.get(i);
+ // 妫�鏌ュ�兼槸鍚︽湁鏁�
+ if (value != null && !value.toString().equals("null")) {
+ try {
+ // 绉婚櫎闈炴暟瀛楀拰鏁板瓧瀛楃
+ String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
+ // 瑙f瀽涓哄竷灏斿��
+ boolean val = "1".equals(cleanedValue.trim());
+ // 灏嗗竷灏斿�兼坊鍔犲埌甯冨皵鍊煎垪琛ㄤ腑
+ sValue.add(val);
+ System.out.println("messageValue: " + Arrays.asList(val) + " added to the list");
+
+
+
+
+
+
+ } catch (NumberFormatException e) {
+ // 濡傛灉鏃犳硶瑙f瀽涓� boolean 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
+ System.err.println("Could not parse value: " + value);
+ }
+ }
+ }
+
+ for (int i = 1; i <= 5; i++) {
+ boolean value = sValue.get(i);
+ if (value) {
+ switch (i) {
+ case 1:
+ HomeController.UpdateTask(0, 0, paramlist.get(i));
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ HomeController.UpdateTask(1, 0, paramlist.get(i));
+ break;
+ default:
+ // 澶勭悊绱㈠紩鍊间笉鍦ㄨ寖鍥村唴鐨勬儏鍐�
+ break;
+ }
+ }
+ }
+
+ // 妫�鏌ュ竷灏斿�煎垪琛ㄦ槸鍚︿负绌�
+ if (!sValue.isEmpty()) {
+
+ // 璋冪敤 S7control.getinstance().WriteBit 鏂规硶灏嗗竷灏斿�煎垪琛ㄥ啓鍏ュ湴鍧�鍒楄〃
+ S7control.getinstance().WriteBit(addressList0, sValue);
+ System.out.println("Values " + sValue + " written to PLC at address " + addressList0);
+ }
+ }
+ } catch (Exception e) {
+ System.err.println("An error occurred while writing bit to PLC: " + e.getMessage());
+ }
+
+
+
+
+
//鎬ュ仠
- customS7Control.writeBitToPLC(messageArray, niuanaddressList3, 1);
+// customS7Control.writeBitToPLC(messageArray, niuanaddressList3, 1);
+
+ try {
+ // 妫�鏌ョ储寮曟槸鍚︽湁鏁�
+ if (messageArray.getJSONArray(1).size() > 0) {
+ // 鑾峰彇娑堟伅鏁扮粍
+ JSONArray jsonArray = messageArray.getJSONArray(1);
+ // 鍒涘缓涓�涓竷灏斿�煎垪琛�
+ List<Boolean> sValue = new ArrayList<>();
+ // 閬嶅巻娑堟伅鏁扮粍
+ for (int i = 0; i < jsonArray.size(); i++) {
+ // 鑾峰彇娑堟伅鏁扮粍涓殑鍊�
+ Object value = jsonArray.get(i);
+ // 妫�鏌ュ�兼槸鍚︽湁鏁�
+ if (value != null && !value.toString().equals("null")) {
+ try {
+ // 绉婚櫎闈炴暟瀛楀拰鏁板瓧瀛楃
+ String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
+ // 瑙f瀽涓哄竷灏斿��
+ boolean val = "1".equals(cleanedValue.trim());
+ // 灏嗗竷灏斿�兼坊鍔犲埌甯冨皵鍊煎垪琛ㄤ腑
+ sValue.add(val);
+ System.out.println("messageValue: " + Arrays.asList(val) + " added to the list");
+
+
+ } catch (NumberFormatException e) {
+ // 濡傛灉鏃犳硶瑙f瀽涓� boolean 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
+ System.err.println("Could not parse value: " + value);
+ }
+ }
+ }
+
+ boolean Value1 = sValue.get(0);
+ boolean Value2 = sValue.get(1);
+
+ if (Value1) {
+ HomeController.EndTask(0);
+
+ }
+ if (Value2) {
+ HomeController.EndTask(0);
+
+ }
+ // 妫�鏌ュ竷灏斿�煎垪琛ㄦ槸鍚︿负绌�
+ if (!sValue.isEmpty()) {
+
+ // 璋冪敤 S7control.getinstance().WriteBit 鏂规硶灏嗗竷灏斿�煎垪琛ㄥ啓鍏ュ湴鍧�鍒楄〃
+ S7control.getinstance().WriteBit(addressList0, sValue);
+ System.out.println("Values " + sValue + " written to PLC at address " + addressList0);
+ }
+ }
+ } catch (Exception e) {
+ System.err.println("An error occurred while writing bit to PLC: " + e.getMessage());
+ }
+
+
+
+
//瀛樼墖绛夊緟寤惰繜
customS7Control.Writetime(messageArray, timeout2, 2);
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/S7control.java b/springboot-vue3/src/main/java/com/example/springboot/component/S7control.java
index a73f176..a5f3e44 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/S7control.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/S7control.java
@@ -331,11 +331,17 @@
}
//璇诲彇鏃堕棿
- public Long readtime(String address) {
- if (s7PLC==null)
- return null;
+public Long readtime(String address) {
+ if (s7PLC == null)
+ return null;
+ try {
return s7PLC.readTime(address);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
}
+}
+
public void writetime(String address, long datas) {
if (s7PLC == null)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
index e3dc388..c9a39bc 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,25 +17,25 @@
//
System.out.println("鍚姩瀹屾垚");
- // new PlcHold().start();
+ new PlcHold().start();
new Plchome().start();
- // new Plcalarm().start();
+ new Plcalarm().start();
- // new Plcsign().start();
+ new Plcsign().start();
- // new Plcstate().start();
- // new PlcPositioning1().start();
+ new Plcstate().start();
+ new PlcPositioning1().start();
- // new PlcParameter2().start();
+ new PlcParameter2().start();
- // new PLCAutomaticParameterSetting().start();
+ new PLCAutomaticParameterSetting().start();
- // new PlcManualonePosition().start();
- // new PlcManualonePosition2().start();
- // new PlcServoManualone().start();
- // new PLCManualJog().start();
+ new PlcManualonePosition().start();
+ new PlcManualonePosition2().start();
+ new PlcServoManualone().start();
+ new PLCManualJog().start();
}
}
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
index 91bdb2c..6c25db4 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/controller/HomeController.java
@@ -47,18 +47,21 @@
@RequestMapping("/home")
public class HomeController {
@Autowired
+ static
HomeMapper homeMapper;
@Autowired
HomeService storageRackService;
@Autowired
+ static
SpianService spianService;
@Autowired
SpianMapper spianMapper;
@Autowired
+ static
OutSliceServive outSliceServive;
@Autowired
@@ -139,7 +142,7 @@
// 鎵嬪姩瀹屾垚杩�/鍑虹墖浠诲姟 缁堟杩涚墖/鍑虹墖浠诲姟
@GetMapping("/UpdateTask")
- public Result UpdateTask(Integer types, Integer shelfrack, String glassid) {
+ public static Result UpdateTask(Integer types, Integer shelfrack, String glassid) {
Map<String, Object> map = new HashMap<>();
if (types == 0) {// 瀹屾垚杩涚墖
spianService.overtask(glassid);
@@ -157,7 +160,7 @@
//缁堟杩涚墖/鍑虹墖浠诲姟
@GetMapping("/EndTask")
- public Result EndTask(int types) {
+ public static Result EndTask(int types) {
if (types == 0) {// 缁堟杩涚墖浠诲姟
List<StorageTask> cageList = homeMapper.SelectTaskByState(types);
for (StorageTask storageTask : cageList) {
diff --git a/springboot-vue3/src/main/resources/com/example/springboot/mapper/DeviceMapper.xml b/springboot-vue3/src/main/resources/com/example/springboot/mapper/DeviceMapper.xml
index 5cc5c18..769c418 100644
--- a/springboot-vue3/src/main/resources/com/example/springboot/mapper/DeviceMapper.xml
+++ b/springboot-vue3/src/main/resources/com/example/springboot/mapper/DeviceMapper.xml
@@ -2,39 +2,39 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.springboot.mapper.device.DeviceMapper">
- <resultMap id="myResultMap" type="com.example.springboot.entity.device.DeviceEntity">
- <!-- 鏍规嵁浣犵殑瀹為檯鎯呭喌瀹氫箟缁撴灉鏄犲皠 -->
- <!-- 绀轰緥涓皢缁撴灉鏄犲皠鍒板疄浣撶被鐨勫睘鎬� -->
- <id property="id" column="id"/>
- <result property="name" column="device_name"/>
- <!-- 鍏朵粬灞炴�ф槧灏� -->
- </resultMap>
+<!-- <resultMap id="myResultMap" type="com.example.springboot.entity.device.DeviceEntity">-->
+<!-- <!– 鏍规嵁浣犵殑瀹為檯鎯呭喌瀹氫箟缁撴灉鏄犲皠 –>-->
+<!-- <!– 绀轰緥涓皢缁撴灉鏄犲皠鍒板疄浣撶被鐨勫睘鎬� –>-->
+<!-- <id property="id" column="id"/>-->
+<!-- <result property="name" column="device_name"/>-->
+<!-- <!– 鍏朵粬灞炴�ф槧灏� –>-->
+<!-- </resultMap>-->
- <select id="selectAllDevices" resultMap="myResultMap">
- SELECT *
- FROM device
- </select>
+<!-- <select id="selectAllDevices" resultMap="myResultMap">-->
+<!-- SELECT *-->
+<!-- FROM device-->
+<!-- </select>-->
- <select id="callStoredProc" statementType="CALLABLE" resultMap="myResultMap">
- { call Your_Stored_Procedure(
- #{id, mode=IN, jdbcType=VARCHAR},
- #{name, mode=IN, jdbcType=VARCHAR}
+<!-- <select id="callStoredProc" statementType="CALLABLE" resultMap="myResultMap">-->
+<!-- { call Your_Stored_Procedure(-->
+<!-- #{id, mode=IN, jdbcType=VARCHAR},-->
+<!-- #{name, mode=IN, jdbcType=VARCHAR}-->
- ) }
- </select>
+<!-- ) }-->
+<!-- </select>-->
- <update id="updateDeviceName">
- UPDATE device SET
- device_name = #{deviceName},
- address = #{address}
- WHERE id = #{id}
- </update>
- <update id="updateMultipleDevices" parameterType="java.util.List">
- <foreach collection="list" item="device" separator=";">
- UPDATE device SET
- device_name = #{device.deviceName},
- address = #{device.address}
- WHERE id = #{device.id}
- </foreach>
- </update>
+<!-- <update id="updateDeviceName">-->
+<!-- UPDATE device SET-->
+<!-- device_name = #{deviceName},-->
+<!-- address = #{address}-->
+<!-- WHERE id = #{id}-->
+<!-- </update>-->
+<!-- <update id="updateMultipleDevices" parameterType="java.util.List">-->
+<!-- <foreach collection="list" item="device" separator=";">-->
+<!-- UPDATE device SET-->
+<!-- device_name = #{device.deviceName},-->
+<!-- address = #{device.address}-->
+<!-- WHERE id = #{device.id}-->
+<!-- </foreach>-->
+<!-- </update>-->
</mapper>
--
Gitblit v1.8.0