From 68ff33beff11310e830b0615b5a81f83fad0f683 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:33:14 +0800
Subject: [PATCH] ai优化

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java |  281 ++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 232 insertions(+), 49 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java
index ebfc4db..1305092 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queuesequence/QueueSequenceServiceImpl.java
@@ -100,7 +100,16 @@
         validateTimeslotNotDuplicated(createReqVO.getCheckType(), createReqVO.getTimeSlot(), null);
         // 鎻掑叆
         QueueSequenceDO queueSequence = BeanUtils.toBean(createReqVO, QueueSequenceDO.class);
+        if (null == queueSequence.getTimeSlot() || 0 != queueSequence.getTimeSlot()) {
+            // 銆愭湰闇�姹傘�戝彿娈佃捣鐐� / 棰勭暀璧风偣鐢辩郴缁熻绠楋紝涓嶆帴鍙楀墠绔殢鎰忎紶鍊硷紙鍚﹀垯鍙锋浼氶噸鍙狅級
+            queueSequence.setQueueSet(null);
+            queueSequence.setQueueVipSet(null);
+        }
         queueSequenceMapper.insert(queueSequence);
+        // 銆愭湰闇�姹傘�戞柊澧�/缂栬緫鍚庣粺涓�閲嶆帓璇ユ鏌ョ被鍨嬬殑鍙锋锛堜繚璇�"娈典笌娈甸灏剧浉鎺�"锛�
+        if (null != createReqVO.getCheckType()) {
+            recalcSegmentBounds(createReqVO.getCheckType());
+        }
         // 杩斿洖
         return queueSequence.getId();
     }
@@ -114,7 +123,104 @@
                 updateReqVO.getId());
         // 鏇存柊
         QueueSequenceDO updateObj = BeanUtils.toBean(updateReqVO, QueueSequenceDO.class);
+        // 銆愭湰闇�姹傘�戣捣濮嬪簭鍙风敱绯荤粺閲嶆帓锛屽拷鐣ュ墠绔紶鍊硷紙鍓嶇宸茬疆涓哄彧璇伙級
+        updateObj.setQueueSet(null);
+        updateObj.setQueueVipSet(null);
         queueSequenceMapper.updateById(updateObj);
+        if (null != updateReqVO.getCheckType()) {
+            recalcSegmentBounds(updateReqVO.getCheckType());
+        }
+    }
+
+    /**
+     * 銆愭湰闇�姹傘�戞寜銆屾椂娈靛崌搴忋�嶉噸鎺掓煇妫�鏌ョ被鍨嬬殑鍙锋锛�
+     * <pre>
+     *   娈� i锛歲ueue_set = 涓婁竴娈电殑 queue_vip_full锛堥娈� 0锛�
+     *         queue_full = queue_set + P
+     *         queue_vip_set = queue_full
+     *         queue_vip_full = queue_vip_set + V
+     *   鍏朵腑 P / V = 璇ヨ褰撳墠鐨勶紙queue_full - queue_set锛夈�侊紙queue_vip_full - queue_full锛夛紝
+     *   鍗冲悇娈电殑"棰濆害"淇濇寔涓嶅彉锛屽彧鎶婅捣鐐逛覆璧锋潵銆�
+     * </pre>
+     * 杩欐牱鏃犺鏂板/鍒犻櫎/缂栬緫鏃舵锛岄兘涓嶄細鍑虹幇鍙锋閲嶅彔鎴栫┖娲為敊浣嶃��
+     * <p>鎬婚鐣欐睜锛坱ime_slot = 0锛変笉鍙備笌閲嶆帓锛屽彧鎶婅捣鐐瑰榻愬埌鏈�鍚庝竴娈典箣鍚庛��
+     */
+    private void recalcSegmentBounds(Integer checkType) {
+        if (null == checkType) {
+            return;
+        }
+        List<QueueSequenceDO> all = queueSequenceMapper.selectTimeslotByCheckType(checkType);
+        if (null == all || all.isEmpty()) {
+            return;
+        }
+        all.sort(Comparator.comparingInt(r -> null == r.getTimeSlot() ? 0 : r.getTimeSlot()));
+
+        CheckTypeDO ct = checkTypeMapper.getCheckTypeByValue(checkType);
+
+        int cursor = 0;
+        int slotCount = 0;
+        for (QueueSequenceDO row : all) {
+            int slot = null == row.getTimeSlot() ? 0 : row.getTimeSlot();
+            if (0 == slot) {
+                continue;   // 鎬婚鐣欐睜鏈�鍚庡崟鐙鐞�
+            }
+            slotCount++;
+
+            // 棰濆害锛堝锛夛細浼樺厛娌跨敤璇ヨ鐜版湁鍙锋瀹藉害锛涙湭鐭�/闈炴鏃跺洖閫�鍒版鏌ョ被鍨嬮厤缃�
+            int p = width(row.getQueueSet(), row.getQueueFull());
+            if (p <= 0) {
+                p = (null == ct || null == ct.getTimeslotBookNum()) ? 0 : ct.getTimeslotBookNum();
+            }
+            int v = width(row.getQueueFull(), row.getQueueVipFull());
+            if (v < 0) {
+                v = (null == ct || null == ct.getTimeslotReservedNum()) ? 0 : ct.getTimeslotReservedNum();
+            }
+
+            QueueSequenceDO update = new QueueSequenceDO();
+            update.setId(row.getId());
+            update.setQueueSet(cursor);
+            update.setQueueFull(cursor + p);
+            update.setQueueVipSet(cursor + p);
+            update.setQueueVipFull(cursor + p + v);
+            // 娓告爣鍙�**涓婃姮**鍒板彿娈佃捣鐐癸紝缁濅笉**涓嬭皟**锛�
+            // 涓嬭皟浼氳宸插彂鍑虹殑鍙疯鍐嶆鍙戝嚭锛堥噸鍙凤級銆傝嫢娓告爣宸茶秴杩囦笂闄愶紝璇存槑璇ユ宸茶秴鍙戯紝
+            // 鍙栧彿鏃惰嚜鐒朵細钀藉埌銆岄鐣欏彿 鈫� 鎬婚鐣欐睜銆嶃��
+            update.setQueueNo(raiseAtLeast(row.getQueueNo(), cursor));
+            update.setQueueVipNo(raiseAtLeast(row.getQueueVipNo(), cursor + p));
+            queueSequenceMapper.updateById(update);
+
+            cursor = cursor + p + v;
+        }
+
+        // 鎬婚鐣欐睜锛氳捣鐐瑰榻愬埌鏈�鍚庝竴娈典箣鍚�
+        QueueSequenceDO pool = queueSequenceMapper.selectTotalPool(checkType);
+        if (null != pool) {
+            int poolFull = Math.max(null == pool.getQueueVipFull() ? 0 : pool.getQueueVipFull(), cursor);
+            QueueSequenceDO update = new QueueSequenceDO();
+            update.setId(pool.getId());
+            update.setQueueVipSet(cursor);
+            update.setQueueVipFull(poolFull);
+            update.setQueueVipNo(raiseAtLeast(pool.getQueueVipNo(), cursor));
+            queueSequenceMapper.updateById(update);
+        }
+        log.info("[recalcSegmentBounds] 宸查噸鎺掑彿娈�. checkType={} 娈垫暟={} 鏈熬鏈�澶у彿={}",
+                checkType, slotCount, cursor);
+    }
+
+    /** 鍙锋瀹藉害锛堢粓姝� - 璧峰锛夛紝浠讳竴涓� null 杩斿洖 -1 琛ㄧず"鏈煡" */
+    private int width(Integer from, Integer to) {
+        if (null == from || null == to) {
+            return -1;
+        }
+        return to - from;
+    }
+
+    /**
+     * 娓告爣鍙笂鎶�佷笉涓嬭皟锛堜笅璋冧細瀵艰嚧宸插彂鍑虹殑鍙疯鍐嶆鍙戝嚭 鈬� 閲嶅彿锛夈��
+     */
+    private Integer raiseAtLeast(Integer value, int min) {
+        int v = null == value ? min : value;
+        return Math.max(v, min);
     }
 
     /**
@@ -140,9 +246,14 @@
     @Override
     public void deleteQueueSequence(Integer id) {
         // 鏍¢獙瀛樺湪
-        validateQueueSequenceExists(id);
+        QueueSequenceDO exist = queueSequenceMapper.selectById(id);
+        if (null == exist) {
+            throw exception(QUEUE_SEQUENCE_NOT_EXISTS);
+        }
         // 鍒犻櫎
         queueSequenceMapper.deleteById(id);
+        // 銆愭湰闇�姹傘�戝垹闄ゅ悗閲嶆帓鍙锋锛堝惁鍒欏悗缁椂娈电殑璧风偣浼氱暀绌烘礊锛�
+        recalcSegmentBounds(exist.getCheckType());
     }
 
     private void validateQueueSequenceExists(Integer id) {
@@ -199,64 +310,118 @@
     @Override
     @Transactional
     public Integer distributeSeqNo(Integer checkType, Integer timeslot) {
+        // 銆愭湰闇�姹傦細鎸夋椂娈甸绾︺�戞櫘閫氭偅鑰呬笁绾у彇鍙凤紝**涓嶅啀璺ㄦ鍊熷彿**锛�
+        //   鈶� 鏈椂娈垫櫘閫氬彿锛坬ueue_no   < queue_full锛�
+        //   鈶� 鏈椂娈甸鐣欏彿锛坬ueue_vip_no < queue_vip_full锛�
+        //   鈶� 鎬婚鐣欐睜锛坱ime_slot=0锛�**涓嶈涓婇檺**锛�
+        // 浠讳綍涓�绾ф垚鍔熷嵆杩斿洖锛涒憿 姘镐笉澶辫触 鈬� 涓嶅瓨鍦�"绛句笉涓�"銆�
+        // 鏃犻绾︽椂娈碉紙timeslot 涓� null/0/瀛楀吀澶栫殑鍊硷級鏃� 鈶犫憽 鑷劧鏌ヤ笉鍒拌锛岀洿鎺ヨ惤鍒� 鈶€��
+
+        // 鈶� 鏈鏅�氬彿
         Integer curSeqNo = queueSequenceMapper.selectQueueNoForUpdate(checkType, timeslot);
-        if (null == curSeqNo) {
-            // 銆愪慨澶嶃�屾椂娈典笉鍏�/宸叉弧瀵艰嚧娌℃硶绛惧埌銆嶃��
-            // 鍘熼�昏緫锛氬彧鍙�"瀛楀吀閲岀殑绱ч偦涓嬩竴涓椂娈�"锛屼笖瑕佹眰璇ユ椂娈靛湪 queue_sequence 涓瓨鍦ㄣ��
-            // 鐜板疄闂锛堝疄娴嬶級锛�
-            //   路 瀛楀吀 ecg_book_timeslot 鏈� 21 涓椂娈碉紝浣� queue_sequence 涓� checkType=400
-            //     鍙湁 13 涓�乧heckType=100 鍙湁 17 涓� 鈥斺�� 閮ㄥ垎鏃舵鏍规湰娌℃湁鍙锋睜琛岋紱
-            //   路 HIS 浼氫笅鍙� 60 鍒嗛挓绮掑害鐨� bookTimeslot锛堝 10001100锛夛紝瀛楀吀閲屾病鏈夎鍊硷紝
-            //     getNextTimeSlot 鐩存帴 return null锛�
-            //   路 涓埆鏃舵瀹归噺寰堝皬锛堝钩鏉胯繍鍔� timeslot_book_num=3锛夛紝寰堝揩閿�瀹屻��
-            // 涓夎�呬换涓�鍛戒腑 鈫� 鎶� QUEUE_SEQUENCE_TIMESLOT_FULL 鈫� **鎮h�呮病娉曠鍒�**銆�
-            //
-            // 鐜板湪鏀逛负锛�**鍚戝悗鏈�澶氭壘 N 涓椂娈碉紝鍙栫涓�涓粛鏈変綑閲忕殑**锛堜笅闈� findAvailableTimeslot 鍐呭疄鐜帮級锛�
-            // 澶у箙闄嶄綆"鍥犱釜鍒椂娈电己澶�/宸叉弧灏辩鍒板け璐�"鐨勬鐜囷紱纭疄閮芥弧浜嗘墠鎶涢敊銆�
-            Integer nextTimeslot = findAvailableTimeslot(checkType, timeslot, false);
-            if (null == nextTimeslot) {
-                log.error("[distributeSeqNo] 璇ユ鏌ョ被鍨嬪悜鍚� {} 涓椂娈靛唴鍧囨棤鍙彇鍙锋椂娈�. checkType={} timeslot={}",
-                        MAX_TIMESLOT_LOOKAHEAD, checkType, timeslot);
-                throw exception(QUEUE_SEQUENCE_TIMESLOT_FULL);
+        if (null != curSeqNo) {
+            Integer updateNum = queueSequenceMapper.updateGivenCheckTypeTimeslotSeqNo(checkType, timeslot, curSeqNo);
+            if (null != updateNum && updateNum > 0) {
+                return curSeqNo + 1;
             }
-
-            curSeqNo = queueSequenceMapper.selectQueueNoForUpdate(checkType, nextTimeslot);
-            if (null == curSeqNo) {
-                // 鎺㈡祴涓庡彇鍙蜂箣闂磋骞跺彂鎶㈢┖锛屼繚瀹堟姤閿欙紙鐢卞墠绔彁绀洪噸鏂扮鍒帮級
-                log.warn("[distributeSeqNo] 鎺㈡祴鍒扮殑鏃舵闅忓嵆琚崰婊�. checkType={} timeslot={}",
-                        checkType, nextTimeslot);
-                throw exception(QUEUE_SEQUENCE_TIMESLOT_FULL);
-            }
-
-            Integer updateRowNum = queueSequenceMapper.updateGivenCheckTypeTimeslotSeqNo(checkType, nextTimeslot, curSeqNo);
-            if (null == updateRowNum || updateRowNum == 0) {
-                throw exception(QUEUE_SEQUENCE_TIMESLOT_EXCEPTION);
-            }
-
-        } else {
-            Integer updateRowNum = queueSequenceMapper.updateGivenCheckTypeTimeslotSeqNo(checkType, timeslot, curSeqNo);
-            if (null == updateRowNum || updateRowNum == 0) {
-                throw exception(QUEUE_SEQUENCE_TIMESLOT_EXCEPTION);
-            }
+            // 骞跺彂琚姠绌� 鈫� 钀藉埌 鈶�
+            log.info("[distributeSeqNo] 鏈鏅�氬彿骞跺彂琚姠绌猴紝闄嶇骇鍒伴鐣欏彿. checkType={} timeslot={}", checkType, timeslot);
         }
 
-        return curSeqNo + 1;
-    }
+        // 鈶� 鏈棰勭暀鍙�
+        Integer curVipNo = queueSequenceMapper.selectQueueVipNoForUpdate(checkType, timeslot);
+        if (null != curVipNo) {
+            Integer updateNum = queueSequenceMapper.updateGivenCheckTypeTimeslotVipSeqNo(checkType, timeslot, curVipNo);
+            if (null != updateNum && updateNum > 0) {
+                log.info("[distributeSeqNo] 鏅�氬彿宸叉弧锛屾敼鍙戞湰娈甸鐣欏彿. checkType={} timeslot={} seqNo={}",
+                        checkType, timeslot, curVipNo + 1);
+                return curVipNo + 1;
+            }
+            log.info("[distributeSeqNo] 鏈棰勭暀鍙峰苟鍙戣鎶㈢┖锛岄檷绾у埌鎬婚鐣欐睜. checkType={} timeslot={}", checkType, timeslot);
+        }
 
+        // 鈶� 鎬婚鐣欐睜锛堜笉璁句笂闄愶紝淇濊瘉涓�瀹氳兘绛惧埌锛�
+        return nextTotalPoolSeqNo(checkType, timeslot);
+    }
+    /**
+     * 銆愭湰闇�姹傘�慥IP / 涓存椂鍔犲彿鎮h�呭彇鍙凤細**鐩存帴鍙栨湰娈甸鐣欏彿**锛涙湰娈甸鐣欎篃婊� 鈫� 鎬婚鐣欐睜銆�
+     * <p>
+     * 涓庢櫘閫氶�氶亾鐨勫樊鍒彧鍦ㄤ簬"璺宠繃鏈鏅�氬彿"锛屽叾浣欙紙棰勭暀鍙枫�佹�绘睜鍏滃簳锛夊畬鍏ㄤ竴鑷淬��
+     */
     @Override
     @Transactional
     public Integer distributeVipSeqNo(Integer checkType, Integer timeslot) {
         Integer curVipSeqNo = queueSequenceMapper.selectQueueVipNoForUpdate(checkType, timeslot);
-        if (null == curVipSeqNo) {
-            throw exception(QUEUE_SEQUENCE_TIMESLOT_FULL);
+        if (null != curVipSeqNo) {
+            Integer updateRowNum = queueSequenceMapper.updateGivenCheckTypeTimeslotVipSeqNo(checkType, timeslot, curVipSeqNo);
+            if (null != updateRowNum && updateRowNum > 0) {
+                return curVipSeqNo + 1;
+            }
+            log.info("[distributeVipSeqNo] 鏈棰勭暀鍙峰苟鍙戣鎶㈢┖锛岄檷绾у埌鎬婚鐣欐睜. checkType={} timeslot={}", checkType, timeslot);
+        }
+        return nextTotalPoolSeqNo(checkType, timeslot);
+    }
+
+    /**
+     * 銆愭湰闇�姹傘�戞�婚鐣欐睜鍙栧彿锛坽@code time_slot = 0} 閭d竴琛岋級鈥斺�� **姘镐笉澶辫触**銆�
+     *
+     * <h3>涓轰粈涔堜笉浼氭弧</h3>
+     * 鎬绘睜鐨� {@code queue_vip_full} 鍦ㄥ彂鍙锋椂鍚屾"椤堕珮"锛堣 Mapper 鐨�
+     * {@code advanceTotalPoolVipNo}锛夛紝鍥犳 {@code queue_vip_no} 姘歌繙鍙互缁х画 +1銆�
+     * 杩欐槸"缁濅笉鍑虹幇绛句笉涓�"鐨勬渶鍚庝竴閬撳厹搴曘��
+     *
+     * <h3>鎬绘睜琛岀己澶辨椂鑷姩琛�</h3>
+     * 鍙锋鏀惧湪褰撳ぉ鎵�鏈夋椂娈电殑鏈�澶у彿涔嬪悗锛坽@code max(queue_vip_full)}锛夛紝
+     * 淇濊瘉鎬绘睜鍙� **澶т簬鎵�鏈夋椂娈靛彿** 鈬� 鎺掑簭澶╃劧鎺掑湪鍏ㄥぉ鏈�鍚庛��
+     */
+    private Integer nextTotalPoolSeqNo(Integer checkType, Integer timeslot) {
+        Integer curVipNo = null;
+        try {
+            curVipNo = queueSequenceMapper.selectTotalPoolVipNo(checkType);
+        } catch (Exception e) {
+            log.warn("[nextTotalPoolSeqNo] 璇诲彇鎬婚鐣欐睜寮傚父锛屾寜缂哄け澶勭悊. checkType={}", checkType, e);
         }
 
-        Integer updateRowNum = queueSequenceMapper.updateGivenCheckTypeTimeslotVipSeqNo(checkType, timeslot, curVipSeqNo);
-        if (null == updateRowNum || updateRowNum == 0) {
+        if (null == curVipNo) {
+            // 鐜板満鍏滃簳锛氳嚜鍔ㄨˉ涓�琛屾�婚鐣欐睜锛堝箓绛夛細浠� 妫�鏌ョ被鍨� + time_slot=0 鍞竴锛�
+            Integer base = queueSequenceMapper.selectMaxVipFullOfCheckType(checkType);
+            if (null == base) {
+                base = 0;
+            }
+            QueueSequenceDO pool = new QueueSequenceDO();
+            pool.setCheckType(checkType);
+            pool.setTimeSlot(0);
+            pool.setQueueSet(0);
+            pool.setQueueNo(0);
+            pool.setQueueFull(0);
+            pool.setQueueVipSet(base);
+            pool.setQueueVipNo(base);
+            pool.setQueueVipFull(base);
+            try {
+                queueSequenceMapper.insert(pool);
+            } catch (Exception e) {
+                // 骞跺彂涓嬪彲鑳藉凡琚埆鐨勭嚎绋嬫彃鍏ワ紝蹇界暐鍚庣户缁
+                log.warn("[nextTotalPoolSeqNo] 琛ユ�婚鐣欐睜琛屽け璐ワ紙鍙兘骞跺彂宸叉彃鍏ワ級锛岀户缁彇鍙�. checkType={}", checkType, e);
+            }
+            if (null == queueSequenceMapper.selectTotalPoolVipNo(checkType)) {
+                // 鎻掑叆鍚庝粛璇讳笉鍒帮紙鏋佺鎯呭喌锛夆啋 鐢ㄥ綋澶╂渶澶у彿鍏滃簳锛屼繚璇佽兘绛惧埌
+                Integer maxFull = queueSequenceMapper.selectMaxVipFullOfCheckType(checkType);
+                log.error("[nextTotalPoolSeqNo] 鎬婚鐣欐睜涓嶅彲鐢紝浣跨敤鏈�澶у彿鍏滃簳. checkType={} maxFull={}", checkType, maxFull);
+                return (null == maxFull ? 0 : maxFull) + 1;
+            }
+        }
+
+        Integer updateNum = queueSequenceMapper.advanceTotalPoolVipNo(checkType);
+        if (null == updateNum || updateNum == 0) {
             throw exception(QUEUE_SEQUENCE_TIMESLOT_EXCEPTION);
         }
-
-        return curVipSeqNo + 1;
+        Integer after = queueSequenceMapper.selectTotalPoolVipNo(checkType);
+        if (null == after) {
+            throw exception(QUEUE_SEQUENCE_TIMESLOT_EXCEPTION);
+        }
+        log.info("[nextTotalPoolSeqNo] 宸蹭粠鎬婚鐣欐睜鍙栧彿锛堟湰娈靛凡婊℃垨娌℃湁鏃舵锛�. checkType={} timeslot={} seqNo={}",
+                checkType, timeslot, after);
+        return after;
     }
 
     /**
@@ -283,6 +448,21 @@
     @Transactional
     public Integer distributeSeqNoByRule(Integer checkType, Integer timeslot,
                                         Integer existingSeqNo, boolean urgent) {
+        // 鍏煎鏃ц皟鐢ㄦ柟锛氭湭浼� VIP 鏍囪鏃舵寜"闈� VIP"澶勭悊
+        return distributeSeqNoByRule(checkType, timeslot, existingSeqNo, urgent, false);
+    }
+
+    /**
+     * 銆愭湰闇�姹傘�戝甫 VIP/鍔犲彿鏍囪鐨勫彇鍙峰叆鍙c��
+     * <p>
+     * 涓庡洓鍙傜増鏈殑鍞竴宸埆锛氭寜鏃舵棰勭害锛圱IMESLOT锛変笅锛孷IP/鍔犲彿鎮h��**鐩存帴鍙栨湰娈甸鐣欏彿**
+     * 锛堣 {@link #distributeVipSeqNo}锛夛紝鑰屼笉鏄厛鍙栨櫘閫氬彿锛涚鍒板簭鍙凤紙CHECKIN锛変笅
+     * VIP/鍔犲彿鍚屾牱鍙崰鐢ㄩ鐣欏彿锛堟瘡 9 鐣� 1 鐨勯鐣欎綅锛夈��
+     */
+    @Override
+    @Transactional
+    public Integer distributeSeqNoByRule(Integer checkType, Integer timeslot,
+                                        Integer existingSeqNo, boolean urgent, boolean vip) {
         SeqRuleEnum rule = resolveRule(checkType);
 
         switch (rule) {
@@ -295,15 +475,18 @@
                 }
                 log.warn("[distributeSeqNoByRule] 瑙勫垯=棰勭害鍙凤紝浣嗛绾︾郴缁熸湭涓嬪彂鍙凤紝鍥為��鍒扮鍒板簭鍙�. checkType={}",
                         checkType);
-                return nextCheckInSeqNo(checkType, urgent);
+                return nextCheckInSeqNo(checkType, urgent || vip);
 
             case CHECKIN:
                 // 鈶� 绛惧埌搴忓彿锛氬綋澶╁悓妫�鏌ョ被鍨嬭繛缁�掑锛屾瘡 9 涓鐣� 1 涓�
-                return nextCheckInSeqNo(checkType, urgent);
+                return nextCheckInSeqNo(checkType, urgent || vip);
 
             case TIMESLOT:
             default:
-                // 鈶� 鏃舵鍙凤細淇濇寔鏀归�犲墠鐨勮涓猴紙鍚椂娈靛閲忔帶鍒讹級
+                // 鈶� 鏃舵鍙凤細VIP/鍔犲彿璧般�屾湰娈甸鐣欏彿 鈫� 鎬婚鐣欐睜銆嶏紱鏅�氳蛋銆屾櫘閫� 鈫� 棰勭暀 鈫� 鎬绘睜銆�
+                if (vip) {
+                    return distributeVipSeqNo(checkType, timeslot);
+                }
                 return distributeSeqNo(checkType, timeslot);
         }
     }

--
Gitblit v1.9.3