登高车、标志标识

parent 22bca205
......@@ -57,9 +57,9 @@ export async function getFloor(req, res) {
let ldStr = ld;
if (ld == "东交") ldStr = "DJ";
let lcStr = enumConfig[`${ldStr}_ywyf`][lc];
// let lcStr = enumConfig[`${ldStr}_ywyf`][lc];
let url = `${systemConfig.floorBZBS}?ld=${ld}&lc=${lcStr}`;
let url = `${systemConfig.floorBZBS}?ld=${ld}&lc=${lc}`;
let floorInfo = await postAxios(url, {}, {});
......@@ -77,8 +77,8 @@ export async function getFloor(req, res) {
export async function getSign(req, res) {
let ret:any = {};
let {bsmc} = req.body;
let url = `${systemConfig.signBZBS}?bsmc=${bsmc}`;
let {bsmc,ld,lc} = req.body;
let url = `${systemConfig.signBZBS}?bsmc=${bsmc}&ld=${ld}&lc=${lc}`;
let signInfo = await postAxios(url, {}, {});
......@@ -120,7 +120,7 @@ export async function getSignPoint(req, res) {
{ imgName: '4F', floorName: '4F', displayName: '4F', altitude: '(21.65M)', includeEmpty: true },
],
'Dj': [
{ imgName: 'B1', floorName: 'B1', displayName: 'B1', altitude: '(-4.8M)', includeEmpty: true },
{ imgName: 'B1', floorName: 'B1', displayName: 'B1', altitude: '(-7.95M)', includeEmpty: true },
{ imgName: '1F', floorName: '1F', displayName: '1F', altitude: '(0.0M)', includeEmpty: true },
{ imgName: '2F', floorName: '2F', displayName: '2F', altitude: '(6.6M)', includeEmpty: true },
{ imgName: '3F', floorName: '3F', displayName: '3F', altitude: '(12.15M)', includeEmpty: true },
......
......@@ -5,6 +5,21 @@ import { postAxios } from "../util/request";
import * as enumConfig from "../config/enum";
import { seatPointDjTableData, seatPointT1TableData, seatPointT2TableData } from "../data/table/roomPoint";
import { convertTIMDataToModelFormat } from "../dataPackage/tool";
import { planaryArrayBecomeOfBlockData } from "../util/analysisExcel";
const xlsx = require('node-xlsx');
const path = require('path');
/** 读取座椅设施规划情况.xlsx的指定sheet,返回数据块列表 */
export async function readZyssghqkSheet(sheetName: string) {
const filePath = path.join(__dirname.substring(0, __dirname.indexOf("out")), "res", "座椅设施规划情况.xlsx");
const workSheets = xlsx.parse(filePath);
const sheetMap: any = {};
for (const sh of workSheets) {
sheetMap[sh.name] = sh.data;
}
return planaryArrayBecomeOfBlockData(sheetMap[sheetName]);
}
/**
......@@ -206,6 +221,36 @@ export async function getTotal(req, res) {
let totalInfo = await postAxios(url, {}, {});
ret = totalInfo.body;
// 读取座椅设施规划情况.xlsx文件中全局页里面的座椅数量数据
const blockList: any = await readZyssghqkSheet("全局");
const nameMap: any = { "东交": "东交中心", "T1": "T1航站楼", "T2": "T2航站楼" };
const slBlock = blockList.find((b: any) => b.blockTitle === "座椅数量");
if (slBlock && slBlock.blockData) {
const headerRow = slBlock.blockData[0];
const yghIdx = headerRow.indexOf("已规划");
const ghzIdx = headerRow.indexOf("规划中");
const dghIdx = headerRow.indexOf("待规划");
ret["zyssghqksl"] = slBlock.blockData.slice(1).map((row: any) => ({
key: nameMap[row[0]] || row[0],
ygh: String(row[yghIdx] ?? ""),
ghz: String(row[ghzIdx] ?? ""),
dgh: String(row[dghIdx] ?? "")
}))?? [];
}
const mjBlock = blockList.find((b: any) => b.blockTitle === "座椅面积");
if (mjBlock && mjBlock.blockData) {
const headerRow = mjBlock.blockData[0];
const yghIdx = headerRow.indexOf("已规划");
const ghzIdx = headerRow.indexOf("规划中");
const dghIdx = headerRow.indexOf("待规划");
ret["zyssghqkmj"] = mjBlock.blockData.slice(1).map((row: any) => ({
key: nameMap[row[0]] || row[0],
ygh: String(row[yghIdx] ?? ""),
ghz: String(row[ghzIdx] ?? ""),
dgh: String(row[dghIdx] ?? "")
}))?? [];
}
res.send(ret);
}
......@@ -377,7 +422,21 @@ export async function getTerminal(req, res) {
let terminalInfo = await postAxios(url, {}, {});
ret = terminalInfo.body;
// 读取座椅设施规划情况.xlsx文件中${ld}页里面表头为${ld}的数据
const blockList: any = await readZyssghqkSheet(ld);
const ldBlock = blockList.find((b: any) => b.blockTitle === ld);
if (ldBlock && ldBlock.blockData) {
const headerRow = ldBlock.blockData[0];
const slIdx = headerRow.indexOf("数量");
const mjIdx = headerRow.indexOf("面积");
ret["zyssghqk"] = ldBlock.blockData.slice(1).map((row: any) => ({
key: row[0],
sl: String(row[slIdx] ?? ""),
mj: String(row[mjIdx] ?? "")
}));
}
res.send(ret);
}
......@@ -549,6 +608,20 @@ export async function getFloor(req, res) {
let floorInfo = await postAxios(url, {}, {});
ret = floorInfo.body;
// 读取座椅设施规划情况.xlsx文件中${ld}页里面表头为${lc}的数据
const blockList: any = await readZyssghqkSheet(ld);
const lcBlock = blockList.find((b: any) => b.blockTitle === lc);
if (lcBlock && lcBlock.blockData) {
const headerRow = lcBlock.blockData[0];
const slIdx = headerRow.indexOf("数量");
const mjIdx = headerRow.indexOf("面积");
ret["zyssghqk"] = lcBlock.blockData.slice(1).map((row: any) => ({
key: row[0],
sl: String(row[slIdx] ?? ""),
mj: String(row[mjIdx] ?? "")
}));
}
res.send(ret);
}
......@@ -673,7 +746,7 @@ export async function getSeatPoint(req, res) {
{ imgName: '1F', floorName: '1F', displayName: '1F', altitude: '(0.0M)', includeEmpty: true },
{ imgName: '2F', floorName: '2F', displayName: '2F', altitude: '(4.2M)', includeEmpty: true },
{ imgName: 'M2', floorName: 'M2', displayName: 'M2', altitude: '(8.55M)', includeEmpty: true },
{ imgName: '3F', floorName: '3F', displayName: '3F', altitude: '(4.2M)', includeEmpty: true },
{ imgName: '3F', floorName: '3F', displayName: '3F', altitude: '(12.15M)', includeEmpty: true },
],
'Dj': [
{ imgName: '3F', floorName: '3F', displayName: '3F', altitude: '(12.15M)', includeEmpty: true },
......
......@@ -33,6 +33,12 @@ export enum T1_ywyf {
"2F" = "5.4M",
"3F" = "10.9M",
"4F" = "16.4M",
// "B1" = "B1(-8.85M)",
// "1F" = "1F(0.0M)",
// "2F" = "2F(5.4M)",
// "3F" = "3F(10.9M)",
// "4F" = "4F(16.4M)",
}
......@@ -49,11 +55,26 @@ export enum T2_ywyf {
"6F" = "28.65M",
"7F" = "32.65M",
"8F" = "36.65M",
// "B1" = "B1(-7.95M)",
// "1F" = "1F(0.0M)",
// "2F" = "2F(4.2M)",
// "M2" = "M2(8.55M)",
// "3F-1" = "3F-1(12.15M)",
// "3F-2" = "3F-2(13.55M)",
// "M3" = "M3(17.15M)",
// "4F" = "4F(21.65M)",
// "5F" = "5F(24.65M)",
// "6F" = "6F(28.65M)",
// "7F" = "7F(32.65M)",
// "8F" = "8F(36.65M)",
}
export enum DJ_ywyf {
"B1" = "B1",
"1F" = "F1",
"2F" = "F2",
"3F" = "F3",
"4F" = "F4",
"5F" = "F5",
......@@ -73,6 +94,12 @@ export enum T1 {
"2F" = "5.4M",
"3F" = "10.9M",
"4F" = "16.4M",
// "B1" = "B1(-8.85M)",
// "1F" = "1F(0.0M)",
// "2F" = "2F(5.4M)",
// "3F" = "3F(10.9M)",
// "4F" = "4F(16.4M)",
}
......@@ -89,11 +116,26 @@ export enum T2 {
"6F" = "28.65M",
"7F" = "32.65M",
"8F" = "36.65M",
// "B1" = "B1(-7.95M)",
// "1F" = "1F(0.0M)",
// "2F" = "2F(4.2M)",
// "M2" = "M2(8.55M)",
// "3F-1" = "3F-1(12.15M)",
// "3F-2" = "3F-2(13.55M)",
// "M3" = "M3(17.15M)",
// "4F" = "4F(21.65M)",
// "5F" = "5F(24.65M)",
// "6F" = "6F(28.65M)",
// "7F" = "7F(32.65M)",
// "8F" = "8F(36.65M)",
}
export enum DJ {
"东交B1" = "-4.8M",
"东交B1" = "-7.95M",
"东交1F" = "0.0M",
"东交2F" = "6.6M",
"东交3F" = "12.15M",
"东交4F" = "19.05M",
"东交5F" = "24.15M",
......
......@@ -138,19 +138,19 @@ function organizeDataByFloor(dataList, buildingType, fileName, configs) {
let mapItem;
// 检查这个房间是否是套房的主房间
if (suiteMap.has(item.fjh)) {
if (suiteMap.has(item.fjh??item.bh)) {
// 这是一个套房主房间
mapItem = {
name: item.fjh,
name: item.fjh??item.bh,
x: item.xzzb,
y: item.yzzb,
size: item.dwdx === 'default' ? 'medium' : item.dwdx, // 套房通常用medium尺寸
suites: suiteMap.get(item.fjh)
suites: suiteMap.get(item.fjh??item.bh)
};
} else {
// 普通房间
mapItem = {
name: item.fjh,
name: item.fjh??item.bh,
x: item.xzzb,
y: item.yzzb,
size: item.dwdx
......
......@@ -45,7 +45,9 @@ export function setRouter(httpServer){
httpServer.post('/api/sign/analyse/floor', asyncHandler(bzbsRouters.getFloor));
httpServer.post('/api/sign/analyse/sign', asyncHandler(bzbsRouters.getSign));
// 登高车
httpServer.post('/api/dgc/analyse/total', asyncHandler(dgcRouters.getTotal));
httpServer.post('/api/dgc/analyse/pop', asyncHandler(dgcRouters.getDevicePop));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment