From d845312bb27972771b566054a906cc25af83e209 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 26 五月 2025 17:32:07 +0800
Subject: [PATCH] 添加货位排图功能
---
代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js | 4
/dev/null | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs | 60 ++++++
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/652a771c-a3ae-42e9-830b-5ed6ccfb1711.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs | 111 +++++++++++
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/locationInfoRow.vue | 385 ++++++++++++++++++++++++++++++++++++++
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19d5ae45-3a83-4410-845f-c9171efb0b93.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json | 2
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd599f2b-2dfa-4770-8051-fa2d6b46372d.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9528bf53-2d7f-4000-b6f7-8c81cee17136.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0e979b6f-9ff2-47ad-99d3-7cc8a7e6a04e.vsidx | 0
11 files changed, 561 insertions(+), 1 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js"
index efc14f3..4894b77 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js"
@@ -42,6 +42,10 @@
name: 'locationInfo',
component: () => import('@/views/basic/locationInfo.vue')
}, {
+ path: '/locationInfoRow',
+ name: 'locationInfoRow',
+ component: () => import('@/views/basic/locationInfoRow.vue')
+ }, {
path: '/materielInfo',
name: 'materielInfo',
component: () => import('@/views/basic/materielInfo.vue')
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfoRow.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfoRow.vue"
new file mode 100644
index 0000000..642ae96
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfoRow.vue"
@@ -0,0 +1,385 @@
+<template>
+ <div class="container">
+ <div class="header">
+ <h2 class="title">璐т綅鎺掑浘</h2>
+ </div>
+
+ <div class="content-wrapper">
+ <!-- 鎺у埗闈㈡澘鍖哄煙 -->
+ <div class="control-panel">
+ <div class="form-group">
+ <label>鍖哄煙锛�</label>
+ <el-select
+ size="mini"
+ filterable
+ v-model="Area.shelf_code"
+ placeholder="璇烽�夋嫨"
+ class="full-width"
+ >
+ <el-option
+ v-for="item in slectData"
+ :value="item.shelf_code"
+ :label="item.house_name"
+ :key="item.house_name"
+ ></el-option>
+ </el-select>
+ </div>
+
+ <div class="form-group">
+ <label>鎺掞細</label>
+ <el-select
+ size="mini"
+ clearable
+ filterable
+ @change="SCChange"
+ v-model="Area.tunnel"
+ placeholder="璇烽�夋嫨"
+ class="full-width"
+ >
+ <el-option
+ v-for="item in scList"
+ :value="item"
+ :label="item"
+ :key="item"
+ ></el-option>
+ </el-select>
+ </div>
+
+ <el-button type="success" class="refresh-btn" @click="GetViewData">
+ 鍒锋柊
+ </el-button>
+
+ <div class="legend-section">
+ <h4>璇存槑</h4>
+ <div class="legend-grid">
+ <div
+ class="legend-item"
+ v-for="item in infoMsg"
+ :key="item.bgcolor"
+ >
+ <span
+ class="color-box"
+ :style="{ 'background-color': item.bgcolor }"
+ ></span>
+ <span class="legend-label">{{ item.msg }}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- 璐т綅灞曠ず鍖哄煙 -->
+ <div class="location-view">
+ <div
+ class="layer-container"
+ v-for="layer in locationData"
+ :key="layer.index"
+ >
+ <h3 class="layer-title">绗瑊{ layer.index }}灞�</h3>
+ <div class="row" v-for="row in layer.rows" :key="row.index">
+ <div
+ class="location-cell"
+ :style="{ 'background-color': GetBgColor(col) }"
+ v-for="col in row.cols"
+ :key="col.index"
+ @mouseenter="showTooltip(col, $event)"
+ @mouseleave="hideTooltip"
+ >
+ {{ row.index }}-{{ col.index }}-{{ layer.index }}
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- 鎮诞鎻愮ず妗� -->
+ <div
+ v-if="showTooltipFlag"
+ class="location-tooltip"
+ :style="{
+ left: tooltipPosition.x + 'px',
+ top: tooltipPosition.y + 'px',
+ }"
+ >
+ <div v-if="currentLocation">
+ <p><strong>璐т綅鍙�:</strong>{{ currentLocation.locationCode }}</p>
+ <p>
+ <strong>璐т綅鎺掑垪灞�:</strong> {{ currentLocation.row }}鎺抺{
+ currentLocation.layer
+ }}鍒梴{ currentLocation.index }}灞�
+ </p>
+ <p><strong>鐘舵��:</strong> {{ getStatusText(currentLocation) }}</p>
+ <p>
+ <strong>绂佺敤:</strong>
+ {{ currentLocation.location_lock == 3 ? "鏄�" : "鍚�" }}
+ </p>
+ <!-- <p v-if="currentLocation.location_state > 0">
+ <strong>鐗╂枡缂栫爜:</strong>
+ {{ currentLocation.material_code || "鏃�" }}
+ </p>
+ <p v-if="currentLocation.location_state > 0">
+ <strong>鏁伴噺:</strong> {{ currentLocation.quantity || "鏃�" }}
+ </p> -->
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { ElButton } from "element-plus";
+
+export default {
+ data() {
+ return {
+ slectData: [],
+ scList: [],
+ Area: { house_name: "", tunnel: "", shelf_code: "" },
+ mian_height: "",
+ infoMsg: [
+ { bgcolor: "lightgreen", msg: "绌鸿揣浣�", state: 0 },
+ { bgcolor: "orange", msg: "鏈夎揣", state: 100 },
+ { bgcolor: "#2BB3D5", msg: "閿佸畾", state: "InAssigned" },
+ { bgcolor: "#ccc", msg: "绂佺敤", state: 3 },
+ // { bgcolor: "red", msg: "绂佺敤", state: 3 },
+ { bgcolor: "#b7ba6b", msg: "鍏跺畠", state: "else" },
+ ],
+ locationData: [],
+ showTooltipFlag: false,
+ currentLocation: null,
+ tooltipPosition: { x: 0, y: 0 },
+ };
+ },
+ computed: {
+ GetBgColor() {
+ return (col) => {
+ var bgColor = "#b7ba6b";
+ //浼樺厛鏄剧ず绂佺敤鐘舵��
+ if (col.location_lock == 3) {
+ this.infoMsg.forEach((el) => {
+ if (el.state == col.location_lock) {
+ bgColor = el.bgcolor;
+ }
+ });
+ } else {
+ this.infoMsg.forEach((el) => {
+ if (col.location_state > 0 && col.location_state < 100) {
+ if (el.state == "InAssigned") {
+ bgColor = el.bgcolor;
+ }
+ } else if (el.state == col.location_state) {
+ bgColor = el.bgcolor;
+ }
+ });
+ }
+ return bgColor;
+ };
+ },
+ },
+ watch: {
+ //鍒囨崲搴撳尯
+ "Area.shelf_code"(newValue, oldValue) {
+ this.scList = [];
+ this.slectData.forEach((e) => {
+ if (e.shelf_code == newValue) {
+ this.Area.tunnel = e.tunnel[0];
+ this.scList = e.tunnel;
+ }
+ });
+ this.GetViewData();
+ },
+ },
+ methods: {
+ GetViewData() {
+ var _this = this;
+ this.http
+ .post("/api/LocationInfoRow/GetLocationStatu", _this.Area, "鏌ヨ涓�")
+ .then((x) => {
+ _this.locationData = x;
+ console.log("鍚庣杩斿洖:", x);
+ });
+ },
+ // 鍒囨崲鎺�
+ SCChange() {
+ this.GetViewData();
+ },
+ showTooltip(location, event) {
+ this.currentLocation = location;
+ this.showTooltipFlag = true;
+
+ // 璁剧疆鎻愮ず妗嗕綅缃紝绋嶅井鍋忕Щ閬垮厤閬尅榧犳爣
+ this.tooltipPosition = {
+ x: event.clientX + 10,
+ y: event.clientY + 10,
+ };
+ },
+
+ hideTooltip() {
+ this.showTooltipFlag = false;
+ this.currentLocation = null;
+ },
+
+ getStatusText(location) {
+ // if (location.location_lock === 3) return "绂佺敤";
+ if (location.location_state === 0) return "绌鸿揣浣�";
+ if (location.location_state === 1) return "閿佸畾";
+ if (location.location_state === 10) return "鏈夎揣閿佸畾";
+ if (location.location_state === 20) return "绌洪棽閿佸畾";
+ if (location.location_state === 99) return "澶ф墭鐩橀攣瀹�";
+ if (location.location_state === 100) return "鏈夎揣";
+ // if (location.location_state > 0 && location.location_state < 100)
+ // return "閿佸畾";
+ return "鍏朵粬";
+ },
+ },
+ mounted() {
+ var mainHeight = document.getElementById("vol-main");
+ this.mian_height = mainHeight.offsetHeight - 40 + "px";
+ var _this = this;
+ //鍔犺浇涓嬫媺閫夐」
+ this.http.get("/api/LocationInfoRow/GetArea", {}, "鏌ヨ涓�").then((x) => {
+ _this.slectData = x;
+ //鍔犺浇绗竴涓尯鍩燂紝绗竴鎺�
+ _this.Area.shelf_code = _this.slectData[0].shelf_code;
+ _this.scList = _this.slectData[0].tunnel;
+ });
+ },
+ components: { ElButton },
+};
+</script>
+
+<style scoped>
+.container {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ padding: 10px;
+}
+
+.header {
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+.title {
+ font-size: 20px;
+ font-weight: bold;
+ margin: 0;
+}
+
+.content-wrapper {
+ display: flex;
+ flex: 1;
+ min-height: 0;
+}
+
+.control-panel {
+ width: 220px;
+ padding: 15px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ margin-right: 15px;
+ display: flex;
+ flex-direction: column;
+}
+
+.form-group {
+ margin-bottom: 15px;
+}
+
+.full-width {
+ width: 100%;
+}
+
+.refresh-btn {
+ margin-top: 10px;
+ width: 100%;
+}
+
+.legend-section {
+ margin-top: 30px;
+}
+
+.legend-section h4 {
+ margin-bottom: 10px;
+}
+
+.legend-grid {
+ display: grid;
+ grid-template-columns: 1fr;
+ gap: 8px;
+}
+
+.legend-item {
+ display: flex;
+ align-items: center;
+}
+
+.color-box {
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ margin-right: 8px;
+ border-radius: 3px;
+}
+
+.legend-label {
+ font-size: 13px;
+}
+
+.location-view {
+ flex: 1;
+ overflow: auto;
+ padding: 10px;
+ background-color: white;
+ border-radius: 4px;
+}
+
+.layer-container {
+ margin-bottom: 25px;
+}
+
+.layer-title {
+ margin: 0 0 10px 0;
+ font-size: 16px;
+ color: #333;
+}
+
+.row {
+ display: flex;
+ flex-wrap: wrap;
+ margin-bottom: 8px;
+}
+
+.location-cell {
+ width: 66px;
+ height: 38px;
+ margin: 3px;
+ text-align: center;
+ font-size: 14px;
+ border-radius: 3px;
+ line-height: 38px;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.location-tooltip {
+ position: fixed;
+ z-index: 9999;
+ background-color: white;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ padding: 10px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+ pointer-events: none;
+ max-width: 250px;
+}
+
+.location-tooltip p {
+ margin: 5px 0;
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.location-tooltip strong {
+ display: inline-block;
+ width: 70px;
+ color: #666;
+}
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0e979b6f-9ff2-47ad-99d3-7cc8a7e6a04e.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0e979b6f-9ff2-47ad-99d3-7cc8a7e6a04e.vsidx"
new file mode 100644
index 0000000..c9627b3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/0e979b6f-9ff2-47ad-99d3-7cc8a7e6a04e.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19d5ae45-3a83-4410-845f-c9171efb0b93.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19d5ae45-3a83-4410-845f-c9171efb0b93.vsidx"
new file mode 100644
index 0000000..e817720
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/19d5ae45-3a83-4410-845f-c9171efb0b93.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx"
deleted file mode 100644
index cff3a69..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5c317bcb-c94b-4bed-9f83-e46eb803dadb.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx"
deleted file mode 100644
index 8d922a8..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/64543623-d20f-4ad8-bb49-9a281bd1f5fd.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/652a771c-a3ae-42e9-830b-5ed6ccfb1711.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/652a771c-a3ae-42e9-830b-5ed6ccfb1711.vsidx"
new file mode 100644
index 0000000..2e8d84b
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/652a771c-a3ae-42e9-830b-5ed6ccfb1711.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx"
deleted file mode 100644
index 805f38c..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/75693363-5582-43f5-be32-c05f8e59864c.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9528bf53-2d7f-4000-b6f7-8c81cee17136.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9528bf53-2d7f-4000-b6f7-8c81cee17136.vsidx"
new file mode 100644
index 0000000..d24f3e4
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/9528bf53-2d7f-4000-b6f7-8c81cee17136.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx"
deleted file mode 100644
index ce60ad3..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/98f0b9d5-ff15-4c89-a627-e626a260486c.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx"
deleted file mode 100644
index 2ef2e25..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d49d81fa-65e0-4032-aa26-ddf7a5143c09.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx"
deleted file mode 100644
index 098db04..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d85656c6-7405-43eb-91ab-044d483b115b.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd599f2b-2dfa-4770-8051-fa2d6b46372d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd599f2b-2dfa-4770-8051-fa2d6b46372d.vsidx"
new file mode 100644
index 0000000..70aef67
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dd599f2b-2dfa-4770-8051-fa2d6b46372d.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock"
deleted file mode 100644
index e69de29..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock"
+++ /dev/null
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs"
new file mode 100644
index 0000000..ee5e1a0
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs"
@@ -0,0 +1,60 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Basic
+{
+ public class LocationArea
+ {
+ /// <summary>
+ /// 搴撳尯鍚嶇О
+ /// </summary>
+ public string house_name { get; set; }
+
+ /// <summary>
+ /// 搴撳尯缂栧彿
+ /// </summary>
+ public int shelf_code { get; set; }
+
+ /// <summary>
+ ///
+ /// </summary>
+ public int tunnel { get; set; }
+ }
+
+
+ public class LocationLayer
+ {
+ public int index { get; set; }
+ public List<LocationRow> rows { get; set; }
+ }
+ public class LocationRow
+ {
+ public int index { get; set; }
+ public List<LocationCol> cols { get; set; }
+ }
+
+ public class LocationCol
+ {
+ public string locationCode { get; set; }
+ public int row { get; set; }
+ public int layer { get; set; }
+
+ public int index { get; set; }
+ /// <summary>
+ /// 妫�娴嬫煖鐘舵��
+ /// </summary>
+ public string remark { get; set; }
+ /// <summary>
+ /// 璐т綅鐘舵��
+ /// </summary>
+ public int location_state { get; set; }
+ /// <summary>
+ /// 閿佸畾鐘舵��
+ /// </summary>
+ public int location_lock { get; set; }
+ }
+
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs"
new file mode 100644
index 0000000..6e016f9
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs"
@@ -0,0 +1,111 @@
+锘縰sing HslCommunication.WebSocket;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System.Collections.Generic;
+using WIDESEA_Common.CommonEnum;
+using WIDESEA_Common.LocationEnum;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseController;
+using WIDESEA_Core.Enums;
+using WIDESEA_DTO.Basic;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
+using WIDESEA_ISystemRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_WMSServer.Controllers.Basic
+{
+ /// <summary>
+ /// 璐т綅
+ /// </summary>
+ [Route("api/LocationInfoRow")]
+ [ApiController]
+ public class LocationInfoRowController : ApiBaseController<ILocationInfoService, Dt_LocationInfo>
+ {
+ private readonly ILocationInfoRepository _repository;
+ private readonly ISys_RoleDataPermissionRepository _permissionRepository;
+ private readonly ILocationInfoRepository _locationInfoRepository;
+ public LocationInfoRowController(ILocationInfoService service, ILocationInfoRepository repository, ISys_RoleDataPermissionRepository permissionRepository, ILocationInfoRepository locationInfoRepository) : base(service)
+ {
+ _repository = repository;
+ _permissionRepository = permissionRepository;
+ _locationInfoRepository = locationInfoRepository;
+ }
+ /// <summary>
+ /// 鑾峰彇搴撳尯鏉冮檺
+ /// </summary>
+ /// <returns></returns>
+ [HttpGet, HttpPost, Route("GetArea"), AllowAnonymous]
+ public object GetArea()
+ {
+ List<object> list = new List<object>();
+ List<Dt_LocationInfo>? locations = null;
+ List<Sys_RoleDataPermission> permissions = _permissionRepository.QueryData(x => x.RoleId == App.User.RoleId);
+ if (permissions.Count > 0)
+ locations = _locationInfoRepository.QueryData(x => permissions.Select(k => k.WarehouseId).ToList().Contains(x.WarehouseId));
+ foreach (var permission in permissions)
+ {
+ var Rows = locations.Where(x => x.WarehouseId == permission.WarehouseId).GroupBy(x => x.Row).Select(x => x.Key).OrderBy(x => x).ToList();
+ var obj = new
+ {
+ house_name = permission.WarehouseName,
+ shelf_code = permission.WarehouseId,
+ tunnel = Rows
+ };
+ list.Add(obj);
+ }
+ return list;
+ }
+ /// <summary>
+ /// 鑾峰彇璐т綅淇℃伅
+ /// </summary>
+ /// <param name="area"></param>
+ /// <returns></returns>
+ [HttpPost, Route("GetLocationStatu"), AllowAnonymous]
+ public object GetLocationStatu([FromBody] LocationArea area)
+ {
+ List<LocationLayer> layers = new List<LocationLayer>();
+ var data = _locationInfoRepository.QueryData(x => x.WarehouseId == area.shelf_code && x.Row == area.tunnel);
+ foreach (var layer in data.GroupBy(t => t.Layer))
+ {
+ var rows = new List<LocationRow>();
+ var data_rows = layer.GroupBy(t => t.Row);
+ foreach (var data_row in data_rows)
+ {
+ var cols = new List<LocationCol>();
+ foreach (var data_col in data_row)
+ {
+ cols.Add(new LocationCol()
+ {
+ //鍒�
+ row = data_col.Row,
+ layer = data_col.Layer,
+ index = data_col.Column,
+ locationCode = data_col.LocationCode,
+ location_state = data_col.LocationStatus,
+ location_lock = data_col.EnableStatus,
+ remark = data_col.Remark
+ });
+ }
+ cols = cols.OrderBy(t => t.index).ToList();
+ rows.Add(new LocationRow()
+ {
+ //琛�
+ index = data_row.Key,
+ cols = cols
+ });
+ }
+ rows = rows.OrderBy(t => t.index).ToList();
+ layers.Add(new LocationLayer()
+ {
+ //灞�
+ index = layer.Key,
+ rows = rows
+ });
+ }
+ layers = layers.OrderBy(t => t.index).ToList();
+ return layers;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
index 2681d16..9fe3d22 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
@@ -13,7 +13,7 @@
//杩炴帴瀛楃涓�
//"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
//"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//鏃MS鏁版嵁搴撹繛鎺�
//"TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
--
Gitblit v1.9.3