| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Judge.Commons;
- using Core.StlMes.Client.Judge.Controls;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Judge.Forms
- {
- public partial class RolledTubeColligateJudgeFrm : FrmBase
- {
- private QcmZgColligateJudgeApplyCtrl _zgJudgeApplyCtrl;
- private QcmBcJudgeCtrl _bcJudgeCtrl;
- private QcmBcPassApplyCtrl _bcPassApply;
- private QcmBcPassFlowCtrl _bcPassFlowCtrl;
- private QcmZcAllChemPhyCtrl _zcAllChemPhyCtrl;
- private Dal _d;
- //单线程
- System.Windows.Forms.Timer timer = null;
- public RolledTubeColligateJudgeFrm()
- {
- InitializeComponent();
- IsLoadUserView = true;
- }
- private void labelDateTimePicker1_CheckBox_CheckedChanged(object sender, EventArgs e)
- {
- labelDateTimePicker2.DateTimePicker.Enabled = labelDateTimePicker1.Checked;
- }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- if (_zcAllChemPhyCtrl == null) return;
- _zcAllChemPhyCtrl.SetChemPhyResultError();
- ultraLabel3.Appearance.BackColor = labelComboBox2.BackColor;
- ultraLabel4.Appearance.BackColor = labelComboBox2.BackColor;
- ultraLabel5.Appearance.BackColor = labelComboBox2.BackColor;
- }
- private string processCode = "";
- private string passInfo = "";
- private DataTable _dtPline = null;
- private void SteelMakingColligateJudgeFrm_Load(object sender, EventArgs e)
- {
- processCode = CustomInfo.Substring(0, 1);
- passInfo = CustomInfo.Length > 2 ? CustomInfo.Substring(2) : "";
- _zgJudgeApplyCtrl = new QcmZgColligateJudgeApplyCtrl(splitContainer3.Panel1, ob, JudgeType.SteelMakingColligate, passInfo, processCode,UserInfo);
- _zgJudgeApplyCtrl.UltraGrid1.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
- _zgJudgeApplyCtrl.UltraGrid1.AfterRowActivate += gpJudgeApplyCtrl_AfterRowActivate;
- if (processCode != "F")
- {
- _zgJudgeApplyCtrl.UltraGrid1.DisplayLayout.Bands[0].Columns["lotNoGroup"].Hidden = true;
- }
- _zcAllChemPhyCtrl = new QcmZcAllChemPhyCtrl(ultraExpandableGroupBoxPanel2, ob, _zgJudgeApplyCtrl.UltraGrid1, processCode, "bcJudge");
- _bcJudgeCtrl = new QcmBcJudgeCtrl(ultraTabPageControl6, ob);
- _bcJudgeCtrl.EntityGrid1.StyleGrid.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;
- _bcJudgeCtrl.EntityGrid1.StyleGrid.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.False;
- _bcPassApply = new QcmBcPassApplyCtrl(splitContainer2.Panel1, ob, UserInfo.GetDeptid());
- _bcPassApply.UltraGrid1.AfterRowActivate += gpPassApply_AfterRowActivate;
- _bcPassFlowCtrl = new QcmBcPassFlowCtrl(splitContainer2.Panel2, ob);
- _d = new Dal(ob);
- dataTable1.Clear();
- dataTable1.Rows.Add("00", "编制中");
- dataTable1.Rows.Add("10", "已下发");
- dataTable1.Rows.Add("20", "生产中");
- dataTable1.Rows.Add("30", "已生产");
- dataTable1.Rows.Add("40", "关闭");
- string[] datePurviewIds = this.ValidDataPurviewIds;
- if (CustomInfo.Contains("WG"))
- {
- datePurviewIds = new string[] { "002001001001" };//计划科
- }
- _dtPline = _d.GetTableByXmlId("JudgeBaseInfo.Query", new object[] { new string[] { processCode } });
- DataTable dtDeptPline = _d.GetTableByXmlId("JdgComBasePline.getPlineByDept", new object[] { datePurviewIds });
- for (int i = _dtPline.Rows.Count - 1; i >= 0; i--)
- {
- if (dtDeptPline.Select("plinecode = '" + _dtPline.Rows[i]["plinecode"].ToString() + "'").Length == 0)
- {
- _dtPline.Rows[i].Delete();
- }
- }
- _dtPline.AcceptChanges();
- string strPlineNames = string.Join(",", _dtPline.Rows.Cast<DataRow>().Select(a => a["plineName"].ToString()).ToArray());
- string strPineCodes = string.Join(",", _dtPline.Rows.Cast<DataRow>().Select(a => a["plineCode"].ToString()).ToArray());
- ultraTextEditor1.Text = strPlineNames;
- ultraTextEditor1.Tag = strPineCodes;
- ultraTextEditor3.Text = strPlineNames;
- ultraTextEditor3.Tag = strPineCodes;
- ultraTextEditor4.Text = strPlineNames;
- ultraTextEditor4.Tag = strPineCodes;
- ClsBaseInfo.FillComBaseInfo(labelComboBox2.ComboBox, "407407", ob, false);
- //判定结果只显示内控合格和不合格。 40740101内控合格 40740102内控不合格
- DataTable dt = (DataTable)labelComboBox2.ComboBox.DataSource;
- DataRow dr = dt.NewRow();
- dr["BASECODE"] = "1";
- dr["BASENAME"] = "已判";
- dt.Rows.InsertAt(dr, 0);
- dr = dt.NewRow();
- dr["BASECODE"] = "0";
- dr["BASENAME"] = "未判";
- dt.Rows.InsertAt(dr, 0);
- dt.AcceptChanges();
- dt.DefaultView.RowFilter = "BASECODE IN ('0', '1', '40740701', '40740704', '40740709')";
- ClsBaseInfo.SetComboItemHeight(labelComboBox2.ComboBox);
- ClsBaseInfo.FillComBaseInfo(labelComboBox3.ComboBox, "407407", ob, false);
- ClsBaseInfo.SetComboItemHeight(labelComboBox3.ComboBox);
- //labelDateTimePicker1.Checked = true;
- labelDateTimePicker1.DateTimePicker.Value = DateTime.Now.Date.AddDays(-3);
- labelDateTimePicker2.DateTimePicker.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
- labelDateTimePicker4.Checked = true;
- labelDateTimePicker4.DateTimePicker.Value = DateTime.Now.Date.AddDays(-3);
- labelDateTimePicker3.DateTimePicker.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
- labelDateTimePicker6.Checked = true;
- labelDateTimePicker6.DateTimePicker.Value = DateTime.Now.Date.AddDays(-3);
- labelDateTimePicker5.DateTimePicker.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
- labelDateTimePicker8.DateTimePicker.Value = DateTime.Now.Date.AddDays(-3);
- labelDateTimePicker7.DateTimePicker.Value = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
- ultraComboEditor3.SelectedIndex = 0;
- ultraComboEditor4.SelectedIndex = 0;
- if (passInfo.Contains("Quality") || passInfo.Contains("Urgent"))
- {
- ultraTabControl2.Tabs[1].Visible = false;
- //_gpJudgeApplyCtrl.UltraGrid1.DisplayLayout.Bands[0].Columns["passType2"].Hidden = true;
- if (passInfo.Contains("Quality"))
- {
- labelComboBox2.ComboBox.Items[3].CheckState = CheckState.Checked;
- labelComboBox2.Checked = true;
- labelComboBox9.ComboBox.SelectedIndex = 1;
- labelComboBox9.Checked = true;
- labelComboBox1.Checked = true;
- labelComboBox1.ComboBox.SelectedIndex = 1;
- }
- if (passInfo.Contains("Urgent"))
- {
- labelComboBox2.ComboBox.Items[0].CheckState = CheckState.Checked;
- labelComboBox2.Checked = true;
- labelComboBox9.ComboBox.SelectedIndex = 0;
- labelComboBox9.Checked = true;
- panel1.Visible = false;
- panel6.Visible = true;
- }
- }
- else
- {
- labelComboBox2.Checked = true;
- labelComboBox2.ComboBox.Items[0].CheckState = CheckState.Checked;
- labelComboBox9.ComboBox.SelectedIndex = 0;
- labelComboBox9.Checked = true;
- if (!CustomInfo.Contains("WG"))
- {
- labelComboBox1.Checked = true;
- labelComboBox1.ComboBox.SelectedIndex = 1;
- }
- }
- if (this.CustomInfo.Equals("G_refreshStatus"))
- {
- startRefreshStatus();
- }
- }
- void gpPassApply_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- this.Cursor = Cursors.WaitCursor;
- var row = _bcPassApply.UltraGrid1.ActiveRow;
- //_zgJudgeApplyDtlCtrl2.Query(row.GetValue("jugdeApplyCode"), row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- _bcPassFlowCtrl.Query(row.GetValue("passApplyNo"));
- }
- finally
- {
- this.Cursor = Cursors.Default;
- }
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- base.ToolBar_Click(sender, ToolbarKey);
- switch (ToolbarKey)
- {
- case "Query":
- Query();
- break;
- case "Judge":
- Judge("1");
- break;
- case "GapJudge":
- Judge("0");
- break;
- case "refreshStatus":
- refreshStatus("1");
- break;
- case "PassApply":
- PassApply();
- break;
- case "DeletePassApply":
- DeletePassApply();
- break;
- case "DeleteJudge":
- DeleteJudge();
- break;
- case "ReviewGpCertificate":
- ReviewGpCertificate();
- break;
- case "UpdateMemo":
- UpdateMemo();
- break;
- case "ApplyRepeatSpline":
- ApplyRepeatSpline();
- break;
- case "DeleteRepeatSpline":
- DeleteRepeatSpline();
- break;
- case "FoldQuery":
- FoldQuery();
- break;
- case "RefreshGroup":
- RefreshGroup();
- break;
- case "RefreshCraft":
- RefreshCraft();
- break;
- case "CopyZgData":
- CopyZgData();
- break;
- case "CopyRclData":
- CopyRclData();
- break;
- case "Export":
- if (ultraTabControl2.ActiveTab.Key == "Judge")
- {
- GridHelper.ulGridToExcel(_zgJudgeApplyCtrl.UltraGrid1, "工序判定信息");
- }
- else if (ultraTabControl2.ActiveTab.Key == "JudgeRecord")
- {
- GridHelper.ulGridToExcel(_bcJudgeCtrl.EntityGrid1, "工序判定记录");
- }
- else if (ultraTabControl2.ActiveTab.Key == "PassRecord")
- {
- GridHelper.ulGridToExcel(_bcPassApply.UltraGrid1, "放行记录");
- }
- break;
- case "RefreshZbs":
- RefreshZbs();
- break;
- case "ZbsLock":
- UpdateZbsLock();
- break;
- case "startRefreshStatus":
- startRefreshStatus();
- break;
- case "endRefreshStatus":
- timer.Stop();
- MessageUtil.ShowTips("关闭执行刷新条件!");
- break;
- case "BatchDownload":
- BatchDownload();
- break;
- }
- }
- private void BatchDownload()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择需要导出的记录!");
- return;
- }
- WaitingForm2 wf = new WaitingForm2("文件检索中....");
- List<string> judgeStoveNos = new List<string>();
- List<string> pathList = new List<string>();
- string key = _zcAllChemPhyCtrl.ultraTabControl1.ActiveTab.Key;
- string key1 = "";
- switch (key)
- {
- case "A":
- key1 = _zcAllChemPhyCtrl.ZgChemPhyLgCtrl.ultraTabControl2.ActiveTab.Key;
- break;
- case "D":
- key1 = _zcAllChemPhyCtrl.ZgChemPhyZgCtrl.ultraTabControl2.ActiveTab.Key;
- break;
- case "E":
- key1 = _zcAllChemPhyCtrl.ZgChemPhyDbkCtrl.ultraTabControl2.ActiveTab.Key;
- break;
- case "F":
- key1 = _zcAllChemPhyCtrl.ZgChemPhyRclCtrl.ultraTabControl2.ActiveTab.Key;
- break;
- case "G":
- key1 = _zcAllChemPhyCtrl.ZgChemPhyJgxCtrl.ultraTabControl2.ActiveTab.Key;
- break;
- case "H":
- key1 = _zcAllChemPhyCtrl.ZgChemPhyJgCtrl.ultraTabControl2.ActiveTab.Key;
- break;
- }
- foreach (var row in chkRows)
- {
- DataTable dt = null;
- switch (key1)
- {
- case "water":
- if (key == "G")
- {
- dt = _d.GetTableByXmlId("JdgMchWatergageResult.getInfo", row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- }
- else
- {
- dt = _d.GetTableByXmlId("JdgMchWatergageResult.getZgInfo", row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), key);
- }
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- pathList.Add(row.GetValue("judgeStoveNo") + "_" + row.GetValue("batchNo") + ";" + dt.Rows[i]["REPORTPATH"].ToString2());
- }
- break;
- case "finalCheck":
- dt = _d.GetTableByXmlId("JdgMchFinalChekResult.getInfo", row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), key);
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- pathList.Add(row.GetValue("judgeStoveNo") + "_" + row.GetValue("batchNo") + ";" + dt.Rows[i]["REPORTPATH"].ToString2());
- }
- break;
- case "jgDetect":
- dt = _d.GetTableByXmlId("JdgCouplingInSpectionResult.Query", row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), row.GetValue("proOrderId"));
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- pathList.Add(row.GetValue("judgeStoveNo") + "_" + row.GetValue("batchNo") + ";" + dt.Rows[i]["REPORTPATH"].ToString2());
- }
- break;
- case "detec":
- CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllZcColligateJudge.getDetectInfo",
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), key, "");
- if (ccp.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo.ToString2());
- return;
- }
- dt = JsonHelper.toTable(ccp.ReturnObject.ToString2());
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- pathList.Add(row.GetValue("judgeStoveNo") + "_" + row.GetValue("batchNo") + ";" + dt.Rows[i]["REPORTPATH"].ToString2());
- }
- break;
- default:
- dt = _d.GetTableByXmlId("QcmZgJugdeApplyDAL.getReportPath", row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- pathList.Add(row.GetValue("judgeStoveNo") + "_" + row.GetValue("batchNo") + ";" + dt.Rows[i][0].ToString2());
- }
- break;
- }
- }
- wf.Close();
- dlgOrderAskDown down = new dlgOrderAskDown(this.ob, pathList, "2", judgeStoveNos);
- down.DeleteButton.Visible = false;
- down.ShowDialog();
- //打开下载后的文件夹
- if (down.Pic != "")
- System.Diagnostics.Process.Start("Explorer.exe", down.Pic);
- }
- private void startRefreshStatus()
- {
- timer = new System.Windows.Forms.Timer();
- //执行事件
- timer.Tick += (s, e1) =>
- {
- labelComboBox2.Checked = false;
- labelComboBox1.Checked = true;
- labelComboBox1.ComboBox.SelectedIndex = 0;
- Query();
- foreach (var row in _zgJudgeApplyCtrl.UltraGrid1.Rows)
- {
- row.Cells["Chk"].Value = true;
- }
- refreshStatus("0");
- };
- //开始执行
- timer.Start();
- //间隔
- timer.Interval = 1000 * 60 * 10;
- MessageUtil.ShowTips("开始执行刷新条件!");
- }
- private void UpdateZbsLock()
- {
- var row = _zgJudgeApplyCtrl.UltraGrid1.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!");
- return;
- }
- string judgeStoveNo = row.GetValue("judgeStoveNo");
- string batchNo = row.GetValue("batchNo");
- string applyCode = row.GetValue("jugdeApplyCode");
- string zbsLockFlag = row.GetValue("zbsLockFlag").Equals("1") ? "0" : "1";
- var result = _d.Set("com.steering.pss.judge.Bll.BllCreateZbsInfo.UpdateZbsLock",
- applyCode, judgeStoveNo, batchNo, zbsLockFlag);
- if (result.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning(result.ReturnInfo);
- return;
- }
- if ("0".Equals(zbsLockFlag))
- {
- MessageUtil.ShowTips("解锁成功!");
- }
- else
- {
- MessageUtil.ShowTips("锁定成功!");
- }
- Query();
- }
- private void DeleteRepeatSpline()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要撤销的记录!");
- return;
- }
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string judgeApplyCode = "";
- string lotNo = "";
- string judgeStoveNo = "";
- string batchNo = "";
- foreach (var row in chkRows)
- {
- judgeApplyCode = row.GetValue("jugdeApplyCode");
- lotNo = row.GetValue("lotNo");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- DataRow drCheckNoQualified = _d.GetRow("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.getCheckNoQualifiedCnt",
- new object[] { lotNo, judgeStoveNo, batchNo, new string[] { "0" } });
- DataRow drCheckNoQualified2 = _d.GetRow("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.getCheckNoQualifiedCnt",
- new object[] { lotNo, judgeStoveNo, batchNo, new string[] { "0", "1", "2" } });
- if (drCheckNoQualified2["count"].ToString() == "0")
- {
- MessageUtil.ShowWarning("该记录没有申请复取样,不需要撤销!");
- return;
- }
- else
- {
- if (drCheckNoQualified["count"].ToString() == "0")
- {
- MessageUtil.ShowWarning("该记录的申请复取样已被确认,不能撤销!");
- return;
- }
- }
- //DataRow drExistJudge = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.existJudgeQualified", row.GetValue("jugdeApplyCode"),
- // row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode);
- //if (drExistJudge["judgeResultCode"].ToString() == "40740701" || drExistJudge["judgeResultCode"].ToString() == "40740706"
- // || drExistJudge["judgeResultCode"].ToString() == "40740707") //如果已经判定则不判。 AND T.JUDGE_RESULT_CODE IN ('40740701', '40740702')
- //{
- // MessageUtil.ShowWarning("该记录已经判定" + drExistJudge["judgeResult"].ToString() + ",不允许撤销复取样!", _zgJudgeApplyCtrl.UltraGrid1, row);
- // return;
- //}
- //有放行申请单的不允许判定。
- DataRow drPassApply = _d.GetRowByXmlId("JdgQcmBcPassApplyDAL.queryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode, "0");
- if (drPassApply != null)
- {
- if (drPassApply["TYPE"].ToString() == "0")
- {
- if (drPassApply["auditResult"].ToString() == "")
- {
- MessageUtil.ShowWarning("该炉号处于放行审核状态,不允许申请复取样!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drPassApply["auditResult"].ToString() == "407504")
- {
- MessageUtil.ShowWarning("该炉号放行处置结果为降级/改判,请操作撤销判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drPassApply["auditResult"].ToString() == "407505")
- {
- MessageUtil.ShowWarning("该炉号放行处置结果为报废,请操作撤销判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drPassApply["auditResult"].ToString() == "407506")
- {
- MessageUtil.ShowWarning("该炉号放行处置结果为返工,请操作撤销判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- }
- }
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认撤销复取样?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- List<string> judgeStoveNos = new List<string>();
- foreach (var row in chkRows)
- {
- if (judgeStoveNos.Contains(row.GetValue("judgeStoveNo"))) continue;
- judgeStoveNos.Add(row.GetValue("judgeStoveNo"));
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.deleteRepeatSpline", lotNo,
- judgeStoveNo, batchNo, UserInfo.GetUserName());
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- return;
- }
- }
- MessageUtil.ShowTips("撤销复取样成功!");
- Relocate(judgeApplyCode, judgeStoveNo, batchNo);
- }
- private void ApplyRepeatSpline()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要申请复取样的记录!");
- return;
- }
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string judgeApplyCode = "";
- string judgeStoveNo = "";
- string batchNo = "";
- foreach (var row in chkRows)
- {
- judgeApplyCode = row.GetValue("jugdeApplyCode");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- DataRow drExistJudge = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.existJudgeQualified", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode);
- if (drExistJudge["judgeResultCode"].ToString() == "40740701" || drExistJudge["judgeResultCode"].ToString() == "40740706"
- || drExistJudge["judgeResultCode"].ToString() == "40740707") //如果已经判定则不判。 AND T.JUDGE_RESULT_CODE IN ('40740701', '40740702')
- {
- //MessageUtil.ShowWarning("该记录已经判定" + drExistJudge["judgeResult"].ToString() + ",不允许申请复取样!", _zgJudgeApplyCtrl.UltraGrid1, row);
- //return;
- }
- //有放行申请单的不允许判定。
- DataRow drPassApply = _d.GetRowByXmlId("JdgQcmBcPassApplyDAL.queryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode, "0");
- if (drPassApply != null)
- {
- if (drPassApply["TYPE"].ToString() == "0")
- {
- if (drPassApply["auditResult"].ToString() == "")
- {
- MessageUtil.ShowWarning("该炉号处于放行审核状态,不允许申请复取样!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drPassApply["auditResult"].ToString() == "407504")
- {
- MessageUtil.ShowWarning("该炉号放行处置结果为降级/改判,请操作撤销判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drPassApply["auditResult"].ToString() == "407505")
- {
- MessageUtil.ShowWarning("该炉号放行处置结果为报废,请操作撤销判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drPassApply["auditResult"].ToString() == "407506")
- {
- MessageUtil.ShowWarning("该炉号放行处置结果为返工,请操作撤销判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- }
- }
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认申请复取样?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- List<string> judgeStoveNos = new List<string>();
- foreach (var row in chkRows)
- {
- if (judgeStoveNos.Contains(row.GetValue("judgeStoveNo"))) continue;
- judgeStoveNos.Add(row.GetValue("judgeStoveNo"));
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.applyRepeatSpline", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), UserInfo.GetUserName());
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- return;
- }
- }
- MessageUtil.ShowTips("申请复取样成功!");
- Relocate(judgeApplyCode, judgeStoveNo, batchNo);
- }
- private void UpdateMemo()
- {
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要修改的记录!");
- return;
- }
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1);
- }
- else
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- }
- return;
- }
- string judgeApplyCode = "";
- string judgeStoveNo = "";
- string batchNo = "";
- List<string[]> parms = new List<string[]>();
- foreach (var row in chkRows)
- {
- judgeApplyCode = row.GetValue("jugdeApplyCode");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- //DataRow drJudgeCnt = _d.GetRowByXmlId("JdgQcmBcJudge.queryCntByJudgeStoveNo", judgeStoveNo, batchNo, processCode);
- //if (drJudgeCnt[0].ToString() == "0")
- //{
- // MessageUtil.ShowWarning("该记录还没有判定不能修改备注信息!");
- // return;
- //}
- parms.Add(new string[] { judgeApplyCode, judgeStoveNo, batchNo, processCode, row.GetValue("memo"), row.GetValue("judgeMemo") });
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认修改备注?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.UpdateMemo", parms);
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowError(ccp.ReturnInfo);
- return;
- }
- else
- {
- MessageUtil.ShowTips("操作成功!");
- }
- Relocate(judgeApplyCode, judgeStoveNo, batchNo);
- }
- private void DeleteJudge()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要撤销的记录!");
- return;
- }
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string judgeApplyCode = "";
- string lotNo = "";
- string judgeStoveNo = "";
- string bathcNo = "";
- bool deleteJudgeTiped = false;
- foreach (var row in chkRows)
- {
- judgeApplyCode = row.GetValue("jugdeApplyCode");
- lotNo = row.GetValue("lotNo");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- bathcNo = row.GetValue("batchNo");
- ////判断是否可以撤销
- //DataRow zyMRow = null;
- //if (processCode == "D")
- //{
- // zyMRow = _d.GetRowByXmlId("JdgPlnZyZgM.queryByJudgeStoveNo", judgeStoveNo);
- //}
- //else if (processCode == "E")
- //{
- // zyMRow = _d.GetRowByXmlId("JdgPlnZyDbkM.queryByJudgeStoveNo", judgeStoveNo);
- //}
- //else if (processCode == "F")
- //{
- // zyMRow = _d.GetRowByXmlId("JdgPlnZyRclM.queryByJudgeStoveNo", judgeStoveNo);
- //}
- //else if (processCode == "G")
- //{
- // zyMRow = _d.GetRowByXmlId("JdgPlnZyJgxM.queryByJudgeStoveNo", judgeStoveNo);
- //}
- DataRow drGpApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- DataRow drPassApply = _d.GetRowByXmlId("JdgQcmBcPassApplyDAL.queryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode, "0");
- if (drGpApply != null && drGpApply["judgeResultCode"].ToString() == "40740704"
- && drPassApply != null && drPassApply["TYPE"].ToString() == "0")
- {
- if (drPassApply["auditResult"].ToString() == "407502" || drPassApply["auditResult"].ToString() == "407503")
- {
- deleteJudgeTiped = true;
- if (MessageUtil.ShowYesNoAndQuestion("炉号" + judgeStoveNo + " 放行处置结果为让步接收,是否确认撤销判定?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- }
- }
- }
- if (deleteJudgeTiped == false)
- {
- if (MessageUtil.ShowYesNoAndQuestion("是否确认进行撤销判定?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- }
- List<string> judgeStoveNos = new List<string>();
- foreach (var row in chkRows)
- {
- if (judgeStoveNos.Contains(row.GetValue("judgeStoveNo"))) continue;
- judgeStoveNos.Add(row.GetValue("judgeStoveNo"));
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.deleteJudge", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode, UserInfo.GetUserName());
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- return;
- }
- }
- MessageUtil.ShowTips("操作成功!");
- Relocate(judgeApplyCode, judgeStoveNo, bathcNo);
- }
- private void DeletePassApply()
- {
- var chkRows = _bcPassApply.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择一行记录");
- return;
- }
- List<string> passApplyNos = new List<string>();
- string passApplyNo = "";
- string passApplySeq = "";
- foreach (var row in chkRows)
- {
- DataRow drPassApply = _d.GetRowByXmlId("JdgQcmBcPassApplyDAL.queryByPassApplyNo", row.GetValue("passApplyNo"));
- if (drPassApply == null)
- {
- MessageUtil.ShowWarning("此炉号不需要删除放行申请单!");
- return;
- }
- DataRow drZgJudgeApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- if (drZgJudgeApply != null && drPassApply["type"].ToString() == "0")
- {
- if (drZgJudgeApply["judgeResultCode"].ToString() != "40740704" && drZgJudgeApply["judgeResultCode"].ToString() != "40740708")
- {
- MessageUtil.ShowWarning("只能删除判定不合格状态的放行申请单!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- if (drZgJudgeApply["auditResult"].ToString() == "407504" || drZgJudgeApply["auditResult"].ToString() == "407505"
- || drZgJudgeApply["auditResult"].ToString() == "407506")
- {
- MessageUtil.ShowWarning("此炉号已退回炼钢,不能删除!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- }
- else
- {
- if (drPassApply["auditResult"].ToString() == "1")
- {
- MessageUtil.ShowWarning("此炉号已经通过紧急放行,不能删除申请放行单!");
- return;
- }
- }
- //DataRow drPassApply = _d.GetRowByXmlId("QcmGpPassApplyDAL.queryByPassApplyNo", row.GetValue("passApplyNo"));
- //if (drPassApply["auditResult"].ToString() == "1" && drPassApply["auditResult2"].ToString() == "")
- //{
- // MessageUtil.ShowWarning("不能删除正在审核的申请放行单!");
- // return;
- //}
- //else if (drPassApply["auditResult"].ToString() == "1" && drPassApply["auditResult2"].ToString() == "1")
- //{
- // MessageUtil.ShowWarning("不能删除审核通过的申请放行单!");
- // return;
- //}
- passApplyNos.Add(row.GetValue("PassApplyNo"));
- passApplyNo = row.GetValue("PassApplyNo");
- passApplySeq = row.GetValue("passApplySeq");
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认删除申请放行?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubePassApply.delete", passApplyNos, UserInfo.GetUserName());
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowError(ccp.ReturnInfo);
- return;
- }
- else
- {
- MessageUtil.ShowTips("操作成功!");
- }
- Query();
- var rowRelocate = _bcPassApply.UltraGrid1.Rows.Where(a => a.GetValue("PassApplyNo") == passApplyNo
- && a.GetValue("passApplySeq") == passApplySeq).FirstOrDefault();
- if (rowRelocate != null)
- {
- rowRelocate.Activate();
- }
- }
- private void PassApply()
- {
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要放行申请的记录!");
- return;
- }
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1);
- }
- else
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- }
- return;
- }
- List<string[]> parms = new List<string[]>();
- string judgeApplyCode = "";
- string judgeStoveNo = "";
- string batchNo = "";
- string passType = passInfo == "Quality" ? "0" : "1";
- foreach (var row in chkRows)
- {
- judgeApplyCode = row.GetValue("jugdeApplyCode");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- DataRow drZgJudgeApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- if (passInfo == "Quality")
- {
- if (drZgJudgeApply["judgeResultCode"].ToString() != "40740704" && drZgJudgeApply["judgeResultCode"].ToString() != "40740707"
- && drZgJudgeApply["judgeResultCode"].ToString() != "40740708")
- {
- MessageUtil.ShowWarning("只有判定不合格的记录,才能申请质量放行!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- }
- else if (passInfo == "Urgent")
- {
- if (drZgJudgeApply["judgeResultCode"].ToString() != "")
- {
- MessageUtil.ShowWarning("只有未判定的记录,才能申请紧急放行!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- }
- DataRow drPassApply = _d.GetRowByXmlId("JdgQcmBcPassApplyDAL.queryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode, passType);
- if (drPassApply != null)
- {
- MessageUtil.ShowWarning("该记录已生成放行申请单,不能重复生成!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- string[] parm = new string[] { judgeApplyCode, judgeStoveNo, batchNo };
- parms.Add(parm);
- }
- PopupSubmit popupSubmit = new PopupSubmit("是否确认放行申请?", true, "请输入放行申请原因!");
- if (popupSubmit.ShowDialog() != System.Windows.Forms.DialogResult.Yes)
- {
- return;
- }
- var ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.passApply", parms, processCode,
- UserInfo.GetUserName(), UserInfo.GetDeptid(), UserInfo.GetDepartment(), popupSubmit.TxtAudit.Text.Trim(), passType);
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowError(ccp.ReturnInfo);
- return;
- }
- else
- {
- MessageUtil.ShowTips("操作成功!");
- }
- Relocate(judgeApplyCode, judgeStoveNo, batchNo);
- }
- private void Judge(string judgeFlag)
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要判定的记录!");
- return;
- }
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string judgeApplyCode = "";
- string judgeStoveNo = "";
- string batchNo = "";
- bool asked = false;
- foreach (var row in chkRows)
- {
- judgeApplyCode = row.GetValue("jugdeApplyCode");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- //var ccp = _d.Set("com.steering.pss.judge.Bll.BllDbkSpecJudge.judge", judgeApplyCode, judgeStoveNo, batchNo);
- //if (ccp.ReturnInfo != "")
- //{
- // MessageUtil.ShowWarning(ccp.ReturnInfo);
- // return;
- //}
- DataRow drExistJudge = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.existJudgeQualified", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode);
- if (drExistJudge["judgeResultCode"].ToString() == "40740701" || drExistJudge["judgeResultCode"].ToString() == "40740706"
- || drExistJudge["judgeResultCode"].ToString() == "40740707") //如果已经判定则不判。 AND T.JUDGE_RESULT_CODE IN ('40740701', '40740702')
- {
- MessageUtil.ShowWarning("该记录已经" + drExistJudge["judgeResult"].ToString() + ",不允许重复判定!", _zgJudgeApplyCtrl.UltraGrid1, row);
- return;
- }
- CoreClientParam ccpDetect = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.checkDetect", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- if (ccpDetect.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning(ccpDetect.ReturnInfo.ToString2());
- return;
- }
- else
- {
- if (ccpDetect.ReturnObject.ToString2() != "")
- {
- if (MessageUtil.ShowYesNoAndQuestion(ccpDetect.ReturnObject.ToString2() + "\r\n是否继续判定?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- asked = true;
- }
- }
- //验证是否复取样,如果复取样则不自动判定
- //CoreClientParam checkFsample = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.checkFsample", row.GetValue("jugdeApplyCode"),
- //row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode);
- //if (checkFsample.ReturnInfo.ToString2() != "")
- //{
- // MessageUtil.ShowWarning(checkFsample.ReturnInfo.ToString2());
- // return;
- //}
- //else
- //{
- // if (checkFsample.ReturnObject.ToString2() != "")
- // {
- // if (MessageUtil.ShowYesNoAndQuestion(checkFsample.ReturnObject.ToString2() + "\r\n是否继续判定?") == System.Windows.Forms.DialogResult.No)
- // {
- // return;
- // }
- // asked = true;
- // }
- //}
- //验证是否符合取样数量
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.judge.Bll.BllRolledTubeColligateJudge";
- ccp.MethodName = "checkSampleCount";
- ccp.ServerParams = new object[] { row.GetValue("jugdeApplyCode"), row.GetValue("judgeStoveNo"),
- row.GetValue("batchNo"), "0"};
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- CoreClientParam ccpFd = new CoreClientParam();
- ccpFd.ServerName = "com.steering.pss.judge.Bll.BllRolledTubeColligateJudge";
- ccpFd.MethodName = "checkSampleCount";
- ccpFd.ServerParams = new object[] { row.GetValue("jugdeApplyCode"), row.GetValue("judgeStoveNo"),
- row.GetValue("batchNo"), "1"};
- ccpFd = ob.ExecuteNonQuery(ccpFd, CoreInvokeType.Internal);
- if (ccp.ReturnObject.ToString2() != "")
- {
- if (MessageUtil.ShowYesNoAndQuestion(ccp.ReturnObject.ToString2() + "\r\n是否继续判定?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- }
- else if (processCode == "F" && ccpFd.ReturnObject.ToString2() != "")
- {
- if (MessageUtil.ShowYesNoAndQuestion(ccpFd.ReturnObject.ToString2() + "\r\n是否继续判定?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- }
- else if (ccp.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowError(ccp.ReturnInfo);
- return;
- }
- }
- if (!asked)
- {
- if (MessageUtil.ShowYesNoAndQuestion("是否确认进行判定?") == System.Windows.Forms.DialogResult.No)
- {
- return;
- }
- }
- List<string> judgeStoveNos = new List<string>();
- foreach (var row in chkRows)
- {
- if (judgeStoveNos.Contains(row.GetValue("judgeStoveNo"))) continue;
- judgeStoveNos.Add(row.GetValue("judgeStoveNo"));
- //人工修改利库炉号判定结果
- List<string> checkDetailJsons = GetCheckDetailsJsons(_zcAllChemPhyCtrl);
- CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.judge", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), processCode, UserInfo.GetUserName(), UserInfo.GetUserOrderText(),
- UserInfo.GetUserGroupText(), row.GetValue("memo"), row.GetValue("judgeMemo"), judgeFlag, checkDetailJsons);
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- return;
- }
- }
- MessageUtil.ShowTips("判定成功!");
- Relocate(judgeApplyCode, judgeStoveNo, batchNo);
- }
- private void refreshStatus(String isShowTips)
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (_zgJudgeApplyCtrl.UltraGrid1.ActiveRow == null)
- {
- MessageUtil.ShowWarning("没有需要刷新的记录!");
- return;
- }
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择需要刷新的记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- List<string> judgeStoveNos = new List<string>();
- foreach (var row in chkRows)
- {
- if (judgeStoveNos.Contains(row.GetValue("judgeStoveNo"))) continue;
- judgeStoveNos.Add(row.GetValue("judgeStoveNo"));
- CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.refreshStatus", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"), UserInfo.GetUserName());
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- return;
- }
- }
- if (isShowTips.Equals("1"))
- {
- MessageUtil.ShowTips("刷新成功!");
- }
- }
- public static List<string> GetCheckDetailsJsons(QcmZcAllChemPhyCtrl zcAllChemPhyCtrl)
- {
- //人工修改利库炉号判定结果
- List<string> checkDetailJsons = new List<string>();
- foreach(DataRow checkRow in zcAllChemPhyCtrl.ZgChemPhyLgCtrl.JhyPhySplineCtrl.DataTable1.Rows)
- {
- if (checkRow["chk"].ToString() == "True")
- {
- checkDetailJsons.Add(JsonHelper.ToJson(checkRow));
- }
- }
- foreach (DataRow checkRow in zcAllChemPhyCtrl.ZgChemPhyZgCtrl.JhyPhySplineCtrl.DataTable1.Rows)
- {
- if (checkRow["chk"].ToString() == "True")
- {
- checkDetailJsons.Add(JsonHelper.ToJson(checkRow));
- }
- }
- foreach (DataRow checkRow in zcAllChemPhyCtrl.ZgChemPhyDbkCtrl.JhyPhySplineCtrl.DataTable1.Rows)
- {
- if (checkRow["chk"].ToString() == "True")
- {
- checkDetailJsons.Add(JsonHelper.ToJson(checkRow));
- }
- }
- foreach (DataRow checkRow in zcAllChemPhyCtrl.ZgChemPhyRclCtrl.JhyPhySplineCtrl.DataTable1.Rows)
- {
- if (checkRow["chk"].ToString() == "True")
- {
- checkDetailJsons.Add(JsonHelper.ToJson(checkRow));
- }
- }
- foreach (DataRow checkRow in zcAllChemPhyCtrl.ZgChemPhyJgxCtrl.JhyPhySplineCtrl.DataTable1.Rows)
- {
- if (checkRow["chk"].ToString() == "True")
- {
- checkDetailJsons.Add(JsonHelper.ToJson(checkRow));
- }
- }
- foreach (DataRow checkRow in zcAllChemPhyCtrl.ZgChemPhyJgCtrl.JhyPhySplineCtrl.DataTable1.Rows)
- {
- if (checkRow["chk"].ToString() == "True")
- {
- checkDetailJsons.Add(JsonHelper.ToJson(checkRow));
- }
- }
- return checkDetailJsons;
- }
- private void RefreshZbs()
- {
- WaitingForm2 wf = new WaitingForm2("正在刷新,请稍后....");
- try
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string zbsFlag = "";//空表示不修改质保书打印方式
- foreach (var row in chkRows)
- {
- string judgeApplyCode = row.GetValue("jugdeApplyCode");
- string judgeStoveNo = row.GetValue("judgeStoveNo");
- string batchNo = row.GetValue("batchNo");
- CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllCreateZbsInfo.Create", judgeApplyCode, judgeStoveNo, batchNo, zbsFlag);
- if (ccp.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning("炉号:" + judgeStoveNo + "批号:" + batchNo + " " + ccp.ReturnInfo);
- return;
- }
- }
- }
- finally
- {
- wf.Close();
- }
- MessageUtil.ShowTips("刷新成功!");
- }
- private void ReviewGpCertificate()
- {
- try
- {
- this.Cursor = Cursors.WaitCursor;
- var row = _zgJudgeApplyCtrl.UltraGrid1.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowWarning("请选择一行记录!");
- return;
- }
- string judgeApplyCode = row.Cells["jugdeApplyCode"].Value.ToString();
- string judgeStoveNo = row.Cells["judgeStoveNo"].Value.ToString();
- string batchNo = row.Cells["batchNo"].Value.ToString();
- DataRow drZgApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", row.GetValue("jugdeApplyCode"),
- row.GetValue("judgeStoveNo"), row.GetValue("batchNo"));
- string craftSource = "0";
- string lgJudgeStoveNo = drZgApply["loadJudgeStoveNo"].ToString();
- DataRow drLgJudge = _d.GetRowByXmlId("QcmLgJudgeDAL.queryByJudgeStoveNo", lgJudgeStoveNo, "B");
- if (drLgJudge == null)
- {
- DataRow drGpChange = _d.GetRowByXmlId("JdgQcmGpJudgeChange.getJudgeStoveNo", lgJudgeStoveNo, "B");
- if (drGpChange != null)
- {
- lgJudgeStoveNo = drGpChange["judgeStoveNo"].ToString();
- }
- }
-
- //Dictionary<string, DataRow> tmpApplyDic = QcmZcAllChemPhyCtrl.GetAllJudgeApply(row.GetValue("jugdeApplyCode"), row.GetValue("judgeStoveNo"), row.GetValue("batchNo"),
- // row.GetValue("processCode"),row.GetValue("heatPlanNo"),row.GetValue("processCode"), null, null, _d);
- //String batchNop = "";
- //if (tmpApplyDic.Keys.Contains("G"))
- //{
- // batchNop = tmpApplyDic["G"]["batchNo"].ToString();
- //}
- //else if (tmpApplyDic.Keys.Contains("F"))
- //{
- // batchNop = tmpApplyDic["F"]["batchNo"].ToString();
- //}
- //else if (tmpApplyDic.Keys.Contains("E"))
- //{
- // batchNop = tmpApplyDic["E"]["batchNo"].ToString();
- //}
- //else if (tmpApplyDic.Keys.Contains("D"))
- //{
- // batchNop = tmpApplyDic["D"]["batchNo"].ToString();
- //}
- //else if (tmpApplyDic.Keys.Contains("A"))
- //{
- // batchNop = tmpApplyDic["A"]["batchNo"].ToString();
- //}
- //+ "&BATCH_NO_P=" + batchNop
- string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepCertificateZG.cpt&op=view&bypagesize=false" + "&JUGDE_APPLY_CODE="
- + judgeApplyCode + "&JUDGE_STOVE_NO=" + judgeStoveNo + "&BATCH_NO=" + batchNo + "&PROCESS_CODE=" + processCode + "&CRAFT_SOURCE=" + craftSource
- + "&LG_JUDGE_STOVE_NO=" + lgJudgeStoveNo ;
- FrmOrderRepExcel fBug = new FrmOrderRepExcel(ob, strurl);
- fBug.AutoSize = true;
- fBug.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fBug.WindowState = FormWindowState.Maximized;
- fBug.Text = "管材判定书";
- fBug.Show();
- }
- finally
- {
- this.Cursor = Cursors.Default;
- }
- }
- private void Relocate(string judgeApplyCode, string judgeStoveNo, string batchNo)
- {
- if (_gpApplyQuery)
- {
- Query();
- var rowJudgeApply = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("jugdeApplyCode") == judgeApplyCode
- && a.GetValue("judgeStoveNo") == judgeStoveNo && a.GetValue("batchNo") == batchNo).FirstOrDefault();
- if (rowJudgeApply != null)
- {
- rowJudgeApply.Activate();
- }
- }
- else
- {
- //ultraTextEditor2_EditorButtonClick(null, null);
- //var rowSteelMaking = _meltingStoveNoCtrl.UltraGrid1.Rows.Where(a => a.GetValue("stoveNo") == stoveNo).FirstOrDefault();
- //if (rowSteelMaking != null)
- //{
- // rowSteelMaking.Activate();
- //}
- }
- }
- private bool _gpApplyQuery = true;
- private void Query()
- {
- try
- {
- //测试生成组炉委托
- //_d.Set("com.steering.pss.judge.Bll.BllCreateGroupStoveInfo.Create", "F", "C0232019070135", "790739", "23001", "C02380140120190709000003");
- //测试生成利库委托
- //_d.Set("com.steering.pss.judge.Bll.BllCreateGroupStoveInfo.Create", "F", "C0542018120490", "888302", "54001", "RCL20180700669",
- // "3", "RCL20180700669004", "");
- this.Cursor = Cursors.WaitCursor;
- string timeType = ultraComboEditor3.Value.ToString2();
- string timeB = labelDateTimePicker1.Checked ? labelDateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string timeE = labelDateTimePicker1.Checked ? labelDateTimePicker2.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string[] judgeStates;
- if (labelComboBox2.ComboBox.Value == null || !labelComboBox2.Checked)
- {
- judgeStates = new string[0];
- }
- else
- {
- judgeStates = ((List<object>)labelComboBox2.ComboBox.Value).Select(a => a.ToString()).ToArray();
- }
- string judgeCondition = labelComboBox1.Checked ? labelComboBox1.ComboBox.Value.ToString2() : "";
- string stoveNo = labelTextBox1.Checked ? labelTextBox1.Text.Trim() : "";
- string judgeStoveNo = labelTextBox4.Checked ? labelTextBox4.Text.Trim() : "";
- string lotNo = labelTextBox1.Checked ? labelTextBox1.Text.Trim() : "";
- string orderMngNo = labelTextBox10.Checked ? labelTextBox10.Text.Trim() : "";
- string[] plines = ultraTextEditor1.Tag.ToString2().Split(',');
- switch (ultraTabControl2.SelectedTab.Text)
- {
- case "综合判定":
- _gpApplyQuery = true;
- _zcAllChemPhyCtrl.ClearChemPhyData();
- _zgJudgeApplyCtrl.Clear();
- if (passInfo == "Quality")
- {
- _zgJudgeApplyCtrl.QueryBcQuality(lotNo, judgeStoveNo, judgeStates, timeB, timeE, plines,
- processCode, judgeCondition, orderMngNo, timeType);
- }
- else if (passInfo == "Urgent")
- {
- string uTimeType = ultraComboEditor4.Value.ToString2();
- string uTimeB = labelDateTimePicker8.Checked ? labelDateTimePicker8.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string uTimeE = labelDateTimePicker8.Checked ? labelDateTimePicker7.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string uJudgeState = labelComboBox9.Checked ? labelComboBox9.ComboBox.Value.ToString2() : "";
- string uJudgeCondition = labelComboBox10.Checked ? labelComboBox10.ComboBox.Value.ToString2() : "";
- string uJudgeStoveNo = labelTextBox2.Checked ? labelTextBox2.Text.Trim() : "";
- string uLotNo = labelTextBox8.Checked ? labelTextBox8.Text.Trim() : "";
- string[] uPlines = ultraTextEditor3.Tag.ToString2().Split(',');
- string uOrderMngNo = labelTextBox9.Checked ? labelTextBox9.Text.Trim() : "";
- string uOrderNo = "";
- string uOrderSeq = "";
- if (uOrderMngNo.Contains("/"))
- {
- uOrderNo = uOrderMngNo.Split('/')[0].Trim();
- uOrderSeq = uOrderMngNo.Split('/')[1].Trim();
- }
- else
- {
- uOrderNo = uOrderMngNo;
- }
- _zgJudgeApplyCtrl.QueryBcUrgent(uLotNo, uJudgeStoveNo, uJudgeState, uTimeB, uTimeE, uPlines,
- processCode, uJudgeCondition, uOrderNo, uOrderSeq, uTimeType);
- }
- else
- {
- _zgJudgeApplyCtrl.QueryBcColligate(lotNo, judgeStoveNo, judgeStates, timeType, timeB, timeE, plines,
- judgeCondition, orderMngNo);
- }
- break;
- case "判定记录":
- string batchNo2 = labelTextBox3.Checked ? labelTextBox3.Text.Trim() : "";
- string judgeStoveNo2 = labelTextBox7.Checked ? labelTextBox7.Text.Trim() : "";
- string judgeResult2 = labelComboBox3.Checked ? labelComboBox3.SelecteValue.ToString2() : "";
- string timeBegin = labelDateTimePicker4.Checked ? labelDateTimePicker4.DateTimePicker.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string timeEnd = labelDateTimePicker3.Checked ? labelDateTimePicker3.DateTimePicker.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string[] plines2 = ultraTextEditor4.Tag.ToString2().Split(',');
- orderMngNo = labelTextBox11.Checked ? labelTextBox11.Text.Trim() : "";
- _bcJudgeCtrl.Query(batchNo2, judgeStoveNo2, judgeResult2, timeBegin, timeEnd, plines2, orderMngNo);
- break;
- case "不合格评审记录":
- string batchNo3 = labelTextBox5.Checked ? labelTextBox5.Text.Trim() : "";
- string judgeStoveNo3 = labelTextBox6.Checked ? labelTextBox6.Text.Trim() : "";
- string timeB3 = labelDateTimePicker6.Checked ? labelDateTimePicker6.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string timeE3 = labelDateTimePicker6.Checked ? labelDateTimePicker5.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
- string validflag = labelCheckBox1.Checked ? "0" : "1";
- //_zgJudgeApplyDtlCtrl2.Clear();
- _bcPassFlowCtrl.Clear();
- _bcPassApply.AllQuery(judgeStoveNo3, batchNo3, timeB3, timeE3, passInfo, validflag, processCode);
- break;
- }
- }
- finally
- {
- this.Cursor = Cursors.Default;
- }
- }
- void steelMakingCtrl_AfterRowActivate(object sender, EventArgs e)
- {
- //try
- //{
- // this.Cursor = Cursors.WaitCursor;
- // _jhyElementsCtrl.ClearData();
- // _jhyPhyDbResultCtrl.ClearData();
- // _gpJudgeApplyDtlCtrl.Clear();
- // _faceFileCtrl.ClearData();
- // var row = _meltingStoveNoCtrl.UltraGrid1.ActiveRow;
- // _zgJudgeApplyCtrl.qu.QuerySteelMakingP(row.GetValue("StoveNo"));
- //}
- //finally
- //{
- // this.Cursor = Cursors.Default;
- //}
- }
- void gpJudgeApplyCtrl_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- this.Cursor = Cursors.WaitCursor;
- _zcAllChemPhyCtrl.UltraTabControl2_SelectedTabChanged(null, null);
- }
- finally
- {
- this.Cursor = Cursors.Default;
- }
- }
- public DataTable GetCraftCic(UltraGridRow zgJudgeApplyRow)
- {
- DataRow drZgJudgeApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", zgJudgeApplyRow.GetValue("jugdeApplyCode"),
- zgJudgeApplyRow.GetValue("judgeStoveNo"), zgJudgeApplyRow.GetValue("batchNo"));
- string[] zgProPlanIds = new string[1];
- zgProPlanIds[0] = drZgJudgeApply["proOrderId"].ToString() + drZgJudgeApply["gxPlanNo"].ToString();
- DataTable dtCraftCic = null;
- string judgeStoveNo = zgJudgeApplyRow.GetValue("judgeStoveNo");
- if (zgProPlanIds[0].StartsWith("ZG"))
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderZgS.queryZgCraftCicByZgProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- else if (zgProPlanIds[0].StartsWith("DBK"))
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderDbkS.queryCraftCicByProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- else if (zgProPlanIds[0].StartsWith("RCL"))
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderRclS.queryCraftCicByProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- else
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderJgxS.queryCraftCicByProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- return dtCraftCic;
- }
- public DataTable GetCraftPic(UltraGridRow zgJudgeApplyRow)
- {
- DataRow drZgJudgeApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", zgJudgeApplyRow.GetValue("jugdeApplyCode"),
- zgJudgeApplyRow.GetValue("judgeStoveNo"), zgJudgeApplyRow.GetValue("batchNo"));
- string[] zgProPlanIds = new string[1];
- zgProPlanIds[0] = drZgJudgeApply["proOrderId"].ToString() + drZgJudgeApply["gxPlanNo"].ToString();
- DataTable dtCraftCic = null;
- string judgeStoveNo = drZgJudgeApply["judgeStoveNo"].ToString();
- if (zgProPlanIds[0].StartsWith("ZG"))
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderZgS.queryZgCraftPicByZgProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- else if (zgProPlanIds[0].StartsWith("DBK"))
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderDbkS.queryCraftPicByProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- else if (zgProPlanIds[0].StartsWith("RCL"))
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderRclS.queryCraftPicByProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- else
- {
- dtCraftCic = _d.GetTableByXmlId("JdgPlnOrderJgxS.queryCraftPicByProPlanId", new object[] { zgProPlanIds, judgeStoveNo });
- }
- return dtCraftCic;
- }
- private void labelDateTimePicker4_CheckBox_CheckedChanged(object sender, EventArgs e)
- {
- labelDateTimePicker3.DateTimePicker.Enabled = labelDateTimePicker4.Checked;
- }
- private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (toolMenu == null || toolMenu.Toolbars.Count == 0) return;
- switch (ultraTabControl2.ActiveTab.Key)
- {
- case "Judge":
- if (this.toolMenu.Toolbars[0].Tools.Exists("Judge")) this.toolMenu.Toolbars[0].Tools["Judge"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("PassApply")) this.toolMenu.Toolbars[0].Tools["PassApply"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("UrgentPassApply")) this.toolMenu.Toolbars[0].Tools["UrgentPassApply"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("DeletePassApply")) this.toolMenu.Toolbars[0].Tools["DeletePassApply"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("DeleteJudge")) this.toolMenu.Toolbars[0].Tools["DeleteJudge"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("UpdateMemo")) this.toolMenu.Toolbars[0].Tools["UpdateMemo"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("Export")) this.toolMenu.Toolbars[0].Tools["Export"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("FoldQuery")) this.toolMenu.Toolbars[0].Tools["FoldQuery"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("GapJudge")) this.toolMenu.Toolbars[0].Tools["GapJudge"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("RefreshGroup")) this.toolMenu.Toolbars[0].Tools["RefreshGroup"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("RefreshZbs")) this.toolMenu.Toolbars[0].Tools["RefreshZbs"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("ReviewGpCertificate")) this.toolMenu.Toolbars[0].Tools["ReviewGpCertificate"].SharedProps.Visible = true;
- break;
- case "JudgeRecord":
- if (this.toolMenu.Toolbars[0].Tools.Exists("Judge")) this.toolMenu.Toolbars[0].Tools["Judge"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("PassApply")) this.toolMenu.Toolbars[0].Tools["PassApply"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("UrgentPassApply")) this.toolMenu.Toolbars[0].Tools["UrgentPassApply"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("DeletePassApply")) this.toolMenu.Toolbars[0].Tools["DeletePassApply"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("DeleteJudge")) this.toolMenu.Toolbars[0].Tools["DeleteJudge"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("UpdateMemo")) this.toolMenu.Toolbars[0].Tools["UpdateMemo"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("Export")) this.toolMenu.Toolbars[0].Tools["Export"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("FoldQuery")) this.toolMenu.Toolbars[0].Tools["FoldQuery"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("GapJudge")) this.toolMenu.Toolbars[0].Tools["GapJudge"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("RefreshGroup")) this.toolMenu.Toolbars[0].Tools["RefreshGroup"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("RefreshZbs")) this.toolMenu.Toolbars[0].Tools["RefreshZbs"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("ReviewGpCertificate")) this.toolMenu.Toolbars[0].Tools["ReviewGpCertificate"].SharedProps.Visible = false;
- break;
- case "PassRecord":
- if (this.toolMenu.Toolbars[0].Tools.Exists("Judge")) this.toolMenu.Toolbars[0].Tools["Judge"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("PassApply")) this.toolMenu.Toolbars[0].Tools["PassApply"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("UrgentPassApply")) this.toolMenu.Toolbars[0].Tools["UrgentPassApply"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("DeletePassApply")) this.toolMenu.Toolbars[0].Tools["DeletePassApply"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("DeleteJudge")) this.toolMenu.Toolbars[0].Tools["DeleteJudge"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("UpdateMemo")) this.toolMenu.Toolbars[0].Tools["UpdateMemo"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("Export")) this.toolMenu.Toolbars[0].Tools["Export"].SharedProps.Visible = true;
- if (this.toolMenu.Toolbars[0].Tools.Exists("FoldQuery")) this.toolMenu.Toolbars[0].Tools["FoldQuery"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("GapJudge")) this.toolMenu.Toolbars[0].Tools["GapJudge"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("RefreshGroup")) this.toolMenu.Toolbars[0].Tools["RefreshGroup"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("RefreshZbs")) this.toolMenu.Toolbars[0].Tools["RefreshZbs"].SharedProps.Visible = false;
- if (this.toolMenu.Toolbars[0].Tools.Exists("ReviewGpCertificate")) this.toolMenu.Toolbars[0].Tools["ReviewGpCertificate"].SharedProps.Visible = false;
- break;
- }
- }
- private void SteelMakingColligateJudgeFrm_Shown(object sender, EventArgs e)
- {
- ultraTabControl2_SelectedTabChanged(null, null);
- FoldQuery();
- }
- private void labelDateTimePicker6_CheckBox_CheckedChanged(object sender, EventArgs e)
- {
- labelDateTimePicker5.DateTimeEnabled = labelDateTimePicker6.Checked;
- }
- private void labelTextBox4_TextBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyData == Keys.Enter)
- {
- Query();
- }
- }
- private void labelTextBox6_TextBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyData == Keys.Enter)
- {
- Query();
- }
- }
- private void labelTextBox7_TextBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyData == Keys.Enter)
- {
- Query();
- }
- }
- private void ultraExpandableGroupBox2_ExpandedStateChanged(object sender, EventArgs e)
- {
- if (!ultraExpandableGroupBox2.Expanded)
- {
- ultraExpandableGroupBox2.Dock = DockStyle.Bottom;
- splitContainer3.Panel1.Controls.Add(ultraExpandableGroupBox2);
- ultraExpandableGroupBox2.BringToFront();
- splitContainer3.Panel2Collapsed = true;
- }
- else
- {
- ultraExpandableGroupBox2.Dock = DockStyle.Fill;
- splitContainer3.Panel2.Controls.Add(ultraExpandableGroupBox2);
- splitContainer3.Panel2Collapsed = false;
- }
- }
- private void FoldQuery()
- {
- if (!this.toolMenu.Toolbars[0].Tools.Exists("FoldQuery")) return;
- if (passInfo == "Urgent")
- {
- panel6.Visible = !panel6.Visible;
- }
- else
- {
- panel1.Visible = !panel1.Visible;
- }
- if (panel1.Visible || panel1.Visible)
- {
- this.toolMenu.Toolbars[0].Tools["FoldQuery"].SharedProps.Caption = "折叠查询区域";
- }
- else
- {
- this.toolMenu.Toolbars[0].Tools["FoldQuery"].SharedProps.Caption = "展开查询区域";
- }
- }
- private void RefreshGroup()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- foreach (var row in chkRows)
- {
- string lotNo = row.GetValue("lotNo");
- string judgeStoveNo = row.GetValue("judgeStoveNo");
- string batchNo = row.GetValue("batchNo");
- string applyCode = row.GetValue("jugdeApplyCode");
- DataRow drZgJudgeApply = _d.GetRowByXmlId("QcmZgJugdeApplyDAL.QueryByBatchNo", applyCode, judgeStoveNo, batchNo);
- string processCode = drZgJudgeApply["processCode"].ToString();
- if (drZgJudgeApply["judgeResultCode"].ToString() == "40740701")
- {
- MessageUtil.ShowWarning("该记录已经有综合判定结果,不能刷新!");
- return;
- }
- _d.Set("com.steering.pss.judge.Bll.BllCreateGroupStoveInfo.Create", processCode, lotNo, judgeStoveNo, batchNo, applyCode);
- }
- MessageUtil.ShowTips("刷新成功!");
- }
- private void RefreshCraft()
- {
- WaitingForm2 wf = new WaitingForm2("正在刷新,请稍后....");
- try
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- foreach (var row in chkRows)
- {
- string judgeApplyCode = row.GetValue("jugdeApplyCode");
- string judgeStoveNo = row.GetValue("judgeStoveNo");
- string batchNo = row.GetValue("batchNo");
- CoreClientParam ccp = _d.Set("com.steering.pss.judge.Bll.BllZcColligateJudge.refreshCraft", judgeApplyCode, judgeStoveNo, batchNo);
- if (ccp.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning("炉号:" + judgeStoveNo + "批号:" + batchNo + " " + ccp.ReturnInfo);
- return;
- }
- }
- }
- finally
- {
- wf.Close();
- }
- MessageUtil.ShowTips("获取成功!");
- }
- private void CopyZgData()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string applyCode = "";
- string judgeStoveNo = "";
- string batchNo = "";
- foreach (var row in chkRows)
- {
- string lotNo = row.GetValue("lotNo");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- applyCode = row.GetValue("jugdeApplyCode");
- var result = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.CopyZgJhyData",
- applyCode, judgeStoveNo, batchNo, processCode);
- if (result.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning(result.ReturnInfo);
- return;
- }
- }
- MessageUtil.ShowTips("复制成功!");
- Relocate(applyCode, judgeStoveNo, batchNo);
- }
- private void CopyRclData()
- {
- var chkRows = _zgJudgeApplyCtrl.UltraGrid1.Rows.Where(a => a.GetValue("Chk") == "True");
- if (chkRows.Count() == 0)
- {
- MessageUtil.ShowWarning("请选择申请判定记录!", _zgJudgeApplyCtrl.UltraGrid1, _zgJudgeApplyCtrl.UltraGrid1.ActiveRow.Cells["Chk"]);
- return;
- }
- string applyCode = "";
- string judgeStoveNo = "";
- string batchNo = "";
- foreach (var row in chkRows)
- {
- string lotNo = row.GetValue("lotNo");
- judgeStoveNo = row.GetValue("judgeStoveNo");
- batchNo = row.GetValue("batchNo");
- applyCode = row.GetValue("jugdeApplyCode");
- var result = _d.Set("com.steering.pss.judge.Bll.BllRolledTubeColligateJudge.CopyRclJhyData",
- applyCode, judgeStoveNo, batchNo, processCode);
- if (result.ReturnInfo.ToString2() != "")
- {
- MessageUtil.ShowWarning(result.ReturnInfo);
- return;
- }
- }
- MessageUtil.ShowTips("复制成功!");
- Relocate(applyCode, judgeStoveNo, batchNo);
- }
- private void labelDateTimePicker8_CheckBox_CheckedChanged(object sender, EventArgs e)
- {
- labelDateTimePicker7.DateTimeEnabled = labelDateTimePicker8.Checked;
- }
- private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- ChoicePlineFrm frm = new ChoicePlineFrm(_dtPline, ultraTextEditor1.Tag.ToString2(), _d.Ob);
- if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraTextEditor1.Text = frm.ChoicePlineName;
- ultraTextEditor1.Tag = frm.ChoicePlineCode;
- }
- }
- private void ultraTextEditor3_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- ChoicePlineFrm frm = new ChoicePlineFrm(_dtPline, ultraTextEditor3.Tag.ToString2(), _d.Ob);
- if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraTextEditor3.Text = frm.ChoicePlineName;
- ultraTextEditor3.Tag = frm.ChoicePlineCode;
- }
- }
- private void ultraTextEditor4_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- ChoicePlineFrm frm = new ChoicePlineFrm(_dtPline, ultraTextEditor4.Tag.ToString2(), _d.Ob);
- if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraTextEditor4.Text = frm.ChoicePlineName;
- ultraTextEditor4.Tag = frm.ChoicePlineCode;
- }
- }
- }
- }
|