新增多个库页面:常温库、分容库、高温库,并更新导航栏以包含这些新页面
已添加12个文件
已修改29个文件
已删除3个文件
1325 ■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Client/WIDESEAWCS_Client11.rar 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/dist.zip 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/package.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/api/http.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceLine.vue 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/components/DeviceStacker.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/router/redirect.js 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/AgingLibrary.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/FormationLibrary.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Staticlibrary.vue 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Twoletters.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/hightemperature.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/indexLibrary.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/Home.vue 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/charts/bigdata.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-wal 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/ConveyorLine/CommonConveyorLine.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/ExcelExport/库存信息.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/WIDESEAWCS_Client11.rar
Binary files differ
Code Management/WCS/WIDESEAWCS_Client/dist.zip
Binary files differ
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": {
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+="/";
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])">线体出库口请求</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])">线体出库口请求</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>
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 === '正常' || 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>
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'
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;
  {
    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;
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 === '正常' || 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>
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>
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>
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>
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/Volume.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<template>
    <div>
        åˆ†å®¹åº“
    </div>
</template>
<script setup>
</script>
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/hightemperature.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<template>
    <div>
        é«˜æ¸©åº“
    </div>
</template>
<script setup>
</script>
Code Management/WCS/WIDESEAWCS_Client/src/views/Devicestatus/Craftlibrary/roomtemperature.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<template>
    <div>
        å¸¸æ¸©åº“
    </div>
</template>
<script setup>
</script>
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>
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 != '正常' ? '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>线体出库口请求:</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>线体出库口请求:</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>
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>
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db
Binary files differ
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-shm
Binary files differ
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/CodeChunks.db-wal
Binary files differ
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db
Binary files differ
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
Binary files differ
Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
Binary files differ
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>
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);
        }
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);
                //记录错误信息
            }
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,9 +12,9 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"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", //策略名称
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>
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获取出库任务
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/Task/RequestInbound.cs
@@ -1,6 +1,7 @@
using 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 @@
        {
            // ä½¿ç”¨æ­£åˆ™è¡¨è¾¾å¼åŒ¹é…ç±»ä¼¼ -数字 çš„æ¨¡å¼ï¼Œå¹¶æ›¿æ¢ä¸ºç©ºå­—符串
            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
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);
                }
            }
        }
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);
                }
            }
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/CodeChunks.db
Binary files differ
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-shm
Binary files differ
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.12.31.40377/SemanticSymbols.db-wal
Binary files differ
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
                {
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs
@@ -1,4 +1,5 @@
using SqlSugar;
using 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; }
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",
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/AspNetCoreSchedule.cs
@@ -1,17 +1,10 @@
using 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) // é¢„加载LocationInfo
                     .Includes(x => x.StockInfoDetails) // é¢„加载StockInfoDetails
@@ -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 @@
            };
        }
    }
}
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1,5 +1,6 @@
using 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 å‡ºåº“解盘
    /// <summary>
    /// å‡ºåº“解盘接口
    /// </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 å‡ºåº“解盘
    #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)
            //{
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;
using 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 å¸¸æ¸©è¡¥ç©ºæ‰˜ç›˜è‡³åˆ†å®¹
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -1,21 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using 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));
    }
}
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/bin/Debug/net6.0/ExcelExport/¿â´æÐÅÏ¢.xlsx
Binary files differ