From dcacc1fbcb885a958d6a9715c360ebb4aeac0894 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 17 十二月 2024 19:40:59 +0800
Subject: [PATCH] 新增多个库页面:常温库、分容库、高温库,并更新导航栏以包含这些新页面
---
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue | 9
Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue | 206 --------
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs | 10
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 64 +-
Code Management/WCS/WIDESEAWCS_Client/WIDESEAWCS_Client11.rar | 0
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 6
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/FormationLibrary.vue | 69 +++
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Staticlibrary.vue | 99 ++++
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 9
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue | 9
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 14
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm | 0
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue | 106 ++++
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal | 0
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 68 +-
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json | 4
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs | 2
Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceLine.vue | 84 +++
Code Management/WCS/WIDESEAWCS_Client/src/main.js | 2
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 2
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs | 63 +-
Code Management/WCS/WIDESEAWCS_Client/src/router/redirect.js | 87 ++
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/indexLibrary.vue | 47 ++
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs | 40
Code Management/WCS/WIDESEAWCS_Client/src/api/http.js | 6
Code Management/WCS/WIDESEAWCS_Client/package.json | 3
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db | 0
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal | 0
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs | 37 +
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/ExcelExport/库存信息.xlsx | 0
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs | 35 +
Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceStacker.vue | 57 ++
/dev/null | 0
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/hightemperature.vue | 9
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db | 0
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs | 21
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Twoletters.vue | 69 +++
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm | 0
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs | 67 ++
Code Management/WCS/WIDESEAWCS_Client/src/views/charts/bigdata.vue | 2
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db | 0
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs | 19
42 files changed, 930 insertions(+), 395 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Client/WIDESEAWCS_Client11.rar b/Code Management/WCS/WIDESEAWCS_Client/WIDESEAWCS_Client11.rar
new file mode 100644
index 0000000..ed8d8a6
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/WIDESEAWCS_Client11.rar
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Client/dist.zip b/Code Management/WCS/WIDESEAWCS_Client/dist.zip
deleted file mode 100644
index 03d3119..0000000
--- a/Code Management/WCS/WIDESEAWCS_Client/dist.zip
+++ /dev/null
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Client/package.json b/Code Management/WCS/WIDESEAWCS_Client/package.json
index 93990d1..3735f3a 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/package.json
+++ b/Code Management/WCS/WIDESEAWCS_Client/package.json
@@ -13,6 +13,7 @@
"@microsoft/signalr": "^6.0.4",
"ali-oss": "^6.17.1",
"axios": "^0.21.1",
+ "bootstrap": "^5.3.3",
"core-js": "^3.6.5",
"echarts": "^5.0.2",
"element-plus": "^2.2.14",
@@ -21,7 +22,7 @@
"vue": "^3.2.37",
"vue-draggable-next": "^2.0.1",
"vue-router": "^4.0.0-0",
- "vuex": "^4.0.0-0",
+ "vuex": "^4.0.0-0",
"wangeditor": "^4.7.6"
},
"devDependencies": {
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
index f7d9a09..5c21539 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/api/http.js
@@ -12,15 +12,15 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
- axios.defaults.baseURL = 'http://127.0.0.1:9291/';
- // axios.defaults.baseURL = 'http://192.168.20.251:9291/';
+ // axios.defaults.baseURL = 'http://127.0.0.1:9291/';
+ axios.defaults.baseURL = 'http://192.168.5.251:9291/';
}
else if (process.env.NODE_ENV == 'debug') {
axios.defaults.baseURL = 'http://127.0.0.1:8098/';
}
else if (process.env.NODE_ENV == 'production') {
- axios.defaults.baseURL = 'http://192.168.20.251:9291/';
+ axios.defaults.baseURL = 'http://192.168.5.251:9291/';
}
if (!axios.defaults.baseURL.endsWith('/')) {
axios.defaults.baseURL+="/";
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceLine.vue b/Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceLine.vue
new file mode 100644
index 0000000..8824922
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceLine.vue
@@ -0,0 +1,84 @@
+<template>
+ <div class="Linebox" >
+ <div class="card">
+ <div class="card-header">
+ <div id="lines2">
+ <div class="card-body">{{ device.deviceName }}<br />
+ -{{ device.childDeviceCode }}-
+ </div>
+ </div>
+ </div>
+ <div class="card-body">
+ <ul class="list-group lis">
+ <li class="list-group-item list-group-item-dark">璇诲彇淇″彿</li>
+ <li class="list-group-item list-group-item-secondary">浠诲姟鍙凤細{{
+ device.data.command.taskNum }}</li>
+ <li class="list-group-item list-group-item-secondary">鎵樼洏鍙凤細{{
+ device.data.command.barcode }}</li>
+ <li class="list-group-item list-group-item-secondary">缁堢偣鍦板潃锛歿{
+ device.data.command.targetAddress }}</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[6])">鎵爜绔欏彴鍏ュ簱璇锋眰</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[4])">鍫嗗灈鏈哄嚭搴撶珯鍙拌姹�</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[2])">鍫嗗灈鏈哄叆搴撶珯鍙拌姹�</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[0])">绾夸綋鍑哄簱鍙h姹�</li>
+ </ul>
+ <ul class="list-group lis">
+ <li class="list-group-item list-group-item-dark">鍐欏叆淇″彿</li>
+ <li class="list-group-item list-group-item-secondary">浠诲姟鍙凤細{{
+ device.data.commandWrite.taskNum }}</li>
+ <li class="list-group-item list-group-item-secondary">鎵樼洏鍙凤細{{
+ device.data.commandWrite.barcode }}</li>
+ <li class="list-group-item list-group-item-secondary">缁堢偣鍦板潃锛歿{
+ device.data.commandWrite.targetAddress }}</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[7])">鎵爜绔欏彴鍏ュ簱璇锋眰</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[5])">鍫嗗灈鏈哄嚭搴撶珯鍙拌姹�</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[3])">鍫嗗灈鏈哄叆搴撶珯鍙拌姹�</li>
+ <li :class="getSignalClass(device.data.writeInteractiveSignal[1])">绾夸綋鍑哄簱鍙h姹�</li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { defineProps } from "vue";
+
+// 瀹氫箟缁勪欢灞炴��
+const props = defineProps({
+ device: {
+ type: Object,
+ required: true
+ }
+});
+
+// 鑾峰彇淇″彿绫诲悕
+const getSignalClass = (signal) => {
+ // console.log("馃殌 ~ getSignalClass ~ signal:", signal)
+ return signal !== true ? 'list-group-item list-group-item-danger' : 'list-group-item list-group-item-success';
+};
+</script>
+
+<style scoped>
+/* .Stackerbox{
+ width: 220px;
+ float: left;
+} */
+.Linebox{
+ width: 500px;
+ float: left;
+}
+.box1{
+ float: left;
+}
+.card-body{
+ text-align: center;
+ border-radius: 6% ;
+}
+.Stacker{
+ background-color: burlywood;
+}
+.lis{
+ float: left;
+ width: 233px;
+}
+</style>
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceStacker.vue b/Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceStacker.vue
new file mode 100644
index 0000000..e519d9c
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceStacker.vue
@@ -0,0 +1,57 @@
+<template>
+ <div class="Stackerbox">
+ <div class="card">
+ <div class="card-header">
+ <div>
+ <div class="card-body Stacker">
+ {{ Stacker.deviceName }}
+ </div>
+ </div>
+ </div>
+ <div class="card-body">
+ <ul class="list-group">
+ <li class="list-group-item list-group-item-secondary">
+ 浠诲姟鍙凤細{{ Stacker.data.currentTaskNum || '鏆傛棤浠诲姟鍙�' }}
+ </li>
+ <li :class="getStatusClass(Stacker.data.stackerCraneAutoStatusDes)">
+ 宸ヤ綔妯″紡锛歿{ Stacker.data.stackerCraneAutoStatusDes }}
+ </li>
+ <li :class="getStatusClass(Stacker.data.stackerCraneStatusDes)">
+ 璁惧鐘舵�侊細{{ Stacker.data.stackerCraneStatusDes }}
+ </li>
+ <li :class="getStatusClass(Stacker.data.stackerCraneWorkStatusDes)">
+ 宸ヤ綔鐘舵�侊細{{ Stacker.data.stackerCraneWorkStatusDes }}
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { defineProps } from "vue";
+
+// 瀹氫箟缁勪欢灞炴��
+const props = defineProps({
+ Stacker: {
+ type: Object,
+ required: true
+ }
+});
+
+// 鑾峰彇鐘舵�佺被鍚嶏紙浼樺寲鐘舵�佸垽鏂級
+const getStatusClass = (status) => {
+ if (status === '姝e父' || status === '鑷姩' || status === '寰呮満') {
+ return 'list-group-item list-group-item-success';
+ }
+ if (status === '鏁呴殰' || status === '鍋滄満') {
+ return 'list-group-item list-group-item-danger';
+ }
+ return 'list-group-item list-group-item-warning'; // 榛樿璀﹀憡鐘舵��
+};
+
+</script>
+
+<style lang="scss" scoped>
+
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/main.js b/Code Management/WCS/WIDESEAWCS_Client/src/main.js
index 40c4c4f..c4642ef 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/main.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/main.js
@@ -11,7 +11,7 @@
// import 'dayjs/locale/zh-cn'
// import locale from 'element-plus/lib/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
-
+import 'bootstrap/dist/css/bootstrap.min.css';
import permission from './api/permission'
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/router/redirect.js b/Code Management/WCS/WIDESEAWCS_Client/src/router/redirect.js
index 144beb8..881f761 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/router/redirect.js
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/router/redirect.js
@@ -1,22 +1,67 @@
+let redirect = [
+ {
+ path: "/404",
+ name: "404",
+ component: () => import("@/components/redirect/404"),
+ meta: {
+ anonymous: true,
+ },
+ },
+ {
+ path: "/401",
+ name: "401",
+ component: () => import("@/components/redirect/401"),
+ },
+ {
+ path: "/coding",
+ name: "coding",
+ component: () => import("@/components/redirect/coding"),
+ },
+ {
+ path: "/message",
+ name: "message",
+ component: () => import("@/components/redirect/Message.vue"),
+ },
-let redirect = [{
- path: '/404',
- name: '404',
- component: () => import('@/components/redirect/404'),
- meta:{
- anonymous:true
- }
-}, {
- path: '/401',
- name: '401',
- component: () => import('@/components/redirect/401')
-}, {
- path: '/coding',
- name: 'coding',
- component: () => import('@/components/redirect/coding')
-}, {
- path: '/message',
- name: 'message',
- component: () => import('@/components/redirect/Message.vue')
-}]
-export default redirect;
\ No newline at end of file
+ {
+ path: "/indexLibrary",
+ component: () => import("@/views/Devicestatus/indexLibrary.vue"),
+ children: [
+ {
+ path: "/AgingLibrary",
+ component: () =>
+ import("@/views/Devicestatus/Craftlibrary/AgingLibrary.vue"),
+ },
+ {
+ path: "/FormationLibrary",
+ component: () =>
+ import("@/views/Devicestatus/Craftlibrary/FormationLibrary.vue"),
+ },
+ {
+ path: "/highTemperature",
+ component: () =>
+ import("@/views/Devicestatus/Craftlibrary/hightemperature.vue"),
+ },
+ {
+ path: "/roomTemperature",
+ component: () =>
+ import("@/views/Devicestatus/Craftlibrary/roomtemperature.vue"),
+ },
+ {
+ path: "/StaticLibrary",
+ component: () =>
+ import("@/views/Devicestatus/Craftlibrary/Staticlibrary.vue"),
+ },
+ {
+ path: "/Volume",
+ component: () => import("@/views/Devicestatus/Craftlibrary/Volume.vue"),
+ },
+ {
+ path: "/Twoletters",
+ component: () =>
+ import("@/views/Devicestatus/Craftlibrary/Twoletters.vue"),
+ },
+ ],
+ },
+];
+export default redirect;
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue
new file mode 100644
index 0000000..47c9bd9
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue
@@ -0,0 +1,106 @@
+<template>
+ <div>
+ <div>
+ <div class="Stackerbox">
+ <div class="card">
+ <div class="card-header">
+ <div>
+ <div class="card-body Stacker">
+ {{ StackerOne.deviceName }}
+ </div>
+ </div>
+ </div>
+ <div class="card-body">
+ <ul class="list-group">
+ <li class="list-group-item list-group-item-secondary">
+ 浠诲姟鍙凤細{{ StackerOne.data.currentTaskNum || '鏆傛棤浠诲姟鍙�' }}
+ </li>
+ <li :class="getStatusClass(StackerOne.data.stackerCraneAutoStatusDes)">
+ 宸ヤ綔妯″紡锛歿{ StackerOne.data.stackerCraneAutoStatusDes }}
+ </li>
+ <li :class="getStatusClass(StackerOne.data.stackerCraneStatusDes)">
+ 璁惧鐘舵�侊細{{ StackerOne.data.stackerCraneStatusDes }}
+ </li>
+ <li :class="getStatusClass(StackerOne.data.stackerCraneWorkStatusDes)">
+ 宸ヤ綔鐘舵�侊細{{ StackerOne.data.stackerCraneWorkStatusDes }}
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ <device-line v-for="device in devices" :key="device.deviceName" :device="device" />
+ </div>
+</template>
+
+<script setup>
+import { onMounted, reactive, toRefs } from "vue";
+import eventBus from "@/uitils/eventBus";
+import DeviceLine from "@/components/DeviceLine.vue";
+
+// 鍫嗗灈鏈�
+const StackerOne = reactive({
+ deviceName: "",
+ data: {
+ }
+});
+
+// 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
+const devices = reactive([
+ { deviceName: "闄堝寲鍑哄簱杈撻�佺嚎", data: { command: {}, commandWrite: {}, writeInteractiveSignal: [] } },
+ { deviceName: "闄堝寲鍏ュ簱杈撻�佺嚎", data: { command: {}, commandWrite: {}, writeInteractiveSignal: [] } },
+ // { deviceName: "鍫嗗灈鏈�1", data: { command: {}, commandWrite: {}, writeInteractiveSignal: [] } },
+ // Add all devices similarly...
+]);
+
+// 鑾峰彇鐘舵�佺被鍚嶏紙浼樺寲鐘舵�佸垽鏂級
+const getStatusClass = (status) => {
+ if (status === '姝e父' || status === '鑷姩' || status === '寰呮満') {
+ return 'list-group-item list-group-item-success';
+ }
+ if (status === '鏁呴殰' || status === '鍋滄満') {
+ return 'list-group-item list-group-item-danger';
+ }
+ return 'list-group-item list-group-item-warning'; // 榛樿璀﹀憡鐘舵��
+};
+
+// 鐩戝惉璁惧鏁版嵁鍙樺寲
+onMounted(() => {
+ eventBus.on('locationData', eventData => {
+ const device = devices.find(d => d.deviceName === eventData.deviceName);
+ if (device) {
+ // 浣跨敤鎵╁睍杩愮畻绗︽洿鏂板璞″睘鎬э紝淇濇寔鍝嶅簲鎬�
+ device.data = { ...device.data, ...eventData.data };
+ }
+ });
+});
+</script>
+<style scoped>
+.Stackerbox {
+ width: 220px;
+ float: left;
+}
+
+.Linebox {
+ width: 500px;
+ float: left;
+}
+
+.box1 {
+ float: left;
+}
+
+.card-body {
+ text-align: center;
+ border-radius: 6%;
+}
+
+.Stacker {
+ background-color: burlywood;
+}
+
+.lis {
+ float: left;
+ width: 233px;
+}
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/FormationLibrary.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/FormationLibrary.vue
new file mode 100644
index 0000000..91440c6
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/FormationLibrary.vue
@@ -0,0 +1,69 @@
+<template>
+ <el-row>
+ <el-col :span="24">
+ <device-line v-for="device in devices" :key="device.deviceName" :device="device" />
+ </el-col>
+ </el-row>
+</template>
+
+<script setup>
+import { onMounted, reactive, toRefs } from "vue";
+import eventBus from "@/uitils/eventBus";
+import DeviceLine from "@/components/DeviceLine.vue";
+
+// 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
+const devices = reactive([]);
+
+const intToBitArrayFromBinaryString = (num, numBits) => {
+ let binaryString = num.toString(2).padStart(numBits, '0');
+ return Array.from({ length: numBits }, (_, index) => binaryString[index] === '1');
+};
+
+// 鐩戝惉璁惧鏁版嵁鍙樺寲
+onMounted(() => {
+ eventBus.on('locationData', eventData => {
+ if (eventData.deviceName === "鍖栨垚鍏ュ簱杈撻�佺嚎") {
+ if (devices.length <= 0) {
+ devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+ }
+ else {
+ const device = devices.find(c => c.childDeviceCode == eventData.childDeviceCode)
+ if (device) {
+ const number = eventData.data.commandWrite.writeInteractiveSignal;
+ const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+ eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+ device.data = eventData.data
+ console.log("馃殌 ~ onMounted ~ device:", device.data)
+ }
+ else {
+ const number = eventData.data.commandWrite.writeInteractiveSignal;
+ const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+ eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+ devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+ }
+ }
+ }
+ });
+});
+</script>
+
+<style scoped>
+.Linebox{
+ width: 573px;
+ float: left;
+}
+.box1{
+ float: left;
+}
+.card-body{
+ text-align: center;
+ border-radius: 6% ;
+}
+.Stacker{
+ background-color: burlywood;
+}
+.lis{
+ float: left;
+ width: 269px;
+}
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Staticlibrary.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Staticlibrary.vue
new file mode 100644
index 0000000..f6b7a83
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Staticlibrary.vue
@@ -0,0 +1,99 @@
+<template>
+ <el-row>
+ <el-col :span="3">
+ <device-stacker v-for="stacker in Stackers" :key="stacker.deviceName" :Stacker="stacker"></device-stacker>
+ </el-col>
+ <el-col :span="21">
+ <device-line v-for="device in devices" :key="device.deviceName" :device="device" />
+ </el-col>
+ </el-row>
+</template>
+
+<script setup>
+import { onMounted, reactive, toRefs } from "vue";
+import eventBus from "@/uitils/eventBus";
+import DeviceLine from "@/components/DeviceLine.vue";
+import DeviceStacker from "@/components/DeviceStacker.vue";
+
+// 鍫嗗灈鏈�
+const Stackers = reactive([]);
+
+// 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
+const devices = reactive([]);
+
+const intToBitArrayFromBinaryString = (num, numBits) => {
+ let binaryString = num.toString(2).padStart(numBits, '0');
+ return Array.from({ length: numBits }, (_, index) => binaryString[index] === '1');
+};
+
+// 鐩戝惉璁惧鏁版嵁鍙樺寲
+onMounted(() => {
+ eventBus.on('locationData', eventData => {
+ if (eventData.deviceName === "闈欑疆杈撻�佺嚎") {
+
+ if (devices.length <= 0) {
+ devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+ }
+ else {
+ const device = devices.find(c => c.childDeviceCode == eventData.childDeviceCode)
+ if (device) {
+ const number = eventData.data.commandWrite.writeInteractiveSignal;
+ const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+ eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+ device.data = eventData.data
+ }
+ else {
+ const number = eventData.data.commandWrite.writeInteractiveSignal;
+ const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+ eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+ devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+ }
+ }
+ }
+ });
+ eventBus.on('stackerData', eventData => {
+ if (eventData.deviceName == "闈欑疆1鍙峰爢鍨涙満") {
+ if (Stackers.length == 0) {
+ Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
+ }
+ else {
+ const Stacker = Stackers.find(c => c.deviceName == eventData.deviceName);
+ if (Stacker) {
+ Stacker.data = eventData.data
+ }
+ else {
+ Stackers.push({ deviceName: eventData.deviceName, data: eventData.data });
+ }
+ }
+ }
+ // if (eventData.deviceName == "闄堝寲1鍙峰爢鍨涙満") {
+ // StackerOne.deviceName = eventData.deviceName;
+ // StackerOne.data = eventData.data
+ // }
+ })
+});
+</script>
+<style scoped>
+.Stackerbox {
+ width: 220px;
+ float: left;
+}
+
+.Linebox {
+ width: 500px;
+ float: left;
+}
+
+.box1 {
+ float: left;
+}
+
+.card-body {
+ text-align: center;
+ border-radius: 6%;
+}
+
+.Stacker {
+ background-color: burlywood;
+}
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Twoletters.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Twoletters.vue
new file mode 100644
index 0000000..c24eac2
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Twoletters.vue
@@ -0,0 +1,69 @@
+<template>
+ <el-row>
+ <el-col :span="24">
+ <device-line v-for="device in devices" :key="device.deviceName" :device="device" />
+ </el-col>
+ </el-row>
+</template>
+
+<script setup>
+import { onMounted, reactive, toRefs } from "vue";
+import eventBus from "@/uitils/eventBus";
+import DeviceLine from "@/components/DeviceLine.vue";
+
+// 璁惧鍒楄〃锛堜慨鏀归噸澶嶈澶囧悕绉帮級
+const devices = reactive([]);
+
+const intToBitArrayFromBinaryString = (num, numBits) => {
+ let binaryString = num.toString(2).padStart(numBits, '0');
+ return Array.from({ length: numBits }, (_, index) => binaryString[index] === '1');
+};
+
+// 鐩戝惉璁惧鏁版嵁鍙樺寲
+onMounted(() => {
+ eventBus.on('locationData', eventData => {
+ if (eventData.deviceName === "浜屽皝杈撻�佺嚎") {
+
+ if (devices.length <= 0) {
+ devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+ }
+ else {
+ const device = devices.find(c => c.childDeviceCode == eventData.childDeviceCode)
+ if (device) {
+ const number = eventData.data.commandWrite.writeInteractiveSignal;
+ const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+ eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+ device.data = eventData.data
+ }
+ else {
+ const number = eventData.data.commandWrite.writeInteractiveSignal;
+ const writeInteractiveSignal = intToBitArrayFromBinaryString(number, 8)
+ eventData.data.writeInteractiveSignal = writeInteractiveSignal;
+ devices.push({ deviceName: eventData.deviceName, data: eventData.data, childDeviceCode: eventData.childDeviceCode });
+ }
+ }
+ }
+ });
+});
+</script>
+
+<style scoped>
+.Linebox{
+ width: 573px;
+ float: left;
+}
+.box1{
+ float: left;
+}
+.card-body{
+ text-align: center;
+ border-radius: 6% ;
+}
+.Stacker{
+ background-color: burlywood;
+}
+.lis{
+ float: left;
+ width: 269px;
+}
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
new file mode 100644
index 0000000..2effa57
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
@@ -0,0 +1,9 @@
+<template>
+ <div>
+ 鍒嗗搴�
+ </div>
+</template>
+<script setup>
+
+
+</script>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/hightemperature.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/hightemperature.vue
new file mode 100644
index 0000000..1f6369c
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/hightemperature.vue
@@ -0,0 +1,9 @@
+<template>
+ <div>
+ 楂樻俯搴�
+ </div>
+</template>
+<script setup>
+
+
+</script>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
new file mode 100644
index 0000000..520ee72
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
@@ -0,0 +1,9 @@
+<template>
+ <div>
+ 甯告俯搴�
+ </div>
+</template>
+<script setup>
+
+
+</script>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/indexLibrary.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/indexLibrary.vue
new file mode 100644
index 0000000..725783b
--- /dev/null
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/indexLibrary.vue
@@ -0,0 +1,47 @@
+<template>
+
+ <!--瀵艰埅鍖� -->
+ <div class="nav-bar">
+ <RouterLink class="navlink" to="/AgingLibrary" >闄堝寲搴�</RouterLink>
+ <RouterLink class="navlink" to="/FormationLibrary" >鍖栨垚搴�</RouterLink>
+ <RouterLink class="navlink" to="/StaticLibrary" >闈欑疆搴�</RouterLink>
+ <RouterLink class="navlink" to="/Twoletters" >浜屽皝搴�</RouterLink>
+ <RouterLink class="navlink" to="/Volume" >鍒嗗搴�</RouterLink>
+ <RouterLink class="navlink" to="/highTemperature" >楂樻俯搴�</RouterLink>
+ <RouterLink class="navlink" to="/roomTemperature" >甯告俯搴�</RouterLink>
+ </div>
+ <!--娉ㄦ剰浜嬮」-->
+ <div class="area">
+ <RouterView></RouterView>
+ </div>
+</template>
+<script setup>
+ import { RouterView,RouterLink } from 'vue-router';
+
+</script>
+<style>
+.nav-bar {
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+ height: 50px;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #ccc;
+}
+.navlink {
+ width: 100px;
+ height: 100%;
+ text-decoration:none;
+ text-align: center;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ color: rgb(0, 195, 255);
+ }
+.navlink:hover{
+ background-color: rgb(0, 195, 255);
+ color: #ffffff;
+}
+
+</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue
index e327eb1..2d83b3c 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue
@@ -1,106 +1,5 @@
<template>
- <div class="home-contianer">
- <div>
- <el-tabs type="border-card" @tab-click="handleClick" style="width: 100%; height: 100%;">
- <el-tab-pane label="闄堝寲搴�" style="width: 100%;height: 100%;">
- <div class="StackerOne">
- <div class="content">{{ this.StackerOne.deviceName }}:</div>
- <!-- <div :class="this.ConveyorlineOut.data.command.interactiveSignal==1 ? 'bool_false' : 'bool_true'"></div> -->
- <div class="content">浠诲姟鍙凤細{{ this.StackerOne.data.currentTaskNum }}</div>
- <div class="content display">
- <div>宸ヤ綔妯″紡锛歿{ this.StackerOne.data.stackerCraneAutoStatusDes }}</div>
- <div :class="this.StackerOne.data.stackerCraneAutoStatusDes != '鑷姩' ? 'bool_false' : 'bool_true'"></div>
- </div>
- <div class="content display">
- <div>璁惧鐘舵�侊細{{ this.StackerOne.data.stackerCraneStatusDes }}</div>
- <div :class="this.StackerOne.data.stackerCraneStatusDes != '姝e父' ? 'bool_false' : 'bool_true'"></div>
- </div>
- <div class="content display">
- <div>浣滀笟鐘舵�侊細{{ this.StackerOne.data.stackerCraneWorkStatusDes }}</div>
- <div :class="this.StackerOne.data.stackerCraneWorkStatusDes != '寰呮満' ? 'bool_false' : 'bool_true'"></div>
- </div>
- </div>
- <div class="ConveyorlineOut">
- <div class="content">{{ this.ConveyorlineOut.deviceName }}-----{{
- this.ConveyorlineOut.data.childDeviceCode}}:</div>
- <div class="display">
- <div>
- <div class="Signal">璇诲彇淇″彿锛�</div>
- <div class="content ">浠诲姟鍙凤細{{ this.ConveyorlineOut.data.command.taskNum }}</div>
- <div class="content ">鎵樼洏鍙凤細{{ this.ConveyorlineOut.data.command.barcode }}</div>
- <div class="content ">缁堢偣鍦板潃锛歿{ this.ConveyorlineOut.data.command.targetAddress}}</div>
- <div class="content display">
- <div>鎵爜绔欏彴鍏ュ簱璇锋眰锛�</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[0] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- <div class="content display">
- <div>鍫嗗灈鏈哄嚭搴撶珯鍙拌姹傦細</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[2] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- <div class="content display">
- <div>鍫嗗灈鏈哄叆搴撶珯鍙拌姹�</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[4] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- <div class="content display">
- <div>绾夸綋鍑哄簱鍙h姹傦細</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[6] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- </div>
- <div style="margin-left: 40px;">
- <div class="Signal">鍐欏叆淇″彿锛�</div>
- <div class="content ">浠诲姟鍙凤細{{ this.ConveyorlineOut.data.commandWrite.taskNum }}</div>
- <div class="content ">鎵樼洏鍙凤細{{ this.ConveyorlineOut.data.commandWrite.barcode }}</div>
- <div class="content ">缁堢偣鍦板潃锛歿{ this.ConveyorlineOut.data.commandWrite.targetAddress}}</div>
- <div class="content display">
- <div>鎵爜绔欏彴鍏ュ簱璇锋眰锛�</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[1] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- <div class="content display">
- <div>鍫嗗灈鏈哄嚭搴撶珯鍙拌姹傦細</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[3] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- <div class="content display">
- <div>鍫嗗灈鏈哄叆搴撶珯鍙拌姹�</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[5] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- <div class="content display">
- <div>绾夸綋鍑哄簱鍙h姹傦細</div>
- <div
- :class="this.ConveyorlineOut.data.writeInteractiveSignal[7] != true ? 'bool_false' : 'bool_true'">
- </div>
- </div>
- </div>
- </div>
- </div>
- </el-tab-pane>
- <el-tab-pane label="闈欑疆搴�" id="print-content">
-
- </el-tab-pane>
- <el-tab-pane label="鍒嗗搴�" id="print-content">
-
- </el-tab-pane><el-tab-pane label="楂樻俯搴�" id="print-content">
-
- </el-tab-pane>
- <el-tab-pane label="甯告俯搴�" id="print-content">
-
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
+ <div class="title"></div>
</template>
<script>
@@ -109,62 +8,13 @@
export default {
setup() {
return {
- StackerOne: {
- deviceName: "",
- data: {},
- },
- ConveyorlineOut: {
- deviceName: "",
- data: {
- command: {},
- commandWrite: {},
- writeInteractiveSignal:[],
- },
- },
- ConveyorlineIn: {
- deviceName: "",
- data: {
- command: {},
- commandWrite: {},
- writeInteractiveSignal:[],
- },
- }
}
- },
- methods: {
- intToBitArrayFromBinaryString (num, numBits){
- // 灏嗘暣鏁拌浆鎹负浜岃繘鍒跺瓧绗︿覆锛屽苟浣跨敤padStart鏂规硶琛ヨ冻鍒版寚瀹氱殑浣嶆暟锛堝墠闈㈣ˉ0锛�
- let binaryString = num.toString(2).padStart(numBits, '0');
- let bitArray = [];
- for (let i = 0; i < numBits; i++) {
- // 鐩存帴鏍规嵁瀛楃涓蹭腑瀛楃鏄惁涓�'1'鏉ョ‘瀹氭瘡涓�浣嶇殑鍊硷紙杞崲涓哄竷灏斿�硷級
- bitArray.push(binaryString[i] === '1');
- }
- return bitArray;
- }
- },
- mounted() {
eventBus.on('stackerData', eventData => {
- if (eventData.deviceName == "闄堝寲1鍙峰爢鍨涙満") {
- this.StackerOne.deviceName = eventData.deviceName;
- this.StackerOne.data = eventData.data
- }
- // console.log(eventData);
+ console.log(eventData);
})
eventBus.on('locationData', eventData => {
- console.log(eventData);
- if (eventData.deviceName == "闄堝寲鍑哄簱杈撻�佺嚎") {
- this.ConveyorlineOut.deviceName = eventData.deviceName;
- this.ConveyorlineOut.data = eventData.data
- }
- if (eventData.data.childDeviceCode == '1018') {
- this.ConveyorlineIn.deviceName = eventData.deviceName;
- this.ConveyorlineIn.data = eventData.data
- let number = eventData.data.commandWrite.writeInteractiveSignal
- this.ConveyorlineIn.data.writeInteractiveSignal = this.intToBitArrayFromBinaryString(number, 8);
- console.log(this.ConveyorlineIn.data.writeInteractiveSignal);
- }
+ console.log(eventData);
})
}
}
@@ -176,55 +26,5 @@
text-align: center;
font-size: 28px;
color: orange;
-}
-
-.bool_true {
- width: 30px;
- height: 20px;
- margin-top: 10px;
- margin-left: 10px;
- background-color: rgb(99, 155, 16);
-}
-
-.bool_info {
- width: 30px;
- height: 10px;
- background-color: #ccc;
-}
-
-.StackerOne {
- width: 100%;
- margin-bottom: 10px;
- padding-left: 30px;
- font-size: 25px;
- border: 1px solid #ccc;
-}
-
-.ConveyorlineOut {
- width: 100%;
- margin-bottom: 10px;
- padding-left: 30px;
- font-size: 25px;
- border: 1px solid #ccc;
-}
-
-.bool_false {
- display: block;
- width: 30px;
- height: 20px;
- margin-top: 10px;
- margin-left: 10px;
- background-color: rgb(204, 71, 71);
-}
-
-.content {
- margin-bottom: 20px;
-}
-.Signal{
- margin-bottom: 20px;
- color:blueviolet;
-}
-.display {
- display: flex;
}
</style>
\ No newline at end of file
diff --git a/Code Management/WCS/WIDESEAWCS_Client/src/views/charts/bigdata.vue b/Code Management/WCS/WIDESEAWCS_Client/src/views/charts/bigdata.vue
index e75b6f9..2759b12 100644
--- a/Code Management/WCS/WIDESEAWCS_Client/src/views/charts/bigdata.vue
+++ b/Code Management/WCS/WIDESEAWCS_Client/src/views/charts/bigdata.vue
@@ -19,7 +19,7 @@
</div>
<div class="data-left-item">
<div class="title">7鏃ヨ鍗曢攢閲�</div>
- <div id="chart-vleft-2" style="height: calc(100% - 30px)"></div>
+ <div id="chart-vleft-2" style="height: calc(100% - 30px)"></div>
<div class="data-foot-line"></div>
</div>
</div>
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db
index 162c3b8..c6d1c18 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-shm b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-shm
deleted file mode 100644
index 20dbb1f..0000000
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-shm
+++ /dev/null
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-wal b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-wal
deleted file mode 100644
index 6ff7848..0000000
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-wal
+++ /dev/null
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db
index 2ac9658..2a83572 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
index 9458fd3..547c4bd 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
index da7a9ba..9760878 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
+++ b/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
Binary files differ
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
index f49c894..e8cee90 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -145,6 +145,15 @@
/// <returns></returns>
Dt_Task QueryCompletedConveyorLineTask(int taskNum, string currentAddress);
+
+ /// <summary>
+ /// 鏍规嵁鎵樼洏鍙枫�佸綋鍓嶅湴鍧�鏌ヨ浠诲姟
+ /// </summary>
+ /// <param name="taskNum">浠诲姟鍙�</param>
+ /// <param name="currentAddress">褰撳墠鍦板潃</param>
+ /// <returns></returns>
+ Dt_Task QueryBarcodeTask(string barcode, string currentAddress);
+
/// <summary>
/// 鏍规嵁浠诲姟鍙枫�佸綋鍓嶅湴鍧�鏌ヨ杈撻�佺嚎鏂板缓鐨勪换鍔�
/// </summary>
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
index 3a729f2..582e1f6 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs
@@ -174,7 +174,7 @@
/// <returns>璇诲彇鍒扮殑鏁版嵁</returns>
public TRsult GetValue<TEnum, TRsult>(TEnum value, string deviceChildCode) where TEnum : Enum
{
- if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�");
+ if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁溿�� {DeviceName} 銆�");
DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == value.ToString() && x.DeviceChildCode == deviceChildCode);
return devicePro == null ? throw new Exception() : (TRsult)Communicator.ReadAsObj(devicePro.DeviceProAddress, devicePro.DeviceDataType);
}
@@ -197,7 +197,7 @@
/// <exception cref="Exception"></exception>
public bool SendCommand<T>(T command, string deviceChildCode) where T : IDataTransfer, new()
{
- if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�");
+ if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁溿�恵DeviceName}銆�");
DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
if (devicePro == null)
{
@@ -219,7 +219,7 @@
/// <exception cref="Exception"></exception>
public T ReadCustomer<T>(string deviceChildCode) where T : IDataTransfer, new()
{
- if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�");
+ if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁溿�恵DeviceName}銆�");
DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == "ReadDeviceCommand" && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
if (devicePro == null)
@@ -242,7 +242,7 @@
/// <exception cref="Exception"></exception>
public T ReadCustomer<T>(string deviceChildCode, string deviceProParamType) where T : IDataTransfer, new()
{
- if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�:" + DeviceName);
+ if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁溿�恵DeviceName}銆�");
DeviceProDTO? devicePro = _deviceProDTOs.Where(x => x.DeviceProParamType == deviceProParamType && x.DeviceChildCode == deviceChildCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
if (devicePro == null)
@@ -268,7 +268,7 @@
where TEnum : Enum
where TValue : notnull
{
- if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁�");
+ if (!IsConnected) throw new Exception($"閫氳杩炴帴閿欒锛岃妫�鏌ョ綉缁溿�� {DeviceName} 銆�");
DeviceProDTO? devicePro = _deviceProDTOs.FirstOrDefault(x => x.DeviceProParamName == @enum.ToString() && x.DeviceChildCode == deviceChildCode);
return devicePro == null ? throw new Exception() : Communicator.WriteObj(devicePro.DeviceProAddress, devicePro.DeviceDataType, value);
}
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
index a656551..a60279f 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
@@ -30,12 +30,74 @@
/// <param name="startPosi">璧风偣/褰撳墠浣嶇疆銆�</param>
/// <param name="endPosi">缁堢偣銆�</param>
/// <returns>杩斿洖璺敱瀹炰綋闆嗗悎銆�</returns>
+ //public List<Dt_Router> QueryNextRoutes(string startPosi, string endPosi)
+ //{
+ // //todo 鏂规硶闇�浼樺寲
+ // List<Dt_Router> routers = new List<Dt_Router>();
+ // try
+ // {
+ // List<Dt_Router> dt_Routers = BaseDal.QueryData(x => x.NextPosi == endPosi || x.ChildPosi == endPosi, new Dictionary<string, OrderByType> { { nameof(Dt_Router.IsEnd), OrderByType.Desc } });
+ // if (dt_Routers.Count > 0)
+ // {
+ // foreach (var item in dt_Routers)
+ // {
+ // if (item.StartPosi == startPosi && !routers.Any(x => x.Id == item.Id))
+ // {
+ // routers.Add(item);
+ // }
+ // else
+ // {
+ // List<Dt_Router> tempRouters = QueryNextRoutes(startPosi, item.StartPosi);
+ // foreach (var router in tempRouters)
+ // {
+ // if (router.StartPosi == startPosi && !routers.Any(x => x.Id == router.Id))
+ // {
+ // routers.Add(router);
+ // }
+ // }
+ // }
+ // }
+ // }
+ // else
+ // {
+ // throw new Exception($"璇ヨ矾寰勬湭閰嶇疆鎴栭厤缃敊璇�,璇锋鏌ヨ澶囪矾鐢变俊鎭�,璧风偣:銆恵startPosi}銆�,缁堢偣:銆恵endPosi}銆�");
+ // }
+ // }
+ // catch (Exception ex)
+ // {
+ // //throw new Exception(ex.Message);
+ // //璁板綍閿欒淇℃伅
+ // }
+ // return routers;
+ //}
+
+ /// <summary>
+ /// 鏍规嵁璧风偣/褰撳墠浣嶇疆銆佺粓鐐硅幏鍙栦笅涓�涓瓙鑺傜偣銆�
+ /// </summary>
+ /// <param name="startPosi">璧风偣/褰撳墠浣嶇疆銆�</param>
+ /// <param name="endPosi">缁堢偣銆�</param>
+ /// <returns>杩斿洖璺敱瀹炰綋闆嗗悎銆�</returns>
public List<Dt_Router> QueryNextRoutes(string startPosi, string endPosi)
{
- //todo 鏂规硶闇�浼樺寲
+ // 鐢ㄤ簬璁板綍宸茬粡璁块棶杩囩殑璧风偣鍜岀粓鐐圭粍鍚堬紝閬垮厤閲嶅璁块棶杩涘叆姝诲惊鐜�
+ HashSet<string> visitedRoutes = new HashSet<string>();
+ return QueryNextRoutesInternal(startPosi, endPosi, visitedRoutes);
+ }
+
+ private List<Dt_Router> QueryNextRoutesInternal(string startPosi, string endPosi, HashSet<string> visitedRoutes)
+ {
List<Dt_Router> routers = new List<Dt_Router>();
try
{
+ // 鏋勫缓涓�涓敮涓�鏍囪瘑褰撳墠璧风偣鍜岀粓鐐圭粍鍚堢殑瀛楃涓�
+ string routeKey = $"{startPosi}_{endPosi}";
+ if (visitedRoutes.Contains(routeKey))
+ {
+ // 濡傛灉宸茬粡璁块棶杩囷紝鐩存帴杩斿洖绌哄垪琛紝閬垮厤閲嶅杩涘叆鐩稿悓鐨勯�掑綊鍒嗘敮
+ return routers;
+ }
+ visitedRoutes.Add(routeKey);
+
List<Dt_Router> dt_Routers = BaseDal.QueryData(x => x.NextPosi == endPosi || x.ChildPosi == endPosi, new Dictionary<string, OrderByType> { { nameof(Dt_Router.IsEnd), OrderByType.Desc } });
if (dt_Routers.Count > 0)
{
@@ -47,7 +109,7 @@
}
else
{
- List<Dt_Router> tempRouters = QueryNextRoutes(startPosi, item.StartPosi);
+ List<Dt_Router> tempRouters = QueryNextRoutesInternal(startPosi, item.StartPosi, visitedRoutes);
foreach (var router in tempRouters)
{
if (router.StartPosi == startPosi && !routers.Any(x => x.Id == router.Id))
@@ -65,6 +127,7 @@
}
catch (Exception ex)
{
+ // 杩欓噷鍙互鏍规嵁瀹為檯闇�姹傛洿濂藉湴澶勭悊寮傚父锛屾瘮濡傝褰曟棩蹇楃瓑锛岀洰鍓嶅彧鏄敞閲婃帀浜嗙洿鎺ユ姏鍑哄紓甯�
//throw new Exception(ex.Message);
//璁板綍閿欒淇℃伅
}
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
index d122062..8b3e578 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,9 +12,9 @@
"MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
//杩炴帴瀛楃涓�
//"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
- "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
//"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BBGY;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//璺ㄥ煙
"Cors": {
"PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index 5dee342..22828a7 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -247,6 +247,12 @@
return BaseDal.QueryFirst(x => x.TaskNum == taskNum && x.CurrentAddress == currentAddress && (x.TaskState == (int)TaskInStatusEnum.Line_InFinish || x.TaskState == (int)TaskOutStatusEnum.Line_OutFinish), TaskOrderBy);
}
+ public Dt_Task QueryBarcodeTask(string barcode, string currentAddress)
+ {
+ return BaseDal.QueryFirst(x => x.PalletCode == barcode && x.CurrentAddress == currentAddress, TaskOrderBy);
+ }
+
+
/// <summary>
/// 鏍规嵁浠诲姟鍙枫�佸綋鍓嶅湴鍧�鏌ヨ杈撻�佺嚎鏂板缓鐨勪换鍔�
/// </summary>
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index 5530d5b..bc4f8f6 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -58,7 +58,7 @@
_noticeService = noticeService;
}
- public async Task Execute(IJobExecutionContext context)
+ public Task Execute(IJobExecutionContext context)
{
try
{
@@ -68,7 +68,7 @@
List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
foreach (string childDeviceCode in childDeviceCodes)
{
- await ProcessDeviceAsync(conveyorLine, childDeviceCode);
+ ProcessDeviceAsync(conveyorLine, childDeviceCode);
}
List<Dt_StationManager> stationManagers = _stationManagerService.GetAllStationByDeviceCode(conveyorLine.DeviceCode);
@@ -99,9 +99,10 @@
{
Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString());
}
+ return Task.CompletedTask;
}
- private async Task ProcessDeviceAsync(CommonConveyorLine conveyorLine, string childDeviceCode)
+ private void ProcessDeviceAsync(CommonConveyorLine conveyorLine, string childDeviceCode)
{
ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(childDeviceCode, "DeviceCommand");
@@ -121,22 +122,32 @@
MethodInfo? method = GetType().GetMethod(item.ProtocolDetailType);
if (method != null)
{
- command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
- method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, item.ProtocalDetailValue.ObjToInt() });
+ var numRead = item.ProtocalDetailValue.ObjToInt();
+ var numWrite = item.ProtocalDetailValue.ObjToInt() + 1;
+ ConsoleHelper.WriteWarningLine($"銆恵conveyorLine.DeviceName}銆戙�恵childDeviceCode}銆戙�恵numRead.ToString()}銆戜綅杈撻�佺嚎璇诲彇淇″彿锛氥�恵structs[item.ProtocalDetailValue.ObjToInt()]}銆� 銆恵numWrite}銆戜綅WCS鍐欏叆淇″彿锛氥�恵structs[item.ProtocalDetailValue.ObjToInt() + 1]}銆�");
+ if (structs[item.ProtocalDetailValue.ObjToInt() + 1] != structs[item.ProtocalDetailValue.ObjToInt()])
+ {
+ command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
+ method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, item.ProtocalDetailValue.ObjToInt() });
+ }
}
}
else
{
- DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == childDeviceCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
- string[] x = devicePro.DeviceProAddress.Split('.');
- x[x.Length - 1] = (item.ProtocalDetailValue.ObjToInt() + 1).ToString();
- string DeviceProAddress = string.Join(".", x);
- var writeRead = conveyorLine.Communicator.Read<bool>(DeviceProAddress);
- if (writeRead)
- {
- conveyorLine.Communicator.Write(DeviceProAddress, false);
- //ConveyorLineSendFinish(conveyorLine, childDeviceCode, item.ProtocalDetailValue.ObjToInt(), false);
- }
+
+
+ ConveyorLineSendFinish(conveyorLine, childDeviceCode, item.ProtocalDetailValue.ObjToInt(), false);
+
+ //DeviceProDTO? devicePro = conveyorLine.DeviceProDTOs.Where(x => x.DeviceProParamType == nameof(DeviceCommand) && x.DeviceChildCode == childDeviceCode).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
+ //string[] x = devicePro.DeviceProAddress.Split('.');
+ //x[x.Length - 1] = (item.ProtocalDetailValue.ObjToInt() + 1).ToString();
+ //string DeviceProAddress = string.Join(".", x);
+ //var writeRead = conveyorLine.Communicator.Read<bool>(DeviceProAddress);
+ //if (writeRead)
+ //{
+ // conveyorLine.Communicator.Write(DeviceProAddress, false);
+ // //ConveyorLineSendFinish(conveyorLine, childDeviceCode, item.ProtocalDetailValue.ObjToInt(), false);
+ //}
}
}
}
@@ -192,11 +203,10 @@
object obj = new
{
- childDeviceCode,
command,
commandWrite
};
- _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, data = obj });
+ _noticeService.LineData(userIds?.FirstOrDefault(), userTokenIds, new { conveyorLine.DeviceName, childDeviceCode, data = obj });
#endregion 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇
}
@@ -218,11 +228,21 @@
ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�");
var task = _taskService.QueryBarCodeConveyorLineTask(command.Barcode, childDeviceCode);
- HandleTaskOut(conveyorLine, command, childDeviceCode, ProtocalDetailValue, task);
-
- if (task == null && command.Barcode != "NoRead" && command.Barcode.IsNotEmptyOrNull())
+ if (task != null)
{
- HandleNewTask(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
+ if (task.TaskType == (int)TaskOutboundTypeEnum.OutTray || task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
+ {
+ HandleTaskOut(conveyorLine, command, childDeviceCode, ProtocalDetailValue, task);
+ }
+ }
+ else
+ {
+ if (task == null && command.Barcode != "NoRead" && command.Barcode.IsNotEmptyOrNull())
+ {
+ task = _taskService.QueryBarcodeTask(command.Barcode, childDeviceCode);
+ if (task == null)
+ HandleNewTask(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
+ }
}
}
catch (Exception ex)
@@ -274,6 +294,7 @@
/// <param name="ProtocalDetailValue">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param>
public void ConveyorLineInFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
{
+ ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚");
var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
{
@@ -318,9 +339,10 @@
public void RequestOutbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode, int ProtocalDetailValue)
{
var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
+ ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎璇锋眰鍑哄簱,task{task.ToJsonString()}");
if (task != null)
{
- if (command.Barcode == task.PalletCode)
+ //if (command.Barcode == task.PalletCode)
{
//task.NextAddress = task.NextAddress.Replace("-1", "");
//ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(task);
@@ -470,7 +492,7 @@
var tasks = _taskRepository.QueryData(x => x.TaskType == (int)taskType && x.TargetAddress == childDeviceCode);
if (tasks.Count < index)
{
- ConsoleHelper.WriteErrorLine($"銆恵childDeviceCode}銆戣姹傘�恵taskType.ToString()}銆戜换鍔�,宸叉湁銆恵taskType.ToString()}銆戜换鍔°�恵tasks.Count}銆�,鏈�澶氭嫢鏈夈�恵index - 1}銆�");
+ //ConsoleHelper.WriteErrorLine($"銆恵childDeviceCode}銆戣姹傘�恵taskType.ToString()}銆戜换鍔�,宸叉湁銆恵taskType.ToString()}銆戜换鍔°�恵tasks.Count}銆�,鏈�澶氭嫢鏈夈�恵index - 1}銆�");
#region 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
index 422f58b..634c58f 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -1,6 +1,7 @@
锘縰sing HslCommunication;
using Newtonsoft.Json;
using System.Text.RegularExpressions;
+using System.Threading.Tasks;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
@@ -100,6 +101,10 @@
{
// 浣跨敤姝e垯琛ㄨ揪寮忓尮閰嶇被浼� -鏁板瓧 鐨勬ā寮忥紝骞舵浛鎹负绌哄瓧绗︿覆
task.NextAddress = Regex.Replace(task.NextAddress, @"-(\d+)", "");
+ if (Convert.ToInt32(task.NextAddress) > 1999)
+ {
+ task.NextAddress = (Convert.ToInt32(task.NextAddress) - 1000).ToString();
+ }
var comm = _mapper.Map<ConveyorLineTaskCommand>(task);
comm.InteractiveSignal = command.InteractiveSignal;
return comm;
@@ -216,16 +221,30 @@
var task = _taskService.QueryBarCodeConveyorLineTask(command.Barcode, childDeviceCode);
if (task != null)
{
- //var taskCommand = MapTaskCommand(task, command);
- var next = task.NextAddress;
- var taskCommand = MapTaskCommand(task, command);
- task.NextAddress = next;
+ if (task.NextAddress.Contains("JZ"))
+ {
+ command.Barcode = task.PalletCode;
+ command.TaskNum = task.TaskNum;
+ int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskInStatusEnum>();
+ task.TaskState = nextStatus;
- ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(鏄儢),涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
+ ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(瀹炵洏),涓嬩竴鐩爣鍦板潃銆恵task.TargetAddress}銆�");
+ _taskService.UpdateTaskStatusToNext(task);
+ ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+ }
+ else
+ {
+ //var taskCommand = MapTaskCommand(task, command);
+ var next = task.NextAddress;
+ var taskCommand = MapTaskCommand(task, command);
+ task.NextAddress = next;
- conveyorLine.SendCommand(taskCommand, childDeviceCode);
- ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
- _taskService.UpdateTaskStatusToNext(task);
+ ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣姹傛壂鐮佸叆搴�(鏄儢),涓嬩竴鐩爣鍦板潃銆恵taskCommand.TargetAddress}銆�");
+
+ conveyorLine.SendCommand(taskCommand, childDeviceCode);
+ ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
+ _taskService.UpdateTaskStatusToNext(task);
+ }
}
}
else
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index dc00b0d..7d60702 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -321,32 +321,32 @@
RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
};
- var MOMIpAddress = wmsBase + ipAddress;
+ var MOMIpAddress = wmsBase + ipAddress;
- var result = HttpHelper.PostAsync(MOMIpAddress, trayCells.ToJsonString()).Result;
- WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃姹傚弬鏁般�恵trayCells.ToJsonString()}銆�");
- WriteInfo("鍏ョ珯鏍¢獙", "");
- WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃繑鍥炲弬鏁般�恵result}銆�");
- ResultTrayCellsStatus result1 = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(result);
- if (result1.Success || task.Remark != "NG")
+ var result = HttpHelper.PostAsync(MOMIpAddress, trayCells.ToJsonString()).Result;
+ WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃姹傚弬鏁般�恵trayCells.ToJsonString()}銆�");
+ WriteInfo("鍏ョ珯鏍¢獙", "");
+ WriteInfo("鍏ョ珯鏍¢獙", $"銆恵childDeviceCode}銆戝叆绔欐牎楠岃繑鍥炲弬鏁般�恵result}銆�");
+ ResultTrayCellsStatus result1 = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(result);
+ if (result1.Success || task.Remark != "NG")
+ {
+ Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
+ if (newTask != null)
{
- Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
- if (newTask != null)
- {
- ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask);
- conveyorLine.SendCommand(taskCommand, childDeviceCode);
- conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
- }
- }
- else
- {
- ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
- taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode);
+ ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(newTask);
conveyorLine.SendCommand(taskCommand, childDeviceCode);
conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
- _taskService.UpdateTaskStatusToNext(task);
}
}
+ else
+ {
+ ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
+ taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode);
+ conveyorLine.SendCommand(taskCommand, childDeviceCode);
+ conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
+ _taskService.UpdateTaskStatusToNext(task);
+ }
+
}
}
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index c22fd8a..3d3799d 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -11,6 +11,7 @@
using WIDESEAWCS_Core.HttpContextUser;
using WIDESEAWCS_DTO.MOM;
using WIDESEAWCS_IProcessRepository;
+using WIDESEAWCS_ITaskInfo_HtyRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model;
@@ -37,8 +38,9 @@
private readonly ICacheService _cacheService;
private readonly INoticeService _noticeService;
private readonly IDt_StationManagerRepository _stationManagerRepository;
+ private readonly ITask_HtyRepository _htyRepository;
- public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository)
+ public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -48,6 +50,7 @@
_cacheService = cacheService;
_noticeService = noticeService;
_stationManagerRepository = stationManagerRepository;
+ _htyRepository = htyRepository;
}
public Task Execute(IJobExecutionContext context)
@@ -138,7 +141,8 @@
CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
if (commonStackerCrane != null)
{
- if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
+ //var x = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+ //if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
{
//Console.Out.WriteLine("TaskCompleted" + e.TaskNum);
ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″畬鎴�,浠诲姟鍙凤細銆恵e.TaskNum}銆�", ConsoleColor.Blue);
@@ -174,6 +178,12 @@
task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum);
Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
}
+ if(task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TargetAddress == "1359-4")
+ {
+ var TASKHTY = task.Adapt<Dt_Task_Hty>();
+ _taskRepository.DeleteData(task);
+ _htyRepository.AddData(TASKHTY);
+ }
commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
}
}
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db
index 18818c1..d14396c 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
index 9a7c1f0..ffa0cf0 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
index 01e2480..7136fc2 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
+++ b/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
Binary files differ
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
index 329d55b..da63e3c 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -132,7 +132,7 @@
if (string.IsNullOrEmpty(where))
where += $"{searchParametersList[i].Name} like '%{searchParametersList[i].Value}%'";
else
- where += $" and {searchParametersList[i].Name} like '%{searchParametersList[i].Value}%'";
+ where += $" and {searchParametersList[i].Name} = '{searchParametersList[i].Value}'";
}
else
{
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs
index c037cfe..3e409e3 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs
@@ -1,4 +1,5 @@
-锘縰sing SqlSugar;
+锘縰sing Magicodes.ExporterAndImporter.Core;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,87 +15,117 @@
/// <summary>
/// 涓婚敭
/// </summary>
+ [ImporterHeader(Name = "涓婚敭")]
+ [ExporterHeader(DisplayName = "涓婚敭")]
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
public int Id { get; set; }
/// <summary>
- /// 鎵樼洏鏉$爜
+ /// 鎵樼洏缂栧彿
/// </summary>
+ [ImporterHeader(Name = "鎵樼洏缂栧彿")]
+ [ExporterHeader(DisplayName = "鎵樼洏缂栧彿")]
[SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏缂栧彿")]
public string PalletCode { get; set; }
/// <summary>
/// 璐т綅缂栧彿
/// </summary>
+ [ImporterHeader(Name = "璐т綅ID")]
+ [ExporterHeader(DisplayName = "璐т綅ID")]
[SugarColumn(IsNullable = true, ColumnDescription = "璐т綅ID")]
public int LocationId { get; set; }
/// <summary>
/// 璐т綅缂栧彿
/// </summary>
+ [ImporterHeader(Name = "璐т綅缂栧彿")]
+ [ExporterHeader(DisplayName = "璐т綅缂栧彿")]
[SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "璐т綅缂栧彿")]
public string LocationCode { get; set; }
/// <summary>
/// 鏄惁婊$洏
/// </summary>
+ [ImporterHeader(Name = "鏄惁瀹炵洏")]
+ [ExporterHeader(DisplayName = "鏄惁瀹炵洏")]
[SugarColumn(IsNullable = false, ColumnDescription = "鏄惁婊$洏", DefaultValue = "0")]
public bool IsFull { get; set; }
/// <summary>
/// 澶囨敞 (闈欏埗\闄堝寲鏃堕棿)
/// </summary>
- [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
+ [ImporterHeader(Name = "鐢佃姱鏁伴噺")]
+ [ExporterHeader(DisplayName = "鐢佃姱鏁伴噺")]
+ [SugarColumn(IsNullable = true, ColumnDescription = "鐢佃姱鏁伴噺")]
public string Remark { get; set; }
/// <summary>
/// 鍏宠仈宸ュ簭杩斿洖鏃堕棿锛堟敞娑瞈闈欑疆鏃堕暱锛�
/// </summary>
+ [ImporterHeader(Name = "宸ュ簭杩斿洖鏃堕棿")]
+ [ExporterHeader(DisplayName = "宸ュ簭杩斿洖鏃堕棿")]
public string LinedProcessFeedbackTime { get; set; }
/// <summary>
/// 鐗瑰緛鍙傛暟杩斿洖(闈欑疆鏃堕暱)
/// </summary>
+ [ImporterHeader(Name = "闈欑疆鏃堕暱")]
+ [ExporterHeader(DisplayName = "闈欑疆鏃堕暱")]
public string SpecialParameterDuration { get; set; }
/// <summary>
/// 鐢熶骇浜х嚎
/// </summary>
+ [ImporterHeader(Name = "鐢熶骇浜х嚎")]
+ [ExporterHeader(DisplayName = "鐢熶骇浜х嚎")]
public string ProductionLine { get; set; }
/// <summary>
/// 鍖哄煙缂栫爜
/// </summary>
+ [ImporterHeader(Name = "鍖哄煙缂栫爜")]
+ [ExporterHeader(DisplayName = "鍖哄煙缂栫爜")]
[SugarColumn(IsNullable = true, ColumnDescription = "鍖哄煙缂栫爜")]
public string AreaCode { get; set; }
/// <summary>
/// 搴斿嚭搴撴椂闂�
/// </summary>
+ [ImporterHeader(Name = "搴斿嚭搴撴椂闂�")]
+ [ExporterHeader(DisplayName = "搴斿嚭搴撴椂闂�")]
[SugarColumn(IsNullable = true, ColumnDescription = "搴斿嚭搴撴椂闂�")]
public DateTime? OutboundTime { get; set; }
/// <summary>
/// 鍙傛暟淇℃伅
/// </summary>
+ [ImporterHeader(Name = "鍙傛暟淇℃伅")]
+ [ExporterHeader(DisplayName = "鍙傛暟淇℃伅")]
[SugarColumn(IsNullable = true, ColumnDescription = "鍙傛暟淇℃伅")]
public string ParameterInfos { get; set; }
/// <summary>
/// 搴撳瓨鐘舵��
/// </summary>
+ [ImporterHeader(Name = "鍒涘缓鑰�")]
+ [ExporterHeader(DisplayName = "鍒涘缓鑰�")]
[SugarColumn(IsNullable = true, ColumnDescription = "搴撳瓨鐘舵��")]
public int StockStatus { get; set; }
/// <summary>
/// 褰撳墠宸ュ簭
/// </summary>
+ [ImporterHeader(Name = "褰撳墠宸ュ簭")]
+ [ExporterHeader(DisplayName = "褰撳墠宸ュ簭")]
[SugarColumn(IsNullable = true, ColumnDescription = "褰撳墠宸ュ簭")]
public string ProcessCode { get; set; }
/// <summary>
/// 涓嬩竴宸ュ簭
/// </summary>
+ [ImporterHeader(Name = "涓嬩竴宸ュ簭")]
+ [ExporterHeader(DisplayName = "涓嬩竴宸ュ簭")]
[SugarColumn(IsNullable = true, ColumnDescription = "涓嬩竴宸ュ簭")]
public string NextProcessCode { get; set; }
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
index c477b03..587b9ad 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -135,7 +135,7 @@
LocationType = locType,
Remark = "",
Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1,
- RoadwayNo = locType > 1 ? $"CHSC{((line - 1) / 4) + 1}" : $"CHSC{((line - 1) / 2) + 1}",
+ RoadwayNo = locType > 1 ? $"JZSC{((line - 1) / 4) + 1}" : $"JZSC{((line - 1) / 2) + 1}",
LocationStatus = LocationEnum.Free.ObjToInt(),
AreaId = areaId,
Creater = "systeam",
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
index eaeb458..b9093ab 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
@@ -1,17 +1,10 @@
锘縰sing Masuit.Tools;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using WIDESEA_Core.Const;
using WIDESEA_DTO.WMS;
using WIDESEA_IServices;
-using WIDESEA_Repository;
using WIDESEAWCS_BasicInfoRepository;
-using WIDESEA_Model;
namespace WIDESEA_StorageTaskServices
{
@@ -26,6 +19,7 @@
private readonly ILocationInfoRepository _locationRepository;
private Timer _timer;
+
public MyBackgroundService(ILogger<MyBackgroundService> logger, ILocationInfoRepository locationRepository, IStockInfoRepository stockInfoRepository, IDt_AreaInfoRepository areaInfoRepository, IDt_TaskRepository taskRepository, IDt_StationManagerRepository stationManagerRepository, ISys_ConfigService configService)
{
_logger = logger;
@@ -36,17 +30,20 @@
_stationManagerRepository = stationManagerRepository;
_configService = configService;
}
+
public Task StartAsync(CancellationToken cancellationToken)
{
_timer = new Timer(DoWork, null, 0, 10000);
return Task.CompletedTask;
}
+
private void DoWork(object state)
{
try
{
var area = _areaInfoRepository.QueryFirst(x => x.AreaCode == "GWSC1");
+ if (area == null) { return; }
var stockInfo = _stockInfoRepository.Db.Queryable<DtStockInfo>()
.Includes(x => x.LocationInfo) // 棰勫姞杞絃ocationInfo
.Includes(x => x.StockInfoDetails) // 棰勫姞杞絊tockInfoDetails
@@ -58,7 +55,6 @@
if (stockInfo.Count <= 0) return;
foreach (var item in stockInfo)
{
-
var hasTask = _taskRepository.QueryFirst(x => x.PalletCode == item.PalletCode);
if (hasTask != null)
{
@@ -76,7 +72,6 @@
task.NextAddress = "002-000-002";
// 鍒涘缓浠诲姟DTO
WMSTaskDTO taskDTO = CreateTaskDTO(task);
-
var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
@@ -97,7 +92,6 @@
_locationRepository.UpdateData(item.LocationInfo);
}
}
-
}
catch (Exception ex)
{
@@ -105,17 +99,18 @@
}
ConsoleHelper.WriteSuccessLine($"楂樻俯鍑哄簱璋冪敤锛�" + DateTime.Now.ToString());
}
+
public Task StopAsync(CancellationToken cancellationToken)
{
_logger.LogInformation("MyBackgroundService is stopping.");
_timer?.Change(Timeout.Infinite, 0);
return Task.CompletedTask;
}
+
public void Dispose()
{
_timer?.Dispose();
}
-
/// <summary>
/// 鍒涘缓浠诲姟瀹炰緥
@@ -162,4 +157,4 @@
};
}
}
-}
+}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 03f6283..dc1480b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1,5 +1,6 @@
锘縰sing Mapster;
using Masuit.Tools;
+using System.Text.RegularExpressions;
using WIDESEA_Core.Const;
using WIDESEA_DTO.MOM;
using WIDESEA_DTO.WMS;
@@ -314,6 +315,13 @@
// 鍒涘缓鍘嗗彶浠诲姟瀹炰緥妯″瀷
var taskHty = CreateHistoricalTask(task);
+ if (task.TaskType == (int)TaskInboundTypeEnum.InQuality)
+ {
+ await _locationRepository.UpdateDataAsync(locationInf);
+ await _task_HtyRepository.AddDataAsync(taskHty);
+ await BaseDal.DeleteDataAsync(task);
+ return content.OK("鍏ュ簱浠诲姟瀹屾垚鎴愬姛");
+ }
// 鏍规嵁鏄惁鏈夌粍鐩樹俊鎭垱寤哄簱瀛樺疄渚嬫ā鍨�
DtStockInfo stock = boxing == null ? CreateEmptyPalletStock(task, locationInf) : CreateFullPalletStock(task, locationInf, boxing);
@@ -431,6 +439,9 @@
AreaCode = area.AreaCode,
LocationId = loation.Id,
StockInfoDetails = boxDetail,
+ ProcessCode = boxing.ProcessCode,
+ NextProcessCode = boxing.NextProcessCode,
+ Remark = boxing.BoxingInfoDetails.Count().ToString(),
};
// 澶勭悊璇锋眰鍙傛暟
@@ -791,7 +802,7 @@
PalletCode = stock.PalletCode,
SourceAddress = input.Position,
CurrentAddress = input.Position,
- TaskState = (int)TaskInStatusEnum.InNew,
+ TaskState = stock.LocationInfo.RoadwayNo.Contains("CH") ? (int)TaskInStatusEnum.InNew : (int)TaskInStatusEnum.Line_InFinish,
TaskType = (int)TaskInboundTypeEnum.InQuality,
TaskNum = BaseDal.GetTaskNo().Result,
Creater = "System", // 淇鎷煎啓閿欒
@@ -799,12 +810,15 @@
TaskId = 0,
};
- var taskDTO = CreateTaskDTO(task);
+ var taskDTO = CreateTaskDTO(taskNew);
+ BaseDal.AddData(taskNew);
+ return content.OK(data: taskDTO);
// TODO璐ㄦ鍥炲簱
}
// 鏍规嵁浣嶇疆鏌ヨ鍖哄煙淇℃伅
- var area = await QueryAreaInfoByPosition(input.Position.Replace("-1", ""));
+ var areaCode = Regex.Replace(input.Position, @"-(\d+)", "");
+ var area = await QueryAreaInfoByPosition(areaCode);
if (area == null)
{
return content.Error("璇ョ偣浣嶄笉鍦ㄥ尯鍩熷垪琛ㄤ腑瀛樺湪");
@@ -899,7 +913,7 @@
TaskType = task.TaskType,
};
return content.OK(data: task);
- }
+ }
var stationManagers = _stationManagerRepository.QueryData(x => x.stationType == 6 && x.stationChildCode == input.Position).FirstOrDefault();
if (stationManagers == null)
@@ -1163,33 +1177,6 @@
#endregion 浠诲姟鐘舵�佹洿鏀�
- #region 鍑哄簱瑙g洏
-
- /// <summary>
- /// 鍑哄簱瑙g洏鎺ュ彛
- /// </summary>
- /// <param name="taskNum"></param>
- /// <returns></returns>
- public async Task<WebResponseContent> OutUnblockInterface(int taskNum)
- {
- WebResponseContent content = new WebResponseContent();
- try
- {
- var task = await BaseDal.QueryFirstAsync(x => x.TaskNum == taskNum);
- if (task == null)
- return content.Error("鏈壘鍒颁换鍔�");
- task.TaskState = (int)TaskOutStatusEnum.Line_OutFinish;
- var taskHty = CreateHistoricalTask(task);
- }
- catch (Exception ex)
- {
- content.Error(ex.Message);
- }
- return content;
- }
-
- #endregion 鍑哄簱瑙g洏
-
#region 鎸囧畾浠诲姟鍑哄簱
public async Task<WebResponseContent> CreateAndSendOutboundTask(string locationCode, string palletCode)
@@ -1215,8 +1202,19 @@
taskType = (int)TaskOutboundTypeEnum.OutQuality;
else
taskType = (int)TaskOutboundTypeEnum.OutTray;
- // 鍒涘缓骞舵坊鍔犱换鍔″埌鏁版嵁搴�
- task = CreateTask(stockInfo, "1020-1", taskType);
+
+ if (stockInfo.AreaCode.Contains("CH"))
+ {
+ // 鍒涘缓骞舵坊鍔犱换鍔″埌鏁版嵁搴�
+ task = CreateTask(stockInfo, "1020-1", taskType);
+ }
+ else
+ {
+ if (stockInfo.LocationInfo.RoadwayNo == "JZSC1")
+ {
+ task = CreateTask(stockInfo, "1359-4", taskType);
+ }
+ }
//var taskId = await BaseDal.AddDataAsync(task);
//if (taskId <= 0)
//{
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
index 0b56001..a66cb9b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -1,31 +1,14 @@
-锘�
-using log4net.Core;
-using Mapster;
-using Masuit.Tools;
-using Masuit.Tools.Models;
-using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
-using SixLabors.Fonts.Tables.AdvancedTypographic;
-using System.Diagnostics;
-using WIDESEA_Common;
+锘縰sing Masuit.Tools;
using WIDESEA_Core.Const;
-using WIDESEA_DTO;
using WIDESEA_DTO.MOM;
using WIDESEA_DTO.WMS;
-using WIDESEA_IStorageBasicRepository;
-using WIDESEA_IStoragIntegrationServices;
-using WIDESEA_Model.Models;
-using WIDESEA_StorageBasicRepository;
-using WIDESEA_StorageTaskRepository;
-using WIDESEA_StoragIntegrationServices;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_StorageTaskServices;
public partial class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService
{
-
#region 鍑哄簱浠诲姟瀹屾垚
-
//public async Task<WebResponseContent> CompleteStackTaskAsync(Dt_Task task, DtStockInfo stock)
//{
@@ -357,6 +340,7 @@
#endregion 浠诲姟瀹屾垚
#region 璇锋眰浠诲姟鍏ュ簱
+
/// <summary>
/// 璇锋眰鍏ュ簱
/// </summary>
@@ -391,7 +375,6 @@
}
}
-
// 璋冪敤CreateNewTask鏂规硶锛屽垱寤烘柊浠诲姟
content = await CreateNewTask(input);
}
@@ -406,7 +389,7 @@
}
/// <summary>
- ///
+ ///
/// </summary>
/// <param name="input">璇锋眰鍙傛暟</param>
/// <param name="flag">瀹炴绌烘鏍囪瘑</param>
@@ -431,7 +414,7 @@
var task = await CreateNewTaskByStation(input, stationinfo);
// 灏濊瘯娣诲姞鏂颁换鍔�
- if (task == null) return content.Error() ;
+ if (task == null) return content.Error();
var taskId = await BaseDal.AddDataAsync(task);
bool isResult = taskId > 0;
if (isResult)
@@ -450,8 +433,6 @@
TaskType = task.TaskType,
};
content.OK(data: taskDTO);
-
-
}
else
content.Error("娣诲姞浠诲姟澶辫触");
@@ -487,10 +468,10 @@
}
#region 鐩存帴鍑哄簱浠诲姟
+
private async Task<Dt_Task> CreateInToOutTaskAsync(RequestTaskDto input, Dt_StationManager stationManager)
{
//if (stationManager.stationType != 5) throw new Exception("閿欒鐨勮皟鍙�");
-
input.EquiCodeMOM = "24MEJQ11-1006-1";
@@ -590,10 +571,11 @@
return task;
}
- #endregion
+ #endregion 鐩存帴鍑哄簱浠诲姟
#region 鍏ュ簱浠诲姟
+
private async Task<Dt_Task> CreateInTaskAsync(RequestTaskDto input, Dt_StationManager stationManager)
{
if (stationManager.stationType != 1 && stationManager.stationType != 6) throw new Exception("閿欒鐨勮皟鍙�");
@@ -704,17 +686,20 @@
return task;
}
- #endregion
+
+ #endregion 鍏ュ簱浠诲姟
#region 搴撲綅鍒嗛厤
+
/// <summary>
- ///
+ ///
/// </summary>
/// <param name="requestTask">璇锋眰鍙傛暟</param>
/// <returns></returns>
private async Task<DtLocationInfo> RequestLocation(RequestTaskDto requestTask, bool isCheckRequest = false)
{
#region 鑾峰彇璐т綅
+
try
{
List<DtLocationInfo> locations;
@@ -739,9 +724,11 @@
Console.WriteLine(err.Message.ToString());
return null;
}
+
#endregion 鑾峰彇璐т綅
}
- #endregion
+
+ #endregion 搴撲綅鍒嗛厤
// 鑾峰彇宸ヨ壓鐢宠
private async Task<ProcessApplyDto> GetProcessApplyAsync(RequestTaskDto input, ResultTrayCellsStatus content)
@@ -759,7 +746,7 @@
};
}
- #endregion 璇锋眰绌烘鍑哄簱
+ #endregion 璇锋眰浠诲姟鍏ュ簱
public async Task<Dt_Task> CreateEmptyOutTaskAsync(RequestTaskDto input, Dt_StationManager stationManager)
{
@@ -798,12 +785,12 @@
}
catch (Exception ex)
{
-
throw new Exception(ex.Message);
}
}
#region 鐩存帴鍑哄簱浠诲姟瀹屾垚
+
public async Task<WebResponseContent> CompleteInToOutTaskAsync(Dt_Task task)
{
WebResponseContent content = new WebResponseContent();
@@ -822,11 +809,12 @@
return content.Error(ex.Message);
}
}
- #endregion
+ #endregion 鐩存帴鍑哄簱浠诲姟瀹屾垚
#region MyRegion
- private async Task<bool> ExecuteTransaction(DtStockInfo stock, Dt_Task_Hty taskHty, DtLocationInfo fromLocation,DtLocationInfo toLocation, int taskId)
+
+ private async Task<bool> ExecuteTransaction(DtStockInfo stock, Dt_Task_Hty taskHty, DtLocationInfo fromLocation, DtLocationInfo toLocation, int taskId)
{
_unitOfWorkManage.BeginTran();
try
@@ -864,13 +852,13 @@
throw new Exception(err.Message); // 鎶涘嚭寮傚父浠ヤ究澶栭儴鎹曡幏
}
}
- #endregion
+
+ #endregion MyRegion
#region 妫�娴嬮珮娓╁簱鏄惁鏈夊彲鍑哄簱搴撳瓨
public WebResponseContent StockCheckingAsync()
{
-
WebResponseContent webResponseContent = new WebResponseContent();
try
{
@@ -894,7 +882,6 @@
if (stockInfo.Count <= 0) continue;
foreach (var item in stockInfo)
{
-
var hasTask = BaseDal.QueryFirst(x => x.PalletCode == item.PalletCode);
if (hasTask != null)
{
@@ -912,7 +899,6 @@
task.NextAddress = "002-000-002";
// 鍒涘缓浠诲姟DTO
WMSTaskDTO taskDTO = CreateTaskDTO(task);
-
var configs = _configService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
var wmsBase = configs.FirstOrDefault(x => x.ConfigKey == SysConfigConst.WCSIPAddress)?.ConfigValue;
@@ -949,7 +935,7 @@
}
}
- #endregion
+ #endregion 妫�娴嬮珮娓╁簱鏄惁鏈夊彲鍑哄簱搴撳瓨
#region 甯告俯琛ョ┖鎵樼洏鑷冲垎瀹�
@@ -1000,6 +986,5 @@
return content;
}
- #endregion
-
+ #endregion 甯告俯琛ョ┖鎵樼洏鑷冲垎瀹�
}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
index 5eb3c43..21a8be2 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -1,21 +1,9 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection.Metadata;
-using System.Text;
-using System.Threading.Tasks;
+锘縰sing Masuit.Tools;
using WIDESEA_Core.Const;
-using WIDESEA_Core.DB.Models;
using WIDESEA_DTO.MOM;
using WIDESEA_DTO.WMS;
-using WIDESEA_DTO;
-using WIDESEA_Model.Models;
-using WIDESEA_Repository;
-using WIDESEAWCS_BasicInfoRepository;
-using Masuit.Tools;
namespace WIDESEA_StorageTaskServices;
-
public partial class Dt_TaskService : ServiceBase<Dt_Task, IDt_TaskRepository>, IDt_TaskService
{
@@ -140,14 +128,19 @@
{
case "CH01":
return "CH001";
+
case "JZ01":
return "JZ001";
+
case "GW01":
return "GWSC1";
+
case "CW01":
return "CWSC1";
+
case "CW02":
return "CWSC2";
+
default:
return string.Empty;
}
@@ -240,4 +233,4 @@
{
return await _areaInfoRepository.QueryFirstAsync(x => x.Spare1.Contains(position));
}
-}
+}
\ No newline at end of file
diff --git "a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/ExcelExport/\345\272\223\345\255\230\344\277\241\346\201\257.xlsx" "b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/ExcelExport/\345\272\223\345\255\230\344\277\241\346\201\257.xlsx"
new file mode 100644
index 0000000..f490e5c
--- /dev/null
+++ "b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/ExcelExport/\345\272\223\345\255\230\344\277\241\346\201\257.xlsx"
Binary files differ
--
Gitblit v1.9.3