From cb25acc46bf41863e068b6f968f1592b7a14d1c9 Mon Sep 17 00:00:00 2001
From: helongyang <647556386@qq.com>
Date: 星期六, 13 九月 2025 08:12:14 +0800
Subject: [PATCH] 功能更新优化
---
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/AddErpProScrapSheet.vue | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 243 ++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceProtocolController.cs | 2
代码管理/WCS/WIDESEAWCS_Client/public/webconfig.js | 6
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/ProStockView.vue | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs | 21
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs | 26
代码管理/WCS/WIDESEAWCS_Client/src/img/1.png | 0
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/BoardWarehouse.vue | 45
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 76 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/ConveyorLineJob_PP.cs | 21
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/ConveyorLineJob_FL.cs | 26
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/TSJConveyorLineJob_PP.cs | 44
代码管理/WCS/WIDESEAWCS_Client/src/store/index.js | 13
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/AuxiliaryWarehouse.vue | 257 +++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockViewService.cs | 95
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs | 21
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/DryFilmWarehouse.vue | 464 ++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs | 7
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/PPReadData.cs | 234 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/ExpirationlabelEnum.cs | 21
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/SolderMaskWarehouse.vue | 430 +++++
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/PpWarehouse.vue | 503 ++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs | 15
代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/ProStockView.js | 23
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs | 93
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/StackerCraneJob_ZH.cs | 15
代码管理/WCS/WIDESEAWCS_Client/public/index.html | 1
代码管理/WCS/WIDESEAWCS_Client/src/views/Home.vue | 143 +
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/InkWarehouse.vue | 343 ++++
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue | 21
代码管理/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/TestFrameWarehouse.vue | 45
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/StackerCraneJob_YM.cs | 18
代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js | 8
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue | 1
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue | 21
代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js | 110
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs | 4
代码管理/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/CommonHoisterJob.cs | 21
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs | 1
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP仓/StackerCraneJob_PP.cs | 16
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/ConveyorLineJob_GM.cs | 45
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/ZHReadData.cs | 174 ++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/阻焊仓/GroundStationJob_ZH.cs | 44
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 48
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs | 6
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/YMReadData.cs | 106 +
代码管理/WCS/WIDESEAWCS_Client/src/views/Index.vue | 297 ++-
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/UpdateExpirationlabelJob.cs | 40
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/FLReadData.cs | 53
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/GMReadData.cs | 185 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs | 10
57 files changed, 4,179 insertions(+), 314 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/index.html" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/index.html"
index 548664e..797746d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/index.html"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/index.html"
@@ -9,6 +9,7 @@
<meta name="description" content="" />
<link rel="icon" href="<%= BASE_URL %>wcslogo.png">
<title><%= htmlWebpackPlugin.options.title %></title>
+ <script src="webconfig.js"></script>
</head>
<body>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/webconfig.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/webconfig.js"
new file mode 100644
index 0000000..bc43820
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/public/webconfig.js"
@@ -0,0 +1,6 @@
+window.webConfig = {
+ "webApiDevelopment": "http://localhost:9291/",
+ "webApiProduction": "http://localhost:9291/",
+ "webApiDebug": "http://localhost:9291/",
+ "webSocketUrl": "ws://localhost:9260/",
+}
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/img/1.png" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/img/1.png"
new file mode 100644
index 0000000..4070c71
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/img/1.png"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/store/index.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/store/index.js"
index e72d129..12a00c1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/store/index.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/store/index.js"
@@ -38,7 +38,16 @@
},
updateLoadingState(state, flag) {
state.isLoading = flag
+ },
+
+
+ uphomedata(state, data) {
+ // console.log('123',data);
+
+ state.homedata = data;
+ // console.log('12state.homedata3',state.homedata);
}
+
}, getters: {
getPermission: (state) => (path) => { //璋冪敤鏂瑰紡 store.getters.getPermission('sys_User')
if (!path) return state.permission;
@@ -85,6 +94,10 @@
},
onLoading(context, flag) {
context.commit("updateLoadingState", flag);
+ },
+
+ sethomedata(context, data) {
+ context.commit("uphomedata", data);
}
}
})
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Home.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Home.vue"
index 820437a..41ecf97 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Home.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Home.vue"
@@ -1,24 +1,145 @@
<template>
- <div class="title"></div>
+ <div class="warehouse-dashboard">
+ <!-- 瀵艰埅鏍� -->
+ <nav class="navbar">
+ <div class="nav-container">
+ <h1 class="logo">浠撳簱璋冨害绯荤粺</h1>
+ <ul class="nav-links">
+ <li
+ v-for="(warehouse, index) in warehouses"
+ :key="index"
+ :class="{ active: activeWarehouse === index }"
+ @click="switchWarehouse(index)"
+ >
+ {{ warehouse.name }}
+ </li>
+ </ul>
+ </div>
+ </nav>
+
+ <!-- 涓诲唴瀹瑰尯 - 鍔ㄦ�佹覆鏌撻�変腑鐨勪粨搴撻〉闈� -->
+ <main class="content-area">
+ <component :is="currentComponent" class="warehouse-content"></component>
+ </main>
+ </div>
</template>
<script>
-import { ref, reactive } from 'vue'
+import { ref, computed } from 'vue';
+// 瀵煎叆鍚勪釜浠撳簱鐨勭粍浠�
+import BoardWarehouse from './deviceMonitoring/BoardWarehouse.vue';
+import TestFrameWarehouse from './deviceMonitoring/TestFrameWarehouse.vue';
+import SolderMaskWarehouse from './deviceMonitoring/SolderMaskWarehouse.vue';
+import PpWarehouse from './deviceMonitoring/PpWarehouse.vue';
+import InkWarehouse from './deviceMonitoring/InkWarehouse.vue';
+import AuxiliaryWarehouse from './deviceMonitoring/AuxiliaryWarehouse.vue';
+import DryFilmWarehouse from './deviceMonitoring/DryFilmWarehouse.vue';
export default {
setup() {
- return {
+ // 瀹氫箟浠撳簱鍒楄〃
+ const warehouses = [
+ { name: '鏉挎潗浠�', component: BoardWarehouse },
+ { name: '娴嬭瘯鏋朵粨', component: TestFrameWarehouse },
+ { name: '闃荤剨浠�', component: SolderMaskWarehouse },
+ { name: 'PP浠�', component: PpWarehouse },
+ { name: '娌瑰ⅷ浠�', component: InkWarehouse },
+ { name: '杈呮枡浠�', component: AuxiliaryWarehouse },
+ { name: '鎴愬搧浠�', component: BoardWarehouse },
+ { name: '骞茶啘浠�', component: DryFilmWarehouse},
+ ];
- }
+ // 褰撳墠閫変腑鐨勪粨搴撶储寮�
+ const activeWarehouse = ref(0);
+
+ // 鍒囨崲浠撳簱
+ const switchWarehouse = (index) => {
+ activeWarehouse.value = index;
+ };
+
+ // 鏍规嵁閫変腑鐨勪粨搴撹幏鍙栧綋鍓嶈娓叉煋鐨勭粍浠�
+ const currentComponent = computed(() => {
+ return warehouses[activeWarehouse.value].component;
+ });
+
+ return {
+ warehouses,
+ activeWarehouse,
+ switchWarehouse,
+ currentComponent
+ };
}
-}
+};
</script>
<style scoped>
-.title {
- line-height: 70vh;
- text-align: center;
- font-size: 28px;
- color: orange;
+.warehouse-dashboard {
+ display: flex;
+ flex-direction: column;
+ min-height: 100vh;
}
-</style>
\ No newline at end of file
+
+.navbar {
+ background-color: #2c3e50;
+ color: white;
+ padding: 0 20px;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+}
+
+.nav-container {
+ max-width: 1200px;
+ margin: 0 auto;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ height: 60px;
+}
+
+.logo {
+ margin: 0;
+ font-size: 1.5rem;
+ font-weight: 600;
+}
+
+.nav-links {
+ display: flex;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ gap: 1px;
+}
+
+.nav-links li {
+ padding: 0 15px;
+ height: 60px;
+ display: flex;
+ align-items: center;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ background-color: #34495e;
+}
+
+.nav-links li:hover {
+ background-color: #3d5a7c;
+}
+
+.nav-links li.active {
+ background-color: #3498db;
+ font-weight: 500;
+ box-shadow: inset 0 -3px 0 #2980b9;
+}
+
+.content-area {
+ flex: 1;
+ padding: 20px;
+ background-color: #f5f7fa;
+}
+
+.warehouse-content {
+ background-color: white;
+ border-radius: 8px;
+ padding: 20px;
+ min-height: calc(100vh - 100px);
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue"
index e59ef4f..3fd3bd8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/Index.vue"
@@ -3,20 +3,30 @@
<div class="vol-aside" :style="{ width: menuWidth + 'px' }">
<div class="header" :style="{ width: menuWidth - 1 + 'px' }">
<img v-show="!isCollapse" v-bind:src="logo" />
- <i @click="toggleLeft" class="el-icon-s-fold collapse-menu" />
+ <i
+ @click="toggleLeft"
+ class="collapse-menu"
+ :class="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
+ />
</div>
<div class="vol-menu">
<el-scrollbar style="height: 100%">
- <VolMenu :currentMenuId="currentMenuId" :on-select="onSelect" :enable="true" :open-select="false"
- :isCollapse="isCollapse" :list="menuOptions"></VolMenu>
+ <VolMenu
+ :currentMenuId="currentMenuId"
+ :on-select="onSelect"
+ :enable="true"
+ :open-select="false"
+ :isCollapse="isCollapse"
+ :list="menuOptions"
+ ></VolMenu>
</el-scrollbar>
</div>
</div>
<div class="vol-container" :style="{ left: menuWidth - 1 + 'px' }">
<div class="vol-header">
- <div class="project-name">WCS</div>
+ <div class="project-name">WMS</div>
<div class="header-text">
- <!-- <div class="h-link">
+ <div class="h-link">
<a
href="javascript:void(0)"
@click="to(item)"
@@ -25,19 +35,38 @@
})"
:key="index"
>
- <span v-if="!item.icon"> {{ item.text }}</span>
+ <span v-if="!item.icon">{{ item.text }}</span>
<i v-else :class="item.icon"></i>
</a>
- </div> -->
+ </div>
</div>
<div class="header-info">
<div class="h-link">
- <a href="javascript:void(0)" @click="to(item)" v-for="(item, index) in links.filter((c) => {
- return c.icon;
- })" :key="index">
- <span> {{ item.text }}</span>
+ <a
+ href="javascript:void(0)"
+ @click="to(item)"
+ v-for="(item, index) in links.filter((c) => {
+ return c.icon;
+ })"
+ :key="index"
+ >
+ <span v-if="!item.icon">{{ item.text }}</span>
+ <i v-else :class="item.icon"></i>
</a>
+ </div>
+ <!--娑堟伅绠$悊-->
+ <div class="h-link" @click="messageModel = true">
+ <a>
+ <i class="el-icon-message-solid">
+ <el-badge
+ :value="messageList.length"
+ :type="messageList.length > 0 ? 'danger' : 'success'"
+ class="item"
+ style="width: 10px"
+ ></el-badge>
+ </i>
+ </a>
</div>
<div>
<img class="user-header" :src="userImg" :onerror="errorImg" />
@@ -52,10 +81,23 @@
</div>
</div>
<div class="vol-path">
- <el-tabs @tab-click="selectNav" @tab-remove="removeNav" @contextmenu.prevent="bindRightClickMenu(false)"
- type="border-card" class="header-navigation" v-model="selectId" :strtch="false">
- <el-tab-pane v-for="(item, navIndex) in navigation" type="card" :name="navIndex + ''" :closable="navIndex > 0"
- :key="navIndex" :label="item.name">
+ <el-tabs
+ @tab-click="selectNav"
+ @tab-remove="removeNav"
+ @contextmenu.prevent="bindRightClickMenu(false)"
+ type="border-card"
+ class="header-navigation"
+ v-model="selectId"
+ :strtch="false"
+ >
+ <el-tab-pane
+ v-for="(item, navIndex) in navigation"
+ type="card"
+ :name="navIndex + ''"
+ :closable="navIndex > 0"
+ :key="navIndex"
+ :label="item.name"
+ >
<span style="display: none">{{ navIndex }}</span>
</el-tab-pane>
</el-tabs>
@@ -66,18 +108,23 @@
<el-button link @click="closeTabs()">
<i class="el-icon-close"></i>
{{
- navigation.length == 2 ? "鍏抽棴鑿滃崟" : "鍏抽棴鎵�鏈�"
- }}</el-button>
+ navigation.length == 2 ? "鍏抽棴鑿滃崟" : "鍏抽棴鎵�鏈�"
+ }}
+ </el-button>
</li>
<li v-show="visibleItem.left">
- <el-button link @click="closeTabs('left')"><i class="el-icon-back"></i>鍏抽棴宸﹁竟</el-button>
+ <el-button link @click="closeTabs('left')">
+ <i class="el-icon-back"></i>鍏抽棴宸﹁竟
+ </el-button>
</li>
<li v-show="visibleItem.right">
<el-button link @click="closeTabs('right')">
- <i class="el-icon-right"></i>鍏抽棴鍙宠竟</el-button>
+ <i class="el-icon-right"></i>鍏抽棴鍙宠竟
+ </el-button>
</li>
<li v-show="visibleItem.other">
- <el-button link @click="closeTabs('other')"><i class="el-icon-right"></i>鍏抽棴鍏朵粬
+ <el-button link @click="closeTabs('other')">
+ <i class="el-icon-right"></i>鍏抽棴鍏朵粬
</el-button>
</li>
</ul>
@@ -88,26 +135,45 @@
<loading v-show="$store.getters.isLoading()"></loading>
<router-view v-slot="{ Component }">
<keep-alive>
- <component :is="Component" :key="$route.name"
- v-if="!$route.meta || ($route.meta && !$route.meta.hasOwnProperty('keepAlive'))" />
+ <component
+ :is="Component"
+ :key="$route.name"
+ v-if="
+ !$route.meta ||
+ ($route.meta && !$route.meta.hasOwnProperty('keepAlive'))
+ "
+ />
</keep-alive>
- <component :is="Component" :key="$route.name" v-if="$route.meta && $route.meta.hasOwnProperty('keepAlive')" />
+ <component
+ :is="Component"
+ :key="$route.name"
+ v-if="$route.meta && $route.meta.hasOwnProperty('keepAlive')"
+ />
</router-view>
</el-scrollbar>
</div>
</div>
<el-drawer title="閫夋嫨涓婚" v-model="drawer_model" direction="rtl" destroy-on-close>
<div class="theme-selector">
- <div @click="changeTheme(item.name)" class="item" v-for="(item, index) in theme_color" :key="index"
- :style="{ background: item.color }">
- <div v-show="item.leftColor" :style="{ background: item.leftColor }" style="height: 100%; width: 20px"
- class="t-left"></div>
+ <div
+ @click="changeTheme(item.name)"
+ class="item"
+ v-for="(item, index) in theme_color"
+ :key="index"
+ :style="{ background: item.color }"
+ >
+ <div
+ v-show="item.leftColor"
+ :style="{ background: item.leftColor }"
+ style="height: 100%; width: 20px"
+ class="t-left"
+ ></div>
<div class="t-right"></div>
</div>
</div>
</el-drawer>
- <el-drawer title="娑堟伅鍒楄〃" v-model="messageModel" direction="rtl" destroy-on-close>
+ <el-drawer title="娑堟伅鍒楄〃" v-model="messageModel" direction="rtl" destroy-on-close size="40%">
<Message :list="messageList"></Message>
</el-drawer>
</div>
@@ -131,15 +197,19 @@
watch,
onMounted,
getCurrentInstance,
+ h
} from "vue";
import { useRouter, useRoute } from "vue-router";
import store from "../store/index";
import http from "@/../src/api/http.js";
+import { ElNotification } from "element-plus";
+import { useStore } from "vuex";
+
export default defineComponent({
components: {
VolMenu,
loading,
- Message,
+ Message
},
data() {
@@ -149,11 +219,14 @@
rightTabs: true,
otherTabs: true,
menuLeft: 0,
- menuTop: 0,
+ menuTop: 0
+
// contextMenuVisible: false, // 鍙抽敭鍏抽棴鏄�/闅�
};
},
setup(props, context) {
+ let client = ref(null);
+
// 鑾峰彇鍏ㄥ眬灞炴�у拰鏂规硶
const { proxy } = getCurrentInstance();
@@ -173,31 +246,16 @@
{ name: "orange2", color: "#ff9900", leftColor: "rgb(232 141 5)" },
{ name: "green", color: "rgb(25, 190, 107)" },
{ name: "green2", color: "rgb(25, 190, 107)", leftColor: "#019e4f" },
- { name: "white", color: "#fff" },
+ { name: "white", color: "#fff" }
]);
const links = ref([
- // {
- // text: "妗嗘灦瑙嗛",
- // path: "https://www.cctalk.com/m/group/90268531",
- // id: -3,
- // },
- // { text: "澶у睆鏁版嵁", path: "/bigdata", id: -3 },
- // {
- // text: "妗嗘灦鏂囨。",
- // path: "http://v2.volcore.xyz/document/guide",
- // id: -2,
- // }, {
- // text: "妗嗘灦浼佷笟鐗�",
- // path: "http://pro.volcore.xyz/",
- // id: 10,
- // },
{ text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" },
{
text: "瀹夊叏閫�鍑�",
path: "/login",
id: -4,
- icon: "el-icon-switch-button",
- },
+ icon: "el-icon-switch-button"
+ }
]);
const errorImg = ref(
'this.src="' + require("@/assets/imgs/error-img.png") + '"'
@@ -208,16 +266,17 @@
//2022.05.29澧炲姞tab閫夐」涓庤彍鍗曡仈鍔ㄥ姛鑳�
const currentMenuId = ref(0);
const userName = ref("--");
+ const userTrueName = ref("--");
const userInfo = ref({});
const visibleItem = reactive({
left: false,
right: false,
all: false,
- other: false,
+ other: false
});
const userImg = ref("");
const navigation = reactive([
- { orderNo: "0", id: "1", name: "棣栭〉", path: "/home" },
+ { orderNo: "0", id: "1", name: "棣栭〉", path: "/home" }
]);
const logo = ref(imgUrl);
const theme = ref("blue2");
@@ -237,23 +296,77 @@
},
hide() {
toggleLeft();
- },
+ }
};
- const changeTheme = (name) => {
+ const Store = useStore();
+ const s = ref(null);
+
+ const handleMessage = e => {
+ if (e) {
+ s.value = e.data;
+ console.log("WebSocket 鏀跺埌娑堟伅: ", e.data);
+ store.dispatch("sethomedata", s.value);
+ let data = JSON.parse(e.data);
+ messageList.push(data);
+ ElNotification({
+ title: data.title,
+ message: h("i", { style: "color: teal" }, data.message),
+ position: "bottom-right"
+ });
+ }
+ };
+
+ const createSocket = url => {
+ //console.log(url);
+
+ //鍒涘缓WebSocket杩炴帴
+ //"ws://127.0.0.1:9295/admin"
+ //client = new WebSocket("ws://192.168.0.250:9260/");
+ client = new WebSocket("ws:localhost:9260/");
+ client.onopen = function() {
+ //client.onmessage = handleMessage;
+ // store.commit("setWebsocket", client);
+ console.log("WebSocket 杩炴帴鎴愬姛");
+ };
+
+ client.onmessage = function(event) {
+ // console.log("WebSocket 鏀跺埌娑堟伅: ", event);
+
+ if (event != undefined) {
+ store.dispatch("sethomedata", JSON.parse(event.data));
+ }
+ // handleMessage(event);
+ };
+
+ client.onclose = function() {
+ console.log("WebSocket 杩炴帴鍏抽棴");
+ setTimeout(createSocket, 10000);
+ };
+
+ client.onerror = function(err) {
+ console.log("WebSocket 杩炴帴閿欒: ", err);
+ };
+ client.onmessage();
+ };
+
+ const changeTheme = name => {
if (theme.value != name) {
theme.value = name;
}
localStorage.setItem("vol3_theme", name);
};
- const to = (item) => {
+ const to = item => {
/* 2020.07.31澧炲姞鎵嬪姩鎵撳紑tabs*/
+ if (item.path == "#") {
+ window.open("https://github.com/cq-panda/Vue.NetCore");
+ return;
+ }
if (item.path.indexOf("http") != -1) {
window.open(item.path);
return;
}
if (typeof item == "string" || item.path == "/login") {
if (item == "/login" || item.path == "/login") {
- //纭鏄惁閫�鍑�
store.commit("clearUserInfo", "");
window.location.href = "/";
return;
@@ -266,7 +379,7 @@
};
const open = (item, useRoute) => {
/* 2020.07.31澧炲姞鎵嬪姩鎵撳紑tabs*/
- let _index = navigation.findIndex((x) => {
+ let _index = navigation.findIndex(x => {
return x.path == item.path;
});
if (_index == -1) {
@@ -275,7 +388,7 @@
id: item.id + "",
name: item.name || item.text || "鏃犳爣棰�",
path: item.path,
- query: item.query, //2021.03.20淇鑷畾涔変簩娆℃墦寮�$tabs鏃跺弬鏁颁涪澶辩殑闂
+ query: item.query //2021.03.20淇鑷畾涔変簩娆℃墦寮�$tabs鏃跺弬鏁颁涪澶辩殑闂
});
//鏂版墦寮�鐨則ab绉昏嚦鏈�鍚庝竴涓�夐」
selectId.value = navigation.length - 1 + "";
@@ -290,13 +403,13 @@
}
currentMenuId.value = item.id * 1;
// tab鑿滃崟缁戝畾鍙抽敭浜嬩欢
- proxy.$nextTick(function (e) {
+ proxy.$nextTick(function(e) {
proxy.bindRightClickMenu(true);
});
};
- const close = (path) => {
+ const close = path => {
/* 2020.07.31澧炲姞鎵嬪姩鎵撳紑tabs*/
- let index = navigation.findIndex((x) => {
+ let index = navigation.findIndex(x => {
return x.path == path;
});
if (index == -1) {
@@ -304,7 +417,7 @@
}
removeNav(index);
};
- const setItem = (item) => {
+ const setItem = item => {
/* 2020.07.31澧炲姞鎵嬪姩鎵撳紑tabs*/
localStorage.setItem(
window.location.origin + "_tabs",
@@ -316,23 +429,23 @@
let nav = localStorage.getItem(window.location.origin + "_tabs");
return nav ? JSON.parse(nav) : null;
};
- const selectNav = (item) => {
+ const selectNav = item => {
//鍗囩骇element姝e紡鐗堜慨鏀�
selectId.value = item.props.name;
let _path = navigation[item.index].path;
currentMenuId.value = (
- menuOptions.value.find((c) => {
+ menuOptions.value.find(c => {
return c.path == _path;
}) || { id: 0 }
).id;
router.push({
path: navigation[item.index].path,
- query: navigation[item.index].query,
+ query: navigation[item.index].query
});
};
- const removeNav = (_index) => {
+ const removeNav = _index => {
return new Promise(() => {
//鍏抽棴鐨勫綋鍓嶉」,璺宠浆鍒板墠涓�涓〉闈�
if (selectId.value == _index + "") {
@@ -341,7 +454,7 @@
router.push({
path: navigation[_index - 1].path,
//2022.06.27淇tabs浜屾鍒囨崲鍚庡弬鏁颁涪澶辩殑闂
- query: navigation[_index - 1].query,
+ query: navigation[_index - 1].query
});
navigation.splice(_index, 1);
selectId.value = selectId.value - 1 + "";
@@ -352,19 +465,19 @@
}
navigation.splice(_index, 1);
currentMenuId.value = (
- menuOptions.value.find((c) => {
+ menuOptions.value.find(c => {
return c.path == navigation[selectId.value * 1].path;
}) || { id: 0 }
).id;
});
};
- const getSelectMenuName = (id) => {
- return menuOptions.value.find(function (x) {
+ const getSelectMenuName = id => {
+ return menuOptions.value.find(function(x) {
return x.id == id;
});
};
- const onSelect = (treeId) => {
+ const onSelect = treeId => {
/* 2020.07.31澧炲姞鎵嬪姩鎵撳紑tabs*/
var item = getSelectMenuName(treeId);
open(item, false);
@@ -374,7 +487,7 @@
* 鏄剧ず鍙抽敭鑿滃崟
* @param {*} e 浜嬩欢瀵硅薄
*/
- const openTabsMenu = function (e) {
+ const openTabsMenu = function(e) {
e.preventDefault(); // 闃叉榛樿鑿滃崟寮瑰嚭
let tabId = e.target.id.split("-")[1] * 1;
@@ -417,14 +530,14 @@
const toHome = () => {
open({
text: navigation[0].name,
- path: navigation[0].path,
+ path: navigation[0].path
});
};
/**
* 鍏抽棴鍏跺畠鏍囩椤�
* @param {*} par 鍏抽棴绫诲瀷(left,right,other)
*/
- const closeTabs = (value) => {
+ const closeTabs = value => {
let _menuId = navigation[selectId.value * 1].id;
let currnetIndex = selectId.value * 1; // navigation.findIndex(c => { return c.id == selectId.value });
switch (value) {
@@ -463,7 +576,7 @@
}
}
selectId.value =
- navigation.findIndex((c) => {
+ navigation.findIndex(c => {
return c.id == _menuId;
}) + "";
closeTabsMenu();
@@ -493,28 +606,33 @@
let _userInfo = store.getters.getUserInfo();
if (_userInfo) {
userName.value = _userInfo.userName;
+ userTrueName.value = _userInfo.userTrueName;
if (_userInfo.img) {
userImg.value = _config.base.getImgSrc(_userInfo.img, http.ipAddress);
}
}
+
+ createSocket(window.webConfig.webSocketUrl);
+
Object.assign(_config.$tabs, { open: open, close: close });
- http.get("api/Sys_Menu/getTreeMenu", {}, true).then((data) => {
+ http.get("api/Sys_Menu/getTreeMenu", {}, true).then(data => {
data.push({ id: "1", name: "棣栭〉", url: "/home" }); // 涓轰簡鑾峰彇閫変腑id浣跨敤
- data.forEach((d) => {
+ data.forEach(d => {
d.path = (d.url || "").replace("/Manager", "");
d.to = (d.url || "").replace("/Manager", "");
if (!d.icon || d.icon.substring(0, 3) != "el-") {
d.icon = "el-icon-menu";
}
});
+
store.dispatch("setPermission", data);
menuOptions.value = data;
permissionInited.value = true;
//寮�鍚秷鎭帹閫侊紙main.js涓缃槸鍚﹀紑鍚痵ignalR锛�2022.05.05
if (_config.$global.signalR) {
- MessageConfig(http, (result) => {
+ MessageConfig(http, result => {
messageList.unshift(result);
// console.log(result)
});
@@ -523,12 +641,12 @@
//褰撳墠鍒锋柊鏄笉鏄椤�
if (router.currentRoute.value.path != navigation[0].path) {
//鏌ユ壘绯荤粺鑿滃崟
- let item = menuOptions.value.find((x) => {
+ let item = menuOptions.value.find(x => {
return x.path == router.currentRoute.value.path; //this.$route.path;
});
if (item) return onSelect(item.id);
//鏌ユ壘椤堕儴蹇嵎杩炴帴
- item = links.value.find((x) => {
+ item = links.value.find(x => {
return x.path == router.currentRoute.value.path; //this.$route.path;
});
//鏌ユ壘鏈�鍚庝竴娆¤烦杞殑椤甸潰
@@ -551,6 +669,7 @@
errorImg,
userInfo,
userName,
+ userTrueName,
userImg,
selectId,
selectMenuIndex,
@@ -574,7 +693,7 @@
visibleItem,
closeTabsMenu,
closeTabs,
- currentMenuId,
+ currentMenuId
};
},
/**
@@ -584,7 +703,7 @@
let _date = showTime();
$indexDate = document.getElementById("index-date");
$indexDate.innerText = _date;
- $interval = setInterval(function () {
+ $interval = setInterval(function() {
$indexDate.innerText = showTime();
}, 1000);
@@ -610,7 +729,7 @@
item.oncontextmenu = that.openTabsMenu;
});
});
- },
+ }
},
/**
@@ -619,7 +738,7 @@
destroyed() {
$this = null;
clearInterval($interval);
- },
+ }
});
const week = new Array(
"鏄熸湡涓�",
@@ -663,6 +782,11 @@
padding: 0;
}
+.item {
+ margin-top: -20px;
+ margin-right: 40px;
+}
+
.contextMenu {
width: 120px;
margin: 0;
@@ -676,7 +800,6 @@
font-size: 14px;
color: #333;
box-shadow: 2px 2px 3px 0 rgb(182 182 182 / 20%);
-
i,
button {
font-size: 14px !important;
@@ -699,8 +822,12 @@
letter-spacing: 1px;
}
-.el-tabs.el-tabs--top.el-tabs--border-card.header-navigation>.el-tabs__header .el-tabs__item:last-child,
-.el-tabs--top.el-tabs--border-card.header-navigation>.el-tabs__header .el-tabs__item:nth-child(2) {
+.el-tabs.el-tabs--top.el-tabs--border-card.header-navigation
+ > .el-tabs__header
+ .el-tabs__item:last-child,
+.el-tabs--top.el-tabs--border-card.header-navigation
+ > .el-tabs__header
+ .el-tabs__item:nth-child(2) {
padding: 0;
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/AuxiliaryWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/AuxiliaryWarehouse.vue"
new file mode 100644
index 0000000..52eb37e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/AuxiliaryWarehouse.vue"
@@ -0,0 +1,257 @@
+<template>
+ <div id="title">
+ <div id="bkuang" style="border-top: none">
+
+ <div class="skuang">
+ <div class="zhuname">鍏ュ簱8005绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_PutFinish5">{{ data.W_PutFinish5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍏ュ簱鍒颁綅鎸囦护(璇�):</div>
+ <div class="xzhi" :title="data.R_ConveyArrivaled5">{{ data.R_ConveyArrivaled5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍒颁綅鎵樼洏鍙�(璇�):</div>
+ <div class="xzhi" :title="data.R_Barcode5">{{ data.R_Barcode5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍒颁綅浠诲姟鍙�(璇�):</div>
+ <div class="xzhi" :title="data.R_TaskNum5">{{ data.R_TaskNum5 }}</div>
+ </div>
+ </div>
+
+ <div class="skuang">
+ <div class="zhuname">鍑哄簱8001绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_PutFinish1">{{ data.W_PutFinish1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鏀捐揣(璇�):</div>
+ <div class="xzhi" :title="data.R_IsCanPut">{{ data.R_IsCanPut }}</div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+</template>
+
+<script>
+import { ref, nextTick } from "vue";
+import { useStore } from "vuex";
+import { onMounted } from "vue";
+
+export default {
+ data() {
+ return {
+ xuan: 0
+ };
+ },
+ methods: {
+ },
+ setup() {
+ const store = useStore();
+ const data = ref({});
+
+ // 1. 瀹氫箟鏅�氬瓧娈电殑鏄犲皠瑙勫垯
+ const statusMap = {
+
+ };
+
+ // 2. 瀹氫箟闇�瑕佸叡鐢ㄦ槧灏勮鍒欑殑瀛楁鍒楄〃鍜屽搴旂殑鏄犲皠瑙勫垯
+ const booleanFields = [
+ "W_PutFinish5", "W_PutFinish1",
+ "R_IsCanPut", "R_ConveyArrivaled5",
+ ];
+ const booleanMap = {
+ true: "鏄�",
+ false: "鍚�"
+ };
+
+ // 澶勭悊鏁版嵁锛屽厛澶勭悊鏅�氭槧灏勶紝鍐嶆壒閲忓鐞嗗叡鐢ㄦ槧灏勭殑瀛楁
+ const processData = (rawData) => {
+ if (!rawData) return {};
+ const processed = { ...rawData };
+
+ // 澶勭悊鏅�氬瓧娈垫槧灏�
+ Object.keys(statusMap).forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ const map = statusMap[key];
+ processed[key] = map[processed[key]] || processed[key];
+ }
+ });
+
+ // 鎵归噺澶勭悊鍏辩敤鏄犲皠瑙勫垯鐨勫瓧娈�
+ booleanFields.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = booleanMap[processed[key]] || processed[key];
+ }
+ });
+
+ return processed;
+ };
+
+ onMounted(() => {
+ nextTick(() => {
+ setInterval(() => {
+ const rawData = store.state.homedata;
+ data.value = processData(rawData);
+ const xian = document.getElementsByClassName("xzhi");
+ for (let i = 0; i < xian.length; i++) {
+ if (xian[i].innerHTML === "鏄�") {
+ xian[i].style.color = "yellow";
+ } else if (xian[i].innerHTML === "鍚�") {
+ xian[i].style.color = "red";
+ }
+ }
+ });
+ });
+ });
+
+ return {
+ data,
+ };
+ }
+};
+</script>
+
+<style scoped>
+.ding {
+ float: left;
+ width: 20px;
+ height: 20px;
+ margin-top: 7px;
+}
+.yan {
+ color: white;
+ float: left;
+ font-size: 25px;
+}
+.dakuang {
+ width: 250px;
+ height: 50px;
+ position: absolute;
+ top: 150px;
+ left: 200px;
+}
+#xiugai {
+ width: 100px;
+ height: 30px;
+ float: left;
+ border-radius: 5px;
+ text-align: center;
+ line-height: 30px;
+ cursor: pointer;
+ border: 1px solid white;
+ color: white;
+ background: rgba(255, 255, 255, 0.5);
+ font-size: 25px;
+ position: absolute;
+ top: 150px;
+ left: 450px;
+}
+#xiugai:hover {
+ background: #f60;
+}
+#shu1,
+#shu2 {
+ width: 200px;
+ height: 30px;
+ float: left;
+ margin-top: 0px;
+ margin-right: 0px;
+ border-radius: 5px;
+ border: 1px solid white;
+}
+#guan {
+ width: 40px;
+ height: 40px;
+ float: left;
+ font-size: 1.1cqw;
+ text-align: center;
+ line-height: 40px;
+ cursor: pointer;
+ margin-left: 560px;
+ color: white;
+ position: absolute;
+}
+#ti {
+ width: 600px;
+ height: 300px;
+ position: relative;
+ background: rgba(255, 255, 255, 1);
+ border-radius: 10px;
+ top: 230px;
+ left: 35%;
+ display: none;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 170%;
+ background-position: -220px 0px;
+}
+.zhuname {
+ width: 100%;
+ height: 5vh;
+ float: left;
+ text-align: center;
+ line-height: 50px;
+ font-weight: 700;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xname {
+ width: 70%;
+ height: 80px;
+ float: left;
+ line-height: 7vh;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xzhi {
+ width: 30%;
+ height: 7vh;
+ float: left;
+ line-height: 50px;
+ font-size: 1.1cqw;
+ color: rgb(242, 242, 50);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.zhankuang {
+ width: 45%;
+ height: 3vh;
+ margin-top: 10px;
+ margin-left: 5%;
+ float: left;
+}
+#title {
+ float: left;
+ width: 95%;
+ height: 88vh;
+ margin-top: 40px;
+ margin-left: 3%;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 100%;
+ container-type: inline-size;
+}
+#bkuang {
+ width: 100%;
+ height: 55vh;
+ float: left;
+}
+.skuang {
+ width: 31%;
+ height: 55vh;
+ float: left;
+ border-top: none;
+ border-left: none;
+ border-bottom: none;
+ background: rgba(255, 255, 255, 0.2);
+ margin-left: 1.7%;
+ border-radius: 10px;
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/BoardWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/BoardWarehouse.vue"
new file mode 100644
index 0000000..8b42e03
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/BoardWarehouse.vue"
@@ -0,0 +1,45 @@
+<template>
+ <div class="message-container">
+ <div class="item" v-for="(item, index) in list" :key="index">
+ <div class="title">{{ item.title }}({{ item.date }})</div>
+ <div class="content">{{ item.message }}</div>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ list: {
+ type: Array,
+ default: () => {
+ return [];
+ }
+ }
+ },
+ created() {
+ if (!this.list.length) {
+ this.list.push({
+ title: '娑堟伅娴嬭瘯鏍噏weqweqweqw棰�',
+ message: '娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭',
+ date: '2022-05-02 03:10'
+ });
+ }
+ }
+};
+</script>
+<style scoped lang="less">
+.message-container {
+ .title {
+ padding-bottom: 10px;
+ }
+ .item {
+ border-bottom: 1px solid #eee;
+ padding: 10px 20px;
+ }
+ .content {
+ color: #7e7e7e;
+ font-size: 13px;
+ }
+}
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/DryFilmWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/DryFilmWarehouse.vue"
new file mode 100644
index 0000000..94a238c
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/DryFilmWarehouse.vue"
@@ -0,0 +1,464 @@
+<template>
+ <div id="title">
+ <div id="bkuang" style="border-top: none">
+ <div class="skuang">
+ <div class="zhuname">骞茶啘浠撳爢鍨涙満</div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈虹姸鎬�:</div>
+ <div class="xzhi" :title="data.R_GM_Status">{{ data.R_GM_Status }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈烘墜鑷姩鐘舵��:</div>
+ <div class="xzhi" :title="data.R_GM_AutoStatus">{{ data.R_GM_AutoStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">姝e湪鎵ц鐨勪换鍔″彿:</div>
+ <div class="xzhi" :title="data.R_GM_TaskNum">{{ data.R_GM_TaskNum }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈哄伐浣滅姸鎬�:</div>
+ <div class="xzhi" :title="data.R_GM_WorkStatus">{{ data.R_GM_WorkStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">浣滀笟绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_GM_WorkType">{{ data.R_GM_WorkType }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎵樼洏绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_GM_TrayType">{{ data.R_GM_TrayType }}</div>
+ </div>
+ </div>
+ <div class="skuang">
+ <div class="zhuname">鍏ュ簱7003绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">璇诲彇绠变綋鐮�(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Boxcode">{{ data.R_GM_Boxcode }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_HandShake3">{{ data.R_GM_HandShake3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Online3">{{ data.R_GM_Online3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Free3">{{ data.R_GM_Free3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Goods3">{{ data.R_GM_Goods3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Alarm3">{{ data.R_GM_Alarm3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_STB3">{{ data.R_GM_STB3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_ACK3">{{ data.R_GM_ACK3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_GM_STB3">{{ data.W_GM_STB3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_GM_ACK3">{{ data.W_GM_ACK3 }}</div>
+ </div>
+ </div>
+
+ <div class="skuang">
+ <div class="zhuname">鍑哄簱缁堢偣7004绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_HandShake4">{{ data.R_GM_HandShake4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Online4">{{ data.R_GM_Online4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Free4">{{ data.R_GM_Free4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Goods4">{{ data.R_GM_Goods4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Alarm4">{{ data.R_GM_Alarm4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_STB4">{{ data.R_GM_STB4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_ACK4">{{ data.R_GM_ACK4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_GM_STB4">{{ data.W_GM_STB4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_GM_ACK4">{{ data.W_GM_ACK4 }}</div>
+ </div>
+ <div class="zhuname">鍑哄簱7005绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_HandShake5">{{ data.R_GM_HandShake5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Online5">{{ data.R_GM_Online5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Free5">{{ data.R_GM_Free5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Goods5">{{ data.R_GM_Goods5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_Alarm5">{{ data.R_GM_Alarm5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_STB5">{{ data.R_GM_STB5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_GM_ACK5">{{ data.R_GM_ACK5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_GM_STB5">{{ data.W_GM_STB5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_GM_ACK5">{{ data.W_GM_ACK5 }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { ref, nextTick } from "vue";
+import { useStore } from "vuex";
+import { onMounted } from "vue";
+
+export default {
+ data() {
+ return {
+ xuan: 0
+ };
+ },
+ methods: {
+ },
+ setup() {
+ const store = useStore();
+ const data = ref({});
+
+ // 1. 瀹氫箟鏅�氬瓧娈电殑鏄犲皠瑙勫垯
+ const statusMap = {
+ R_GM_Status: {
+ 1: "姝e父",
+ 2: "鏁呴殰",
+ 3: "鎬ュ仠",
+ },
+ R_GM_AutoStatus: {
+ 0: "缁翠慨",
+ 1: "鎵嬪姩",
+ 2: "鍗婅嚜鍔�",
+ 3: "鑷姩",
+ },
+ R_GM_WorkStatus: {
+ 0: "寰呮満",
+ 1: "鍙栬揣涓�",
+ 2: "鍙栬揣瀹屾垚",
+ 4: "鏀捐揣涓�",
+ 5: "鏀捐揣瀹屾垚",
+ 6: "浠诲姟瀹屾垚",
+ },
+ R_GM_WorkType: {
+ 0: "鏃犱綔涓氫换鍔�(0)",
+ 1: "鍙栨斁璐т綔涓�(1)",
+ 2: "鍙彇璐т綔涓�(2)",
+ 3: "鍙斁璐т綔涓�(3)",
+ 4: "绉诲姩鍒版寚瀹氫綅缃�"
+ },
+ R_GM_TrayType: {
+ "-1": "绌虹(-1)",
+ 1: "灏忔墭鐩�(1)",
+ 2: "涓墭鐩�(2)",
+ 3: "澶ф墭鐩�(3)",
+ 4: "鐗瑰ぇ鎵樼洏(4)",
+ }
+ };
+ const onlines = [
+ "R_GM_Online3","R_GM_Online4",
+ "R_GM_Online5",
+ ]
+ const online = {
+ 1: "鑱旀満",
+ 0: "鑴辨満"
+ };
+ const alarms = [
+ "R_GM_Alarm3","R_GM_Alarm4",
+ "R_GM_Alarm5",
+ ]
+ const alarm = {
+ 1: "鏁呴殰",
+ 0: "姝e父"
+ };
+ const frees = [
+ "R_GM_Free3","R_GM_Free4",
+ "R_GM_Free5",
+ ]
+ const free = {
+ 1: "绌洪棽",
+ 0: "绻佸繖"
+ };
+ const goods = [
+ "R_GM_Goods3", "R_GM_Goods4",
+ "R_GM_Goods5",
+ ]
+ const good = {
+ 1: "鏈夎揣",
+ 0: "鏃犺揣"
+ };
+ // 2. 瀹氫箟闇�瑕佸叡鐢ㄦ槧灏勮鍒欑殑瀛楁鍒楄〃鍜屽搴旂殑鏄犲皠瑙勫垯
+ const booleanFields = [
+ "R_GM_HandShake3",
+ "R_GM_STB3",
+ "R_GM_ACK3", "W_GM_STB3",
+ "W_GM_ACK3",
+ "R_GM_HandShake4",
+ "R_GM_STB4",
+ "R_GM_ACK4", "W_GM_STB4",
+ "W_GM_ACK4",
+ "R_GM_HandShake5",
+ "R_GM_STB5",
+ "R_GM_ACK5", "W_GM_STB5",
+ "W_GM_ACK5",
+ ];
+ const booleanMap = {
+ true: "鏄�",
+ false: "鍚�"
+ };
+
+ // 澶勭悊鏁版嵁锛屽厛澶勭悊鏅�氭槧灏勶紝鍐嶆壒閲忓鐞嗗叡鐢ㄦ槧灏勭殑瀛楁
+ const processData = (rawData) => {
+ if (!rawData) return {};
+ const processed = { ...rawData };
+
+ // 澶勭悊鏅�氬瓧娈垫槧灏�
+ Object.keys(statusMap).forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ const map = statusMap[key];
+ processed[key] = map[processed[key]] || processed[key];
+ }
+ });
+
+ // 鎵归噺澶勭悊鍏辩敤鏄犲皠瑙勫垯鐨勫瓧娈�
+ booleanFields.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = booleanMap[processed[key]] || processed[key];
+ }
+ });
+ onlines.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = online[processed[key]] || processed[key];
+ }
+ });
+ alarms.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = alarm[processed[key]] || processed[key];
+ }
+ });
+ frees.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = free[processed[key]] || processed[key];
+ }
+ });
+ goods.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = good[processed[key]] || processed[key];
+ }
+ });
+
+ return processed;
+ };
+
+ onMounted(() => {
+ nextTick(() => {
+ setInterval(() => {
+ const rawData = store.state.homedata;
+ data.value = processData(rawData);
+ const xian = document.getElementsByClassName("xzhi");
+ for (let i = 0; i < xian.length; i++) {
+ if (xian[i].innerHTML === "鏄�" || xian[i].innerHTML === "鑱旀満") {
+ xian[i].style.color = "yellow";
+ } else if (xian[i].innerHTML === "鍚�") {
+ xian[i].style.color = "red";
+ }
+ }
+ });
+ });
+ });
+
+ return {
+ data,
+ };
+ }
+};
+</script>
+
+<style scoped>
+.ding {
+ float: left;
+ width: 20px;
+ height: 20px;
+ margin-top: 7px;
+}
+.yan {
+ color: white;
+ float: left;
+ font-size: 25px;
+}
+.dakuang {
+ width: 250px;
+ height: 50px;
+ position: absolute;
+ top: 150px;
+ left: 200px;
+}
+#xiugai {
+ width: 100px;
+ height: 30px;
+ float: left;
+ border-radius: 5px;
+ text-align: center;
+ line-height: 30px;
+ cursor: pointer;
+ border: 1px solid white;
+ color: white;
+ background: rgba(255, 255, 255, 0.5);
+ font-size: 25px;
+ position: absolute;
+ top: 150px;
+ left: 450px;
+}
+#xiugai:hover {
+ background: #f60;
+}
+#shu1,
+#shu2 {
+ width: 200px;
+ height: 30px;
+ float: left;
+ margin-top: 0px;
+ margin-right: 0px;
+ border-radius: 5px;
+ border: 1px solid white;
+}
+#guan {
+ width: 40px;
+ height: 40px;
+ float: left;
+ font-size: 1.1cqw;
+ text-align: center;
+ line-height: 40px;
+ cursor: pointer;
+ margin-left: 560px;
+ color: white;
+ position: absolute;
+}
+#ti {
+ width: 600px;
+ height: 300px;
+ position: relative;
+ background: rgba(255, 255, 255, 1);
+ border-radius: 10px;
+ top: 230px;
+ left: 35%;
+ display: none;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 170%;
+ background-position: -220px 0px;
+}
+.zhuname {
+ width: 100%;
+ height: 5vh;
+ float: left;
+ text-align: center;
+ line-height: 50px;
+ font-weight: 700;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xname {
+ width: 70%;
+ height: 80px;
+ float: left;
+ line-height: 7vh;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xzhi {
+ width: 30%;
+ height: 7vh;
+ float: left;
+ line-height: 50px;
+ font-size: 1.1cqw;
+ color: rgb(242, 242, 50);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.zhankuang {
+ width: 45%;
+ height: 3vh;
+ margin-top: 10px;
+ margin-left: 5%;
+ float: left;
+}
+#title {
+ float: left;
+ width: 95%;
+ height: 88vh;
+ margin-top: 40px;
+ margin-left: 3%;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 100%;
+ container-type: inline-size;
+}
+#bkuang {
+ width: 100%;
+ height: 55vh;
+ float: left;
+}
+.skuang {
+ width: 31%;
+ height: 55vh;
+ float: left;
+ border-top: none;
+ border-left: none;
+ border-bottom: none;
+ background: rgba(255, 255, 255, 0.2);
+ margin-left: 1.7%;
+ border-radius: 10px;
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/InkWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/InkWarehouse.vue"
new file mode 100644
index 0000000..dbc0396
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/InkWarehouse.vue"
@@ -0,0 +1,343 @@
+<template>
+ <div id="title">
+ <div id="bkuang" style="border-top: none">
+ <div class="skuang">
+ <div class="zhuname">娌瑰ⅷ浠撳爢鍨涙満</div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈虹姸鎬�:</div>
+ <div class="xzhi" :title="data.R_YM_Status">{{ data.R_YM_Status }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈烘墜鑷姩鐘舵��:</div>
+ <div class="xzhi" :title="data.R_YM_AutoStatus">{{ data.R_YM_AutoStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">姝e湪鎵ц鐨勪换鍔″彿:</div>
+ <div class="xzhi" :title="data.R_YM_TaskNum">{{ data.R_YM_TaskNum }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈哄伐浣滅姸鎬�:</div>
+ <div class="xzhi" :title="data.R_YM_WorkStatus">{{ data.R_YM_WorkStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">浣滀笟绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_YM_WorkType">{{ data.R_YM_WorkType }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎵樼洏绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_YM_TrayType">{{ data.R_YM_TrayType }}</div>
+ </div>
+ </div>
+ <div class="skuang">
+ <div class="zhuname">鍑哄叆搴�9001绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Tray1">{{ data.R_YM_Tray1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍏ュ簱鎵ц涓�(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Inbounding1">{{ data.R_YM_Inbounding1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎻愬崌鏈虹┖闂�(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Leisure1">{{ data.R_YM_Leisure1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍑哄簱鎵ц涓�(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Outbounding1">{{ data.R_YM_Outbounding1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鐢宠鍏ュ簱(鍐�):</div>
+ <div class="xzhi" :title="data.W_YM_RequestIn1">{{ data.W_YM_RequestIn1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鐢宠鍑哄簱(鍐�):</div>
+ <div class="xzhi" :title="data.W_YM_RequestOut1">{{ data.W_YM_RequestOut1 }}</div>
+ </div>
+ </div>
+
+ <div class="skuang">
+ <div class="zhuname">鍑哄叆搴�9002绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Tray2">{{ data.R_YM_Tray2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍏ュ簱鎵ц涓�(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Inbounding2">{{ data.R_YM_Inbounding2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎻愬崌鏈虹┖闂�(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Leisure2">{{ data.R_YM_Leisure2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍑哄簱鎵ц涓�(璇�):</div>
+ <div class="xzhi" :title="data.R_YM_Outbounding2">{{ data.R_YM_Outbounding2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鐢宠鍏ュ簱(鍐�):</div>
+ <div class="xzhi" :title="data.W_YM_RequestIn2">{{ data.W_YM_RequestIn2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鐢宠鍑哄簱(鍐�):</div>
+ <div class="xzhi" :title="data.W_YM_RequestOut2">{{ data.W_YM_RequestOut2 }}</div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+</template>
+
+<script>
+import { ref, nextTick } from "vue";
+import { useStore } from "vuex";
+import { onMounted } from "vue";
+
+export default {
+ data() {
+ return {
+ xuan: 0
+ };
+ },
+ methods: {
+ },
+ setup() {
+ const store = useStore();
+ const data = ref({});
+
+ // 1. 瀹氫箟鏅�氬瓧娈电殑鏄犲皠瑙勫垯
+ const statusMap = {
+ R_YM_Status: {
+ 1: "姝e父",
+ 2: "鏁呴殰",
+ 3: "鎬ュ仠",
+ },
+ R_YM_AutoStatus: {
+ 0: "缁翠慨",
+ 1: "鎵嬪姩",
+ 2: "鍗婅嚜鍔�",
+ 3: "鑷姩",
+ },
+ R_YM_WorkStatus: {
+ 0: "寰呮満",
+ 1: "鍙栬揣涓�",
+ 2: "鍙栬揣瀹屾垚",
+ 4: "鏀捐揣涓�",
+ 5: "鏀捐揣瀹屾垚",
+ 6: "浠诲姟瀹屾垚",
+ },
+ R_YM_WorkType: {
+ 0: "鏃犱綔涓氫换鍔�(0)",
+ 1: "鍙栨斁璐т綔涓�(1)",
+ 2: "鍙彇璐т綔涓�(2)",
+ 3: "鍙斁璐т綔涓�(3)",
+ 4: "绉诲姩鍒版寚瀹氫綅缃�"
+ },
+ R_YM_TrayType: {
+ "-1": "绌虹(-1)",
+ 1: "灏忔墭鐩�(1)",
+ 2: "涓墭鐩�(2)",
+ 3: "澶ф墭鐩�(3)",
+ 4: "鐗瑰ぇ鎵樼洏(4)",
+ }
+ };
+
+ // 2. 瀹氫箟闇�瑕佸叡鐢ㄦ槧灏勮鍒欑殑瀛楁鍒楄〃鍜屽搴旂殑鏄犲皠瑙勫垯
+ const booleanFields = [
+ "R_YM_Tray1", "R_YM_Inbounding1",
+ "R_YM_Leisure1", "R_YM_Outbounding1",
+ "W_YM_RequestIn1", "W_YM_RequestOut1",
+ "R_YM_Tray2", "R_YM_Inbounding2",
+ "R_YM_Leisure2", "R_YM_Outbounding2",
+ "W_YM_RequestIn2", "W_YM_RequestOut2",
+ ];
+ const booleanMap = {
+ true: "鏄�",
+ false: "鍚�"
+ };
+
+ // 澶勭悊鏁版嵁锛屽厛澶勭悊鏅�氭槧灏勶紝鍐嶆壒閲忓鐞嗗叡鐢ㄦ槧灏勭殑瀛楁
+ const processData = (rawData) => {
+ if (!rawData) return {};
+ const processed = { ...rawData };
+
+ // 澶勭悊鏅�氬瓧娈垫槧灏�
+ Object.keys(statusMap).forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ const map = statusMap[key];
+ processed[key] = map[processed[key]] || processed[key];
+ }
+ });
+
+ // 鎵归噺澶勭悊鍏辩敤鏄犲皠瑙勫垯鐨勫瓧娈�
+ booleanFields.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = booleanMap[processed[key]] || processed[key];
+ }
+ });
+
+ return processed;
+ };
+
+ onMounted(() => {
+ nextTick(() => {
+ setInterval(() => {
+ const rawData = store.state.homedata;
+ data.value = processData(rawData);
+ const xian = document.getElementsByClassName("xzhi");
+ for (let i = 0; i < xian.length; i++) {
+ if (xian[i].innerHTML === "鏄�") {
+ xian[i].style.color = "yellow";
+ } else if (xian[i].innerHTML === "鍚�") {
+ xian[i].style.color = "red";
+ }
+ }
+ });
+ });
+ });
+
+ return {
+ data,
+ };
+ }
+};
+</script>
+
+<style scoped>
+.ding {
+ float: left;
+ width: 20px;
+ height: 20px;
+ margin-top: 7px;
+}
+.yan {
+ color: white;
+ float: left;
+ font-size: 25px;
+}
+.dakuang {
+ width: 250px;
+ height: 50px;
+ position: absolute;
+ top: 150px;
+ left: 200px;
+}
+#xiugai {
+ width: 100px;
+ height: 30px;
+ float: left;
+ border-radius: 5px;
+ text-align: center;
+ line-height: 30px;
+ cursor: pointer;
+ border: 1px solid white;
+ color: white;
+ background: rgba(255, 255, 255, 0.5);
+ font-size: 25px;
+ position: absolute;
+ top: 150px;
+ left: 450px;
+}
+#xiugai:hover {
+ background: #f60;
+}
+#shu1,
+#shu2 {
+ width: 200px;
+ height: 30px;
+ float: left;
+ margin-top: 0px;
+ margin-right: 0px;
+ border-radius: 5px;
+ border: 1px solid white;
+}
+#guan {
+ width: 40px;
+ height: 40px;
+ float: left;
+ font-size: 1.1cqw;
+ text-align: center;
+ line-height: 40px;
+ cursor: pointer;
+ margin-left: 560px;
+ color: white;
+ position: absolute;
+}
+#ti {
+ width: 600px;
+ height: 300px;
+ position: relative;
+ background: rgba(255, 255, 255, 1);
+ border-radius: 10px;
+ top: 230px;
+ left: 35%;
+ display: none;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 170%;
+ background-position: -220px 0px;
+}
+.zhuname {
+ width: 100%;
+ height: 5vh;
+ float: left;
+ text-align: center;
+ line-height: 50px;
+ font-weight: 700;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xname {
+ width: 70%;
+ height: 80px;
+ float: left;
+ line-height: 7vh;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xzhi {
+ width: 30%;
+ height: 7vh;
+ float: left;
+ line-height: 50px;
+ font-size: 1.1cqw;
+ color: rgb(242, 242, 50);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.zhankuang {
+ width: 45%;
+ height: 3vh;
+ margin-top: 10px;
+ margin-left: 5%;
+ float: left;
+}
+#title {
+ float: left;
+ width: 95%;
+ height: 88vh;
+ margin-top: 40px;
+ margin-left: 3%;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 100%;
+ container-type: inline-size;
+}
+#bkuang {
+ width: 100%;
+ height: 55vh;
+ float: left;
+}
+.skuang {
+ width: 31%;
+ height: 55vh;
+ float: left;
+ border-top: none;
+ border-left: none;
+ border-bottom: none;
+ background: rgba(255, 255, 255, 0.2);
+ margin-left: 1.7%;
+ border-radius: 10px;
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/PpWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/PpWarehouse.vue"
new file mode 100644
index 0000000..706d1b3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/PpWarehouse.vue"
@@ -0,0 +1,503 @@
+<template>
+ <div id="title">
+ <div id="bkuang" style="border-top: none">
+ <div class="skuang">
+ <div class="zhuname">PP浠撳爢鍨涙満</div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈虹姸鎬�:</div>
+ <div class="xzhi" :title="data.R_PP_Status">{{ data.R_PP_Status }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈烘墜鑷姩鐘舵��:</div>
+ <div class="xzhi" :title="data.R_PP_AutoStatus">{{ data.R_PP_AutoStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">姝e湪鎵ц鐨勪换鍔″彿:</div>
+ <div class="xzhi" :title="data.R_PP_TaskNum">{{ data.R_PP_TaskNum }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈哄伐浣滅姸鎬�:</div>
+ <div class="xzhi" :title="data.R_PP_WorkStatus">{{ data.R_PP_WorkStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">浣滀笟绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_PP_WorkType">{{ data.R_PP_WorkType }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎵樼洏绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_PP_TrayType">{{ data.R_PP_TrayType }}</div>
+ </div>
+ </div>
+ <div class="skuang">
+ <div class="zhuname">鍏ュ簱2004绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">璇诲彇绠变綋鐮�(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Boxcode">{{ data.R_PP_Boxcode }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_HandShake4">{{ data.R_PP_HandShake4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Online4">{{ data.R_PP_Online4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Free4">{{ data.R_PP_Free4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Goods4">{{ data.R_PP_Goods4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Alarm4">{{ data.R_PP_Alarm4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_STB4">{{ data.R_PP_STB4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_ACK4">{{ data.R_PP_ACK4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_STB4">{{ data.W_PP_STB4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_ACK4">{{ data.W_PP_ACK4 }}</div>
+ </div>
+
+ <div class="zhuname">鍑哄簱2005绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_HandShake5">{{ data.R_PP_HandShake5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Online5">{{ data.R_PP_Online5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Free5">{{ data.R_PP_Free5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Goods5">{{ data.R_PP_Goods5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Alarm5">{{ data.R_PP_Alarm5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_STB5">{{ data.R_PP_STB5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_ACK5">{{ data.R_PP_ACK5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_STB5">{{ data.W_PP_STB5 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_ACK5">{{ data.W_PP_ACK5 }}</div>
+ </div>
+ </div>
+
+ <div class="skuang">
+ <div class="zhuname">鍑哄簱2016绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_HandShake6">{{ data.R_PP_HandShake6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Online6">{{ data.R_PP_Online6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Free6">{{ data.R_PP_Free6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Goods6">{{ data.R_PP_Goods6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Alarm6">{{ data.R_PP_Alarm6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_STB6">{{ data.R_PP_STB6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_ACK6">{{ data.R_PP_ACK6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_STB6">{{ data.W_PP_STB6 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_ACK6">{{ data.W_PP_ACK6 }}</div>
+ </div>
+ <div class="zhuname">鍑哄簱2017绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鎻℃墜淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_HandShake7">{{ data.R_PP_HandShake7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鑱旀満(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Online7">{{ data.R_PP_Online7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁绌洪棽(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Free7">{{ data.R_PP_Free7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏈夎揣(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Goods7">{{ data.R_PP_Goods7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鏁呴殰(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_Alarm7">{{ data.R_PP_Alarm7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_STB7">{{ data.R_PP_STB7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(璇�):</div>
+ <div class="xzhi" :title="data.R_PP_ACK7">{{ data.R_PP_ACK7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">璇锋眰淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_STB7">{{ data.W_PP_STB7 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍝嶅簲淇″彿(鍐�):</div>
+ <div class="xzhi" :title="data.W_PP_ACK7">{{ data.W_PP_ACK7 }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { ref, nextTick } from "vue";
+import { useStore } from "vuex";
+import { onMounted } from "vue";
+
+export default {
+ data() {
+ return {
+ xuan: 0
+ };
+ },
+ methods: {
+ },
+ setup() {
+ const store = useStore();
+ const data = ref({});
+
+ // 1. 瀹氫箟鏅�氬瓧娈电殑鏄犲皠瑙勫垯
+ const statusMap = {
+ R_PP_Status: {
+ 1: "姝e父",
+ 2: "鏁呴殰",
+ 3: "鎬ュ仠",
+ },
+ R_PP_AutoStatus: {
+ 0: "缁翠慨",
+ 1: "鎵嬪姩",
+ 2: "鍗婅嚜鍔�",
+ 3: "鑷姩",
+ },
+ R_PP_WorkStatus: {
+ 0: "寰呮満",
+ 1: "鍙栬揣涓�",
+ 2: "鍙栬揣瀹屾垚",
+ 4: "鏀捐揣涓�",
+ 5: "鏀捐揣瀹屾垚",
+ 6: "浠诲姟瀹屾垚",
+ },
+ R_PP_WorkType: {
+ 0: "鏃犱綔涓氫换鍔�(0)",
+ 1: "鍙栨斁璐т綔涓�(1)",
+ 2: "鍙彇璐т綔涓�(2)",
+ 3: "鍙斁璐т綔涓�(3)",
+ 4: "绉诲姩鍒版寚瀹氫綅缃�"
+ },
+ R_PP_TrayType: {
+ "-1": "绌虹(-1)",
+ 1: "灏忔墭鐩�(1)",
+ 2: "涓墭鐩�(2)",
+ 3: "澶ф墭鐩�(3)",
+ 4: "鐗瑰ぇ鎵樼洏(4)",
+ }
+ };
+ const onlines = [
+ "R_PP_Online6","R_PP_Online4",
+ "R_PP_Online5","R_PP_Online7"
+ ]
+ const online = {
+ true: "鑱旀満",
+ false: "鑴辨満"
+ };
+ const alarms = [
+ "R_PP_Alarm6","R_PP_Alarm4",
+ "R_PP_Alarm5","R_PP_Alarm7"
+ ]
+ const alarm = {
+ true: "鏁呴殰",
+ false: "姝e父"
+ };
+ const frees = [
+ "R_PP_Free6","R_PP_Free4",
+ "R_PP_Free5","R_PP_Free7"
+ ]
+ const free = {
+ true: "绌洪棽",
+ false: "绻佸繖"
+ };
+ const goods = [
+ "R_PP_Goods6", "R_PP_Goods4",
+ "R_PP_Goods5","R_PP_Goods7"
+ ]
+ const good = {
+ true: "鏈夎揣",
+ false: "鏃犺揣"
+ };
+
+ // 2. 瀹氫箟闇�瑕佸叡鐢ㄦ槧灏勮鍒欑殑瀛楁鍒楄〃鍜屽搴旂殑鏄犲皠瑙勫垯
+ const booleanFields = [
+ "R_PP_HandShake4", "R_PP_STB4",
+ "R_PP_ACK4", "W_PP_STB4",
+ "W_PP_ACK4",
+ "R_PP_HandShake5", "R_PP_STB5",
+ "R_PP_ACK5", "W_PP_STB5",
+ "W_PP_ACK5",
+ "R_PP_HandShake6", "R_PP_STB6",
+ "R_PP_ACK6", "W_PP_STB6",
+ "W_PP_ACK6",
+ "R_PP_HandShake7", "R_PP_STB7",
+ "R_PP_ACK7", "W_PP_STB7",
+ "W_PP_ACK7",
+ ];
+ const booleanMap = {
+ true: "鏄�",
+ false: "鍚�"
+ };
+
+ // 澶勭悊鏁版嵁锛屽厛澶勭悊鏅�氭槧灏勶紝鍐嶆壒閲忓鐞嗗叡鐢ㄦ槧灏勭殑瀛楁
+ const processData = (rawData) => {
+ if (!rawData) return {};
+ const processed = { ...rawData };
+
+ // 澶勭悊鏅�氬瓧娈垫槧灏�
+ Object.keys(statusMap).forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ const map = statusMap[key];
+ processed[key] = map[processed[key]] || processed[key];
+ }
+ });
+
+ // 鎵归噺澶勭悊鍏辩敤鏄犲皠瑙勫垯鐨勫瓧娈�
+ booleanFields.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = booleanMap[processed[key]] || processed[key];
+ }
+ });
+ onlines.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = online[processed[key]] || processed[key];
+ }
+ });
+ alarms.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = alarm[processed[key]] || processed[key];
+ }
+ });
+ frees.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = free[processed[key]] || processed[key];
+ }
+ });
+ goods.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = good[processed[key]] || processed[key];
+ }
+ });
+
+ return processed;
+ };
+
+ onMounted(() => {
+ nextTick(() => {
+ setInterval(() => {
+ const rawData = store.state.homedata;
+ data.value = processData(rawData);
+ const xian = document.getElementsByClassName("xzhi");
+ for (let i = 0; i < xian.length; i++) {
+ if (xian[i].innerHTML === "鏄�") {
+ xian[i].style.color = "yellow";
+ } else if (xian[i].innerHTML === "鍚�") {
+ xian[i].style.color = "red";
+ }
+ }
+ });
+ });
+ });
+
+ return {
+ data,
+ };
+ }
+};
+</script>
+
+<style scoped>
+.ding {
+ float: left;
+ width: 20px;
+ height: 20px;
+ margin-top: 7px;
+}
+.yan {
+ color: white;
+ float: left;
+ font-size: 25px;
+}
+.dakuang {
+ width: 250px;
+ height: 50px;
+ position: absolute;
+ top: 150px;
+ left: 200px;
+}
+#xiugai {
+ width: 100px;
+ height: 30px;
+ float: left;
+ border-radius: 5px;
+ text-align: center;
+ line-height: 30px;
+ cursor: pointer;
+ border: 1px solid white;
+ color: white;
+ background: rgba(255, 255, 255, 0.5);
+ font-size: 25px;
+ position: absolute;
+ top: 150px;
+ left: 450px;
+}
+#xiugai:hover {
+ background: #f60;
+}
+#shu1,
+#shu2 {
+ width: 200px;
+ height: 30px;
+ float: left;
+ margin-top: 0px;
+ margin-right: 0px;
+ border-radius: 5px;
+ border: 1px solid white;
+}
+#guan {
+ width: 40px;
+ height: 40px;
+ float: left;
+ font-size: 1.1cqw;
+ text-align: center;
+ line-height: 40px;
+ cursor: pointer;
+ margin-left: 560px;
+ color: white;
+ position: absolute;
+}
+#ti {
+ width: 600px;
+ height: 300px;
+ position: relative;
+ background: rgba(255, 255, 255, 1);
+ border-radius: 10px;
+ top: 230px;
+ left: 35%;
+ display: none;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 170%;
+ background-position: -220px 0px;
+}
+.zhuname {
+ width: 100%;
+ height: 5vh;
+ float: left;
+ text-align: center;
+ line-height: 50px;
+ font-weight: 700;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xname {
+ width: 70%;
+ height: 80px;
+ float: left;
+ line-height: 7vh;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xzhi {
+ width: 30%;
+ height: 7vh;
+ float: left;
+ line-height: 50px;
+ font-size: 1.1cqw;
+ color: rgb(242, 242, 50);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.zhankuang {
+ width: 45%;
+ height: 3vh;
+ margin-top: 10px;
+ margin-left: 5%;
+ float: left;
+}
+#title {
+ float: left;
+ width: 95%;
+ height: 88vh;
+ margin-top: 40px;
+ margin-left: 3%;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 100%;
+ container-type: inline-size;
+}
+#bkuang {
+ width: 100%;
+ height: 55vh;
+ float: left;
+}
+.skuang {
+ width: 31%;
+ height: 55vh;
+ float: left;
+ border-top: none;
+ border-left: none;
+ border-bottom: none;
+ background: rgba(255, 255, 255, 0.2);
+ margin-left: 1.7%;
+ border-radius: 10px;
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/SolderMaskWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/SolderMaskWarehouse.vue"
new file mode 100644
index 0000000..f84be25
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/SolderMaskWarehouse.vue"
@@ -0,0 +1,430 @@
+<template>
+ <div id="title">
+ <div id="bkuang" style="border-top: none">
+ <div class="skuang">
+ <div class="zhuname">闃荤剨浠撳爢鍨涙満</div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈虹姸鎬�:</div>
+ <div class="xzhi" :title="data.R_ZH_Status">{{ data.R_ZH_Status }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈烘墜鑷姩鐘舵��:</div>
+ <div class="xzhi" :title="data.R_ZH_AutoStatus">{{ data.R_ZH_AutoStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">姝e湪鎵ц鐨勪换鍔″彿:</div>
+ <div class="xzhi" :title="data.R_ZH_TaskNum">{{ data.R_ZH_TaskNum }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍫嗗灈鏈哄伐浣滅姸鎬�:</div>
+ <div class="xzhi" :title="data.R_ZH_WorkStatus">{{ data.R_ZH_WorkStatus }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">浣滀笟绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_ZH_WorkType">{{ data.R_ZH_WorkType }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鎵樼洏绫诲瀷:</div>
+ <div class="xzhi" :title="data.R_ZH_TrayType">{{ data.R_ZH_TrayType }}</div>
+ </div>
+ </div>
+ <div class="skuang">
+ <div class="zhuname">鍏ュ簱301绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鏀捐揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanPut1">{{ data.R_ZH_IsCanPut1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鍙栬揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanTake1">{{ data.R_ZH_IsCanTake1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣鎵樼洏绫诲瀷(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_TakePalletType1">{{ data.R_ZH_TakePalletType1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣鎵樼洏绫诲瀷(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutPalletType1">{{ data.W_ZH_PutPalletType1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutRequest1">{{ data.W_ZH_PutRequest1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutFinish1">{{ data.W_ZH_PutFinish1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeRequest1">{{ data.W_ZH_TakeRequest1 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeFinish1">{{ data.W_ZH_TakeFinish1 }}</div>
+ </div>
+ <div class="zhuname">鍏ュ簱302绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鏀捐揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanPut2">{{ data.R_ZH_IsCanPut2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鍙栬揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanTake2">{{ data.R_ZH_IsCanTake2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣鎵樼洏绫诲瀷(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_TakePalletType2">{{ data.R_ZH_TakePalletType2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣鎵樼洏绫诲瀷(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutPalletType2">{{ data.W_ZH_PutPalletType2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutRequest2">{{ data.W_ZH_PutRequest2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutFinish2">{{ data.W_ZH_PutFinish2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeRequest2">{{ data.W_ZH_TakeRequest2 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeFinish2">{{ data.W_ZH_TakeFinish2 }}</div>
+ </div>
+ </div>
+
+ <div class="skuang">
+ <div class="zhuname">鍑哄簱303绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鏀捐揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanPut3">{{ data.R_ZH_IsCanPut3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鍙栬揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanTake3">{{ data.R_ZH_IsCanTake3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣鎵樼洏绫诲瀷(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_TakePalletType3">{{ data.R_ZH_TakePalletType3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣鎵樼洏绫诲瀷(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutPalletType3">{{ data.W_ZH_PutPalletType3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutRequest3">{{ data.W_ZH_PutRequest3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutFinish3">{{ data.W_ZH_PutFinish3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeRequest3">{{ data.W_ZH_TakeRequest3 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeFinish3">{{ data.W_ZH_TakeFinish3 }}</div>
+ </div>
+ <div class="zhuname">鍑哄簱304绔欏彴</div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鏀捐揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanPut4">{{ data.R_ZH_IsCanPut4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏄惁鍏佽鍙栬揣(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_IsCanTake4">{{ data.R_ZH_IsCanTake4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣鎵樼洏绫诲瀷(璇�):</div>
+ <div class="xzhi" :title="data.R_ZH_TakePalletType4">{{ data.R_ZH_TakePalletType4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣鎵樼洏绫诲瀷(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutPalletType4">{{ data.W_ZH_PutPalletType4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutRequest4">{{ data.W_ZH_PutRequest4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鏀捐揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_PutFinish4">{{ data.W_ZH_PutFinish4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣璇锋眰(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeRequest4">{{ data.W_ZH_TakeRequest4 }}</div>
+ </div>
+ <div class="zhankuang">
+ <div class="xname">鍙栬揣瀹屾垚(鍐�):</div>
+ <div class="xzhi" :title="data.W_ZH_TakeFinish4">{{ data.W_ZH_TakeFinish4 }}</div>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script>
+import { ref, nextTick } from "vue";
+import { useStore } from "vuex";
+import { onMounted } from "vue";
+
+export default {
+ data() {
+ return {
+ xuan: 0
+ };
+ },
+ methods: {
+ },
+ setup() {
+ const store = useStore();
+ const data = ref({});
+
+ // 1. 瀹氫箟鏅�氬瓧娈电殑鏄犲皠瑙勫垯
+ const statusMap = {
+ R_ZH_Status: {
+ 1: "姝e父",
+ 2: "鏁呴殰",
+ 3: "鎬ュ仠",
+ },
+ R_ZH_AutoStatus: {
+ 0: "缁翠慨",
+ 1: "鎵嬪姩",
+ 2: "鍗婅嚜鍔�",
+ 3: "鑷姩",
+ },
+ R_ZH_WorkStatus: {
+ 0: "寰呮満",
+ 1: "鍙栬揣涓�",
+ 2: "鍙栬揣瀹屾垚",
+ 4: "鏀捐揣涓�",
+ 5: "鏀捐揣瀹屾垚",
+ 6: "浠诲姟瀹屾垚",
+ },
+ R_ZH_WorkType: {
+ 0: "鏃犱綔涓氫换鍔�(0)",
+ 1: "鍙栨斁璐т綔涓�(1)",
+ 2: "鍙彇璐т綔涓�(2)",
+ 3: "鍙斁璐т綔涓�(3)",
+ 4: "绉诲姩鍒版寚瀹氫綅缃�"
+ },
+ R_ZH_TrayType: {
+ "-1": "绌虹(-1)",
+ 1: "灏忔墭鐩�(1)",
+ 2: "涓墭鐩�(2)",
+ 3: "澶ф墭鐩�(3)",
+ 4: "鐗瑰ぇ鎵樼洏(4)",
+ }
+ };
+
+ // 2. 瀹氫箟闇�瑕佸叡鐢ㄦ槧灏勮鍒欑殑瀛楁鍒楄〃鍜屽搴旂殑鏄犲皠瑙勫垯
+ const booleanFields = [
+ "R_ZH_IsCanPut1", "R_ZH_IsCanTake1",
+ "W_ZH_PutRequest1", "W_ZH_PutFinish1",
+ "W_ZH_TakeRequest1", "W_ZH_TakeFinish1",
+ "R_ZH_IsCanPut2", "R_ZH_IsCanTake2",
+ "W_ZH_PutRequest2", "W_ZH_PutFinish2",
+ "W_ZH_TakeRequest2", "W_ZH_TakeFinish2",
+ "R_ZH_IsCanPut3", "R_ZH_IsCanTake3",
+ "W_ZH_PutRequest3", "W_ZH_PutFinish3",
+ "W_ZH_TakeRequest3", "W_ZH_TakeFinish3",
+ "R_ZH_IsCanPut4", "R_ZH_IsCanTake4",
+ "W_ZH_PutRequest4", "W_ZH_PutFinish4",
+ "W_ZH_TakeRequest4", "W_ZH_TakeFinish4",
+ ];
+ const booleanMap = {
+ true: "鏄�",
+ false: "鍚�"
+ };
+
+ // 澶勭悊鏁版嵁锛屽厛澶勭悊鏅�氭槧灏勶紝鍐嶆壒閲忓鐞嗗叡鐢ㄦ槧灏勭殑瀛楁
+ const processData = (rawData) => {
+ if (!rawData) return {};
+ const processed = { ...rawData };
+
+ // 澶勭悊鏅�氬瓧娈垫槧灏�
+ Object.keys(statusMap).forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ const map = statusMap[key];
+ processed[key] = map[processed[key]] || processed[key];
+ }
+ });
+
+ // 鎵归噺澶勭悊鍏辩敤鏄犲皠瑙勫垯鐨勫瓧娈�
+ booleanFields.forEach(key => {
+ if (processed.hasOwnProperty(key)) {
+ processed[key] = booleanMap[processed[key]] || processed[key];
+ }
+ });
+
+ return processed;
+ };
+
+ onMounted(() => {
+ nextTick(() => {
+ setInterval(() => {
+ const rawData = store.state.homedata;
+ data.value = processData(rawData);
+ const xian = document.getElementsByClassName("xzhi");
+ for (let i = 0; i < xian.length; i++) {
+ if (xian[i].innerHTML === "鏄�") {
+ xian[i].style.color = "yellow";
+ } else if (xian[i].innerHTML === "鍚�") {
+ xian[i].style.color = "red";
+ }
+ }
+ });
+ });
+ });
+
+ return {
+ data,
+ };
+ }
+};
+</script>
+
+<style scoped>
+.ding {
+ float: left;
+ width: 20px;
+ height: 20px;
+ margin-top: 7px;
+}
+.yan {
+ color: white;
+ float: left;
+ font-size: 25px;
+}
+.dakuang {
+ width: 250px;
+ height: 50px;
+ position: absolute;
+ top: 150px;
+ left: 200px;
+}
+#xiugai {
+ width: 100px;
+ height: 30px;
+ float: left;
+ border-radius: 5px;
+ text-align: center;
+ line-height: 30px;
+ cursor: pointer;
+ border: 1px solid white;
+ color: white;
+ background: rgba(255, 255, 255, 0.5);
+ font-size: 25px;
+ position: absolute;
+ top: 150px;
+ left: 450px;
+}
+#xiugai:hover {
+ background: #f60;
+}
+#shu1,
+#shu2 {
+ width: 200px;
+ height: 30px;
+ float: left;
+ margin-top: 0px;
+ margin-right: 0px;
+ border-radius: 5px;
+ border: 1px solid white;
+}
+#guan {
+ width: 40px;
+ height: 40px;
+ float: left;
+ font-size: 1.1cqw;
+ text-align: center;
+ line-height: 40px;
+ cursor: pointer;
+ margin-left: 560px;
+ color: white;
+ position: absolute;
+}
+#ti {
+ width: 600px;
+ height: 300px;
+ position: relative;
+ background: rgba(255, 255, 255, 1);
+ border-radius: 10px;
+ top: 230px;
+ left: 35%;
+ display: none;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 170%;
+ background-position: -220px 0px;
+}
+.zhuname {
+ width: 100%;
+ height: 5vh;
+ float: left;
+ text-align: center;
+ line-height: 50px;
+ font-weight: 700;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xname {
+ width: 70%;
+ height: 80px;
+ float: left;
+ line-height: 7vh;
+ font-size: 1.1cqw;
+ color: white;
+}
+.xzhi {
+ width: 30%;
+ height: 7vh;
+ float: left;
+ line-height: 50px;
+ font-size: 1.1cqw;
+ color: rgb(242, 242, 50);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.zhankuang {
+ width: 45%;
+ height: 3vh;
+ margin-top: 10px;
+ margin-left: 5%;
+ float: left;
+}
+#title {
+ float: left;
+ width: 95%;
+ height: 88vh;
+ margin-top: 40px;
+ margin-left: 3%;
+ background-image: url("../../img/1.png");
+ background-repeat: no-repeat;
+ background-size: 100%;
+ container-type: inline-size;
+}
+#bkuang {
+ width: 100%;
+ height: 55vh;
+ float: left;
+}
+.skuang {
+ width: 31%;
+ height: 55vh;
+ float: left;
+ border-top: none;
+ border-left: none;
+ border-bottom: none;
+ background: rgba(255, 255, 255, 0.2);
+ margin-left: 1.7%;
+ border-radius: 10px;
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/TestFrameWarehouse.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/TestFrameWarehouse.vue"
new file mode 100644
index 0000000..e6514a3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/src/views/deviceMonitoring/TestFrameWarehouse.vue"
@@ -0,0 +1,45 @@
+<template>
+ <div class="message-container">
+ <div class="item" v-for="(item, index) in list" :key="index">
+ <div class="title">{{ item.title }}({{ item.date }})</div>
+ <div class="content">{{ item.message }}</div>
+ </div>
+ </div>
+</template>
+
+<script>
+export default {
+ props: {
+ list: {
+ type: Array,
+ default: () => {
+ return [];
+ }
+ }
+ },
+ created() {
+ if (!this.list.length) {
+ this.list.push({
+ title: '娑堟伅werwer娴嬭瘯鏍囬',
+ message: '娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭娑堟伅娴嬭瘯鍐呭',
+ date: '2022-05-02 03:10'
+ });
+ }
+ }
+};
+</script>
+<style scoped lang="less">
+.message-container {
+ .title {
+ padding-bottom: 10px;
+ }
+ .item {
+ border-bottom: 1px solid #eee;
+ padding: 10px 20px;
+ }
+ .content {
+ color: #7e7e7e;
+ font-size: 13px;
+ }
+}
+</style>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceProtocolController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceProtocolController.cs"
index 68078c5..0f1ddca 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceProtocolController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/QuartzJob/DeviceProtocolController.cs"
@@ -5,6 +5,7 @@
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_Tasks;
namespace WIDESEAWCS_Server.Controllers.QuartzJob
{
@@ -18,6 +19,7 @@
[HttpPost, Route("GetImportData"), AllowAnonymous]
public WebResponseContent GetImportData(List<IFormFile> fileInput)
{
+
return Service.GetImportData(fileInput);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs"
index 5d8bc5a..958012c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs"
@@ -33,6 +33,7 @@
builder.RegisterModule<AutofacPropertityModuleReg>();//
}).ConfigureAppConfiguration((hostingContext, config) =>
{
+
hostingContext.Configuration.ConfigureApplication();
config.Sources.Clear();
config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false);
@@ -54,6 +55,9 @@
builder.Services.AddHostedService<QuartzJobDataTableHostedService>();
//builder.Services.AddWebSocketSetup();
+builder.Services.AddWebSocketSetup();
+
+builder.Services.AddHostedService<WarehouseHostedService>();
builder.Services.AddAutoMapperSetup();
@@ -67,6 +71,7 @@
builder.Services.AddHttpContextSetup();
+
builder.Services.AddHostedService<QuartzJobHostedService>();
builder.Services.AddMvc(options =>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
index 1ab72e2..348a55c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/ConveyorLineJob_PP.cs"
@@ -225,6 +225,27 @@
{
WriteInfo(device.DeviceName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
}
+ R_ConveyorLineInfo conveyorLineInfoRead1 = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress);
+ W_ConveyorLineInfo conveyorLineInfoWrite1 = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress);
+ R_ConveyorLineStatus conveyorLineStatus1 = conveyorLineInfoRead1.Status.ByteToBoolObject<R_ConveyorLineStatus>();
+ ConveyorLineSignal conveyorLineSignalRead1 = conveyorLineInfoRead1.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ ConveyorLineSignal conveyorLineSignalWrite1 = conveyorLineInfoWrite1.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ if (item.StationCode == "2004")
+ {
+ if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK)
+ {
+ StackerCraneJob_PP.pPReadData.R_PP_Boxcode = device.Communicator.Read<string>("DB900.578.0");
+ }
+ StackerCraneJob_PP.pPReadData.R_PP_HandShake4 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_PP.pPReadData.R_PP_Online4 = conveyorLineStatus1.Online;
+ StackerCraneJob_PP.pPReadData.R_PP_Free4 = conveyorLineStatus1.Free;
+ StackerCraneJob_PP.pPReadData.R_PP_Goods4 = conveyorLineStatus1.Goods;
+ StackerCraneJob_PP.pPReadData.R_PP_Alarm4 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_PP.pPReadData.R_PP_STB4 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_PP.pPReadData.R_PP_ACK4 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_PP.pPReadData.W_PP_STB4 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_PP.pPReadData.W_PP_ACK4 = conveyorLineSignalWrite1.ACK;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/PPReadData.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/PPReadData.cs"
new file mode 100644
index 0000000..def38fa
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/PPReadData.cs"
@@ -0,0 +1,234 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Tasks.PP浠�
+{
+ public class PPReadData
+ {
+ /// <summary>
+ /// 鍫嗗灈鏈虹姸鎬�
+ /// </summary>
+ public short R_PP_Status;
+
+ /// <summary>
+ /// 鍫嗗灈鏈烘墜鑷姩鐘舵��
+ /// </summary>
+ public short R_PP_AutoStatus;
+
+ /// <summary>
+ /// 褰撳墠姝e湪鎵ц鐨勪换鍔″彿
+ /// </summary>
+ public int R_PP_TaskNum;
+
+ /// <summary>
+ /// 鍫嗗灈鏈哄伐浣滅姸鎬�
+ /// </summary>
+ public short R_PP_WorkStatus;
+
+ /// <summary>
+ /// 浣滀笟绫诲瀷
+ /// </summary>
+ public short R_PP_WorkType;
+
+ /// <summary>
+ /// 鎵樼洏绫诲瀷
+ /// </summary>
+ public short R_PP_TrayType;
+
+
+ ///绔欏彴
+
+ ///<summary>
+ /// 璇诲彇鏉$爜
+ /// </summary>
+ public string R_PP_Boxcode;
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_PP_HandShake4;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_PP_Online4;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_PP_Free4;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_PP_Goods4;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_PP_Alarm4;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_STB4;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_ACK4;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_STB4;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_ACK4;
+
+
+
+
+
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_PP_HandShake5;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_PP_Online5;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_PP_Free5;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_PP_Goods5;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_PP_Alarm5;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_STB5;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_ACK5;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_STB5;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_ACK5;
+
+
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_PP_HandShake6;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_PP_Online6;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_PP_Free6;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_PP_Goods6;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_PP_Alarm6;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_STB6;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_ACK6;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_STB6;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_ACK6;
+
+
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_PP_HandShake7;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_PP_Online7;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_PP_Free7;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_PP_Goods7;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_PP_Alarm7;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_STB7;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_PP_ACK7;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_STB7;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_PP_ACK7;
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
index 3defe0a..061d640 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/StackerCraneJob_PP.cs"
@@ -28,6 +28,9 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_Core.Caches;
using AutoMapper;
+using WIDESEAWCS_Tasks.PP浠�;
+using HslCommunication.WebSocket;
+using WIDESEAWCS_Tasks.骞茶啘浠�;
namespace WIDESEAWCS_Tasks
{
@@ -39,11 +42,13 @@
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
+ public static PPReadData pPReadData = new PPReadData();
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
private List<Dt_ApiInfo> apiInfos;
+ private WebSocketServer _webSocketServer;
- public StackerCraneJob_PP(IMapper mapper, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, ICacheService cacheService)
+ public StackerCraneJob_PP(IMapper mapper, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, ICacheService cacheService,WebSocketServer webSocketServer)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -52,6 +57,7 @@
_stationMangerRepository = stationMangerRepository;
_cacheService = cacheService;
_mapper=mapper;
+ _webSocketServer = webSocketServer;
string? apiInfoStr = _cacheService.Get("apiInfos");
if (!string.IsNullOrEmpty(apiInfoStr))
@@ -103,6 +109,14 @@
}
}
}
+ pPReadData.R_PP_Status = ((short)commonStackerCrane.StackerCraneStatusValue);
+ pPReadData.R_PP_AutoStatus = ((short)commonStackerCrane.StackerCraneAutoStatusValue);
+ pPReadData.R_PP_WorkStatus = ((short)commonStackerCrane.StackerCraneWorkStatusValue);
+ pPReadData.R_PP_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt();
+ pPReadData.R_PP_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+ pPReadData.R_PP_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType);
+ string pPData = JsonConvert.SerializeObject(pPReadData);
+ _webSocketServer.PublishAllClientPayload(pPData);
}
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs"
index 1742b4d..81096e3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/PP\344\273\223/TSJConveyorLineJob_PP.cs"
@@ -219,6 +219,50 @@
{
WriteInfo(device.DeviceName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
}
+ R_ConveyorLineInfo conveyorLineInfoRead1 = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress);
+ W_ConveyorLineInfo conveyorLineInfoWrite1 = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress);
+ R_ConveyorLineStatus conveyorLineStatus1 = conveyorLineInfoRead1.Status.ByteToBoolObject<R_ConveyorLineStatus>();
+ ConveyorLineSignal conveyorLineSignalRead1 = conveyorLineInfoRead1.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ ConveyorLineSignal conveyorLineSignalWrite1 = conveyorLineInfoWrite1.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ if (item.StationCode == "2005")
+ {
+ if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK)
+ {
+ StackerCraneJob_PP.pPReadData.R_PP_Boxcode = device.Communicator.Read<string>("DB900.578.0");
+ }
+ StackerCraneJob_PP.pPReadData.R_PP_HandShake5 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_PP.pPReadData.R_PP_Online5 = conveyorLineStatus1.Online;
+ StackerCraneJob_PP.pPReadData.R_PP_Free5 = conveyorLineStatus1.Free;
+ StackerCraneJob_PP.pPReadData.R_PP_Goods5 = conveyorLineStatus1.Goods;
+ StackerCraneJob_PP.pPReadData.R_PP_Alarm5 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_PP.pPReadData.R_PP_STB5 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_PP.pPReadData.R_PP_ACK5 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_PP.pPReadData.W_PP_STB5 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_PP.pPReadData.W_PP_ACK5 = conveyorLineSignalWrite1.ACK;
+ }else if(item.StationCode == "2016")
+ {
+ StackerCraneJob_PP.pPReadData.R_PP_HandShake6 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_PP.pPReadData.R_PP_Online6 = conveyorLineStatus1.Online;
+ StackerCraneJob_PP.pPReadData.R_PP_Free6 = conveyorLineStatus1.Free;
+ StackerCraneJob_PP.pPReadData.R_PP_Goods6 = conveyorLineStatus1.Goods;
+ StackerCraneJob_PP.pPReadData.R_PP_Alarm6 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_PP.pPReadData.R_PP_STB6 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_PP.pPReadData.R_PP_ACK6 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_PP.pPReadData.W_PP_STB6 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_PP.pPReadData.W_PP_ACK6 = conveyorLineSignalWrite1.ACK;
+ }
+ else if (item.StationCode == "2016")
+ {
+ StackerCraneJob_PP.pPReadData.R_PP_HandShake7 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_PP.pPReadData.R_PP_Online7 = conveyorLineStatus1.Online;
+ StackerCraneJob_PP.pPReadData.R_PP_Free7 = conveyorLineStatus1.Free;
+ StackerCraneJob_PP.pPReadData.R_PP_Goods7 = conveyorLineStatus1.Goods;
+ StackerCraneJob_PP.pPReadData.R_PP_Alarm7 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_PP.pPReadData.R_PP_STB7 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_PP.pPReadData.R_PP_ACK7 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_PP.pPReadData.W_PP_STB7 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_PP.pPReadData.W_PP_ACK7 = conveyorLineSignalWrite1.ACK;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/UpdateExpirationlabelJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/UpdateExpirationlabelJob.cs"
new file mode 100644
index 0000000..05791af
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/UpdateExpirationlabelJob.cs"
@@ -0,0 +1,40 @@
+锘縰sing Newtonsoft.Json;
+using Quartz;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_QuartzJob;
+
+namespace WIDESEAWCS_Tasks
+{
+ [DisallowConcurrentExecution]
+ public partial class UpdateExpirationlabelJob : JobBase, IJob
+ {
+
+ public Task Execute(IJobExecutionContext context)
+ {
+ Thread.Sleep(4320000);
+ try
+ {
+ string address = AppSettings.Get("WMSApiAddress");
+ if (string.IsNullOrEmpty(address)) throw new Exception("鏈壘鍒癢MSApi鍦板潃");
+ string responseStr = HttpHelper.Get($"{address}/api/StockInfo/UpdateExpirationlabel");
+
+ WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
+ if (responseContent.Status)
+ {
+ return Task.CompletedTask;
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.Out.WriteLine(nameof(UpdateExpirationlabelJob) + ":" + ex.Message);
+ }
+ return Task.CompletedTask;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
index 3e84239..ec69ca0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/ConveyorLineJob_GM.cs"
@@ -17,6 +17,7 @@
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_QuartzJob.ConveyorLine.Enum;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Models;
using WIDESEAWCS_QuartzJob.Repository;
@@ -239,6 +240,50 @@
{
WriteInfo(device.DeviceName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
}
+ R_ConveyorLineInfo conveyorLineInfoRead1 = device.Communicator.ReadCustomer<R_ConveyorLineInfo>(deviceProRead.DeviceProAddress);
+ W_ConveyorLineInfo conveyorLineInfoWrite1 = device.Communicator.ReadCustomer<W_ConveyorLineInfo>(deviceProWrite.DeviceProAddress);
+ R_ConveyorLineStatus conveyorLineStatus1 = conveyorLineInfoRead1.Status.ByteToBoolObject<R_ConveyorLineStatus>();
+ ConveyorLineSignal conveyorLineSignalRead1 = conveyorLineInfoRead1.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ ConveyorLineSignal conveyorLineSignalWrite1 = conveyorLineInfoWrite1.Signal.ByteToBoolObject<ConveyorLineSignal>();
+ if (item.StationCode == "7003") {
+ if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK)
+ {
+ StackerCraneJob_GM.gMReadData.R_GM_Boxcode = device.Communicator.Read<string>("DB900.478.0");
+ }
+ StackerCraneJob_GM.gMReadData.R_GM_HandShake3 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_GM.gMReadData.R_GM_Online3 = conveyorLineStatus1.Online;
+ StackerCraneJob_GM.gMReadData.R_GM_Free3 = conveyorLineStatus1.Free;
+ StackerCraneJob_GM.gMReadData.R_GM_Goods3 = conveyorLineStatus1.Goods;
+ StackerCraneJob_GM.gMReadData.R_GM_Alarm3 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_GM.gMReadData.R_GM_STB3 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_GM.gMReadData.R_GM_ACK3 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_GM.gMReadData.W_GM_STB3 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_GM.gMReadData.W_GM_ACK3 = conveyorLineSignalWrite1.ACK;
+ }
+ else if(item.StationCode == "7004")
+ {
+ StackerCraneJob_GM.gMReadData.R_GM_HandShake4 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_GM.gMReadData.R_GM_Online4 = conveyorLineStatus1.Online;
+ StackerCraneJob_GM.gMReadData.R_GM_Free4 = conveyorLineStatus1.Free;
+ StackerCraneJob_GM.gMReadData.R_GM_Goods4 = conveyorLineStatus1.Goods;
+ StackerCraneJob_GM.gMReadData.R_GM_Alarm4 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_GM.gMReadData.R_GM_STB4 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_GM.gMReadData.R_GM_ACK4 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_GM.gMReadData.W_GM_STB4 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_GM.gMReadData.W_GM_ACK4 = conveyorLineSignalWrite1.ACK;
+ }
+ else if (item.StationCode == "7005")
+ {
+ StackerCraneJob_GM.gMReadData.R_GM_HandShake5 = conveyorLineStatus1.HandShake;
+ StackerCraneJob_GM.gMReadData.R_GM_Online5 = conveyorLineStatus1.Online;
+ StackerCraneJob_GM.gMReadData.R_GM_Free5 = conveyorLineStatus1.Free;
+ StackerCraneJob_GM.gMReadData.R_GM_Goods5 = conveyorLineStatus1.Goods;
+ StackerCraneJob_GM.gMReadData.R_GM_Alarm5 = conveyorLineStatus1.Alarm;
+ StackerCraneJob_GM.gMReadData.R_GM_STB5 = conveyorLineSignalRead1.STB;
+ StackerCraneJob_GM.gMReadData.R_GM_ACK5 = conveyorLineSignalRead1.ACK;
+ StackerCraneJob_GM.gMReadData.W_GM_STB5 = conveyorLineSignalWrite1.STB;
+ StackerCraneJob_GM.gMReadData.W_GM_ACK5 = conveyorLineSignalWrite1.ACK;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/GMReadData.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/GMReadData.cs"
new file mode 100644
index 0000000..a873676
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/GMReadData.cs"
@@ -0,0 +1,185 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Tasks.骞茶啘浠�
+{
+ public class GMReadData
+ {
+ /// <summary>
+ /// 鍫嗗灈鏈虹姸鎬�
+ /// </summary>
+ public short R_GM_Status;
+
+ /// <summary>
+ /// 鍫嗗灈鏈烘墜鑷姩鐘舵��
+ /// </summary>
+ public short R_GM_AutoStatus;
+
+ /// <summary>
+ /// 褰撳墠姝e湪鎵ц鐨勪换鍔″彿
+ /// </summary>
+ public int R_GM_TaskNum;
+
+ /// <summary>
+ /// 鍫嗗灈鏈哄伐浣滅姸鎬�
+ /// </summary>
+ public short R_GM_WorkStatus;
+
+ /// <summary>
+ /// 浣滀笟绫诲瀷
+ /// </summary>
+ public short R_GM_WorkType;
+
+ /// <summary>
+ /// 鎵樼洏绫诲瀷
+ /// </summary>
+ public short R_GM_TrayType;
+
+
+ ///绔欏彴
+
+ ///<summary>
+ /// 璇诲彇鏉$爜
+ /// </summary>
+ public string R_GM_Boxcode;
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_GM_HandShake3;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_GM_Online3;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_GM_Free3;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_GM_Goods3;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_GM_Alarm3;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_GM_STB3;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_GM_ACK3;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_GM_STB3;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_GM_ACK3;
+
+
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_GM_HandShake4;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_GM_Online4;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_GM_Free4;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_GM_Goods4;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_GM_Alarm4;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_GM_STB4;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_GM_ACK4;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_GM_STB4;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_GM_ACK4;
+
+
+ /// <summary>
+ /// 鎻℃墜淇″彿
+ /// </summary>
+ public bool R_GM_HandShake5;
+
+ /// <summary>
+ /// 1鑱旀満 0鑴辨満
+ /// </summary>
+ public bool R_GM_Online5;
+
+ /// <summary>
+ /// 1绌洪棽 0绻佸繖
+ /// </summary>
+ public bool R_GM_Free5;
+
+ /// <summary>
+ /// 1鏈夎揣 0鏃犺揣
+ /// </summary>
+ public bool R_GM_Goods5;
+
+ /// <summary>
+ /// 1鏁呴殰 0姝e父
+ /// </summary>
+ public bool R_GM_Alarm5;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(璇�)
+ /// </summary>
+ public bool R_GM_STB5;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(璇�)
+ /// </summary>
+ public bool R_GM_ACK5;
+
+ /// <summary>
+ /// 璇锋眰淇″彿(鍐�)
+ /// </summary>
+ public bool W_GM_STB5;
+
+ /// <summary>
+ /// 鍝嶅簲淇″彿(鍐�)
+ /// </summary>
+ public bool W_GM_ACK5;
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
index 50ce7ca..bdc3052 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs"
@@ -28,6 +28,8 @@
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_DTO.TaskInfo;
using AutoMapper;
+using HslCommunication.WebSocket;
+using WIDESEAWCS_Tasks.骞茶啘浠�;
namespace WIDESEAWCS_Tasks
{
@@ -38,13 +40,15 @@
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
+ public static GMReadData gMReadData = new GMReadData();
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
private readonly IRouterRepository _routerRepository;
private readonly IMapper _mapper;
private List<Dt_ApiInfo> apiInfos;
+ private WebSocketServer _webSocketServer;
- public StackerCraneJob_GM(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IMapper mapper)
+ public StackerCraneJob_GM(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IMapper mapper,WebSocketServer webSocketServer)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -54,6 +58,7 @@
_cacheService = cacheService;
_routerRepository = routerRepository;
_mapper = mapper;
+ _webSocketServer = webSocketServer;
string? apiInfoStr = _cacheService.Get("apiInfos");
if (!string.IsNullOrEmpty(apiInfoStr))
@@ -111,6 +116,14 @@
}
}
}
+ gMReadData.R_GM_Status = ((short)commonStackerCrane.StackerCraneStatusValue);
+ gMReadData.R_GM_AutoStatus = ((short)commonStackerCrane.StackerCraneAutoStatusValue);
+ gMReadData.R_GM_WorkStatus = ((short)commonStackerCrane.StackerCraneWorkStatusValue);
+ gMReadData.R_GM_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt();
+ gMReadData.R_GM_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+ gMReadData.R_GM_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType);
+ string gMData = JsonConvert.SerializeObject(gMReadData);
+ _webSocketServer.PublishAllClientPayload(gMData);
}
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs"
index b9049d6..854d077 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs"
@@ -1,4 +1,5 @@
-锘縰sing Quartz;
+锘縰sing Autofac.Core;
+using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -156,6 +157,24 @@
WriteError(hoister.DeviceName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,{deviceChildCode}");
}
}
+ if (deviceChildCode == "9001")
+ {
+ StackerCraneJob_YM.yMReadData.R_YM_Tray1 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Tray, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.R_YM_Leisure1 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Leisure, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.W_YM_RequestIn1 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.RequestIn, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.W_YM_RequestOut1 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.RequestOut, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.R_YM_Inbounding1 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Inbounding, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.R_YM_Outbounding1 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Outbounding, deviceChildCode);
+ }
+ else if (deviceChildCode == "9002")
+ {
+ StackerCraneJob_YM.yMReadData.R_YM_Tray2 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Tray, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.R_YM_Leisure2 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Leisure, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.W_YM_RequestIn2 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.RequestIn, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.W_YM_RequestOut2 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.RequestOut, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.R_YM_Inbounding2 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Inbounding, deviceChildCode);
+ StackerCraneJob_YM.yMReadData.R_YM_Outbounding2 = hoister.GetValue<HoisterDBName, bool>(HoisterDBName.Outbounding, deviceChildCode);
+ }
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs"
index 8497251..345e549 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/StackerCraneJob_YM.cs"
@@ -1,4 +1,5 @@
-锘縰sing Microsoft.AspNetCore.Components.Routing;
+锘縰sing HslCommunication.WebSocket;
+using Microsoft.AspNetCore.Components.Routing;
using Newtonsoft.Json;
using Quartz;
using System;
@@ -24,6 +25,8 @@
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
using WIDESEAWCS_Tasks.HoisterJob;
using WIDESEAWCS_Tasks.StackerCraneJob;
+using WIDESEAWCS_Tasks.娌瑰ⅷ浠�;
+using WIDESEAWCS_Tasks.闃荤剨浠�;
namespace WIDESEAWCS_Tasks
{
@@ -35,12 +38,14 @@
{
private readonly ICacheService _cacheService;
private readonly ITaskService _taskService;
+ public static YMReadData yMReadData = new YMReadData();
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
+ private WebSocketServer _webSocketServer;
- public StackerCraneJob_YM(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository)
+ public StackerCraneJob_YM(ITaskService taskService, ICacheService cacheService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository,WebSocketServer webSocketServer)
{
_cacheService = cacheService;
_taskService = taskService;
@@ -48,6 +53,7 @@
_taskRepository = taskRepository;
_routerService = routerService;
_stationMangerRepository = stationMangerRepository;
+ _webSocketServer = webSocketServer;
}
public Task Execute(IJobExecutionContext context)
@@ -87,6 +93,14 @@
}
}
}
+ yMReadData.R_YM_Status = ((short)commonStackerCrane.StackerCraneStatusValue);
+ yMReadData.R_YM_AutoStatus = ((short)commonStackerCrane.StackerCraneAutoStatusValue);
+ yMReadData.R_YM_WorkStatus = ((short)commonStackerCrane.StackerCraneWorkStatusValue);
+ yMReadData.R_YM_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt();
+ yMReadData.R_YM_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+ yMReadData.R_YM_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType);
+ string yMData = JsonConvert.SerializeObject(yMReadData);
+ _webSocketServer.PublishAllClientPayload(yMData);
}
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/YMReadData.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/YMReadData.cs"
new file mode 100644
index 0000000..43c68fd
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/YMReadData.cs"
@@ -0,0 +1,106 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Tasks.娌瑰ⅷ浠�
+{
+ public class YMReadData
+ {
+ /// <summary>
+ /// 鍫嗗灈鏈虹姸鎬�
+ /// </summary>
+ public short R_YM_Status;
+
+ /// <summary>
+ /// 鍫嗗灈鏈烘墜鑷姩鐘舵��
+ /// </summary>
+ public short R_YM_AutoStatus;
+
+ /// <summary>
+ /// 褰撳墠姝e湪鎵ц鐨勪换鍔″彿
+ /// </summary>
+ public int R_YM_TaskNum;
+
+ /// <summary>
+ /// 鍫嗗灈鏈哄伐浣滅姸鎬�
+ /// </summary>
+ public short R_YM_WorkStatus;
+
+ /// <summary>
+ /// 浣滀笟绫诲瀷
+ /// </summary>
+ public short R_YM_WorkType;
+
+ /// <summary>
+ /// 鎵樼洏绫诲瀷
+ /// </summary>
+ public short R_YM_TrayType;
+
+
+ ///鎻愬崌鏈�
+ /// <summary>
+ /// 鏈夎揣(璇�)
+ /// </summary>
+ public bool R_YM_Tray1;
+
+ /// <summary>
+ /// 鍏ュ簱鎵ц涓�(璇�)
+ /// </summary>
+ public bool R_YM_Inbounding1;
+
+ /// <summary>
+ /// 鎻愬崌鏈虹┖闂�(璇�)
+ /// </summary>
+ public bool R_YM_Leisure1;
+
+ /// <summary>
+ /// 鍑哄簱鎵ц涓�(璇�)
+ /// </summary>
+ public bool R_YM_Outbounding1;
+
+ /// <summary>
+ /// 鐢宠鍏ュ簱(鍐�)
+ /// </summary>
+ public bool W_YM_RequestIn1;
+
+ /// <summary>
+ /// 鐢宠鍑哄簱(鍐�)
+ /// </summary>
+ public bool W_YM_RequestOut1;
+
+
+ /// <summary>
+ /// 鏈夎揣(璇�)
+ /// </summary>
+ public bool R_YM_Tray2;
+
+ /// <summary>
+ /// 鍏ュ簱鎵ц涓�(璇�)
+ /// </summary>
+ public bool R_YM_Inbounding2;
+
+ /// <summary>
+ /// 鎻愬崌鏈虹┖闂�(璇�)
+ /// </summary>
+ public bool R_YM_Leisure2;
+
+ /// <summary>
+ /// 鍑哄簱鎵ц涓�(璇�)
+ /// </summary>
+ public bool R_YM_Outbounding2;
+
+ /// <summary>
+ /// 鐢宠鍏ュ簱(鍐�)
+ /// </summary>
+ public bool W_YM_RequestIn2;
+
+ /// <summary>
+ /// 鐢宠鍑哄簱(鍐�)
+ /// </summary>
+ public bool W_YM_RequestOut2;
+
+ }
+}
+
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs"
index d67fe80..fd1917e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/ConveyorLineJob_FL.cs"
@@ -1,10 +1,12 @@
-锘縰sing Microsoft.AspNetCore.Components.Routing;
+锘縰sing HslCommunication.WebSocket;
+using Microsoft.AspNetCore.Components.Routing;
using Newtonsoft.Json;
using Quartz;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
@@ -19,6 +21,7 @@
using WIDESEAWCS_QuartzJob.Repository;
using WIDESEAWCS_QuartzJob.Service;
using WIDESEAWCS_Tasks.ConveyorLineJob;
+using WIDESEAWCS_Tasks.杈呮枡浠�;
using ICacheService = WIDESEAWCS_Core.Caches.ICacheService;
namespace WIDESEAWCS_Tasks
@@ -30,13 +33,15 @@
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly ITaskRepository _taskRepository;
+ public static FLReadData fLReadData = new FLReadData();
private readonly IStationMangerRepository _stationMangerRepository;
private readonly IRouterRepository _routerRepository;
private readonly IRouterService _routerService;
private readonly IRouterExtension _routerExtension;
private readonly List<Dt_WarehouseDevice> warehouseDevices;
+ private WebSocketServer _webSocketServer;
- public ConveyorLineJob_FL(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension)
+ public ConveyorLineJob_FL(ICacheService cacheService, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IRouterService routerService, IRouterExtension routerExtension,WebSocketServer webSocketServer)
{
_cacheService = cacheService;
_taskService = taskService;
@@ -46,6 +51,7 @@
_routerRepository = routerRepository;
_routerService = routerService;
_routerExtension = routerExtension;
+ _webSocketServer = webSocketServer;
string? warehouseDevicesStr = _cacheService.Get<string>(nameof(Dt_WarehouseDevice));
if (!string.IsNullOrEmpty(warehouseDevicesStr))
@@ -98,6 +104,22 @@
_taskService.UpdateTask(newTask, TaskStatusEnum.Line_Executing);
}
}
+ if (item.StationCode == "8005")
+ {
+ R_ConveyorLineFLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineFLInfo>(deviceProRead.DeviceProAddress);
+ bool conveyArrivaled = device.GetValue<R_ConveyorLineFLDB, bool>(R_ConveyorLineFLDB.ConveyArrivaled, item.StationCode);
+ fLReadData.W_PutFinish5 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutFinish, item.StationCode);
+ fLReadData.R_ConveyArrivaled5 = device.GetValue<R_ConveyorLineFLDB, bool>(R_ConveyorLineFLDB.ConveyArrivaled, item.StationCode);
+ fLReadData.R_Barcode5 = conveyorLineInfoRead.Barcode;
+ fLReadData.R_TaskNum5 = conveyorLineInfoRead.TaskNum;
+ }
+ else if (item.StationCode == "8001")
+ {
+ fLReadData.W_PutFinish1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutFinish, item.StationCode);
+ fLReadData.R_IsCanPut = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, item.StationCode);
+ }
+ string yMData = JsonConvert.SerializeObject(fLReadData);
+ _webSocketServer.PublishAllClientPayload(yMData);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/FLReadData.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/FLReadData.cs"
new file mode 100644
index 0000000..b8ed2fa
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/FLReadData.cs"
@@ -0,0 +1,53 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Tasks.杈呮枡浠�
+{
+ public class FLReadData
+ {
+ ///杈撻�佺嚎
+ /// <summary>
+ /// 鏀捐揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_PutFinish5;
+
+ /// <summary>
+ /// 鎵樼洏鍙�
+ /// </summary>
+ public string W_Barcode5;
+
+ /// <summary>
+ /// 鍐欏叆浠诲姟鍙�
+ /// </summary>
+ public string W_TaskNum5;
+
+ /// <summary>
+ /// 鍏ュ簱鍒颁綅鎸囦护
+ /// </summary>
+ public bool R_ConveyArrivaled5;
+
+ /// <summary>
+ /// 鍏ュ簱鍒颁綅鎵樼洏鍙�
+ /// </summary>
+ public string R_Barcode5;
+
+ /// <summary>
+ /// 鍏ュ簱鍒颁綅浠诲姟鍙�
+ /// </summary>
+ public string R_TaskNum5;
+
+
+ /// <summary>
+ /// 鏀捐揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_PutFinish1;
+
+ /// <summary>
+ /// 鏄惁鍏佽鏀捐揣(璇�)
+ /// </summary>
+ public bool R_IsCanPut;
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs"
index fb868b5..d70a8aa 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/GroundStationJob_ZH.cs"
@@ -15,6 +15,7 @@
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_Tasks.HoisterJob;
+using WIDESEAWCS_Tasks.闃荤剨浠�;
namespace WIDESEAWCS_Tasks
{
@@ -100,6 +101,49 @@
_taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: stationManger.StackerCraneStationCode, targetAddress: locationCode, nextAddress: locationCode, deviceCode: stationManger.StackerCraneCode);
}
}
+ if (item.StationCode == "301")
+ {
+ StackerCraneJob_ZH.zHReadData.R_ZH_TakePalletType1= device.GetValue<GroundStationDBName, short>(GroundStationDBName.R_TakePalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanPut1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanTake1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanTake, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutPalletType1 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.W_PutPalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutRequest1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutFinish1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutFinish, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeRequest1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeFinish1 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeFinish, item.StationCode);
+ }else if(item.StationCode == "302")
+ {
+ StackerCraneJob_ZH.zHReadData.R_ZH_TakePalletType2 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.R_TakePalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanPut2 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanTake2 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanTake, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutPalletType2 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.W_PutPalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutRequest2 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutFinish2 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutFinish, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeRequest2 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeFinish2 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeFinish, item.StationCode);
+ }
+ else if (item.StationCode == "303")
+ {
+ StackerCraneJob_ZH.zHReadData.R_ZH_TakePalletType3 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.R_TakePalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanPut3 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanTake3 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanTake, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutPalletType3 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.W_PutPalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutRequest3 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutFinish3 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutFinish, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeRequest3 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeFinish3 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeFinish, item.StationCode);
+ }
+ else if (item.StationCode == "304")
+ {
+ StackerCraneJob_ZH.zHReadData.R_ZH_TakePalletType4 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.R_TakePalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanPut4 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanPut, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.R_ZH_IsCanTake4 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.R_IsCanTake, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutPalletType4 = device.GetValue<GroundStationDBName, short>(GroundStationDBName.W_PutPalletType, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutRequest4 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_PutFinish4 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_PutFinish, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeRequest4 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeRequest, item.StationCode);
+ StackerCraneJob_ZH.zHReadData.W_ZH_TakeFinish4 = device.GetValue<GroundStationDBName, bool>(GroundStationDBName.W_TakeFinish, item.StationCode);
+ }
}
catch (Exception ex)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
index 7f7aa5b..d5785a0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/StackerCraneJob_ZH.cs"
@@ -27,6 +27,8 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_Core.Caches;
using AutoMapper;
+using WIDESEAWCS_Tasks.闃荤剨浠�;
+using HslCommunication.WebSocket;
namespace WIDESEAWCS_Tasks
{
@@ -35,14 +37,16 @@
{
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
+ public static ZHReadData zHReadData = new ZHReadData();
private readonly ITaskRepository _taskRepository;
private readonly IRouterService _routerService;
private readonly IStationMangerRepository _stationMangerRepository;
private readonly ICacheService _cacheService;
private readonly IMapper _mapper;
+ private WebSocketServer _webSocketServer;
private List<Dt_ApiInfo> apiInfos;
- public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository,ICacheService cacheService, IMapper mapper)
+ public StackerCraneJob_ZH(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository,ICacheService cacheService, IMapper mapper, WebSocketServer webSocketServer)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -51,6 +55,7 @@
_stationMangerRepository = stationMangerRepository;
_cacheService = cacheService;
_mapper = mapper;
+ _webSocketServer = webSocketServer;
string? apiInfoStr = _cacheService.Get("apiInfos");
if (!string.IsNullOrEmpty(apiInfoStr))
{
@@ -100,6 +105,14 @@
}
}
}
+ zHReadData.R_ZH_Status = ((short)commonStackerCrane.StackerCraneStatusValue);
+ zHReadData.R_ZH_AutoStatus = ((short)commonStackerCrane.StackerCraneAutoStatusValue);
+ zHReadData.R_ZH_WorkStatus = ((short)commonStackerCrane.StackerCraneWorkStatusValue);
+ zHReadData.R_ZH_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt();
+ zHReadData.R_ZH_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+ zHReadData.R_ZH_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType);
+ string zHData = JsonConvert.SerializeObject(zHReadData);
+ _webSocketServer.PublishAllClientPayload(zHData);
}
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/ZHReadData.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/ZHReadData.cs"
new file mode 100644
index 0000000..583f3cd
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\351\230\273\347\204\212\344\273\223/ZHReadData.cs"
@@ -0,0 +1,174 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Tasks.闃荤剨浠�
+{
+ public class ZHReadData
+ {
+ /// <summary>
+ /// 鍫嗗灈鏈虹姸鎬�
+ /// </summary>
+ public short R_ZH_Status;
+
+ /// <summary>
+ /// 鍫嗗灈鏈烘墜鑷姩鐘舵��
+ /// </summary>
+ public short R_ZH_AutoStatus;
+
+ /// <summary>
+ /// 褰撳墠姝e湪鎵ц鐨勪换鍔″彿
+ /// </summary>
+ public int R_ZH_TaskNum;
+
+ /// <summary>
+ /// 鍫嗗灈鏈哄伐浣滅姸鎬�
+ /// </summary>
+ public short R_ZH_WorkStatus;
+
+ /// <summary>
+ /// 浣滀笟绫诲瀷
+ /// </summary>
+ public short R_ZH_WorkType;
+
+ /// <summary>
+ /// 鎵樼洏绫诲瀷
+ /// </summary>
+ public short R_ZH_TrayType;
+
+ ///鍚勭珯鍙拌鍙�301
+
+ ///鍙栬揣鎵樼洏绫诲瀷(璇�)
+ public short R_ZH_TakePalletType1;
+ /// <summary>
+ /// 鏀捐揣鎵樼洏绫诲瀷(鍐�)
+ /// </summary>
+ public short W_ZH_PutPalletType1;
+ /// <summary>
+ /// 鏄惁鍏佽鏀捐揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanPut1;
+ /// <summary>
+ /// 鏄惁鍏佽鍙栬揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanTake1;
+ /// <summary>
+ /// 鏀捐揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_PutRequest1;
+ /// <summary>
+ /// 鏀捐揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_PutFinish1;
+ /// <summary>
+ /// 鍙栬揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeRequest1;
+ /// <summary>
+ /// 鍙栬揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeFinish1;
+
+
+ ///鍚勭珯鍙拌鍙�302
+
+ ///鍙栬揣鎵樼洏绫诲瀷(璇�)
+ public short R_ZH_TakePalletType2;
+ /// <summary>
+ /// 鏀捐揣鎵樼洏绫诲瀷(鍐�)
+ /// </summary>
+ public short W_ZH_PutPalletType2;
+ /// <summary>
+ /// 鏄惁鍏佽鏀捐揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanPut2;
+ /// <summary>
+ /// 鏄惁鍏佽鍙栬揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanTake2;
+ /// <summary>
+ /// 鏀捐揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_PutRequest2;
+ /// <summary>
+ /// 鏀捐揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_PutFinish2;
+ /// <summary>
+ /// 鍙栬揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeRequest2;
+ /// <summary>
+ /// 鍙栬揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeFinish2;
+
+ ///鍚勭珯鍙拌鍙�303
+
+ ///鍙栬揣鎵樼洏绫诲瀷(璇�)
+ public short R_ZH_TakePalletType3;
+ /// <summary>
+ /// 鏀捐揣鎵樼洏绫诲瀷(鍐�)
+ /// </summary>
+ public short W_ZH_PutPalletType3;
+ /// <summary>
+ /// 鏄惁鍏佽鏀捐揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanPut3;
+ /// <summary>
+ /// 鏄惁鍏佽鍙栬揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanTake3;
+ /// <summary>
+ /// 鏀捐揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_PutRequest3;
+ /// <summary>
+ /// 鏀捐揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_PutFinish3;
+ /// <summary>
+ /// 鍙栬揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeRequest3;
+ /// <summary>
+ /// 鍙栬揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeFinish3;
+
+ ///鍚勭珯鍙拌鍙�304
+
+ ///鍙栬揣鎵樼洏绫诲瀷(璇�)
+ public short R_ZH_TakePalletType4;
+ /// <summary>
+ /// 鏀捐揣鎵樼洏绫诲瀷(鍐�)
+ /// </summary>
+ public short W_ZH_PutPalletType4;
+ /// <summary>
+ /// 鏄惁鍏佽鏀捐揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanPut4;
+ /// <summary>
+ /// 鏄惁鍏佽鍙栬揣(璇�)
+ /// </summary>
+ public bool R_ZH_IsCanTake4;
+ /// <summary>
+ /// 鏀捐揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_PutRequest4;
+ /// <summary>
+ /// 鏀捐揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_PutFinish4;
+ /// <summary>
+ /// 鍙栬揣璇锋眰(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeRequest4;
+ /// <summary>
+ /// 鍙栬揣瀹屾垚(鍐�)
+ /// </summary>
+ public bool W_ZH_TakeFinish4;
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/AddErpProScrapSheet.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/AddErpProScrapSheet.vue"
index 99be825..530b7f4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/AddErpProScrapSheet.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/AddErpProScrapSheet.vue"
@@ -401,12 +401,6 @@
this.proCodeOptions = [];
}
},
- created() {
- // 鍒濆鍖栨椂棰勫姞杞戒粨搴撴暟鎹�
- if (this.warehouses.length === 0) {
- this.getWarehouseList();
- }
- }
};
</script>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/ProStockView.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/ProStockView.js"
index 92ad623..e81ae04 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/ProStockView.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/ProStockView.js"
@@ -78,6 +78,29 @@
}
}
+ if (column.field == 'proinventoryage') {
+ const today = new Date()
+ column.formatter = (row) => {
+ if (row.details.length > 0) {
+ const closestDate = row.details
+ .map(x => {
+ const date = new Date(x.createDate);
+ const ageInDays = Math.ceil((today - date) / (1000 * 60 * 60 * 24));
+ return { date, ageInDays };
+ })
+ .reduce((closest, current) => (current.ageInDays < closest.ageInDays ? current : closest))
+ .date;
+
+ const inventoryAge = Math.ceil((today - closestDate) / (1000 * 60 * 60 * 24));
+
+ row.inventoryAge = inventoryAge;
+
+ return `${inventoryAge} 澶ー;
+ }
+ // 濡傛灉娌℃湁鏄庣粏锛岃繑鍥炵┖鎴栨彁绀轰俊鎭�
+ return '-';
+ }
+ }
if (column.field == 'sumStock') {
column.formatter = (row) => {
if (row.details.length > 0) {
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
index b8c502e..5a7c805 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -1,4 +1,3 @@
-
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
import { el } from "element-plus/es/locales.mjs";
@@ -54,36 +53,58 @@
return str = list[0] == "" ? "鏃�" : str;
}
}
- if (column.field == 'materielInfo') {
- const today = new Date()
- column.formatter = (row) => {
- if (row.details.length > 0) {
- const today = new Date();
- const closestDate = row.details
- .map(x => {
- const date = new Date(x.effectiveDate);
- const diffInDays = Math.ceil((date - today) / (1000 * 60 * 60 * 24)); // 鏀逛负璁$畻鍓╀綑澶╂暟
- return { date, diffInDays };
- })
- .reduce((closest, current) => (current.diffInDays < closest.diffInDays ? current : closest))
- .date;
+ if (column.field == 'materielInfo') {
+ const today = new Date()
+ column.formatter = (row) => {
+ if (row.details.length > 0) {
+ const today = new Date();
+ const closestDate = row.details
+ .map(x => {
+ const date = new Date(x.effectiveDate);
+ const diffInDays = Math.ceil((date - today) / (1000 * 60 * 60 * 24)); // 鏀逛负璁$畻鍓╀綑澶╂暟
+ return { date, diffInDays };
+ })
+ .reduce((closest, current) => (current.diffInDays < closest.diffInDays ? current : closest))
+ .date;
- const daysRemaining = Math.ceil((closestDate - today) / (1000 * 60 * 60 * 24));
-
- row.expiryDays = daysRemaining;
-
- if (daysRemaining <= 0) {
- return '<span style="color:rgb(30, 27, 27)">鏃犱繚璐ㄦ湡</span>';
+ const daysRemaining = Math.ceil((closestDate - today) / (1000 * 60 * 60 * 24));
+
+ row.expiryDays = daysRemaining;
+
+ if (daysRemaining <= 0) {
+ return '<span style="color:rgb(30, 27, 27)">鏃犱繚璐ㄦ湡</span>';
+ } else {
+ return '<span style="color: #F56C6C">' + daysRemaining + "澶�" + '</span>';
+ }
} else {
- return '<span style="color: #F56C6C">' + daysRemaining + "澶�" + '</span>';
+ row.expiryDays = null;
+ return '<span style="color:rgb(24, 18, 18)">鏃犱繚璐ㄦ湡</span>';
}
- } else {
- row.expiryDays = null;
- return '<span style="color:rgb(24, 18, 18)">鏃犱繚璐ㄦ湡</span>';
- }
- }
+ }
+ }
-
+ if (column.field == 'inventoryage') {
+ const today = new Date()
+ column.formatter = (row) => {
+ if (row.details.length > 0) {
+ const closestDate = row.details
+ .map(x => {
+ const date = new Date(x.createDate);
+ const ageInDays = Math.ceil((today - date) / (1000 * 60 * 60 * 24));
+ return { date, ageInDays };
+ })
+ .reduce((closest, current) => (current.ageInDays < closest.ageInDays ? current : closest))
+ .date;
+
+ const inventoryAge = Math.ceil((today - closestDate) / (1000 * 60 * 60 * 24));
+
+ row.inventoryAge = inventoryAge;
+
+ return `${inventoryAge} 澶ー;
+ }
+ // 濡傛灉娌℃湁鏄庣粏锛岃繑鍥炵┖鎴栨彁绀轰俊鎭�
+ return '-';
+ }
}
if (column.field == 'sumStock') {
column.formatter = (row) => {
@@ -93,9 +114,9 @@
.map(x => {
sum += (x.stockQuantity)
})
- return '<span style="color: #F56C6C">' + sum.toFixed(3) + row.details[0].unit + '</span>';
+ return '<span style="color: rgb(24, 18, 18)">' + sum.toFixed(3) + row.details[0].unit + '</span>';
} else {
- return '<span style="color: #F56C6C">' + "1涓�" + '</span>';
+ return '<span style="color: rgb(24, 18, 18)">' + "1涓�" + '</span>';
}
}
@@ -103,28 +124,17 @@
})
this.columns.forEach((column) => {
column.cellStyle = (row) => {
- // 鍙鐞嗘湁淇濊川鏈熸暟鎹殑鎯呭喌
- if (row.expiryDays !== null && row.expiryDays !== undefined) {
- if (row.expiryDays <= 0) {
- return { background: 'red' }; // 绾㈣壊鑳屾櫙锛堝凡杩囨湡锛�
- } else if (row.expiryDays <= 30) {
- return { background: 'yellow' }; // 榛勮壊鑳屾櫙锛堜复鏈燂級
+ if (row.expirationlabel !== undefined && row.expirationlabel !== null) {
+ if (row.expirationlabel === 2) {
+ return { background: 'yellow' };
+ } else if (row.expirationlabel === 3) {
+ return { background: '#ffc0cb' };
}
- }
- return {}; // 榛樿鏃犺儗鏅壊
- };
+ }
+ return {};
+ };
+ });
-
-
-
- //濡傛灉鏍规嵁琛岀殑鏌愪釜鍊艰缃暣琛岄鑹�
- //璁剧疆鏁磋鑳屾櫙棰滆壊
- // x.cellStyle = (row, rowIndex, columnIndex) => {
- // if (row.ProductCode == '10044464880643') {
- // return { background: '#ddecfd' };
- // }
- // };
- });
},
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
@@ -172,4 +182,4 @@
}
}
};
-export default extension;
+export default extension;
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
index 58d053c..451917f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js"
@@ -20,6 +20,12 @@
let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel');
if (TaskHandCancelBtn) {
TaskHandCancelBtn.onClick = function () {
+ this.$confirm("鏄惁纭鍙栨秷浠诲姟","鎵嬪姩浠诲姟鍙栨秷璀﹀憡",{
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ center: true,
+ }).then(() => {
let rows = this.$refs.table.getSelected();
if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!");
@@ -35,6 +41,8 @@
return this.$error(x.message);
}
});
+ });
+
}
}
let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted');
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
index 19546ff..87db604 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue"
@@ -136,7 +136,7 @@
type: "string",
width: 90,
align: "left",
- bind:{key: "warehouses", data: []}
+ bind:{ key: "warehouses", data: []}
},
{
field: "orderType",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue"
index 1bcf0d6..f2d294f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue"
@@ -113,6 +113,9 @@
{ title: "浠诲姟鍙�", field: "taskNum", type: "like" },
{ title: "鐘舵��", field: "status", type: "select",dataKey:"outLockStockStatusEnum", data:[]},
],
+ [
+ { title: "鍑哄簱鏃堕棿",field: "createDate",type: "datetime"},
+ ],
]);
const columns = ref([
{
@@ -129,7 +132,7 @@
field: "orderNo",
title: "鍗曟嵁缂栧彿",
type: "string",
- width: 150,
+ width: 180,
align: "left",
},
@@ -189,7 +192,7 @@
field: "locationCode",
title: "璐т綅缂栧彿",
type: "datetime",
- width: 160,
+ width: 220,
align: "left",
},
{
@@ -235,6 +238,20 @@
align: "left",
bind:{key:"outLockStockStatusEnum", data: []}
},
+ {
+ field: "creater",
+ title: "鍒涘缓浜�",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "createDate",
+ title: "鍒涘缓鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
]);
const detail = ref({
cnName: "#detailCnName",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/ProStockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/ProStockView.vue"
index 5a2de27..c1da3d8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/ProStockView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/ProStockView.vue"
@@ -56,6 +56,7 @@
],
[
{ title: "浜у搧鐗堟湰", field: "productVersion",type: "like"},
+ { title: "搴撳瓨鍒涘缓鏃堕棿",field: "createDate",type: "datetime"},
]
]);
const columns = ref([
@@ -144,6 +145,13 @@
align: "left",
},
{
+ field: "proinventoryage",
+ title: "鎴愬搧搴撻緞",
+ type: "string",
+ width: 80,
+ align: "left",
+ },
+ {
field: "lotNumber",
title: "浜у搧鎵瑰彿",
type: "string",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
index b3e5495..e601c24 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
@@ -124,6 +124,7 @@
[
{ title: "鎵规鍙�", field: "batchNo",type :"like"},
{title: "搴撳瓨鏄庣粏鐘舵��",field: "status",type: "select",dataKey:"stockStatusEmun", data: []},
+ { title: "鏈夋晥鏈熸煡璇�",field: "effectiveDate",type: "datetime"},
],
]);
const columns = ref([
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
index 82c6174..7303955 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -51,6 +51,11 @@
{ title: "鐗╂枡缂栧彿", field: "materielCode",type: "like"},
{ title: "鎵规鍙�", field: "batchNo",type: "like"},
{ title: "鎵�灞炰粨搴�", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],},
+ { title: "搴撳瓨鍒涘缓鏃堕棿",field: "createDate",type: "datetime"},
+ ],
+ [
+ { title: "鏈夋晥鏈熸煡璇�",field: "effectiveDate",type: "date"},
+ {title: "鐗╂枡鏈夋晥鏈�",field: "expirationlabel",type: "selectList",dataKey:"expirationlabelEnum",data:[]},
],
]);
const columns = ref([
@@ -117,8 +122,23 @@
align: "left"
},
{
+ field: "expirationlabel",
+ title: "鐗╂枡鏈夋晥鏈�",
+ type: "string",
+ width: 140,
+ align: "left",
+ bind: { key: "expirationlabelEnum", data: [] },
+ },
+ {
field: "materielInfo",
title: "鎵�鍚墿鏂欐渶鏃╀复鏈�",
+ type: "string",
+ width: 140,
+ align: "left",
+ },
+ {
+ field: "inventoryage",
+ title: "搴撻緞",
type: "string",
width: 140,
align: "left",
@@ -170,6 +190,7 @@
align: "left",
bind: { key: "stockStatusEmun", data: [] },
},
+
{
field: "locationType",
title: "璐т綅绫诲瀷",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/ExpirationlabelEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/ExpirationlabelEnum.cs"
new file mode 100644
index 0000000..c83c805
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/StockEnum/ExpirationlabelEnum.cs"
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_Common.StockEnum
+{
+ public enum ExpirationlabelEnum
+ {
+ [Description("鏈复鏈�")]
+ 鏈复鏈� = 1,
+
+ [Description("涓存湡棰勮")]
+ 涓存湡棰勮 = 2,
+
+ [Description("杩囨湡")]
+ 杩囨湡 = 3,
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs"
index d9c8538..6acca7c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs"
@@ -958,10 +958,10 @@
case HtmlElementType.Contains:
linqExpression = LinqExpressionType.In;
break;
- case HtmlElementType.ThanOrEqual:
+ case HtmlElementType.thanorequal:
linqExpression = LinqExpressionType.ThanOrEqual;
break;
- case HtmlElementType.LessOrequal:
+ case HtmlElementType.lessorequal:
linqExpression = LinqExpressionType.LessThanOrEqual;
break;
case HtmlElementType.GT:
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
index a57e31b..bf691b9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
@@ -88,16 +88,19 @@
else
{
- int length = sugarColumn.Length;
- if (length == 0) { return (true, null, value); }
- //鍒ゆ柇鍙屽瓧鑺備笌鍗曞瓧娈�
- else if (length < 8000 &&
- ((dbType.Substring(0, 1) != "n"
- && Encoding.UTF8.GetBytes(val.ToCharArray()).Length > length)
- || val.Length > length)
- )
+ if (sugarColumn != null)
{
- reslutMsg = $"鏈�澶氬彧鑳姐�恵length}銆戜釜瀛楃銆�";
+ int length = sugarColumn.Length;
+ if (length == 0) { return (true, null, null); }
+ //鍒ゆ柇鍙屽瓧鑺備笌鍗曞瓧娈�
+ else if (length < 8000 &&
+ ((dbType.Substring(0, 1) != "n"
+ && Encoding.UTF8.GetBytes(val.ToCharArray()).Length > length)
+ || val.Length > length)
+ )
+ {
+ reslutMsg = $"鏈�澶氬彧鑳姐�恵length}銆戜釜瀛楃銆�";
+ }
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
index c7ea203..ce73ad8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
@@ -134,6 +134,12 @@
public int StockStatus { get; set; }
/// <summary>
+ /// 搴撳瓨瓒呮湡鏍囪瘑
+ /// </summary>
+ [ExporterHeader(IsIgnore = true)]
+ public int Expirationlabel { get; set; }
+
+ /// <summary>
/// 搴撳瓨澶囨敞
/// </summary>
[ExporterHeader(IsIgnore = true)]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
index 2533a8d..7450c39 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
@@ -29,5 +29,7 @@
List<PPStockSelectViewDTO> PPGetStockSelectViews(int orderId, string materielCode);
List<PPStockSelectViewDTO> PPGetPKStockSelectViews(int orderId, string materielCode);
+
+ WebResponseContent UpdateExpirationlabel();
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs"
index 4ee5363..028afe4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundLockInfo.cs"
@@ -1,4 +1,5 @@
-锘縰sing SqlSugar;
+锘縰sing Magicodes.ExporterAndImporter.Core;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -18,106 +19,124 @@
/// <summary>
/// 涓婚敭
/// </summary>
+ [ExporterHeader(DisplayName = "涓婚敭")]
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
public int Id { get; set; }
/// <summary>
/// 鍗曟嵁缂栧彿
/// </summary>
+ [ExporterHeader(DisplayName = "鍗曟嵁缂栧彿")]
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
public string OrderNo { get; set; }
/// <summary>
/// 鍗曟嵁鏄庣粏涓婚敭
/// </summary>
+ [ExporterHeader(DisplayName = "鍗曟嵁鏄庣粏涓婚敭")]
[SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏄庣粏涓婚敭")]
public int OrderDetailId { get; set; }
/// <summary>
/// 鍗曟嵁绫诲瀷
/// </summary>
+ [ExporterHeader(DisplayName = "鍗曟嵁绫诲瀷")]
[SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷")]
public int OrderType { get; set; }
/// <summary>
/// 鎵规鍙�
/// </summary>
+ [ExporterHeader(DisplayName = "鎵规鍙�")]
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵规鍙�")]
public string BatchNo { get; set; }
/// <summary>
/// 鐗╂枡缂栧彿
/// </summary>
+ [ExporterHeader(DisplayName = "鐗╂枡缂栧彿")]
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鐗╂枡缂栧彿")]
public string MaterielCode { get; set; }
/// <summary>
/// 鐗╂枡鍚嶇О
/// </summary>
+ [ExporterHeader(DisplayName = "鐗╂枡鍚嶇О")]
[SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "鐗╂枡鍚嶇О")]
public string MaterielName { get; set; }
/// <summary>
/// 搴撳瓨涓婚敭
/// </summary>
+ [ExporterHeader(DisplayName = "搴撳瓨涓婚敭")]
[SugarColumn(IsNullable = false, ColumnDescription = "搴撳瓨涓婚敭")]
public int StockId { get; set; }
/// <summary>
/// 鍗曟嵁鏁伴噺
/// </summary>
+ [ExporterHeader(DisplayName = "鍗曟嵁鏁伴噺")]
[SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鏁伴噺")]
public float OrderQuantity { get; set; }
/// <summary>
/// 鍘熷搴撳瓨閲�
/// </summary>
+ [ExporterHeader(DisplayName = "鍘熷搴撳瓨閲�")]
[SugarColumn(IsNullable = false, ColumnDescription = "鍘熷搴撳瓨閲�")]
public float OriginalQuantity { get; set; }
/// <summary>
/// 鍒嗛厤鍑哄簱閲�
/// </summary>
+ [ExporterHeader(DisplayName = "鍒嗛厤鍑哄簱閲�")]
[SugarColumn(IsNullable = false, ColumnDescription = "鍒嗛厤鍑哄簱閲�")]
public float AssignQuantity { get; set; }
/// <summary>
/// 璐т綅缂栧彿
/// </summary>
+ [ExporterHeader(DisplayName = "璐т綅缂栧彿")]
[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "璐т綅缂栧彿")]
public string LocationCode { get; set; }
/// <summary>
/// 鎵樼洏缂栧彿
/// </summary>
+ [ExporterHeader(DisplayName = "鎵樼洏缂栧彿")]
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏缂栧彿")]
public string PalletCode { get; set; }
/// <summary>
/// 鍗曚綅
/// </summary>
+ [ExporterHeader(DisplayName = "鍗曚綅")]
[SugarColumn(IsNullable = true, ColumnDescription = "鍗曚綅")]
public string Unit { get; set; }
/// <summary>
/// 浠诲姟鍙�
/// </summary>
+ [ExporterHeader(DisplayName = "浠诲姟鍙�")]
[SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟鍙�")]
public int? TaskNum { get; set; }
/// <summary>
/// 鐘舵��
/// </summary>
+ [ExporterHeader(DisplayName = "鐘舵��")]
[SugarColumn(IsNullable = false, ColumnDescription = "鐘舵��")]
public int Status { get; set; }
/// <summary>
/// 鐢熶骇鏃ユ湡
/// </summary>
+ [ExporterHeader(DisplayName = "鐢熶骇鏃ユ湡")]
[SugarColumn(IsNullable = false, ColumnDescription = "鐢熶骇鏃ユ湡")]
public string ProductionDate { get; set; }
/// <summary>
/// 鏈夋晥鏈�
/// </summary>
+ [ExporterHeader(DisplayName = "鏈夋晥鏈�")]
[SugarColumn(IsNullable = false, ColumnDescription = "鏈夋晥鏈�")]
public string EffectiveDate { get; set; }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs"
index 73cc45c..5a49016 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo.cs"
@@ -62,6 +62,12 @@
public int StockLength { get; set; }
/// <summary>
+ /// 搴撳瓨杩囨湡鏍囪瘑
+ /// </summary>
+ [SugarColumn(IsNullable = true, ColumnDescription = "搴撳瓨杩囨湡鏍囪瘑")]
+ public int Expirationlabel { get; set; }
+
+ /// <summary>
/// 搴撳瓨鏄庣粏
/// </summary>
[Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(Id))]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
index e5c270d..1e683f8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
@@ -44,6 +44,7 @@
/// <summary>
/// 鎵樼洏绫诲瀷
/// </summary>
+ [ImporterHeader(Name = "鎵樼洏绫诲瀷")]
[SugarColumn(IsNullable = false, ColumnDescription = "鎵樼洏绫诲瀷")]
public int PalletType { get; set; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs"
index 833e973..34893b2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ProOutOrderService.cs"
@@ -80,71 +80,112 @@
/// <returns></returns>
public WebResponseContent AddDeliveryOrder(ErpProOutOrderDTO outOrderDTO)
{
- WebResponseContent content=new WebResponseContent();
+ WebResponseContent content = new WebResponseContent();
try
{
- if (BaseDal.QueryFirst(x => x.ProOutOrderNo == outOrderDTO.OrderNo) != null)
+ if (BaseDal.QueryFirst(x => x.ProOutOrderNo == outOrderDTO.OrderNo) != null)
{
return content.Error($"鍑哄簱鍗曞彿{outOrderDTO.OrderNo}宸插瓨鍦�!");
}
- Dt_Warehouse warehouse=null;
+
+ Dt_Warehouse warehouse = null;
List<Dt_CustomerInfo> customerInfos = _basicRepository.CustomerInfoRepository.QueryData();
- if (outOrderDTO.OType==1 && string.IsNullOrEmpty(outOrderDTO.WaType))
- {
- warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==WarehouseEnum.HA71.ToString());
- }
- else if (outOrderDTO.OType==2)
+
+ if (outOrderDTO.OType == 1 && string.IsNullOrEmpty(outOrderDTO.WaType))
{
warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA71.ToString());
}
+ else if (outOrderDTO.OType == 2)
+ {
+ warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA71.ToString());
+ }
+
List<Dt_ProOutOrderDetail> proOutOrderDetails = new List<Dt_ProOutOrderDetail>();
- Dictionary<string,string> keyValuePairs =new Dictionary<string, string>();
+ Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
+
+ // 澶勭悊鍘熷鏄庣粏骞跺瓨鍌ㄥ埌涓存椂鍒楄〃
+ var tempDetails = new List<Dt_ProOutOrderDetail>();
foreach (var item in outOrderDTO.OrderDetails)
{
- //鍒ゆ柇瀹㈡埛鏄惁瀛樺湪
- Dt_CustomerInfo? customerInfo = customerInfos.Where(x=>x.Code== item.Customer).FirstOrDefault();
- if (customerInfo==null)
+ // 鍒ゆ柇瀹㈡埛鏄惁瀛樺湪
+ Dt_CustomerInfo? customerInfo = customerInfos.FirstOrDefault(x => x.Code == item.Customer);
+ if (customerInfo == null)
{
return content.Error($"瀹㈡埛{item.Customer}涓嶅瓨鍦�!");
}
+
Dt_ProOutOrderDetail proOutOrderDetail = _mapper.Map<Dt_ProOutOrderDetail>(item);
if (!string.IsNullOrEmpty(item.SaleOrder))
{
- if (keyValuePairs!=null && keyValuePairs.ContainsKey(item.SaleOrder))
+ if (keyValuePairs != null && keyValuePairs.ContainsKey(item.SaleOrder))
{
proOutOrderDetail.EndCustomer = keyValuePairs[item.SaleOrder];
}
else
{
string request = _invokeERPService.InvokeProSaleCustomer(item.SaleOrder);
- ErpSaleCustomResponseContent responseContent=request.DeserializeObject<ErpSaleCustomResponseContent>();
- if (responseContent.Code!=200)
+ ErpSaleCustomResponseContent responseContent = request.DeserializeObject<ErpSaleCustomResponseContent>();
+ if (responseContent.Code != 200)
{
return content.Error($"璁㈠崟{item.SaleOrder}缁堢瀹㈡埛鑾峰彇澶辫触!");
}
- //鍒ゆ柇缁堢瀹㈡埛鏄惁瀛樺湪
- Dt_CustomerInfo? customerInfoEnd = customerInfos.Where(x => x.Code == responseContent.Data[0].Endcustomer).FirstOrDefault();
+
+ // 鍒ゆ柇缁堢瀹㈡埛鏄惁瀛樺湪
+ Dt_CustomerInfo? customerInfoEnd = customerInfos.FirstOrDefault(x => x.Code == responseContent.Data[0].Endcustomer);
if (customerInfoEnd == null)
{
return content.Error($"缁堢瀹㈡埛{responseContent.Data[0].Endcustomer}涓嶅瓨鍦�!");
}
+
proOutOrderDetail.EndCustomer = responseContent.Data[0].Endcustomer;
keyValuePairs.Add(item.SaleOrder, responseContent.Data[0].Endcustomer);
}
}
+
+ // 鍏堢疮鍔犲綋鍓嶆槑缁嗙殑鏁伴噺锛堝寘鍚鍝侊級
proOutOrderDetail.QtyPcs += proOutOrderDetail.SpareQty;
- proOutOrderDetails.Add(proOutOrderDetail);
+ tempDetails.Add(proOutOrderDetail);
}
- Dt_ProOutOrder proOutOrder= new Dt_ProOutOrder()
+
+ // 鎸夋潯浠跺垎缁勫苟鍚堝苟鏄庣粏
+ var groupedDetails = tempDetails.GroupBy(detail => new
{
- ProOutOrderNo= outOrderDTO.OrderNo,
- WarehouseId= warehouse.WarehouseId,
- ProOrderType= outOrderDTO.OType,
- ProOrderStatus=OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
- PlantShipDate= outOrderDTO.PlantShipDate.ObjToDate(),
- Remark= outOrderDTO.Note,
- Details= proOutOrderDetails
+ detail.PCode,
+ detail.PVer,
+ detail.PLot,
+ detail.DateCode,
+ })
+ .Select(group =>
+ {
+ // 鍙栧垎缁勪腑绗竴涓槑缁嗕綔涓哄熀纭�
+ var firstDetail = group.First();
+ return new Dt_ProOutOrderDetail
+ {
+ // 澶嶅埗鍩虹淇℃伅
+ PCode = firstDetail.PCode,
+ PVer = firstDetail.PVer,
+ PLot = firstDetail.PLot,
+ DateCode = firstDetail.DateCode,
+ EndCustomer = firstDetail.EndCustomer,
+ QtyPcs = group.Sum(d => d.QtyPcs),
+ // 绱姞澶囧搧鏁�
+ SpareQty = group.Sum(d => d.SpareQty)
+ };
+ });
+
+ proOutOrderDetails.AddRange(groupedDetails);
+
+ Dt_ProOutOrder proOutOrder = new Dt_ProOutOrder()
+ {
+ ProOutOrderNo = outOrderDTO.OrderNo,
+ WarehouseId = warehouse.WarehouseId,
+ ProOrderType = outOrderDTO.OType,
+ ProOrderStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt(),
+ PlantShipDate = outOrderDTO.PlantShipDate.ObjToDate(),
+ Remark = outOrderDTO.Note,
+ Details = proOutOrderDetails
};
+
Db.InsertNav(proOutOrder).Include(x => x.Details).ExecuteCommand();
content.OK("鎴愬姛");
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockViewService.cs"
index 1813cde..f8c78c5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockViewService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockViewService.cs"
@@ -22,6 +22,7 @@
using WIDESEA_Common.StockEnum;
using WIDESEA_IBasicRepository;
using WIDESEA_Common.WareHouseEnum;
+using WIDESEA_Core.Enums;
namespace WIDESEA_StockService
{
@@ -55,50 +56,70 @@
try
{
List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
- if (searchParametersList.Count > 0)
+ if (searchParametersList?.Any() == true)
{
+ foreach (var param in searchParametersList)
{
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.ProductCode).FirstLetterToLower());
- if (searchParameters != null)
+ switch (param.Name)
{
- sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.ProductCode.Contains(searchParameters.Value)));
- }
- }
+ case var name when name == nameof(Dt_ProStockInfoDetail.ProductCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.proStockInfoDetails.Any(v => v.ProductCode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_ProStockInfoDetail.LotNumber).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.proStockInfoDetails.Any(v => v.LotNumber.Contains(param.Value.ToString())));
+ }
+ break;
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.ProductVersion).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.ProductVersion.Contains(searchParameters.Value)));
- }
- }
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.SpecifyVer).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.SpecifyVer.Contains(searchParameters.Value)));
- }
- }
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.LotNumber).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.LotNumber.Contains(searchParameters.Value)));
- }
- }
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfo.LocationCode).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.LocationCode == searchParameters.Value);
- }
- }
+ case var name when name == nameof(Dt_ProStockInfo.LocationCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.LocationCode == param.Value.ToString());
+ }
+ break;
+ case var name when name == nameof(Dt_ProStockInfoDetail.ProductVersion).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.proStockInfoDetails.Any(v => v.ProductVersion.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_ProStockInfoDetail.SpecifyVer).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.proStockInfoDetails.Any(v => v.SpecifyVer.Contains(param.Value.ToString())));
+ }
+ break;
-
+ case var name when name == nameof(Dt_ProStockInfo.CreateDate).FirstLetterToLower():
+ if (DateTime.TryParse(param.Value?.ToString(), out DateTime minDate))
+ {
+ LinqExpressionType expressionType = param.DisplayType.GetLinqCondition();
+ if (expressionType == LinqExpressionType.ThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate >= minDate);
+ }
+ else if (expressionType == LinqExpressionType.LessThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate <= minDate);
+ }
+ }
+ break;
+ }
+ }
}
-
}
- catch { }
+ catch (Exception ex)
+ {
+ }
}
string whereSto = GetDataRole(typeof(Dt_ProStockInfo));
sugarQueryable1 = sugarQueryable1.Where(whereSto);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
index 1d75b62..0130abe 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
@@ -289,5 +289,81 @@
return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes);
}
+ public WebResponseContent UpdateExpirationlabel()
+ {
+ try
+ {
+ var today = DateTime.Today;
+ int batchSize = 1000; // 鎵规澶勭悊澶у皬
+
+ var query = BaseDal.Db.Queryable<Dt_StockInfoDetail>()
+ .InnerJoin<Dt_StockInfo>((detail, master) => detail.StockId == master.Id)
+ .Select((detail, master) => new
+ {
+ MasterId = master.Id,
+ master.WarehouseId,
+ detail.EffectiveDate,
+ CurrentExpirationlabel = master.Expirationlabel // 鐢ㄤ簬鍒ゆ柇鏄惁闇�瑕佹洿鏂�
+ });
+
+ // 鍒嗘壒澶勭悊锛屼娇鐢═ake鍜孲kip瀹炵幇鍒嗛〉
+ var totalUpdated = 0;
+ int skipCount = 0;
+
+ while (true)
+ {
+ // 浣跨敤Skip鍜孴ake瀹炵幇鍒嗛〉鑾峰彇鏁版嵁
+ var batchData = query.Skip(skipCount).Take(batchSize).ToList();
+ if (!batchData.Any()) break; // 娌℃湁鏇村鏁版嵁鏃堕��鍑哄惊鐜�
+
+ var updateDic = new Dictionary<long, int>();
+
+ foreach (var item in batchData)
+ {
+ if (!DateTime.TryParse(item.EffectiveDate, out DateTime effectiveDate))
+ continue;
+ int newLabel;
+ if (effectiveDate < today)
+ {
+ newLabel = ExpirationlabelEnum.杩囨湡.ObjToInt();
+ }
+ else if (item.WarehouseId == 3)
+ {
+ int daysDiff = (effectiveDate - today).Days;
+ newLabel = daysDiff <= 60 ? ExpirationlabelEnum.涓存湡棰勮.ObjToInt() : ExpirationlabelEnum.鏈复鏈�.ObjToInt();
+ }
+ else
+ {
+ int daysDiff = (effectiveDate - today).Days;
+ newLabel = daysDiff <= 30 ? ExpirationlabelEnum.涓存湡棰勮.ObjToInt() : ExpirationlabelEnum.鏈复鏈�.ObjToInt();
+ }
+
+ // 鍙洿鏂版湁鍙樺寲鐨勫�硷紝骞朵笖鍘婚噸
+ if (newLabel != item.CurrentExpirationlabel && !updateDic.ContainsKey(item.MasterId))
+ {
+ updateDic[item.MasterId] = newLabel;
+ }
+ }
+
+ if (updateDic.Any())
+ {
+ // 鏋勫缓鎵归噺鏇存柊璇彞
+ var updateBuilder = BaseDal.Db.Updateable<Dt_StockInfo>();
+ foreach (var kvp in updateDic)
+ {
+ updateBuilder.SetColumns(m => m.Expirationlabel == kvp.Value)
+ .Where(m => m.Id == kvp.Key);
+ }
+ totalUpdated += updateBuilder.ExecuteCommand();
+ }
+ skipCount += batchSize; // 鍑嗗鑾峰彇涓嬩竴鎵规暟鎹�
+ }
+ return WebResponseContent.Instance.OK($"鏇存柊鎴愬姛锛屽叡鏇存柊 {totalUpdated} 鏉¤褰�");
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error("鏇存柊澶辫触锛岃鑱旂郴绠$悊鍛�");
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
index 843d8f7..0bcc37b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
@@ -46,58 +46,100 @@
{
try
{
- List<StockViewDTO> stockViewDTOs = new List<StockViewDTO>();
-
- string where = string.Empty;
ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x => x.Details);
if (!string.IsNullOrEmpty(options.Wheres))
{
try
{
List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
- if (searchParametersList.Count > 0)
+ if (searchParametersList?.Any() == true)
{
+ foreach (var param in searchParametersList)
{
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower());
- if (searchParameters != null)
+ switch (param.Name)
{
- sugarQueryable1 = sugarQueryable1.Where(x => x.Details.Any(v => v.MaterielCode.Contains(searchParameters.Value)));
- }
- }
+ case var name when name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.MaterielCode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString())));
+ }
+ break;
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.Details.Any(v => v.BatchNo.Contains(searchParameters.Value)));
- }
- }
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.LocationCode == searchParameters.Value);
- }
- }
+ case var name when name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.LocationCode == param.Value.ToString());
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfo.CreateDate).FirstLetterToLower():
+ if (DateTime.TryParse(param.Value?.ToString(), out DateTime minDate))
+ {
+ LinqExpressionType expressionType = param.DisplayType.GetLinqCondition();
+ if(expressionType == LinqExpressionType.ThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate >= minDate);
+ }
+ else if(expressionType == LinqExpressionType.LessThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate <= minDate);
+ }
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.EffectiveDate).FirstLetterToLower():
+ // 鍓嶇浼犻�掔殑鍙傛暟闇�鏄� yyyy-MM-dd 鏍煎紡锛堝 "2025-05-08"锛夛紝鐩存帴浣滀负瀛楃涓插鐞�
+ string effectiveDateStr = param.Value?.ToString().Trim();
+ if (!string.IsNullOrEmpty(effectiveDateStr) && effectiveDateStr.Length == 10)
+ {
+ LinqExpressionType expressionType = param.DisplayType.GetLinqCondition();
+ if (expressionType == LinqExpressionType.ThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.Details
+ .Any(d =>!string.IsNullOrEmpty(d.EffectiveDate) && d.EffectiveDate.CompareTo(effectiveDateStr) >= 0));
+ }
+ else if (expressionType == LinqExpressionType.LessThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.Details
+ .Any(d =>!string.IsNullOrEmpty(d.EffectiveDate) && d.EffectiveDate.CompareTo(effectiveDateStr) <= 0));
+
+
+ }
+ }
+ break;
+ }
+ }
}
-
}
- catch { }
+ catch (Exception ex)
+ {
+ }
}
+
string whereSto = GetDataRole(typeof(Dt_StockInfo));
sugarQueryable1 = sugarQueryable1.Where(whereSto);
+
EntityProperties.ValidatePageOptions(options, ref sugarQueryable1);
string whereLo = GetDataRole(typeof(Dt_LocationInfo));
- ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>().Where(whereLo);
-
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>()
+ .Where(whereLo);
EntityProperties.ValidatePageOptions(options, ref sugarQueryable);
- ISugarQueryable<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a)
- => new StockViewDTO
+ ISugarQueryable<StockViewDTO> list = sugarQueryable1
+ .InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode)
+ .Select((b, a) => new StockViewDTO
{
LocationCode = b.LocationCode,
+ Expirationlabel = b.Expirationlabel,
Column = a.Column,
WarehouseId = b.WarehouseId,
CreateDate = b.CreateDate,
@@ -119,52 +161,55 @@
Details = b.Details,
});
- var pklist = sugarQueryable1.Where(b => b.LocationCode == "骞冲簱浣�").Select(b => new StockViewDTO
- {
- LocationCode = b.LocationCode,
- Column = 0,
- WarehouseId = b.WarehouseId,
- CreateDate = b.CreateDate,
- Creater = b.Creater,
- Depth = 0,
- EnalbeStatus = EnableStatusEnum.Normal.ObjToInt(),
- Layer = 0,
- LocationName = "骞冲簱浣�",
- LocationStatus = LocationStatusEnum.InStock.ObjToInt(),
- LocationType = LocationTypeEnum.Undefined.ObjToInt(),
- Modifier = b.Modifier,
- ModifyDate = b.ModifyDate,
- PalletCode = b.PalletCode,
- StockRemark = b.Remark,
- RoadwayNo = "骞冲簱",
- Row = 0,
- StockId = b.Id,
- StockStatus = b.StockStatus,
- Details = b.Details,
- });
+ // 骞冲簱浣嶆暟鎹煡璇�
+ var pklist = sugarQueryable1
+ .Where(b => b.LocationCode == "骞冲簱浣�")
+ .Select(b => new StockViewDTO
+ {
+ LocationCode = b.LocationCode,
+ Column = 0,
+ WarehouseId = b.WarehouseId,
+ CreateDate = b.CreateDate,
+ Expirationlabel = b.Expirationlabel,
+ Creater = b.Creater,
+ Depth = 0,
+ EnalbeStatus = EnableStatusEnum.Normal.ObjToInt(),
+ Layer = 0,
+ LocationName = "骞冲簱浣�",
+ LocationStatus = LocationStatusEnum.InStock.ObjToInt(),
+ LocationType = LocationTypeEnum.Undefined.ObjToInt(),
+ Modifier = b.Modifier,
+ ModifyDate = b.ModifyDate,
+ PalletCode = b.PalletCode,
+ StockRemark = b.Remark,
+ RoadwayNo = "骞冲簱",
+ Row = 0,
+ StockId = b.Id,
+ StockStatus = b.StockStatus,
+ Details = b.Details,
+ });
int totalCount = 0;
int pktotalCount = 0;
-
- stockViewDTOs = list.ToPageList(options.Page, options.Rows, ref totalCount);
+ var stockViewDTOs = list.ToPageList(options.Page, options.Rows, ref totalCount);
stockViewDTOs.AddRange(pklist.ToPageList(options.Page, options.Rows, ref pktotalCount));
stockViewDTOs.ForEach(x =>
{
- x.MaterielCode = string.Join(",", x.Details.Select(x => x.MaterielCode).Distinct());
- x.BatchNo = string.Join(",", x.Details.Select(x => x.BatchNo).Distinct());
+ x.MaterielCode = string.Join(",", x.Details.Select(d => d.MaterielCode).Distinct());
+ x.BatchNo = string.Join(",", x.Details.Select(d => d.BatchNo).Distinct());
x.MaterielSpec = x.Details.FirstOrDefault()?.MaterielSpec ?? "";
x.MaterielName = x.Details.FirstOrDefault()?.MaterielName ?? "";
- }
- );
+ });
+
return new PageGridData<StockViewDTO>(totalCount + pktotalCount, stockViewDTOs);
}
catch (Exception ex)
{
-
}
return new PageGridData<StockViewDTO>();
}
+
public virtual object GetDetailPage(PageDataOptions pageData)
{
@@ -224,28 +269,76 @@
try
{
List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
- if (searchParametersList.Count > 0)
+ if (searchParametersList?.Any() == true)
{
+ foreach (var param in searchParametersList)
{
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower());
- if (searchParameters != null)
+ switch (param.Name)
{
- sugarQueryable1 = sugarQueryable1.Where(x => x.Details.Any(v => v.MaterielCode.Contains(searchParameters.Value)));
+ case var name when name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.MaterielCode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString())));
+ }
+ break;
+
+ case var name when name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.LocationCode == param.Value.ToString());
+ }
+ break;
+
+ case var name when name == nameof(Dt_StockInfo.CreateDate).FirstLetterToLower():
+ if (DateTime.TryParse(param.Value?.ToString(), out DateTime minDate))
+ {
+ LinqExpressionType expressionType = param.DisplayType.GetLinqCondition();
+ if (expressionType == LinqExpressionType.ThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate >= minDate);
+ }
+ else if (expressionType == LinqExpressionType.LessThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate <= minDate);
+ }
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.EffectiveDate).FirstLetterToLower():
+ // 鍓嶇浼犻�掔殑鍙傛暟闇�鏄� yyyy-MM-dd 鏍煎紡锛堝 "2025-05-08"锛夛紝鐩存帴浣滀负瀛楃涓插鐞�
+ string effectiveDateStr = param.Value?.ToString().Trim();
+ if (!string.IsNullOrEmpty(effectiveDateStr) && effectiveDateStr.Length == 10)
+ {
+ LinqExpressionType expressionType = param.DisplayType.GetLinqCondition();
+ if (expressionType == LinqExpressionType.ThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.Details
+ .Any(d => !string.IsNullOrEmpty(d.EffectiveDate) && d.EffectiveDate.CompareTo(effectiveDateStr) >= 0));
+ }
+ else if (expressionType == LinqExpressionType.LessThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.Details
+ .Any(d => !string.IsNullOrEmpty(d.EffectiveDate) && d.EffectiveDate.CompareTo(effectiveDateStr) <= 0));
+
+
+ }
+ }
+ break;
}
}
-
- {
- SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower());
- if (searchParameters != null)
- {
- sugarQueryable1 = sugarQueryable1.Where(x => x.Details.Any(v => v.BatchNo.Contains(searchParameters.Value)));
- }
- }
-
}
-
}
- catch { }
+ catch (Exception ex)
+ {
+ }
}
string whereSto = GetDataRole(typeof(Dt_StockInfo));
sugarQueryable1 = sugarQueryable1.Where(whereSto);
@@ -261,6 +354,7 @@
{
LocationCode = b.LocationCode,
Column = a.Column,
+ Expirationlabel = b.Expirationlabel,
WarehouseId = b.WarehouseId,
CreateDate = b.CreateDate,
Creater = b.Creater,
@@ -286,6 +380,7 @@
LocationCode = b.LocationCode,
Column = 0,
WarehouseId = b.WarehouseId,
+ Expirationlabel = b.Expirationlabel,
CreateDate = b.CreateDate,
Creater = b.Creater,
Depth = 0,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
index 5b13901..29027de 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
@@ -1315,6 +1315,32 @@
result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
}
break;
+ case "expirationlabelEnum":
+ {
+ List<object> data = new List<object>();
+ {
+ Type type = typeof(ExpirationlabelEnum);
+ List<int> enums = Enum.GetValues(typeof(ExpirationlabelEnum)).Cast<int>().ToList();
+ int index = 0;
+ foreach (var item in enums)
+ {
+ FieldInfo? fieldInfo = typeof(ExpirationlabelEnum).GetField(((ExpirationlabelEnum)item).ToString());
+ DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
+ if (description != null)
+ {
+ data.Add(new { key = item.ToString(), value = description.Description });
+ }
+ else
+ {
+ data.Add(new { key = item.ToString(), value = item.ToString() });
+ }
+ index++;
+ }
+ }
+
+ result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
+ }
+ break;
}
return result;
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 7ba7bb8..c5fe062 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -1178,5 +1178,53 @@
}
return content;
}
+
+ public WebResponseContent InboundTaskHandCancel(int taskNum, int warehouseId)
+ {
+ try
+ {
+ Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
+ if (task == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌浠诲姟淇℃伅");
+ }
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == task.PalletCode && x.WarehouseId == task.WarehouseId).Includes(x => x.Details).First();
+ if (stockInfo == null)
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒版墭鐩樺搴旂殑缁勭洏淇℃伅");
+ }
+ if (stockInfo.Details.Count == 0 && stockInfo.PalletType != PalletTypeEnum.Empty.ObjToInt())
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌鎵樼洏搴撳瓨鏄庣粏淇℃伅");
+ }
+ if (task.TaskType == TaskTypeEnum.MesPalletLargeReturn.ObjToInt() || task.TaskType == TaskTypeEnum.MesPalletSmallReturn.ObjToInt())
+ {
+ task.TaskStatus = TaskStatusEnum.Cancel.ObjToInt();
+ _unitOfWorkManage.BeginTran();
+ BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐鍒犻櫎 : OperateTypeEnum.鑷姩鍒犻櫎);
+ _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.鑷姩鍒犻櫎 : OperateTypeEnum.浜哄伐鍒犻櫎);
+ _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateTypeEnum.鑷姩鍒犻櫎 : OperateTypeEnum.浜哄伐鍒犻櫎);
+ _unitOfWorkManage.CommitTran();
+ return WebResponseContent.Instance.OK();
+ }
+ Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+ if (locationInfo != null)
+ {
+ if (locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt())
+ {
+ return WebResponseContent.Instance.Error($"璐т綅鐘舵�佷笉姝g‘");
+ }
+
+ LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus;
+ locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+ }
+ return WebResponseContent.Instance.OK();
+
+ }
+ catch(Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs"
index 0f17ddf..88eaa6f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Completed.cs"
@@ -136,7 +136,12 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
-
+ /// <summary>
+ /// 浠诲姟鍙栨秷
+ /// </summary>
+ /// <param name="taskNum"></param>
+ /// <param name="warehouseId"></param>
+ /// <returns></returns>
public async Task<WebResponseContent> TaskHandCancel(int taskNum,int warehouseId)
{
try
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
index d4db578..199d783 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
@@ -79,5 +79,15 @@
{
return Service.StockQueryData(saveModel);
}
+ /// <summary>
+ /// 杩囨湡鏍囪瘑鏇存柊
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("UpdateExpirationlabel"),AllowAnonymous]
+ public WebResponseContent UpdateExpirationlabel()
+ {
+ return Service.UpdateExpirationlabel();
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 53a5032..7b10097 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -413,7 +413,7 @@
/// </summary>
/// <param name="taskNum">浠诲姟鍙�</param>
/// <returns></returns>
- [HttpPost, HttpGet, Route("TaskHandCancel"), AllowAnonymous]
+ [HttpPost, HttpGet, Route("TaskHandCa"), AllowAnonymous]
public async Task<WebResponseContent> TaskHandCancel(int taskNum ,int warehouseId)
{
return await Service.TaskHandCancel(taskNum,warehouseId);
--
Gitblit v1.9.3