diff --git a/Backend/App_Data/BIMS_Mitsubishi_v01.ndm2 b/Backend/App_Data/BIMS_Mitsubishi_v03.ndm2 similarity index 99% rename from Backend/App_Data/BIMS_Mitsubishi_v01.ndm2 rename to Backend/App_Data/BIMS_Mitsubishi_v03.ndm2 index 6934d81..9b9b9f7 100644 --- a/Backend/App_Data/BIMS_Mitsubishi_v01.ndm2 +++ b/Backend/App_Data/BIMS_Mitsubishi_v03.ndm2 @@ -4606,260 +4606,6 @@ "triggers": [], "tablePartitions": [] }, - { - "objectType": "Table_MYSQL", - "name": "device_group", - "comment": "設備類別 - UI 過濾用", - "engine": "InnoDB", - "characterSet": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "autoIncrement": 0, - "tablespace": "", - "storage": "", - "insertMethod": "", - "connection": "", - "checksum": false, - "rowFormat": "Dynamic", - "avgRowLength": 0, - "maxRows": 0, - "minRows": 0, - "keyBlockSize": 0, - "packKeys": "", - "delayKeyWrite": false, - "dataDirectory": "", - "indexDirectory": "", - "statsAutoRecalc": "", - "statsPersistent": "", - "statsSamplePages": 0, - "union": "", - "pageCheckSum": false, - "transactional": false, - "compression": "", - "oldName": "device_group", - "encryption": false, - "createOptions": "", - "createTime": "2022-10-20 12:14:31", - "checkTime": "", - "dataFree": 0, - "dataLength": 147456, - "indexLength": 0, - "maxDataLength": 0, - "rows": 1040, - "updateTime": "", - "DDL": "CREATE TABLE `device_group` (\n `id` int(11) NOT NULL COMMENT 'id',\n `device_disaster` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '災類',\n `device_building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備東別guid',\n `device_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層guid',\n `device_system_category_layer2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_amount` int(11) NOT NULL DEFAULT '0' COMMENT '設備總計',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備類別 - UI 過濾用'", - "partitionBy": "", - "partitionByExpr": "", - "partitions": 0, - "partitionKeyAlgorithm": "", - "subPartitionBy": "", - "subPartitionByExpr": "", - "subPartitions": 0, - "subPartitionKeyAlgorithm": "", - "fields": [ - { - "objectType": "TableField_MYSQL", - "name": "id", - "type": "int", - "length": 11, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "", - "collation": "", - "isNullable": false, - "defaultType": "Others", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "id", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "id" - }, - { - "objectType": "TableField_MYSQL", - "name": "device_disaster", - "type": "varchar", - "length": 50, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "isNullable": true, - "defaultType": "Null", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "災類", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "device_disaster" - }, - { - "objectType": "TableField_MYSQL", - "name": "device_building_guid", - "type": "varchar", - "length": 36, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "isNullable": true, - "defaultType": "Null", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "設備東別guid", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "device_building_guid" - }, - { - "objectType": "TableField_MYSQL", - "name": "device_floor_guid", - "type": "varchar", - "length": 36, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "isNullable": true, - "defaultType": "Null", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "設備樓層guid", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "device_floor_guid" - }, - { - "objectType": "TableField_MYSQL", - "name": "device_system_category_layer2", - "type": "varchar", - "length": 50, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "isNullable": true, - "defaultType": "Null", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "device_system_category_layer2" - }, - { - "objectType": "TableField_MYSQL", - "name": "device_system_category_layer3", - "type": "varchar", - "length": 50, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "isNullable": true, - "defaultType": "Null", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "device_system_category_layer3" - }, - { - "objectType": "TableField_MYSQL", - "name": "device_amount", - "type": "int", - "length": 11, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "", - "collation": "", - "isNullable": false, - "defaultType": "Others", - "defaultValue": "0", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "設備總計", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "device_amount" - } - ], - "indexes": [], - "primaryKey": { - "objectType": "PrimaryKey_MYSQL", - "name": "", - "fields": [ - { - "objectType": "IndexField_MYSQL", - "name": "id", - "keyLength": 0, - "order": "", - "oldName": "id" - } - ], - "oldName": "", - "indexMethod": "BTREE", - "comment": "" - }, - "foreignKeys": [], - "triggers": [], - "tablePartitions": [] - }, { "objectType": "Table_MYSQL", "name": "device_item", @@ -9036,32 +8782,6 @@ "virtualType": "", "oldName": "floor_guid" }, - { - "objectType": "TableField_MYSQL", - "name": "building_guid", - "type": "varchar", - "length": 36, - "decimals": 0, - "isUnsigned": false, - "isZeroFill": false, - "setEnumValues": "", - "isBinary": false, - "charset": "utf8mb4", - "collation": "utf8mb4_unicode_ci", - "isNullable": false, - "defaultType": "Empty", - "defaultValue": "", - "isOnUpdateCurrentTimestamp": false, - "isAutoInc": false, - "comment": "區域guid", - "columnFormat": "", - "storage": "", - "isVirtual": false, - "isGeneratedAlways": false, - "virtualExpr": "", - "virtualType": "", - "oldName": "building_guid" - }, { "objectType": "TableField_MYSQL", "name": "building_tag", @@ -17489,6 +17209,286 @@ "foreignKeys": [], "triggers": [], "tablePartitions": [] + }, + { + "objectType": "Table_MYSQL", + "name": "device_group", + "comment": "設備類別 - UI 過濾用", + "engine": "InnoDB", + "characterSet": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "autoIncrement": 0, + "tablespace": "", + "storage": "", + "insertMethod": "", + "connection": "", + "checksum": false, + "rowFormat": "Dynamic", + "avgRowLength": 0, + "maxRows": 0, + "minRows": 0, + "keyBlockSize": 0, + "packKeys": "", + "delayKeyWrite": false, + "dataDirectory": "", + "indexDirectory": "", + "statsAutoRecalc": "", + "statsPersistent": "", + "statsSamplePages": 0, + "union": "", + "pageCheckSum": false, + "transactional": false, + "compression": "", + "oldName": "device_group", + "encryption": false, + "createOptions": "", + "createTime": "2022-10-20 12:14:31", + "checkTime": "", + "dataFree": 0, + "dataLength": 147456, + "indexLength": 0, + "maxDataLength": 0, + "rows": 1040, + "updateTime": "", + "DDL": "CREATE TABLE `device_group` (\n `id` int(11) NOT NULL COMMENT 'id',\n `device_disaster` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '災類',\n `device_building_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備東別guid',\n `device_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層guid',\n `device_system_category_layer2` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_system_category_layer3` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `device_amount` int(11) NOT NULL DEFAULT '0' COMMENT '設備總計',\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='設備類別 - UI 過濾用'", + "partitionBy": "", + "partitionByExpr": "", + "partitions": 0, + "partitionKeyAlgorithm": "", + "subPartitionBy": "", + "subPartitionByExpr": "", + "subPartitions": 0, + "subPartitionKeyAlgorithm": "", + "fields": [ + { + "objectType": "TableField_MYSQL", + "name": "id", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "id", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "id" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_disaster", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "災類", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_disaster" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_area_tag", + "type": "varchar", + "length": 36, + "decimals": -2147483648, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": true, + "defaultType": "Others", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備區域tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_area_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_building_tag", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備東別tag", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_building_tag" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_floor_guid", + "type": "varchar", + "length": 36, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備樓層guid", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_floor_guid" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_category_layer2", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_category_layer2" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_system_category_layer3", + "type": "varchar", + "length": 50, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "utf8mb4", + "collation": "utf8mb4_unicode_ci", + "isNullable": true, + "defaultType": "Null", + "defaultValue": "", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_system_category_layer3" + }, + { + "objectType": "TableField_MYSQL", + "name": "device_amount", + "type": "int", + "length": 11, + "decimals": 0, + "isUnsigned": false, + "isZeroFill": false, + "setEnumValues": "", + "isBinary": false, + "charset": "", + "collation": "", + "isNullable": false, + "defaultType": "Others", + "defaultValue": "0", + "isOnUpdateCurrentTimestamp": false, + "isAutoInc": false, + "comment": "設備總計", + "columnFormat": "", + "storage": "", + "isVirtual": false, + "isGeneratedAlways": false, + "virtualExpr": "", + "virtualType": "", + "oldName": "device_amount" + } + ], + "indexes": [], + "primaryKey": { + "objectType": "PrimaryKey_MYSQL", + "name": "", + "fields": [ + { + "objectType": "IndexField_MYSQL", + "name": "id", + "keyLength": 0, + "order": "", + "oldName": "id" + } + ], + "oldName": "", + "indexMethod": "BTREE", + "comment": "" + }, + "foreignKeys": [], + "triggers": [], + "tablePartitions": [] } ], "views": [] @@ -17513,8 +17513,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "auth_page", - "x": 20, - "y": 1440, + "x": 2080, + "y": 2270, "width": 270, "height": 250, "isBold": false, @@ -17529,8 +17529,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "building_menu", - "x": 720, - "y": 1260, + "x": 1960, + "y": 420, "width": 510, "height": 430, "isBold": false, @@ -17545,8 +17545,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "data_delivery_log", - "x": 1400, - "y": 2180, + "x": 490, + "y": 1730, "width": 181, "height": 170, "isBold": false, @@ -17577,8 +17577,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "device_disaster", - "x": 1230, - "y": 1100, + "x": 140, + "y": 510, "width": 320, "height": 110, "isBold": false, @@ -17593,10 +17593,10 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "device_group", - "x": 330, - "y": 1890, + "x": 1030, + "y": 80, "width": 320, - "height": 210, + "height": 220, "isBold": false, "titleColor": { "r": 55, @@ -17609,10 +17609,10 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "device_item", - "x": 30, - "y": 300, + "x": 1040, + "y": 460, "width": 430, - "height": 340, + "height": 380, "isBold": false, "titleColor": { "r": 55, @@ -17625,10 +17625,10 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "device_kind", - "x": 1100, - "y": 70, + "x": 0, + "y": 910, "width": 510, - "height": 750, + "height": 780, "isBold": false, "titleColor": { "r": 55, @@ -17673,8 +17673,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "emergency_event", - "x": 590, - "y": 2400, + "x": 30, + "y": 3160, "width": 280, "height": 220, "isBold": false, @@ -17689,8 +17689,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "emergency_item", - "x": 1410, - "y": 2380, + "x": 930, + "y": 3150, "width": 237, "height": 230, "isBold": false, @@ -17705,8 +17705,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "emergency_member", - "x": 890, - "y": 2360, + "x": 330, + "y": 3120, "width": 260, "height": 260, "isBold": false, @@ -17721,8 +17721,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "emergency_setting", - "x": 10, - "y": 1990, + "x": 620, + "y": 3070, "width": 290, "height": 310, "isBold": false, @@ -17737,8 +17737,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "floor", - "x": 350, - "y": 1320, + "x": 1880, + "y": 30, "width": 320, "height": 310, "isBold": false, @@ -17753,8 +17753,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "history_config", - "x": 370, - "y": 2120, + "x": 0, + "y": 1730, "width": 218, "height": 270, "isBold": false, @@ -17785,8 +17785,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "light_schedule", - "x": 1260, - "y": 1620, + "x": 190, + "y": 0, "width": 330, "height": 290, "isBold": false, @@ -17797,28 +17797,12 @@ "a": 1 } }, - { - "type": "table", - "schemaName": "bims_mitsubishi", - "tableName": "main_system", - "x": 870, - "y": 2080, - "width": 260, - "height": 250, - "isBold": false, - "titleColor": { - "r": 55, - "g": 131, - "b": 192, - "a": 1 - } - }, { "type": "table", "schemaName": "bims_mitsubishi", "tableName": "ontime_alarm_device_rawdata", - "x": 2150, - "y": 30, + "x": 40, + "y": 2890, "width": 230, "height": 230, "isBold": false, @@ -17833,8 +17817,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "ontime_device_subscription", - "x": 1610, - "y": 2150, + "x": 720, + "y": 1730, "width": 215, "height": 190, "isBold": false, @@ -17849,8 +17833,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "operation_back_log", - "x": 1140, - "y": 2160, + "x": 250, + "y": 1730, "width": 204, "height": 190, "isBold": false, @@ -17865,8 +17849,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "operation_log", - "x": 1170, - "y": 2390, + "x": 960, + "y": 1730, "width": 215, "height": 230, "isBold": false, @@ -17881,8 +17865,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "orion_OrionAppVersion", - "x": 2450, - "y": 30, + "x": 330, + "y": 2900, "width": 205, "height": 110, "isBold": false, @@ -17897,8 +17881,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "rescue_device", - "x": 10, - "y": 2320, + "x": 830, + "y": 1440, "width": 350, "height": 250, "isBold": false, @@ -17913,10 +17897,10 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "role", - "x": 2230, - "y": 870, + "x": 1800, + "y": 1740, "width": 181, - "height": 230, + "height": 250, "isBold": false, "titleColor": { "r": 55, @@ -17929,8 +17913,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "role_auth", - "x": 20, - "y": 1250, + "x": 2090, + "y": 2080, "width": 250, "height": 140, "isBold": false, @@ -17945,8 +17929,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "schedule_device", - "x": 360, - "y": 2430, + "x": 230, + "y": 370, "width": 230, "height": 110, "isBold": false, @@ -17957,46 +17941,14 @@ "a": 1 } }, - { - "type": "table", - "schemaName": "bims_mitsubishi", - "tableName": "sub_system", - "x": 600, - "y": 2110, - "width": 270, - "height": 220, - "isBold": false, - "titleColor": { - "r": 55, - "g": 131, - "b": 192, - "a": 1 - } - }, { "type": "table", "schemaName": "bims_mitsubishi", "tableName": "sub_system_floor", - "x": 1880, - "y": 30, + "x": 1560, + "y": 50, "width": 208, - "height": 290, - "isBold": false, - "titleColor": { - "r": 55, - "g": 131, - "b": 192, - "a": 1 - } - }, - { - "type": "table", - "schemaName": "bims_mitsubishi", - "tableName": "sub_system_floor_bak", - "x": 1920, - "y": 870, - "width": 239, - "height": 270, + "height": 310, "isBold": false, "titleColor": { "r": 55, @@ -18009,8 +17961,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "userinfo", - "x": 20, - "y": 870, + "x": 2100, + "y": 1700, "width": 240, "height": 330, "isBold": false, @@ -18025,8 +17977,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "variable", - "x": 290, - "y": 880, + "x": 1590, + "y": 500, "width": 250, "height": 310, "isBold": false, @@ -18041,8 +17993,8 @@ "type": "table", "schemaName": "bims_mitsubishi", "tableName": "building", - "x": 1260, - "y": 1270, + "x": 2300, + "y": 30, "width": 289, "height": 310, "isBold": false, @@ -18065,12 +18017,12 @@ "endStyle": "normal", "vertices": [ { - "x": 580, - "y": 490 + "x": 1590, + "y": 660 }, { - "x": 460, - "y": 490 + "x": 1470, + "y": 660 } ] }, @@ -18149,12 +18101,12 @@ "endStyle": "normal", "vertices": [ { - "x": 140, - "y": 1200 + "x": 2220, + "y": 2030 }, { - "x": 140, - "y": 1250 + "x": 2220, + "y": 2080 } ] }, @@ -18170,12 +18122,222 @@ "endStyle": "normal", "vertices": [ { - "x": 140, - "y": 1440 + "x": 2220, + "y": 2270 }, { - "x": 140, - "y": 1390 + "x": 2220, + "y": 2220 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 3", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 330, + "y": 840 + }, + { + "x": 330, + "y": 910 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 2", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 580, + "y": 440 + }, + { + "x": 460, + "y": 440 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 3 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 350, + "y": 290 + }, + { + "x": 350, + "y": 370 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 2 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 580, + "y": 570 + }, + { + "x": 460, + "y": 570 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 3 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 2430, + "y": 340 + }, + { + "x": 2430, + "y": 420 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 3", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 1960, + "y": 660 + }, + { + "x": 1840, + "y": 660 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 2 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 1880, + "y": 190 + }, + { + "x": 1770, + "y": 190 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 1980, + "y": 1860 + }, + { + "x": 2100, + "y": 1860 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 2 Copy 1 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 2300, + "y": 190 + }, + { + "x": 2200, + "y": 190 + } + ] + }, + { + "type": "arrow", + "name": "Arrow 1 Copy 1 Copy 1 Copy 2 Copy 1 Copy 1", + "opacity": 1.0, + "lineWidth": 3, + "dashStyle": "solid", + "capStyle": "flat", + "joinStyle": "miter", + "beginStyle": "none", + "endStyle": "normal", + "vertices": [ + { + "x": 1660, + "y": 500 + }, + { + "x": 1660, + "y": 360 } ] } diff --git a/Backend/Controllers/BuildMenuController.cs b/Backend/Controllers/BuildMenuController.cs index 2abdac1..6c02e75 100644 --- a/Backend/Controllers/BuildMenuController.cs +++ b/Backend/Controllers/BuildMenuController.cs @@ -646,7 +646,7 @@ namespace Backend.Controllers { var sqlString = @$"select v.id from building b - join variable v on v.system_type = @system_type and system_key = N'是否有3D' and v.deleted = 0 + join variable v on v.system_type = @system_type and system_key = N'是否有3D' and system_value = 'Y' and v.deleted = 0 where b.building_tag = @building_tag and (b.orgName_3D + b.saveName_3D) is not null;"; KeyValue = await backendRepository.GetAllAsync(sqlString, new { building_tag = post.building_tag, system_type = system_setting_type }); diff --git a/Backend/Controllers/DeviceManageController.cs b/Backend/Controllers/DeviceManageController.cs index ac5a17d..2f9aca4 100644 --- a/Backend/Controllers/DeviceManageController.cs +++ b/Backend/Controllers/DeviceManageController.cs @@ -200,9 +200,10 @@ namespace Backend.Controllers JOIN floor f ON d.device_floor_tag = f.full_name AND d.device_building_tag = f.building_tag LEFT JOIN device_kind dk ON dk.device_building_tag = d.device_building_tag AND dk.device_system_tag = d.device_system_tag AND dk.device_name_tag = d.device_name_tag ORDER BY d.priority ASC, d.device_number ASC"; - - var devices = await backendRepository.GetAllAsync(sql, new { - building_tag = post.building_tag, + + var devices = await backendRepository.GetAllAsync(sql, new + { + building_tag = post.building_tag, main_system_tag = post.device_system_tag, sub_system_tag = post.device_name_tag, floor_tag = post.device_floor_tag, @@ -269,7 +270,7 @@ namespace Backend.Controllers JOIN floor f ON d.device_floor_tag = f.full_name "; - object param = new { Deleted = 0, Device_guid = guid ,main_system_type = main_system_type , sub_system_type = sub_system_type }; + object param = new { Deleted = 0, Device_guid = guid, main_system_type = main_system_type, sub_system_type = sub_system_type }; var device = await backendRepository.GetOneAsync(sql, param); @@ -333,7 +334,7 @@ namespace Backend.Controllers { List> deviceDics = new List>(); List> device_disaster_dicts = new List>(); - + PostDeviceKind postDeviceKind = new PostDeviceKind(); using (var reader = new StreamReader(post.SelectedDevicesFile.OpenReadStream())) { string content = reader.ReadToEnd(); @@ -345,12 +346,14 @@ namespace Backend.Controllers var guid = Guid.NewGuid(); var split = device.Device_number.Split('_'); - var device_building_tag = !string.IsNullOrEmpty(split[0]) ? split[0] : ""; - var device_system_tag = !string.IsNullOrEmpty(split[1]) ? split[1] : ""; - var device_floor_tag = !string.IsNullOrEmpty(split[2]) ? split[2] : ""; - var device_name_tag = !string.IsNullOrEmpty(split[3]) ? split[3] : ""; - var device_serial_tag = !string.IsNullOrEmpty(split[4]) ? split[4] : ""; - string device_master = null; + var device_area_tag = !string.IsNullOrEmpty(split[0]) ? split[0] : ""; + var device_building_tag = !string.IsNullOrEmpty(post.Building_tag) ? post.Building_tag : ""; + var device_system_tag = !string.IsNullOrEmpty(post.Main_system_tag) ? post.Main_system_tag : ""; + var device_name_tag = !string.IsNullOrEmpty(post.Sub_system_tag) ? post.Sub_system_tag : ""; + var device_floor_tag = !string.IsNullOrEmpty(post.Floor_tag) ? post.Floor_tag : ""; + var device_last_name = !string.IsNullOrEmpty(split[6]) ? split[6] : ""; + var device_serial_tag = !string.IsNullOrEmpty(split[7]) ? split[7] : ""; + string device_master = "NA"; //針對燈具加入master if (device.Device_system_category_layer3 == "L1" || device.Device_system_category_layer3 == "L2") @@ -361,18 +364,27 @@ namespace Backend.Controllers Dictionary deviceDic = new Dictionary() { { "@device_guid", guid}, - { "@full_name", device_name_tag + device_serial_tag}, + { "@device_area_tag", device_area_tag}, { "@device_building_tag", device_building_tag}, { "@device_system_tag", device_system_tag}, { "@device_floor_tag", device_floor_tag}, { "@device_name_tag", device_name_tag}, { "@device_serial_tag", device_serial_tag}, + { "@device_last_name", device_last_name}, { "@device_master", device_master}, { "@device_number", device.Device_number}, { "@device_system_category_layer3", device.Device_system_category_layer3}, { "@created_by", myUserInfo.Userinfo_guid}, }; + postDeviceKind = new PostDeviceKind() + { + Device_building_tag = device_building_tag, + Device_system_tag = device_system_tag, + Device_floor_tag = device_floor_tag, + Device_name_tag = device_name_tag, + }; + deviceDics.Add(deviceDic); if (device.Device_disasters != null) @@ -402,6 +414,8 @@ namespace Backend.Controllers await ResetDeviceGroup(); //重新寫入設備群組 + await AddDeviceKind(postDeviceKind); + apiResult.Code = "0000"; apiResult.Msg = "修改成功"; @@ -804,7 +818,7 @@ namespace Backend.Controllers try { - var rawDatas = await backendRepository.GetAllAsync("import_niagara_tag", null,null,"device_building_tag, device_system_tag, device_floor_tag, device_name_tag"); + var rawDatas = await backendRepository.GetAllAsync("import_niagara_tag", null, null, "device_building_tag, device_system_tag, device_floor_tag, device_name_tag"); var rawDatas_Group_Building_tag = rawDatas.GroupBy(x => x.Device_building_tag).ToList(); List tempFilters = new List(); @@ -963,8 +977,8 @@ namespace Backend.Controllers FROM device d WHERE d.device_building_tag = @building_tag - AND d.device_system_tag = @main_system_tag - AND d.device_name_tag = @sub_system_tag + AND d.device_system_tag = @device_system_tag + AND d.device_name_tag = @device_name_tag -- AND d.floor_guid = @Floor_tag AND d.deleted = 0 ) d @@ -1025,6 +1039,70 @@ namespace Backend.Controllers return apiResult; } + + public async Task AddDeviceKind(PostDeviceKind post) + { + + string sWhere = @$"device_building_tag = @building_tag and device_system_tag = @system_tag and device_name_tag = @name_tag"; + + object param = new { building_tag = post.Device_building_tag, system_tag = post.Device_system_tag, name_tag = post.Device_name_tag }; + + var deviceKind = await backendRepository.GetOneAsync("device_kind", sWhere, param); + + if (deviceKind == null) + { + //新增 + //產生一組GUID + var guid = Guid.NewGuid(); + + //抓出點位名稱 + //var point_name = new PointName(); + + //var sql_device_normal_point = @"SELECT n.points AS device_normal_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_id = @device_normal_point_guid) n"; + //point_name.Device_normal_point_name = await backendRepository.GetOneAsync(sql_device_normal_point, new { device_normal_point_guid = post.Device_normal_point_guid }); + + //var sql_device_close_point = @"SELECT c.points AS device_close_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_close_point_guid) c"; + //point_name.Device_close_point_name = await backendRepository.GetOneAsync(sql_device_close_point, new { device_close_point_guid = post.Device_close_point_guid }); + + //var sql_device_error_point = @"SELECT e.points AS device_error_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_error_point_guid) e"; + //point_name.Device_error_point_name = await backendRepository.GetOneAsync(sql_device_error_point, new { device_error_point_guid = post.Device_error_point_guid }); + + Dictionary deviceKindDic = new Dictionary() + { + { "@device_kind_guid", guid}, + { "@device_building_tag", post.Device_building_tag}, + { "@device_system_tag", post.Device_system_tag}, + //{ "@device_floor_tag", post.Device_floor_tag}, + { "@device_name_tag", post.Device_name_tag}, + { "@device_image", null }, + { "@device_normal_text", post.Device_normal_text}, + { "@device_normal_point_guid", post.Device_normal_point_guid}, + { "@device_normal_point_name", null}, + { "@device_normal_point_col", post.Device_normal_point_col}, + { "@device_normal_point_value", post.Device_normal_point_value}, + { "@device_normal_color", post.Device_normal_color}, + { "@device_normal_flashing", post.Device_normal_flashing}, + { "@device_close_text", post.Device_close_text}, + { "@device_close_point_guid", post.Device_close_point_guid}, + { "@device_close_point_name", null}, + { "@device_close_point_col", post.Device_close_point_col}, + { "@device_close_point_value", post.Device_close_point_value}, + { "@device_close_color", post.Device_close_color}, + { "@device_close_flashing", post.Device_close_flashing}, + { "@device_error_text", post.Device_error_text}, + { "@device_error_point_guid", post.Device_error_point_guid}, + { "@device_error_point_name", null}, + { "@device_error_point_col", post.Device_error_point_col}, + { "@device_error_point_value", post.Device_error_point_value}, + { "@device_error_color", post.Device_error_color}, + { "@device_error_flashing", post.Device_error_flashing}, + { "@device_error_independent", post.Device_error_independent}, + { "@created_by", myUserInfo.Userinfo_guid} + }; + await backendRepository.AddOneByCustomTable(deviceKindDic, "device_kind"); + } + } + /// /// 修改 設備基本資料 /// @@ -1062,14 +1140,14 @@ namespace Backend.Controllers //抓出點位名稱 var point_name = new PointName(); - var sql_device_normal_point = @"SELECT n.points AS device_normal_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_normal_point_guid) n"; - point_name.Device_normal_point_name = await backendRepository.GetOneAsync(sql_device_normal_point, new { device_normal_point_guid = post.Device_normal_point_guid }); + var sql_device_normal_point = @"SELECT n.points AS device_normal_point_name FROM (SELECT * FROM device_item di WHERE di.id = @device_normal_point_id) n"; + point_name.Device_normal_point_name = await backendRepository.GetOneAsync(sql_device_normal_point, new { device_normal_point_id = post.Device_normal_point_guid }); - var sql_device_close_point = @"SELECT c.points AS device_close_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_close_point_guid) c"; - point_name.Device_close_point_name = await backendRepository.GetOneAsync(sql_device_close_point, new { device_close_point_guid = post.Device_close_point_guid }); + var sql_device_close_point = @"SELECT c.points AS device_close_point_name FROM (SELECT * FROM device_item di WHERE di.id = @device_close_point_id) c"; + point_name.Device_close_point_name = await backendRepository.GetOneAsync(sql_device_close_point, new { device_close_point_id = post.Device_close_point_guid }); - var sql_device_error_point = @"SELECT e.points AS device_error_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_error_point_guid) e"; - point_name.Device_error_point_name = await backendRepository.GetOneAsync(sql_device_error_point, new { device_error_point_guid = post.Device_error_point_guid }); + var sql_device_error_point = @"SELECT e.points AS device_error_point_name FROM (SELECT * FROM device_item di WHERE di.id = @device_error_point_id) e"; + point_name.Device_error_point_name = await backendRepository.GetOneAsync(sql_device_error_point, new { device_error_point_id = post.Device_error_point_guid }); Dictionary deviceKindDic = new Dictionary() { @@ -1119,23 +1197,23 @@ namespace Backend.Controllers } #region 新增至派送資料表 - List fileInfos = new List(); - if (post.Device_image_file != null) - { - var split = post.Device_image_file.FileName.Split("."); - var fileName = guid + "." + split[split.Length - 1]; + //List fileInfos = new List(); + //if (post.Device_image_file != null) + //{ + // var split = post.Device_image_file.FileName.Split("."); + // var fileName = guid + "." + split[split.Length - 1]; - var fullPath = Path.Combine(deviceKindFileSaveAsPath, fileName); + // var fullPath = Path.Combine(deviceKindFileSaveAsPath, fileName); - Repository.Models.FileInfo fileInfo = new Repository.Models.FileInfo(); - fileInfo.Folder = "device_icon"; - fileInfo.OriginalFileName = null; - fileInfo.FileName = fileName; - fileInfo.File = fullPath; + // Repository.Models.FileInfo fileInfo = new Repository.Models.FileInfo(); + // fileInfo.Folder = "device_icon"; + // fileInfo.OriginalFileName = null; + // fileInfo.FileName = fileName; + // fileInfo.File = fullPath; - fileInfos.Add(fileInfo); - await backendRepository.ManualInsertFileBackgroundServiceTask("", "", "device_kind", fileInfos); - } + // fileInfos.Add(fileInfo); + // await backendRepository.ManualInsertFileBackgroundServiceTask("", "", "device_kind", fileInfos); + //} #endregion apiResult.Code = "0000"; @@ -1160,14 +1238,14 @@ namespace Backend.Controllers //抓出點位名稱 var point_name = new PointName(); - var sql_device_normal_point = @"SELECT n.points AS device_normal_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_normal_point_guid) n"; - point_name.Device_normal_point_name = await backendRepository.GetOneAsync(sql_device_normal_point, new { device_normal_point_guid = post.Device_normal_point_guid }); + var sql_device_normal_point = @"SELECT n.points AS device_normal_point_name FROM (SELECT * FROM device_item di WHERE di.id = @device_normal_point_id) n"; + point_name.Device_normal_point_name = await backendRepository.GetOneAsync(sql_device_normal_point, new { device_normal_point_id = post.Device_normal_point_guid }); - var sql_device_close_point = @"SELECT c.points AS device_close_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_close_point_guid) c"; - point_name.Device_close_point_name = await backendRepository.GetOneAsync(sql_device_close_point, new { device_close_point_guid = post.Device_close_point_guid }); + var sql_device_close_point = @"SELECT c.points AS device_close_point_name FROM (SELECT * FROM device_item di WHERE di.id = @device_close_point_id) c"; + point_name.Device_close_point_name = await backendRepository.GetOneAsync(sql_device_close_point, new { device_close_point_id = post.Device_close_point_guid }); - var sql_device_error_point = @"SELECT e.points AS device_error_point_name FROM (SELECT * FROM device_item di WHERE di.device_item_guid = @device_error_point_guid) e"; - point_name.Device_error_point_name = await backendRepository.GetOneAsync(sql_device_error_point, new { device_error_point_guid = post.Device_error_point_guid }); + var sql_device_error_point = @"SELECT e.points AS device_error_point_name FROM (SELECT * FROM device_item di WHERE di.id = @device_error_point_id) e"; + point_name.Device_error_point_name = await backendRepository.GetOneAsync(sql_device_error_point, new { device_error_point_id = post.Device_error_point_guid }); Dictionary deviceKindDic = new Dictionary() { @@ -1217,23 +1295,23 @@ namespace Backend.Controllers } #region 新增至派送資料表 - List fileInfos = new List(); - if (post.Device_image_file != null) - { - var split = post.Device_image_file.FileName.Split("."); - var fileName = image_guid + "." + split[split.Length - 1]; + //List fileInfos = new List(); + //if (post.Device_image_file != null) + //{ + // var split = post.Device_image_file.FileName.Split("."); + // var fileName = image_guid + "." + split[split.Length - 1]; - var fullPath = Path.Combine(deviceKindFileSaveAsPath, fileName); + // var fullPath = Path.Combine(deviceKindFileSaveAsPath, fileName); - Repository.Models.FileInfo fileInfo = new Repository.Models.FileInfo(); - fileInfo.Folder = "device_icon"; - fileInfo.OriginalFileName = deviceKind.Device_image; - fileInfo.FileName = fileName; - fileInfo.File = fullPath; + // Repository.Models.FileInfo fileInfo = new Repository.Models.FileInfo(); + // fileInfo.Folder = "device_icon"; + // fileInfo.OriginalFileName = deviceKind.Device_image; + // fileInfo.FileName = fileName; + // fileInfo.File = fullPath; - fileInfos.Add(fileInfo); - await backendRepository.ManualInsertFileBackgroundServiceTask("", "", "device_kind", fileInfos); - } + // fileInfos.Add(fileInfo); + // await backendRepository.ManualInsertFileBackgroundServiceTask("", "", "device_kind", fileInfos); + //} #endregion apiResult.Code = "0000"; @@ -1255,9 +1333,9 @@ namespace Backend.Controllers private async Task ResetDeviceGroup() { //先刪除整個device_group - var delete_group_sql = @"DROP TABLE IF EXISTS `device_group` ; + var delete_group_sql = @"DROP TABLE IF EXISTS `device_group` ; CREATE TABLE `device_group` ( - `id` int(11) NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, `device_disaster` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '災類', `device_building_tag` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備東別guid', `device_floor_guid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '設備樓層guid', @@ -1274,13 +1352,14 @@ namespace Backend.Controllers INSERT INTO device_group (device_disaster, device_building_tag, device_floor_guid, device_system_category_layer2, device_system_category_layer3, device_amount) SELECT dd.device_system_value AS device_disaster, - d.building_tag AS device_building_tag, - d.floor_guid AS device_floor_guid, + d.device_building_tag AS device_building_tag, + f.floor_guid AS device_floor_guid, vv.device_system_category_layer2 AS device_system_category_layer2, d.device_system_category_layer3 AS device_system_category_layer3, count(*) AS device_amount FROM device d JOIN device_disaster dd ON d.device_guid = dd.device_guid + JOIN floor f ON d.device_floor_tag = f.full_name JOIN (SELECT v.system_value AS device_system_category_layer3, v2.system_value AS device_system_category_layer2 @@ -1290,8 +1369,8 @@ namespace Backend.Controllers ) vv ON d.device_system_category_layer3 = vv.device_system_category_layer3 WHERE d.deleted = 0 GROUP BY dd.device_system_value, - d.building_tag, - d.floor_guid, + d.device_building_tag, + f.floor_guid, vv.device_system_category_layer2, d.device_system_category_layer3"; @@ -1317,7 +1396,7 @@ namespace Backend.Controllers deviceGroupsDics.Add(deviceGroupDic); } - await backendRepository.ManualInsertBackgroundServiceTask("", "", "device_group", "purge_all_insert", deviceGroupsDics); + #endregion } @@ -1386,7 +1465,7 @@ namespace Backend.Controllers { string sWhere = "device_master_guid = @Device_master_guid"; - object param = new {Device_master_guid = guid }; + object param = new { Device_master_guid = guid }; var deviceMaster = await backendRepository.GetOneAsync("device_master", sWhere, param); @@ -1438,7 +1517,7 @@ namespace Backend.Controllers } string temp_device_master_number = null; - if (!string.IsNullOrEmpty( post.Device_building_tag) && !string.IsNullOrEmpty(post.Device_name_tag)) + if (!string.IsNullOrEmpty(post.Device_building_tag) && !string.IsNullOrEmpty(post.Device_name_tag)) { temp_device_master_number = post.Device_building_tag + "_" + post.Device_name_tag; } @@ -1581,7 +1660,7 @@ namespace Backend.Controllers try { - string sWhere = "deleted = 0 AND sub_system_tag = @Sub_system_tag"; + string sWhere = "deleted = 0 AND device_name_tag = @Sub_system_tag"; object param = new { Sub_system_tag = sub_system_tag }; diff --git a/Backend/Views/BuildMenu/Index.cshtml b/Backend/Views/BuildMenu/Index.cshtml index 55f2e9c..625704e 100644 --- a/Backend/Views/BuildMenu/Index.cshtml +++ b/Backend/Views/BuildMenu/Index.cshtml @@ -175,8 +175,8 @@ -
-
+
+
@@ -263,7 +263,13 @@
- + + +
+
+ @@ -294,7 +300,7 @@
-
+
@@ -973,7 +979,7 @@ $(drawingParent).find('[id^=build_menu_icon_click_url_width_height_modal_div]').hide(); $(drawingParent).find('[id^=build_menu_planimetric_floor_modal_div]').hide(); $(drawingParent).find('[id^=build_menu_systemurl_modal_div]').hide(); - + $(drawingParent).find('[id^=build_menu_planimetric_modal_div]').show(); if ($(value).val() == 2) { $(drawingParent).find('[id^=planimetric_click]').attr("disabled", false); $(drawingParent).find('[id^=build_menu_systemurl_modal_div]').show(); @@ -992,6 +998,8 @@ $(drawingParent).find('[id^=build_menu_blankurl_modal_div]').show(); } else if ($(value).val() == 3) { $(drawingParent).find('[id^=planimetric_click]').prop("checked", false).attr("disabled", true); + } else { + $(drawingParent).find('[id^=build_menu_planimetric_modal_div]').hide(); } }) diff --git a/Backend/Views/DeviceManage/Index.cshtml b/Backend/Views/DeviceManage/Index.cshtml index 41a5bb0..2b97f38 100644 --- a/Backend/Views/DeviceManage/Index.cshtml +++ b/Backend/Views/DeviceManage/Index.cshtml @@ -166,7 +166,7 @@
- 區域 + 棟別
@@ -1494,10 +1494,10 @@ "url": "/DeviceManage/DeviceKindTableList", "type": "POST", "data": function (d) { - d.Building_tag = selected_building_menu.building_tag ? selected_building_menu.building_tag : ""; - d.Main_system_tag = selected_building_menu.main_system ? selected_building_menu.main_system.main_system_tag : ""; - d.Sub_system_tag = selected_building_menu.main_system ? selected_building_menu.main_system.sub_system ? selected_building_menu.main_system.sub_system.sub_system_tag : "" : ""; - d.Floor_tag = selected_floor_tag ? selected_floor_tag : ""; + d.building_tag = selected_building_menu.building_tag ? selected_building_menu.building_tag : ""; + d.device_system_tag = selected_building_menu.main_system ? selected_building_menu.main_system.main_system_tag : ""; + d.device_name_tag = selected_building_menu.main_system ? selected_building_menu.main_system.sub_system ? selected_building_menu.main_system.sub_system.sub_system_tag : "" : ""; + //d.Floor_tag = selected_floor_tag ? selected_floor_tag : ""; }, "dataSrc": function (rel) { if (rel.code == "9999") { @@ -1545,7 +1545,6 @@ return; } else { - device_kind_data = rel.data; //取得單一設備基本資料 @@ -1575,9 +1574,9 @@ $("#device_close_point_name_modal").append($("