分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-01-26 13137e3acdb759d1541f754fba81c616f418e2a1
添加车轮数据、AGV接口等
已添加39个文件
已修改13个文件
已删除2个文件
已重命名2个文件
1820 ■■■■■ 文件已修改
代码管理/PCS/WCS_Client/src/extension/widesea_wcs/baseinfo/dt_geometry_data.js 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/router/viewGird.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/DBItem/MachineDB.cs 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/DBItem/OperationType.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Comm/DBItem/WheelDataDB.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/partial/dt_geometry_data.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_Entity/MappingConfiguration/BaseInfo/dt_geometry_dataMapConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Request.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IRepositories/BaseInfo/Idt_geometry_dataRepository.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/BaseInfo/Idt_geometry_dataService.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/IServices/BaseInfo/Partial/Idt_geometry_dataService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/ParentCarJob.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/GantryJob.cs 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/CreatePLCinfodetail.cs 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/LocationCreation.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Repositories/BaseInfo/dt_geometry_dataRepository.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/BaseInfo/Partial/dt_geometry_dataService.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/Services/BaseInfo/dt_geometry_dataService.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WCS/ToWMS/ToWmsServer.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToMes/ToMESController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToWMS/ToWMSController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/Partial/dt_geometry_dataController.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/dt_geometry_dataController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Comm/TaskEnum/AGVTaskTypeEnum.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_Entity/ToAGV/RequestTask.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/QueryData.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/Request.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/Task.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToAGV/ToAGVServer.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToMes/UpdateStation.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToPCS/AddTask.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToPCS/TaskData.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WMS/ToPCS/ToPCSServer.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/JobTask.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/ToPCS/ToPCSController.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/ToWms/ToWMSController.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/Startup.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WMS_Server/WIDESEA_WebApi/WIDESEA_WebApi.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/DB/dt_geometry_data(车轮数据).xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/DB/dt_geometry_data.sql 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/会议/机加工检测上下料自动化项目WMS与MES信息交互、网络布局事宣讨论会议纪要.png 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/会议/车轮厂二线机加工上下料自动化项目专题会.png 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/库区分配.txt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/其他/现场图片/0c01d30d1a8c2e38df4f76d1460b9e0.jpg 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/系统文件/太原重工WMS系统说明V1.0.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS与AGV和桁架防呆交互协议/AGV与桁架防呆协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS与桁架协议/协议.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/通信协议/PCS与桁架协议/新增设备需要采集的信息.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/PCS/WCS_Client/src/extension/widesea_wcs/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;
´úÂë¹ÜÀí/PCS/WCS_Client/src/router/viewGird.js
@@ -181,6 +181,10 @@
        path: '/dt_log_pcs',
        name: 'dt_log_pcs',
        component: () => import('@/views/widesea_system/system/dt_log_pcs.vue')
    }    ,{
        path: '/dt_geometry_data',
        name: 'dt_geometry_data',
        component: () => import('@/views/widesea_wcs/baseinfo/dt_geometry_data.vue')
    }]
export default viewgird
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,73 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wcs/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_wcs/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>
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/DBItem/MachineDB.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.ItemDB;
namespace WIDESEA_Comm.DBItem
{
    public partial class MachineDB
    {
        public event Action<string, MachineDB> OnReadSignal;
        public string R_Name { get; set; }
        /// <summary>
        /// SN
        /// </summary>
        public string R_o_wp_id { get; set; }
        /// <summary>
        /// å¼€å§‹æ—¶é—´
        /// </summary>
        public DateTime R_o_mach_start_time { get; set; }
        /// <summary>
        /// å®Œæˆæ—¶é—´
        /// </summary>
        public DateTime R_o_mach_finish_time { get; set; }
        /// <summary>
        /// æ“ä½œäºº
        /// </summary>
        public string R_o_operator { get; set; }
        /// <summary>
        /// å޻向
        /// </summary>
        public string R_o_shift { get; set; }
        /// <summary>
        /// è´¨æ£€çŠ¶æ€ 0:未定义,1:OK,2:NG
        /// </summary>
        public short R_o_wp_status { get; set; }
        /// <summary>
        /// ç»“æžœ
        /// </summary>
        public short R_o_result { get; set; }
        /// <summary>
        /// é”™è¯¯ä»£ç 
        /// </summary>
        public short R_o_error_code { get; set; }
        public short R_o_substation { get; set; }
        public string R_o_value_result_real_1 { get; set; }
        public string R_o_value_result_real_2 { get; set; }
        public string R_o_value_result_real_3 { get; set; }
        public string R_o_value_result_real_4 { get; set; }
        public bool R_o_value_result_bool { get; set; }
        public short oi_on { get; set; }
        public short R_oi_on
        {
            get
            {
                return oi_on;
            }
            set
            {
                if (value == 1 && R_Name.Contains("视觉检测"))
                    ReadSignal(OperationType.OperationType_Record, this);
                else if (value == 1 && R_Name.Contains("链条机"))
                    ReadSignal(OperationType.OperationType_Processor, this);
                oi_on = value;
            }
        }
        public void ReadSignal(string type, MachineDB reader)
        {
            Task.Run(() =>
            {
                OnReadSignal?.Invoke(type, reader);
            });
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/DBItem/OperationType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Comm.DBItem
{
    public class OperationType
    {
        /// <summary>
        /// åªè®°å½•数据
        /// </summary>
        public const string OperationType_Record = "Record";
        /// <summary>
        /// å¤„理数据
        /// </summary>
        public const string OperationType_Processor = "Processor";
        /// <summary>
        /// è½¦è½®æ•°æ®
        /// </summary>
        public const string OperationType_WheelData = "WheelData";
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_Comm/DBItem/WheelDataDB.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Comm.DBItem
{
    public partial class WheelDataDB
    {
        public event Action<string, WheelDataDB> OnReadSignal;
        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 short R_oi_on { get; set; }
        public void ReadSignal(string type, WheelDataDB reader)
        {
            Task.Run(() =>
            {
                OnReadSignal?.Invoke(type, reader);
            });
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_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; }
    }
}
´úÂë¹ÜÀí/PCS/WCS_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]属性,否则会异常
    }
}
´úÂë¹ÜÀí/PCS/WCS_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);
        }
     }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/Request.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_WCS
{
    public class Request
    {
        /// <summary>
        /// post请求
        /// </summary>
        /// <param name="postData">参数</param>
        /// <param name="address">路径</param>
        /// <returns></returns>
        public static string RequestData(string postData, string url = "")
        {
            string reponse = string.Empty;
            try
            {
                //string tmp = "";
                //if (null != postData)
                //    tmp = JsonConvert.SerializeObject(postData);
                byte[] param = Encoding.UTF8.GetBytes(postData);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                request.Method = "POST";
                request.ContentType = "application/json";
                request.GetRequestStream().Write(param, 0, param.Length);
                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                {
                    Stream stream = response.GetResponseStream();
                    StreamReader streamReader = new StreamReader(stream);
                    string webResponse = streamReader.ReadToEnd();
                    reponse = webResponse;
                }
            }
            catch (Exception ex)
            {
                reponse = ex.Message;
            }
            return reponse;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_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>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_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>
    {
    }
}
´úÂë¹ÜÀí/PCS/WCS_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
    {
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/ParentCarJob.cs
ÎļþÒÑɾ³ý
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs
@@ -14,7 +14,10 @@
    [DisallowConcurrentExecution]
    public class AutoTaskJob : JobBase, IJob
    {
        LocationCreation Creation = new LocationCreation();
        /// <summary>
        /// è‡ªåŠ¨ä»»åŠ¡
        /// </summary>
        Createplcinfodetail Creation = new Createplcinfodetail();
        public Task Execute(IJobExecutionContext context)
        {
            try
@@ -28,7 +31,9 @@
        private void DoAction(IJobExecutionContext context)
        {
            //throw new NotImplementedException();
            Creation.HCJCreation();
            //Creation.HCJCreation();
            //Creation.PLCinfodetail();
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/GantryJob.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,155 @@
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.DBItem;
using WIDESEA_Comm.ItemDB;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS.IRepositories;
using WIDESEA_WCS.Repositories;
using WIDESEA_WCS.WCSClient;
namespace WIDESEA_WCS
{
    /// <summary>
    /// æ¡æž¶
    /// </summary>
    [DisallowConcurrentExecution]
    public class GantryJob : 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);
            }
            catch { }
            return Task.CompletedTask;
        }
        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;
            }
        }
        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/One_two_unitJob.cs
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_WCS.WCSClient;
namespace WIDESEA_WCS
{
    /// <summary>
    /// é“¾æ¡æœº
    /// </summary>
    [DisallowConcurrentExecution]
    public class PipelineJob : 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);
            }
            catch { }
            return Task.CompletedTask;
        }
        private void DoAction(PLCClient client)
        {
            throw new NotImplementedException();
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/CreatePLCinfodetail.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,257 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS.JobsPart.Common
{
    public class Createplcinfodetail
    {
        FreeDB FreeDB = new FreeDB();
        public void PLCinfodetail()
        {
            try
            {
                //for (int i = 1; i <= 3; i++)
                //{
                int i = 7;
                string name = "3单元链条机";
                dt_plcinfodetail plcinfodetail = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 0.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_oi_on",
                    plcdetail_number = name,
                    plcdetail_remark = "PLC->1, PMS->0 after setting i_ variables"
                };
                FreeDB.Add(plcinfodetail);
                dt_plcinfodetail plcinfodetail1 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 2.0 + (i - 1) * 330 + "",
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "R_o_wp_id",
                    plcdetail_number = name,
                    plcdetail_remark = "车轮SN"
                };
                FreeDB.Add(plcinfodetail1);
                dt_plcinfodetail plcinfodetail2 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 22.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "datetime",
                    plcdetail_name = "R_o_mach_start_time",
                    plcdetail_number = name,
                    plcdetail_remark = "开始时间"
                };
                FreeDB.Add(plcinfodetail2);
                dt_plcinfodetail plcinfodetail3 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 38.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "datetime",
                    plcdetail_name = "R_o_mach_finish_time",
                    plcdetail_number = name,
                    plcdetail_remark = "完成时间"
                };
                FreeDB.Add(plcinfodetail3);
                dt_plcinfodetail plcinfodetail4 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 54.0 + (i - 1) * 330 + "",
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "R_o_operator",
                    plcdetail_number = name,
                    plcdetail_remark = "操作人"
                };
                FreeDB.Add(plcinfodetail4);
                dt_plcinfodetail plcinfodetail5 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 74.0 + (i - 1) * 330 + "",
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "R_o_shift",
                    plcdetail_number = name,
                    plcdetail_remark = "去向"
                };
                FreeDB.Add(plcinfodetail5);
                dt_plcinfodetail plcinfodetail6 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 94.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_o_wp_status",
                    plcdetail_number = name,
                    plcdetail_remark = "质检状态 0:未定义,1:OK,2:NG"
                };
                FreeDB.Add(plcinfodetail6);
                dt_plcinfodetail plcinfodetail7 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 96.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_o_result",
                    plcdetail_number = name,
                    plcdetail_remark = "结果"
                };
                FreeDB.Add(plcinfodetail7);
                dt_plcinfodetail plcinfodetail8 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 98.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_o_error_code",
                    plcdetail_number = name,
                    plcdetail_remark = "错误代码"
                };
                FreeDB.Add(plcinfodetail8);
                dt_plcinfodetail plcinfodetail9 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 100.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_o_substation",
                    plcdetail_number = name,
                    plcdetail_remark = " "
                };
                FreeDB.Add(plcinfodetail9);
                dt_plcinfodetail plcinfodetail10 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 102.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "string",
                    plcdetail_len = 55,
                    plcdetail_name = "R_o_value_result_real_1",
                    plcdetail_number = name,
                    plcdetail_remark = "结果1"
                };
                FreeDB.Add(plcinfodetail10);
                dt_plcinfodetail plcinfodetail11 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 157.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "string",
                    plcdetail_len = 55,
                    plcdetail_name = "R_o_value_result_real_2",
                    plcdetail_number = name,
                    plcdetail_remark = "结果2"
                };
                FreeDB.Add(plcinfodetail11);
                dt_plcinfodetail plcinfodetail12 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 212.0 + (i - 1) * 330 + "",
                    plcdetail_valtype = "string",
                    plcdetail_len = 55,
                    plcdetail_name = "R_o_value_result_real_3",
                    plcdetail_number = name,
                    plcdetail_remark = "结果3"
                };
                FreeDB.Add(plcinfodetail12);
                dt_plcinfodetail plcinfodetail13 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 267 + (i - 1) * 330 + "",
                    plcdetail_valtype = "string",
                    plcdetail_len = 55,
                    plcdetail_name = "R_o_value_result_real_4",
                    plcdetail_number = name,
                    plcdetail_remark = "结果4"
                };
                FreeDB.Add(plcinfodetail13);
                dt_plcinfodetail plcinfodetail14 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "Truss",
                    plcdetail_db = "DB611",
                    plcdetail_value = 322.1 + (i - 1) * 330 + "",
                    plcdetail_valtype = "boolean",
                    plcdetail_name = "R_o_value_result_bool",
                    plcdetail_number = name,
                    plcdetail_remark = " "
                };
                FreeDB.Add(plcinfodetail14);
                //dt_plcinfodetail plcinfodetail15 = new dt_plcinfodetail()
                //{
                //    plcdetail_id = Guid.NewGuid(),
                //    plcdetail_iotype = "Truss",
                //    plcdetail_db = "DB611",
                //    plcdetail_value = 4.0 + (i - 1) * 330 + "",
                //    plcdetail_valtype = "string",
                //    plcdetail_len = 18,
                //    plcdetail_name = "fault_channel",
                //    plcdetail_number = name,
                //    plcdetail_remark = "错误消息频道"
                //};
                //FreeDB.Add(plcinfodetail15);
                //dt_plcinfodetail plcinfodetail16 = new dt_plcinfodetail()
                //{
                //    plcdetail_id = Guid.NewGuid(),
                //    plcdetail_iotype = "Truss",
                //    plcdetail_db = "DB611",
                //    plcdetail_value = 22.0 + (i - 1) * 330 + "",
                //    plcdetail_valtype = "string",
                //    plcdetail_len = 14,
                //    plcdetail_name = "fault_axes_drives",
                //    plcdetail_number = name,
                //    plcdetail_remark = "错误消息axes(è½´)驱动器"
                //};
                //FreeDB.Add(plcinfodetail16);
                //dt_plcinfodetail plcinfodetail17 = new dt_plcinfodetail()
                //{
                //    plcdetail_id = Guid.NewGuid(),
                //    plcdetail_iotype = "Truss",
                //    plcdetail_db = "DB611",
                //    plcdetail_value = 36.0 + (i - 1) * 330 + "",
                //    plcdetail_valtype = "string",
                //    plcdetail_len = 16,
                //    plcdetail_name = "fault_user_0_to1",
                //    plcdetail_number = name,
                //    plcdetail_remark = "错误消息用户区域0...1"
                //};
                //FreeDB.Add(plcinfodetail17);
                //}
            }
            catch (Exception ex)
            {
                throw;
            }
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/LocationCreation.cs
@@ -11,6 +11,9 @@
    public class LocationCreation
    {
        FreeDB freeDB = new FreeDB();
        /// <summary>
        /// è´§ä½ç”Ÿæˆ
        /// </summary>
        public void HCJCreation()
        {
            try
´úÂë¹ÜÀí/PCS/WCS_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>(); } }
    }
}
´úÂë¹ÜÀí/PCS/WCS_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);
        }
  }
}
´úÂë¹ÜÀí/PCS/WCS_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>(); } }
    }
 }
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS
{
    public partial class ToMesServer
    {
        /// <summary>
        /// æ·»åŠ å·¥å•ä¿¡æ¯
        /// </summary>
        /// <param name="requestTemp"></param>
        /// <returns></returns>
        public static WebResponseContent AddWorkinfo(dt_Workinfo requestTemp)
        {
            WebResponseContent content = new WebResponseContent();
            return content;
        }
        /// <summary>
        /// æ·»åŠ å·¥å•è¯¦æƒ…
        /// </summary>
        /// <param name="requestTemp"></param>
        /// <returns></returns>
        public static WebResponseContent AddActualProduction(dt_ActualProduction requestTemp)
        {
            WebResponseContent content = new WebResponseContent();
            return content;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/ToWMS/ToWmsServer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WCS
{
    public partial class ToWmsServer
    {
        /// <summary>
        /// å‘WMS申请添加AGV任务
        /// </summary>
        /// <param name="requestTemp"></param>
        /// <returns></returns>
        public static WebResponseContent AddTask(string requestTemp)
        {
            WebResponseContent content = new WebResponseContent();
            return content;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToMes/ToMESController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WCS;
namespace WIDESEA_WebApi.Controllers.ToMes
{
    [Route("api/ToMes")]
    [ApiController]
    public class ToMESController : ControllerBase
    {
        /// <summary>
        /// æ·»åŠ å·¥å•ä¿¡æ¯
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("AddWorkinfo")]
        public WebResponseContent AddWorkinfo([FromBody] dt_Workinfo request)
        {
            return ToMesServer.AddWorkinfo(request);
        }
        /// <summary>
        /// æ·»åŠ å·¥å•è¯¦æƒ…
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("AddActualProduction")]
        public WebResponseContent AddActualProduction([FromBody] dt_ActualProduction request)
        {
            return ToMesServer.AddActualProduction(request);
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ToWMS/ToWMSController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WebApi.Controllers.ToWMS
{
    [Route("api/ToWMS")]
    [ApiController]
    public class ToWMSController : ControllerBase
    {
        /// <summary>
        /// æ·»åŠ AGV任务
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("AddWorkinfo")]
        public WebResponseContent AddTask([FromBody] dt_Workinfo request)
        {
            return null;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/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_WCS.IServices;
namespace WIDESEA_WCS.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;
        }
    }
}
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/Controllers/WIDESEA_WCS/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_WCS.IServices;
namespace WIDESEA_WCS.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_Client/src/extension/widesea_wms/system/dt_stationinfo.js
@@ -42,6 +42,69 @@
        //示例:设置修改新建、编辑弹出框字段标签的长度
        // this.boxOptions.labelWidth = 150;
        this.buttons.splice(1, 0, {
          name: "取消禁用",
          icon: 'md-refresh',
          type: 'primary',
          onClick: function () {
              let rows = this.$refs.table.getSelected();
              if (rows.length == 0) return this.$error("请选择要取消禁用的数据");
              this.$confirm('确认要取消禁用吗?', '警告', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                  let data = [];
                  let parm = {
                      "data": data,
                      "type": "1"
                  }
                  rows.forEach(t => data.push(t.id))
                  this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "取消禁用中...").then(x => {
                      if (x.status) {
                          this.$Message.success("取消禁用成功!");
                          this.refresh();
                      } else {
                          this.$Message.error(x.message);
                      }
                  })
              });
          }
      })
      this.buttons.splice(1, 0, {
          name: "禁用",
          icon: 'md-refresh',
          type: 'danger',
          onClick: function () {
              let rows = this.$refs.table.getSelected();
              if (rows.length == 0) return this.$error("请选择要禁用的数据");
              this.$confirm('确认要禁用吗?', '警告', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                  let data = [];
                  let parm = {
                      "data": data,
                      "type": "0"
                  }
                  rows.forEach(t => data.push(t.id))
                  this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "锁定中...").then(x => {
                      if (x.status) {
                          this.$Message.success("禁用成功!");
                          this.refresh();
                      } else {
                          this.$Message.error(x.message);
                      }
                  })
              });
          }
      })
        this.buttons.splice(1, 0, {
          name: "移库",
          icon: 'el-icon-document',
          type: 'danger',
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Comm/TaskEnum/AGVTaskTypeEnum.cs
@@ -10,30 +10,30 @@
        /// <summary>
        /// é€æ»¡æ–™æž¶
        /// </summary>
        SendFull = 1,
        //SendFull = 1,
        /// <summary>
        /// å–空料架
        /// </summary>
        TakeEmpty = 2,
        //TakeEmpty = 2,
        /// <summary>
        /// ç»„盘入库
        /// å…¥åº“
        /// </summary>
        [Description("组盘入库")]
        TaskType_Inbound = 3,
        [Description("入库")]
        TaskType_Inbound = 1,
        /// <summary>
        /// æ¬è¿
        /// å‡ºåº“
        /// </summary>
        [Description("搬运")]
        TaskType_Outbound = 4,
        [Description("出库")]
        TaskType_Outbound = 2,
        /// <summary>
        /// è°ƒæ‹¨å…¥åº“
        /// å¤–协入库
        /// </summary>
        [Description("调拨入库")]
        TaskType_AllotInbound = 5,
        [Description("外协入库")]
        TaskType_OutsourceInbound = 3,
        /// <summary>
        /// è°ƒæ‹¨å‡ºåº“
        /// å¤–协出库
        /// </summary>
        [Description("调拨出库")]
        TaskType_AllotOutbound = 6,
        [Description("外协出库")]
        TaskType_OutsourceOutbound = 4,
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_Entity/ToAGV/RequestTask.cs
@@ -28,5 +28,6 @@
        /// ä»»åŠ¡ç­‰çº§
        /// </summary>
        public int? Priority { get; set; }
        public int? agv_qty { get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/QueryData.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS
{
    public class QueryData
    {
        static FreeDB freeDB = new FreeDB();
        /// <summary>
        /// æŸ¥è¯¢ç‰©æ–™ä¿¡æ¯
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static dt_materielinfo QueryMateriel(string type)
        {
            var materielinfo = freeDB.Select<dt_materielinfo>().Where(x => x.materiel_id == type).First();
            return materielinfo;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/Request.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_WMS
{
    public class Request
    {
        /// <summary>
        /// post请求
        /// </summary>
        /// <param name="postData">参数</param>
        /// <param name="address">路径</param>
        /// <returns></returns>
        public static string RequestData(string postData, string url = "")
        {
            string reponse = string.Empty;
            try
            {
                //string tmp = "";
                //if (null != postData)
                //    tmp = JsonConvert.SerializeObject(postData);
                byte[] param = Encoding.UTF8.GetBytes(postData);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                request.Method = "POST";
                request.ContentType = "application/json";
                request.GetRequestStream().Write(param, 0, param.Length);
                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                {
                    Stream stream = response.GetResponseStream();
                    StreamReader streamReader = new StreamReader(stream);
                    string webResponse = streamReader.ReadToEnd();
                    reponse = webResponse;
                }
            }
            catch (Exception ex)
            {
                reponse = ex.Message;
            }
            return reponse;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/Common/Task.cs
@@ -1,11 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm;
using WIDESEA_Common;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
using WIDESEA_WMS.IRepositories;
using WIDESEA_WMS.Repositories;
@@ -14,6 +16,7 @@
{
    public class Task
    {
        static FreeDB freeDB = new FreeDB();
        /// <summary>
        /// æ·»åŠ åŽ†å²ä»»åŠ¡
        /// </summary>
@@ -54,5 +57,54 @@
            htyRepository.Add(agvtask_Hty, true);
            repository.Delete(task, true);
        }
        /// <summary>
        /// åº“存处理
        /// </summary>
        /// <param name="task"></param>
        public static void Updateinventory(dt_agvtask task)
        {
            string[] bindSNs = task.bindSN.Split(",");
            if (bindSNs.Length > 0)
            {
                var Materiel = QueryData.QueryMateriel(task.agv_materielid);
                List<dt_inventory> inventorys = new List<dt_inventory>();
                foreach (string bindSN in bindSNs)
                {
                    dt_inventory inventory = new dt_inventory()
                    {
                        SN = bindSN,//待完善
                    };
                    inventorys.Add(inventory);
                }
                if (task.agv_tasktype == AGVTaskTypeEnum.TaskType_Inbound.ToString() || task.agv_tasktype == AGVTaskTypeEnum.TaskType_OutsourceInbound.ToString())
                    freeDB.AddRange(inventorys);
                else if (task.agv_tasktype == AGVTaskTypeEnum.TaskType_Outbound.ToString() || task.agv_tasktype == AGVTaskTypeEnum.TaskType_OutsourceOutbound.ToString())
                    freeDB.Remove(inventorys);
            }
        }
        /// <summary>
        /// è‡ªåŠ¨æ›´æ–°ç¼“å­˜æž¶çŠ¶æ€
        /// </summary>
        /// <param name="task"></param>
        public static void AutoUpdateHCJState(dt_agvtask task)
        {
            VOLContext context = new VOLContext();
            Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context);
            var station1 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_fromaddress);
            var station2 = stationinfoRepository.FindFirst(t => t.stationCode == task.agv_toaddress);
            station2.quantity = station1.quantity;
            station2.bindSN = station1.bindSN;
            station2.location_state = LocationStateEnum.Stroge.ToString();
            station2.tray_status = station1.tray_status;
            stationinfoRepository.Update(station2, true);
            station1.quantity = 0;
            station1.bindSN = string.Empty;
            station1.location_state = LocationStateEnum.Empty.ToString();
            station1.tray_status = string.Empty;
            stationinfoRepository.Update(station1, true);
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToAGV/ToAGVServer.cs
@@ -47,30 +47,34 @@
                if (task.agv_taskstate == StateName)
                {
                    respone.success = 2;
                    respone.Message = tasteInfo.TASK_NO + ":重复调用,任务状态为:" + tasteInfo.TASK_State;
                    return respone;
                    throw new Exception(tasteInfo.TASK_NO + ":重复调用,任务状态为:" + tasteInfo.TASK_State);
                }
                if (tasteInfo.TASK_State == 1)
                if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Executing)
                    task.agv_executingBeginTime = DateTime.Now;
                if (tasteInfo.TASK_State == 2)
                else if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Complete)
                    task.agv_executingEndTime = DateTime.Now;
                if (tasteInfo.TASK_State == 3)
                else if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Executing1)
                    task.agv_completeBeginTime = DateTime.Now;
                task.agv_taskstate = StateName;
                var count = repository.Update(task, true);
                if (count < 1)
                    throw new Exception("任务状态更新失败!任务ID:" + tasteInfo.TASK_NO + ";任务状态:" + tasteInfo.TASK_State);
                if (tasteInfo.TASK_State == 4)
                if (tasteInfo.TASK_State == (int)AGVTaskStateEnum.Complete1)
                {
                    Task.AddHtyTask(task);
                    Task.Updateinventory(task);
                    Task.AutoUpdateHCJState(task);
                }
            }
            catch (Exception ex)
            {
                respone.success = 3;
                respone.Message = ex.Message;
            }
            WriteWMSLog.LogAdd(tasteInfo.TASK_NO, respone.success == 1 ? "成功 " : "失败", "WMS", "AGV", json, JsonConvert.SerializeObject(respone), "AGV反馈任务状态", "UpdateTaskState", respone.Message);
            finally
            {
                WriteWMSLog.LogAdd(tasteInfo.TASK_NO, respone.success == 1 ? "成功 " : "失败", "WMS", "AGV", json, JsonConvert.SerializeObject(respone), "AGV反馈任务状态", "UpdateTaskState", respone.Message);
            }
            return respone;
        }
@@ -87,6 +91,7 @@
            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;
@@ -94,8 +99,9 @@
                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 = RequestData(postJson);
                report = Request.RequestData(postJson, url);
                respone = JsonConvert.DeserializeObject<AGVRespone>(report);
                if (respone.success != 1)
                    throw new Exception(respone.Message);
@@ -108,40 +114,6 @@
                respone.Message = ex.Message;
            }
            WriteWMSLog.LogAdd(requestTask.TASK_NO, respone.success == 1 ? "成功 " : "失败", "AGV", "WMS", postJson, report, "下发AGV任务", "SendAGVTask", respone.Message);
        }
        /// <summary>
        /// post请求
        /// </summary>
        /// <param name="postData">参数</param>
        /// <param name="address">路径</param>
        /// <returns></returns>
        public static string RequestData(string postData, string address = "")
        {
            string reponse = string.Empty;
            try
            {
                //string tmp = "";
                //if (null != postData)
                //    tmp = JsonConvert.SerializeObject(postData);
                byte[] param = Encoding.UTF8.GetBytes(postData);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(address);
                request.Method = "POST";
                request.ContentType = "application/json";
                request.GetRequestStream().Write(param, 0, param.Length);
                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                {
                    Stream stream = response.GetResponseStream();
                    StreamReader streamReader = new StreamReader(stream);
                    string webResponse = streamReader.ReadToEnd();
                    reponse = webResponse;
                }
            }
            catch (Exception ex)
            {
                reponse = ex.Message;
            }
            return reponse;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs
@@ -49,7 +49,7 @@
                {
                    station2.quantity = station1.quantity;
                    station2.bindSN = station1.bindSN;
                    station2.location_state = station1.location_state;
                    station2.location_state = LocationStateEnum.Stroge.ToString();
                    station2.tray_status = station1.tray_status;
                    freeDB.Update(station2);
@@ -64,11 +64,11 @@
                    throw new Exception("起始或目的地址,已存在任务!");
                }
                content.OK();
                WriteDBLog.Success($"手动移库", new { æ•°æ® = requestTemp }, "WMS", UserContext.Current.UserTrueName);
                WriteDBLog.Success($"手动移库", new { æ•°æ® = requestTemp }, "WMS", UserContext.Current.UserName + UserContext.Current.UserTrueName);
            }
            catch (Exception ex)
            {
                WriteDBLog.Error($"手动移库", new { æ•°æ® = requestTemp, å¼‚常信息 = ex.Message }, "WMS", UserContext.Current.UserTrueName);
                WriteDBLog.Error($"手动移库", new { æ•°æ® = requestTemp, å¼‚常信息 = ex.Message }, "WMS", UserContext.Current.UserName + UserContext.Current.UserTrueName);
                content.Error(ex.Message);
            }
            return content;
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToMes/UpdateStation.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
using WIDESEA_Entity.DomainModels.Mes;
namespace WIDESEA_WMS
{
    public partial class ToMesServer
    {
        /// <summary>
        /// æ›´æ–°è´§ä½çŠ¶æ€
        /// </summary>
        /// <param name="requestTemp"></param>
        /// <returns></returns>
        public WebResponseContent UpdateStation(dt_agvtask requestTemp)
        {
            WebResponseContent content = new WebResponseContent();
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToPCS/AddTask.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Json;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.FreeDB;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS.ToPCS
{
    public partial class ToPCSServer
    {
        public  WebResponseContent AddTask(string json)
        {
            WebResponseContent content = new WebResponseContent();
            TaskData taskData = new TaskData();
            try
            {
                if (string.IsNullOrEmpty(json) || json == "null")
                    throw new Exception("未获取到请求参数数据");
                taskData = JsonConvert.DeserializeObject<TaskData>(json);
                var haveInTask = freeDB.Select<dt_agvtask>()
                   .Where(t => t.agv_fromaddress == taskData.fromaddress
                   || t.agv_fromaddress == taskData.toaddress
                   || t.agv_toaddress == taskData.fromaddress
                   || t.agv_toaddress == taskData.toaddress
                   ).Any();
                if (haveInTask)
                    throw new Exception("当前起点或终点已存在任务!");
                dt_agvtask taskinfo = new dt_agvtask()
                {
                };
            }
            catch (Exception ex)
            {
                content.Message = ex.Message;
            }
            return content;
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToPCS/TaskData.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_WMS.ToPCS
{
    public class TaskData
    {
        /// <summary>
        /// ä»»åŠ¡å·
        /// </summary>
        public string TaskNum {  get; set; }
        /// <summary>
        /// èµ·ç‚¹åœ°å€
        /// </summary>
        public string fromaddress { get; set; }
        /// <summary>
        /// ç»ˆç‚¹åœ°å€
        /// </summary>
        public  string toaddress {  get; set; }
        /// <summary>
        /// ç‰©æ–™ç±»åž‹
        /// </summary>
        public string materielid {  get; set; }
        /// <summary>
        /// è½¦è½®SN号
        /// </summary>
        public string WheelSN {  get; set; }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WMS/ToPCS/ToPCSServer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.FreeDB;
using WIDESEA_Entity.DomainModels;
namespace WIDESEA_WMS.ToPCS
{
    public partial class ToPCSServer
    {
        FreeDB freeDB = new FreeDB();
        public ToPCSServer()
        {
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/JobTask.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
using Pomelo.AspNetCore.TimedJob;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WIDESEA_WebApi.Controllers
{
    public class JobTask : Job
    {
        [Invoke(Begin = "2024-01-19 00:00", Interval = 1000*5, /*IsEnabled = true,*/ SkipWhileExecuting = true)]
        public void TaskTime()
        {
            //Console.WriteLine(DateTime.Now.ToString());
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/ToPCS/ToPCSController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using WIDESEA_Core.Utilities;
using WIDESEA_Entity.DomainModels.Mes;
using WIDESEA_WMS;
using WIDESEA_WMS.ToPCS;
namespace WIDESEA_WebApi.Controllers.ToPCS
{
    [Route("api/ToPCS")]
    [ApiController]
    public class ToPCSController : ControllerBase
    {
        ToPCSServer Server=new ToPCSServer();
        /// <summary>
        /// æ·»åŠ AGV任务
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost, Route("AddTask"), Authorize, AllowAnonymous]
        public WebResponseContent AddTask([FromBody] object saveModel)
        {
            return Server.AddTask(JsonConvert.SerializeObject(saveModel));
        }
    }
}
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/ToWms/ToWMSController.cs
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Controllers/ToMes/ToWMSController.cs ÐÞ¸Ä
@@ -4,14 +4,14 @@
using WIDESEA_Entity.DomainModels.Mes;
using WIDESEA_WMS;
namespace WIDESEA_WCSServer.Controllers.ToMes
namespace WIDESEA_WCSServer.Controllers.ToWms
{
    [Route("api/ToMes")]
    [Route("api/ToWms")]
    [ApiController]
    public class ToWMSController : ControllerBase
    {
        /// <summary>
        /// 3楼设备叫料(手动,临时)
        /// ç§»åº“(手动,临时)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/Startup.cs
@@ -184,6 +184,7 @@
            {
                options.MaxRequestBodySize = 1024 * 1024 * 100;//100M
            });
            services.AddTimedJob();//添加定时器
        }
        public void ConfigureContainer(ContainerBuilder builder)
@@ -251,6 +252,7 @@
            {
                endpoints.MapControllers();
            });
            app.UseTimedJob();//添加定时器
        }
    }
´úÂë¹ÜÀí/WMS/WMS_Server/WIDESEA_WebApi/WIDESEA_WebApi.csproj
@@ -25,6 +25,7 @@
    <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" />
    <PackageReference Include="TimedJob" Version="2.0.0" />
  </ItemGroup>
  <ItemGroup>
ÏîÄ¿×ÊÁÏ/DB/dt_geometry_data(³µÂÖÊý¾Ý).xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/DB/dt_geometry_data.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
/*
 Navicat Premium Data Transfer
 Source Server         : DESKTOP-SCT31AM
 Source Server Type    : SQL Server
 Source Server Version : 13001601
 Source Catalog        : WIDESEA_DB
 Source Schema         : dbo
 Target Server Type    : SQL Server
 Target Server Version : 13001601
 File Encoding         : 65001
 Date: 25/01/2024 11:03:06
*/
-- ----------------------------
-- Table structure for dt_geometry_data
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_geometry_data]') AND type IN ('U'))
    DROP TABLE [dbo].[dt_geometry_data]
GO
CREATE TABLE [dbo].[dt_geometry_data] (
  [TypeId] int  IDENTITY(1,1) NOT NULL,
  [Description] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [a] float(53)  NOT NULL,
  [b] float(53)  NOT NULL,
  [c] float(53)  NOT NULL,
  [d] float(53)  NOT NULL,
  [e] float(53)  NOT NULL,
  [f] float(53)  NOT NULL,
  [g] float(53)  NOT NULL,
  [h] float(53)  NOT NULL
)
GO
ALTER TABLE [dbo].[dt_geometry_data] SET (LOCK_ESCALATION = TABLE)
GO
-- ----------------------------
-- Records of dt_geometry_data
-- ----------------------------
SET IDENTITY_INSERT [dbo].[dt_geometry_data] ON
GO
INSERT INTO [dbo].[dt_geometry_data] ([TypeId], [Description], [a], [b], [c], [d], [e], [f], [g], [h]) VALUES (N'1', N'TSW-003D (915KKD)', N'69', N'12', N'126', N'-28', N'972', N'185', N'27', N'70')
GO
INSERT INTO [dbo].[dt_geometry_data] ([TypeId], [Description], [a], [b], [c], [d], [e], [f], [g], [h]) VALUES (N'2', N'TSW-051 (840HESA)', N'70', N'12', N'128', N'-30', N'900', N'197', N'27', N'70')
GO
INSERT INTO [dbo].[dt_geometry_data] ([TypeId], [Description], [a], [b], [c], [d], [e], [f], [g], [h]) VALUES (N'3', N'TSW-005 (840HDSA)', N'70', N'12', N'128', N'-30', N'898', N'185', N'27', N'70')
GO
SET IDENTITY_INSERT [dbo].[dt_geometry_data] OFF
GO
-- ----------------------------
-- Auto increment value for dt_geometry_data
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[dt_geometry_data]', RESEED, 3)
GO
-- ----------------------------
-- Primary Key structure for table dt_geometry_data
-- ----------------------------
ALTER TABLE [dbo].[dt_geometry_data] ADD CONSTRAINT [PK__dt_geome__516F03B53F710A80] PRIMARY KEY CLUSTERED ([TypeId])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
ÏîÄ¿×ÊÁÏ/ÆäËû/»áÒé/»ú¼Ó¹¤¼ì²âÉÏÏÂÁÏ×Ô¶¯»¯ÏîÄ¿WMSÓëMESÐÅÏ¢½»»¥¡¢ÍøÂç²¼¾ÖÊÂÐûÌÖÂÛ»áÒé¼ÍÒª.png
ÏîÄ¿×ÊÁÏ/ÆäËû/»áÒé/³µÂÖ³§¶þÏß»ú¼Ó¹¤ÉÏÏÂÁÏ×Ô¶¯»¯ÏîĿרÌâ»á.png
ÏîÄ¿×ÊÁÏ/ÆäËû/¿âÇø·ÖÅä.txt
@@ -1,8 +1,10 @@
库区1:32个库位,16列;最多16个品种(50件以下)小众车轮
库区2:1排36个库位,4排共144(144*5件),最多4品种;针对非常规车轮(50-180件):不同型号同炉号
库区1:32个库位,16列;最多16个品种(50件以下)小众车轮    åŒåž‹å·åŒç‚‰å·ä¸€åˆ—
库区2:1排36个库位,4排共144(144*5件),最多4品种;针对非常规车轮(50-180件):同型号同炉号
库区3:1排45个库位,5排共225(225*5)最多5个品种;针对常规(840、915):同型号(图号唯一,根据图号区分型号)/不同炉号    ï¼ï¼ï¼äº§å“ä»£ç å¹²ä»€ä¹ˆç”¨
库区4:1排40个库位,3排共120(120*5)最多3个品种;针对1100mm-1300mm车轮/也能存放1100mm以下车轮:不同型号同炉号
72  11*6
根据订单数来还是根据型号来
逻辑:当库区1满;50以下车轮直接出库
库区2满库区3库位多放库区3否则放外协库
ÏîÄ¿×ÊÁÏ/ÆäËû/ÏÖ³¡Í¼Æ¬/0c01d30d1a8c2e38df4f76d1460b9e0.jpg
Binary files differ
ÏîÄ¿×ÊÁÏ/ϵͳÎļþ/Ì«Ô­ÖØ¹¤WMSϵͳ˵Ã÷V1.0.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSÓëAGVºÍèì¼Ü·À´ô½»»¥Ð­Òé/AGVÓëèì¼Ü·À´ôЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSÓëèì¼ÜЭÒé/ЭÒé.xlsx
Binary files differ
ÏîÄ¿×ÊÁÏ/ͨÐÅЭÒé/PCSÓëèì¼ÜЭÒé/ÐÂÔöÉ豸ÐèÒª²É¼¯µÄÐÅÏ¢.xlsx
Binary files differ