From 53d6a24cb335b0c9b4449e1211ce8ea644d68d67 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期五, 31 五月 2024 20:48:53 +0800 Subject: [PATCH] 可根据图号更改下料口车轮数量入库条件 --- 代码管理/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs | 44 ++++- 代码管理/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue | 10 代码管理/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs | 12 + 代码管理/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue | 24 +- 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs | 330 ++++++++++------------------------------ 代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs | 1 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs | 16 + 代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs | 1 代码管理/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs | 18 ++ 代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs | 1 代码管理/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs | 4 代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs | 4 代码管理/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs | 1 13 files changed, 185 insertions(+), 281 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue" index 3f8d8da..28cf6f1 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/widesea_wcs/baseinfo/dt_geometry_data.vue" @@ -27,9 +27,9 @@ cnName: '鏈哄姞宸ヨ溅杞俊鎭�', name: 'baseinfo/dt_geometry_data', url: "/dt_geometry_data/", - sortName: "ID" + sortName: "TypeId" }); - const editFormFields = ref({"TypeId":"","Description":"","a":"","b":"","c":"","d":"","e":"","f":"","g":"","h":""}); + const editFormFields = ref({"TypeId":"","Description":"","a":"","b":"","c":"","d":"","e":"","f":"","g":"","h":"","stackNoRange":"","weight":""}); const editFormOptions = ref([[{"title":"TypeId","required":true,"field":"TypeId","type":"text"}, {"title":"鍥惧彿","required":true,"field":"Description","type":"text"}], [{"title":"a","required":true,"field":"a","type":"text"}, @@ -39,7 +39,9 @@ [{"title":"e","required":true,"field":"e","type":"text"}, {"title":"f","required":true,"field":"f","type":"text"}], [{"title":"g","required":true,"field":"g","type":"text"}, - {"title":"h","required":true,"field":"h","type":"text"}]]); + {"title":"h","required":true,"field":"h","type":"text"}], + [{"title":"鎵撳寘鏁伴噺","required":true,"field":"stackNoRange","type":"text"}, + {"title":"閲嶉噺","required":true,"field":"weight","type":"float"}]]); const searchFormFields = ref({"TypeId":"","Description":""}); const searchFormOptions = ref([[{"title":"鍥惧彿","field":"Description","type":"like"},{"title":"TypeId","field":"TypeId","type":"int"}]]); const columns = ref([{field:'TypeId',title:'TypeId',type:'int',width:110,require:true,align:'left',sort:true}, @@ -52,6 +54,8 @@ {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'}, + {field:'stackNoRange',title:'鎵撳寘鏁伴噺',type:'int',width:110,require:true,align:'left',sort:true}, + {field:'weight',title:'閲嶉噺',type:'float',width:110,require:true,align:'left'}, {field:'ID',title:'ID',type:'int',sort:true,width:80,hidden:true,readonly:true,require:true,align:'left'}]); const detail = ref({ cnName: "#detailCnName", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" index 02482b4..d1c4899 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" @@ -116,6 +116,22 @@ [Required(AllowEmptyStrings=false)] public int ID { get; set; } - + /// <summary> + /// 鎵撳寘鏁伴噺 + /// </summary> + [Display(Name = "stackNoRange")] + [Column(TypeName = "int")] + //[Editable(true)] + //[Required(AllowEmptyStrings = false)] + public int stackNoRange { get; set; } + + /// <summary> + ///閲嶉噺 + /// </summary> + [Display(Name = "weight")] + [Column(TypeName = "float")] + //[Editable(true)] + //[Required(AllowEmptyStrings = false)] + public float? weight { get; set; } } } \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs" index 714b1d9..04117b6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Gantry.cs" @@ -45,7 +45,6 @@ Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context); Idt_mes_detailRepository mes_DetailRepository = new dt_mes_detailRepository(Context); Idt_mes_headRepository mes_HeadRepository = new dt_mes_headRepository(Context); - Idt_geometry_data_detectionlineRepository detectionlineRepository = new dt_geometry_data_detectionlineRepository(Context); var plc = repository.FindFirst(x => x.plcinfo_name == client.PLCName); List<string> names = new List<string>() { "1鍗曞厓杈婇亾涓嬫枡鏌ヨ杞﹁疆", "2鍗曞厓杈婇亾涓嬫枡鏌ヨ杞﹁疆", "3鍗曞厓杈婇亾涓嬫枡鏌ヨ杞﹁疆", "杈婇亾涓婃枡鏌ヨ杞﹁疆" }; foreach (string name in names) @@ -69,145 +68,51 @@ client.WriteByOrder("W_i_status", (byte)2, name); client.WriteByOrder("R_oi_on", (byte)0, name); #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟淇℃伅", "PCS"); WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟淇℃伅"); #endregion continue; } - - #region MyRegion - //var mes_Detail = mes_DetailRepository.FindFirst(x => x.SN == wp_id); - //if (mes_Detail == null) - //{ - // client.WriteByOrder("W_i_status", (byte)2, name); - // client.WriteByOrder("R_oi_on", (byte)0, name); - // #region 鏃ュ織璁板綍 - // WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟璇︽儏", "PCS"); - // #endregion - // continue; - //} - //var mes_Head = mes_HeadRepository.FindFirst(x => x.jobID == mes_Detail.jobID); - //if (mes_Head == null) - //{ - // client.WriteByOrder("W_i_status", (byte)2, name); - // client.WriteByOrder("R_oi_on", (byte)0, name); - // #region 鏃ュ織璁板綍 - // WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟澶磋〃", "PCS"); - // #endregion - // continue; - //} - #endregion - - - if (name != "杈婇亾涓婃枡鏌ヨ杞﹁疆") + var geometry = Pipeline.QueryMateriel(Mes_Work.drawingNo); + if (geometry == null) { - //var geometry = dataRepository.FindFirst(x => x.TypeId == (Int32)wp_type); - var geometry = dataRepository.Find(x => x.Description == Mes_Work.drawingNo).FirstOrDefault(); - var geometry1 = detectionlineRepository.Find(x => x.Description == Mes_Work.drawingNo).FirstOrDefault(); - if (geometry == null && geometry1 == null) - { - //DBExtension.Write(details.Where(x => x.plcdetail_name == "W_i_status").First(), client, (Int16)2); - //1-鎵惧埌鏁版嵁锛�2-鏈壘鍒板伐浠剁被鍨嬫暟鎹� - client.WriteByOrder("W_i_status", (byte)2, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌鏈哄姞宸ヨ溅杞俊鎭�", "PCS"); - WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌鏈哄姞宸ヨ溅杞俊鎭�"); - #endregion - } - else - { - //1-鎵惧埌鏁版嵁锛�2-鏈壘鍒板伐浠剁被鍨嬫暟鎹� - client.WriteByOrder("W_i_status", (byte)1, name); - client.WriteByOrder("W_i_parameter_a", geometry == null ? (float)geometry1.a : (float)geometry.a, name); - client.WriteByOrder("W_i_parameter_b", geometry == null ? (float)geometry1.b : (float)geometry.b, name); - client.WriteByOrder("W_i_parameter_c", geometry == null ? (float)geometry1.c : (float)geometry.c, name); - client.WriteByOrder("W_i_parameter_d", geometry == null ? (float)geometry1.d : (float)geometry.d, name); - client.WriteByOrder("W_i_parameter_e", geometry == null ? (float)geometry1.e : (float)geometry.e, name); - client.WriteByOrder("W_i_parameter_f", geometry == null ? (float)geometry1.f : (float)geometry.f, name); - client.WriteByOrder("W_i_parameter_g", geometry == null ? (float)geometry1.g : (float)geometry.g, name); - client.WriteByOrder("W_i_parameter_h", geometry == null ? (float)geometry1.h : (float)geometry.h, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Success(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\n" + - // $"a锛歿(geometry == null ? (float)geometry1.a : (float)geometry.a)}\n" + - // $"b锛歿(geometry == null ? (float)geometry1.b : (float)geometry.b)}\n" + - // $"c锛歿(geometry == null ? (float)geometry1.c : (float)geometry.c)}\n" + - // $"d锛歿(geometry == null ? (float)geometry1.d : (float)geometry.d)}\n" + - // $"e锛歿(geometry == null ? (float)geometry1.e : (float)geometry.e)}\n" + - // $"f锛歿(geometry == null ? (float)geometry1.f : (float)geometry.f)}\n" + - // $"g锛歿(geometry == null ? (float)geometry1.g : (float)geometry.g)}\n" + - // $"h锛歿(geometry == null ? (float)geometry1.h : (float)geometry.h)}\n" + - // $"R_oi_on锛�0", "PCS"); - WriteLog.Write_Log(name, wp_id, "鍐欏叆淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\n" + - $"a锛歿(geometry == null ? (float)geometry1.a : (float)geometry.a)}\n" + - $"b锛歿(geometry == null ? (float)geometry1.b : (float)geometry.b)}\n" + - $"c锛歿(geometry == null ? (float)geometry1.c : (float)geometry.c)}\n" + - $"d锛歿(geometry == null ? (float)geometry1.d : (float)geometry.d)}\n" + - $"e锛歿(geometry == null ? (float)geometry1.e : (float)geometry.e)}\n" + - $"f锛歿(geometry == null ? (float)geometry1.f : (float)geometry.f)}\n" + - $"g锛歿(geometry == null ? (float)geometry1.g : (float)geometry.g)}\n" + - $"h锛歿(geometry == null ? (float)geometry1.h : (float)geometry.h)}\n" + - $"R_oi_on锛�0"); - #endregion - } + //1-鎵惧埌鏁版嵁锛�2-鏈壘鍒板伐浠剁被鍨嬫暟鎹� + client.WriteByOrder("W_i_status", (byte)2, name); + client.WriteByOrder("R_oi_on", (byte)0, name); + #region 鏃ュ織璁板綍 + WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌鏈哄姞宸ヨ溅杞俊鎭�"); + #endregion } else { - var geometry = detectionlineRepository.Find(x => x.Description == Mes_Work.drawingNo).FirstOrDefault(); - var geometry1 = dataRepository.Find(x => x.Description == Mes_Work.drawingNo).FirstOrDefault(); - if (geometry == null && geometry1 == null) - { - client.WriteByOrder("W_i_status", (byte)2, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌妫�娴嬬嚎杞﹁疆淇℃伅", "PCS"); - WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌妫�娴嬬嚎杞﹁疆淇℃伅"); - #endregion - } - else - { - client.WriteByOrder("W_i_status", (byte)1, name); - client.WriteByOrder("W_i_parameter_a", geometry == null ? (float)geometry1.a : (float)geometry.a, name); - client.WriteByOrder("W_i_parameter_b", geometry == null ? (float)geometry1.b : (float)geometry.b, name); - client.WriteByOrder("W_i_parameter_c", geometry == null ? (float)geometry1.c : (float)geometry.c, name); - client.WriteByOrder("W_i_parameter_d", geometry == null ? (float)geometry1.d : (float)geometry.d, name); - client.WriteByOrder("W_i_parameter_e", geometry == null ? (float)geometry1.e : (float)geometry.e, name); - client.WriteByOrder("W_i_parameter_f", geometry == null ? (float)geometry1.f : (float)geometry.f, name); - client.WriteByOrder("W_i_parameter_g", geometry == null ? (float)geometry1.g : (float)geometry.g, name); - client.WriteByOrder("W_i_parameter_h", geometry == null ? (float)geometry1.h : (float)geometry.h, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Success(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\n" + - // $"a锛歿(geometry == null ? (float)geometry1.a : (float)geometry.a)}\n" + - // $"b锛歿(geometry == null ? (float)geometry1.b : (float)geometry.b)}\n" + - // $"c锛歿(geometry == null ? (float)geometry1.c : (float)geometry.c)}\n" + - // $"d锛歿(geometry == null ? (float)geometry1.d : (float)geometry.d)}\n" + - // $"e锛歿(geometry == null ? (float)geometry1.e : (float)geometry.e)}\n" + - // $"f锛歿(geometry == null ? (float)geometry1.f : (float)geometry.f)}\n" + - // $"g锛歿(geometry == null ? (float)geometry1.g : (float)geometry.g)}\n" + - // $"h锛歿(geometry == null ? (float)geometry1.h : (float)geometry.h)}\n" + - // $"R_oi_on锛�0", "PCS"); - WriteLog.Write_Log(name, wp_id, "鍐欏叆淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\n" + - $"a锛歿(geometry == null ? (float)geometry1.a : (float)geometry.a)}\n" + - $"b锛歿(geometry == null ? (float)geometry1.b : (float)geometry.b)}\n" + - $"c锛歿(geometry == null ? (float)geometry1.c : (float)geometry.c)}\n" + - $"d锛歿(geometry == null ? (float)geometry1.d : (float)geometry.d)}\n" + - $"e锛歿(geometry == null ? (float)geometry1.e : (float)geometry.e)}\n" + - $"f锛歿(geometry == null ? (float)geometry1.f : (float)geometry.f)}\n" + - $"g锛歿(geometry == null ? (float)geometry1.g : (float)geometry.g)}\n" + - $"h锛歿(geometry == null ? (float)geometry1.h : (float)geometry.h)}\n" + - $"R_oi_on锛�0"); - #endregion - } + //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); + client.WriteByOrder("W_i_parameter_d", (float)geometry.d, name); + client.WriteByOrder("W_i_parameter_e", (float)geometry.e, name); + client.WriteByOrder("W_i_parameter_f", (float)geometry.f, name); + client.WriteByOrder("W_i_parameter_g", (float)geometry.g, name); + client.WriteByOrder("W_i_parameter_h", (float)geometry.h, name); + client.WriteByOrder("R_oi_on", (byte)0, name); + #region 鏃ュ織璁板綍 + WriteLog.Write_Log(name, wp_id, "鍐欏叆淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\n" + + $"a锛歿(float)geometry.a}\n" + + $"b锛歿(float)geometry.b}\n" + + $"c锛歿(float)geometry.c}\n" + + $"d锛歿(float)geometry.d}\n" + + $"e锛歿(float)geometry.e}\n" + + $"f锛歿(float)geometry.f}\n" + + $"g锛歿(float)geometry.g}\n" + + $"h锛歿(float)geometry.h}\n" + + $"R_oi_on锛�0"); + #endregion } - } } } catch (Exception ex) { - //WriteDBLog.Error("鏌ヨ杞﹁疆鏁版嵁", $"閿欒淇℃伅锛歿ex.Message}", "PCS"); WriteLog.Write_Log("鎶ラ敊鏃ュ織", namea, "閿欒淇℃伅锛�", $"閿欒淇℃伅锛歿ex.Message}"); } } @@ -227,7 +132,6 @@ Idt_plcinfoheadRepository repository = new dt_plcinfoheadRepository(Context); Idt_plcinfodetailRepository plcRepository = new dt_plcinfodetailRepository(Context); Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context); - Idt_geometry_data_detectionlineRepository detectionlineRepository = new dt_geometry_data_detectionlineRepository(Context); Idt_mes_detailRepository mes_DetailRepository = new dt_mes_detailRepository(Context); IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(Context); Idt_mes_headRepository mes_HeadRepository = new dt_mes_headRepository(Context); @@ -262,126 +166,59 @@ client.WriteByOrder("W_i_status", (byte)2, name); client.WriteByOrder("R_oi_on", (byte)0, name); #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟璇︽儏", "PCS"); WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟璇︽儏"); #endregion continue; } - #region MyRegion - //var mes_Detail = mes_DetailRepository.FindFirst(x => x.SN == wp_id); - //if (mes_Detail == null) - //{ - // client.WriteByOrder("W_i_status", (byte)2, name); - // client.WriteByOrder("R_oi_on", (byte)0, name); - // #region 鏃ュ織璁板綍 - // WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟璇︽儏", "PCS"); - // #endregion - // continue; - //} - //var mes_Head = mes_HeadRepository.FindFirst(x => x.jobID == mes_Detail.jobID); - //if (mes_Head == null) - //{ - // client.WriteByOrder("W_i_status", (byte)2, name); - // client.WriteByOrder("R_oi_on", (byte)0, name); - // #region 鏃ュ織璁板綍 - // WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌宸ュ崟澶磋〃", "PCS"); - // #endregion - // continue; - //} - #endregion var mes_Head = mes_HeadRepository.FindFirst(x => x.jobID == Mes_Work.jobID); - if (name != "杈婇亾涓婃枡鏌ヨ璁㈠崟") + //闇�娣诲姞鏌ヨ杞﹁疆SN鍙疯鍗曢�昏緫 闇�娣诲姞鍏ュ簱妯″紡鍒ゆ柇锛屾墜鍔ㄥ叆搴撴ā寮忛渶浜哄伐娣诲姞鍏ュ簱搴撳尯锛屽惁鍒欐姤璀� + var pattern = patternRepository.FindFirst(x => x.pattern_name == "鍏ュ簱妯″紡").pattern_state; + if (pattern != 1 && string.IsNullOrEmpty(mes_Head.area)) { - //闇�娣诲姞鏌ヨ杞﹁疆SN鍙疯鍗曢�昏緫 闇�娣诲姞鍏ュ簱妯″紡鍒ゆ柇锛屾墜鍔ㄥ叆搴撴ā寮忛渶浜哄伐娣诲姞鍏ュ簱搴撳尯锛屽惁鍒欐姤璀� - var pattern = patternRepository.FindFirst(x => x.pattern_name == "鍏ュ簱妯″紡").pattern_state; - if (pattern != 1 && string.IsNullOrEmpty(mes_Head.area)) - { - client.WriteByOrder("W_i_status", (byte)4, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�4\nR_oi_on锛�0\n\n鎵嬪姩鍏ュ簱妯″紡鏈�夋嫨搴撳尯", "PCS"); - WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�4\nR_oi_on锛�0\n\n鎵嬪姩鍏ュ簱妯″紡鏈�夋嫨搴撳尯"); - #endregion - continue; - } - //var geometry = dataRepository.FindFirst(x => x.TypeId == (Int32)wp_type); - var geometry = dataRepository.Find(x => x.Description == mes_Head.drawingNo /*&& x.TypeId == (Int32)wp_type*/).FirstOrDefault(); - var geometry1 = detectionlineRepository.Find(x => x.Description == mes_Head.drawingNo).FirstOrDefault(); - if (geometry == null && geometry1 == null) - { - //1-濂�,鍏佽鍔犲伐锛�2-涓嶅湪鍒楄〃涓紝3-涓嶅姞宸ヨ溅杞被鍨嬶紝4-鎵嬪姩鍏ュ簱妯″紡浜哄伐鏈�夋嫨搴撳尯 - client.WriteByOrder("W_i_status", (byte)2, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌鏈哄姞宸ヨ溅杞俊鎭�", "PCS"); - WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌鏈哄姞宸ヨ溅杞俊鎭�"); - #endregion - continue; - } - else - { - //1-濂�,鍏佽鍔犲伐锛�2-涓嶅湪鍒楄〃涓紝3-涓嶅姞宸ヨ溅杞被鍨嬶紝4-鎵嬪姩鍏ュ簱妯″紡浜哄伐鏈�夋嫨搴撳尯 - client.WriteByOrder("W_i_status", (byte)1, name); - client.WriteByOrder("W_i_job_id", Mes_Work.jobID, name); - client.WriteByOrder("W_i_drawing_id", Mes_Work.drawingNo, name); - client.WriteByOrder("W_i_heat_id", Mes_Work.heatID, name); - //client.WriteByOrder("W_i_sourceheat", "", name); - client.WriteByOrder("W_i_batch_id", Mes_Work.heatBatchID, name); - - //灞忚斀宸ヨ壓(灞忚斀瑙嗚妫�娴�/灞忚斀娑傛补) - //if (name != "杈婇亾涓婃枡鏌ヨ杞﹁疆") - //{ - client.WriteByOrder("W_i_skip_op_SJ1", name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_1, name);//灞忚斀瑙嗚妫�娴嬭澶�1 - client.WriteByOrder("W_i_skip_op_SJ2", name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_2, name);//灞忚斀瑙嗚妫�娴嬭澶�2 - client.WriteByOrder("W_i_skip_op_LT", mes_Head.skip_op_3, name);//灞忚斀閾炬潯鏈� - //} - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - WriteLog.Write_Log(name, wp_id, "鍐欏叆淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + - $"\nW_i_job_id锛歿Mes_Work.jobID}\nW_i_drawing_id锛歿Mes_Work.drawingNo}\nW_i_heat_id锛歿Mes_Work.heatID}\nW_i_batch_id锛歿Mes_Work.heatBatchID}" + - $"\nW_i_skip_op_SJ1锛歿(name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_1)}\nW_i_skip_op_SJ2锛歿(name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_2)}" + - $"\nW_i_skip_op_LT锛歿mes_Head.skip_op_3}\nR_oi_on锛�0"); - //WriteDBLog.Success(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + - // $"\nW_i_job_id锛歿Mes_Work.jobID}\nW_i_drawing_id锛歿Mes_Work.drawingNo}\nW_i_heat_id锛歿Mes_Work.heatID}\nW_i_batch_id锛歿Mes_Work.heatBatchID}" + - // $"\nW_i_skip_op_SJ1锛歿(name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_1)}\nW_i_skip_op_SJ2锛歿(name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_2)}" + - // $"\nW_i_skip_op_LT锛歿mes_Head.skip_op_3}\nR_oi_on锛�0", "PCS"); - #endregion - } + client.WriteByOrder("W_i_status", (byte)4, name); + client.WriteByOrder("R_oi_on", (byte)0, name); + #region 鏃ュ織璁板綍 + WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�4\nR_oi_on锛�0\n\n鎵嬪姩鍏ュ簱妯″紡鏈�夋嫨搴撳尯"); + #endregion + continue; + } + var geometry = Pipeline.QueryMateriel(Mes_Work.drawingNo); + if (geometry == null) + { + //1-濂�,鍏佽鍔犲伐锛�2-涓嶅湪鍒楄〃涓紝3-涓嶅姞宸ヨ溅杞被鍨嬶紝4-鎵嬪姩鍏ュ簱妯″紡浜哄伐鏈�夋嫨搴撳尯 + client.WriteByOrder("W_i_status", (byte)2, name); + client.WriteByOrder("R_oi_on", (byte)0, name); + #region 鏃ュ織璁板綍 + WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌鏈哄姞宸ヨ溅杞俊鎭�"); + #endregion + continue; } else { - var geometry = detectionlineRepository.Find(x => x.Description == mes_Head.drawingNo /*&& x.TypeId == (Int32)wp_type*/).FirstOrDefault(); - var geometry1 = dataRepository.Find(x => x.Description == mes_Head.drawingNo).FirstOrDefault(); - if (geometry == null && geometry1 == null) - { - //1-濂�,鍏佽鍔犲伐锛�2-涓嶅湪鍒楄〃涓紝3-涓嶅姞宸ヨ溅杞被鍨嬶紝4-鎵嬪姩鍏ュ簱妯″紡浜哄伐鏈�夋嫨搴撳尯 - client.WriteByOrder("W_i_status", (byte)2, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - //WriteDBLog.Error(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌妫�娴嬬嚎杞﹁疆淇℃伅", "PCS"); - WriteLog.Write_Log(name, wp_id, "閿欒淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�2\nR_oi_on锛�0\n\n鏈煡璇㈠埌妫�娴嬬嚎杞﹁疆淇℃伅"); - #endregion - continue; - } - else - { - //1-濂�,鍏佽鍔犲伐锛�2-涓嶅湪鍒楄〃涓紝3-涓嶅姞宸ヨ溅杞被鍨嬶紝4-鎵嬪姩鍏ュ簱妯″紡浜哄伐鏈�夋嫨搴撳尯 - client.WriteByOrder("W_i_status", (byte)1, name); - client.WriteByOrder("W_i_job_id", Mes_Work.jobID, name); - client.WriteByOrder("W_i_drawing_id", Mes_Work.drawingNo, name); - client.WriteByOrder("W_i_heat_id", Mes_Work.heatID, name); - //client.WriteByOrder("W_i_sourceheat", "", name); - client.WriteByOrder("W_i_batch_id", Mes_Work.heatBatchID, name); - client.WriteByOrder("R_oi_on", (byte)0, name); - #region 鏃ュ織璁板綍 - WriteLog.Write_Log(name, wp_id, "鍐欏叆淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\nW_i_job_id锛歿Mes_Work.jobID}" + - $"\nW_i_drawing_id锛歿mes_Head.drawingNo}\nW_i_heat_id锛歿Mes_Work.heatID}\nW_i_batch_id锛歿Mes_Work.heatBatchID}\nR_oi_on锛�0"); - //WriteDBLog.Success(name, $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + $"\nW_i_job_id锛歿Mes_Work.jobID}" + - // $"\nW_i_drawing_id锛歿mes_Head.drawingNo}\nW_i_heat_id锛歿Mes_Work.heatID}\nW_i_batch_id锛歿Mes_Work.heatBatchID}\nR_oi_on锛�0", "PCS"); - #endregion - } + //1-濂�,鍏佽鍔犲伐锛�2-涓嶅湪鍒楄〃涓紝3-涓嶅姞宸ヨ溅杞被鍨嬶紝4-鎵嬪姩鍏ュ簱妯″紡浜哄伐鏈�夋嫨搴撳尯 + client.WriteByOrder("W_i_status", (byte)1, name); + client.WriteByOrder("W_i_job_id", Mes_Work.jobID, name); + client.WriteByOrder("W_i_drawing_id", Mes_Work.drawingNo, name); + client.WriteByOrder("W_i_heat_id", Mes_Work.heatID, name); + //client.WriteByOrder("W_i_sourceheat", "", name); + client.WriteByOrder("W_i_batch_id", Mes_Work.heatBatchID, name); + + //灞忚斀宸ヨ壓(灞忚斀瑙嗚妫�娴�/灞忚斀娑傛补) + //if (name != "杈婇亾涓婃枡鏌ヨ杞﹁疆") + //{ + client.WriteByOrder("W_i_skip_op_SJ1", name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_1, name);//灞忚斀瑙嗚妫�娴嬭澶�1 + client.WriteByOrder("W_i_skip_op_SJ2", name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_2, name);//灞忚斀瑙嗚妫�娴嬭澶�2 + client.WriteByOrder("W_i_skip_op_LT", mes_Head.skip_op_3, name);//灞忚斀閾炬潯鏈� + //} + client.WriteByOrder("R_oi_on", (byte)0, name); + #region 鏃ュ織璁板綍 + WriteLog.Write_Log(name, wp_id, "鍐欏叆淇℃伅锛�", $"璇诲彇妗佹灦淇℃伅锛歕n杞﹁疆SN锛歿wp_id}\n杞瀷ID锛歿wp_type}\n\n鍐欏叆妗佹灦淇℃伅锛歕nW_i_status锛�1" + + $"\nW_i_job_id锛歿Mes_Work.jobID}\nW_i_drawing_id锛歿Mes_Work.drawingNo}\nW_i_heat_id锛歿Mes_Work.heatID}\nW_i_batch_id锛歿Mes_Work.heatBatchID}" + + $"\nW_i_skip_op_SJ1锛歿(name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_1)}\nW_i_skip_op_SJ2锛歿(name == "3鍗曞厓杈婇亾涓嬫枡鏌ヨ璁㈠崟" ? true : mes_Head.skip_op_2)}" + + $"\nW_i_skip_op_LT锛歿mes_Head.skip_op_3}\nR_oi_on锛�0"); + #endregion } } } @@ -408,7 +245,6 @@ Idt_plcinfodetailRepository plcRepository = new dt_plcinfodetailRepository(Context); Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(Context); Idt_geometry_dataRepository dataRepository = new dt_geometry_dataRepository(Context); - Idt_geometry_data_detectionlineRepository detectionlineRepository = new dt_geometry_data_detectionlineRepository(Context); Idt_mes_detailRepository mes_DetailRepository = new dt_mes_detailRepository(Context); Idt_mes_headRepository mes_HeadRepository = new dt_mes_headRepository(Context); IVV_Mes_WorkinfoRepository workinfoRepository = new VV_Mes_WorkinfoRepository(Context); @@ -470,7 +306,7 @@ #endregion continue; } - + var geometry = Pipeline.QueryMateriel(Mes_Work.drawingNo); #endregion var AreaNr = (Int16)DBExtension.Read(details.Where(x => x.plcdetail_name == "W_AreaNr").First(), client); @@ -496,8 +332,8 @@ var station = stationinfoRepository.Find(x => x.area == areaCode && x.stationCode.Substring(x.stationCode.Length - 1, 1) == AreaNr.ToString()).FirstOrDefault(); if (station != null) { - if (station.quantity >= Mes_Work.stackNoRange) - //if (station.quantity >= 5) + if (station.quantity >= geometry.stackNoRange) + //if (station.quantity >= 5) { Pipeline_client.WriteByOrder("W_AlarmSignal", (Int16)2, name);//鎶ヨ WriteLog.Write_Log(name + "鏀炬枡瀹屾垚鍑洪敊", Wheel_SN, "杞﹁疆鏁伴噺宸叉弧锛�", $"鍖哄煙鍙凤細{AreaNr}锛沑n杞﹁疆鏁帮細{station.quantity}\n閿欒淇℃伅锛氬尯鍩熷彿杞﹁疆鏁伴噺宸叉弧锛�"); @@ -602,8 +438,8 @@ #endregion var wheel = Pipeline.QueryMateriel(Work.drawingNo); - var wheel1 = Pipeline.QueryMateriel1(Work.drawingNo); - if (wheel == null && wheel1 == null) + //var wheel1 = Pipeline.QueryMateriel1(Work.drawingNo); + if (wheel == null /*&& wheel1 == null*/) { #region 鏃ュ織璁板綍 client.WriteByOrder("W_Enabl_Load", false, name);//淇″彿涓篺alse妗佹灦鍋滄杩涘叆 @@ -627,7 +463,7 @@ #region 鎵樼洏绫诲瀷涓嶄竴鑷撮渶鏇存崲鎵樼洏 foreach (var Stationinfo in Stations) { - if (Stationinfo.tray_type != "LargeTray" && (wheel == null ? wheel1.e : wheel.e) > 1100) + if (Stationinfo.tray_type != "LargeTray" && /*(wheel == null ? wheel1.e :)*/ wheel.e > 1100) { client.WriteByOrder("W_Enabl_Load", false, name);//淇″彿涓篺alse妗佹灦鍋滄杩涘叆 Stationinfo.location_state = LocationStateEnum.Trayswitching.ToString(); @@ -658,7 +494,7 @@ .Where(x => x.enable && x.stationCode != NGStation && x.location_state == LocationStateEnum.Stroge.ToString() - && x.quantity < Work.stackNoRange + && x.quantity < wheel.stackNoRange //&& x.quantity < 5 && x.stationType == Work.drawingNo && x.Number == Work.workOrder @@ -672,7 +508,7 @@ .Where(x => x.enable && x.stationCode != NGStation && x.location_state == LocationStateEnum.Stroge.ToString() - && x.quantity < Work.stackNoRange + && x.quantity < wheel.stackNoRange //&& x.quantity < 5 && x.stationType == Work.drawingNo && x.Number == Work.workOrder) @@ -703,7 +539,7 @@ #region 鎵樼洏杞﹁疆鍫嗗灈绗洓涓椂涓嬪彂鍙﹀涓�涓倝鍙风殑鍏ュ簱浠诲姟 //if (Stationinfo.quantity + 1 >= 4) - if (Stationinfo.quantity + 1 >= Work.stackNoRange - 1) + if (Stationinfo.quantity + 1 >= wheel.stackNoRange - 1) { var stationinfo = Stations.Where(x => x.enable && x.stationCode != NGStation && x.stationCode != Stationinfo.stationCode && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).FirstOrDefault(); if (stationinfo != null) @@ -802,7 +638,7 @@ dt_stationinfo Stationinfo = Stations.Where(x => x.enable && x.stationCode == NGStation && x.location_state == LocationStateEnum.Stroge.ToString() - && x.quantity < Work.stackNoRange + && x.quantity < wheel.stackNoRange //&& x.quantity < 5 && x.stationType == Work.drawingNo).FirstOrDefault(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" index bff502d..948272b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/Pipeline.cs" @@ -164,10 +164,10 @@ { Station.location_state = LocationStateEnum.Abnormal.ToString(); Station.remark = "杞﹁疆鏁伴噺涓嶴N鍙锋暟閲忎笉涓�鑷�"; - stationinfoRepository.Update(Station, true); + stationinfoRepository.Update(Station, x => new { x.location_state, x.remark }, true); Gantry_client.WriteByOrder("W_RequestUnload", false, number);//淇″彿涓篺alse妗佹灦鍋滄杩涘叆 #region 鏃ュ織璁板綍 - WriteDBLog.Error("涓婃枡鍖�", $"鍐欏叆妗佹灦淇℃伅锛歕nW_RequestUnload锛歠alse\n\n{Station.stationCode}杞﹁疆鏁伴噺涓嶴N鍙锋暟閲忎笉涓�鑷�", "PCS"); + //WriteDBLog.Error("涓婃枡鍖�", $"鍐欏叆妗佹灦淇℃伅锛歕nW_RequestUnload锛歠alse\n\n{Station.stationCode}杞﹁疆鏁伴噺涓嶴N鍙锋暟閲忎笉涓�鑷�", "PCS"); #endregion return; } @@ -178,7 +178,15 @@ if (PalletSignal == 1 && MaterialSignal == 1) { - Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId), number);//杞﹁疆绫诲瀷 + var geometry = QueryMateriel(Station.stationType); + if (geometry == null) + { + Station.remark = "鏈壘鍒拌溅杞俊鎭�"; + stationinfoRepository.Update(Station, x => new { x.remark }, true); + Gantry_client.WriteByOrder("W_RequestUnload", false, number);//淇″彿涓篺alse妗佹灦鍋滄杩涘叆 + return; + } + Gantry_client.WriteByOrder("W_Wheel_Type", (Int16)Convert.ToInt16(geometry.TypeId), number);//杞﹁疆绫诲瀷 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);//鎵樼洏涓婄殑绗嚑涓溅杞� @@ -187,7 +195,7 @@ Gantry_client.WriteByOrder("W_RequestUnload", true, number); #region 鏃ュ織璁板綍 WriteDBLog.Success("涓婃枡鍖虹敵璇�", $"璇诲彇鎵樼洏鍏夌數淇″彿锛歿PalletSignal}\n璇诲彇绗竴涓溅杞厜鐢典俊鍙凤細{MaterialSignal}\n\n" + - $"鍐欏叆妗佹灦淇℃伅锛歕n鍖哄煙璐т綅鍙凤細{area}\n鎵樼洏涓婄殑绗嚑涓溅杞細{SNS.Length}\n鎵樼洏绫诲瀷锛歿1}\n杞﹁疆绫诲瀷锛歿(QueryMateriel(Station.stationType) == null ? QueryMateriel1(Station.stationType).TypeId : QueryMateriel(Station.stationType).TypeId)}" + + $"鍐欏叆妗佹灦淇℃伅锛歕n鍖哄煙璐т綅鍙凤細{area}\n鎵樼洏涓婄殑绗嚑涓溅杞細{SNS.Length}\n鎵樼洏绫诲瀷锛歿1}\n杞﹁疆绫诲瀷锛歿geometry.TypeId}" + $"\n杞﹁疆SN鍙凤細{SNS[SNS.Length - 1]}\nW_RequestUnload锛歵rue", "PCS"); #endregion } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs" index 87e801e..21d0f97 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/Task/AutoTaskJob.cs" @@ -32,7 +32,6 @@ { StationTask.CreateTask();//鍏ュ簱 OutboundTask.CreateOutboundTask();//鍑哄簱 - //ReplaceTray.ReplaceTrayTask();//鏇存崲鎵樼洏 RestockHCJ.HCJGetBarcode();//鏇存柊闃熷垪 EmptyTrayTask.CreateEmptyTrayTask();//鍒涘缓琛ョ┖鎵� AutoUpdateWork.FinishMesWork();//澶勭悊宸ュ崟 diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs" index 14a2b4f..2397103 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/JobsPart/Common/StationTask.cs" @@ -59,7 +59,15 @@ { item.remark = "瑙﹀彂鍏ュ簱浠诲姟,浣嗘湭鎵惧埌宸ュ崟淇℃伅锛�"; item.location_state = LocationStateEnum.Abnormal.ToString(); - stationinfoRepository.Update(item, true); + stationinfoRepository.Update(item, x => new { x.remark, x.location_state }, true); + continue; + } + var geometry = Pipeline.QueryMateriel(work.drawingNo); + if (geometry == null) + { + item.remark = "鏈壘鍒拌溅杞俊鎭紒"; + item.location_state = LocationStateEnum.Abnormal.ToString(); + stationinfoRepository.Update(item, x => new { x.remark, x.location_state }, true); continue; } @@ -67,7 +75,7 @@ string tasktype = ""; //if (item.quantity == 5) - if (item.quantity == work.stackNoRange) + if (item.quantity == geometry.stackNoRange) { if (!string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) tasktype = "TaskType_OutsourceInbound"; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs" index b71b7aa..81c8f3a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/ToMES/ToMesServer.cs" @@ -116,8 +116,8 @@ #region 鏌ヨ褰撳墠宸ュ崟鐨勫浘鍙蜂俊鎭槸鍚﹀瓨鍦� var dt_Geometry_Data = Pipeline.QueryMateriel(workInfo.drawingNo); - var dt_Geometry_Data1 = Pipeline.QueryMateriel1(workInfo.drawingNo); - if (dt_Geometry_Data == null && dt_Geometry_Data1 == null) + //var dt_Geometry_Data1 = Pipeline.QueryMateriel1(workInfo.drawingNo); + if (dt_Geometry_Data == null /*&& dt_Geometry_Data1 == null*/) { throw new Exception($"鏈壘鍒板浘鍙凤細{workInfo.drawingNo}鐨勮溅杞俊鎭紒宸ュ崟缂栧彿锛歿workInfo.jobID}"); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue" index e3783b9..9cba5df 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/views/widesea_wms/baseinfo/dt_geometry_data.vue" @@ -22,16 +22,15 @@ export default defineComponent({ setup() { const table = ref({ - key: 'TypeId', + key: 'ID', footer: "Foots", cnName: '杞﹁疆淇℃伅', name: 'baseinfo/dt_geometry_data', url: "/dt_geometry_data/", sortName: "TypeId" }); - const editFormFields = ref({"TypeId":"","Description":"","a":"","b":"","c":"","d":"","e":"","f":"","g":"","h":""}); - const editFormOptions = ref([ - [{"title":"TypeId","required":true,"field":"TypeId","type":"text"}, + const editFormFields = ref({"TypeId":"","Description":"","a":"","b":"","c":"","d":"","e":"","f":"","g":"","h":"","stackNoRange":"","weight":""}); + const editFormOptions = ref([[{"title":"TypeId","required":true,"field":"TypeId","type":"text"}, {"title":"鍥惧彿","required":true,"field":"Description","type":"text"}], [{"title":"a","required":true,"field":"a","type":"text"}, {"title":"b","required":true,"field":"b","type":"text"}], @@ -40,11 +39,13 @@ [{"title":"e","required":true,"field":"e","type":"text"}, {"title":"f","required":true,"field":"f","type":"text"}], [{"title":"g","required":true,"field":"g","type":"text"}, - {"title":"h","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,readonly:true,require:true,align:'left'}, - {field:'Description',title:'鍥惧彿',type:'string',width:120,require:true,align:'left',sort:true}, + {"title":"h","required":true,"field":"h","type":"text"}], + [{"title":"鎵撳寘鏁伴噺","required":true,"field":"stackNoRange","type":"text"}, + {"title":"閲嶉噺","required":true,"field":"weight","type":"float"}]]); + const searchFormFields = ref({"TypeId":"","Description":""}); + const searchFormOptions = ref([[{"title":"鍥惧彿","field":"Description","type":"like"},{"title":"TypeId","field":"TypeId","type":"int"}]]); + const columns = ref([{field:'TypeId',title:'TypeId',type:'int',width:110,require:true,align:'left',sort:true}, + {field:'Description',title:'鍥惧彿',type:'string',width:120,require:true,align:'left'}, {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'}, @@ -52,7 +53,10 @@ {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'}]); + {field:'h',title:'h',type:'float',width:110,require:true,align:'left'}, + {field:'stackNoRange',title:'鎵撳寘鏁伴噺',type:'int',width:110,require:true,align:'left',sort:true}, + {field:'weight',title:'閲嶉噺',type:'float',width:110,require:true,align:'left'}, + {field:'ID',title:'ID',type:'int',sort:true,width:80,hidden:true,readonly:true,require:true,align:'left'}]); const detail = ref({ cnName: "#detailCnName", table: "#detailTable", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" index 96e0d5f..b2bd01f 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_Entity/DomainModels/BaseInfo/dt_geometry_data.cs" @@ -19,7 +19,6 @@ /// <summary> /// /// </summary> - [Key] [Display(Name ="TypeId")] [Column(TypeName="int")] [Editable(true)] @@ -37,7 +36,7 @@ public string Description { get; set; } /// <summary> - /// + ///a /// </summary> [Display(Name ="a")] [Column(TypeName="float")] @@ -46,7 +45,7 @@ public float a { get; set; } /// <summary> - /// + ///b /// </summary> [Display(Name ="b")] [Column(TypeName="float")] @@ -55,7 +54,7 @@ public float b { get; set; } /// <summary> - /// + ///c /// </summary> [Display(Name ="c")] [Column(TypeName="float")] @@ -64,7 +63,7 @@ public float c { get; set; } /// <summary> - /// + ///d /// </summary> [Display(Name ="d")] [Column(TypeName="float")] @@ -73,7 +72,7 @@ public float d { get; set; } /// <summary> - /// + ///e /// </summary> [Display(Name ="e")] [Column(TypeName="float")] @@ -82,7 +81,7 @@ public float e { get; set; } /// <summary> - /// + ///f /// </summary> [Display(Name ="f")] [Column(TypeName="float")] @@ -91,7 +90,7 @@ public float f { get; set; } /// <summary> - /// + ///g /// </summary> [Display(Name ="g")] [Column(TypeName="float")] @@ -100,7 +99,7 @@ public float g { get; set; } /// <summary> - /// + ///h /// </summary> [Display(Name ="h")] [Column(TypeName="float")] @@ -108,6 +107,31 @@ [Required(AllowEmptyStrings=false)] public float h { get; set; } - + /// <summary> + /// + /// </summary> + [Key] + [Display(Name ="ID")] + [Column(TypeName="int")] + [Required(AllowEmptyStrings=false)] + public int ID { get; set; } + + /// <summary> + /// 鎵撳寘鏁伴噺 + /// </summary> + [Display(Name = "stackNoRange")] + [Column(TypeName = "int")] + //[Editable(true)] + //[Required(AllowEmptyStrings = false)] + public int stackNoRange { get; set; } + + /// <summary> + ///閲嶉噺 + /// </summary> + [Display(Name = "weight")] + [Column(TypeName = "float")] + //[Editable(true)] + //[Required(AllowEmptyStrings = false)] + public float? weight { get; set; } } } \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs" index 04ce2fd..861e852 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/EmptyPalletTask.cs" @@ -94,6 +94,7 @@ agv_task.agv_toaddress = EmptyStation.stationCode; agvtaskRepository.Update(agv_task, true); EmptyStation.location_state = LocationStateEnum.Busy.ToString(); + EmptyStation.tray_status = TrayStateEnum.EmptyTray.ToString(); stationinfoRepository.Update(EmptyStation, true); WriteDBLog.Success("鏇存柊鑷姩鍙栫┖鎵橀槦鍒椾换鍔�", $"浠诲姟缂栧彿锛歿agv_task.agv_tasknum}", "WMS"); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs" index 7ede5a5..41423b5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/HandleTask.cs" @@ -206,7 +206,9 @@ station1.quantity = station1.quantity - task.agv_qty; station1.location_state = LocationStateEnum.Stroge.ToString(); } - else if (station1.area == "10" || station1.area == "11" || (station1.stationCode.Contains("C") && task.agv_tasktype == "TaskType_EmptyPallet")) //鍑哄簱绌烘墭浠诲姟 + else if (station1.area == "10" || station1.area == "11" + || ((station1.stationCode.Contains("C") || station1.stationCode.Contains("B")) + && task.agv_tasktype == AGVTaskTypeEnum.TaskType_EmptyPallet.ToString())) //鍑哄簱绌烘墭浠诲姟 { station1.location_state = LocationStateEnum.Stroge.ToString(); station1.quantity = station1.quantity - 1; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs" index 68ad08c..5fb2730 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/AGVTask/SendToaddress.cs" @@ -89,6 +89,7 @@ agv_task.agv_toaddress = EmptyStation.stationCode; agvtaskRepository.Update(agv_task, true); EmptyStation.location_state = LocationStateEnum.Busy.ToString(); + EmptyStation.tray_status = TrayStateEnum.EmptyTray.ToString(); stationinfoRepository.Update(EmptyStation, true); } else diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs" index 9d160c8..5d676fa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/Common/GetStation/EmptyTrayIn.cs" @@ -103,6 +103,7 @@ EmptyStation.location_state = LocationStateEnum.Busy.ToString(); stationinfoRepository.Update(EmptyStation, true); toEmptyStation.location_state = LocationStateEnum.Busy.ToString(); + toEmptyStation.tray_status = TrayStateEnum.EmptyTray.ToString(); stationinfoRepository.Update(toEmptyStation, true); WriteDBLog.Success("鍒涘缓鍙犵洏浣嶇┖鎵樺叆搴撲换鍔�", $"浠诲姟缂栧彿锛歿agvtask.agv_tasknum}", "PCS"); } -- Gitblit v1.9.3