分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-01-31 50fd5cc9cfad08714c4daa6d481c5293ff2ae6b1
逻辑完善
已删除3个文件
已修改29个文件
已添加50个文件
已重命名17个文件
2442 ■■■■■ 文件已修改
代码管理/PCS/WCS_Client/src/extension/widesea_wcs/system/dt_Interfacerecord_pcs.js 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/router/viewGird.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Home.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_system/system/tracklogDetial.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/system/dt_Interfacerecord_pcs.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WritePCSLog.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/StateEnum/LocationStateEnum.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/WIDESEA_Comm.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_Interfacerecord_pcs.cs 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_Interfacerecord_pcs.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/ToAGV/AGVRequestin.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/ToAGV/AGVRespone.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_Interfacerecord_pcsMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/IRepositories/System/Idt_Interfacerecord_pcsRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/IServices/System/Idt_Interfacerecord_pcsService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/IServices/System/Partial/Idt_Interfacerecord_pcsService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/Repositories/System/dt_Interfacerecord_pcsRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/Services/System/Partial/dt_Interfacerecord_pcsService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_System/Services/System/dt_Interfacerecord_pcsService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/AGVandGantry.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/GantryDB.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/JobBase.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/GantryJob.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/ToAGV/ToAGVServer.cs 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/DBExtension.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToAGV/ToAGVController.cs 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToMes/ToMESController.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/Partial/dt_Interfacerecord_pcsController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/dt_Interfacerecord_pcsController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Startup.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/WIDESEA_WebApi.csproj 61 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/extension/widesea_wms/baseinfo/dt_geometry_data.js 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/router/viewGird.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/views/widesea_wms/system/dt_stationinfo.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Core/UserManager/UserContext.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/partial/dt_geometry_data.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/UserInfo.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/Taskinfo/dt_agvtask.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/MappingConfiguration/BaseInfo/dt_geometry_dataMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/ToAGV/AGVRespone.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/ToAGV/RequestTask.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WCS/IRepositories/BaseInfo/Idt_geometry_dataRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WCS/IServices/BaseInfo/Idt_geometry_dataService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WCS/IServices/BaseInfo/Partial/Idt_geometry_dataService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WCS/Repositories/BaseInfo/dt_geometry_dataRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WCS/Services/BaseInfo/Partial/dt_geometry_dataService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WCS/Services/BaseInfo/dt_geometry_dataService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/AGVServer.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IRepositories/BaseInfo/Idt_geometry_dataRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IServices/BaseInfo/Idt_geometry_dataService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IServices/BaseInfo/Partial/Idt_geometry_dataService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/IServices/system/Partial/Idt_stationinfoService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Repositories/BaseInfo/dt_geometry_dataRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/dt_geometry_dataService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_stationinfoService.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToAGV/ToAGVServer.cs 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/JobTask.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WMS/Partial/dt_geometry_dataController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WMS/Partial/dt_stationinfoController.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WMS/dt_geometry_dataController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/WIDESEA_WebApi.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/库区分配.txt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/系统架构图(1).pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS与AGV和桁架防呆交互协议/AGV与桁架防呆协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS与桁架协议/协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS INFO Gantry.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS INFO Machine.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS INFO VK.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS INFO WP.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS REQ GEOMETRY.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS REQ.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS RES_input.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS RES_machine.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/interface PMS SERVERS.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/新增设备需要采集的信息.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/AGV与桁架防呆协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/Interface PCS for AGV and Storage.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/Interface to AGV(1).pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/interface PMS REQ GEOMETRY 4 inputs.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/interface PMS RES_inputs_conv_feed.pdf 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS与AGV接口/AGV反馈任务状态给WMS.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和AGV接口/WMS、PCS和AGV接口协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和AGV接口/WMS下发任务给AGV.png 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和MES接口/MES下发AGV数据.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和MES接口/MES接收AGV数据接口.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/新增设备协议/太重交互-库口状态_V1.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/项目图纸/货位.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/PCS/WCS_Client/src/extension/widesea_wcs/system/dt_Interfacerecord_pcs.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import tracklogDetial from "@/views/widesea_system/system/tracklogDetial.vue"
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: tracklogDetial,
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
     //下面这些方法可以保留也可以删除
    onInit() {  //框架初始化配置前,
        //示例:在按钮的最前面添加一个按钮
        //   this.buttons.unshift({  //也可以用push或者splice方法来修改buttons数组
        //     name: '按钮', //按钮名称
        //     icon: 'el-icon-document', //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档)
        //     type: 'primary', //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button
        //     onClick: function () {
        //       this.$Message.success('点击了按钮');
        //     }
        //   });
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // this.boxOptions.labelWidth = 150;
        this.columns.forEach(x => {
          if (x.field == "interface_type") {
            x.getColor = (row, column) => {
              if (row != null) {
                if (row.interface_type == "成功") {
                  return "success";
                } else if (row.interface_type == "失败") {
                  return "error";
                }
              }
            }
          }
        })
        let options = {
          field: 'oper',
          title: '数据详情',
          type: 'text',
          width: 60,
          //返回一个标签
          formatter: (row) => {
            return '<a href="javascript:void(0)">详情</a>'
          },
          //触发事件,可以在此事件再打开一个弹出框等操作
          click: (row, column, event) => {
            this.$refs.gridHeader.openDialog(row)
          }
        };
        this.columns.push(options)
    },
    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;
´úÂë¹ÜÀí/PCS/WCS_Client/src/router/viewGird.js
@@ -185,6 +185,10 @@
        path: '/dt_geometry_data',
        name: 'dt_geometry_data',
        component: () => import('@/views/widesea_wcs/baseinfo/dt_geometry_data.vue')
    }    ,{
        path: '/dt_Interfacerecord_pcs',
        name: 'dt_Interfacerecord_pcs',
        component: () => import('@/views/widesea_wcs/system/dt_Interfacerecord_pcs.vue')
    }]
export default viewgird
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/Home.vue
@@ -1,5 +1,5 @@
<template>
  <div class="title">Welcome To WCS!</div>
  <div class="title">Welcome To PCS!</div>
</template>
<script>
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_system/system/tracklogDetial.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
<template>
    <div>
        <!-- è¯¦æƒ…弹窗 -->
        <vol-box :height="450" v-model="detialBox" :padding="15" title="日志详情">
         <div>
                id:{{ rowData.interface_id }}
                <hr />
                <b>时间:</b>
                {{ rowData.interface_createtime }}
                <br />
                <b>操作名称:</b>
                {{ rowData.interface_name }}
                <br />
                <b>描述:</b>
                {{ rowData.interface_remark }}
                <br />
                <b>错误信息:</b>
                <br />
                {{ rowData.interface_message }}
                <br />
                <br />
                <b>请求数据:</b>
                <br />
                <pre> {{ rowData.interface_paradata==""?rowData.interface_paradata:JSON.parse(rowData.interface_paradata) }}</pre>
                <br />
                <b>返回数据:</b>
                <pre>{{rowData.interface_returndata==""?rowData.interface_returndata:JSON.parse(rowData.interface_returndata)}}</pre>
            </div>
        </vol-box>
    </div>
</template>
<script defer = "true">
import VolBox from "@/components/basic/VolBox.vue";
export default {
    components: { "vol-box": VolBox },
    methods: {},
    data() {
        return {
            detialBox: false,
            rowData: "",
        };
    },
    methods: {
        openDialog(row) {
            this.detialBox = true;
            this.rowData = row;
        }
    },
};
</script>
<style>
.formContainer {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/system/dt_Interfacerecord_pcs.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,86 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wcs/system/dt_Interfacerecord_pcs.js此处编写
 -->
<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/widesea_wcs/system/dt_Interfacerecord_pcs.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'interface_id',
                footer: "Foots",
                cnName: '接口日志',
                name: 'system/dt_Interfacerecord_pcs',
                url: "/dt_Interfacerecord_pcs/",
                sortName: "interface_createtime"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"interface_remark":"",});
            const searchFormOptions = ref([[{"title":"请求数据","field":"interface_paradata","type":"like"},{"title":"描述","field":"interface_remark","type":"like"}],
            [{"title":"返回数据","field":"interface_returndata","type":"like"},{"title":"创建时间","field":"interface_createtime","type":"datetime"}]
        ]);
            const columns = ref([
                {field:'interface_id',title:'主键',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
            {
field:'interface_call',
type:'string',
title:"请求者",
width:60,
// sort:true,
align:'left'
},
{
           field:'interface_type',
           title:'类型',
           type:'string',
           width:60,
           require:true,
           align:'left',
           bind:{data:[]},
           //sortable:true
           },
                       {field:'interface_provide',title:'接受者',type:'string',width:60,require:true,align:'left'},
                    //    {field:'interface_call',title:'请求者',type:'string',width:110,require:true,align:'left'},
                       {field:'interface_paradata',title:'请求数据',type:'string',width:110,align:'left'},
                       {field:'interface_returndata',title:'返回数据',type:'string',width:110,align:'left'},
                       {field:'interface_createtime',title:'创建时间',type:'datetime',width:120,require:true,align:'left',sortable:true},
                       {field:'interface_remark',title:'描述',type:'string',width:120,align:'left'},
                       {field:'interface_operator',title:'操作者',type:'string',width:110,require:true,align:'left'},
                       {field:'interface_name',title:'操作名称',type:'string',width:110,require:true,align:'left'},
                       {field:'interface_message',title:'错误信息',type:'string',width:110,align:'left'},]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs
@@ -82,7 +82,7 @@
        /// <summary>
        /// æ·»åŠ æ—¥å¿—
        /// </summary>
        private static void Write(string describe, object info, LogState logState, string dataFrom, string createuser)
        public static void Write(string describe, object info, LogState logState, string dataFrom, string createuser)
        {
            try
            {
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WritePCSLog.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_System.IRepositories;
using WIDESEA_System.Repositories;
namespace WIDESEA_Comm.LogInfo
{
    public class WritePCSLog
    {
        /// <summary>
        /// æŽ¥å£æ•°æ®è®°å½•
        /// </summary>
        /// <param name="id">任务ID</param>
        /// <param name="code">成功/失败</param>
        /// <param name="provide">接受者</param>
        /// <param name="call">请求者</param>
        /// <param name="paradata">请求数据</param>
        /// <param name="returndata">返回数据</param>
        /// <param name="remark">备注/描述</param>
        /// <param name="name">操作名称(方法名)</param>
        /// <param name="message">错误信息</param>
        public static void LogAdd(string id, string code, string provide, string call, string paradata, string returndata, string remark, string name, string message)
        {
            VOLContext context = new VOLContext();
            Idt_Interfacerecord_pcsRepository interfacerecord_PcsRepository = new dt_Interfacerecord_pcsRepository(context);
            dt_Interfacerecord_pcs interfacerecord = new dt_Interfacerecord_pcs()
            {
                interface_id = Guid.NewGuid(),
                interface_type = code,
                interface_provide = provide,
                interface_call = call,
                interface_paradata = paradata,
                interface_returndata = returndata,
                interface_createtime = DateTime.Now,
                interface_remark = remark,
                interface_operator = "admin",//UserContext.Current.UserName == null ? "admin" : UserContext.Current.UserName,
                interface_name = name,
                interface_message = message,
            };
            dt_Interfacerecord_pcs data = null;
            if (interfacerecord.interface_message != "")
                data = interfacerecord_PcsRepository.FindFirst(x => x.interface_message == interfacerecord.interface_message && x.interface_remark == interfacerecord.interface_remark && (interfacerecord.interface_createtime.Ticks - x.interface_createtime.Ticks >= 5) && x.interface_paradata.Contains(id));//超过5秒记录
            //data = interfacerecord_PcsRepository.FindFirst(x => x.interface_message == interfacerecord.interface_message && x.interface_remark == interfacerecord.interface_remark && x.interface_createtime.Day == DateTime.Now.Day && x.interface_paradata.Contains(id));
            if (data == null)
                interfacerecord_PcsRepository.Add(interfacerecord, true);
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/StateEnum/LocationStateEnum.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Comm
{
    public enum LocationStateEnum
    {
        /// <summary>
        /// æœ‰è´§
        /// </summary>
        Stroge,
        /// <summary>
        /// ç©ºè´§ä½
        /// </summary>
        Empty
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/WIDESEA_Comm.csproj
@@ -12,6 +12,7 @@
  <ItemGroup>
    <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" />
    <ProjectReference Include="..\WIDESEA_System\WIDESEA_System.csproj" />
  </ItemGroup>
</Project>
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_Interfacerecord_pcs.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,124 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "接口日志", TableName = "dt_Interfacerecord_pcs")]
    public partial class dt_Interfacerecord_pcs : BaseEntity
    {
        /// <summary>
        ///主键
        /// </summary>
        [Key]
        [Display(Name = "主键")]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid interface_id { get; set; }
        /// <summary>
        ///成功:失败
        /// </summary>
        [Display(Name = "成功:失败")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string interface_type { get; set; }
        /// <summary>
        ///接受者
        /// </summary>
        [Display(Name = "接受者")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string interface_provide { get; set; }
        /// <summary>
        ///请求者
        /// </summary>
        [Display(Name = "请求者")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string interface_call { get; set; }
        /// <summary>
        ///请求数据
        /// </summary>
        [Display(Name = "请求数据")]
        [Column(TypeName = "nvarchar(max)")]
        [Editable(true)]
        public string interface_paradata { get; set; }
        /// <summary>
        ///返回数据
        /// </summary>
        [Display(Name = "返回数据")]
        [Column(TypeName = "nvarchar(max)")]
        [Editable(true)]
        public string interface_returndata { get; set; }
        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public DateTime interface_createtime { get; set; }
        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string interface_remark { get; set; }
        /// <summary>
        ///操作者
        /// </summary>
        [Display(Name = "操作者")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string interface_operator { get; set; }
        /// <summary>
        ///操作名称(方法名)
        /// </summary>
        [Display(Name = "操作名称(方法名)")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string interface_name { get; set; }
        /// <summary>
        ///错误信息
        /// </summary>
        [Display(Name = "错误信息")]
        [Column(TypeName = "nvarchar(max)")]
        [Editable(true)]
        public string interface_message { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/partial/dt_Interfacerecord_pcs.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    public partial class dt_Interfacerecord_pcs
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/ToAGV/AGVRequestin.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Entity.ToAGV
{
    public class AGVRequestin
    {
        /// <summary>
        /// åŒºåŸŸå·
        /// </summary>
        public int AreaNr { get; set; }
        /// <summary>
        /// ç±»åž‹ 1:正在进入、2:正在离开
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        ///AGV区域状态 1:不在区域内、其他:在区域内
        /// </summary>
        public int OUTOFArea { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/ToAGV/AGVRespone.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Entity.ToAGV
{
    public class AGVRespone
    {
        /// <summary>
        /// 1成功
        /// </summary>
        public int success { get; set; } = -1;
        /// <summary>
        /// å¤±è´¥ï¼Œè¿”回失败信息
        /// </summary>
        public string Message { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/System/dt_Interfacerecord_pcsMapConfig.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using WIDESEA_Entity.MappingConfiguration;
using WIDESEA_Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WIDESEA_Entity.MappingConfiguration
{
    public class dt_Interfacerecord_pcsMapConfig : EntityMappingConfiguration<dt_Interfacerecord_pcs>
    {
        public override void Map(EntityTypeBuilder<dt_Interfacerecord_pcs>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/IRepositories/System/Idt_Interfacerecord_pcsRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_Interfacerecord_pcsRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_System.IRepositories
{
    public partial interface Idt_Interfacerecord_pcsRepository : IDependency,IRepository<dt_Interfacerecord_pcs>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/IServices/System/Idt_Interfacerecord_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_System.IServices
{
    public partial interface Idt_Interfacerecord_pcsService : IService<dt_Interfacerecord_pcs>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/IServices/System/Partial/Idt_Interfacerecord_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
/*
*所有关于dt_Interfacerecord_pcs类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_System.IServices
{
    public partial interface Idt_Interfacerecord_pcsService
    {
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/Repositories/System/dt_Interfacerecord_pcsRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_Interfacerecord_pcsRepository编写代码
 */
using WIDESEA_System.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_System.Repositories
{
    public partial class dt_Interfacerecord_pcsRepository : RepositoryBase<dt_Interfacerecord_pcs> , Idt_Interfacerecord_pcsRepository
    {
    public dt_Interfacerecord_pcsRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_Interfacerecord_pcsRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_Interfacerecord_pcsRepository>(); } }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/Services/System/Partial/dt_Interfacerecord_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
/*
 *所有关于dt_Interfacerecord_pcs类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_Interfacerecord_pcsService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_System.IRepositories;
namespace WIDESEA_System.Services
{
    public partial class dt_Interfacerecord_pcsService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_Interfacerecord_pcsRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_Interfacerecord_pcsService(
            Idt_Interfacerecord_pcsRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_System/Services/System/dt_Interfacerecord_pcsService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_Interfacerecord_pcsService与Idt_Interfacerecord_pcsService中编写
 */
using WIDESEA_System.IRepositories;
using WIDESEA_System.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_System.Services
{
    public partial class dt_Interfacerecord_pcsService : ServiceBase<dt_Interfacerecord_pcs, Idt_Interfacerecord_pcsRepository>
    , Idt_Interfacerecord_pcsService, IDependency
    {
    public dt_Interfacerecord_pcsService(Idt_Interfacerecord_pcsRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_Interfacerecord_pcsService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_Interfacerecord_pcsService>(); } }
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/AGVandGantry.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.ToAGV;
using WIDESEA_WCS.WCSClient;
namespace WIDESEA_WCS
{
    public class AGVandGantry
    {
        static FreeDB FreeDB = new FreeDB();
        /// <summary>
        ///
        /// </summary>
        /// <param name="requestin"></param>
        /// <param name="MethodName">方法名</param>
        /// <returns></returns>
        public static AGVRespone GetSetGantry(AGVRequestin requestin, string MethodName)
        {
            AGVRespone respone = new AGVRespone();
            try
            {
                var Gantry_client = PLCClient.Clients.FirstOrDefault(t => t.PLCName == "桁架");
                if (Gantry_client == null) throw new Exception("桁架调度服务未开启!");
                if (!Gantry_client.IsConnected) throw new Exception("与桁架连接超时!");
                var Gantryplc = FreeDB.Select<dt_plcinfohead>().Where(x => x.plcinfo_name == Gantry_client.PLCName).First();
                List<string> numbers = new List<string>() { "1单元防呆", "2单元防呆", "3单元防呆", "上料区防呆" };
                var details = FreeDB.Select<dt_plcinfodetail>().Where(x => x.plcdetail_iotype == Gantryplc.plcinfo_iotyep && x.plcdetail_number == numbers[requestin.AreaNr - 1]).ToList();
                if (MethodName == "AGVRequestin")
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    Gantry_client.WriteByOrder("W_AGV_Request_In", true, numbers[requestin.AreaNr - 1]);//申请进入区域
                    var Release = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Release_In").First(), Gantry_client);//允许进入区域
                    var Gantry_Out_of_Area = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Gantry_Out_of_Area").First(), Gantry_client);//桁架不在该区域
                    if (!Release) throw new Exception("桁架未允许进入!");
                    if (!Gantry_Out_of_Area) throw new Exception("桁架在区域内!");
                }
                else if (MethodName == "EnteriorLeav")
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    if (requestin.Type == 1)
                    {
                        Gantry_client.WriteByOrder("W_AGV_Entering", true, numbers[requestin.AreaNr - 1]);//正在进入
                        var Area_Occupied_by_AGV = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Area_Occupied_by_AGV").First(), Gantry_client);//桁架反馈AGV占位信号
                        if (!Area_Occupied_by_AGV) throw new Exception("桁架未反馈AGV占位信号");
                    }
                    else if (requestin.Type == 2)
                    {
                        Gantry_client.WriteByOrder("W_AGV_Leaving", true, numbers[requestin.AreaNr - 1]);//正在离开
                        var Area_Occupied_by_AGV = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Area_Occupied_by_AGV").First(), Gantry_client);//桁架反馈AGV占位信号
                        if (Area_Occupied_by_AGV) throw new Exception("桁架未反馈AGV离开信号");
                    }
                }
                else if (MethodName == "AGVOutofArea")
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    Gantry_client.WriteByOrder("W_AGV_OUT_OF_Area", requestin.OUTOFArea == 1 ? true : false, numbers[requestin.AreaNr - 1]);//AGV不在该区域
                }
                else if (MethodName == "GantryOutofArea")
                {
                    var Gantry_Out_of_Area = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Gantry_Out_of_Area").First(), Gantry_client);//桁架不在该区域
                    if (!Gantry_Out_of_Area) throw new Exception("桁架在区域内!");
                }
                respone.success = 1;
            }
            catch (Exception ex)
            {
                respone.Message = ex.Message;
            }
            return respone;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,175 @@
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.EFDbContext;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.WCSClient;
namespace WIDESEA_WCS
{
    public class Gantry
    {
        static VOLContext Context = new VOLContext();
        Idt_plcinfoheadRepository repository = new dt_plcinfoheadRepository(Context);
        Idt_plcinfodetailRepository plcRepository = new dt_plcinfodetailRepository(Context);
        Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context);
        /// <summary>
        /// æŸ¥è¯¢è½¦è½®æ•°æ®
        /// </summary>
        public void QueryWheeldata(PLCClient client)
        {
            try
            {
                var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
                List<string> names = new List<string>() { "1单元辊道下料查询车轮", "2单元辊道下料查询车轮", "3单元辊道下料查询车轮", "辊道上料查询车轮" };
                foreach (string name in names)
                {
                    var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == name).ToList();
                    var on = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_oi_on").First(), client);
                    if ((Int16)on == 1)
                    {
                        var wp_type = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_o_wp_type").First(), client);
                        var geometry = dataRepository.FindFirst(x => x.TypeId == (Int32)wp_type);
                        if (geometry == null)
                        {
                            //DBExtension.Write(details.Where(x => x.plcdetail_name == "W_i_status").First(), client, (Int16)2);
                            client.WriteByOrder("W_i_status", (Int16)2, name);//1-找到数据,2-未找到工件类型数据
                            client.WriteByOrder("W_i_skip_op", "1", name);//屏蔽工艺(屏蔽视觉检测/屏蔽涂油);
                                                                          //0-使用,1-跳过
                            client.WriteByOrder("R_oi_on", (Int16)0, name);
                        }
                        else
                        {
                            client.WriteByOrder("W_i_status", (Int16)1, name);
                            client.WriteByOrder("W_i_parameter_a", (float)geometry.a, name);
                            client.WriteByOrder("W_i_parameter_b", (float)geometry.b, name);
                            client.WriteByOrder("W_i_parameter_c", (float)geometry.c, name);
                            client.WriteByOrder("W_i_parameter_d", (float)geometry.d, name);
                            client.WriteByOrder("W_i_parameter_e", (float)geometry.e, name);
                            client.WriteByOrder("W_i_parameter_f", (float)geometry.f, name);
                            client.WriteByOrder("W_i_parameter_g", (float)geometry.g, name);
                            client.WriteByOrder("W_i_parameter_h", (float)geometry.h, name);
                            //屏蔽工艺(屏蔽视觉检测/屏蔽涂油)
                            client.WriteByOrder("W_i_skip_op", "0", name);//字符串写入-2
                            client.WriteByOrder("R_oi_on", (Int16)0, name);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        /// <summary>
        /// æŸ¥è¯¢è®¢å•,是否需要加工
        /// </summary>
        public void QueryOrder(PLCClient client)
        {
            try
            {
                var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
                List<string> names = new List<string>() { "1单元辊道下料查询订单", "2单元辊道下料查询订单", "3单元辊道下料查询订单", "辊道上料查询订单" };
                foreach (string name in names)
                {
                    var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == name).ToList();
                    var on = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_oi_on").First(), client);
                    if ((Int16)on == 1)
                    {
                        var wp_id = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_o_wp_id").First(), client);
                        //需添加查询车轮SN号订单逻辑
                        var wp_type = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_o_wp_type").First(), client);
                        var geometry = dataRepository.FindFirst(x => x.TypeId == (Int32)wp_type);
                        if (geometry == null)
                        {
                            client.WriteByOrder("W_i_status", (Int16)2, name);//1-好,允许加工,2-不在列表中,3-不加工车轮类型
                            client.WriteByOrder("R_oi_on", (Int16)0, name);
                        }
                        else
                        {
                            client.WriteByOrder("W_i_status", (Int16)1, name);
                            //client.WriteByOrder("W_i_job_id", "", name);
                            //client.WriteByOrder("W_i_drawing_id", "", name);
                            //client.WriteByOrder("W_i_heat_id", "", name);
                            //client.WriteByOrder("W_i_sourceheat", "", name);
                            //client.WriteByOrder("W_i_batch_id", "", name);
                            client.WriteByOrder("R_oi_on", (Int16)0, name);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        /// <summary>
        /// ä¸‹æ–™ä½äº¤äº’
        /// </summary>
        public void Layofflevel(PLCClient client)
        {
            try
            {
                var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
                List<string> names = new List<string>() { "1单元下料区", "2单元下料区", "3单元下料区", "上料区" };
                foreach (string name in names)
                {
                    var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == name).ToList();
                    var Request = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Request_Load").First(), client);
                    if (!Request) continue;
                    var PartStatus = (Int32)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PartStatus").First(), client);//1:ok;2:nok
                    var Wheel_Type = (Int32)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_Type").First(), client);//车轮类型
                    var Wheel_id = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Wheel_id").First(), client).ToString();//车轮SN号
                    client.WriteByOrder("W_AreaNr", (Int16)1, name);//区域货位号
                    client.WriteByOrder("W_IndexNr", (Int16)1, name);//托盘上的第几个车轮
                    client.WriteByOrder("W_Storage_Type", true, name);//托盘类型1-横放;2-竖放
                    client.WriteByOrder("W_Enabl_Load", true, name);//是否允许
                    var finished = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_load_finished").First(), client);//放料完成
                    if (finished)
                    {
                        client.WriteByOrder("W_Storage_update", true, name);//货位状态更新
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        /// <summary>
        /// é˜²å‘†æŽªæ–½
        /// </summary>
        static bool Gantry_Out_of_Area1;//桁架是否在区域内
        static bool Gantry_Out_of_Area2;//桁架是否在区域内
        static bool Gantry_Out_of_Area3;//桁架是否在区域内
        static bool Gantry_Out_of_Area4;//桁架是否在区域内
        public void Stupidproofmeasure(PLCClient client)
        {
            try
            {
                var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
                List<string> names = new List<string>() { "1单元防呆", "2单元防呆", "3单元防呆", "上料区防呆" };
                foreach (string name in names)
                {
                    var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == name).ToList();
                    var Release_In = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Release_In").First(), client);//允许进入
                    if (!Release_In) { }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/GantryDB.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_WCS
{
    public class GantryDB
    {
        /// <summary>
        /// è½¦è½®æ•°æ®
        /// </summary>
        public class Wheeldata
        {
            public string R_Name { get; set; }
            public int R_o_wp_type { get; set; }
            /// <summary>
            /// 1-找到数据,2-未找到工件类型数据
            /// </summary>
            public short R_i_status { get; set; }
            public int R_i_parameter_a { get; set; }
            public int R_i_parameter_b { get; set; }
            public int R_i_parameter_c { get; set; }
            public int R_i_parameter_d { get; set; }
            public int R_i_parameter_e { get; set; }
            public int R_i_parameter_f { get; set; }
            public int R_i_parameter_g { get; set; }
            public int R_i_parameter_h { get; set; }
            public string R_i_skip_op { get; set; }
            public ushort oi_on {  get; set; }
        }
        /// <summary>
        /// è®¢å•数据
        /// </summary>
        public class Orderdata
        {
        }
        /// <summary>
        /// ä¸‹æ–™ä½æ•°æ®
        /// </summary>
        public class Layoffleveldata
        {
        }
        /// <summary>
        /// ä¸Šæ–™ä½æ•°æ®
        /// </summary>
        public class Loadingleveldata
        {
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/JobBase.cs
@@ -71,7 +71,7 @@
            }
            finally
            {
                taskSeconds = Math.Round(stopwatch.Elapsed.TotalSeconds);
                taskSeconds = Math.Round(stopwatch.Elapsed.TotalSeconds,3);
                jobHistory += $"(耗时:{taskSeconds}秒)";
                if (taskSeconds > 1 || jobHistory.Contains("执行失败"))
                    WriteLog.Info(jobid + "执行记录").Write(jobHistory, jobid + "执行记录");
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs
@@ -22,7 +22,7 @@
        {
            try
            {
                ExecuteJob(context, DoAction);
                //ExecuteJob(context, DoAction);
            }
            catch { }
            return Task.CompletedTask;
@@ -32,7 +32,7 @@
        {
            //throw new NotImplementedException();
            //Creation.HCJCreation();
            //Creation.PLCinfodetail();
            Creation.PLCinfodetail();
        }
    }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/GantryJob.cs
@@ -10,6 +10,7 @@
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Jobs;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.WCSClient;
@@ -19,31 +20,35 @@
    /// æ¡æž¶
    /// </summary>
    [DisallowConcurrentExecution]
    public class GantryJob : IJob
    public class GantryJob : JobBase, IJob
    {
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                var client = context.JobDetail.JobDataMap.Get("JobParams") as PLCClient;
                if (client == null)
                {
                    return Task.CompletedTask;
                }
                //自动重连
                if (!client.IsConnected)
                {
                    client.Connect();
                    return Task.CompletedTask;
                }
                //DoAction(client);
                //ExecuteJob(context, DoAction);
                ExecuteJob(context, DoAction);
            }
            catch { }
            return Task.CompletedTask;
        }
        private void DoAction(IJobExecutionContext context)
        {
            var client = context.JobDetail.JobDataMap.Get("JobParams") as PLCClient;
            //自动重连
            if (!client.IsConnected)
            {
                client.Connect();
                return;
            }
            Gantry gantry = new Gantry();
            gantry.QueryWheeldata(client);
            gantry.QueryOrder(client);
            gantry.Layofflevel(client);
            gantry.Stupidproofmeasure(client);
        }
        #region
        static List<MachineDB> MachineDBs = new List<MachineDB>();
        static List<WheelDataDB> wheelDataDBs = new List<WheelDataDB>();
        private void DoAction(PLCClient client)
@@ -121,6 +126,7 @@
                throw;
            }
        }
        #endregion
        public void HandleReadSignal(string type, MachineDB DBItem)
        {
            switch (type)
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs
@@ -4,7 +4,15 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.FreeDB;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Jobs;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.WCSClient;
using static System.Collections.Specialized.BitVector32;
namespace WIDESEA_WCS
{
@@ -12,7 +20,7 @@
    /// é“¾æ¡æœº
    /// </summary>
    [DisallowConcurrentExecution]
    public class PipelineJob : IJob
    public class PipelineJob : JobBase, IJob
    {
        public Task Execute(IJobExecutionContext context)
        {
@@ -31,15 +39,83 @@
                    return Task.CompletedTask;
                }
                DoAction(client);
                //DoAction(client);
                ExecuteJob(context, DoAction);
            }
            catch { }
            return Task.CompletedTask;
        }
        private void DoAction(PLCClient client)
        private void DoAction(IJobExecutionContext context)
        {
            throw new NotImplementedException();
            var client = context.JobDetail.JobDataMap.Get("JobParams") as PLCClient;
            //自动重连
            if (!client.IsConnected)
            {
                client.Connect();
                return;
            }
            Loadinglevel(client);
        }
        /// <summary>
        /// ä¸Šæ–™åŒº
        /// </summary>
        /// <param name="client"></param>
        private void Loadinglevel(PLCClient client, string number = "上料区")
        {
            VOLContext Context = new VOLContext();
            Idt_plcinfoheadRepository repository = new dt_plcinfoheadRepository(Context);
            Idt_plcinfodetailRepository plcRepository = new dt_plcinfodetailRepository(Context);
            Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context);
            Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context);
            var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
            var Gantry_client = PLCClient.Clients.FirstOrDefault(t => t.PLCName == "桁架");
            if (!Gantry_client.IsConnected) return;
            var Gantryplc = repository.FindFirst(x => x.plcinfo_name == Gantry_client.PLCName);
            List<string> names = new List<string>() { "S01001001", "S01001002" };
            foreach (string name in names)
            {
                var station = stationinfoRepository.FindFirst(x => x.stationCode == name && x.enable && x.location_state == LocationStateEnum.Stroge.ToString());
                if (station == null)
                {
                    Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                    continue;
                }
                var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == name).ToList();
                var PalletSignal = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PalletSignal").First(), client);//读取托盘信号:1:有,2无
                var MaterialSignal = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_MaterialSignal").First(), client);//读取货物信号:1:有,2无
                if (PalletSignal == 1 && MaterialSignal == 1)
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)1, number);//区域货位号
                    Gantry_client.WriteByOrder("W_IndexNr", (Int16)1, number);//托盘上的第几个车轮
                    Gantry_client.WriteByOrder("W_Storage_Type", (Int16)1, number); //托盘类型1-横放;2-竖放
                    Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)1, number);//车轮类型
                    Gantry_client.WriteByOrder("W_Wheel_id", "", number);//车轮SN号
                    Gantry_client.WriteByOrder("W_RequestUnload", true, number);
                }
                else
                {
                    Gantry_client.WriteByOrder("W_RequestUnload", false, number);
                }
                var Gantrydetails = plcRepository.Find(x => x.plcdetail_iotype == Gantryplc.plcinfo_iotyep && x.plcdetail_number == number).ToList();
                var Gantry_Out_of_Area = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_Gantry_Out_of_Area").First(), Gantry_client);//桁架是否在区域内
                var QueryDate = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_QueryDate").First(), Gantry_client);//信息查询
                if (QueryDate)
                {
                    var Date_Vaild = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_Date_Vaild").First(), Gantry_client);//信息确认
                    if (!Date_Vaild)//信息有误,记录日志
                    {
                    }
                }
                var finished = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_Unlod_finished").First(), Gantry_client);//夹取完成
                if (finished)
                {
                    Gantry_client.WriteByOrder("W_Storage_update", true, number);//货位状态更新
                }
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/ToAGV/ToAGVServer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,84 @@
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.FreeDB;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.ToAGV;
namespace WIDESEA_WCS
{
    public partial class ToAGVServer
    {
        FreeDB freeDB = new FreeDB();
        static AGVRespone respone = new AGVRespone();
        static AGVRequestin requestin = new AGVRequestin();
        /// <summary>
        /// AGV申请进入区域
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public static AGVRespone AGVRequestin(string json)
        {
            return GetSetGantry(json, "AGVRequestin", "AGV申请进入区域");
        }
        /// <summary>
        ///  AGV正在(进入/离开)
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public static AGVRespone EnteriorLeav(string json)
        {
            return GetSetGantry(json, "EnteriorLeav", "AGV正在(进入/离开)");
        }
        /// <summary>
        /// AGV更新区域状态
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public static AGVRespone AGVOutofArea(string json)
        {
            return GetSetGantry(json, "AGVOutofArea", "AGV更新区域状态");
        }
        /// <summary>
        /// AGV获取桁架区域状态
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public static AGVRespone GantryOutofArea(string json)
        {
            return GetSetGantry(json, "GantryOutofArea", "AGV获取桁架区域状态");
        }
        public static AGVRespone GetSetGantry(string json, string MethodName, string remark)
        {
            try
            {
                if (string.IsNullOrEmpty(json) || json == "null")
                    throw new Exception("未获取到请求参数数据");
                requestin = JsonConvert.DeserializeObject<AGVRequestin>(json);
                if (requestin.AreaNr < 1 || requestin.AreaNr > 4)
                    throw new Exception("未定义的区域号!");
                respone = AGVandGantry.GetSetGantry(requestin, MethodName);
            }
            catch (Exception ex)
            {
                respone.Message = ex.Message;
            }
            WritePCSLog.LogAdd(requestin.AreaNr.ToString(), respone.success == 1 ? "成功 " : "失败", "WMS", "AGV", json, JsonConvert.SerializeObject(respone), remark, MethodName, respone.Message);
            return respone;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/DBExtension.cs
@@ -1,4 +1,5 @@
using System;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -18,43 +19,62 @@
        /// <exception cref="Exception"></exception>
        public static object Read(dt_plcinfodetail detail, PLCClient client)
        {
                if (detail.plcdetail_valtype == typeof(int).Name.ToLower())//4字节,有符号类型
                {
                    return (client.Read<int>(detail.plcdetail_db+"."+detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(uint).Name.ToLower())//4字节,无符号类型
                {
                    return (client.Read<uint>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(short).Name.ToLower())//2字节,有符号类型,最常用
                {
                    return (client.Read<short>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(ushort).Name.ToLower())//2字节,无符号类型
                {
                    return (client.Read<ushort>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(float).Name.ToLower())//浮点型
                {
                    return (client.Read<float>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(bool).Name.ToLower())
                {
                    return (client.Read<bool>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(byte).Name.ToLower())//字节
                {
                    return (client.Read<byte>(detail.plcdetail_db + "." + detail.plcdetail_value));
                }
                else if (detail.plcdetail_valtype == typeof(string).Name.ToLower())//字符串
                {
                    return (client.Read<string>(detail.plcdetail_db + "." + detail.plcdetail_value, detail.plcdetail_len.GetValueOrDefault()));
                }
                else
                {
                    throw new Exception($"【{detail.plcdetail_remark}】,DB地址{detail.plcdetail_db + "." + detail.plcdetail_value},未定义数据类型{detail.plcdetail_valtype}");
                }
            if (detail.plcdetail_valtype == typeof(int).Name.ToLower())//4字节,有符号类型
            {
                return (client.Read<int>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(uint).Name.ToLower())//4字节,无符号类型
            {
                return (client.Read<uint>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(short).Name.ToLower())//2字节,有符号类型,最常用
            {
                return (client.Read<short>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(ushort).Name.ToLower())//2字节,无符号类型
            {
                return (client.Read<ushort>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(float).Name.ToLower())//浮点型
            {
                return (client.Read<float>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(bool).Name.ToLower())
            {
                return (client.Read<bool>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(byte).Name.ToLower())//字节
            {
                return (client.Read<byte>(detail.plcdetail_db + "." + detail.plcdetail_value));
            }
            else if (detail.plcdetail_valtype == typeof(string).Name.ToLower())//字符串
            {
                return (client.Read<string>(detail.plcdetail_db + "." + detail.plcdetail_value, detail.plcdetail_len.GetValueOrDefault()));
            }
            else
            {
                throw new Exception($"【{detail.plcdetail_remark}】,DB地址{detail.plcdetail_db + "." + detail.plcdetail_value},未定义数据类型{detail.plcdetail_valtype}");
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="detail"></param>
        /// <param name="client"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static object Write(dt_plcinfodetail detail, PLCClient client, object value)
        {
            try
            {
                return (client.Write(detail.plcdetail_db + "." + detail.plcdetail_value, value));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToAGV/ToAGVController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.ToAGV;
using WIDESEA_WCS;
namespace ToAGV.Controllers
{
    /// <summary>
    /// AGV接口
    /// </summary>
    [Route("api/ToAGV")]
    [ApiController]
    public class ToAGVController : ControllerBase
    {
        /// <summary>
        /// AGV申请进入区域
        /// </summary>
        /// <param name="saveModel">请求参数</param>
        /// <returns></returns>
        [HttpPost, Route("AGVRequestin"), Authorize, AllowAnonymous]
        public AGVRespone AGVRequestin([FromBody] object saveModel)
        {
            return ToAGVServer.AGVRequestin(JsonConvert.SerializeObject(saveModel));
        }
        /// <summary>
        /// AGV正在(进入/离开)
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        [HttpPost, Route("EnteriorLeav"), Authorize, AllowAnonymous]
        public AGVRespone EnteriorLeav([FromBody] object saveModel)
        {
            return ToAGVServer.EnteriorLeav(JsonConvert.SerializeObject(saveModel));
        }
        /// <summary>
        /// AGV更新区域状态
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        [HttpPost, Route("AGVOutofArea"), Authorize, AllowAnonymous]
        public AGVRespone AGVOutofArea([FromBody] object saveModel)
        {
            return ToAGVServer.AGVOutofArea(JsonConvert.SerializeObject(saveModel));
        }
        /// <summary>
        /// AGV获取桁架区域状态
        /// </summary>
        /// <param name="saveModel"></param>
        /// <returns></returns>
        [HttpPost, Route("GantryOutofArea"), Authorize, AllowAnonymous]
        public AGVRespone GantryOutofArea([FromBody] object saveModel)
        {
            return ToAGVServer.GantryOutofArea(JsonConvert.SerializeObject(saveModel));
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToMes/ToMESController.cs
@@ -5,6 +5,9 @@
namespace WIDESEA_WebApi.Controllers.ToMes
{
    /// <summary>
    /// MES接口
    /// </summary>
    [Route("api/ToMes")]
    [ApiController]
    public class ToMESController : ControllerBase
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/Partial/dt_Interfacerecord_pcsController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_Interfacerecord_pcs",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_System.IServices;
namespace WIDESEA_System.Controllers
{
    public partial class dt_Interfacerecord_pcsController
    {
        private readonly Idt_Interfacerecord_pcsService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_Interfacerecord_pcsController(
            Idt_Interfacerecord_pcsService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_System/dt_Interfacerecord_pcsController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_Interfacerecord_pcsController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_System.IServices;
namespace WIDESEA_System.Controllers
{
    [Route("api/dt_Interfacerecord_pcs")]
    [PermissionTable(Name = "dt_Interfacerecord_pcs")]
    public partial class dt_Interfacerecord_pcsController : ApiBaseController<Idt_Interfacerecord_pcsService>
    {
        public dt_Interfacerecord_pcsController(Idt_Interfacerecord_pcsService service)
        : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Startup.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Autofac;
@@ -123,12 +124,12 @@
                //分为2份接口文档
                c.SwaggerDoc("v1", new OpenApiInfo { Title = "WIDESEA_Core后台Api", Version = "v1", Description = "这是对文档的描述。。" });
                c.SwaggerDoc("v2", new OpenApiInfo { Title = "WIDESEA_Core对外三方Api", Version = "v2", Description = "xxx接口文档" });  //控制器里使用[ApiExplorerSettings(GroupName = "v2")]              
                                                                                                                             //启用中文注释功能
                                                                                                                             // var basePath = PlatformServices.Default.Application.ApplicationBasePath;
                                                                                                                             //  var xmlPath = Path.Combine(basePath, "WIDESEA_WebApi.xml");
                                                                                                                             //   c.IncludeXmlComments(xmlPath, true);//显示控制器xml注释内容
                                                                                                                             //添加过滤器 å¯è‡ªå®šä¹‰æ·»åŠ å¯¹æŽ§åˆ¶å™¨çš„æ³¨é‡Šæè¿°
                                                                                                                             //c.DocumentFilter<SwaggerDocTag>();
                                                                                                                                 //启用中文注释功能
                                                                                                                                 // var basePath = PlatformServices.Default.Application.ApplicationBasePath;
                                                                                                                                 //  var xmlPath = Path.Combine(basePath, "WIDESEA_WebApi.xml");
                                                                                                                                 //   c.IncludeXmlComments(xmlPath, true);//显示控制器xml注释内容
                                                                                                                                 //添加过滤器 å¯è‡ªå®šä¹‰æ·»åŠ å¯¹æŽ§åˆ¶å™¨çš„æ³¨é‡Šæè¿°
                                                                                                                                 //c.DocumentFilter<SwaggerDocTag>();
                var security = new Dictionary<string, IEnumerable<string>> { { AppSetting.Secret.Issuer, new string[] { } } };
                c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme()
@@ -140,7 +141,13 @@
                    BearerFormat = "JWT",
                    Scheme = "Bearer"
                });
                #region å¯ç”¨ä¸­æ–‡æ³¨é‡ŠåŠŸèƒ½
                //WIDESEA_WebApi下的PropertyGroup添加<GenerateDocumentationFile>true</GenerateDocumentationFile><!--启用中文注释功能-->
                //启用中文注释功能
                var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
                //IncludeXmlComments true æ˜¾ç¤ºæŽ§åˆ¶å™¨æ³¨é‡Š
                c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename), true);
                #endregion
                c.AddSecurityRequirement(new OpenApiSecurityRequirement
                {
                    {
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/WIDESEA_WebApi.csproj
@@ -1,39 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>disable</Nullable>
    <UserSecretsId>a3e3c6fb-4b7e-44a6-8dbe-5e5f11af4202</UserSecretsId>
    <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
  </PropertyGroup>
    <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <Nullable>disable</Nullable>
        <UserSecretsId>a3e3c6fb-4b7e-44a6-8dbe-5e5f11af4202</UserSecretsId>
        <GenerateDocumentationFile>true</GenerateDocumentationFile><!--启用中文注释功能-->
        <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
    </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <OutputPath>bin\Debug\netcoreapp6.0\</OutputPath>
    <DocumentationFile>bin\Debug\netcoreapp6.0\WIDESEA_WebApi.xml</DocumentationFile>
    <NoWarn>1701;1702;CS1591;CS8618;CS8600;CS8602;CS1572;CS1573;CS1587;CS1591;CS1570;CS8765;</NoWarn>
  </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
        <OutputPath>bin\Debug\netcoreapp6.0\</OutputPath>
        <DocumentationFile>bin\Debug\netcoreapp6.0\WIDESEA_WebApi.xml</DocumentationFile>
        <NoWarn>1701;1702;CS1591;CS8618;CS8600;CS8602;CS1572;CS1573;CS1587;CS1591;CS1570;CS8765;</NoWarn>
    </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <DocumentationFile>bin\Release\netcoreapp6.0\WIDESEA_WebApi.xml</DocumentationFile>
    <OutputPath>bin\Release\netcoreapp6.0\</OutputPath>
    <NoWarn>1701;1702;CS1572;CS1573;CS1587;CS8618;CS8600;CS8602;CS1591;CS1570;CS8765;</NoWarn>
  </PropertyGroup>
    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
        <DocumentationFile>bin\Release\netcoreapp6.0\WIDESEA_WebApi.xml</DocumentationFile>
        <OutputPath>bin\Release\netcoreapp6.0\</OutputPath>
        <NoWarn>1701;1702;CS1572;CS1573;CS1587;CS8618;CS8600;CS8602;CS1591;CS1570;CS8765;</NoWarn>
    </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
    <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
    <PackageReference Include="Quartz" Version="3.6.3" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.0.0" />
  </ItemGroup>
    <ItemGroup>
        <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
        <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
        <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.15.1" />
        <PackageReference Include="Quartz" Version="3.6.3" />
        <PackageReference Include="Swashbuckle.AspNetCore" Version="6.0.0" />
    </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\WIDESEA_Builder\WIDESEA_Builder.csproj" />
    <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" />
    <ProjectReference Include="..\WIDESEA_Entity\WIDESEA_Entity.csproj" />
    <ProjectReference Include="..\WIDESEA_System\WIDESEA_System.csproj" />
    <ProjectReference Include="..\WIDESEA_WCS\WIDESEA_WCS.csproj" />
  </ItemGroup>
    <ItemGroup>
        <ProjectReference Include="..\WIDESEA_Builder\WIDESEA_Builder.csproj" />
        <ProjectReference Include="..\WIDESEA_Core\WIDESEA_Core.csproj" />
        <ProjectReference Include="..\WIDESEA_Entity\WIDESEA_Entity.csproj" />
        <ProjectReference Include="..\WIDESEA_System\WIDESEA_System.csproj" />
        <ProjectReference Include="..\WIDESEA_WCS\WIDESEA_WCS.csproj" />
    </ItemGroup>
</Project>
´úÂë¹ÜÀí/WMS/WMS_Client/src/extension/widesea_wms/baseinfo/dt_geometry_data.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridFooter: '',
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
  },
  tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  buttons: { view: [], box: [], detail: [] }, //扩展的按钮
  methods: {
     //下面这些方法可以保留也可以删除
    onInit() {  //框架初始化配置前,
        //示例:在按钮的最前面添加一个按钮
        //   this.buttons.unshift({  //也可以用push或者splice方法来修改buttons数组
        //     name: '按钮', //按钮名称
        //     icon: 'el-icon-document', //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档)
        //     type: 'primary', //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button
        //     onClick: function () {
        //       this.$Message.success('点击了按钮');
        //     }
        //   });
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // this.boxOptions.labelWidth = 150;
    },
    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;
´úÂë¹ÜÀí/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js
@@ -41,6 +41,12 @@
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // this.boxOptions.labelWidth = 150;
        this.pagination.order = "asc";
        this.columns.forEach(row=>{
          if(row.field=="stationCode"){
            row.sort=true;
          }
        })
        this.buttons.splice(1, 0, {
          name: "取消禁用",
          icon: 'md-refresh',
´úÂë¹ÜÀí/WMS/WMS_Client/src/router/viewGird.js
@@ -173,6 +173,10 @@
      path: '/Dt_Interfacerecord',
      name: 'Dt_Interfacerecord',
      component: () => import('@/views/widesea_system/system/Dt_Interfacerecord.vue')
  }]
  }    ,{
        path: '/dt_geometry_data',
        name: 'dt_geometry_data',
        component: () => import('@/views/widesea_wms/baseinfo/dt_geometry_data.vue')
    }]
export default viewgird
´úÂë¹ÜÀí/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wms/baseinfo/dt_geometry_data.js此处编写
 -->
<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/widesea_wms/baseinfo/dt_geometry_data.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'TypeId',
                footer: "Foots",
                cnName: '车轮信息',
                name: 'baseinfo/dt_geometry_data',
                url: "/dt_geometry_data/",
                sortName: "TypeId"
            });
            const editFormFields = ref({"Description":"","a":"","b":"","c":"","d":"","e":"","f":"","g":"","h":""});
            const editFormOptions = ref([[{"title":"图号","required":true,"field":"Description","type":"text"}],
                              [{"title":"","required":true,"field":"a","type":"text"},
                               {"title":"","required":true,"field":"b","type":"text"}],
                              [{"title":"","required":true,"field":"c","type":"text"},
                               {"title":"","required":true,"field":"d","type":"text"}],
                              [{"title":"","required":true,"field":"e","type":"text"},
                               {"title":"","required":true,"field":"f","type":"text"}],
                              [{"title":"","required":true,"field":"g","type":"text"},
                               {"title":"","required":true,"field":"h","type":"decimal"}]]);
            const searchFormFields = ref({"Description":""});
            const searchFormOptions = ref([[{"title":"图号","field":"Description","type":"like"}]]);
            const columns = ref([{field:'TypeId',title:'TypeId',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Description',title:'图号',type:'string',width:120,require:true,align:'left',sort:true},
                       {field:'a',title:'a',type:'float',width:110,require:true,align:'left'},
                       {field:'b',title:'b',type:'float',width:110,require:true,align:'left'},
                       {field:'c',title:'c',type:'float',width:110,require:true,align:'left'},
                       {field:'d',title:'d',type:'float',width:110,require:true,align:'left'},
                       {field:'e',title:'e',type:'float',width:110,require:true,align:'left'},
                       {field:'f',title:'f',type:'float',width:110,require:true,align:'left'},
                       {field:'g',title:'g',type:'float',width:110,require:true,align:'left'},
                       {field:'h',title:'h',type:'float',width:110,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
´úÂë¹ÜÀí/WMS/WMS_Client/src/views/widesea_wms/system/dt_stationinfo.vue
@@ -29,8 +29,14 @@
                url: "/dt_stationinfo/",
                sortName: "zj"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const editFormFields = ref({"stationCode":"","location_state":"","bindSN":"","tray_status":"","Number":"","heatNumber":"","remark":""});
            const editFormOptions = ref([[{"title":"缓存架编号","field":"stationCode","disabled": true}],
                              [{"dataKey":"location_states","data":[],"title":"货位状态","field":"location_state","type":"select"}],
                              [{"title":"车轮SN号","field":"bindSN"}],
                              [{"dataKey":"tray_status","data":[],"title":"托盘状态","field":"tray_status"}],
                              [{"title":"工单编号","field":"Number"}],
                              [{"title":"炉号","field":"heatNumber","type":"text"}],
                              [{"title":"备注","field":"remark"}]]);
            const searchFormFields = ref({"stationCode":"","stationType":"","area":"","enable":"","location_state":[],"bindSN":""});
            const searchFormOptions = ref([[{"title":"缓存架编号","field":"stationCode","type":"like"},{"title":"车轮SN号","field":"bindSN","type":"like"},{"dataKey":"materielinfos","data":[],"title":"物料类型","field":"stationType","type":"select"}],[{"dataKey":"area_name","data":[],"title":"区域","field":"area","type":"select"},{"dataKey":"location_states","data":[],"title":"货位状态","field":"location_state","type":"selectList"},{"dataKey":"status","data":[],"title":"是否启用","field":"enable","type":"select"}]]);
            const columns = ref([{field:'id',title:'id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs
@@ -82,7 +82,7 @@
        /// <summary>
        /// æ·»åŠ æ—¥å¿—
        /// </summary>
        private static void Write(string describe, object info, LogState logState, string dataFrom, string createuser)
        public static void Write(string describe, object info, LogState logState, string dataFrom, string createuser)
        {
            try
            {
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Core/UserManager/UserContext.cs
@@ -97,13 +97,14 @@
                    Role_Id = s.Role_Id.GetInt(),
                    RoleName = s.RoleName,
                    //2022.08.15增加部门id
                    DeptId = s.Dept_Id??0,
                    DeptId = s.Dept_Id ?? 0,
                    Token = s.Token,
                    UserName = s.UserName,
                    UserTrueName = s.UserTrueName,
                    Enable = s.Enable,
                    DeptIds= s.DeptIds,
                    systemType=s.systemType
                    DeptIds = s.DeptIds,
                    systemType = s.systemType,
                    Tel = s.Tel
                }).ToList().Select(s => new UserInfo()
                {
                    User_Id = userId,
@@ -112,8 +113,9 @@
                    UserName = s.UserName,
                    UserTrueName = s.UserTrueName,
                    Enable = 1,
                    Tel = s.Tel,
                    DeptIds = string.IsNullOrEmpty(s.DeptIds) ? new List<Guid>() : s.DeptIds.Split(",").Select(x => (Guid)x.GetGuid()).ToList(),
                    systemType=s.systemType
                    systemType = s.systemType
                }).FirstOrDefault();
            if (_userInfo != null && _userInfo.User_Id > 0)
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,113 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "车轮信息",TableName = "dt_geometry_data")]
    public partial class dt_geometry_data:BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Key]
       [Display(Name ="TypeId")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int TypeId { get; set; }
       /// <summary>
       ///图号
       /// </summary>
       [Display(Name ="图号")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string Description { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="a")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float a { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="b")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float b { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="c")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float c { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="d")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float d { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="e")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float e { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="f")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float f { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="g")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float g { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="h")]
       [Column(TypeName="float")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public float h { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/partial/dt_geometry_data.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Entity.SystemModels;
namespace WIDESEA_Entity.DomainModels
{
    public partial class dt_geometry_data
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/UserInfo.cs
@@ -36,5 +36,6 @@
        public List<Guid> DeptIds { get; set; }
        public string Token { get; set; }
        public string Tel { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/Taskinfo/dt_agvtask.cs
@@ -111,9 +111,9 @@
        public DateTime agv_createtime { get; set; }
        /// <summary>
        ///执行时间
        ///下发时间
        /// </summary>
        [Display(Name = "执行时间")]
        [Display(Name = "下发时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? agv_realesstime { get; set; }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/MappingConfiguration/BaseInfo/dt_geometry_dataMapConfig.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
using WIDESEA_Entity.MappingConfiguration;
using WIDESEA_Entity.DomainModels;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace WIDESEA_Entity.MappingConfiguration
{
    public class dt_geometry_dataMapConfig : EntityMappingConfiguration<dt_geometry_data>
    {
        public override void Map(EntityTypeBuilder<dt_geometry_data>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/ToAGV/AGVRespone.cs
@@ -6,6 +6,9 @@
namespace WIDESEA_Entity.ToAGV
{
    /// <summary>
    /// åé¦ˆç»™AGV信息
    /// </summary>
    public class AGVRespone
    {
        /// <summary>
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/ToAGV/RequestTask.cs
@@ -6,6 +6,9 @@
namespace WIDESEA_Entity.ToAGV
{
    /// <summary>
    /// ä»»åŠ¡ä¸‹å‘ä¿¡æ¯
    /// </summary>
    public class RequestTask
    {
        /// <summary>
@@ -21,13 +24,40 @@
        /// </summary>
        public string TO_POSITION { get; set; }
        /// <summary>
        /// ä»»åŠ¡ç­‰çº§
        /// </summary>
        public int? Grade { get; set; }
        /// <summary>
        /// æ•°é‡
        /// </summary>
        public int? Quantity { get; set; }
        /// <summary>
        /// ç‰©æ–™ä¿¡æ¯
        /// </summary>
        public string Material { get; set; }
        #region è½¦è½®æ•°æ®
        public float A { get; set; }
        public float B { get; set; }
        public float C { get; set; }
        public float D { get; set; }
        public float E { get; set; }
        public float F { get; set; }
        public float G { get; set; }
        public float H { get; set; }
        #endregion
    }
    /// <summary>
    /// AGV反馈信息
    /// </summary>
    public class Respone
    {
        /// <summary>
        /// ä»»åŠ¡ç­‰çº§
        /// 1成功
        /// </summary>
        public int? Priority { get; set; }
        public int? agv_qty { get; set; }
        public bool Success { get; set; }
        /// <summary>
        /// å¤±è´¥ï¼Œè¿”回失败信息
        /// </summary>
        public string Msg { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WCS/IRepositories/BaseInfo/Idt_geometry_dataRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_geometry_dataRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_WCS.IRepositories
{
    public partial interface Idt_geometry_dataRepository : IDependency,IRepository<dt_geometry_data>
    {
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WCS/IServices/BaseInfo/Idt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_geometry_dataService : IService<dt_geometry_data>
    {
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WCS/IServices/BaseInfo/Partial/Idt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
/*
*所有关于dt_geometry_data类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_geometry_dataService
    {
    }
 }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WCS/Repositories/BaseInfo/dt_geometry_dataRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_geometry_dataRepository编写代码
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Repositories
{
    public partial class dt_geometry_dataRepository : RepositoryBase<dt_geometry_data> , Idt_geometry_dataRepository
    {
    public dt_geometry_dataRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_geometry_dataRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_geometry_dataRepository>(); } }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WCS/Services/BaseInfo/Partial/dt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
/*
 *所有关于dt_geometry_data类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_geometry_dataService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WCS.IRepositories;
namespace WIDESEA_WCS.Services
{
    public partial class dt_geometry_dataService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_geometry_dataRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_geometry_dataService(
            Idt_geometry_dataRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WCS/Services/BaseInfo/dt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_geometry_dataService与Idt_geometry_dataService中编写
 */
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.Services
{
    public partial class dt_geometry_dataService : ServiceBase<dt_geometry_data, Idt_geometry_dataRepository>
    , Idt_geometry_dataService, IDependency
    {
    public dt_geometry_dataService(Idt_geometry_dataRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_geometry_dataService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_geometry_dataService>(); } }
    }
 }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/AGVServer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Common;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.ToAGV;
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.Repositories;
namespace WIDESEA_WMS.Common
{
    public partial class AGVServer
    {
        static FreeDB freeDB = new FreeDB();
        static Respone respone = new Respone();
        static RequestTask requestTask = new RequestTask();
        static string postJson = string.Empty;
        static string report = string.Empty;
        /// <summary>
        /// ä»»åŠ¡ä¸‹å‘
        /// </summary>
        public static void SendAgvTask()
        {
            try
            {
                var agv_task = freeDB.Select<dt_agvtask>()
                        .Where(t => t.agv_taskstate == AGVTaskStateEnum.Create.ToString()
                               && (t.agv_tasktype == "TaskType_Outbound" || t.agv_tasktype == "TaskType_Inbound" || t.agv_tasktype == "TaskType_AOutbound")
                               && string.IsNullOrEmpty(t.agv_remark))
                        .OrderByDescending(t => t.agv_grade)
                        .OrderBy(t => t.agv_createtime)
                        .First();
                if (agv_task == null)
                    agv_task = freeDB.Select<dt_agvtask>()
                        .Where(t => t.agv_taskstate == AGVTaskStateEnum.Create.ToString()
                               && (t.agv_tasktype == "TaskType_Outbound" || t.agv_tasktype == "TaskType_Inbound" || t.agv_tasktype == "TaskType_AOutbound")
                               && !string.IsNullOrEmpty(t.agv_remark))
                        .OrderByDescending(t => t.agv_grade)
                        .OrderBy(t => t.agv_createtime)
                        .First();
                if (agv_task != null)
                {
                    var Materiel = QueryData.QueryMateriel(agv_task.agv_materielid);//查找车轮数据
                    if (Materiel == null)
                    {
                        agv_task.agv_remark = "未获取到当前任务的车轮数据";
                        freeDB.Update(agv_task).UpdateColumns(t => new { t.agv_remark }).ExecuteAffrows();
                        throw new Exception("未查询到当前任务的车轮类型数据,任务ID:" + agv_task.agv_tasknum);
                    }
                    requestTask.TASK_NO = agv_task.agv_tasknum;
                    requestTask.FROM_POSITION = agv_task.agv_fromaddress;
                    requestTask.TO_POSITION = agv_task.agv_toaddress;
                    requestTask.Material = agv_task.agv_materielid;
                    requestTask.Grade = agv_task.agv_grade;
                    requestTask.Quantity = agv_task.agv_qty;
                    requestTask.A = Materiel.a;
                    requestTask.B = Materiel.b;
                    requestTask.C = Materiel.c;
                    requestTask.D = Materiel.d;
                    requestTask.E = Materiel.e;
                    requestTask.F = Materiel.f;
                    requestTask.G = Materiel.g;
                    requestTask.H = Materiel.h;
                    postJson = JsonConvert.SerializeObject(requestTask);
                    report = Request.RequestData(postJson, "http://192.168.12.250:5566/api/TaskCreat/CreatTask");
                    respone = JsonConvert.DeserializeObject<Respone>(report);
                    if (respone.Success)
                    {
                        agv_task.agv_taskstate = AGVTaskStateEnum.SendOut.ToString();
                        agv_task.agv_realesstime = DateTime.Now;
                        freeDB.Update(agv_task).UpdateColumns(t => new { t.agv_realesstime, t.agv_taskstate }).ExecuteAffrows();
                    }
                }
            }
            catch (Exception ex)
            {
                respone.Success = false;
                respone.Msg = ex.Message;
            }
            WriteWMSLog.LogAdd(requestTask.TASK_NO, respone.Success ? "成功 " : "失败", "AGV", "WMS", postJson, report, "下发AGV任务", "SendAGVTask", respone.Msg);
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/Task.cs ÐÞ¸Ä
@@ -12,11 +12,11 @@
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.Repositories;
namespace WIDESEA_WMS
namespace WIDESEA_WMS.Common
{
    public class Task
    public class HandleTask
    {
        static FreeDB freeDB = new FreeDB();
        public static FreeDB freeDB = new FreeDB();
        /// <summary>
        /// æ·»åŠ åŽ†å²ä»»åŠ¡
        /// </summary>
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/Gantry/QueryData.cs
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/QueryData.cs ÐÞ¸Ä
@@ -6,7 +6,7 @@
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS
namespace WIDESEA_WMS.Common
{
    public class QueryData
    {
@@ -16,9 +16,9 @@
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static dt_materielinfo QueryMateriel(string type)
        public static dt_geometry_data QueryMateriel(string type)
        {
            var materielinfo = freeDB.Select<dt_materielinfo>().Where(x => x.materiel_id == type).First();
            var materielinfo = freeDB.Select<dt_geometry_data>().Where(x => x.TypeId.ToString() == type).First();
            return materielinfo;
        }
    }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IRepositories/BaseInfo/Idt_geometry_dataRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_geometry_dataRepository编写接口
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Extensions.AutofacManager;
namespace WIDESEA_WMS.IRepositories
{
    public partial interface Idt_geometry_dataRepository : IDependency,IRepository<dt_geometry_data>
    {
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IServices/BaseInfo/Idt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS.IServices
{
    public partial interface Idt_geometry_dataService : IService<dt_geometry_data>
    {
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IServices/BaseInfo/Partial/Idt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
/*
*所有关于dt_geometry_data类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_WMS.IServices
{
    public partial interface Idt_geometry_dataService
    {
    }
 }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/IServices/system/Partial/Idt_stationinfoService.cs
@@ -9,5 +9,6 @@
{
    public partial interface Idt_stationinfoService
    {
        WebResponseContent SetStationEnable(object parm);
    }
 }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Repositories/BaseInfo/dt_geometry_dataRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_geometry_dataRepository编写代码
 */
using WIDESEA_WMS.IRepositories;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS.Repositories
{
    public partial class dt_geometry_dataRepository : RepositoryBase<dt_geometry_data> , Idt_geometry_dataRepository
    {
    public dt_geometry_dataRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_geometry_dataRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_geometry_dataRepository>(); } }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/Partial/dt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
/*
 *所有关于dt_geometry_data类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_geometry_dataService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
using System.Linq;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
using WIDESEA_Core.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WMS.IRepositories;
namespace WIDESEA_WMS.Services
{
    public partial class dt_geometry_dataService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_geometry_dataRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_geometry_dataService(
            Idt_geometry_dataRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
  }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/BaseInfo/dt_geometry_dataService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_geometry_dataService与Idt_geometry_dataService中编写
 */
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.IServices;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.Extensions.AutofacManager;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS.Services
{
    public partial class dt_geometry_dataService : ServiceBase<dt_geometry_data, Idt_geometry_dataRepository>
    , Idt_geometry_dataService, IDependency
    {
    public dt_geometry_dataService(Idt_geometry_dataRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_geometry_dataService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_geometry_dataService>(); } }
    }
 }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/system/Partial/dt_stationinfoService.cs
@@ -17,9 +17,19 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_WMS.IRepositories;
using Newtonsoft.Json;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.FreeDB;
using WIDESEA_Core.ManageUser;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
namespace WIDESEA_WMS.Services
{
    public class Parm
    {
        public List<string> data { get; set; }
        public int type { get; set; }
    }
    public partial class dt_stationinfoService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
@@ -37,6 +47,53 @@
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
        FreeDB freeDB=new FreeDB();
        /// <summary>
        /// è®¾ç½®ç¼“存架禁用启用
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public WebResponseContent SetStationEnable(object json)
        {
            WebResponseContent webResponse = new WebResponseContent();
            try
            {
                var Tel = UserContext.Current.UserInfo.Tel;//缓存架权限
                var data = JsonConvert.DeserializeObject<Parm>(json.ToString());
                //var updateList = FreeDB.DB.Select<dt_stationinfo>().Where(t => data.data.Contains(t.id.ToString())).ToList();
                var updateList = _repository.Find(x => data.data.Contains(x.id.ToString())).ToList();
                if (!string.IsNullOrEmpty(Tel))
                {
                    var types = Tel.Split(',');
                    foreach (var update in updateList)
                    {
                        var OK = false;
                        foreach (var type in types)
                        {
                            if (update.stationCode.Contains(type))
                                OK = true;
                        }
                        if (!OK) throw new Exception("当前账号无禁用权限!");
                    }
                }
                var res = freeDB.Update<dt_stationinfo>()
                     .Set(t => t.enable, data.type == 1)
                     .Where(t => data.data.Contains(t.id.ToString()))
                     .ExecuteAffrows();
                var msg = data.type == 1 ? "启用" : "禁用";
                WriteDBLog.Write($"手动{msg}站点 ", $"{string.Join('、', updateList.Select(t => t.stationCode).ToArray())}", LogState.Sucess, "WCS", UserContext.Current.UserName);
                webResponse.OK();
            }
            catch (Exception ex)
            {
                WriteDBLog.Write($"手动启用或禁用站点 ", new { é”™è¯¯ä¿¡æ¯ = ex.Message, æ•°æ® = json }, LogState.Error, "WCS", UserContext.Current.UserName);
                webResponse.Error(ex.Message);
            }
            return webResponse;
        }
        public override WebResponseContent Add(SaveModel saveDataModel)
        {
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToAGV/ToAGVServer.cs
@@ -1,18 +1,10 @@
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Common;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.ToAGV;
using WIDESEA_WMS.Common;
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.Repositories;
@@ -36,6 +28,8 @@
                if (string.IsNullOrEmpty(json) || json == "null")
                    throw new Exception("未获取到请求参数数据");
                tasteInfo = JsonConvert.DeserializeObject<UpdateTasteInfo>(json);
                if (tasteInfo == null)
                    throw new Exception("请求参数格式不对!");
                if (string.IsNullOrEmpty(tasteInfo.TASK_NO))
                    throw new Exception("未获取到任务号!");
                var task = repository.FindFirst(x => x.agv_tasknum == tasteInfo.TASK_NO);
@@ -47,7 +41,8 @@
                if (task.agv_taskstate == StateName)
                {
                    respone.success = 2;
                    throw new Exception(tasteInfo.TASK_NO + ":重复调用,任务状态为:" + tasteInfo.TASK_State);
                    respone.Message = tasteInfo.TASK_NO + ":重复调用,任务状态为:" + tasteInfo.TASK_State;
                    return respone;
                }
                if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Executing)
                    task.agv_executingBeginTime = DateTime.Now;
@@ -61,9 +56,9 @@
                    throw new Exception("任务状态更新失败!任务ID:" + tasteInfo.TASK_NO + ";任务状态:" + tasteInfo.TASK_State);
                if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Complete1)
                {
                    Task.AddHtyTask(task);
                    Task.Updateinventory(task);
                    Task.AutoUpdateHCJState(task);
                    HandleTask.AddHtyTask(task);
                    HandleTask.Updateinventory(task);
                    HandleTask.AutoUpdateHCJState(task);
                }
            }
            catch (Exception ex)
@@ -76,44 +71,6 @@
                WriteWMSLog.LogAdd(tasteInfo.TASK_NO, respone.success == 1 ? "成功 " : "失败", "WMS", "AGV", json, JsonConvert.SerializeObject(respone), "AGV反馈任务状态", "UpdateTaskState", respone.Message);
            }
            return respone;
        }
        /// <summary>
        /// ä¸‹å‘AGV任务
        /// </summary>
        /// <param name="agvtask"></param>
        public static void SendAGVTask(dt_agvtask agvtask)
        {
            if (agvtask == null) return;
            VOLContext context = new VOLContext();
            Idt_agvtaskRepository repository = new dt_agvtaskRepository(context);
            AGVRespone respone = new AGVRespone();
            RequestTask requestTask = new RequestTask();
            string postJson = string.Empty;
            string report = string.Empty;
            string url = "http://127.0.0.1/api/TaskCreat/CreatTask";
            try
            {
                requestTask.TASK_NO = agvtask.agv_tasknum;
                requestTask.FROM_POSITION = agvtask.agv_fromaddress;
                requestTask.TO_POSITION = agvtask.agv_toaddress;
                requestTask.Material = agvtask.agv_materielid;
                requestTask.Priority = agvtask.agv_grade;
                requestTask.agv_qty = agvtask.agv_qty;
                postJson = JsonConvert.SerializeObject(requestTask);
                report = Request.RequestData(postJson, url);
                respone = JsonConvert.DeserializeObject<AGVRespone>(report);
                if (respone.success != 1)
                    throw new Exception(respone.Message);
                agvtask.agv_taskstate = AGVTaskStateEnum.SendOut.ToString();
                agvtask.agv_realesstime = DateTime.Now;
                repository.Update(agvtask, true);
            }
            catch (Exception ex)
            {
                respone.Message = ex.Message;
            }
            WriteWMSLog.LogAdd(requestTask.TASK_NO, respone.success == 1 ? "成功 " : "失败", "AGV", "WMS", postJson, report, "下发AGV任务", "SendAGVTask", respone.Message);
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/JobTask.cs
@@ -3,15 +3,16 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WIDESEA_WMS.Common;
namespace WIDESEA_WebApi.Controllers
{
    public class JobTask : Job
    {
        [Invoke(Begin = "2024-01-19 00:00", Interval = 1000*5, /*IsEnabled = true,*/ SkipWhileExecuting = true)]
        [Invoke(Begin = "2024-01-01 00:00", Interval = 1000 * 5, /*IsEnabled = true,*/ SkipWhileExecuting = true)]
        public void TaskTime()
        {
            //Console.WriteLine(DateTime.Now.ToString());
            AGVServer.SendAgvTask();
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WMS/Partial/dt_geometry_dataController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_geometry_data",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WMS.IServices;
namespace WIDESEA_WMS.Controllers
{
    public partial class dt_geometry_dataController
    {
        private readonly Idt_geometry_dataService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_geometry_dataController(
            Idt_geometry_dataService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WMS/Partial/dt_stationinfoController.cs
@@ -11,6 +11,8 @@
using Microsoft.AspNetCore.Http;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WMS.IServices;
using WIDESEA_Core.Utilities;
using WIDESEA_WMS.Services;
namespace WIDESEA_WMS.Controllers
{
@@ -29,5 +31,15 @@
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        /// <summary>
        /// è®¾ç½®ç¼“存架禁用启用
        /// </summary>
        /// <param name="parm"></param>
        /// <returns></returns>
        [HttpPost, Route("SetStationEnable")]
        public WebResponseContent SetStationEnable([FromBody] object parm)
        {
            return dt_stationinfoService.Instance.SetStationEnable(parm);
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WMS/dt_geometry_dataController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_geometry_dataController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_WMS.IServices;
namespace WIDESEA_WMS.Controllers
{
    [Route("api/dt_geometry_data")]
    [PermissionTable(Name = "dt_geometry_data")]
    public partial class dt_geometry_dataController : ApiBaseController<Idt_geometry_dataService>
    {
        public dt_geometry_dataController(Idt_geometry_dataService service)
        : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/WIDESEA_WebApi.csproj
@@ -36,5 +36,9 @@
    <ProjectReference Include="..\WIDESEA_WMS\WIDESEA_WMS.csproj" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Controllers\WIDESEA_WCS\Partial\" />
  </ItemGroup>
</Project>
ÏîÄ¿×ÊÁÏ/ÆäËû/¿âÇø·ÖÅä.txt
@@ -12,6 +12,8 @@
库区:最大值,最小值,按型号,按炉号,按库区摆放(比如库区2满了设先放库区3/4)
动车车轮才需要使用竖型托盘(只有三单元会使用):可在车轮数据表添加字段(托盘类型、是否加工)
入库
出库
外协入库
ÏîÄ¿×ÊÁÏ/ÆäËû/ϵͳ¼Ü¹¹Í¼(1).pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSÓëAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/AGVÓëèì¼Ü·À´ôЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSÓëèì¼ÜЭÒé/ЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS INFO Gantry.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS INFO Machine.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS INFO VK.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS INFO WP.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS REQ GEOMETRY.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS REQ.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS RES_input.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS RES_machine.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/interface PMS SERVERS.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/ЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/ÐÂÔöÉ豸ÐèÒª²É¼¯µÄÐÅÏ¢.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/AGVÓëèì¼Ü·À´ôЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/Interface PCS for AGV and Storage.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/Interface to AGV(1).pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/interface PMS REQ GEOMETRY 4 inputs.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/interface PMS RES_inputs_conv_feed.pdf
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSÓëAGV½Ó¿Ú/AGV·´À¡ÈÎÎñ״̬¸øWMS.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍAGV½Ó¿Ú/WMS¡¢PCSºÍAGV½Ó¿ÚЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍAGV½Ó¿Ú/WMSÏ·¢ÈÎÎñ¸øAGV.png

ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍMES½Ó¿Ú/MESÏ·¢AGVÊý¾Ý.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍMES½Ó¿Ú/MES½ÓÊÕAGVÊý¾Ý½Ó¿Ú.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÐÂÔöÉ豸ЭÒé/Ì«ÖØ½»»¥-¿â¿Ú״̬_V1.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ÏîĿͼֽ/»õλ.xlsx
Binary files differ