wangxinhui
2025-12-01 e3cfda747bd53f4550904d60cd13aa8f4e525739
更新WMS接口等
已添加6个文件
已修改22个文件
937 ■■■■ 文件已修改
项目代码/WCSClient/package-lock.json 174 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/api/http.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/extension/basicinfo/locationInfo.js 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/router/viewGird.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/Home.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/basicinfo/locationInfo.vue 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/taskinfo/task.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/taskinfo/task_hty.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskExecuteDetailService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile4.pubxml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs 148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService_Operate.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/AGV/AGVExtend.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineDBName.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineJob2.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/AGV通信文档/WMS输送线对接协议251126.xls 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/AGV通信文档/输送拣选和站台编号.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/一期对接相关资料/一期Ip.png 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/一期对接相关资料/哈尔滨一期输送线对接协议modbusTcp协议V1.1.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/一期对接相关资料/瑞意博部署接口文档.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/一期对接相关资料/电子标签接口文档.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口汇总文件/WMS接口对接文档_V1.1.3.docx 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCSClient/package-lock.json
@@ -1278,11 +1278,6 @@
        "fastq": "^1.6.0"
      }
    },
    "@popperjs/core": {
      "version": "npm:@sxzz/popperjs-es@2.11.7",
      "resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
    },
    "@soda/friendly-errors-webpack-plugin": {
      "version": "1.8.0",
      "resolved": "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.8.0.tgz?cache=0&sync_timestamp=1607927406873&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40soda%2Ffriendly-errors-webpack-plugin%2Fdownload%2F%40soda%2Ffriendly-errors-webpack-plugin-1.8.0.tgz",
@@ -1841,6 +1836,87 @@
        "webpack-chain": "^6.4.0",
        "webpack-dev-server": "^3.11.0",
        "webpack-merge": "^4.2.2"
      },
      "dependencies": {
        "ansi-styles": {
          "version": "4.3.0",
          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
          "dev": true,
          "optional": true,
          "requires": {
            "color-convert": "^2.0.1"
          }
        },
        "chalk": {
          "version": "4.1.2",
          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
          "dev": true,
          "optional": true,
          "requires": {
            "ansi-styles": "^4.1.0",
            "supports-color": "^7.1.0"
          }
        },
        "color-convert": {
          "version": "2.0.1",
          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
          "dev": true,
          "optional": true,
          "requires": {
            "color-name": "~1.1.4"
          }
        },
        "color-name": {
          "version": "1.1.4",
          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
          "dev": true,
          "optional": true
        },
        "has-flag": {
          "version": "4.0.0",
          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
          "dev": true,
          "optional": true
        },
        "loader-utils": {
          "version": "2.0.4",
          "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
          "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
          "dev": true,
          "optional": true,
          "requires": {
            "big.js": "^5.2.2",
            "emojis-list": "^3.0.0",
            "json5": "^2.1.2"
          }
        },
        "supports-color": {
          "version": "7.2.0",
          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
          "dev": true,
          "optional": true,
          "requires": {
            "has-flag": "^4.0.0"
          }
        },
        "vue-loader-v16": {
          "version": "npm:vue-loader@16.8.3",
          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
          "dev": true,
          "optional": true,
          "requires": {
            "chalk": "^4.1.0",
            "hash-sum": "^2.0.0",
            "loader-utils": "^2.0.0"
          }
        }
      }
    },
    "@vue/cli-shared-utils": {
@@ -4938,6 +5014,13 @@
        "lodash-unified": "^1.0.2",
        "memoize-one": "^6.0.0",
        "normalize-wheel-es": "^1.2.0"
      },
      "dependencies": {
        "@popperjs/core": {
          "version": "npm:@sxzz/popperjs-es@2.11.7",
          "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
          "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
        }
      }
    },
    "elliptic": {
@@ -12522,87 +12605,6 @@
          "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz",
          "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=",
          "dev": true
        }
      }
    },
    "vue-loader-v16": {
      "version": "npm:vue-loader@16.8.3",
      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
      "dev": true,
      "optional": true,
      "requires": {
        "chalk": "^4.1.0",
        "hash-sum": "^2.0.0",
        "loader-utils": "^2.0.0"
      },
      "dependencies": {
        "ansi-styles": {
          "version": "4.3.0",
          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
          "dev": true,
          "optional": true,
          "requires": {
            "color-convert": "^2.0.1"
          }
        },
        "chalk": {
          "version": "4.1.2",
          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
          "dev": true,
          "optional": true,
          "requires": {
            "ansi-styles": "^4.1.0",
            "supports-color": "^7.1.0"
          }
        },
        "color-convert": {
          "version": "2.0.1",
          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
          "dev": true,
          "optional": true,
          "requires": {
            "color-name": "~1.1.4"
          }
        },
        "color-name": {
          "version": "1.1.4",
          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
          "dev": true,
          "optional": true
        },
        "has-flag": {
          "version": "4.0.0",
          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
          "dev": true,
          "optional": true
        },
        "loader-utils": {
          "version": "2.0.4",
          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
          "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
          "dev": true,
          "optional": true,
          "requires": {
            "big.js": "^5.2.2",
            "emojis-list": "^3.0.0",
            "json5": "^2.1.2"
          }
        },
        "supports-color": {
          "version": "7.2.0",
          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
          "dev": true,
          "optional": true,
          "requires": {
            "has-flag": "^4.0.0"
          }
        }
      }
    },
ÏîÄ¿´úÂë/WCSClient/src/api/http.js
@@ -12,8 +12,8 @@
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.35.3:9281/';
    axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    //axios.defaults.baseURL = 'http://192.168.35.3:9281/';
}
else if (process.env.NODE_ENV == 'debug') {
    axios.defaults.baseURL = 'http://127.0.0.1:8098/';
ÏîÄ¿´úÂë/WCSClient/src/extension/basicinfo/locationInfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,114 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
// import gridBody from './extend/GetLocationStatus.vue'
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
    //下面这些方法可以保留也可以删除
    onInit() {
      let EnableBtn = this.buttons.find(x => x.value == 'Enable');
      if (EnableBtn) {
        EnableBtn.onClick = function () {
          let rows = this.$refs.table.getSelected();
          if (rows.length == 0) return this.$error("请选择数据!");
          var keys = rows.map(x => { return x.id });
          this.http
            .post("api/LocationInfo/LocationEnableStatus", keys, "数据处理中")
            .then((x) => {
              if (!x.status) return this.$message.error(x.message);
              this.$message.success("操作成功");
              this.refresh();
            });
        }
      }
      let DisableBtn = this.buttons.find(x => x.value == 'Disable');
      if (DisableBtn) {
        DisableBtn.onClick = function () {
          let rows = this.$refs.table.getSelected();
          if (rows.length == 0) return this.$error("请选择数据!");
          var keys = rows.map(x => { return x.id });
          this.http
            .post("api/LocationInfo/LocationDisableStatus", keys, "数据处理中")
            .then((x) => {
              if (!x.status) return this.$message.error(x.message);
              this.$message.success("操作成功");
              this.refresh();
            });
        }
      }
      this.columns.forEach(column => {
        if (column.field == 'palletCode') {
          column.formatter = (row) => {
            //row.palletCode判断是否为空或undefined
            if (row.palletCode == "" || row.palletCode == undefined) {
              return "无料箱";
            }
            return row.palletCode;
          }
        }
      });
      this.columns.push({
        field: '操作',
        title: '操作',
        width: 90,
        fixed: 'right',
        align: 'center',
        formatter: (row) => {
          return (
            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看明细</i>'
          );
        },
        click: (row) => {
          this.$refs.gridBody.open(row);
        }
      });
    },
    onInited() {
      //框架初始化配置后
      //如果要配置明细表,在此方法操作
      //this.detailOptions.columns.forEach(column=>{ });
    },
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false,则不会执行查询
      return true;
    },
    searchAfter(result) {
      //查询后,result返回的查询数据,可以在显示到表格前处理表格的值
      return true;
    },
    addBefore(formData) {
      //新建保存前formData为对象,包括明细表,可以给给表单设置值,自己输出看formData的值
      return true;
    },
    updateBefore(formData) {
      //编辑保存前formData为对象,包括明细表、删除行的Id
      return true;
    },
    rowClick({ row, column, event }) {
      //查询界面点击行事件
      this.$refs.table.$refs.table.toggleRowSelection(row); //单击行时选中当前行;
    },
    modelOpenAfter(row) {
      //点击编辑、新建按钮弹出框后,可以在此处写逻辑,如,从后台获取数据
      //(1)判断是编辑还是新建操作: this.currentAction=='Add';
      //(2)给弹出框设置默认值
      //(3)this.editFormFields.字段='xxx';
      //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
      //看不懂就把输出看:console.log(this.editFormOptions)
    }
  }
};
export default extension;
ÏîÄ¿´úÂë/WCSClient/src/router/viewGird.js
@@ -65,6 +65,10 @@
    path: '/packaxis',
    name: 'packaxis',
    component: () => import('@/views/PackInfo/packaxis.vue')
  },{
    path: '/locationInfo',
    name: 'locationInfo',
    component: () => import('@/views/basicinfo/locationInfo.vue')
  }]
export default viewgird
ÏîÄ¿´úÂë/WCSClient/src/views/Home.vue
@@ -1,6 +1,6 @@
<template>
    <div class="title">
        <el-row :gutter="20" style="height:85%">
        <!-- <el-row :gutter="20" style="height:85%">
            <el-col :span="8">
                <span style="position: relative; top: 100px;left: 30px;">
                    <h4>一楼设备监控</h4>
@@ -119,7 +119,6 @@
            </el-col>
            <el-col :span="8">
                <!-- å †åž›æœº -->
                <div style="position: relative; top: 50px;">
                    <div class="stackerDiv">
                        <div class="stackDivName">一号堆垛机</div>
@@ -152,9 +151,7 @@
                    </div>
                </div>
            </el-col>
        </el-row>
        </el-row> -->
    </div>
</template>
ÏîÄ¿´úÂë/WCSClient/src/views/basicinfo/locationInfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,191 @@
<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/basicinfo/locationInfo.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "id",
      footer: "Foots",
      cnName: "货位信息",
      name: "locationInfo",
      url: "/LocationInfo/",
      sortName: "id",
    });
    const editFormFields = ref({
      locationStatus: "",
    });
    const editFormOptions = ref([
      [
        { title: "货位状态", field: "locationStatus" ,type: "select",dataKey: "locationStatusEnum",data: [],},
      ],
    ]);
    const searchFormFields = ref({
      locationCode: "",
      roadwayNo: "",
      locationType: "",
      enableStatus: "",
      locationStatus: "",
      row: "",
      columns: "",
      layer: "",
    });
    const searchFormOptions = ref([
      [
        { title: "货位编号", field: "locationCode", type: "like"},
        { title: "料箱编号", field: "palletCode", type: "like"},
        { title: "禁用状态", field: "enableStatus" ,type: "select",dataKey: "",data: [{key: "0",value: "启用"},{key: "3",value: "禁用"}]},
        { title: "货位状态", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: []},
      ],
      [
        { title: "行", field: "row" ,type: "int"},
        { title: "列", field: "columns" ,type: "int"},
        { title: "层", field: "layer" ,type: "int"}
      ],
    ]);
    const columns = ref([
      {
        field: "id",
        title: "Id",
        type: "int",
        width: 100,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      // {
      //   field: "areaId",
      //   title: "区域主键",
      //   type: "string",
      //   width: 90,
      //   align: "left",
      //   bind: {key: "areainfo",data: []}
      // },
      {
        field: "locationCode",
        title: "货位编号",
        type: "string",
        width: 180,
        align: "left",
      },
      {
        field: "palletCode",
        title: "料箱编号",
        type: "string",
        width: 150,
        align: "left",
        bind: { key: "", data: []},
      },
      {
        field: "locationName",
        title: "货位名称",
        type: "string",
        width: 260,
        align: "left",
      },
      {
        field: "roadwayNo",
        title: "巷道编号",
        type: "decimal",
        width: 130,
        align: "left",
        bind: { key: "", data: [] },
      },
      {
        field: "row",
        title: "货位行",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "columns",
        title: "货位列",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "layer",
        title: "货位层",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "locationStatus",
        title: "货位状态",
        type: "string",
        width: 120,
        align: "left",
        bind: { key: "", data: [{key: "0",value: "空闲"},{key: "1",value: "锁定"},{key: "100",value: "有货"}] },
      },
      {
        field: "enableStatus",
        title: "禁用状态",
        type: "string",
        width: 80,
        align: "left",
        bind: { key: "", data: [{key: "0",value: "启用"},{key: "3",value: "禁用"}] },
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 160,
        align: "left",
        sort: true,
        hidden: true,
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        align: "left",
        sort: true,
      },
      {
        field: "remark",
        title: "备注",
        type: "string",
        width: 100,
        align: "left",
        hidden: true
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
      table: "",
      columns: [],
      sortName: "",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>
ÏîÄ¿´úÂë/WCSClient/src/views/taskinfo/task.vue
@@ -51,9 +51,6 @@
          dataKey: "taskType",
          data: [],
        },
        { title: "RFID编号", field: "rfidCode", type: "like" },
      ],
      [
        {
          title: "任务状态",
          field: "taskState",
@@ -61,14 +58,14 @@
          dataKey: "taskState",
          data: [],
        },
      ],
      [
        { title: "起始地址", field: "sourceAddress", type: "like" },
        { title: "目标地址", field: "targetAddress", type: "like" },
        { title: "当前位置", field: "currentAddress", type: "like" },
        { title: "下一位置", field: "nextAddress", type: "like" }
      ],
      [
        { title: "下一位置", field: "nextAddress", type: "like" },
        { title: "巷道号", field: "roadway", type: "like", type: "select",dataKey: "Stacker",data: [],},
        { title: "创建人", field: "creater", type: "like" },
        { title: "创建时间", field: "createDate", type: "datetime" },
      ],
@@ -88,28 +85,21 @@
        field: "taskNum",
        title: "任务号",
        type: "int",
        width: 90,
        width: 120,
        align: "left",
      },
      {
        field: "palletCode",
        title: "托盘编号",
        title: "料箱编号",
        type: "string",
        width: 200,
        align: "left",
      },
      {
        field: "rfidCode",
        title: "RFID编号",
        type: "string",
        width: 180,
        width: 130,
        align: "left",
      },
      {
        field: "roadway",
        title: "巷道号",
        type: "string",
        width: 150,
        width: 100,
        align: "left",
        bind: { key: "Stacker", data: [] },
      },
@@ -117,7 +107,7 @@
        field: "taskType",
        title: "任务类型",
        type: "int",
        width: 130,
        width: 100,
        align: "left",
        bind: { key: "taskType", data: [] },
      },
@@ -133,27 +123,34 @@
        field: "sourceAddress",
        title: "起始地址",
        type: "int",
        width: 120,
        width: 150,
        align: "left",
      },
      {
        field: "targetAddress",
        title: "目标地址",
        type: "string",
        width: 120,
        width: 150,
        align: "left",
      },
      {
        field: "currentAddress",
        title: "当前位置",
        type: "string",
        width: 120,
        width: 150,
        align: "left",
      },
      {
        field: "nextAddress",
        title: "下一位置",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "wmsId",
        title: "WMS任务(上游)",
        type: "int",
        width: 120,
        align: "left",
      },
@@ -161,7 +158,7 @@
        field: "exceptionMessage",
        title: "异常信息",
        type: "string",
        width: 90,
        width: 100,
        align: "left",
      },
      {
@@ -175,43 +172,21 @@
        field: "dispatchertime",
        title: "任务下发时间",
        type: "datetime",
        width: 150,
        align: "left",
      },
      {
        field: "wMSId",
        title: "WMS任务主键",
        type: "int",
        width: 120,
        align: "left",
        hidden: true,
      },
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 90,
        width: 180,
        align: "left",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 150,
        align: "left",
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        width: 180,
        align: "left",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        width: 180,
        align: "left",
      },
      {
ÏîÄ¿´úÂë/WCSClient/src/views/taskinfo/task_hty.vue
@@ -50,29 +50,27 @@
          dataKey: "taskType",
          data: [],
        },
        { title: "RFID编号", field: "rfidCode", type: "like" },
      ],
      [
        {
          title: "任务状态",
          field: "taskState",
          type: "selectList",
          dataKey: "taskState",
          data: [],
        },
        }
      ],
      [
        { title: "起始地址", field: "sourceAddress", type: "like" },
        { title: "目标地址", field: "targetAddress", type: "like" },
        { title: "当前位置", field: "currentAddress", type: "like" },
        { title: "下一位置", field: "nextAddress", type: "like" },
      ],
      [
        { title: "下一位置", field: "nextAddress", type: "like" },
        { title: "巷道号", field: "roadway", type: "like", type: "select",dataKey: "Stacker",data: [],},
        { title: "创建人", field: "creater", type: "like" },
        { title: "创建时间", field: "createDate", type: "datetime" },
      ],
    ]);
    const columns = ref([
      {
    {
        field: "taskId",
        title: "TaskId",
        type: "int",
@@ -86,28 +84,21 @@
        field: "taskNum",
        title: "任务号",
        type: "int",
        width: 90,
        width: 120,
        align: "left",
      },
      {
        field: "palletCode",
        title: "托盘编号",
        title: "料箱编号",
        type: "string",
        width: 200,
        align: "left",
      },
      {
        field: "rfidCode",
        title: "RFID编号",
        type: "string",
        width: 180,
        width: 130,
        align: "left",
      },
      {
        field: "roadway",
        title: "巷道号",
        type: "string",
        width: 150,
        width: 100,
        align: "left",
        bind: { key: "Stacker", data: [] },
      },
@@ -115,7 +106,7 @@
        field: "taskType",
        title: "任务类型",
        type: "int",
        width: 130,
        width: 100,
        align: "left",
        bind: { key: "taskType", data: [] },
      },
@@ -131,27 +122,34 @@
        field: "sourceAddress",
        title: "起始地址",
        type: "int",
        width: 120,
        width: 150,
        align: "left",
      },
      {
        field: "targetAddress",
        title: "目标地址",
        type: "string",
        width: 120,
        width: 150,
        align: "left",
      },
      {
        field: "currentAddress",
        title: "当前位置",
        type: "string",
        width: 120,
        width: 150,
        align: "left",
      },
      {
        field: "nextAddress",
        title: "下一位置",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "wmsId",
        title: "WMS任务(上游)",
        type: "int",
        width: 120,
        align: "left",
      },
@@ -159,7 +157,7 @@
        field: "exceptionMessage",
        title: "异常信息",
        type: "string",
        width: 90,
        width: 100,
        align: "left",
      },
      {
@@ -173,50 +171,21 @@
        field: "dispatchertime",
        title: "任务下发时间",
        type: "datetime",
        width: 150,
        align: "left",
      },
      {
        field: "wMSId",
        title: "WMS任务主键",
        type: "int",
        width: 120,
        align: "left",
        hidden: true,
      },{
        field: "operatetype",
        title: "操作类型",
        type: "string",
        width: 90,
        align: "left",
        bind: { key: "OperateTypeEnum", data: [] },
      },
      {
        field: "creater",
        title: "创建人",
        type: "string",
        width: 90,
        width: 180,
        align: "left",
      },
      {
        field: "createDate",
        title: "创建时间",
        type: "datetime",
        width: 150,
        align: "left",
      },
      {
        field: "modifier",
        title: "修改人",
        type: "string",
        width: 100,
        width: 180,
        align: "left",
      },
      {
        field: "modifyDate",
        title: "修改时间",
        type: "datetime",
        width: 160,
        width: 180,
        align: "left",
      },
      {
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskStatusEnum.cs
@@ -99,6 +99,11 @@
        [Description("任务完成")]
        COMPLETED,
        /// <summary>
        /// ç­‰å¾…放行
        /// </summary>
        [Description("等待放行")]
        WAITFEEDBACK,
        /// <summary>
        /// ä»»åŠ¡å–æ¶ˆå®Œæˆ
        /// </summary>
        [Description("任务取消完成")]
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskExecuteDetailService.cs
@@ -28,7 +28,7 @@
{
    public interface ITaskExecuteDetailService : IService<Dt_TaskExecuteDetail>
    {
        void AddTaskExecuteDetail(int taskId, string description = "");
        void AddTaskExecuteDetail(Dt_Task task, string description = "");
        WebResponseContent GetDetailInfo(int taskNum);
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -58,7 +58,17 @@
        /// <param name="taskDTOs">WMS任务对象集合</param>
        /// <returns>返回处理结果</returns>
        WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO);
        /// <summary>
        /// å®¹å™¨å…¥åº“创建任务
        /// </summary>
        /// <returns></returns>
        WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO,string deviceCode);
        /// <summary>
        /// ç”³è¯·å…¥åº“
        /// </summary>
        /// <returns></returns>
        WebResponseContent RequestInTask(string stationCode, string barCode);
        /// <summary>
        /// æ›´æ–°ä»»åŠ¡å¼‚å¸¸ä¿¡æ¯æ˜¾ç¤º
        /// </summary>
@@ -72,6 +82,7 @@
        /// <param name="taskNum">任务号</param>
        /// <returns>返回处理结果</returns>
        WebResponseContent TaskStatusRecovery(int taskNum);
        /// <summary>
        /// å›žæ»šä»»åŠ¡çŠ¶æ€
        /// </summary>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs
@@ -6,6 +6,7 @@
using System.Text.RegularExpressions;
using WIDESEA_DTO.Agv;
using WIDESEA_External.Model;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
@@ -54,17 +55,26 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                var task = _taskRepository.QueryFirst(x => agvUpdateDTO.ContainerCode==x.PalletCode) ?? throw new Exception($"未找到料箱【{agvUpdateDTO.ContainerCode}】任务");
                var task = _taskRepository.QueryFirst(x => (agvUpdateDTO.ContainerCode ?? "")==x.PalletCode);
                switch (agvUpdateDTO.MissionStatus)
                {
                    case nameof(AGVStatusEnum.PICKER_RECEIVE):
                        if (task == null) throw new Exception($"未找到料箱【{agvUpdateDTO.ContainerCode}】任务");
                        _taskService.UpdateTask(task, TaskStatusEnum.AGV_TakeFinish);
                        break;
                    case nameof(AGVStatusEnum.PICKER_SEND):
                        //WebResponseContent responseContent = _taskService.AgvTaskFlow(task.PalletCode);
                        //if (!responseContent.Status) throw new Exception($"{responseContent.Message}");
                        if (task == null) throw new Exception($"未找到料箱【{agvUpdateDTO.ContainerCode}】任务");
                        _taskService.TaskCompleted(task.TaskNum);
                        break;
                    case nameof(AGVStatusEnum.WAITFEEDBACK):
                        //AGV放行
                        List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x=>x.StationType==StationTypeEnum.StationType_OnlyInbound.ObjToInt());
                        if (!stationMangers.Select(x=>x.StationCode).Contains(agvUpdateDTO.CurrentPosition))
                        {
                            WebResponseContent responseContent = _taskService.AgvTaskFlow(agvUpdateDTO.MissionCode);
                            if (!responseContent.Status) throw new Exception($"{responseContent.Message}");
                        }
                        break;
                    default:
                        break;
                }
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -72,8 +72,13 @@
                    return WebResponseContent.Instance.Error($"未找到对应设备{stationManger.StationDeviceCode}");
                }
                CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
                string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Replace("\0", "");
                string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim();
                if (containerFlowDTO.ContainerCode!= PickBarCode) throw new Exception($"传入料箱码{containerFlowDTO.ContainerCode},输送料箱码{PickBarCode}数据错误");
                if (containerFlowDTO.Direction=="100")
                {
                    WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode);
                    if (!responseContent.Status) throw new Exception(responseContent.Message);
                }
                commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode,(short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode);
                content.OK();
            }
@@ -83,7 +88,15 @@
            }
            return content;
        }
        /// <summary>
        /// ç”³è¯·å…¥åº“
        /// </summary>
        /// <returns></returns>
        [HttpPost, HttpGet, Route("RequestInTask"), AllowAnonymous]
        public WebResponseContent RequestInTask(string stationCode, string barCode)
        {
            return Service.RequestInTask(stationCode, barCode);
        }
        [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous]
        public WebResponseContent GetRouteEndPoint(string startPoint, int routeType)
        {
@@ -97,7 +110,7 @@
        [HttpPost, HttpGet, Route("RecWMSTaskCompleted"), AllowAnonymous]
        public WebResponseContent RecWMSTaskCompleted(int taskNum)
        {
            return Service.RecWMSTaskCompleted(taskNum);
            return Service.TaskCompleted(taskNum);
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile4.pubxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
  <PropertyGroup>
    <DeleteExistingFiles>false</DeleteExistingFiles>
    <ExcludeApp_Data>false</ExcludeApp_Data>
    <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <_TargetId>Folder</_TargetId>
  </PropertyGroup>
</Project>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/appsettings.json
@@ -26,7 +26,7 @@
  },
  "WMSApiAddress": "http://127.0.0.1:9293", //"http://127.0.0.1:9283",正式环境地址
  "ApiName": "WIDESEA",
  "ExpMinutes": 120,
  "ExpMinutes": 300,
  "QuartzJobAutoStart": true,
  "WebSocketEnable": false,
  "WebSocketPort": 9260
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/TaskExecuteDetailService.cs
@@ -41,12 +41,12 @@
            _taskRepository = taskRepository;
        }
        public void AddTaskExecuteDetail(int taskId, string description = "")
        public void AddTaskExecuteDetail(Dt_Task task, string description = "")
        {
            try
            {
                bool isNormal = true;
                Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == taskId);
                Dt_Task taskExist = _taskRepository.QueryFirst(x => x.TaskNum == task.TaskNum);
                if (task == null) return;
                int taskNum = task.TaskNum;
                int taskState = task.TaskState;
@@ -60,7 +60,7 @@
                    IsManual = App.User?.UserId > 0,
                    IsNormal = isNormal,
                    TaskNum = taskNum,
                    TaskId = taskId,
                    TaskId = taskExist.TaskId,
                    TaskState = taskState,
                    Description = description,
                    CurrentAddress = task.CurrentAddress,
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -15,6 +15,7 @@
 *----------------------------------------------------------------*/
#endregion << ç‰ˆ æœ¬ æ³¨ é‡Š >>
using AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using NPOI.SS.Formula.Functions;
using SqlSugar;
@@ -37,6 +38,7 @@
using WIDESEAWCS_DTO.Agv;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -59,6 +61,7 @@
        private readonly IRouterRepository _routerRepository;
        private readonly IApiInfoRepository _apiInfoRepository;
        private readonly ILocationInfoRepository _locationInfoRepository;
        private readonly ILocationInfoService _locationInfoService;
        private Dictionary<string, OrderByType> _taskOrderBy = new()
            {
@@ -76,7 +79,7 @@
        public List<int> TaskRelocationTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 900 && x < 1000).ToList();
        public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository,ILocationInfoRepository locationInfoRepository,IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
        public TaskService(ITaskRepository BaseDal, IMapper mapper, ICacheService cacheService, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, ITaskExecuteDetailRepository taskExecuteDetailRepository, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository, IApiInfoRepository apiInfoRepository,ILocationInfoRepository locationInfoRepository,IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService) : base(BaseDal)
        {
            _mapper = mapper;
            _cacheService = cacheService;
@@ -88,6 +91,7 @@
            _apiInfoRepository = apiInfoRepository;
            _locationInfoRepository = locationInfoRepository;
            _unitOfWorkManage = unitOfWorkManage;
            _locationInfoService = locationInfoService;
        }
        static object lock_taskReceive = new object();
        /// <summary>
@@ -111,7 +115,7 @@
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData();
                    //下发任务组
                    string taskGroup= taskDTO.TaskGroupCode.IsNullOrEmpty() ? Guid.NewGuid().ToString().Replace("-","") : taskDTO.TaskGroupCode;
                    foreach (var item in taskDTO.Tasks)
                    foreach (var item in taskDTO.Tasks.OrderBy(x=>x.ToStationCode))
                    {
                        if (item.ToStationCode.IsNullOrEmpty()) throw new Exception($"任务{item.TaskCode}出库目标操作台不能为空");
                        //获取操作台
@@ -126,7 +130,7 @@
                        task.GroupId = taskGroup;
                        task.TaskType = TaskTypeEnum.Outbound.ObjToInt();
                        task.Roadway = locationInfo.RoadwayNo;
                        task.DeviceCode = "AGV";
                        task.DeviceCode = stationManger.CraneCode;
                        task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
                        tasks.Add(task);
                    }
@@ -152,7 +156,89 @@
            }
            return content;
        }
        static object lock_containerFlow = new object();
        /// <summary>
        /// å®¹å™¨å…¥åº“创建任务
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO, string deviceCode)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                lock (lock_containerFlow)
                {
                    List<Dt_LocationInfo> locationInfos = _locationInfoRepository.QueryData();
                    Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x=>x.PalletCode== containerFlowDTO.ContainerCode);
                    if (locationInfo != null) throw new Exception($"料箱号{containerFlowDTO.ContainerCode}已存在");
                    if (BaseDal.QueryFirst(x=>x.PalletCode==containerFlowDTO.ContainerCode)!=null) throw new Exception($"料箱号{containerFlowDTO.ContainerCode}任务已存在");
                    Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
                    if (noInLocation == null) throw new Exception($"可用货位不足!");
                    Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && x.StationDeviceCode == deviceCode);
                    //下发任务组
                    Dt_Task task = new Dt_Task();
                    task.PalletCode = containerFlowDTO.ContainerCode;
                    task.SourceAddress = containerFlowDTO.SlotCode;
                    task.CurrentAddress = containerFlowDTO.SlotCode;
                    task.NextAddress = stationManger.StationCode;
                    task.TargetAddress = "";
                    task.WMSId = "";
                    task.TaskType = TaskTypeEnum.Inbound.ObjToInt();
                    task.Roadway = noInLocation.RoadwayNo;
                    task.DeviceCode = stationManger.StationDeviceCode;
                    task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt();
                    //添加任务
                    BaseDal.AddData(task);
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "创建入库任务");
                    content.OK("成功");
                }
            }
            catch (Exception ex)
            {
                content.Error($"错误信息:{ex.Message}");
            }
            return content;
        }
        static object lock_requestInTask = new object();
        /// <summary>
        /// ç”³è¯·å…¥åº“
        /// </summary>
        /// <returns></returns>
        public WebResponseContent RequestInTask(string stationCode,string barCode)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                lock (lock_requestInTask)
                {
                    Dt_Task task = BaseDal.QueryFirst(x => x.PalletCode == barCode && x.NextAddress == stationCode && x.TaskState == TaskStatusEnum.CL_Executing.ObjToInt());
                    if (task == null) throw new Exception($"{barCode}料箱未找到任务!");
                    Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation();
                    if (locationInfo == null) throw new Exception($"可用货位不足!");
                    task.NextAddress = locationInfo.LocationCode;
                    task.TargetAddress = locationInfo.LocationCode;
                    task.CurrentAddress = stationCode;
                    task.DeviceCode = "AGV";
                    task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
                    locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                    //更新任务和货位数据
                    _unitOfWorkManage.BeginTran();
                    BaseDal.UpdateData(task);
                    _locationInfoRepository.UpdateData(locationInfo);
                    _unitOfWorkManage.CommitTran();
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, $"分配货位{locationInfo.LocationCode}");
                    content.OK("成功");
                }
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                content.Error($"错误信息:{ex.Message}");
            }
            return content;
        }
        public static string Post(string serviceAddress, string requestJson = "", string contentType = "application/json", Dictionary<string, string>? headers = null)
        {
            string result = string.Empty;
@@ -208,7 +294,7 @@
                task.ModifyDate = DateTime.Now;
                BaseDal.UpdateData(task);
                _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, task.ExceptionMessage);
                _taskExecuteDetailService.AddTaskExecuteDetail(task, task.ExceptionMessage);
                content = WebResponseContent.Instance.OK();
            }
@@ -250,7 +336,7 @@
                BaseDal.UpdateData(task);
                _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"人工恢复挂起任务,恢复挂起时任务状态【{task.TaskState}】");
                _taskExecuteDetailService.AddTaskExecuteDetail(task, $"人工恢复挂起任务,恢复挂起时任务状态【{task.TaskState}】");
                content = WebResponseContent.Instance.OK();
            }
@@ -291,7 +377,7 @@
                BaseDal.UpdateData(task);
                _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, $"人工将任务状态从【{oldState}】回滚到【{task.TaskState}】");
                _taskExecuteDetailService.AddTaskExecuteDetail(task, $"人工将任务状态从【{oldState}】回滚到【{task.TaskState}】");
                content = WebResponseContent.Instance.OK();
            }
@@ -339,7 +425,7 @@
                AgvTaskFlowDTO agvTaskFlowDTO = new AgvTaskFlowDTO()
                {
                    RequestId = Guid.NewGuid().ToString().Replace("-", ""),
                    ContainerCode = code
                    MissionCode = code
                };
                string request = JsonConvert.SerializeObject(agvTaskFlowDTO, settings);
                string response = HttpHelper.Post(url, request);
@@ -409,25 +495,37 @@
                }
                else if(task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//入库任务逻辑
                {
                    string? url = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMSInBoundBack.ToString())?.ApiAddress;
                    if (string.IsNullOrEmpty(url))
                    //string? url = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMSInBoundBack.ToString())?.ApiAddress;
                    //if (string.IsNullOrEmpty(url))
                    //{
                    //    _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"未找到WMS入库上报接口,请检查接口配置");
                    //    UpdateTaskExceptionMessage(taskNum, $"未找到WMS入库上报接口,请检查接口配置");
                    //    return content.Error($"{taskNum},未找到WMS入库上报接口,请检查接口配置");
                    //}
                    //ContainerInFinishDTO containerInFinishDTO = new ContainerInFinishDTO()
                    //{
                    //    TaskCode= task.TaskNum.ToString(),
                    //    ContainerCode = task.PalletCode,
                    //    FromStationCode = task.SourceAddress,
                    //    ToLocationCode = task.TargetAddress
                    //};
                    //string request = JsonConvert.SerializeObject(containerInFinishDTO, settings);
                    ////调用接口
                    //string response = HttpHelper.Post(url, request);
                    //WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ??throw new Exception($"{taskNum},未接收到WMS入库上报返回值");
                    //if (wMSResponse.Code!="0") throw new Exception($"入库任务{task.TaskNum}WMS入库上报错误,信息:{wMSResponse.Msg}");
                    Dt_LocationInfo locationInfo = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.TargetAddress);
                    if (locationInfo.LocationStatus != LocationStatusEnum.Lock.ObjToInt())
                    {
                        _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"未找到WMS入库上报接口,请检查接口配置");
                        UpdateTaskExceptionMessage(taskNum, $"未找到WMS入库上报接口,请检查接口配置");
                        return content.Error($"{taskNum},未找到WMS入库上报接口,请检查接口配置");
                        return content.Error($"{locationInfo.LocationCode}货位状态不正确");
                    }
                    ContainerInFinishDTO containerInFinishDTO = new ContainerInFinishDTO()
                    {
                        TaskCode= task.TaskNum.ToString(),
                        ContainerCode = task.PalletCode,
                        FromStationCode = task.SourceAddress,
                        ToLocationCode = task.TargetAddress
                    };
                    string request = JsonConvert.SerializeObject(containerInFinishDTO, settings);
                    //调用接口
                    string response = HttpHelper.Post(url, request);
                    WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ??throw new Exception($"{taskNum},未接收到WMS入库上报返回值");
                    if (wMSResponse.Code!="0") throw new Exception($"入库任务{task.TaskNum}WMS入库上报错误,信息:{wMSResponse.Msg}");
                    task.TaskState = TaskStatusEnum.Finish.ObjToInt();
                    locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
                    locationInfo.PalletCode = task.PalletCode;
                    _unitOfWorkManage.BeginTran();
                    _locationInfoRepository.UpdateData(locationInfo);
                    BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.自动完成 : OperateTypeEnum.人工完成);
                    _unitOfWorkManage.CommitTran();
                }
                content.OK("任务完成");
            }
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/TaskService_Operate.cs
@@ -93,7 +93,7 @@
                task.TaskState = taskStatus.ObjToInt();
            }
            BaseDal.UpdateData(task);
            _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskNum, stringBuilder.ToString());
            _taskExecuteDetailService.AddTaskExecuteDetail(task, stringBuilder.ToString());
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/AGV/AGVExtend.cs
@@ -109,7 +109,7 @@
                            //获取目标点货位
                            Dt_LocationInfo locationInfoEnd = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.NextAddress);
                            //获取线体入库站台
                            Dt_StationManger stationMangerStart = _stationMangerRepository.QueryFirst(x => x.PickStationCode == task.CurrentAddress);
                            Dt_StationManger stationMangerStart = _stationMangerRepository.QueryFirst(x => x.StationCode == task.CurrentAddress);
                            if (locationInfoEnd == null || stationMangerStart == null) throw new Exception($"未找到任务号${task.TaskNum}起始点{task.CurrentAddress}或目标点{task.NextAddress}位置信息");
                            agvTaskSend.RequestId = Guid.NewGuid().ToString().Replace("-", "");
                            agvTaskSend.MissionCode = task.TaskNum.ToString();
@@ -130,10 +130,10 @@
                                StartSlotCode = stationMangerStart.CraneStationCode,
                                EndPosition = locationInfoEnd.AgvPoint,
                                EndSlotCode = locationInfoEnd.LocationCode,
                                TakeActionConfirm = false,
                                TakeActionInform = false,
                                PutActionConfirm = true,
                                PutActionInform = true,
                                TakeActionConfirm = true,
                                TakeActionInform = true,
                                PutActionConfirm = false,
                                PutActionInform = false,
                            };
                            agvTaskSend.MissionData.Add(missionDataItem);
                            //发送AGV任务
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/¶þÆÚÏßÌå/ConveyorLineDBName.cs
@@ -33,12 +33,8 @@
        /// </summary>
        R_PickBarCode,
        /// <summary>
        /// æ‹£é€‰å޻向(写)
        /// æ‹£é€‰å޻向/拣选确认(写)
        /// </summary>
        W_PickToHode,
        /// <summary>
        /// æ‹£é€‰ç¡®è®¤(写)
        /// </summary>
        W_PickResponse,
        W_PickToHode
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/¶þÆÚÏßÌå/ConveyorLineJob2.cs
@@ -10,6 +10,7 @@
using WIDESEAWCS_Common;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -45,41 +46,71 @@
                CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
                if (conveyorLine != null)
                {
                    #region ç«™å°æ–¹å¼
                    List<Dt_StationManger> stationManagers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == conveyorLine.DeviceCode);
                    foreach (var station in stationManagers)
                    {
                        if (station.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //拣选申请
                        if (station.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt())
                        {
                            //拣选申请
                            bool PickRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_PickRequest, station.StationCode);
                            if (PickRequest)
                            {
                                string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Replace("\0", "");
                                string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Trim();
                                //上报WMS料箱到达
                                if (PickBarCode.IsNotEmptyOrNull())
                                {
                                    WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode);
                                    //WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode);
                                    WebResponseContent content = WebResponseContent.Instance.OK();
                                    if (content.Status)
                                    {
                                        //写入拣选确认
                                        conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode);
                                    }
                                    else
                                    {
                                        WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}拣选申请上报WMS错误,信息{content.Message}");
                                    }
                                }
                                else
                                {
                                    WriteError(nameof(conveyorLine.DeviceCode), $"{station.StationCode}拣选申请为{PickRequest}条码为空值");
                                    WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}拣选申请为{PickRequest}条码为空值");
                                }
                            }
                            
                        }
                        else
                        {
                            //入库申请
                            bool InRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_InRequest, station.StationCode);
                            bool InResponse = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.W_InResponse, station.StationCode);
                            int InWeight = conveyorLine.GetValue<ConveyorLineDBName, int>(ConveyorLineDBName.R_InWeight, station.StationCode);
                            if (InRequest && !InResponse && InWeight>0)
                            {
                                string InBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_InBarCode, station.StationCode).Trim();
                                //料箱到达
                                if (InBarCode.IsNotEmptyOrNull())
                                {
                                    //申请入库任务
                                    WebResponseContent content =_taskService.RequestInTask(station.StationCode,InBarCode);
                                    if (content.Status)
                                    {
                                        //写入入库确认
                                        conveyorLine.SetValue(ConveyorLineDBName.W_InResponse, true, station.StationCode);
                                    }
                                    else
                                    {
                                        WriteError(nameof(conveyorLine.DeviceCode), $"站台{station.StationCode}料箱{InBarCode}申请入库任务错误,信息{content.Message}");
                                    }
                                }
                                else
                                {
                                    WriteError(nameof(conveyorLine.DeviceCode), $"站台{station.StationCode}入库申请为{InRequest}条码为空值");
                                }
                            }
                        }
                        
                    }
                    #endregion ç«™å°æ–¹å¼
                }
            }
            catch (Exception ex)
ÏîÄ¿×ÊÁÏ/AGVͨÐÅÎĵµ/WMSÊäËÍÏß¶Ô½ÓЭÒé251126.xls
Binary files differ
ÏîÄ¿×ÊÁÏ/AGVͨÐÅÎĵµ/ÊäËͼðÑ¡ºÍվ̨±àºÅ.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/Ò»ÆÚ¶Ô½ÓÏà¹Ø×ÊÁÏ/Ò»ÆÚIp.png
ÏîÄ¿×ÊÁÏ/Ò»ÆÚ¶Ô½ÓÏà¹Ø×ÊÁÏ/¹þ¶û±õÒ»ÆÚÊäËÍÏß¶Ô½ÓЭÒémodbusTcpЭÒéV1.1.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/Ò»ÆÚ¶Ô½ÓÏà¹Ø×ÊÁÏ/ÈðÒⲩ²¿Êð½Ó¿ÚÎĵµ.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/Ò»ÆÚ¶Ô½ÓÏà¹Ø×ÊÁÏ/µç×Ó±êÇ©½Ó¿ÚÎĵµ.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿Ú»ã×ÜÎļþ/WMS½Ó¿Ú¶Ô½ÓÎĵµ_V1.1.3.docx
Binary files differ