using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Collections; using CoreFS.CA06; using Core.Mes.Client.Comm.Server; namespace Core.StlMes.Client.Plan.Order { class FrmDefGroup : FrmBase { /// /// 外径 /// private double outdiameter; /// /// 外径 /// public double Outdiameter { get { return outdiameter; } set { outdiameter = value; } } /// /// 壁厚 /// private double wallthick; /// /// 壁厚 /// public double Wallthick { get { return wallthick; } set { wallthick = value; } } /// /// 长度上限 /// private double lengthmax; /// /// 长度上限 /// public double Lengthmax { get { return lengthmax; } set { lengthmax = value; } } /// /// 扣型代码 /// private string modelCode; /// /// 扣型代码 /// public string ModelCode { get { return modelCode; } set { modelCode = value; } } /// /// 二级工序代码 /// private string processC; /// /// 二级工序代码 /// public string ProcessC { get { return processC; } set { processC = value; } } /// /// 默认热处理组 /// private string groupRcl; /// /// 默认热处理组 /// public string GroupRcl { get { return groupRcl; } set { groupRcl = value; } } /// /// 默认加工组 /// private string groupJgx; /// /// 默认加工组 /// public string GroupJgx { get { return groupJgx; } set { groupJgx = value; } } public FrmDefGroup(OpeBase openBase) { this.ob = openBase; outdiameter = 0; wallthick = 0; lengthmax = 0; modelCode = ""; processC = ""; groupRcl = ""; groupJgx = ""; } /// /// 计算热处理默认分组 /// public void defgourpRcl() { string processStyle = ""; string modelStyle = ""; //二级工序分类 DataTable dt1 = ServerHelper.GetData("com.steering.pss.plan.order.baseMethod.CoreDefGourp.queryProcessStyle", new object[] { processC }, this.ob); if (dt1 != null && dt1.Rows.Count > 0) { processStyle = dt1.Rows[0]["PROCESS_STYLE"].ToString(); } //扣型分类 DataTable dt2 = ServerHelper.GetData("com.steering.pss.plan.order.baseMethod.CoreDefGourp.queryModelStyle", new object[] { modelCode }, this.ob); if (dt2 != null && dt2.Rows.Count > 0) { modelStyle = dt2.Rows[0]["MODEL_STYLE"].ToString(); } if (lengthmax < 12) { //非调质或仅探伤 if (processStyle.Equals("407202") || processStyle.Equals("407203")) { if (modelStyle.Equals("405106")) //热轧 { if (outdiameter < 325 && wallthick < 30) { //轧管二部 groupRcl = "200502"; } } if (modelStyle.Equals("405101")) //不车丝、倒棱 { if (outdiameter < 144) { //轧管二部 groupRcl = "200502"; } } } } if (groupRcl.Equals("")) { //管加工部 groupRcl = "200501"; } } /// /// 计算加工默认分组 /// public void defgourpJgc() { string modelStyle = ""; //扣型分类 DataTable dt = ServerHelper.GetData("com.steering.pss.plan.order.baseMethod.CoreDefGourp.queryModelStyle", new object[] { modelCode }, this.ob); if (dt != null && dt.Rows.Count > 0) { modelStyle = dt.Rows[0]["MODEL_STYLE"].ToString(); } if (outdiameter <= 114) { if (modelStyle.Equals("405101")) { //轧管二部 groupJgx = "200402"; } if (outdiameter >= 33 && outdiameter <= 114) { //热轧 if (modelStyle.Equals("405106")) { //轧管二部 groupJgx = "200402"; } } } else if (outdiameter >= 140 && outdiameter <= 273) { //热轧 if (modelStyle.Equals("405106")) { //轧管二部 groupJgx = "200402"; } } if (groupJgx.Equals("")) { //管加工部 groupJgx = "200401"; } } } }