From 4038bd70d2b48e68c5b897a98198d18f9e6da79e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 19 二月 2025 20:14:52 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/utils/utils-custom.js |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index c78b049..fd5c790 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -2125,6 +2125,9 @@
       if (item.subButton.intertype === 'system' && !item.subButton.sqlType) {
         errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳璇疯缃搷浣滅被鍨媊})
       }
+      if (item.subButton.Ot === 'requiredSgl' && card.wrap.datatype === 'static') {
+        errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳閫夎鏃朵笉鍙娇鐢ㄩ潤鎬佹暟鎹簮`})
+      }
       if (item.subButton.verify && !item.subButton.output) {
         if (item.subButton.verify.noteEnable === 'true') {
           errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�肩煭淇″彂閫佹棤鏁堬紒`})
@@ -2192,6 +2195,7 @@
   let _ch_d = sql.match(/@check\$/ig)
   let _m_b = sql.match(/\$@/ig)
   let _m_d = sql.match(/@\$/ig)
+  let caseErr = false
 
   _quot = _quot ? _quot.length : 0
   _lparen = _lparen ? _lparen.length : 0
@@ -2200,6 +2204,14 @@
   _ch_d = _ch_d ? _ch_d.length : 0
   _m_b = _m_b ? _m_b.length : 0
   _m_d = _m_d ? _m_d.length : 0
+
+  if (/case\s+when\s+[\s\S]+\send(\s|\n|$)/ig.test(sql)) {
+    sql.match(/case\s+when\s+[\s\S]+\send(\s|\n|$)/ig).forEach(line => {
+      if (!/\selse\s/ig.test(line)) {
+        caseErr = true
+      }
+    })
+  }
 
   if (_quot % 2 !== 0) {
     notification.warning({
@@ -2328,6 +2340,13 @@
       duration: 5
     })
     return false
+  } else if (caseErr) {
+    notification.warning({
+      top: 92,
+      message: 'case when 璇彞闇�瑕佹湁 else',
+      duration: 5
+    })
+    return false
   } else if (type === 'customscript' && /\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(sql)) {
     let list = sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig)
     let errors = []

--
Gitblit v1.8.0