Browse Source

chore: 升旗礼人数自动带出改造前 checkpoint(场地列表/对象列表既有改动)

harper 15 hours ago
parent
commit
85f6233973
5 changed files with 115 additions and 19 deletions
  1. 0 0
      src/ss/rbar/RbarServ.java
  2. 37 0
      web/cfg/biz/cd/cd.sql.xml
  3. 4 3
      web/js/vue/ss-components.js
  4. 37 8
      web/page/env/objList.jsp
  5. 37 8
      web/page/objList.jsp

File diff suppressed because it is too large
+ 0 - 0
src/ss/rbar/RbarServ.java


+ 37 - 0
web/cfg/biz/cd/cd.sql.xml

@@ -61,6 +61,43 @@
 		<parm name="cdid" type="long"/>
 	</sql>
 
+	<sql name="cdRbarRy" desc="场地右侧栏在住人员">
+		<stmt><![CDATA[
+			select CDSY.SYRYID id,
+			       RY.XM title,
+			       RY.RYH ryh,
+			       NBCD.MC cwmc,
+			       BJCY.BJID bjid,
+			       BJ.MC bjmc
+			  from CDSY
+			 inner join RY on RY.RYID=CDSY.SYRYID
+			  left join NBCD on NBCD.NBCDID=CDSY.NBCDID
+			  left join (
+			        select RYID,BJID
+			          from (
+			                select BJCY.RYID,BJCY.BJID,
+			                       row_number() over(
+			                           partition by BJCY.RYID
+			                           order by BJCY.BJCYID desc
+			                       ) rn
+			                  from BJCY
+			                 where BJCY.SFBY=0
+			                   and BJCY.JLZTM in(51,22,25)
+			               )
+			         where rn=1
+			       ) BJCY on BJCY.RYID=CDSY.SYRYID
+			  left join BJ on BJ.BJID=BJCY.BJID
+			 where CDSY.CDID=:cdid
+			   and CDSY.JSSJ is null
+			   and CDSY.JLZTM in(51,22,25)
+			   and RY.JLZTM in(51,22,25)
+			   and RY.RYLBM=1100
+			   and RY.RYZTM=101
+			 order by NBCD.NBCDID,RY.XM
+		]]></stmt>
+		<parm name="cdid" type="long"/>
+	</sql>
+
 
 
 	<!-- 统计指标start Ben(20260101) -->

+ 4 - 3
web/js/vue/ss-components.js

@@ -5599,8 +5599,8 @@ import { EVEN_VAR } from "./EventBus.js";
         const secondKind = summary ? "summary" : hasTags ? "tags" : "";
         const hasSecond = !!secondKind;
 
-        // 第三部分(L4):对象号优先,其次类目 by xu 20260108
-        const thirdKind = objNum ? "objNum" : hasCategory ? "category" : "";
+        // 第三部分(L4):对象主键仅用于交互标识,不参与卡片文字展示 by xu 20261201
+        const thirdKind = hasCategory ? "category" : "";
         const hasThird = !!thirdKind;
         const thirdFull = !hasSecond && hasThird; // 第二部分为空则第三部分占满 4 行 by xu 20260108
         const secondFull = hasSecond && !hasThird && secondKind === "tags"; // 仅标签时占满 4 行(不留空行) by xu 20260109
@@ -6484,7 +6484,8 @@ import { EVEN_VAR } from "./EventBus.js";
         const hasCategory = categoryArr.length > 0;
         const secondKind = summary ? "summary" : hasTags ? "tags" : "";
         const hasSecond = !!secondKind;
-        const thirdKind = objNum ? "objNum" : hasCategory ? "category" : "";
+        // 对象主键仅用于交互标识,不参与卡片文字展示 by xu 20261201
+        const thirdKind = hasCategory ? "category" : "";
         const hasThird = !!thirdKind;
         const thirdFull = !hasSecond && hasThird;
         const secondFull = hasSecond && !hasThird && secondKind === "tags";

+ 37 - 8
web/page/env/objList.jsp

@@ -1487,10 +1487,11 @@
 	                    {
 	                        const tabs = Array.isArray(this.rbarTabNameList) ? this.rbarTabNameList : [];
 	                        const norm = (s) => String(s || "").trim().toLowerCase();
+	                        this.hasRyPanel = tabs.some((t) => norm(t) === "rbarry"); // 功能说明:人员tab存在才回显ryList by xu 20261201
 	                        this.hasBookPanel = tabs.some((t) => norm(t) === "rbarbook"); // 功能说明:预订tab存在才回显bookList by xu 20260116
 	                        this.hasServPanel = tabs.some((t) => norm(t) === "rbarserv"); // 功能说明:服务tab存在才回显servList by xu 20260116
 	                        this.hasObjPanel = tabs.some((t) => norm(t) === "rbarobj"); // 功能说明:无 rbarObj 时禁用选中能力 by xu 20260122
-	                        this.cardClickAction = (this.hasObjPanel && (this.hasBookPanel || this.hasServPanel)) ? "single" : "view"; // 功能说明:仅允许选中时才启用单选联动 by xu 20260122
+	                        this.cardClickAction = (this.hasObjPanel && (this.hasRyPanel || this.hasBookPanel || this.hasServPanel)) ? "single" : "view"; // 功能说明:仅允许选中时才启用单选联动 by xu 20260122
 	                    }
 
                     this.searchButtonConfigCheckId = String(this.form?.management || "99");
@@ -1574,9 +1575,11 @@
 	                        if (nk === "rbarserv") {
 	                            p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称),不需要 meta 槽位 by xu 20260116
 	                        }
-                        // 功能说明:右侧“人员”面板先做前端 mock 搜索头(仅展示,不接后端) by xu 20260114
+                        // 功能说明:右侧“人员”面板按当前场地在住人员回显,搜索仅过滤前端已加载名单 by xu 20261201
 	                        if (nk === "rbarry") {
 	                            p.iconClass = "ss-sidebar-biz-icon icon-obj-ry"; // 功能说明:右侧“人员”tab 使用右侧栏 biz 图标基类 by xu 20260123
+	                            p.itemLayout = "person";
+	                            p.searchable = true;
 	                            p.count = 0;
 	                            p.headerFilters = [
                                 {
@@ -1786,6 +1789,7 @@
                     if (!data || typeof data !== "object") return;
 	                    const ensurePanel = (tabKeyLower, title) => {
                         // 功能说明:严格依赖首页 rbarTabNameList 决定是否允许创建面板:未返回 rbarServ 时即使 cxycl 有 servList 也不处理 by xu 20260116
+	                        if (tabKeyLower === "rbarry" && !this.hasRyPanel) return null;
                         if (tabKeyLower === "rbarbook" && !this.hasBookPanel) return null;
                         if (tabKeyLower === "rbarserv" && !this.hasServPanel) return null;
                         const panels = Array.isArray(this.sidebarPanels) ? this.sidebarPanels : [];
@@ -1798,7 +1802,9 @@
 	                            _tabKey: tabKeyLower,
 	                            title,
 	                            // 功能说明:预订/服务面板 iconClass 与首页初始化保持一致(避免 cxycl 兜底创建时图标错误) by xu 20260123
-	                            iconClass: (tabKeyLower === "rbarbook")
+	                            iconClass: (tabKeyLower === "rbarry")
+	                              ? "ss-sidebar-biz-icon icon-obj-ry"
+	                              : (tabKeyLower === "rbarbook")
 	                              ? "ss-sidebar-biz-icon icon-obj-yd"
 	                              : (tabKeyLower === "rbarserv")
 	                                ? "ss-sidebar-biz-icon icon-obj-fw"
@@ -1807,7 +1813,7 @@
 	                            itemAction: false,
 	                        };
                         // 功能说明:预订面板默认使用 person 布局(title+meta) by xu 20260116
-                        if (tabKeyLower === "rbarbook") p.itemLayout = "person";
+	                        if (tabKeyLower === "rbarry" || tabKeyLower === "rbarbook") p.itemLayout = "person";
                         if (tabKeyLower === "rbarserv") p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称) by xu 20260116
                         panels.splice(insertAt, 0, p);
                         this.sidebarPanels = panels;
@@ -1834,14 +1840,29 @@
                         return String(v);
                     };
 
-                    const bookList = Array.isArray(data.bookList) ? data.bookList : [];
+	                    const ryList = Array.isArray(data.ryList) ? data.ryList : [];
+	                    const bookList = Array.isArray(data.bookList) ? data.bookList : [];
                     const servList = Array.isArray(data.servList) ? data.servList : []; // 功能说明:将 <对象名>_cxycl 返回的 servList 写回右侧服务面板 by xu 20260116
 
                     try {
                         console.log("[pobj] cxycl bookList", {len: bookList.length, bookList: bookList});
                     } catch (_) {
                     } // 功能说明:打印 cxycl 返回,排查“预订tab不回显” by xu 20260116
-                    // 功能说明:无论 bookList 是否为空,都要写回面板(为空则清空旧数据),避免“切换对象但仍显示上一次预订人” by xu 20260114
+	                    // 功能说明:无论列表是否为空,都要写回面板(为空则清空旧数据),避免切换场地后残留上一房间人员 by xu 20261201
+	                    const ryPanel = ensurePanel("rbarry", "人员");
+	                    if (ryPanel) {
+	                        ryPanel.itemLayout = "person";
+	                        ryPanel.searchable = true;
+	                        ryPanel.items = ryList.map((ry) => ({
+	                            _raw: ry,
+	                            id: ry?.id,
+	                            ryId: ry?.id,
+	                            title: String(ry?.title ?? ""),
+	                            meta: [ry?.cwmc, ry?.bjmc].filter(Boolean).join(" · "),
+	                            tags: [],
+	                        }));
+	                        ryPanel.count = ryPanel.items.length;
+	                    }
                     const bookPanel = ensurePanel("rbarbook", "预订");
                     if (bookPanel) {
                         bookPanel.itemLayout = "person"; // 功能说明:预订面板复用“已选”tab 的 person 布局(title+中间 meta 槽位),不走 tags by xu 20260114
@@ -1881,13 +1902,21 @@
                     } catch (_) {
                     } // 功能说明:打印写回后的面板状态,排查“预订tab不回显” by xu 20260116
                 },
-                // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧预订/服务面板 by xu 20260114
+	                // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧人员/预订/服务面板 by xu 20261201
                 loadPobjYclByItem(item) {
-                    if (!(this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:预订/服务任一存在才调用 cxycl;否则不联动 by xu 20260116
+	                    if (!(this.hasRyPanel || this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:人员/预订/服务任一存在才调用 cxycl;否则不联动 by xu 20261201
                     const objNum = item?.objNum || item?._raw?.ssObjId || item?._raw?.ssObjId;
                     if (!objNum) return Promise.resolve(null);
                     const ssServ = this.ssObjName ? (String(this.ssObjName) + "_cxycl") : "";
                     if (!ssServ) return Promise.resolve(null);
+	                    if (this.hasRyPanel) {
+	                        const ryPanel = (this.sidebarPanels || []).find((p) => String(p?._tabKey || "").toLowerCase() === "rbarry");
+	                        if (ryPanel) {
+	                            ryPanel.items = [];
+	                            ryPanel.count = 0;
+	                            this.sidebarPanels = (this.sidebarPanels || []).slice();
+	                        }
+	                    }
                     const reqId = (this.__yclReqId = (this.__yclReqId || 0) + 1);
                     this.yclLoading = true;
                     // 功能说明:cxycl 需要同时传入 ssObjIdName=<对象名>id,且把对象ID用该字段名提交(如 cdid=90052) by xu 20260114

+ 37 - 8
web/page/objList.jsp

@@ -1522,10 +1522,11 @@
 	                    {
 	                        const tabs = Array.isArray(this.rbarTabNameList) ? this.rbarTabNameList : [];
 	                        const norm = (s) => String(s || "").trim().toLowerCase();
+	                        this.hasRyPanel = tabs.some((t) => norm(t) === "rbarry"); // 功能说明:人员tab存在才回显ryList by xu 20261201
 	                        this.hasBookPanel = tabs.some((t) => norm(t) === "rbarbook"); // 功能说明:预订tab存在才回显bookList by xu 20260116
 	                        this.hasServPanel = tabs.some((t) => norm(t) === "rbarserv"); // 功能说明:服务tab存在才回显servList by xu 20260116
 	                        this.hasObjPanel = tabs.some((t) => norm(t) === "rbarobj"); // 功能说明:无 rbarObj 时禁用选中能力 by xu 20260122
-	                        this.cardClickAction = (this.hasObjPanel && (this.hasBookPanel || this.hasServPanel)) ? "single" : "view"; // 功能说明:仅允许选中时才启用单选联动 by xu 20260122
+	                        this.cardClickAction = (this.hasObjPanel && (this.hasRyPanel || this.hasBookPanel || this.hasServPanel)) ? "single" : "view"; // 功能说明:仅允许选中时才启用单选联动 by xu 20260122
 	                    }
 
                     this.searchButtonConfigCheckId = String(this.form?.management || "99");
@@ -1609,9 +1610,11 @@
 	                        if (nk === "rbarserv") {
 	                            p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称),不需要 meta 槽位 by xu 20260116
 	                        }
-                        // 功能说明:右侧“人员”面板先做前端 mock 搜索头(仅展示,不接后端) by xu 20260114
+                        // 功能说明:右侧“人员”面板按当前场地在住人员回显,搜索仅过滤前端已加载名单 by xu 20261201
 	                        if (nk === "rbarry") {
 	                            p.iconClass = "ss-sidebar-biz-icon icon-obj-ry"; // 功能说明:右侧“人员”tab 使用右侧栏 biz 图标基类 by xu 20260123
+	                            p.itemLayout = "person";
+	                            p.searchable = true;
 	                            p.count = 0;
 	                            p.headerFilters = [
                                 {
@@ -1821,6 +1824,7 @@
                     if (!data || typeof data !== "object") return;
 	                    const ensurePanel = (tabKeyLower, title) => {
                         // 功能说明:严格依赖首页 rbarTabNameList 决定是否允许创建面板:未返回 rbarServ 时即使 cxycl 有 servList 也不处理 by xu 20260116
+	                        if (tabKeyLower === "rbarry" && !this.hasRyPanel) return null;
                         if (tabKeyLower === "rbarbook" && !this.hasBookPanel) return null;
                         if (tabKeyLower === "rbarserv" && !this.hasServPanel) return null;
                         const panels = Array.isArray(this.sidebarPanels) ? this.sidebarPanels : [];
@@ -1833,7 +1837,9 @@
 	                            _tabKey: tabKeyLower,
 	                            title,
 	                            // 功能说明:预订/服务面板 iconClass 与首页初始化保持一致(避免 cxycl 兜底创建时图标错误) by xu 20260123
-	                            iconClass: (tabKeyLower === "rbarbook")
+	                            iconClass: (tabKeyLower === "rbarry")
+	                              ? "ss-sidebar-biz-icon icon-obj-ry"
+	                              : (tabKeyLower === "rbarbook")
 	                              ? "ss-sidebar-biz-icon icon-obj-yd"
 	                              : (tabKeyLower === "rbarserv")
 	                                ? "ss-sidebar-biz-icon icon-obj-fw"
@@ -1842,7 +1848,7 @@
 	                            itemAction: false,
 	                        };
                         // 功能说明:预订面板默认使用 person 布局(title+meta) by xu 20260116
-                        if (tabKeyLower === "rbarbook") p.itemLayout = "person";
+	                        if (tabKeyLower === "rbarry" || tabKeyLower === "rbarbook") p.itemLayout = "person";
                         if (tabKeyLower === "rbarserv") p.itemLayout = "simple"; // 功能说明:服务面板只回显 mc(名称) by xu 20260116
                         panels.splice(insertAt, 0, p);
                         this.sidebarPanels = panels;
@@ -1869,14 +1875,29 @@
                         return String(v);
                     };
 
-                    const bookList = Array.isArray(data.bookList) ? data.bookList : [];
+	                    const ryList = Array.isArray(data.ryList) ? data.ryList : [];
+	                    const bookList = Array.isArray(data.bookList) ? data.bookList : [];
                     const servList = Array.isArray(data.servList) ? data.servList : []; // 功能说明:将 <对象名>_cxycl 返回的 servList 写回右侧服务面板 by xu 20260116
 
                     try {
                         console.log("[pobj] cxycl bookList", {len: bookList.length, bookList: bookList});
                     } catch (_) {
                     } // 功能说明:打印 cxycl 返回,排查“预订tab不回显” by xu 20260116
-                    // 功能说明:无论 bookList 是否为空,都要写回面板(为空则清空旧数据),避免“切换对象但仍显示上一次预订人” by xu 20260114
+	                    // 功能说明:无论列表是否为空,都要写回面板(为空则清空旧数据),避免切换场地后残留上一房间人员 by xu 20261201
+	                    const ryPanel = ensurePanel("rbarry", "人员");
+	                    if (ryPanel) {
+	                        ryPanel.itemLayout = "person";
+	                        ryPanel.searchable = true;
+	                        ryPanel.items = ryList.map((ry) => ({
+	                            _raw: ry,
+	                            id: ry?.id,
+	                            ryId: ry?.id,
+	                            title: String(ry?.title ?? ""),
+	                            meta: [ry?.cwmc, ry?.bjmc].filter(Boolean).join(" · "),
+	                            tags: [],
+	                        }));
+	                        ryPanel.count = ryPanel.items.length;
+	                    }
                     const bookPanel = ensurePanel("rbarbook", "预订");
                     if (bookPanel) {
                         bookPanel.itemLayout = "person"; // 功能说明:预订面板复用“已选”tab 的 person 布局(title+中间 meta 槽位),不走 tags by xu 20260114
@@ -1916,13 +1937,21 @@
                     } catch (_) {
                     } // 功能说明:打印写回后的面板状态,排查“预订tab不回显” by xu 20260116
                 },
-                // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧预订/服务面板 by xu 20260114
+	                // 功能说明:选中对象后联动调用 <对象名>_cxycl,填充右侧人员/预订/服务面板 by xu 20261201
                 loadPobjYclByItem(item) {
-                    if (!(this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:预订/服务任一存在才调用 cxycl;否则不联动 by xu 20260116
+	                    if (!(this.hasRyPanel || this.hasBookPanel || this.hasServPanel)) return Promise.resolve(null); // 功能说明:人员/预订/服务任一存在才调用 cxycl;否则不联动 by xu 20261201
                     const objNum = item?.objNum || item?._raw?.ssObjId || item?._raw?.ssObjId;
                     if (!objNum) return Promise.resolve(null);
                     const ssServ = this.ssObjName ? (String(this.ssObjName) + "_cxycl") : "";
                     if (!ssServ) return Promise.resolve(null);
+	                    if (this.hasRyPanel) {
+	                        const ryPanel = (this.sidebarPanels || []).find((p) => String(p?._tabKey || "").toLowerCase() === "rbarry");
+	                        if (ryPanel) {
+	                            ryPanel.items = [];
+	                            ryPanel.count = 0;
+	                            this.sidebarPanels = (this.sidebarPanels || []).slice();
+	                        }
+	                    }
                     const reqId = (this.__yclReqId = (this.__yclReqId || 0) + 1);
                     this.yclLoading = true;
                     // 功能说明:cxycl 需要同时传入 ssObjIdName=<对象名>id,且把对象ID用该字段名提交(如 cdid=90052) by xu 20260114

Some files were not shown because too many files changed in this diff