分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-02-23 538f1f0db8d02103d040b96a489b1a5803750a11
项目优化
已删除5个文件
已修改19个文件
已添加20个文件
1546 ■■■■■ 文件已修改
代码管理/PCS/WCS_Client/src/extension/widesea_wcs/wcs/dt_pattern.js 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/router/viewGird.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_pattern.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/DBItem/MachineDB.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/DBItem/WheelDataDB.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/StateEnum/LocationStateEnum.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/1/dt_pattern.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/1/partial/dt_pattern.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/ToMES/dt_mes_detail.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/dt_plcinfohead.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/1/dt_patternMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/AGVandGantry.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IRepositories/WCS/Idt_patternRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Idt_patternService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Partial/Idt_patternService.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/JobBase.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/GantryJob.cs 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Repositories/WCS/dt_patternRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/VV_DispatchService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_patternService.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/dt_patternService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/ToAGV/ToAGVServer.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/WCSClient/Siemens/SiemensPLCClient.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_patternController.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_patternController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/views/Task/widesea_wms/taskinfo/dt_agvtask.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs 231 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Services/Taskinfo/Partial/dt_agvtaskService.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToAGV/ToAGVServer.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/现场IP分配.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS和桁架协议/新增设备需要采集的信息.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/AGV与桁架防呆协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/PCS与AGV和桁架防呆协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS跟AGV和桁架防呆交互协议/PCS和桁架协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和AGV接口/WMS、PCS和AGV接口协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和AGV接口/WMS和AGV接口协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和MES接口/5f5bd6b6d22369969ae3b3688408dbc.png 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和MES接口/WMS系统接口.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/WMS和MES接口/c40a9fff20facac273c88e13593a7c1.png 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/新增设备协议/太重交互-库口状态_V1.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/PCS/WCS_Client/src/extension/widesea_wcs/wcs/dt_pattern.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,137 @@
/*****************************************************************************************
**  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;
        this.columns.push({
          field: '操作',
          title: '操作',
          width: 150,
          fixed: 'right',
          align: 'center',
          render: (h, { row, column, index }) => {
            return h('div', {}, [
              h(
                'span',
                {
                  style: {
                    'cursor': 'pointer',
                    'padding': '5px 10px',
                    'border-radius': '3px',
                    'background-color': '#67c23a',
                    'color': '#fff',
                    'font-size': '13px ',
                  },
                  onClick: (e) => {
                    this.request('UpdateAuto', row);
                    // this.request(row);
                  }
                },
                '自动'
              ),
              h(
                'span',
                {
                  style: {
                    'cursor': 'pointer',
                    'margin-left': "10px",
                    'padding': '5px 10px',
                    'border-radius': '3px',
                    'background-color': '#f56c6c',
                    'color': '#fff',
                    'font-size': '13px ',
                  },
                  onClick: (e) => {
                    this.request('UpdateManual', row);
                    // this.request(row);
                  }
                },
                '手动'
              )
            ]);
          }
        });
    },
    request(action,row) {
      // let url = `api/VV_Dispatch/${action}`;
      let url = `/api/dt_pattern/${action}`;
      // let params = {
      //   Name: row.Name,
      //   Enable:row.Enable
      // }
      this.http.post(url , row, true).then((x) => {
        if (!x.status) return this.$error(x.message);
        this.$success(x.message);
        // this.refresh();
        this.search();
      });
    },
    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
@@ -189,6 +189,10 @@
        path: '/dt_Interfacerecord_pcs',
        name: 'dt_Interfacerecord_pcs',
        component: () => import('@/views/widesea_wcs/system/dt_Interfacerecord_pcs.vue')
    }    ,{
        path: '/dt_pattern',
        name: 'dt_pattern',
        component: () => import('@/views/widesea_wcs/wcs/dt_pattern.vue')
    }]
export default viewgird
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/wcs/dt_pattern.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wcs/wcs/dt_pattern.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/wcs/dt_pattern.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ID',
                footer: "Foots",
                cnName: '入库模式',
                name: 'wcs/dt_pattern',
                url: "/dt_pattern/",
                sortName: "ID"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'ID',title:'ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'pattern_name',title:'模式名',type:'string',width:220,align:'left',sort:true},
                       {field:'pattern_state',title:'模式状态',type:'int',bind:{ key:'PatternStates',data:[]},width:110,require:true,align:'left'},
                       {field:'pattern_remark',title:'pattern_remark',type:'string',width:220,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/DBItem/MachineDB.cs
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/DBItem/WheelDataDB.cs
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/StateEnum/LocationStateEnum.cs
@@ -15,11 +15,14 @@
        /// <summary>
        /// ç©ºè´§ä½
        /// </summary>
<<<<<<< Updated upstream
        Empty
=======
        Empty,
        Busy
>>>>>>> Stashed changes
        /// <summary>
        /// å ç”¨
        /// </summary>
        Busy,
        /// <summary>
        /// å¼‚常
        /// </summary>
        Abnormal
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/1/dt_pattern.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化,请在代码生器重新生成此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_pattern")]
    public partial class dt_pattern:BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Key]
       [Display(Name ="ID")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int ID { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="pattern_name")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string pattern_name { get; set; }
       /// <summary>
       ///模式
       /// </summary>
       [Display(Name ="模式")]
       [Column(TypeName="int")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public int pattern_state { get; set; }
       /// <summary>
       ///
       /// </summary>
       [Display(Name ="pattern_remark")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       [Editable(true)]
       public string pattern_remark { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/1/partial/dt_pattern.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_pattern
    {
        //此处配置字段(字段配置见此model的另一个partial),如果表中没有此字段请加上 [NotMapped]属性,否则会异常
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs
@@ -13,126 +13,119 @@
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "库位信息",TableName = "dt_stationinfo")]
    public partial class dt_stationinfo:BaseEntity
    [Entity(TableCnName = "库位信息", TableName = "dt_stationinfo")]
    public partial class dt_stationinfo : BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Display(Name ="id")]
       [Column(TypeName="uniqueidentifier")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public Guid id { get; set; }
        ///
        /// </summary>
        [Key]
        [Display(Name = "id")]
        [Column(TypeName = "uniqueidentifier")]
        //[Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid id { get; set; }
       /// <summary>
       ///缓存架编号
       /// </summary>
       [Display(Name ="缓存架编号")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string stationCode { get; set; }
        /// <summary>
        ///缓存架编号
        /// </summary>
        [Display(Name = "缓存架编号")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        //[Editable(true)]
        public string stationCode { get; set; }
       /// <summary>
       ///物料类型
       /// </summary>
       [Display(Name ="物料类型")]
       [MaxLength(25)]
       [Column(TypeName="nvarchar(25)")]
       [Editable(true)]
       public string stationType { get; set; }
        /// <summary>
        ///物料类型
        /// </summary>
        [Display(Name = "物料类型")]
        [MaxLength(25)]
        [Column(TypeName = "nvarchar(25)")]
        //[Editable(true)]
        public string? stationType { get; set; }
       /// <summary>
       ///区域
       /// </summary>
       [Display(Name ="区域")]
       [MaxLength(15)]
       [Column(TypeName="nvarchar(15)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string area { get; set; }
        /// <summary>
        ///区域
        /// </summary>
        [Display(Name = "区域")]
        [MaxLength(15)]
        [Column(TypeName = "nvarchar(15)")]
        //[Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string area { get; set; }
       /// <summary>
       ///是否启用
       /// </summary>
       [Display(Name ="是否启用")]
       [Column(TypeName="bit")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public bool enable { get; set; }
        /// <summary>
        ///是否启用
        /// </summary>
        [Display(Name = "是否启用")]
        [Column(TypeName = "bit")]
        //[Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public bool enable { get; set; }
       /// <summary>
       ///货位状态
       /// </summary>
       [Display(Name ="货位状态")]
       [MaxLength(255)]
       [Column(TypeName="varchar(255)")]
       [Editable(true)]
       public string location_state { get; set; }
        /// <summary>
        ///货位状态
        /// </summary>
        [Display(Name = "货位状态")]
        [MaxLength(255)]
        [Column(TypeName = "varchar(255)")]
        //[Editable(true)]
        public string location_state { get; set; }
       /// <summary>
       ///最后状态改变时间
       /// </summary>
       [Display(Name ="最后状态改变时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? lastUpdateTime { get; set; }
        /// <summary>
        ///最后状态改变时间
        /// </summary>
        [Display(Name = "最后状态改变时间")]
        [Column(TypeName = "datetime")]
        //[Editable(true)]
        public DateTime? lastUpdateTime { get; set; }
       /// <summary>
       ///车轮数量
       /// </summary>
       [Display(Name ="车轮数量")]
       [Column(TypeName="int")]
       public int? quantity { get; set; }
        /// <summary>
        ///车轮数量
        /// </summary>
        [Display(Name = "车轮数量")]
        [Column(TypeName = "int")]
        public int quantity { get; set; }
       /// <summary>
       ///车轮SN号
       /// </summary>
       [Display(Name ="车轮SN号")]
       [MaxLength(500)]
       [Column(TypeName="nvarchar(500)")]
       public string bindSN { get; set; }
        /// <summary>
        ///车轮SN号
        /// </summary>
        [Display(Name = "车轮SN号")]
        [MaxLength(500)]
        [Column(TypeName = "nvarchar(500)")]
        public string bindSN { get; set; }
       /// <summary>
       ///托盘状态
       /// </summary>
       [Display(Name ="托盘状态")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       public string tray_status { get; set; }
        /// <summary>
        ///托盘状态
        /// </summary>
        [Display(Name = "托盘状态")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        public string tray_status { get; set; }
       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string remark { get; set; }
        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        //[Editable(true)]
        public string remark { get; set; }
       /// <summary>
       ///主键
       /// </summary>
       [Key]
       [Display(Name ="主键")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int zj { get; set; }
       /// <summary>
       ///行
       /// </summary>
       [Display(Name ="行")]
       [Column(TypeName="int")]
       public int? line { get; set; }
        /// <summary>
        ///行
        /// </summary>
        [Display(Name = "行")]
        [Column(TypeName = "int")]
        public int? line { get; set; }
       /// <summary>
       ///列
       /// </summary>
       [Display(Name ="列")]
       [Column(TypeName="int")]
       public int? column { get; set; }
        /// <summary>
        ///列
        /// </summary>
        [Display(Name = "列")]
        [Column(TypeName = "int")]
        public int? column { get; set; }
        /// <summary>
        ///工单编号
@@ -140,7 +133,7 @@
        [Display(Name = "工单编号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        //[Editable(true)]
        public string Number { get; set; }
        /// <summary>
@@ -148,7 +141,6 @@
        /// </summary>
        [Display(Name = "炉号")]
        [Column(TypeName = "int")]
        [Required(AllowEmptyStrings = false)]
        public int heatNumber { get; set; }
        public int? heatNumber { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/ToMES/dt_mes_detail.cs
@@ -28,7 +28,6 @@
        /// <summary>
        ///工单头表ID
        /// </summary>
        [Key]
        [Display(Name = "mes_headID")]
        [Column(TypeName = "uniqueidentifier")]
        [Required(AllowEmptyStrings = false)]
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/DomainModels/WCS/dt_plcinfohead.cs
@@ -95,7 +95,14 @@
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        public string plcinfo_remark { get; set; }
        /// <summary>
        ///型号
        /// </summary>
        [Display(Name = "型号")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        [Editable(true)]
        public string plcinfo_model { get; set; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/1/dt_patternMapConfig.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_patternMapConfig : EntityMappingConfiguration<dt_pattern>
    {
        public override void Map(EntityTypeBuilder<dt_pattern>
        builderTable)
        {
          //b.Property(x => x.StorageName).HasMaxLength(45);
        }
     }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/AGVandGantry.cs
@@ -32,7 +32,7 @@
                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")
                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]);//申请进入区域
@@ -41,7 +41,7 @@
                    if (!Release) throw new Exception("桁架未允许进入!");
                    if (!Gantry_Out_of_Area) throw new Exception("桁架在区域内!");
                }
                else if (MethodName == "EnteriorLeav")
                else if (MethodName == "EnteriorLeav")//进入离开区域
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    if (requestin.Type == 1)
@@ -57,12 +57,12 @@
                        if (Area_Occupied_by_AGV) throw new Exception("桁架未反馈AGV离开信号");
                    }
                }
                else if (MethodName == "AGVOutofArea")
                else if (MethodName == "AGVOutofArea")//AGV不在区域内
                {
                    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")
                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("桁架在区域内!");
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs
@@ -4,10 +4,12 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm;
using WIDESEA_Core.EFDbContext;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.WCSClient;
using static System.Collections.Specialized.BitVector32;
namespace WIDESEA_WCS
{
@@ -17,9 +19,9 @@
        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>
        Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context);
        #region æŸ¥è¯¢è½¦è½®æ•°æ®
        public void QueryWheeldata(PLCClient client)
        {
            try
@@ -30,21 +32,23 @@
                {
                    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)
                    if ((byte)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);
                            //1-找到数据,2-未找到工件类型数据
                            client.WriteByOrder("W_i_status", (byte)2, name);
                            //屏蔽工艺(屏蔽视觉检测/屏蔽涂油);
                            //client.WriteByOrder("W_i_skip_op", "1", name);
                            client.WriteByOrder("R_oi_on", (byte)0, name);
                        }
                        else
                        {
                            client.WriteByOrder("W_i_status", (Int16)1, name);
                            //1-找到数据,2-未找到工件类型数据
                            client.WriteByOrder("W_i_status", (byte)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);
@@ -54,8 +58,13 @@
                            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);
                            if (name != "辊道上料查询车轮")
                            {
                                client.WriteByOrder("W_i_skip_op_SJ1", (byte)1, name);//屏蔽视觉检测设备1
                                client.WriteByOrder("W_i_skip_op_SJ2", (byte)1, name);//屏蔽视觉检测设备2
                                client.WriteByOrder("W_i_skip_op_LT", (byte)1, name);//屏蔽链条机
                            }
                            client.WriteByOrder("R_oi_on", (byte)0, name);
                        }
                    }
                }
@@ -65,9 +74,9 @@
                throw;
            }
        }
        /// <summary>
        /// æŸ¥è¯¢è®¢å•,是否需要加工
        /// </summary>
        #endregion
        #region æŸ¥è¯¢è®¢å•,是否需要加工
        public void QueryOrder(PLCClient client)
        {
            try
@@ -78,20 +87,23 @@
                {
                    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)
                    if ((byte)on == 1)
                    {
                        var wp_id = DBExtension.Read(details.Where(x => x.plcdetail_name == "R_o_wp_id").First(), client);
                        //需添加查询车轮SN号订单逻辑
                        //需添加查询车轮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-不加工车轮类型
                            //1-好,允许加工,2-不在列表中,3-不加工车轮类型,4-手动入库模式人工未选择库区
                            client.WriteByOrder("W_i_status", (Int16)2, name);
                            client.WriteByOrder("R_oi_on", (Int16)0, name);
                        }
                        else
                        {
                            //1-好,允许加工,2-不在列表中,3-不加工车轮类型,4-手动入库模式人工未选择库区
                            client.WriteByOrder("W_i_status", (Int16)1, name);
                            //client.WriteByOrder("W_i_job_id", "", name);
                            //client.WriteByOrder("W_i_drawing_id", "", name);
@@ -108,35 +120,64 @@
                throw;
            }
        }
        /// <summary>
        /// ä¸‹æ–™ä½äº¤äº’
        /// </summary>
        #endregion
        #region ä¸‹æ–™ä½äº¤äº’
        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单元下料区", "上料区" };
                var Pipeline_client = PLCClient.Clients.FirstOrDefault(t => t.PLCName == "链条机");
                if (Pipeline_client == null) throw new Exception("链条机调度服务未开启!");
                if (!Pipeline_client.IsConnected) throw new Exception("与链条机连接超时!");
                var Pipelineplc = repository.FindFirst(x => x.plcinfo_name == Pipeline_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
                    List<string> StationCodes = new List<string>() { "X01001001", "X01001002", "X01001003" };
                    if (name == "2单元下料区")
                        StationCodes = new List<string>() { "X02001001", "X02001002", "X02001003" };
                    if (name == "3单元下料区")
                        StationCodes = new List<string>() { "X03001001", "X03001002" };
                    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);//是否允许
                    for (int i = 0; i < StationCodes.Count - 1; i++)
                    {
                        var PartStatus = (Int32)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_PartStatus").First(), client);//1:ok;2:nok
                        string NG = StationCodes[StationCodes.Count - 1];//NG货位
                        var station = stationinfoRepository.FindFirst(x => x.stationCode == StationCodes[i] && x.enable && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity < 5);
                        if (station == null) continue;
                        var Pipelinedetails = plcRepository.Find(x => x.plcdetail_iotype == Pipelineplc.plcinfo_iotyep && x.plcdetail_number == StationCodes[i]).ToList();
                        var PalletSignal = (Int16)DBExtension.Read(Pipelinedetails.Where(x => x.plcdetail_name == "R_PalletSignal").First(), client);//读取托盘信号:1:有,2无
                        if (PalletSignal == 1)
                        {
                            if (PartStatus == 1 && NG != station.stationCode)
                            {
                                client.WriteByOrder("W_AreaNr", (Int16)i + 1, name);//区域货位号
                                client.WriteByOrder("W_IndexNr", (Int16)station.quantity + 1, name);//托盘上的第几个车轮
                            }
                            else if (PartStatus == 2 && NG == station.stationCode)
                            {
                                client.WriteByOrder("W_AreaNr", (Int16)i + 1, name);//区域货位号
                                client.WriteByOrder("W_IndexNr", (Int16)station.quantity + 1, name);//托盘上的第几个车轮
                            }
                            client.WriteByOrder("W_Storage_Type", (Int16)1, 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)
                    {
                        var AreaNr = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "W_AreaNr").First(), client);
                        var station = stationinfoRepository.FindFirst(x => x.stationCode == StationCodes[AreaNr - 1]);
                        station.quantity = station.quantity++;
                        stationinfoRepository.Update(station);
                        client.WriteByOrder("W_Storage_update", true, name);//货位状态更新
                    }
                }
@@ -146,30 +187,6 @@
                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;
            }
        }
        #endregion
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IRepositories/WCS/Idt_patternRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Idt_patternRepository编写接口
 */
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_patternRepository : IDependency,IRepository<dt_pattern>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Idt_patternService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 */
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_patternService : IService<dt_pattern>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/IServices/WCS/Partial/Idt_patternService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
/*
*所有关于dt_pattern类的业务代码接口应在此处编写
*/
using WIDESEA_Core.BaseProvider;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Core.Utilities;
using System.Linq.Expressions;
namespace WIDESEA_WCS.IServices
{
    public partial interface Idt_patternService
    {
       public WebResponseContent UpdateAuto(string v);
       public WebResponseContent UpdateManual(string v);
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/JobBase.cs
@@ -67,11 +67,11 @@
            }
            catch (Exception ex)
            {
                jobHistory += $",【执行失败:{ex.Message}】";
                jobHistory += $",【执行失败:{ex.Message}】+";
            }
            finally
            {
                taskSeconds = Math.Round(stopwatch.Elapsed.TotalSeconds,3);
                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
@@ -45,117 +45,6 @@
            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)
        {
            try
            {
                VOLContext Context = new VOLContext();
                Idt_plcinfoheadRepository repository = new dt_plcinfoheadRepository(Context);
                Idt_plcinfodetailRepository plcRepository = new dt_plcinfodetailRepository(Context);
                var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName);
                var numbers = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep).GroupBy(x => x.plcdetail_number).ToList();
                foreach (var number in numbers)
                {
                    if (number.Key.Contains("辊道下料"))
                    {
                        PropertyInfo[] propertyInfos = typeof(WheelDataDB).GetProperties();//获取所有属性
                        WheelDataDB dBItem = wheelDataDBs.Where(x => x.R_Name == number.Key).FirstOrDefault();
                        if (dBItem == null)
                        {
                            dBItem = new();
                            dBItem.OnReadSignal += HandleReadSignal;
                            wheelDataDBs.Add(dBItem);
                        }
                        List<dt_plcinfodetail> details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == number.Key).ToList();
                        for (int i = 0; i < propertyInfos.Length; i++)
                        {
                            if (i == 0)
                            {
                                dBItem.R_Name = number.Key;
                            }
                            else
                            {
                                object readData = DBExtension.Read(details.Where(x => x.plcdetail_name == propertyInfos[i].Name).FirstOrDefault(), client);
                                if (readData != null) { }
                                object obj = propertyInfos[i].GetValue(dBItem);
                                if (obj != readData)
                                    propertyInfos[i].SetValue(dBItem, readData);
                            }
                        }
                    }
                    else
                    {
                        PropertyInfo[] propertyInfos = typeof(MachineDB).GetProperties();//获取所有属性
                        MachineDB dBItem = MachineDBs.Where(x => x.R_Name == number.Key).FirstOrDefault();
                        if (dBItem == null)
                        {
                            dBItem = new();
                            dBItem.OnReadSignal += HandleReadSignal;
                            MachineDBs.Add(dBItem);
                        }
                        List<dt_plcinfodetail> details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == number.Key).ToList();
                        for (int i = 0; i < propertyInfos.Length; i++)
                        {
                            if (i == 0)
                            {
                                dBItem.R_Name = number.Key;
                            }
                            else
                            {
                                object readData = DBExtension.Read(details.Where(x => x.plcdetail_name == propertyInfos[i].Name).FirstOrDefault(), client);
                                if (readData != null) { }
                                object obj = propertyInfos[i].GetValue(dBItem);
                                if (obj != readData)
                                    propertyInfos[i].SetValue(dBItem, readData);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        #endregion
        public void HandleReadSignal(string type, MachineDB DBItem)
        {
            switch (type)
            {
                case OperationType.OperationType_Record:
                    break;
                case OperationType.OperationType_Processor:
                    break;
                case OperationType.OperationType_WheelData:
                    break;
            }
        }
        public void HandleReadSignal(string type, WheelDataDB DBItem)
        {
            switch (type)
            {
                case OperationType.OperationType_Record:
                    break;
                case OperationType.OperationType_Processor:
                    break;
                case OperationType.OperationType_WheelData:
                    break;
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs
@@ -1,12 +1,19 @@
using Quartz;
using HslCommunication;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using WIDESEA_Comm;
using WIDESEA_Comm.LogInfo;
using WIDESEA_Core.BaseProvider;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.Extensions;
using WIDESEA_Core.FreeDB;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Jobs;
@@ -63,59 +70,99 @@
        /// <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)
            try
            {
                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);//桁架是否在区域内
                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 == null) throw new Exception("桁架调度服务未开启!");
                if (!Gantry_client.IsConnected) throw new Exception("与桁架连接超时!");
                var Gantryplc = repository.FindFirst(x => x.plcinfo_name == Gantry_client.PLCName);
                var QueryDate = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_QueryDate").First(), Gantry_client);//信息查询
                if (QueryDate)
                ///查找上料区的货位
                var Stations = stationinfoRepository.Find(x => x.area == "6");
                //缓存架未启用禁止桁架进入
                foreach (var station in Stations)
                {
                    var Date_Vaild = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_Date_Vaild").First(), Gantry_client);//信息确认
                    if (!Date_Vaild)//信息有误,记录日志
                    if (!station.enable)
                        Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                }
                var Station = Stations?.Where(x => x.enable && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).OrderBy(x => x.quantity).First();
                if (Station != null)
                {
                    var SNS = Station.bindSN.Split(",");
                    //缓存架上车轮数量与SN号数量不一致
                    if (SNS.Length != Station.quantity)
                    {
                        Station.location_state = LocationStateEnum.Abnormal.ToString();
                        stationinfoRepository.Update(Station, true);
                        Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                        throw new Exception("上料位车轮数量与SN号数量不一致,上料位编号:" + Station.stationCode);
                    }
                    var details = plcRepository.Find(x => x.plcdetail_iotype == plc.plcinfo_iotyep && x.plcdetail_number == Station.stationCode).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)
                    {
                        var area = Convert.ToInt16(Station.stationCode.Substring(Station.stationCode.Length - 1, 1));
                        Gantry_client.WriteByOrder("W_AreaNr", (Int16)area, number);//区域货位号
                        Gantry_client.WriteByOrder("W_IndexNr", (Int16)SNS.Length, number);//托盘上的第几个车轮
                        Gantry_client.WriteByOrder("W_Storage_Type", (Int16)1, number); //托盘类型1-横放;2-竖放
                        Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(Station.stationType), number);//车轮类型
                        Gantry_client.WriteByOrder("W_Wheel_id", SNS[SNS.Length - 1], 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)//信息有误,记录日志
                        {
                            Station.location_state = LocationStateEnum.Abnormal.ToString();
                            stationinfoRepository.Update(Station, true);
                            Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                            throw new Exception($"未查询到SN号:{SNS[SNS.Length - 1]}的订单,上料位编号:{Station.stationCode}");
                        }
                    }
                    var finished = (bool)DBExtension.Read(Gantrydetails.Where(x => x.plcdetail_name == "R_Unlod_finished").First(), Gantry_client);//夹取完成
                    if (finished)
                    {
                        Station.quantity = Station.quantity - 1;
                        Station.bindSN = OperStr(SNS);
                        var count = stationinfoRepository.Update(Station, true);
                        if (count < 1)
                            throw new Exception($"上料位信息更新失败!上料位编号:{Station.stationCode}");
                        Gantry_client.WriteByOrder("W_Storage_update", true, number);//货位状态更新
                        Gantry_client.WriteByOrder("W_RequestUnload", false, number);//信号为false桁架停止进入
                    }
                }
                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);//货位状态更新
                }
            }
            catch (Exception ex)
            {
                //WritePCSLog.LogAdd(requestin.AreaNr.ToString(), respone.success == 1 ? "成功 " : "失败", "WMS", "AGV", json, JsonConvert.SerializeObject(respone), remark, "检测线上料区", ex.Message);
            }
        }
        private string OperStr(string[] strArrty)
        {
            string[] newstr = strArrty.RemoveLast(1);
            string Newsn = string.Join(",", newstr);
            return Newsn;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Repositories/WCS/dt_patternRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹dt_patternRepository编写代码
 */
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_patternRepository : RepositoryBase<dt_pattern> , Idt_patternRepository
    {
    public dt_patternRepository(VOLContext dbContext)
    : base(dbContext)
    {
    }
    public static Idt_patternRepository Instance
    {
      get {  return AutofacContainerModule.GetService<Idt_patternRepository>(); } }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/VV_DispatchService.cs
@@ -149,7 +149,7 @@
                    PLCClient client = null;
                    if (plc.plcinfo_type == "Simene")
                    {
                        client = new SiemensPLCClient()
                        client = new SiemensPLCClient(plc.plcinfo_model)
                        {
                            PLCName = plc.plcinfo_name,
                            Ip = plc.plcinfo_ip,
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/dt_patternService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,67 @@
/*
 *所有关于dt_pattern类的业务代码应在此处编写
*可使用repository.调用常用方法,获取EF/Dapper等信息
*如果需要事务请使用repository.DbContextBeginTransaction
*也可使用DBServerProvider.手动获取数据库相关信息
*用户信息、权限、角色等使用UserContext.Current操作
*dt_patternService对增、删、改查、导入、导出、审核业务代码扩展参照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;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Newtonsoft.Json;
namespace WIDESEA_WCS.Services
{
    public partial class dt_patternService
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly Idt_patternRepository _repository;//访问数据库
        [ActivatorUtilitiesConstructor]
        public dt_patternService(
            Idt_patternRepository dbRepository,
            IHttpContextAccessor httpContextAccessor
            )
        : base(dbRepository)
        {
            _httpContextAccessor = httpContextAccessor;
            _repository = dbRepository;
            //多租户会用到这init代码,其他情况可以不用
            //base.Init(dbRepository);
        }
        public WebResponseContent UpdateAuto(string v)
        {
            WebResponseContent content = new WebResponseContent();
            var model = JsonConvert.DeserializeObject<dt_pattern>(v);
            model.pattern_state = 1;
            var cont = _repository.Update(model, true);
            if (cont > 0)
                content.OK(model.pattern_name + "设置为自动入库成功!");
            else
                content.Error(model.pattern_name + "设置为自动入库失败!");
            return content;
        }
        public WebResponseContent UpdateManual(string v)
        {
            WebResponseContent content = new WebResponseContent();
            var model = JsonConvert.DeserializeObject<dt_pattern>(v);
            model.pattern_state = 0;
            var cont = _repository.Update(model, true);
            if (cont > 0)
                content.OK(model.pattern_name + "设置为手动入库成功!");
            else
                content.Error(model.pattern_name + "设置为手动入库失败!");
            return content;
        }
  }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/dt_patternService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
/*
 *Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
 *所有业务编写全部应在Partial文件夹下dt_patternService与Idt_patternService中编写
 */
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_patternService : ServiceBase<dt_pattern, Idt_patternRepository>
    , Idt_patternService, IDependency
    {
    public dt_patternService(Idt_patternRepository repository)
    : base(repository)
    {
    Init(repository);
    }
    public static Idt_patternService Instance
    {
      get { return AutofacContainerModule.GetService<Idt_patternService>(); } }
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/ToAGV/ToAGVServer.cs
@@ -19,7 +19,6 @@
{
    public partial class ToAGVServer
    {
        FreeDB freeDB = new FreeDB();
        static AGVRespone respone = new AGVRespone();
        static AGVRequestin requestin = new AGVRequestin();
        /// <summary>
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/WCSClient/Siemens/SiemensPLCClient.cs
@@ -14,9 +14,12 @@
        private readonly object _lockWrite = new object();
        public SiemensS7Net siemensPLCClient { get; set; }
        public SiemensPLCClient()
        public SiemensPLCClient(string model)
        {
            siemensPLCClient = new SiemensS7Net(SiemensPLCS.S1200);
            if (model == "S300")
                siemensPLCClient = new SiemensS7Net(SiemensPLCS.S300);
            else
                siemensPLCClient = new SiemensS7Net(SiemensPLCS.S1500);
            base.siemensPLCClient = this.siemensPLCClient;
        }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_patternController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
/*
 *接口编写处...
*如果接口需要做Action的权限验证,请在Action上使用属性
*如: [ApiActionPermission("dt_pattern",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_WCS.IServices;
using Microsoft.AspNetCore.Authorization;
using Newtonsoft.Json;
using WIDESEA_Core.Utilities;
namespace WIDESEA_WCS.Controllers
{
    public partial class dt_patternController
    {
        private readonly Idt_patternService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;
        [ActivatorUtilitiesConstructor]
        public dt_patternController(
            Idt_patternService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        /// <summary>
        /// å…¥åº“模式设为自动
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("UpdateAuto"), AllowAnonymous]
        public WebResponseContent UpdateAuto([FromBody] object saveModel)
        {
            return _service.UpdateAuto(JsonConvert.SerializeObject(saveModel));
        }
        /// <summary>
        /// å…¥åº“模式设为手动
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("UpdateManual"), AllowAnonymous]
        public WebResponseContent UpdateManual([FromBody] object saveModel)
        {
            return _service.UpdateManual(JsonConvert.SerializeObject(saveModel));
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_patternController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果要增加方法请在当前目录下Partial文件夹dt_patternController编写
 */
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Controllers.Basic;
using WIDESEA_Entity.AttributeManager;
using WIDESEA_WCS.IServices;
namespace WIDESEA_WCS.Controllers
{
    [Route("api/dt_pattern")]
    [PermissionTable(Name = "dt_pattern")]
    public partial class dt_patternController : ApiBaseController<Idt_patternService>
    {
        public dt_patternController(Idt_patternService service)
        : base(service)
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Client/src/views/Task/widesea_wms/taskinfo/dt_agvtask.vue
@@ -42,26 +42,26 @@
                       {field:'agv_tasknum',title:'任务编号',type:'string',sort:true,width:110,require:true,align:'left',sort:true},
                       {field:'agv_fromaddress',title:'起点地址',type:'string',width:110,align:'left'},
                       {field:'agv_toaddress',title:'终点地址',type:'string',width:110,align:'left'},
                       {field:'agv_code',title:'AGV编号',type:'string',bind:{ key:'agv_code',data:[]},width:110,require:true,align:'left'},
                    //    {field:'agv_code',title:'AGV编号',type:'string',bind:{ key:'agv_code',data:[]},width:110,require:true,align:'left'},
                       {field:'agv_taskstate',title:'任务状态',type:'string',bind:{ key:'Taskstates',data:[]},width:110,require:true,align:'left'},
                       {field:'agv_worktype',title:'AGV工作类型',type:'int',width:110,align:'left'},
                    //    {field:'agv_worktype',title:'AGV工作类型',type:'int',width:110,align:'left'},
                       {field:'agv_materielid',title:'物料类型',type:'string',width:110,require:true,align:'left'},
                       {field:'bindSN',title:'车轮SN号',type:'string',width:110,align:'left'},
                       {field:'agv_qty',title:'数量',type:'int',width:110,require:true,align:'left'},
                    //    {field:'agv_finishedtime',title:'完成时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'agv_tasktype',title:'任务类型',type:'string',bind:{ key:'agv_tasktypes',data:[]},width:110,require:true,align:'left'},
                       {field:'agv_grade',title:'任务等级',type:'int',bind:{ key:'task_grade',data:[]},sort:true,width:110,align:'left'},
                    //    {field:'agv_barcode',title:'托盘码',type:'string',width:110,require:true,align:'left'},
                    //    {field:'agv_materbarcode',title:'物料码',type:'string',width:110,align:'left'},
                       {field:'agv_createtime',title:'创建时间',type:'datetime',sort:true,width:150,require:true,align:'left',sort:true},
                       {field:'agv_realesstime',title:'执行时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'agv_finishedtime',title:'完成时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'agv_tasktype',title:'任务类型',type:'string',bind:{ key:'agv_tasktypes',data:[]},width:110,require:true,align:'left'},
                       {field:'agv_remark',title:'备注',type:'string',width:120,align:'left'},
                       {field:'agv_grade',title:'任务等级',type:'int',bind:{ key:'task_grade',data:[]},sort:true,width:110,align:'left'},
                       {field:'agv_userid',title:'创建者',type:'string',width:110,align:'left'},
                       {field:'agv_barcode',title:'托盘码',type:'string',width:110,require:true,align:'left'},
                       {field:'agv_materbarcode',title:'物料码',type:'string',width:110,align:'left'},
                       {field:'agv_executingBeginTime',title:'起始点执行中',type:'datetime',width:150,align:'left',sort:true},
                       {field:'agv_executingEndTime',title:'起始点完成',type:'datetime',width:150,align:'left',sort:true},
                       {field:'agv_completeBeginTime',title:'目的点执行中',type:'datetime',width:150,align:'left',sort:true},
                       {field:'unitag',title:'unitag',type:'guid',width:110,align:'left'},
                       {field:'ID',title:'主键',type:'int',width:80,hidden:true,readonly:true,require:true,align:'left'}]);
                       {field:'agv_userid',title:'创建者',type:'string',width:110,align:'left'},
                       {field:'agv_remark',title:'备注',type:'string',width:120,align:'left'},
                    //    {field:'unitag',title:'unitag',type:'guid',width:110,align:'left'}
                    ]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/DomainModels/System/dt_stationinfo.cs
@@ -13,142 +13,135 @@
namespace WIDESEA_Entity.DomainModels
{
    [Entity(TableCnName = "库位信息",TableName = "dt_stationinfo")]
    public partial class dt_stationinfo:BaseEntity
    [Entity(TableCnName = "库位信息", TableName = "dt_stationinfo")]
    public partial class dt_stationinfo : BaseEntity
    {
        /// <summary>
       ///
       /// </summary>
       [Display(Name ="id")]
       [Column(TypeName="uniqueidentifier")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public Guid id { get; set; }
        ///
        /// </summary>
        [Key]
        [Display(Name = "id")]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public Guid id { get; set; }
       /// <summary>
       ///缓存架编号
       /// </summary>
       [Display(Name ="缓存架编号")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string stationCode { get; set; }
        /// <summary>
        ///缓存架编号
        /// </summary>
        [Display(Name = "缓存架编号")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        [Editable(true)]
        public string stationCode { get; set; }
       /// <summary>
       ///物料类型
       /// </summary>
       [Display(Name ="物料类型")]
       [MaxLength(25)]
       [Column(TypeName="nvarchar(25)")]
       [Editable(true)]
       public string stationType { get; set; }
        /// <summary>
        ///物料类型
        /// </summary>
        [Display(Name = "物料类型")]
        [MaxLength(25)]
        [Column(TypeName = "nvarchar(25)")]
        [Editable(true)]
        public string stationType { get; set; }
       /// <summary>
       ///区域
       /// </summary>
       [Display(Name ="区域")]
       [MaxLength(15)]
       [Column(TypeName="nvarchar(15)")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public string area { get; set; }
        /// <summary>
        ///区域
        /// </summary>
        [Display(Name = "区域")]
        [MaxLength(15)]
        [Column(TypeName = "nvarchar(15)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string area { get; set; }
       /// <summary>
       ///是否启用
       /// </summary>
       [Display(Name ="是否启用")]
       [Column(TypeName="bit")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public bool enable { get; set; }
        /// <summary>
        ///是否启用
        /// </summary>
        [Display(Name = "是否启用")]
        [Column(TypeName = "bit")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public bool enable { get; set; }
       /// <summary>
       ///货位状态
       /// </summary>
       [Display(Name ="货位状态")]
       [MaxLength(255)]
       [Column(TypeName="varchar(255)")]
       [Editable(true)]
       public string location_state { get; set; }
        /// <summary>
        ///货位状态
        /// </summary>
        [Display(Name = "货位状态")]
        [MaxLength(255)]
        [Column(TypeName = "varchar(255)")]
        [Editable(true)]
        public string location_state { get; set; }
       /// <summary>
       ///最后状态改变时间
       /// </summary>
       [Display(Name ="最后状态改变时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? lastUpdateTime { get; set; }
        /// <summary>
        ///最后状态改变时间
        /// </summary>
        [Display(Name = "最后状态改变时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? lastUpdateTime { get; set; }
       /// <summary>
       ///车轮数量
       /// </summary>
       [Display(Name ="车轮数量")]
       [Column(TypeName="int")]
       public int? quantity { get; set; }
        /// <summary>
        ///车轮数量
        /// </summary>
        [Display(Name = "车轮数量")]
        [Column(TypeName = "int")]
        public int? quantity { get; set; }
       /// <summary>
       ///车轮SN号
       /// </summary>
       [Display(Name ="车轮SN号")]
       [MaxLength(500)]
       [Column(TypeName="nvarchar(500)")]
       public string bindSN { get; set; }
        /// <summary>
        ///车轮SN号
        /// </summary>
        [Display(Name = "车轮SN号")]
        [MaxLength(500)]
        [Column(TypeName = "nvarchar(500)")]
        public string bindSN { get; set; }
       /// <summary>
       ///托盘状态
       /// </summary>
       [Display(Name ="托盘状态")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       public string tray_status { get; set; }
        /// <summary>
        ///托盘状态
        /// </summary>
        [Display(Name = "托盘状态")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        public string tray_status { get; set; }
       /// <summary>
       ///行
       /// </summary>
       [Display(Name ="行")]
       [Column(TypeName="int")]
       public int? line { get; set; }
        /// <summary>
        ///行
        /// </summary>
        [Display(Name = "行")]
        [Column(TypeName = "int")]
        public int? line { get; set; }
       /// <summary>
       ///列
       /// </summary>
       [Display(Name ="列")]
       [Column(TypeName="int")]
       public int? column { get; set; }
        /// <summary>
        ///列
        /// </summary>
        [Display(Name = "列")]
        [Column(TypeName = "int")]
        public int? column { get; set; }
       /// <summary>
       ///备注
       /// </summary>
       [Display(Name ="备注")]
       [MaxLength(100)]
       [Column(TypeName="nvarchar(100)")]
       [Editable(true)]
       public string remark { get; set; }
        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string remark { get; set; }
       /// <summary>
       ///主键
       /// </summary>
       [Key]
       [Display(Name ="主键")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int zj { get; set; }
       /// <summary>
       ///工单编号
       /// </summary>
       [Display(Name ="工单编号")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string Number { get; set; }
        /// <summary>
        ///工单编号
        /// </summary>
        [Display(Name = "工单编号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        public string Number { get; set; }
       /// <summary>
       ///炉号
       /// </summary>
       [Display(Name ="炉号")]
       [Column(TypeName="int")]
       public int? heatNumber { get; set; }
        /// <summary>
        ///炉号
        /// </summary>
        [Display(Name = "炉号")]
        [Column(TypeName = "int")]
        public int? heatNumber { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Services/Taskinfo/Partial/dt_agvtaskService.cs
@@ -82,6 +82,7 @@
                agvtask.agv_taskstate = AGVTaskStateEnum.Create.ToString();
                agvtask.agv_tasktype = tasktype;
                agvtask.agv_worktype = 1;//工作类型
                agvtask.bindSN = station1.bindSN;
                agvtask.agv_materielid = station1.stationType;//物料类型
                agvtask.agv_qty = station1.quantity;
                agvtask.agv_createtime = DateTime.Now;
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToAGV/ToAGVServer.cs
@@ -44,6 +44,12 @@
                    respone.Message = tasteInfo.TASK_NO + ":重复调用,任务状态为:" + tasteInfo.TASK_State;
                    return respone;
                }
                #region åˆ¤æ–­ä»»åŠ¡çŠ¶æ€
                //List<string> list = new List<string>() { AGVTaskStateEnum.Executing.ToString(), AGVTaskStateEnum.Complete.ToString(), AGVTaskStateEnum.Executing1.ToString(), AGVTaskStateEnum.Complete1.ToString() };
                //var index = list.IndexOf(task.agv_taskstate) + 1;
                //if (tasteInfo.TASK_State < index)
                //    throw new Exception("任务状态更新异常!当前任务状态为:" + index + ";请求更新状态为:" + tasteInfo.TASK_State);
                #endregion
                if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Executing)
                    task.agv_executingBeginTime = DateTime.Now;
                else if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Complete)
ÏîÄ¿×ÊÁÏ/ÆäËû/ÏÖ³¡IP·ÖÅä.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSºÍèì¼ÜЭÒé/ÐÂÔöÉ豸ÐèÒª²É¼¯µÄÐÅÏ¢.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/AGVÓëèì¼Ü·À´ôЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/PCSÓëAGVºÍèì¼Ü·À´ôЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCS¸úAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/PCSºÍèì¼ÜЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍAGV½Ó¿Ú/WMS¡¢PCSºÍAGV½Ó¿ÚЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍAGV½Ó¿Ú/WMSºÍAGV½Ó¿ÚЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍMES½Ó¿Ú/5f5bd6b6d22369969ae3b3688408dbc.png
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍMES½Ó¿Ú/WMSϵͳ½Ó¿Ú.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/WMSºÍMES½Ó¿Ú/c40a9fff20facac273c88e13593a7c1.png
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/ÐÂÔöÉ豸ЭÒé/Ì«ÖØ½»»¥-¿â¿Ú״̬_V1.xlsx
Binary files differ