xiazhengtongxue
14 小时以前 56538e602b927c232ac5b991ef84175edd2ce3ce
feat(WMS/WCS): 增加机器人历史信息记录
fix(WMS/WCS): 修复前端bug
已添加8个文件
已修改15个文件
880 ■■■■ 文件已修改
Code/WCS/WIDESEAWCS_Client/src/api/http.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/extension/taskinfo/robotTaskHty.jsx 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/router/viewGird.js 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotTask.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotTaskHty.vue 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/UtilConvert.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoRepository/IRobotTask_HtyRepository.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/IRobotTaskService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/IRobotTask_HtyService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_RobotTask_Hty.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/RobotTaskController.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/RobotTask_HtyController.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotTaskInfoRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RobotTaskService.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RobotTask_HtyService.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/views/stock/stockChat.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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.webApiProduction;
    axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
}
else if (process.env.NODE_ENV == 'debug') {
    axios.defaults.baseURL = window.webConfig.webApiBaseUrl;
Code/WCS/WIDESEAWCS_Client/src/extension/taskinfo/robotTaskHty.jsx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
// è¯¥æ‰©å±•文件用于任务历史页面的业务扩展。
// æ–¹æ³•目的:统一预留列表查询、保存前后和弹窗打开时的扩展入口,保持与项目内 task é¡µé¢ä¸€è‡´çš„æ‰©å±•点。
// å‚数含义:由框架按生命周期传入,包含查询参数、表单数据、行数据等上下文。
// è¿”回值说明:返回 true ä»£è¡¨ç»§ç»­é»˜è®¤è¡Œä¸ºï¼Œè¿”回 false ä»£è¡¨ä¸­æ–­é»˜è®¤è¡Œä¸ºã€‚
// å¼‚常处理说明:当前未引入外部调用;若后续新增接口调用,需在方法内补充 try-catch å¹¶è®°å½•关键业务参数。
let extension = {
  components: {
    gridHeader: "",
    gridBody: "",
    gridFooter: "",
    modelHeader: "",
    modelBody: "",
    modelFooter: "",
  },
  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;
    },
    // æ–¹æ³•目的:编辑前校验或补充提交字段。
    // å‚数:formData è¡¨å•提交对象。
    // è¿”回值:true ç»§ç»­æäº¤ï¼Œfalse ç»ˆæ­¢æäº¤ã€‚
    updateBefore(formData) {
      return true;
    },
    // æ–¹æ³•目的:点击行时扩展处理。
    // å‚数:row è¡Œæ•°æ®ï¼Œcolumn åˆ—配置,event åŽŸå§‹äº‹ä»¶ã€‚
    // è¿”回值:无。
    rowClick({ row, column, event }) {},
    // æ–¹æ³•目的:编辑弹窗打开后执行扩展逻辑。
    // å‚数:row å½“前行数据。
    // è¿”回值:无。
    modelOpenAfter(row) {},
  },
};
export default extension;
Code/WCS/WIDESEAWCS_Client/src/router/viewGird.js
@@ -1,97 +1,104 @@
let viewgird = [
  {
    path: '/Sys_Log',
    name: 'sys_Log',
    component: () => import('@/views/system/Sys_Log.vue')
    path: "/Sys_Log",
    name: "sys_Log",
    component: () => import("@/views/system/Sys_Log.vue"),
  },
  {
    path: '/Sys_User',
    name: 'Sys_User',
    component: () => import('@/views/system/Sys_User.vue')
    path: "/Sys_User",
    name: "Sys_User",
    component: () => import("@/views/system/Sys_User.vue"),
  },
  {
    path: '/permission',
    name: 'permission',
    component: () => import('@/views/system/Permission.vue')
    path: "/permission",
    name: "permission",
    component: () => import("@/views/system/Permission.vue"),
  },
  {
    path: '/Sys_Dictionary',
    name: 'Sys_Dictionary',
    component: () => import('@/views/system/Sys_Dictionary.vue')
    path: "/Sys_Dictionary",
    name: "Sys_Dictionary",
    component: () => import("@/views/system/Sys_Dictionary.vue"),
  },
  {
    path: '/Sys_Role',
    name: 'Sys_Role',
    component: () => import('@/views/system/Sys_Role.vue')
    path: "/Sys_Role",
    name: "Sys_Role",
    component: () => import("@/views/system/Sys_Role.vue"),
  },
  {
    path: '/Sys_Role1',
    name: 'Sys_Role1',
    component: () => import('@/views/system/Sys_Role1.vue')
    path: "/Sys_Role1",
    name: "Sys_Role1",
    component: () => import("@/views/system/Sys_Role1.vue"),
  },
  {
    path: '/Sys_DictionaryList',
    name: 'Sys_DictionaryList',
    component: () => import('@/views/system/Sys_DictionaryList.vue')
    path: "/Sys_DictionaryList",
    name: "Sys_DictionaryList",
    component: () => import("@/views/system/Sys_DictionaryList.vue"),
  },
  {
    path: '/Sys_Tenant',
    name: 'Sys_Tenant',
    component: () => import('@/views/system/Sys_Tenant.vue')
    path: "/Sys_Tenant",
    name: "Sys_Tenant",
    component: () => import("@/views/system/Sys_Tenant.vue"),
  },
  {
    path: '/deviceInfo',
    name: 'deviceInfo',
    component: () => import('@/views/quartzJob/deviceInfo.vue')
    path: "/deviceInfo",
    name: "deviceInfo",
    component: () => import("@/views/quartzJob/deviceInfo.vue"),
  },
  {
    path: '/deviceProtocol',
    name: 'deviceProtocol',
    component: () => import('@/views/quartzJob/deviceProtocol.vue')
    path: "/deviceProtocol",
    name: "deviceProtocol",
    component: () => import("@/views/quartzJob/deviceProtocol.vue"),
  },
  {
    path: '/deviceProtocolDetail',
    name: 'deviceProtocolDetail',
    component: () => import('@/views/quartzJob/deviceProtocolDetail.vue')
    path: "/deviceProtocolDetail",
    name: "deviceProtocolDetail",
    component: () => import("@/views/quartzJob/deviceProtocolDetail.vue"),
  },
  {
    path: '/dispatchInfo',
    name: 'dispatchInfo',
    component: () => import('@/views/quartzJob/dispatchInfo.vue')
    path: "/dispatchInfo",
    name: "dispatchInfo",
    component: () => import("@/views/quartzJob/dispatchInfo.vue"),
  },
  {
    path: '/scheduler',
    name: 'scheduler',
    component: () => import('@/views/quartzJob/scheduler.vue')
  },{
    path: '/robotTask',
    name: 'robotTask',
    component: () => import('@/views/taskinfo/robotTask.vue')
    path: "/scheduler",
    name: "scheduler",
    component: () => import("@/views/quartzJob/scheduler.vue"),
  },
  {
    path: '/robotState',
    name: 'robotState',
    component: () => import('@/views/taskinfo/robotState.vue')
    path: "/robotTask",
    name: "robotTask",
    component: () => import("@/views/taskinfo/robotTask.vue"),
  },
  {
    path: '/task',
    name: 'task',
    component: () => import('@/views/taskinfo/task.vue')
  },{
    path: '/agvTask',
    name: 'agvTask',
    component: () => import('@/views/taskinfo/agvTask.vue')
    path: "/robotTaskHty",
    name: "robotTaskHty",
    component: () => import("@/views/taskinfo/robotTaskHty.vue"),
  },
  {
    path: '/taskHty',
    name: 'taskHty',
    component: () => import('@/views/taskinfo/taskHty.vue')
    path: "/robotState",
    name: "robotState",
    component: () => import("@/views/taskinfo/robotState.vue"),
  },
  {
    path: '/router',
    name: 'router',
    component: () => import('@/views/basicinfo/router.vue')
  }
    path: "/task",
    name: "task",
    component: () => import("@/views/taskinfo/task.vue"),
  },
  {
    path: "/agvTask",
    name: "agvTask",
    component: () => import("@/views/taskinfo/agvTask.vue"),
  },
  {
    path: "/taskHty",
    name: "taskHty",
    component: () => import("@/views/taskinfo/taskHty.vue"),
  },
  {
    path: "/router",
    name: "router",
    component: () => import("@/views/basicinfo/router.vue"),
  },
];
export default viewgird;
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotState.vue
@@ -12,41 +12,42 @@
export default defineComponent({
  setup() {
    const table = ref({
      key: "Id",
      key: "id",
      footer: "Foots",
      cnName: "机械手状态管理",
      name: "robotState",
      url: "/robotState/",
      sortName: "IPAddress",
      url: "/RobotState/",
      sortName: "CreateDate",
    });
    // ç¼–辑表单字段
    const editFormFields = ref({
      IPAddress: "",
      Version: "",
      IsEventSubscribed: false,
      RobotRunMode: "",
      RobotControlMode: "",
      RobotArmObject: "",
      Homed: "",
      CurrentAction: "",
      OperStatus: "",
      RobotTaskTotalNum: 0,
      IsSplitPallet: false,
      IsGroupPallet: false,
      IsInFakeBatteryMode: false,
      CurrentBatchIndex: 1,
      ChangePalletPhase: 0,
      IsScanNG: false,
      BatteryArrived: false,
      id: "",
      ipAddress: "",
      version: "",
      isEventSubscribed: false,
      robotRunMode: "",
      robotControlMode: "",
      robotArmObject: "",
      homed: "",
      currentAction: "",
      operStatus: "",
      robotTaskTotalNum: 0,
      isSplitPallet: false,
      isGroupPallet: false,
      isInFakeBatteryMode: false,
      currentBatchIndex: 1,
      changePalletPhase: 0,
      isScanNG: false,
      batteryArrived: false,
    });
    // ç¼–辑表单配置
    const editFormOptions = ref([
      [
        { title: "IP地址", field: "ipAddress", type: "string", readonly: true },
        { title: "版本号", field: "version", type: "int", readonly: true },
      ],
      // [
      //   { title: "IP地址", field: "ipAddress", type: "string", readonly: true },
      //   { title: "版本号", field: "version", type: "int", readonly: true },
      // ],
      [
        {
          title: "运行模式",
@@ -57,29 +58,46 @@
            { key: 2, value: "自动模式" },
          ],
        },
        // {
        //   title: "控制模式",
        //   field: "robotControlMode",
        //   type: "select",
        //   data: [
        //     { key: 1, value: "客户端控制" },
        //     { key: 2, value: "其他" },
        //   ],
        // },
        // {
        //   title: "手臂状态",
        //   field: "robotArmObject",
        //   type: "select",
        //   data: [
        //     { key: 0, value: "空闲" },
        //     { key: 1, value: "有物料" },
        //   ],
        // },
        {
          title: "控制模式",
          field: "robotControlMode",
          type: "select",
          title: "回零状态", field: "homed", type: "select",
          data: [
            { key: 1, value: "客户端控制" },
            { key: 2, value: "其他" },
          ],
            { key: "Homed", value: "已经回零" },
            { key: "Homing", value: "正在回零" },
          ]
        },
        {
          title: "手臂状态",
          field: "robotArmObject",
          type: "select",
          title: "当前动作", field: "currentAction", type: "select",
          data: [
            { key: 0, value: "空闲" },
            { key: 1, value: "有物料" },
          ],
            { key: "Picking", value: "正在取货" },
            { key: "Putting", value: "正在放货" },
            { key: "AllPickFinished", value: "全部取货完成" },
            { key: "AllPutFinished", value: "全部放货完成" },
            { key: "PickFinished", value: "取货完成" },
            { key: "PutFinished", value: "放货完成" },
          ]
        },
      ],
      [
        { title: "回零状态", field: "homed", type: "string" },
        { title: "当前动作", field: "currentAction", type: "string" },
        { title: "运行状态", field: "operStatus", type: "string" },
        // ],
        // [
        // { title: "运行状态", field: "operStatus", type: "string" },
      ],
      [
        { title: "任务总数", field: "robotTaskTotalNum", type: "int" },
@@ -124,42 +142,53 @@
          dataKey: "isTrue",
          data: [],
        },
        {
          title: "消息已订阅",
          field: "isEventSubscribed",
          type: "select",
          dataKey: "isTrue",
          data: [],
        },
        // {
        //   title: "消息已订阅",
        //   field: "isEventSubscribed",
        //   type: "select",
        //   dataKey: "isTrue",
        //   data: [],
        // },
      ],
    ]);
    // æœç´¢è¡¨å•字段
    const searchFormFields = ref({
      IPAddress: "",
      CurrentAction: "",
      OperStatus: "",
      ipAddress: "",
      currentAction: "",
      operStatus: "",
    });
    // æœç´¢è¡¨å•配置
    const searchFormOptions = ref([
      [
        { title: "IP地址", field: "ipAddress", type: "string" },
        { title: "IP地址", field: "ipAddress", type: "like" },
        { title: "当前动作", field: "currentAction", type: "string" },
        { title: "运行状态", field: "operStatus", type: "string" },
        {
          title: "运行状态", field: "operStatus", type: "select",
          data: [
            { key: "Picking", value: "正在取货" },
            { key: "Putting", value: "正在放货" },
            { key: "AllPickFinished", value: "全部取货完成" },
            { key: "AllPutFinished", value: "全部放货完成" },
            { key: "PickFinished", value: "取货完成" },
            { key: "PutFinished", value: "放货完成" },
          ]
        },
      ],
    ]);
    // åˆ—定义
    const columns = ref([
      { field: "ipAddress", title: "IP地址", type: "string", width: 140, align: "left" },
      { field: "id", title: "Id", type: "int", width: 90, hidden: true, readonly: true, require: true, align: "left" },
      { field: "ipAddress", title: "IP地址", type: "string", width: 160, 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: "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: "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", bind: { key: "isTrue", data: [] }, },
      { field: "isGroupPallet", title: "组盘", type: "byte", width: 60, align: "center" , bind: { key: "isTrue", data: [] }, },
@@ -168,7 +197,7 @@
      { field: "changePalletPhase", title: "换盘阶段", type: "int", width: 80, 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: [] },  },
      // { field: "isEventSubscribed", title: "已订阅", type: "byte", width: 70, align: "center", bind: { key: "isTrue", data: [] },  },
    ]);
    const detail = ref({
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotTask.vue
@@ -154,7 +154,7 @@
        field: "robotRoadway",
        title: "巷道",
        type: "string",
        width: 100,
        width: 120,
        align: "left",
      },
      {
Code/WCS/WIDESEAWCS_Client/src/views/taskinfo/robotTaskHty.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,290 @@
<template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
</template>
<script>
import extend from "@/extension/taskinfo/robotTaskHty.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "robotTaskId",           // ä¸»é”®å­—段名
      footer: "Foots",
      cnName: "机器人历史任务",      // ä¸­æ–‡åç§°
      name: "robotTaskHty",         // è¡¨å
      url: "/RobotTask_Hty/",       // API路径
      sortName: "insertTime",       // é»˜è®¤æŽ’序字段(按移入时间排序)
    });
    // ç¼–辑表单字段(历史表通常只读,但保留结构)
    const editFormFields = ref({});
    // ç¼–辑表单配置(历史表通常只读)
    const editFormOptions = ref([]);
    // æœç´¢è¡¨å•字段
    const searchFormFields = ref({
      robotTaskNum: "",
      robotRoadway: "",
      robotTaskType: "",
      robotTaskState: "",
      robotSourceAddress: "",
      robotTargetAddress: "",
      operateType: "",
      insertTime: "",
      creater: "",
      createDate: "",
    });
    // æœç´¢è¡¨å•配置(三行布局)
    const searchFormOptions = ref([
      [
        { title: "任务编号", field: "robotTaskNum", type: "int" },
        { title: "巷道", field: "robotRoadway", type: "like" },
        {
          title: "任务类型",
          field: "robotTaskType",
          type: "selectList",
          dataKey: "taskType",
          data: [],
        },
        {
          title: "任务状态",
          field: "robotTaskState",
          type: "selectList",
          dataKey: "taskState",
          data: [],
        },
      ],
      [
        { title: "来源地址", field: "robotSourceAddress", type: "like" },
        { title: "目标地址", field: "robotTargetAddress", type: "like" },
        { title: "操作类型", field: "operateType", type: "like" },
        { title: "移入历史时间", field: "insertTime", type: "datetime" },
      ],
      [
        { title: "来源线代码", field: "robotSourceAddressLineCode", type: "like" },
        { title: "目标线代码", field: "robotTargetAddressLineCode", type: "like" },
        { title: "创建人", field: "creater", type: "like" },
        { title: "创建时间", field: "createDate", type: "datetime" },
      ],
    ]);
    // åˆ—配置
    const columns = ref([
      {
        field: "robotTaskId",
        title: "历史ID",
        type: "int",
        width: 90,
        hidden: true,        // éšè—åŽ†å²è¡¨ä¸»é”®
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "sourceId",
        title: "任务号",
        type: "int",
        width: 100,
        align: "left",
      },
      {
        field: "robotTaskNum",
        title: "任务编号",
        type: "int",
        width: 100,
        align: "left",
        sortable: true,
      },
      {
        field: "robotRoadway",
        title: "巷道",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "robotTaskType",
        title: "任务类型",
        type: "int",
        width: 100,
        align: "left",
        bind: { key: "taskType", data: [] },
      },
      {
        field: "robotTaskState",
        title: "任务状态",
        type: "int",
        width: 120,
        align: "left",
        bind: { key: "taskState", data: [] },
      },
      {
        field: "robotTaskTotalNum",
        title: "任务总数",
        type: "int",
        width: 90,
        align: "left",
      },
      {
        field: "robotSourceAddress",
        title: "来源地址",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "robotTargetAddress",
        title: "目标地址",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "robotSourceAddressLineCode",
        title: "来源线体地址",
        type: "string",
        width: 130,
        align: "left",
      },
      {
        field: "robotTargetAddressLineCode",
        title: "目标线体地址",
        type: "string",
        width: 130,
        align: "left",
      },
      {
        field: "robotSourceAddressPalletCode",
        title: "来源托盘",
        type: "string",
        width: 130,
        align: "left",
      },
      {
        field: "robotTargetAddressPalletCode",
        title: "目标托盘",
        type: "string",
        width: 130,
        align: "left",
      },
      {
        field: "robotExceptionMessage",
        title: "异常信息",
        type: "string",
        width: 200,
        align: "left",
        overflow: "ellipsis",
        tooltip: true,  // é¼ æ ‡æ‚¬åœæ˜¾ç¤ºå®Œæ•´å†…容
      },
      {
        field: "robotGrade",
        title: "优先级",
        type: "int",
        width: 80,
        align: "left",
        bind: {
          key: "robotGrade",
          data: [
            { id: 1, name: "低" },
            { id: 2, name: "普通" },
            { id: 3, name: "高" },
            { id: 4, name: "紧急" },
          ],
        },
      },
      {
        field: "operateType",
        title: "操作类型",
        type: "string",
        width: 120,
        align: "left",
        sortable: true,
      },
      {
        field: "insertTime",
        title: "移入历史时间",
        type: "datetime",
        width: 170,
        align: "left",
        sortable: true,
      },
      {
        field: "robotDispatchertime",
        title: "调度时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "robotRemark",
        title: "备注",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        align: "left",
      },
    ]);
    // è¯¦æƒ…弹窗配置
    const detail = ref({
      cnName: "机器人历史任务详情",
      table: "robotTaskHty",
      key: "robotTaskId",
      sortName: "insertTime",
      columns: columns.value.filter(col => !col.hidden), // ä½¿ç”¨éžéšè—å­—段
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/Helper/UtilConvert.cs
@@ -552,9 +552,6 @@
                case HtmlElementType.notequal:
                    linqExpression = LinqExpressionType.NotEqual;
                    break;
                case HtmlElementType.notequal:
                    linqExpression = LinqExpressionType.NotEqual;
                    break;
                default:
                    linqExpression = LinqExpressionType.Equal;
                    break;
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoRepository/IRobotTask_HtyRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_IRobotTaskInfoRepository
{
    public interface IRobotTask_HtyRepository : IRepository<Dt_RobotTask_Hty>
    {
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/IRobotTaskService.cs
@@ -54,6 +54,7 @@
        /// </summary>
        public List<int> TaskRobotTypes { get; }
        public bool DeleteRobotTask(int id);
        public Dt_RobotTask? QueryRobotCraneTask(string deviceCode);
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/IRobotTask_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_ITaskInfoService
{
    public interface IRobotTask_HtyService : IService<Dt_RobotTask_Hty>
    {
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs
@@ -23,7 +23,7 @@
        /// æœºæ¢°æ‰‹ IP åœ°å€ï¼Œå”¯ä¸€ç´¢å¼•
        /// </summary>
        [SugarColumn(Length = 50, ColumnDescription = "机械手IP地址")]
        public string IPAddress { get; set; } = string.Empty;
        public string IpAddress { get; set; }
        /// <summary>
        /// ç‰ˆæœ¬å·ï¼Œç”¨äºŽä¹è§‚并发控制
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/TaskInfo/Dt_RobotTask_Hty.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Magicodes.ExporterAndImporter.Core;
using WIDESEAWCS_Core.DB.Models;
namespace WIDESEAWCS_Model.Models
{
    /// <summary>
    /// æœºå™¨äººåŽ†å²ä»»åŠ¡è¡¨å®žä½“
    /// </summary>
    [SugarTable(nameof(Dt_RobotTask_Hty), "机器人历史任务信息")]
    public class Dt_RobotTask_Hty : Dt_RobotTask, IBaseHistoryEntity
    {
        /// <summary>
        /// åŽŸè¡¨ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "原表主键")]
        [ExporterHeader(DisplayName = "原表主键")]
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "原表主键")]
        public int SourceId { get; set; }
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "操作类型")]
        [ExporterHeader(DisplayName = "操作类型")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "操作类型")]
        public string OperateType { get; set; }
        /// <summary>
        /// ç§»å…¥åŽ†å²æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "移入历史时间")]
        [ExporterHeader(DisplayName = "移入历史时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "移入历史时间")]
        public DateTime InsertTime { get; set; }
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/RobotTaskController.cs
@@ -1,17 +1,32 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_Server.Controllers.Task
{
    [Route("api/robotTask")]
    [Route("api/RobotTask")]
    [ApiController]
    public class RobotTaskController : ApiBaseController<IRobotTaskService, Dt_RobotTask>
    {
        public RobotTaskController(IRobotTaskService service) : base(service)
        {
        }
        [HttpGet, HttpPost, Route("DeleteRobotTask"), AllowAnonymous]
        public WebResponseContent DeleteRobotTask(int id)
        {
            if (Service.DeleteRobotTask(id)){
                return WebResponseContent.Instance.OK();
            }
            return WebResponseContent.Instance.Error();
        }
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/RobotTask_HtyController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_Server.Controllers.Task
{
    namespace WIDESEAWCS_WCSServer.Controllers.Task
    {
        [Route("api/RobotTask_Hty")]
        [ApiController]
        public class RobotTask_HtyController : ApiBaseController<IRobotTask_HtyService, Dt_RobotTask_Hty>
        {
            private readonly IHttpContextAccessor _httpContextAccessor;
            public RobotTask_HtyController(
                IRobotTask_HtyService service,
                IHttpContextAccessor httpContextAccessor) : base(service)
            {
                _httpContextAccessor = httpContextAccessor;
            }
        }
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs
@@ -19,7 +19,7 @@
        public Dt_RobotState? GetByIp(string ipAddress)
        {
            return Db.Queryable<Dt_RobotState>()
                .Where(x => x.IPAddress == ipAddress)
                .Where(x => x.IpAddress == ipAddress)
                .First();
        }
@@ -33,7 +33,7 @@
            var newState = new Dt_RobotState
            {
                IPAddress = ipAddress,
                IpAddress = ipAddress,
                Version = DateTime.UtcNow.Ticks,
                RobotCraneJson = JsonConvert.SerializeObject(robotCrane),
                CreateDate = DateTime.Now,
@@ -50,7 +50,7 @@
            // ä¹è§‚锁:WHERE IPAddress = @ip AND Version = @expectedVersion,版本匹配才更新
            var affectedRows = Db.Updateable<Dt_RobotState>(newState)
                .Where(x => x.IPAddress == ipAddress)
                .Where(x => x.IpAddress == ipAddress)
                .ExecuteCommand();
            return affectedRows > 0;
@@ -60,7 +60,7 @@
        {
            var state = new RobotSocketState
            {
                IPAddress = entity.IPAddress,
                IPAddress = entity.IpAddress,
                Version = entity.Version,
                IsEventSubscribed = entity.IsEventSubscribed,
                RobotRunMode = entity.RobotRunMode,
@@ -112,7 +112,7 @@
        {
            var entity = new Dt_RobotState
            {
                IPAddress = state.IPAddress,
                IpAddress = state.IPAddress,
                IsEventSubscribed = state.IsEventSubscribed,
                RobotRunMode = state.RobotRunMode,
                RobotControlMode = state.RobotControlMode,
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotTaskInfoRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_IRobotTaskInfoRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_RobotTaskInfoRepository
{
    public class RobotTask_HtyRepository : RepositoryBase<Dt_RobotTask_Hty>, IRobotTask_HtyRepository
    {
        public RobotTask_HtyRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RobotTaskService.cs
@@ -29,6 +29,7 @@
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.Utilities;
using WIDESEAWCS_DTO.Stock;
@@ -71,6 +72,23 @@
            _taskExecuteDetailService = taskExecuteDetailService;
            _logger = logger;
        }
        public override WebResponseContent DeleteData(object[] keys)
        {
            List<int> taskKeys = new List<int>();
            for (int i = 0; i < keys.Length; i++)
            {
                taskKeys.Add(Convert.ToInt32(keys[i]));
            }
            List<Dt_RobotTask> tasks = BaseDal.QueryData(x => taskKeys.Contains(x.RobotTaskId));
            BaseDal.DeleteAndMoveIntoHty(tasks, OperateTypeEnum.人工删除);
            return WebResponseContent.Instance.OK($"成功删除{tasks.Count}条数据");
        }
        public bool DeleteRobotTask(int id)
        {
            Dt_RobotTask task = BaseDal.QueryFirst(x => x.RobotTaskId == id);
            return BaseDal.DeleteAndMoveIntoHty(task, OperateTypeEnum.自动完成);
        }
        public WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO, StockDTO stockDTO)
        {
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RobotTask_HtyService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
using MapsterMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_IRobotTaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob.Service;
namespace WIDESEAWCS_TaskInfoService
{
    public class RobotTask_HtyService : ServiceBase<Dt_RobotTask_Hty, IRobotTask_HtyRepository>, IRobotTask_HtyService
    {
        private readonly IRouterService _routerService;
        private readonly IMapper _mapper;
        public RobotTask_HtyService(
            IRobotTask_HtyRepository BaseDal,
            IRouterService routerService,
            IMapper mapper) : base(BaseDal)
        {
            _routerService = routerService;
            _mapper = mapper;
        }
    }
}
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs
@@ -146,7 +146,7 @@
        /// <returns>删除是否成功</returns>
        public bool? DeleteTask(int ID)
        {
            return _robotTaskService.Repository.DeleteDataById(ID);
            return _robotTaskService.DeleteRobotTask(ID);
        }
        /// <summary>
Code/WMS/WIDESEA_WMSClient/src/views/stock/stockChat.vue
@@ -67,8 +67,8 @@
                <div v-if="selectedLocation.details && selectedLocation.details.length > 0" class="detail-table">
                    <h4>库存明细</h4>
                    <el-table :data="selectedLocation.details" border size="small" max-height="400">
                        <el-table-column prop="materielName" label="物料名称" min-width="140" show-overflow-tooltip />
                        <el-table-column prop="serialNumber" label="电芯条码" min-width="160" show-overflow-tooltip />
                        <el-table-column prop="materielName" label="物料名称" min-width="90" show-overflow-tooltip />
                        <el-table-column prop="serialNumber" label="电芯条码" min-width="180" show-overflow-tooltip />
                        <el-table-column prop="inboundOrderRowNo" label="通道号" min-width="100" show-overflow-tooltip />
                    </el-table>
                </div>
@@ -1161,13 +1161,13 @@
    selectedLocation.value = null
    // æ¸…空所有筛选条件
    filterStockStatus.value = null
    filterMaterielCode.value = null
    filterBatchNo.value = null
    // filterStockStatus.value = null
    // filterMaterielCode.value = null
    // filterBatchNo.value = null
    // æ¸…空筛选选项列表
    materielCodeList.value = []
    batchNoList.value = []
    // // æ¸…空筛选选项列表
    // materielCodeList.value = []
    // batchNoList.value = []
    // åŠ è½½æ–°ä»“åº“æ•°æ®
    await loadWarehouseData(warehouseId)
@@ -1375,7 +1375,7 @@
}
.detail-content {
    padding: 20px;
    padding: 10px;
}
.detail-table {
Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
@@ -1,16 +1,7 @@
<template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :tableExpand="tableExpand"
    :extend="extend"
  >
  <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
    :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
    :table="table" :tableExpand="tableExpand" :extend="extend">
  </view-grid>
</template>
@@ -30,6 +21,7 @@
  palletCode: "托盘编号",
  stockStatus: "库存状态",
  locationCode: "货位编号",
  outboundDate: "出库时间",
  warehouse: "仓库",
  creator: "创建人",
  createDate: "创建时间",
@@ -112,7 +104,7 @@
        field: "palletCode",
        title: TEXT.palletCode,
        type: "string",
        width: 120,
        width: 150,
        align: "left",
      },
      {
@@ -132,10 +124,17 @@
        bind: { key: "mesUploadStatusEnum", data: [] },
      },
      {
        field: "outboundDate",
        title: TEXT.outboundDate,
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "locationCode",
        title: TEXT.locationCode,
        type: "string",
        width: 150,
        width: 120,
        align: "left",
      },
      {
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -262,7 +262,7 @@
                    if (stockInfo.Details != null && stockInfo.Details.Any())
                    {
                        item.StockQuantity = stockInfo.Details.Sum(d => d.StockQuantity);
                        item.OutboundDate = stockInfo.OutboundDate;
                        // èŽ·å–ç¬¬ä¸€ä¸ªæ˜Žç»†çš„ç‰©æ–™ä¿¡æ¯ï¼ˆå¦‚æžœå­˜åœ¨ï¼‰
                        var firstDetail = stockInfo.Details.FirstOrDefault();
                        if (firstDetail != null)
@@ -278,6 +278,7 @@
                            Id = d.Id,
                            MaterielCode = d.MaterielCode,
                            MaterielName = d.MaterielName,
                            SerialNumber = d.SerialNumber,
                            BatchNo = d.BatchNo,
                            StockQuantity = d.StockQuantity,
                            Unit = d.Unit,