wanshenmean
6 小时以前 fcf0f53de620c6f3c6218e59dbdeff01fda4eb3b
fix: 修复WCS和WMS系统中的多个问题

修复WCS客户端开发环境API配置错误
在groupPalle.vue中添加MES状态列显示
调整GW_1首放入库时效从16小时改为24小时
修正RelocationTaskFlowService中成功通知的返回状态
优化RobotSimpleCommandHandler中的状态通知逻辑
简化ConveyorLineNewJob中的条件判断
调整日志级别配置从Information降为Warning
修复RobotWorkflowOrchestrator中的条码生成顺序
优化RobotMessageHandler中的消息处理逻辑
更新WMS数据库连接字符串为生产环境IP
修复OutboundTaskFlowService中的空托盘出库逻辑
优化robotState.jsx中的方法注释和结构
调整stockInfo.jsx中的按钮显示逻辑
恢复groupPalle.jsx中的托盘绑定/解绑功能
完善robotState.vue中的列绑定配置
已修改20个文件
421 ■■■■ 文件已修改
Code/.omc/state/last-tool-error.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/.omc/state/mission-state.json 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/.omc/state/subagent-tracking.json 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/api/http.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/extension/taskinfo/robotState.jsx 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue 46 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotSimpleCommandHandler.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/stock/groupPalle.jsx 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/views/stock/groupPalle.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/Constants/OutboundTimeConstants.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Inbound.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Tray.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/.omc/state/last-tool-error.json
@@ -1,7 +1,7 @@
{
  "tool_name": "Bash",
  "tool_input_preview": "{\"command\":\"cd \\\"D:/Git/ShanMeiXinNengYuan/Code\\\" && dotnet build WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln 2>&1\",\"timeout\":120000,\"description\":\"Build WCS solution to verify compilation\"}",
  "error": "Exit code 1\n  正在确定要还原的项目…\r\n  所有项目均是最新的,无法还原。\r\n  WIDESEAWCS_Common -> D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Common\\bin\\Debug\\net8.0\\WIDESEAWCS_Common.dll\r\n  WIDESEAWCS_Communicator -> D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Communicator\\bin\\Debug\\net8.0\\WIDESEAWCS_Communicator.dll\r\n  WIDESEAWCS_Core -> D:\\Git\\ShanMeiXinNengYuan\\Code\\WCS\\WIDESEAWCS_Server\\WIDESEAWCS_Core\\bin\\Debug\\net8.0\\WIDESEAWCS_Core.dll\r\n  WIDESEAWCS_Model -> D:\\Git\\ShanMeiXinN...",
  "timestamp": "2026-04-21T09:39:52.122Z",
  "retry_count": 1
  "tool_input_preview": "{\"command\":\"cd \\\"D:/Git/ShanMeiXinNengYuan/Code\\\" && git show 556ce5b --no-stat -p\",\"description\":\"Show full diff for commit 556ce5b (StackerCraneTaskSelector call)\"}",
  "error": "Exit code 128\nfatal: unrecognized argument: --no-stat",
  "timestamp": "2026-04-22T07:58:02.431Z",
  "retry_count": 3
}
Code/.omc/state/mission-state.json
@@ -1,5 +1,5 @@
{
  "updatedAt": "2026-04-21T11:39:09.598Z",
  "updatedAt": "2026-04-22T08:00:38.578Z",
  "missions": [
    {
      "id": "session:9007b9ea-1eb6-4d24-8fe7-2c3a949eac88:none",
@@ -2357,15 +2357,15 @@
      "name": "none",
      "objective": "Session mission",
      "createdAt": "2026-04-21T08:05:57.739Z",
      "updatedAt": "2026-04-21T11:39:09.598Z",
      "updatedAt": "2026-04-22T08:00:38.578Z",
      "status": "done",
      "workerCount": 9,
      "workerCount": 13,
      "taskCounts": {
        "total": 9,
        "total": 13,
        "pending": 0,
        "blocked": 0,
        "inProgress": 0,
        "completed": 9,
        "completed": 13,
        "failed": 0
      },
      "agents": [
@@ -2458,64 +2458,80 @@
          "latestUpdate": "completed",
          "completedSummary": null,
          "updatedAt": "2026-04-21T09:39:25.226Z"
        },
        {
          "name": "general-purpose:a40e637",
          "role": "general-purpose",
          "ownership": "a40e637b5ac0356a8",
          "status": "done",
          "currentStep": null,
          "latestUpdate": "completed",
          "completedSummary": null,
          "updatedAt": "2026-04-22T07:54:17.803Z"
        },
        {
          "name": "general-purpose:adcf684",
          "role": "general-purpose",
          "ownership": "adcf684708494b341",
          "status": "done",
          "currentStep": null,
          "latestUpdate": "completed",
          "completedSummary": null,
          "updatedAt": "2026-04-22T07:54:49.075Z"
        },
        {
          "name": "general-purpose:a4a7781",
          "role": "general-purpose",
          "ownership": "a4a778186b3c312c8",
          "status": "done",
          "currentStep": null,
          "latestUpdate": "completed",
          "completedSummary": null,
          "updatedAt": "2026-04-22T07:57:05.481Z"
        },
        {
          "name": "general-purpose:a70a5d0",
          "role": "general-purpose",
          "ownership": "a70a5d0efcc81d263",
          "status": "done",
          "currentStep": null,
          "latestUpdate": "completed",
          "completedSummary": null,
          "updatedAt": "2026-04-22T08:00:38.578Z"
        }
      ],
      "timeline": [
        {
          "id": "session-start:afb9663c306b7ffb2:2026-04-21T09:36:45.991Z",
          "at": "2026-04-21T09:36:45.991Z",
          "id": "session-start:a4a778186b3c312c8:2026-04-22T07:55:43.614Z",
          "at": "2026-04-22T07:55:43.614Z",
          "kind": "update",
          "agent": "general-purpose:afb9663",
          "detail": "started general-purpose:afb9663",
          "sourceKey": "session-start:afb9663c306b7ffb2"
          "agent": "general-purpose:a4a7781",
          "detail": "started general-purpose:a4a7781",
          "sourceKey": "session-start:a4a778186b3c312c8"
        },
        {
          "id": "session-stop:afb9663c306b7ffb2:2026-04-21T09:37:29.377Z",
          "at": "2026-04-21T09:37:29.377Z",
          "id": "session-stop:a4a778186b3c312c8:2026-04-22T07:57:05.481Z",
          "at": "2026-04-22T07:57:05.481Z",
          "kind": "completion",
          "agent": "general-purpose:afb9663",
          "agent": "general-purpose:a4a7781",
          "detail": "completed",
          "sourceKey": "session-stop:afb9663c306b7ffb2"
          "sourceKey": "session-stop:a4a778186b3c312c8"
        },
        {
          "id": "session-start:a5387bf0397247d5c:2026-04-21T09:37:41.613Z",
          "at": "2026-04-21T09:37:41.613Z",
          "id": "session-start:a70a5d0efcc81d263:2026-04-22T07:57:26.976Z",
          "at": "2026-04-22T07:57:26.976Z",
          "kind": "update",
          "agent": "code-reviewer:a5387bf",
          "detail": "started code-reviewer:a5387bf",
          "sourceKey": "session-start:a5387bf0397247d5c"
          "agent": "general-purpose:a70a5d0",
          "detail": "started general-purpose:a70a5d0",
          "sourceKey": "session-start:a70a5d0efcc81d263"
        },
        {
          "id": "session-stop:a5387bf0397247d5c:2026-04-21T09:39:25.226Z",
          "at": "2026-04-21T09:39:25.226Z",
          "id": "session-stop:a70a5d0efcc81d263:2026-04-22T08:00:38.578Z",
          "at": "2026-04-22T08:00:38.578Z",
          "kind": "completion",
          "agent": "code-reviewer:a5387bf",
          "agent": "general-purpose:a70a5d0",
          "detail": "completed",
          "sourceKey": "session-stop:a5387bf0397247d5c"
        },
        {
          "id": "session-stop:a93c9aa6de8251ecb:2026-04-21T09:43:18.886Z",
          "at": "2026-04-21T09:43:18.886Z",
          "kind": "completion",
          "agent": "general-purpose:adfd244",
          "detail": "completed",
          "sourceKey": "session-stop:a93c9aa6de8251ecb"
        },
        {
          "id": "session-stop:a34767c74aa84d9d8:2026-04-21T11:30:52.701Z",
          "at": "2026-04-21T11:30:52.701Z",
          "kind": "completion",
          "agent": "general-purpose:adfd244",
          "detail": "completed",
          "sourceKey": "session-stop:a34767c74aa84d9d8"
        },
        {
          "id": "session-stop:aecf873500f38d936:2026-04-21T11:39:09.598Z",
          "at": "2026-04-21T11:39:09.598Z",
          "kind": "completion",
          "agent": "general-purpose:adfd244",
          "detail": "completed",
          "sourceKey": "session-stop:aecf873500f38d936"
          "sourceKey": "session-stop:a70a5d0efcc81d263"
        }
      ]
    }
Code/.omc/state/subagent-tracking.json
@@ -1535,10 +1535,46 @@
      "status": "completed",
      "completed_at": "2026-04-21T09:39:25.224Z",
      "duration_ms": 103611
    },
    {
      "agent_id": "a40e637b5ac0356a8",
      "agent_type": "general-purpose",
      "started_at": "2026-04-22T07:53:22.787Z",
      "parent_mode": "none",
      "status": "completed",
      "completed_at": "2026-04-22T07:54:17.801Z",
      "duration_ms": 55014
    },
    {
      "agent_id": "adcf684708494b341",
      "agent_type": "general-purpose",
      "started_at": "2026-04-22T07:53:22.841Z",
      "parent_mode": "none",
      "status": "completed",
      "completed_at": "2026-04-22T07:54:49.074Z",
      "duration_ms": 86233
    },
    {
      "agent_id": "a4a778186b3c312c8",
      "agent_type": "general-purpose",
      "started_at": "2026-04-22T07:55:43.614Z",
      "parent_mode": "none",
      "status": "completed",
      "completed_at": "2026-04-22T07:57:05.479Z",
      "duration_ms": 81865
    },
    {
      "agent_id": "a70a5d0efcc81d263",
      "agent_type": "general-purpose",
      "started_at": "2026-04-22T07:57:26.976Z",
      "parent_mode": "none",
      "status": "completed",
      "completed_at": "2026-04-22T08:00:38.576Z",
      "duration_ms": 191600
    }
  ],
  "total_spawned": 144,
  "total_completed": 166,
  "total_spawned": 147,
  "total_completed": 170,
  "total_failed": 0,
  "last_updated": "2026-04-21T13:08:04.028Z"
  "last_updated": "2026-04-22T08:00:38.695Z"
}
Code/WCS/WIDESEAWCS_Client/src/api/http.js
@@ -12,7 +12,7 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
    axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
    axios.defaults.baseURL = window.webConfig.webApiProduction;
}
else if (process.env.NODE_ENV == 'debug') {
    axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
Code/WCS/WIDESEAWCS_Client/src/extension/taskinfo/robotState.jsx
@@ -12,42 +12,52 @@
  tableAction: "",
  buttons: { view: [], box: [], detail: [] },
  methods: {
    // 方法目的:页面初始化时执行自定义逻辑。
    // 参数:无。
    // 返回值:无。
    onInit() {},
    // 方法目的:页面初始化完成后执行自定义逻辑。
    // 参数:无。
    // 返回值:无。
    onInited() {},
    // 方法目的:查询前处理查询条件。
    // 参数:param 查询参数对象。
    // 返回值:true 继续查询,false 终止查询。
    searchBefore(param) {
      return true;
    },
    // 方法目的:查询后处理返回结果。
    // 参数:result 后端返回数据。
    // 返回值:true 继续渲染,false 终止后续处理。
    searchAfter(result) {
      return true;
    },
    // 方法目的:新增前校验或补充提交字段。
    // 参数:formData 表单提交对象。
    // 返回值:true 继续提交,false 终止提交。
    addBefore(formData) {
      return true;
    },
    addAfter(result) {
      return true;
    },
    // 方法目的:编辑前校验或补充提交字段。
    // 参数:formData 表单提交对象。
    // 返回值:true 继续提交,false 终止提交。
    updateBefore(formData) {
      return true;
    },
    updateAfter(result) {
      return true;
    },
    // 方法目的:点击行时扩展处理。
    // 参数:row 行数据,column 列配置,event 原始事件。
    // 返回值:无。
    rowClick({ row, column, event }) {},
    deleteBefore(ids) {
      return true;
    },
    deleteAfter(ids) {
      return true;
    },
    // 方法目的:编辑弹窗打开后执行扩展逻辑。
    // 参数:row 当前行数据。
    // 返回值:无。
    modelOpenAfter(row) {},
  },
};
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue
@@ -1,15 +1,7 @@
<template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
    :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
    :table="table" :extend="extend">
  </view-grid>
</template>
@@ -150,24 +142,30 @@
    const columns = ref([
      { field: "ipAddress", title: "IP地址", type: "string", width: 140, align: "left" },
      { field: "version", title: "版本", type: "int", width: 80, align: "left" },
      { field: "robotRunMode", title: "运行模式", type: "int", width: 100, bind: { key: "robotRunMode", data: [{ key: 1, value: "手动模式" },{ key: 2, value: "自动模式" }] }, align: "center" },
      { field: "robotControlMode", title: "控制模式", type: "int", width: 100, bind: { key: "robotControlMode", data: [{ key: 1, value: "客户端控制" },{ key: 2, value: "其他" }] }, align: "center" },
      { field: "robotArmObject", title: "手臂状态", type: "int", width: 90, bind: { key: "robotArmObject", data: [{ key: 0, value: "空闲"}, { key: 1, value: "有物料" }] }, align: "center" },
      { field: "homed", title: "回零状态", type: "string", width: 100, align: "center" },
      { field: "currentAction", title: "当前动作", type: "string", width: 100, align: "center" },
      { field: "operStatus", title: "运行状态", type: "string", width: 100, align: "center" },
      { field: "robotRunMode", title: "运行模式", type: "int", width: 100, bind: { key: "robotRunMode", data: [{ key: 1, value: "手动模式" }, { key: 2, value: "自动模式" }] }, align: "center" },
      { field: "robotControlMode", title: "控制模式", type: "int", width: 100, bind: { key: "robotControlMode", data: [{ key: 1, value: "客户端控制" }, { key: 2, value: "其他" }] }, align: "center" },
      { field: "robotArmObject", title: "手臂状态", type: "int", width: 90, bind: { key: "robotArmObject", data: [{ key: 0, value: "空闲" }, { key: 1, value: "有物料" }] }, align: "center" },
      { field: "homed", title: "回零状态", type: "string", width: 100, align: "center", bind: { key: "homed", data: [{ key: "Homed", value: "回零" }, { key: "Homing", value: "回零中" }] }, },
      { field: "currentAction", title: "当前动作", type: "string", width: 100, align: "center", bind: { key: "currentAction", data: [{ key: "Picking", value: "正在取货" }, { key: "Putting", value: "正在放货" }, { key: "AllPickFinished", value: "全部取货完成" }, { key: "AllPutFinished", value: "全部放货完成" }, { key: "PickFinished", value: "取货完成" }, { key: "PutFinished", value: "放货完成" }] }, },
      { field: "operStatus", title: "运行状态", type: "string", width: 100, align: "center", hidden: true },
      { field: "robotTaskTotalNum", title: "任务总数", type: "int", width: 90, align: "center" },
      { field: "isSplitPallet", title: "拆盘", type: "byte", width: 60, align: "center" },
      { field: "isGroupPallet", title: "组盘", type: "byte", width: 60, align: "center" },
      { field: "isInFakeBatteryMode", title: "假电芯", type: "byte", width: 70, align: "center" },
      { field: "isSplitPallet", title: "拆盘", type: "byte", width: 60, align: "center", bind: { key: "isTrue", data: [] }, },
      { field: "isGroupPallet", title: "组盘", type: "byte", width: 60, align: "center" , bind: { key: "isTrue", data: [] }, },
      { field: "isInFakeBatteryMode", title: "假电芯", type: "byte", width: 70, align: "center" , bind: { key: "isTrue", data: [] }, },
      { field: "currentBatchIndex", title: "批次", type: "int", width: 60, align: "center" },
      { field: "changePalletPhase", title: "换盘阶段", type: "int", width: 80, align: "center" },
      { field: "isScanNG", title: "扫码NG", type: "byte", width: 80, align: "center" },
      { field: "batteryArrived", title: "电芯到位", type: "byte", width: 80, align: "center" },
      { field: "isEventSubscribed", title: "已订阅", type: "byte", width: 70, align: "center" },
      { field: "isScanNG", title: "扫码NG", type: "byte", width: 80, align: "center" , bind: { key: "isTrue", data: [] }, },
      { field: "batteryArrived", title: "电芯到位", type: "byte", width: 80, align: "center" , bind: { key: "isTrue", data: [] }, },
      { field: "isEventSubscribed", title: "已订阅", type: "byte", width: 70, align: "center", bind: { key: "isTrue", data: [] },  },
    ]);
    const detail = ref({});
    const detail = ref({
      cnName: "",
      table: "",
      columns: [],
      sortName: "",
      key: "",
    });
    return {
      table,
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -4,15 +4,15 @@
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Information",
        "Microsoft.AspNetCore": "Information",
        "Microsoft.AspNetCore.Routing": "Information",
        "Microsoft.AspNetCore.Mvc": "Information",
        "Microsoft.AspNetCore.Mvc.Infrastructure": "Information",
        "Microsoft.AspNetCore.Mvc.Filters": "Information",
        "Microsoft.AspNetCore.Mvc.ModelBinding": "Information",
        "Microsoft.EntityFrameworkCore": "Information",
        "Quartz": "Debug"
        "Microsoft": "Warning",
        "Microsoft.AspNetCore": "Warning",
        "Microsoft.AspNetCore.Routing": "Warning",
        "Microsoft.AspNetCore.Mvc": "Warning",
        "Microsoft.AspNetCore.Mvc.Infrastructure": "Warning",
        "Microsoft.AspNetCore.Mvc.Filters": "Warning",
        "Microsoft.AspNetCore.Mvc.ModelBinding": "Warning",
        "Microsoft.EntityFrameworkCore": "Warning",
        "Quartz": "Warning"
      }
    }
  },
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
@@ -83,6 +83,7 @@
        /// <returns>推进结果。</returns>
        public WebResponseContent MoveToNextStatus([NotNull] Dt_Task task)
        {
            WebResponseContent content = new WebResponseContent();
            if (task.TaskStatus >= (int)TaskOutStatusEnum.OutFinish)
                return WebResponseContent.Instance.Error($"该任务状态不可跳转到下一步,任务号:【{task.TaskNum}】,任务状态:【{task.TaskStatus}】");
@@ -92,12 +93,13 @@
            if (task.TaskStatus == (int)TaskOutStatusEnum.Line_OutFinish && task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
            {
                return WebResponseContent.Instance.OK();
                return GetWMSOutboundTrayTask(task);
            }
            if (task.TaskStatus == (int)TaskOutStatusEnum.Line_OutFinish && task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty)
            {
                return _robotTaskService.GetWMSRobotTask(task);
                 _robotTaskService.GetWMSRobotTask(task);
                //if (!content.Status)
                //{
                //    return content;
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs
@@ -95,7 +95,7 @@
                return content.Error($"通知WMS系统堆垛机移库完成失败,任务号:【{task.TaskNum}】,托盘号:【{task.PalletCode}】,错误信息:【{result.Message}】");
            }
            return content.Error($"通知WMS系统堆垛机移库完成成功,任务号:【{task.TaskNum}】,托盘号:【{task.PalletCode}】");
            return content.OK($"通知WMS系统堆垛机移库完成成功,任务号:【{task.TaskNum}】,托盘号:【{task.PalletCode}】");
        }
        /// <summary>
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -275,7 +275,7 @@
                                    ProcessTaskState(conveyorLine, command, task, childDeviceCode);
                                    return Task.CompletedTask;
                                }
                                else if (command.TaskNo == 1 && !command.Barcode.IsNullOrEmpty() && childDeviceCode == "11068")
                                else if (!command.Barcode.IsNullOrEmpty() && childDeviceCode == "11068")
                                {
                                    if (_robotTaskService.Db.Queryable<Dt_RobotTask>().Any(x => x.RobotTargetAddressPalletCode == command.Barcode))
                                    {
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotMessageHandler.cs
@@ -112,12 +112,12 @@
            // 简单命令包括:homing、homed、running、pausing、runmode、controlmode 等
            if (await _simpleCommandHandler.HandleAsync(messageLower, state))
            {
                if (messageLower != "batteryarrived")
                {
                    // 处理成功后,将原消息回写到客户端(保持原有行为)
                    await _socketClientGateway.SendMessageAsync(client, message);
                    QuartzLogHelper.LogInfo(_logger, $"发送消息:【{message}】", state.RobotCrane?.DeviceName);
                }
                //if (messageLower != "batteryarrived")
                //{
                // 处理成功后,将原消息回写到客户端(保持原有行为)
                //await _socketClientGateway.SendMessageAsync(client, message);
                QuartzLogHelper.LogInfo(_logger, $"接收到消息消息【{message}】,约定不返回发送消息:【{message}】", state.RobotCrane?.DeviceName);
                //}
                // 安全更新状态到数据库
                _stateManager.TryUpdateStateSafely(state.IPAddress, state);
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotSimpleCommandHandler.cs
@@ -96,6 +96,8 @@
                // 机器人已完成回零
                case "homed":
                    state.Homed = "Homed";
                    await _socketClientGateway.SendToClientAsync(state.IPAddress, "Homed");
                    return true;
                // 机器人正在运行
@@ -136,6 +138,8 @@
                // 是否电芯到位
                case "batteryarrivedno":
                    state.BatteryArrived = false;
                    await _socketClientGateway.SendToClientAsync(state.IPAddress, "batteryarrivedno");
                    return true;
                // ==================== 全部完成命令 ====================
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/Workflow/RobotWorkflowOrchestrator.cs
@@ -327,11 +327,12 @@
                // 检查电池是否已到位
                if (!stateForUpdate.BatteryArrived)
                {
                    QuartzLogHelper.LogError(_logger, $"HandlePutFinishedStateAsync:电芯未到位,任务号: {task.RobotTaskNum}", stateForUpdate?.RobotCrane?.DeviceName ?? ipAddress);
                    return;
                }
                // 读取线体电芯条码
                string trayBarcode1 = RobotBarcodeGenerator.GenerateTrayBarcode("DB40.990");
                string trayBarcode2 = RobotBarcodeGenerator.GenerateTrayBarcode("DB40.1020");
                string trayBarcode2 = RobotBarcodeGenerator.GenerateTrayBarcode("DB40.990");
                string trayBarcode1 = RobotBarcodeGenerator.GenerateTrayBarcode("DB40.1020");
                // 如果条码生成成功
                if (!string.IsNullOrEmpty(trayBarcode1) && !string.IsNullOrEmpty(trayBarcode2))
Code/WMS/WIDESEA_WMSClient/src/extension/stock/groupPalle.jsx
@@ -1,10 +1,11 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import RobotSelect from './extend/RobotSelect.vue';
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridBody: RobotSelect,
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
@@ -28,72 +29,28 @@
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleInbound(row); }}
              >进站</el-button>
                onClick={($e) => { this.handleBind(row); }}
              >绑定</el-button>
              <el-button
                type="success"
                size="small"
                style="margin-left: 8px"
                onClick={($e) => { this.handleOutbound(row); }}
              >出站</el-button>
                onClick={($e) => { this.handleUnbind(row); }}
              >解绑</el-button>
            </div>
          );
        }
      });
    },
    // 托盘进站操作
    async handleInbound(row) {
      try {
        await this.$confirm(`确认执行托盘进站操作?\n托盘编号:${row.palletCode}`, "进站确认", {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
        const result = await this.http.post("/api/StockInfo/inboundInContainer", {
          palletCode: row.palletCode,
          stockId: row.id
        }, "正在调用MES接口...");
        if (result.status) {
          this.$Message.success(result.message || "托盘进站成功");
          this.$refs.table.load();
        } else {
          this.$error(result.message || "托盘进站失败");
        }
      } catch (error) {
        if (error !== "cancel") {
          this.$error(error.message || "网络错误,请稍后重试");
        }
      }
    // 托盘组盘操作
    handleBind(row) {
      this.$refs.gridBody.open('bind', row);
    },
    // 托盘出站操作
    async handleOutbound(row) {
      try {
        await this.$confirm(`确认执行托盘出站操作?\n托盘编号:${row.palletCode}`, "出站确认", {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
        const result = await this.http.post("/api/StockInfo/outboundInContainer", {
          palletCode: row.palletCode,
          stockId: row.id
        }, "正在调用MES接口...");
        if (result.status) {
          this.$Message.success(result.message || "托盘出站成功");
          this.$refs.table.load();
        } else {
          this.$error(result.message || "托盘出站失败");
        }
      } catch (error) {
        if (error !== "cancel") {
          this.$error(error.message || "网络错误,请稍后重试");
        }
      }
    // 托盘拆盘操作
    handleUnbind(row) {
      this.$refs.gridBody.open('unbind', row);
    },
    onInited() {
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -1,11 +1,10 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import RobotSelect from './extend/RobotSelect.vue';
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: RobotSelect,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: "",
@@ -26,11 +25,7 @@
        render: (h, { row, column, index }) => {
          return (
            <div>
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleBind(row); }}
              >绑定</el-button>
              <el-button
                type="primary"
                size="small"
@@ -42,22 +37,12 @@
                style="margin-left: 8px"
                onClick={($e) => { this.handleOutbound(row); }}
              >出站</el-button>
              <el-button
                type="success"
                size="small"
                style="margin-left: 8px"
                onClick={($e) => { this.handleUnbind(row); }}
              >解绑</el-button>
            </div>
          );
        },
      });
    },
    // 托盘组盘操作
    handleBind(row) {
      this.$refs.gridBody.open('bind', row);
    },
    // 托盘进站操作
    async handleInbound(row) {
@@ -129,10 +114,6 @@
      }
    },
    // 托盘拆盘操作
    handleUnbind(row) {
      this.$refs.gridBody.open('unbind', row);
    },
    onInited() {
      // 框架初始化配置后
Code/WMS/WIDESEA_WMSClient/src/views/stock/groupPalle.vue
@@ -123,6 +123,15 @@
        align: "left",
        bind: { key: "stockStatusEmun", data: [] },
      },
      {
        field: "mesUploadStatus",
        title: "MES状态",
        type: "int",
        width: 120,
        align: "left",
        bind: { key: "mesUploadStatusEnum", data: [] },
      },
    //   {
    //     field: "locationCode",
    //     title: TEXT.locationCode,
Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/Constants/OutboundTimeConstants.cs
@@ -27,9 +27,9 @@
    public static class OutboundTimeConstants
    {
        /// <summary>
        /// GW_1首放入库时效(16小时)
        /// GW_1首放入库时效(24小时)
        /// </summary>
        public const int OUTBOUND_HOURS_GW1_FIRST = 16;
        public const int OUTBOUND_HOURS_GW1_FIRST = 24;
        /// <summary>
        /// GW_1二放入库时效(24小时)
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Inbound.cs
@@ -188,7 +188,7 @@
                            EquipmentCode = equipmentCode,
                            ResourceCode = resourceCode,
                            LocalTime = DateTime.Now,
                            ContainerCode = taskDto.PalletCode
                            ContainerCode = taskDto.PalletCode,
                        };
                        string requestJson = inboundRequest.ToJson();
                        var palletCode = taskDto.PalletCode;
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Tray.cs
@@ -151,10 +151,10 @@
        {
            try
            {
                var task = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode);
                if (task == null) return WebResponseContent.Instance.Error("未找到对应的任务");
                //var task = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode);
                //if (task == null) return WebResponseContent.Instance.Error("未找到对应的任务");
                var location = await _locationInfoService.GetLocationInfo(task.Roadway, task.SourceAddress);
                var location = await _locationInfoService.GetLocationInfo(taskDto.Roadway, taskDto.SourceAddress);
                if (location == null) return WebResponseContent.Instance.Error("未找到对应的货位");
                var stockInfo = await _stockInfoService.GetStockInfoAsync(taskDto.PalletCode);
@@ -168,23 +168,22 @@
                    location.LocationStatus = LocationStatusEnum.Free.GetHashCode();
                    task.TaskStatus = TaskOutStatusEnum.OutFinish.GetHashCode();
                    var updateLocationResult = await _locationInfoService.UpdateLocationInfoAsync(location);
                    var updateStockResult = await _stockInfoService.UpdateStockAsync(stockInfo);
                    if (!updateLocationResult || !updateStockResult)
                        return WebResponseContent.Instance.Error("任务完成失败");
                    var saveTaskHistoryResult = await SaveTaskHistoryAsync(task, "空托盘出库完成");
                    if (!saveTaskHistoryResult.Status)
                        return saveTaskHistoryResult;
                    //var saveTaskHistoryResult = await SaveTaskHistoryAsync(task, "空托盘出库完成");
                    //if (!saveTaskHistoryResult.Status)
                    //    return saveTaskHistoryResult;
                    var saveStockHistoryResult = await SaveStockHistoryAsync(stockInfo, "空托盘出库完成");
                    if (!saveStockHistoryResult.Status)
                        return saveStockHistoryResult;
                    var deleteResult = await BaseDal.DeleteDataAsync(task);
                    if (!deleteResult) return WebResponseContent.Instance.Error("任务完成失败");
                    //var deleteResult = await BaseDal.DeleteDataAsync(task);
                    //if (!deleteResult) return WebResponseContent.Instance.Error("任务完成失败");
                    return WebResponseContent.Instance.OK("任务完成");
                });
Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -34,7 +34,7 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_ShanMei;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.60.30;Initial Catalog=WIDESEAWMS_ShanMei;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_ShanMei;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //旧WMS数据库连接