Forráskód Böngészése

后台基础库添加同步码 数据码二进制 等字段

limingming 1 éve
szülő
commit
92178c8428

+ 18 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java

@@ -92,10 +92,28 @@ public class BasicLibraryController extends BaseController {
         if (param.getBootCodeSend() < 0){
             return R.fail("引导码发送次数参数有误");
         }
+        String[] synchronizeCode = param.getSynchronizeCode().split(",");
+        if (synchronizeCode.length != 2){
+            return R.fail("同步码参数格式有误");
+        }
+        if (param.getSynchronizeCodeSend() < 0){
+            return R.fail("同步码发送次数参数有误");
+        }
+
         String[] dateCode = param.getDateCode().split(",");
         if (dateCode.length % 2 != 0){
             return R.fail("数据码参数有误");
         }
+
+        String[] dateBinary0 = param.getDateBinary0().split(",");
+        if (dateBinary0.length != 2){
+            return R.fail("数据码二进制0参数格式有误");
+        }
+        String[] dateBinary1 = param.getDateBinary1().split(",");
+        if (dateBinary1.length != 2){
+            return R.fail("数据码二进制1参数格式有误");
+        }
+
         String[] overCode = param.getOverCode().split(",");
         if (overCode.length != 2){
             return R.fail("结束码参数有误");

+ 17 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/BasicLibrary.java

@@ -40,6 +40,14 @@ public class BasicLibrary   implements Serializable {
     @Excel(name = "引导码发送次数 默认1  校验大于0")
     private Long bootCodeSend;
 
+    /** 同步码  500,100  校验size=2 */
+    @Excel(name = "引导码  500,100  校验size=2")
+    private String synchronizeCode;
+
+    /** 同步码发送次数 默认1  校验大于0 */
+    @Excel(name = "引导码发送次数 默认1  校验大于0")
+    private Long synchronizeCodeSend;
+
     /** 数据码 */
     @Excel(name = "数据码")
     private String dateCode;
@@ -48,6 +56,15 @@ public class BasicLibrary   implements Serializable {
     @Excel(name = "结束码")
     private String overCode;
 
+    /** 二进制0   560,565  高电平低电平*/
+    @Excel(name = "二进制0")
+    private String dateBinary0;
+
+    /** 二进制1 */
+    @Excel(name = "二进制1")
+    private String dateBinary1;
+
+
     /** 状态(0使用中 1未使用) */
     @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
     private String status;