分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-06-28 1e38f44af86775a341e4d0e4411d24ad35e417d3
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs
@@ -105,61 +105,133 @@
            VOLContext context = new VOLContext();
            Idt_plcinfodetailRepository repository = new dt_plcinfodetailRepository(context);
            List<dt_plcinfodetail> plcinfodetail = new List<dt_plcinfodetail>();
            for (int i = 1; i <= 1; i++)
            string name = "VK5";
            for (int i = 1; i <= 2; i++)
            {
                dt_plcinfodetail dt_Plcinfodetail1 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "VK5",
                    plcdetail_db = "DB630",
                    plcdetail_value = ((i - 1 + 28 + 10 + 10) * 24).ToString(),
                    plcdetail_valtype = "string",
                    plcdetail_len = 20,
                    plcdetail_name = "R_wheel_SN",
                    plcdetail_opratortype = "wheel",
                    plcdetail_remark = "读取车轮SN号",
                    plcdetail_number = "机械手3",
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (0 + (i - 1) * 144).ToString(),
                    plcdetail_valtype = "byte",
                    plcdetail_name = "oi_on",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "申请",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail1);
                dt_plcinfodetail dt_Plcinfodetail2 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "VK5",
                    plcdetail_db = "DB630",
                    plcdetail_value = (20 + (i - 1 + 28 + 10 + 10) * 24).ToString(),
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_wheel_type",
                    plcdetail_opratortype = "wheel",
                    plcdetail_remark = "读取车轮类型",
                    plcdetail_number = "机械手3",
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (2 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "o_wp_id",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "车轮SN号",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail2);
                dt_plcinfodetail dt_Plcinfodetail3 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "VK5",
                    plcdetail_db = "DB630",
                    plcdetail_value = (22 + (i - 1 + 28 + 10 + 10) * 24).ToString(),
                    plcdetail_valtype = "byte",
                    plcdetail_name = "R_part_status",
                    plcdetail_opratortype = "wheel",
                    plcdetail_remark = "读取车轮状态",
                    plcdetail_number = "机械手3",
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (24 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "i_job_id",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "工单编号",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail3);
                dt_plcinfodetail dt_Plcinfodetail4 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = "VK5",
                    plcdetail_db = "DB630",
                    plcdetail_value = (23 + (i - 1 + 28 + 10 + 10) * 24).ToString(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (22 + (i - 1) * 144).ToString(),
                    plcdetail_valtype = "byte",
                    plcdetail_name = "R_part_process",
                    plcdetail_opratortype = "wheel",
                    plcdetail_remark = "读取车轮工艺",
                    plcdetail_number = "机械手3",
                    plcdetail_name = "i_status",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "状态",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail4);
                dt_plcinfodetail dt_Plcinfodetail5 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (44 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "i_heat_id",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "炉代号",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail5);
                dt_plcinfodetail dt_Plcinfodetail6 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (64 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "i_billet_id",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "钢坯号",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail6);
                dt_plcinfodetail dt_Plcinfodetail7 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (84 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "i_batch_id",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "热处理批次",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail7);
                dt_plcinfodetail dt_Plcinfodetail8 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (104 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "i_drawing_id",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "图号",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail8);
                dt_plcinfodetail dt_Plcinfodetail9 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (124 + (i - 1) * 144).ToString(),
                    plcdetail_len = 20,
                    plcdetail_valtype = "string",
                    plcdetail_name = "i_wheel_type",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "i_wheel_type",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail9);
            }
            repository.AddRange(plcinfodetail, true);
        }