分支自 SuZhouGuanHong/TaiYuanTaiZhong

huanghongfeng
2024-07-04 08dd2afd7a9614dad029e94918516b068d413cac
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs
@@ -105,19 +105,20 @@
            VOLContext context = new VOLContext();
            Idt_plcinfodetailRepository repository = new dt_plcinfodetailRepository(context);
            List<dt_plcinfodetail> plcinfodetail = new List<dt_plcinfodetail>();
            string name = "VK5";
            for (int i = 1; i <= 2; i++)
            string name = "Pipeline";
            for (int i = 1; i <= 3; i++)
            {
                dt_plcinfodetail dt_Plcinfodetail1 = new dt_plcinfodetail()
                {
                    plcdetail_id = Guid.NewGuid(),
                    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_db = "DB29",
                    plcdetail_value = (21 + (i - 1) * 80).ToString(),
                    plcdetail_valtype = "string",
                    plcdetail_len = 20,
                    plcdetail_name = "R_Wheel_SN",
                    plcdetail_opratortype = "oiler",
                    plcdetail_remark = "Wheel_SN",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail1);
@@ -125,13 +126,12 @@
                {
                    plcdetail_id = Guid.NewGuid(),
                    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_db = "DB29",
                    plcdetail_value = (22 + (i - 1) * 80).ToString(),
                    plcdetail_valtype = "int16",
                    plcdetail_name = "R_Wheel_Type",
                    plcdetail_opratortype = "oiler",
                    plcdetail_remark = "Wheel_Type",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail2);
@@ -139,13 +139,12 @@
                {
                    plcdetail_id = Guid.NewGuid(),
                    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_db = "DB29",
                    plcdetail_value = (24 + (i - 1) * 80).ToString(),
                    plcdetail_valtype = "byte",
                    plcdetail_name = "R_Part_Status",
                    plcdetail_opratortype = "oiler",
                    plcdetail_remark = "Part_Status",
                    plcdetail_number = i + "单元",
                };
                plcinfodetail.Add(dt_Plcinfodetail3);
@@ -153,85 +152,15 @@
                {
                    plcdetail_id = Guid.NewGuid(),
                    plcdetail_iotype = name,
                    plcdetail_db = "DB603",
                    plcdetail_value = (22 + (i - 1) * 144).ToString(),
                    plcdetail_db = "DB29",
                    plcdetail_value = (25 + (i - 1) * 80).ToString(),
                    plcdetail_valtype = "byte",
                    plcdetail_name = "i_status",
                    plcdetail_opratortype = "labeller",
                    plcdetail_remark = "状态",
                    plcdetail_name = "R_Part_Process",
                    plcdetail_opratortype = "oiler",
                    plcdetail_remark = "Part_Process",
                    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);
        }